Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - balu

Pages: [1] 2
1
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: May 25, 2003, 07:21:25 PM »
Absolut GREAT
here the full mod - thx to sll and v@no!!!
Quote
<?php
define('ROOT_PATH', './4images/');
define('SITE_URL', 'http://www.yourdomain.de/');

include_once(ROOT_PATH.'config.php');
include_once(ROOT_PATH.'includes/db_mysql.php');
include_once(ROOT_PATH.'includes/constants.php');

define('PIC_CATEGORIES_TABLE', '4images_categories');
define('PIC_IMAGES_TABLE', '4images_images');

$pics_db = new Db($db_host, $db_user, $db_password, $db_name);

function is_remote($file_name) {
  return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}

echo "<table width=\"100%\" border=\"0\" cellspacing=\"10\" cellpadding=\"1\"><tr>\n";

# -----------------------------------------------------------------------------------------------------------------------------------

$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_comments, a.image_downloads, a.image_votes, a.image_rating, a.image_hits, a.user_id, u.user_name, u.user_id
        FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b, ".USERS_TABLE." u
        WHERE a.image_active=1 AND a.cat_id = b.cat_id AND u.user_id = a.user_id
        ORDER BY a.image_rating DESC
        LIMIT 1";

$row = $pics_db->query_firstrow($sql);
$image_id = $row['image_id'];
$user_name = $row['user_name'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

echo "<td align=\"center\"><img src=\"".$thumb_src."\" border=\"0\" vspace=\"2\" alt=\"$image_name\"><br>\n";
echo "<b>$image_name</b><br>\n";
echo "uploaded by <b>$user_name</b><br>\n";
echo "Top Rates</td>\n";

# -----------------------------------------------------------------------------------------------------------------------------------

$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_comments, a.image_downloads, a.image_votes, a.image_rating, a.image_hits, a.user_id, u.user_name, u.user_id
        FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b, ".USERS_TABLE." u
        WHERE a.image_active=1 AND a.cat_id = b.cat_id AND u.user_id = a.user_id
        ORDER BY a.image_votes DESC
        LIMIT 1";

$row = $pics_db->query_firstrow($sql);
$image_id = $row['image_id'];
$user_name = $row['user_name'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

echo "<td align=\"center\"><img src=\"".$thumb_src."\" border=\"0\" vspace=\"2\" alt=\"$image_name\"><br>\n";
echo "<b>$image_name</b><br>\n";
echo "uploaded by <b>$user_name</b><br>\n";
echo "Top Votes</td>\n";

# -----------------------------------------------------------------------------------------------------------------------------------

$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_comments, a.image_downloads, a.image_votes, a.image_rating, a.image_hits, a.user_id, u.user_name, u.user_id
        FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b, ".USERS_TABLE." u
        WHERE a.image_active=1 AND a.cat_id = b.cat_id AND u.user_id = a.user_id
        ORDER BY a.image_comments DESC
        LIMIT 1";

$row = $pics_db->query_firstrow($sql);
$image_id = $row['image_id'];
$user_name = $row['user_name'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

echo "<td align=\"center\"><img src=\"".$thumb_src."\" border=\"0\" vspace=\"2\" alt=\"$image_name\"><br>\n";
echo "<b>$image_name</b><br>\n";
echo "uploaded by <b>$user_name</b><br>\n";
echo "Top Kommentare</td>\n";

# -----------------------------------------------------------------------------------------------------------------------------------

$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_comments, a.image_downloads, a.image_votes, a.image_rating, a.image_hits, a.user_id, u.user_name, u.user_id
        FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b, ".USERS_TABLE." u
        WHERE a.image_active=1 AND a.cat_id = b.cat_id AND u.user_id = a.user_id
        ORDER BY a.image_downloads DESC
        LIMIT 1";

$row = $pics_db->query_firstrow($sql);
$image_id = $row['image_id'];
$user_name = $row['user_name'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

echo "<td align=\"center\"><img src=\"".$thumb_src."\" border=\"0\" vspace=\"2\" alt=\"$image_name\"><br>\n";
echo "<b>$image_name</b><br>\n";
echo "uploaded by <b>$user_name</b><br>\n";
echo "Top Downloads</td>\n";

# -----------------------------------------------------------------------------------------------------------------------------------

$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_comments, a.image_downloads, a.image_votes, a.image_rating, a.image_hits, a.user_id, u.user_name, u.user_id
        FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b, ".USERS_TABLE." u
        WHERE a.image_active=1 AND a.cat_id = b.cat_id AND u.user_id = a.user_id
        ORDER BY a.image_hits DESC
        LIMIT 1";

$row = $pics_db->query_firstrow($sql);
$image_id = $row['image_id'];
$user_name = $row['user_name'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

echo "<td align=\"center\"><img src=\"".$thumb_src."\" border=\"0\" vspace=\"2\" alt=\"$image_name\"><br>\n";
echo "<b>$image_name</b><br>\n";
echo "uploaded by <b>$user_name</b><br>\n";
echo "Top Hits</td>\n";

# -----------------------------------------------------------------------------------------------------------------------------------

echo "</tr></table>\n";

?>

2
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: May 25, 2003, 06:58:20 PM »
:o  GREAT
some colors possible and fontstyles and then it will be perfect!!!

@ v@no or sll

I have a funny mystic in my memberlist:

all you users ca see it correct - I not - why? I delete the cache.... I always see 0 members at 0 pages - Funny isn´it?

3
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: May 25, 2003, 05:30:11 PM »
many many thx - the smallest problem are the greatest  :lol:

btw. is it possible to add "the uploader" under the pics?

4
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: May 25, 2003, 02:40:31 PM »
FANTASTIC!!!!

One last question:

how to center this table and columns

5
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: May 25, 2003, 02:22:30 PM »
ok i just fixed it - now a pic is shown! GREAT

i need no link for the pic (details)
now how I must do it for 4 pics in column?

6
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: May 25, 2003, 02:06:17 PM »
The whole???
I deleted it but still no pic!
I am a total newbie in php, how must realize this?

Is it possible in a table with 4 columns?

Very many thx

that is what the .php gives out, maybe there is the mistake?
<a href="http://www.coverengine.de/4images/details.php?image_id="><img src="http://www.coverengine.de/4images/data/thumbnails//" border="0" alt=""></a>
<b><div class="ltgreytext"></b></div>
Selected by rates

7
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: May 25, 2003, 01:33:51 PM »
which line I have to delete?

THX for the quick answer!!!

btw. is it possible to view 4 pictures? mot voted, most download, most view, most rate in 1 row?

8
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: May 25, 2003, 11:25:21 AM »
now I have installed the potd mod, but there is no pic on screen
may be you have a look into?
http://www.coverengine.de/pod.php

I change this in the .php-file:
Quote
<?php
define('ROOT_PATH', './4images/');
define('SCRIPT_URL', 'http://www.coverengine.de/4images/');

include_once(ROOT_PATH.'config.php');
include_once(ROOT_PATH.'includes/db_mysql.php');
include_once(ROOT_PATH.'includes/constants.php');

define('PIC_CATEGORIES_TABLE', '4images_categories');
define('PIC_IMAGES_TABLE', '4images_images');

$pics_db = new Db($db_host, $db_user, $db_password, $db_name);

function is_remote($file_name) {
  return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}

switch (POTD_SELECT_MODE) {
    case "by_rating"    : $select_mode = "a.image_rating"; break;
    case "by_votes"        : $select_mode = "a.image_votes"; break;
    case "by_comments"    : $select_mode = "a.image_comments"; break;
    case "by_downloads"    : $select_mode = "a.image_downloads"; break;
    case "by_hits"        : $select_mode = "a.image_hits"; break;
}

$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_comments, a.image_downloads, a.image_votes, a.image_rating, a.image_hits
        FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b
        WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=".AUTH_ALL." AND b.auth_viewimage=".AUTH_ALL."
        ORDER BY $select_mode DESC
        LIMIT 1";

$row = $pics_db->query_firstrow($sql);
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

echo "<a href=\"".SCRIPT_URL."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a>\n";

echo "<b><div class=\"ltgreytext\">$image_name</b></div>\n";
echo "Selected by rates\n";

?>

9
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: May 25, 2003, 10:19:13 AM »
thx for quick response!
I have two pages - one forum that is a php-forum (other domain) and 4images - is this then possible?

What script have I to install first?

10
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: May 25, 2003, 10:01:55 AM »
is it possible to insert this php i a html site on a other server?

btw. I got this error:
DB Error: Bad SQL Query: SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_comments, a.image_downloads, a.image_votes, a.image_rating, a.image_hits FROM 4images_images a, 4images_categories b WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=0 AND b.auth_viewimage=0 ORDER BY DESC LIMIT 1
You have an error in your SQL syntax near 'DESC LIMIT 1' at line 4

11
Discussion & Troubleshooting / GMX and AOL
« on: May 23, 2003, 04:18:39 PM »
mail

12
Installation, Update & Configuration / Wer kann französisch?
« on: May 23, 2003, 11:35:17 AM »
Vielen Dank auch, aber mitlerweile habe ich mich durch das Übersetzungsprogramm von Google gekämpft und habs selber hinbekommen - hoffe ich zumindest.

13
Discussion & Troubleshooting / GMX and AOL
« on: May 23, 2003, 11:28:26 AM »
Hallo and hello,

Ich habe da ein kleines Problem:
I have a little problem:

Die Registrierungsmail wird nicht and Mitglieder von GMX und AOL versendet - warum?

The registration mail is not send to members of GMX and AOL-Users - why?

14
Great Sir, many THX!!!!

15
das sind für mich "Bömische Dörfer"
geht das nicht ohne irgendwelche programme?

Pages: [1] 2