Author Topic: PLEASEE - ThumbNail's on user images that are on top 10 of votes, hits etc  (Read 4114 times)

0 Members and 1 Guest are viewing this topic.

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Hello Vano

Thank u for ur previous replies, U gave me a link that apparently made thumbnails of the images that were on top 10 of votes, hits, rating etc. However from reading it, the guy said he had no idea about programming and was just messing up and that is a big risk. So far i have implemented all of ur MODS, well half of it, because I trust ur work and i know if something goes wrong, u r clever enough to know what is wrong..

Please can i request for u to  help me and show us how to make thumbnails of the users that have risen up in popularity via hits, votes, comments. This way it wil make my users stay and become more interested.

I will of course pay u - Just PM me ur paypal email, this will go to any other person of Vano's status who can help me and this community and have thumbnails of images howing on the top 10

God bless u sir, pleaseeeee

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
4images doesn't have any users thumbnails, are you referring to avatars or something similar? if so, I'd need more details to what mod you are referring to.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Hello sir,

For example like this .... click this website below

http://faces.dalnet.ru/top.php

This site has thumbnails of images that are in there top 10

The owner of this 4images website has an amazing modification and this will seriously keep my members staying with me for longer. Like i said sir, i will pay u as i dont want u to think i want u to do this MOD for free but i promise u the community will love this mod.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
that are thumbnails of images, not users...and the mod I showed you before is what you need.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Below is the code in the top.php that the guy has told us to alter, I mean there arents no instructions on how to do it, just copy paste that it, i have done that sir and i see no changes. :-( is there no way that u can make a MOD like the one i have requested sir please this is a great MOD but it doesnt work please sir im begging u

__________________________________

// Rating
$sql "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_rating, i.image_votes, c.cat_name, u.user_name
        FROM "
.IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u
        WHERE i.image_active = 1 AND i.cat_id NOT IN (
$cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql
        ORDER BY i.image_rating DESC, i.image_votes DESC
        LIMIT 20"
;
$result $site_db->query($sql);
$top_list = array();
$i 1;
while (
$row $site_db->fetch_array($result)) {
  
$top_list[$i] = $row;
  
$i++;
}
$site_db->free_result();

for (
$i 1$i <= 20$i++) {
  if (isset(
$top_list[$i])) {
    
$register_array['image_rating_'.$i] = (check_permission("auth_viewimage"$top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" htmlspecialchars($top_list[$i]['image_name']);
    
$register_array['image_rating_openwindow_'.$i] = (check_permission("auth_viewimage"$top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" htmlspecialchars($top_list[$i]['image_name']);
    
$register_array['image_rating_user_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'])."\">".htmlspecialchars($top_list[$i]['user_name'])."</a>";
    
$register_array['image_rating_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
    
$register_array['image_rating_number_'.$i] = "<b>".$top_list[$i]['image_rating']."</b> (".$top_list[$i]['image_votes']." ".$lang['votes'].")";
    
$register_array['image_rating_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />";
  }
  else {
    
$register_array['image_rating_'.$i] = "--";
    
$register_array['image_rating_user_'.$i] = "--";
    
$register_array['image_rating_cat_'.$i] = "--";
    
$register_array['image_rating_number_'.$i] = "--";
    
$register_array['image_rating_thumb_'.$i] = "--";
  }
}

// Votes
$sql "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_rating, i.image_votes, c.cat_name, u.user_name 
        FROM "
.IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u 
        WHERE i.image_active = 1 AND i.cat_id NOT IN (
$cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql 
        ORDER BY i.image_votes DESC, i.image_name ASC 
        LIMIT 20"
;
$result $site_db->query($sql);
$top_list = array();
$i 1;
while (
$row $site_db->fetch_array($result)) {
  
$top_list[$i] = $row;
  
$i++;
}
$site_db->free_result();

for (
$i 1$i <= 20$i++) {
  if (isset(
$top_list[$i])) {
    
$register_array['image_votes_'.$i] = (check_permission("auth_viewimage"$top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" htmlspecialchars($top_list[$i]['image_name']);
    
$register_array['image_votes_openwindow_'.$i] = (check_permission("auth_viewimage"$top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" htmlspecialchars($top_list[$i]['image_name']);
    
$register_array['image_votes_user_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'])."\">".htmlspecialchars($top_list[$i]['user_name'])."</a>";
    
$register_array['image_votes_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
    
$register_array['image_votes_number_'.$i] = "<b>".$top_list[$i]['image_rating']."</b> (".$top_list[$i]['image_votes']." ".$lang['votes'].")";
    
$register_array['image_votes_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />";
  }
  else {
    
$register_array['image_votes_'.$i] = "--";
    
$register_array['image_votes_user_'.$i] = "--";
    
$register_array['image_votes_cat_'.$i] = "--";
    
$register_array['image_votes_number_'.$i] = "--";
    
$register_array['image_votes_thumb_'.$i] = "--";
  }
}

// Hits
$sql "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_hits, c.cat_name, u.user_name 
        FROM "
.IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u 
        WHERE i.image_active = 1 AND i.cat_id NOT IN (
$cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql 
        ORDER BY i.image_hits DESC, i.image_name ASC 
        LIMIT 20"
;
$result $site_db->query($sql);
$top_list = array();
$i 1;
while (
$row $site_db->fetch_array($result)) {
  
$top_list[$i] = $row;
  
$i++;
}
$site_db->free_result();

for (
$i 1$i <= 20$i++) {
  if (isset(
$top_list[$i])) {
    
$register_array['image_hits_'.$i] = (check_permission("auth_viewimage"$top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" htmlspecialchars($top_list[$i]['image_name']);
    
$register_array['image_hits_openwindow_'.$i] = (check_permission("auth_viewimage"$top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" htmlspecialchars($top_list[$i]['image_name']);
    
$register_array['image_hits_user_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'])."\">".htmlspecialchars($top_list[$i]['user_name'])."</a>";
    
$register_array['image_hits_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
    
$register_array['image_hits_number_'.$i] = "<b>".$top_list[$i]['image_hits']."</b>";
    
$register_array['image_hits_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />";
  }
  else {
    
$register_array['image_hits_'.$i] = "--";
    
$register_array['image_hits_user_'.$i] = "--";
    
$register_array['image_hits_cat_'.$i] = "--";
    
$register_array['image_hits_number_'.$i] = "--";
    
$register_array['image_hits_thumb_'.$i] = "--";
  }
}

// Downloads
$sql "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_downloads, c.cat_name, u.user_name 
        FROM "
.IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u 
        WHERE i.image_active = 1 AND i.cat_id NOT IN (
$cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql 
        ORDER BY i.image_downloads DESC, i.image_name ASC 
        LIMIT 20"
;
$result $site_db->query($sql);
$top_list = array();
$i 1;
while (
$row $site_db->fetch_array($result)) {
  
$top_list[$i] = $row;
  
$i++;
}
$site_db->free_result();

for (
$i 1$i <= 20$i++) {
  if (isset(
$top_list[$i])) {
    
$register_array['image_downloads_'.$i] = (check_permission("auth_viewimage"$top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" htmlspecialchars($top_list[$i]['image_name']);
    
$register_array['image_downloads_openwindow_'.$i] = (check_permission("auth_viewimage"$top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" htmlspecialchars($top_list[$i]['image_name']);
    
$register_array['image_downloads_user_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'])."\">".htmlspecialchars($top_list[$i]['user_name'])."</a>";
    
$register_array['image_downloads_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
    
$register_array['image_downloads_number_'.$i] = "<b>".$top_list[$i]['image_downloads']."</b>";
    
$register_array['image_downloads_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />";
  }
  else {
    
$register_array['image_downloads_'.$i] = "--";
    
$register_array['image_downloads_user_'.$i] = "--";
    
$register_array['image_downloads_cat_'.$i] = "--";
    
$register_array['image_downloads_number_'.$i] = "--";
    
$register_array['image_downloads_thumb_'.$i] = "--";
  }
}

// Comments
$sql "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_comments, i.image_rating, i.image_thumb_file, i.image_votes, c.cat_name, u.user_name
        FROM "
.IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u
        WHERE i.image_active = 1 AND i.cat_id NOT IN (
$cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql
        ORDER BY i.image_comments DESC, i.image_votes DESC
        LIMIT 20"
;
$result $site_db->query($sql);
$top_list = array();
$i 1;
while (
$row $site_db->fetch_array($result)) {
  
$top_list[$i] = $row;
  
$i++;
}
$site_db->free_result();

for (
$i 1$i <= 20$i++) {
  if (isset(
$top_list[$i])) {
    
$register_array['image_comments_'.$i] = (check_permission("auth_viewimage"$top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" htmlspecialchars($top_list[$i]['image_name']);
    
$register_array['image_comments_openwindow_'.$i] = (check_permission("auth_viewimage"$top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" htmlspecialchars($top_list[$i]['image_name']);
    
$register_array['image_comments_user_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'])."\">".htmlspecialchars($top_list[$i]['user_name'])."</a>";
    
$register_array['image_comments_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
    
$register_array['image_comments_number_'.$i] = "<b>".$top_list[$i]['image_comments']."</b>";
    
$register_array['image_comments_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />";


  }
  else {
    
$register_array['image_comments_'.$i] = "--";
    
$register_array['image_comments_user_'.$i] = "--";
    
$register_array['image_comments_cat_'.$i] = "--";
    
$register_array['image_comments_number_'.$i] = "--";
    
$register_array['image_comments_thumb_'.$i] = "--";
  }
}
« Last Edit: August 02, 2010, 06:23:18 PM by Rembrandt »