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 - fermachado

Pages: 1 2 3 4 5 [6]
76
Mods & Plugins (Releases & Support) / Re: [Mod] Photo Of The Day
« on: March 19, 2009, 06:44:33 PM »
I want the Balu code just for test to see what is different.

I think the Balu code wok with the real 24 hours. :?

77
Mods & Plugins (Releases & Support) / Re: [Mod] Photo Of The Day
« on: March 19, 2009, 03:13:55 PM »
What error?

just in case check out this post and the next reply:
http://www.4homepages.de/forum/index.php?topic=3529.msg110432#msg110432


Hi,

Thanks,

I have the photo of the day from the original code from SLL in my site and works.

But, the code of Balu is different no?

78
Mods & Plugins (Releases & Support) / Re: [Mod] Photo Of The Day
« on: March 19, 2009, 02:03:03 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";

?>

I use this code to test and I have a error in line 12

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

Need put information about the database?

Thso works with the 1.7.6

Tanks and sorry my english


79
Thanks,

Works very nice.  :D

80
Mods & Plugins (Requests & Discussions) / Condition to upload
« on: March 19, 2009, 09:29:46 AM »
Hi,

It's possible a Mod to create a condition to the uploads.

For example,the user upload one photo to make another upload need make 3 comments first. :D

Thanks,

Sorry the poor english

81
Thanks,

my mistake. :oops:

I need make this again to fallow the steps with more attention.

Now I have this error.

DB Error: Bad SQL Query: SELECT cn.field_id, cn.comment_notify_status FROM 4images_comments_notify cn LEFT JOIN 4images_users u ON (u.user_id = cn.user_id) WHERE cn.image_id = 29 AND cn.user_id = 1 AND u.user_level >= '2'
Table '1503anude.4images_comments_notify' doesn't exist

The code in the first page is only what we need or we need more code from de other pages!?


Sorry the poor english

 :D

82
I have this error Parse error: parse error in C:\wamp\www\artnudephotografy.com1503\details.php on line 60

Is this line
Code: [Select]
<b class="title">{if comments_notify_go_back}{comments_notify_go_back}{endif comments_notify_go_back}<br /><br />{image_name}</b>{if image_is_new} <sup class="new">{lang_new}</sup>{endif
 :(

83
Discussion & Troubleshooting / Re: Admin Control panel
« on: March 03, 2009, 04:02:26 PM »
Find the problem in Admin Portuguese language. :)

In the end have two ?>  

84
Discussion & Troubleshooting / Re: Admin Control panel
« on: March 03, 2009, 03:14:32 PM »
Thanks,
Yap is the better way. :)

85
Discussion & Troubleshooting / Admin Control panel
« on: March 03, 2009, 02:58:11 PM »
Hi,

I have a problem.Make same changes and now if clik to the Admin control panel appear a blank page only with this ?> 

Sorry the english.

Thanks
Fernando

Pages: 1 2 3 4 5 [6]