• [Mod] Toplist altered 5 0 5 1
Currently:  

Author Topic: [Mod] Toplist altered  (Read 234662 times)

0 Members and 1 Guest are viewing this topic.

Offline te-ga

  • Pre-Newbie
  • Posts: 3
    • View Profile
    • http://te-ga.com
MOD Tutorial
« Reply #45 on: January 19, 2003, 06:42:00 PM »
Hello guys!!!

I took me about 30 minutes to find out how to intstall this MOD, I tried reading all 3 pages, finally gave up and made a new way of changing files based on the code of Vraxor.

The main file to be changed is top.php. There are 4 sections there named

Code: [Select]
// Rating
// Votes
// Hits
// Downloads


They are all the same, just have different setting for showing photos - Rating sorts images by rating and so on.

So all we need to do is:

1. In each section find:

Code: [Select]
$sql = "SELECT i.image_id, i.user_id, i.cat_id,

at the end of the line ADD:

Code: [Select]
, i.image_thumb_file

Note that you should do this for all 4 sections of the top.php file.

2. After in the //Rating part of the file you should find

Code: [Select]
$register_array['image_rating_number_'.$i]

and add add the new line below this line:

Code: [Select]
$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=\"\" />";

then find

Code: [Select]
$register_array['image_rating_number_'.$i] = "--";

and add below this line:

Code: [Select]
$register_array['image_rating_thumb_'.$i] = "--";

You are now finished with the //Rating part of the top.php file.

Now you have 3 more parts to finish:

Code: [Select]

// Votes
// Hits
// Downloads


Do the same as stated in 2. but don't forget to change way sorting is done. Just the //Rating part we were adding ['image_rating_thumg_'.$i], so in //Votes part we should add ['image_votes_part_'.$i] and so on. Don't forget to change it all the rest 3 parts!

3. In the top.html file you should add 1 column in the tables and paste this code to the corresponding parts:

Code: [Select]
{image_hits_thumb_1}
{image_downloads_thumb_1}
{image_rating_thumb_1}
{image_votes_thumb_1}


For each new row don't forget to change _1 to _2 and so on...

You can also play with the size of the thumbnails. Just find the width= in your code and put the setting you need.



Hope this helps!!!!


With deep respect to the 4homepages.de Gallery Author and site users,

Te-Ga.

------------------

Just in case you still can't figure out how to change the top.php file I am including the 1.7 version top.php file.


Code: [Select]

<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File&#58; top.php                                              *
 *        Copyright&#58; &#40;C&#41; 2002 Jan Sorgalla                                *
 *            Email&#58; jan@4homepages.de                                    *
 *              Web&#58; http&#58;//www.4homepages.de                             *
 *    Scriptversion&#58; 1.7                                                  *
 *                                                                        *
 *    Never released without support from&#58; Nicky &#40;http&#58;//www.nicky.net&#41;   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen &#40;Lizenz.txt&#41; für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    &#40;Licence.txt&#41; for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template 'top';

define&#40;'GET_CACHES', 1&#41;;
define&#40;'ROOT_PATH', './'&#41;;
include&#40;ROOT_PATH.'global.php'&#41;;
require&#40;ROOT_PATH.'includes/sessions.php'&#41;;
$user_access get_permission&#40;&#41;;
include&#40;ROOT_PATH.'includes/page_header.php'&#41;;

$cat_match_sql = &#40;$cat_id && check_permission&#40;"auth_viewcat", $cat_id&#41;&#41; ? "AND i.cat_id = '$cat_id' " &#58; "";
$register_array = array&#40;&#41;;

$cat_id_sql get_auth_cat_sql&#40;"auth_viewcat", "NOTIN"&#41;;

// Rating
$sql "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name".get_user_table_field&#40;", u.", "user_name"&#41;.", i.image_thumb_file
        
FROM ".IMAGES_TABLE." i".CATEGORIES_TABLE." 
        LEFT JOIN 
".USERS_TABLE." u ON &#40;".get_user_table_field&#40;"u.", "user_id"&#41;." = i.user_id&#41; 
        
WHERE i.image_active AND i.cat_id NOT IN &#40;$cat_id_sql&#41; AND i.cat_id = c.cat_id 
        
$cat_match_sql 
        ORDER BY i
.image_rating DESCi.image_name ASC
        LIMIT 10
";
$result = $site_db->query&#40;$sql&#41;;
$top_list = array&#40;&#41;;
$i = 1;
while &#40;
$row = $site_db->fetch_array&#40;$result&#41;&#41; &#123;
  
$top_list[$i&#93; = $row;
  
$i++;
&#125;
$site_db->free_result&#40;&#41;;

for &#40;
$i = 1; $i <= 10; $i++&#41; &#123;
  if &#40;isset&#40;
$top_list[$i&#93;&#41;&#41; &#123;
    
$register_array['image_rating_'.$i&#93; = &#40;check_permission&#40;"auth_viewimage", $top_list[$i&#93;['cat_id'&#93;&#41;&#41; ? "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;."</a>" &#58; htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;;
    
$register_array['image_rating_openwindow_'.$i&#93; = &#40;check_permission&#40;"auth_viewimage", $top_list[$i&#93;['cat_id'&#93;&#41;&#41; ? "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\" onclick=\"opendetailwindow&#40;&#41;\" target=\"detailwindow\">".htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;."</a>" &#58; htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;;
    
if &#40;isset&#40;$top_list[$i&#93;[$user_table_fields['user_name'&#93;&#93;&#41; && $top_list[$i&#93;['user_id'&#93; != GUEST&#41; &#123;
      
$user_profile_link = &#40;!empty&#40;$url_show_profile&#41;&#41; ? preg_replace&#40;"/&#123;user_id&#125;/", $top_list[$i&#93;['user_id'&#93;, $url_show_profile&#41; &#58; ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i&#93;['user_id'&#93;;
      
$register_array['image_rating_user_'.$i&#93; = "<a href=\"".$site_sess->url&#40;$user_profile_link&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;[$user_table_fields['user_name'&#93;&#93;&#41;."</a>";
    
&#125;
    
else &#123;
      
$register_array['image_rating_user_'.$i&#93; = $lang['userlevel_guest'&#93;;
    
&#125;
    
$register_array['image_rating_cat_'.$i&#93; = "<a href=\"".$site_sess->url&#40;ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i&#93;['cat_id'&#93;&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;['cat_name'&#93;&#41;."</a>";
    
$register_array['image_rating_number_'.$i&#93; = "<b>".$top_list[$i&#93;['image_rating'&#93;."</b> &#40;".$top_list[$i&#93;['image_votes'&#93;." ".$lang['votes'&#93;."&#41;";
    
$register_array['image_rating_thumb_'.$i&#93; = "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\"><img src=\"data/thumbnails/".$top_list[$i&#93;['cat_id'&#93;."/".$top_list[$i&#93;['image_thumb_file'&#93;."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />"; 
  
&#125;
  
else &#123;
    
$register_array['image_rating_'.$i&#93; = "--";
    
$register_array['image_rating_user_'.$i&#93; = "--";
    
$register_array['image_rating_cat_'.$i&#93; = "--";
    
$register_array['image_rating_number_'.$i&#93; = "--";
    
$register_array['image_rating_thumb_'.$i&#93; = "--";
  
&#125;
&#125;

// Votes
$sql "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name".get_user_table_field&#40;", u.", "user_name"&#41;.", i.image_thumb_file
        
FROM ".IMAGES_TABLE." i".CATEGORIES_TABLE." 
        LEFT JOIN 
".USERS_TABLE." u ON &#40;".get_user_table_field&#40;"u.", "user_id"&#41;." = i.user_id&#41; 
        
WHERE i.image_active AND i.cat_id NOT IN &#40;$cat_id_sql&#41; AND i.cat_id = c.cat_id 
        
$cat_match_sql 
        ORDER BY i
.image_votes DESCi.image_name ASC 
        LIMIT 10
";
$result = $site_db->query&#40;$sql&#41;;
$top_list = array&#40;&#41;;
$i = 1;
while &#40;
$row = $site_db->fetch_array&#40;$result&#41;&#41; &#123;
  
$top_list[$i&#93; = $row;
  
$i++;
&#125;
$site_db->free_result&#40;&#41;;

for &#40;
$i = 1; $i <= 10; $i++&#41; &#123;
  if &#40;isset&#40;
$top_list[$i&#93;&#41;&#41; &#123;
    
$register_array['image_votes_'.$i&#93; = &#40;check_permission&#40;"auth_viewimage", $top_list[$i&#93;['cat_id'&#93;&#41;&#41; ? "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;."</a>" &#58; htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;;
    
$register_array['image_votes_openwindow_'.$i&#93; = &#40;check_permission&#40;"auth_viewimage", $top_list[$i&#93;['cat_id'&#93;&#41;&#41; ? "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\" onclick=\"opendetailwindow&#40;&#41;\" target=\"detailwindow\">".htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;."</a>" &#58; htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;;
    
if &#40;isset&#40;$top_list[$i&#93;[$user_table_fields['user_name'&#93;&#93;&#41; && $top_list[$i&#93;['user_id'&#93; != GUEST&#41; &#123;
      
$user_profile_link = &#40;!empty&#40;$url_show_profile&#41;&#41; ? preg_replace&#40;"/&#123;user_id&#125;/", $top_list[$i&#93;['user_id'&#93;, $url_show_profile&#41; &#58; ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i&#93;['user_id'&#93;;
      
$register_array['image_votes_user_'.$i&#93; = "<a href=\"".$site_sess->url&#40;$user_profile_link&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;[$user_table_fields['user_name'&#93;&#93;&#41;."</a>";
    
&#125;
    
else &#123;
      
$register_array['image_votes_user_'.$i&#93; = $lang['userlevel_guest'&#93;;
    
&#125;
    
$register_array['image_votes_cat_'.$i&#93; = "<a href=\"".$site_sess->url&#40;ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i&#93;['cat_id'&#93;&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;['cat_name'&#93;&#41;."</a>";
    
$register_array['image_votes_number_'.$i&#93; = "<b>".$top_list[$i&#93;['image_rating'&#93;."</b> &#40;".$top_list[$i&#93;['image_votes'&#93;." ".$lang['votes'&#93;."&#41;";
    
$register_array['image_votes_thumb_'.$i&#93; = "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\"><img src=\"data/thumbnails/".$top_list[$i&#93;['cat_id'&#93;."/".$top_list[$i&#93;['image_thumb_file'&#93;."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />"; 
  
&#125;
  
else &#123;
    
$register_array['image_votes_'.$i&#93; = "--";
    
$register_array['image_votes_user_'.$i&#93; = "--";
    
$register_array['image_votes_cat_'.$i&#93; = "--";
    
$register_array['image_votes_number_'.$i&#93; = "--";
    
$register_array['image_votes_thumb_'.$i&#93; = "--";
  
&#125;
&#125;

// Hits
$sql "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_hits, c.cat_name".get_user_table_field&#40;", u.", "user_name"&#41;.", i.image_thumb_file
        
FROM ".IMAGES_TABLE." i".CATEGORIES_TABLE." 
        LEFT JOIN 
".USERS_TABLE." u ON &#40;".get_user_table_field&#40;"u.", "user_id"&#41;." = i.user_id&#41; 
        
WHERE i.image_active AND i.cat_id NOT IN &#40;$cat_id_sql&#41; AND i.cat_id = c.cat_id 
        
$cat_match_sql 
        ORDER BY i
.image_hits DESCi.image_name ASC 
        LIMIT 10
";
$result = $site_db->query&#40;$sql&#41;;
$top_list = array&#40;&#41;;
$i = 1;
while &#40;
$row = $site_db->fetch_array&#40;$result&#41;&#41; &#123;
  
$top_list[$i&#93; = $row;
  
$i++;
&#125;
$site_db->free_result&#40;&#41;;

for &#40;
$i = 1; $i <= 10; $i++&#41; &#123;
  if &#40;isset&#40;
$top_list[$i&#93;&#41;&#41; &#123;
    
$register_array['image_hits_'.$i&#93; = &#40;check_permission&#40;"auth_viewimage", $top_list[$i&#93;['cat_id'&#93;&#41;&#41; ? "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;."</a>" &#58; htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;;
    
$register_array['image_hits_openwindow_'.$i&#93; = &#40;check_permission&#40;"auth_viewimage", $top_list[$i&#93;['cat_id'&#93;&#41;&#41; ? "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\" onclick=\"opendetailwindow&#40;&#41;\" target=\"detailwindow\">".htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;."</a>" &#58; htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;;
    
if &#40;isset&#40;$top_list[$i&#93;[$user_table_fields['user_name'&#93;&#93;&#41; && $top_list[$i&#93;['user_id'&#93; != GUEST&#41; &#123;
      
$user_profile_link = &#40;!empty&#40;$url_show_profile&#41;&#41; ? preg_replace&#40;"/&#123;user_id&#125;/", $top_list[$i&#93;['user_id'&#93;, $url_show_profile&#41; &#58; ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i&#93;['user_id'&#93;;
      
$register_array['image_hits_user_'.$i&#93; = "<a href=\"".$site_sess->url&#40;$user_profile_link&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;[$user_table_fields['user_name'&#93;&#93;&#41;."</a>";
    
&#125;
    
else &#123;
      
$register_array['image_hits_user_'.$i&#93; = $lang['userlevel_guest'&#93;;
    
&#125;
    
$register_array['image_hits_cat_'.$i&#93; = "<a href=\"".$site_sess->url&#40;ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i&#93;['cat_id'&#93;&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;['cat_name'&#93;&#41;."</a>";
    
$register_array['image_hits_number_'.$i&#93; = "<b>".$top_list[$i&#93;['image_hits'&#93;."</b>";
    
$register_array['image_hits_thumb_'.$i&#93; = "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\"><img src=\"data/thumbnails/".$top_list[$i&#93;['cat_id'&#93;."/".$top_list[$i&#93;['image_thumb_file'&#93;."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />"; 
  
&#125;
  
else &#123;
    
$register_array['image_hits_'.$i&#93; = "--";
    
$register_array['image_hits_user_'.$i&#93; = "--";
    
$register_array['image_hits_cat_'.$i&#93; = "--";
    
$register_array['image_hits_number_'.$i&#93; = "--";
    
$register_array['image_hits_thumb_'.$i&#93; = "--";
  
&#125;
&#125;

// Downloads
$sql "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_downloads, c.cat_name".get_user_table_field&#40;", u.", "user_name"&#41;.", i.image_thumb_file
        
FROM ".IMAGES_TABLE." i".CATEGORIES_TABLE." 
        LEFT JOIN 
".USERS_TABLE." u ON &#40;".get_user_table_field&#40;"u.", "user_id"&#41;." = i.user_id&#41; 
        
WHERE i.image_active AND i.cat_id NOT IN &#40;$cat_id_sql&#41; AND i.cat_id = c.cat_id 
        
$cat_match_sql 
        ORDER BY i
.image_downloads DESCi.image_name ASC 
        LIMIT 10
";
$result = $site_db->query&#40;$sql&#41;;
$top_list = array&#40;&#41;;
$i = 1;
while &#40;
$row = $site_db->fetch_array&#40;$result&#41;&#41; &#123;
  
$top_list[$i&#93; = $row;
  
$i++;
&#125;
$site_db->free_result&#40;&#41;;

for &#40;
$i = 1; $i <= 10; $i++&#41; &#123;
  if &#40;isset&#40;
$top_list[$i&#93;&#41;&#41; &#123;
    
$register_array['image_downloads_'.$i&#93; = &#40;check_permission&#40;"auth_viewimage", $top_list[$i&#93;['cat_id'&#93;&#41;&#41; ? "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;."</a>" &#58; htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;;
    
$register_array['image_downloads_openwindow_'.$i&#93; = &#40;check_permission&#40;"auth_viewimage", $top_list[$i&#93;['cat_id'&#93;&#41;&#41; ? "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\" onclick=\"opendetailwindow&#40;&#41;\" target=\"detailwindow\">".htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;."</a>" &#58; htmlspecialchars&#40;$top_list[$i&#93;['image_name'&#93;&#41;;
    
if &#40;isset&#40;$top_list[$i&#93;[$user_table_fields['user_name'&#93;&#93;&#41; && $top_list[$i&#93;['user_id'&#93; != GUEST&#41; &#123;
      
$user_profile_link = &#40;!empty&#40;$url_show_profile&#41;&#41; ? preg_replace&#40;"/&#123;user_id&#125;/", $top_list[$i&#93;['user_id'&#93;, $url_show_profile&#41; &#58; ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i&#93;['user_id'&#93;;
      
$register_array['image_downloads_user_'.$i&#93; = "<a href=\"".$site_sess->url&#40;$user_profile_link&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;[$user_table_fields['user_name'&#93;&#93;&#41;."</a>";
    
&#125;
    
else &#123;
      
$register_array['image_downloads_user_'.$i&#93; = $lang['userlevel_guest'&#93;;
    
&#125;
    
$register_array['image_downloads_cat_'.$i&#93; = "<a href=\"".$site_sess->url&#40;ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i&#93;['cat_id'&#93;&#41;."\">".htmlspecialchars&#40;$top_list[$i&#93;['cat_name'&#93;&#41;."</a>";
    
$register_array['image_downloads_number_'.$i&#93; = "<b>".$top_list[$i&#93;['image_downloads'&#93;."</b>";
    
$register_array['image_downloads_thumb_'.$i&#93; = "<a href=\"".$site_sess->url&#40;ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i&#93;['image_id'&#93;&#41;."\"><img src=\"data/thumbnails/".$top_list[$i&#93;['cat_id'&#93;."/".$top_list[$i&#93;['image_thumb_file'&#93;."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />"; 
  
&#125;
  
else &#123;
    
$register_array['image_downloads_'.$i&#93; = "--";
    
$register_array['image_downloads_user_'.$i&#93; = "--";
    
$register_array['image_downloads_cat_'.$i&#93; = "--";
    
$register_array['image_downloads_number_'.$i&#93; = "--";
    
$register_array['image_downloads_thumb_'.$i&#93; = "--";
    
  
&#125;
&#125;

$site_template->register_vars&#40;$register_array&#41;;

//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream "<span><a href=\"".$site_sess->url&#40;ROOT_PATH."index.php"&#41;."\">".$lang['home'&#93;."</a>".$config['category_separator'&#93;;
if &#40;$cat_id && isset&#40;$cat_cache[$cat_id&#93;&#41;&#41; &#123;
  
$clickstream .= get_category_path&#40;$cat_id, 1&#41;.$config['category_separator'&#93;;
&#125;
$clickstream .= $lang['top_images'&#93;."</span>";

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars&#40;array&#40;
  
"msg" => $msg,
  
"clickstream" => $clickstream,
  
"lang_top_image_hits" => $lang['top_image_hits'&#93;,
  
"lang_top_image_downloads" => $lang['top_image_downloads'&#93;,
  
"lang_top_image_rating" => $lang['top_image_rating'&#93;,
  
"lang_top_image_votes" => $lang['top_image_votes'&#93;
&#41;&#41;;
$site_template->print_template&#40;$site_template->parse_template&#40;$main_template&#41;&#41;;
include&#40;ROOT_PATH.'includes/page_footer.php'&#41;;
?>


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
[Mod] Toplist altered
« Reply #46 on: January 19, 2003, 06:49:56 PM »
it's about the same.
but still your code wont show thumbnails for media files such as .zip, .mpeg, .mp3 and so on.
http://4homepages.de/forum/viewtopic.php?p=13855#13855
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 pavka

  • Newbie
  • *
  • Posts: 14
    • View Profile
to see any difference you also need to edit the top.html ...
« Reply #47 on: February 04, 2003, 01:59:58 AM »
What should i add to top.html? and where? Big THX!
Best Regards,
P.

Offline helluvaguy

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
[Mod] Toplist altered
« Reply #48 on: February 15, 2003, 12:42:19 AM »
Quote from: limes
i get a broken image if i have no Thumbnail set for a picture.

when i add after line in each part for RATING, VOTES, DOWNLOADS, HITS: Code:

Code: [Select]
for ($i = 1; $i <= 20; $i++) {
 
this code: Code:
  if (isset($top_list[$i])) {
           if (empty($top_list[$i]['image_thumb_file'])) {
                  $thumb_file = ICON_PATH."/".get_file_extension($top_list[$i]['image_media_file']).".gif";
         }else {
                   $thumb_file = (is_remote($top_list[$i]['image_thumb_file'])) ? $top_list[$i]['image_thumb_file'] : THUMB_PATH."/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file'];
         }  


i get a php error.

I've got the same problem here. The funny thing about this is that the parse error occurs on the last line of top.php wher there is only ?>.
Any solution to this?

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
[Mod] Toplist altered
« Reply #49 on: February 15, 2003, 01:00:10 AM »
Quote from: helluvaguy
I've got the same problem here. The funny thing about this is that the parse error occurs on the last line of top.php wher there is only ?>.
Any solution to this?


that probably because u either lost somewhere closing " or }
check your code again.
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 helluvaguy

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
[Mod] Toplist altered
« Reply #50 on: February 15, 2003, 01:27:32 AM »
As usual you were right, but... because I used copy and past, it's been your fault ;) for your code on page 3 lacks the closing }.

... and it's much too late here for me to count brackets reliable 8O

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
[Mod] Toplist altered
« Reply #51 on: February 15, 2003, 01:32:11 AM »
ops  :oops:
sry about that... :?
corrected.
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 Shap

  • Full Member
  • ***
  • Posts: 114
    • View Profile
[Mod] Toplist altered
« Reply #52 on: February 19, 2003, 06:05:27 AM »
without reading all the posts....

Is there a working version yet.?

Offline helluvaguy

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
[Mod] Toplist altered
« Reply #53 on: February 19, 2003, 12:02:03 PM »
yes there is.

just read te-ga's post on top of this page and add v@no's comments about the thumbs from 03.01.2003, 04:03 on page 3

Offline Ernesto Taseffa

  • Full Member
  • ***
  • Posts: 151
    • View Profile
[Mod] Toplist altered
« Reply #54 on: February 25, 2003, 04:02:09 PM »
.
« Last Edit: August 09, 2009, 01:35:14 AM by Ernesto Taseffa »

Offline helluvaguy

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
[Mod] Toplist altered
« Reply #55 on: February 25, 2003, 04:22:32 PM »
Hi seffern,

did you change the top.html in your template? If you haven't added tables for the comments stuff, you won't see any differnce.  :wink:

Offline Ernesto Taseffa

  • Full Member
  • ***
  • Posts: 151
    • View Profile
[Mod] Toplist altered
« Reply #56 on: February 26, 2003, 06:21:49 PM »
.
« Last Edit: August 09, 2009, 01:34:56 AM by Ernesto Taseffa »

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
[Mod] Toplist altered
« Reply #57 on: February 26, 2003, 06:36:06 PM »
Quote from: seffern
... I just copied the complete top.html which was published here and overwrote my old one. I did not do any further modifications to this then new file. Should I add additionnally something?

If yes, what and where?

Dirk

mmmm....where did u get top.html from?  8O
the script posted here is top.php that must be uploaded in root of your 4images dir.
besides that code, u'll need update your top.html template.
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 Ernesto Taseffa

  • Full Member
  • ***
  • Posts: 151
    • View Profile
[Mod] Toplist altered
« Reply #58 on: February 26, 2003, 07:15:45 PM »
.
« Last Edit: August 09, 2009, 01:34:38 AM by Ernesto Taseffa »

Offline helluvaguy

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
[Mod] Toplist altered
« Reply #59 on: February 26, 2003, 08:05:37 PM »
What template are you using?