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

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

0 Members and 1 Guest are viewing this topic.

Offline Matthias70

  • Full Member
  • ***
  • Posts: 199
    • View Profile
    • Bildergalerie
Re: [Mod] Toplist altered
« Reply #105 on: July 28, 2005, 04:51:21 PM »
A nice addon for the toplist is
top 10 by lightbox.

A script by v@no

http://www.4homepages.de/forum/index.php?topic=9033.0

Matthias

Offline NYChack

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [Mod] Toplist altered
« Reply #106 on: August 05, 2005, 10:24:32 PM »
I am getting the following data base errors with my site which is integrated with vBulletin and is sharing the same data base.

errors:
Code: [Select]
DB Error: Bad SQL Query: 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 actors_images i, actors_categories c, user u WHERE i.image_active = 1 AND i.cat_id NOT IN (0) AND i.cat_id = c.cat_id AND i.user_id = u.user_id ORDER BY i.image_rating DESC, i.image_votes DESC LIMIT 20
Unknown column 'u.user_name' in 'field list'

DB Error: Bad SQL Query: 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 actors_images i, actors_categories c, user u WHERE i.image_active = 1 AND i.cat_id NOT IN (0) AND i.cat_id = c.cat_id AND i.user_id = u.user_id ORDER BY i.image_votes DESC, i.image_name ASC LIMIT 20
Unknown column 'u.user_name' in 'field list'

DB Error: Bad SQL Query: 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 actors_images i, actors_categories c, user u WHERE i.image_active = 1 AND i.cat_id NOT IN (0) AND i.cat_id = c.cat_id AND i.user_id = u.user_id ORDER BY i.image_hits DESC, i.image_name ASC LIMIT 20
Unknown column 'u.user_name' in 'field list'

DB Error: Bad SQL Query: 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 actors_images i, actors_categories c, user u WHERE i.image_active = 1 AND i.cat_id NOT IN (0) AND i.cat_id = c.cat_id AND i.user_id = u.user_id ORDER BY i.image_downloads DESC, i.image_name ASC LIMIT 20
Unknown column 'u.user_name' in 'field list'

DB Error: Bad SQL Query: 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 actors_images i, actors_categories c, user u WHERE i.image_active = 1 AND i.cat_id NOT IN (0) AND i.cat_id = c.cat_id AND i.user_id = u.user_id ORDER BY i.image_comments DESC, i.image_votes DESC LIMIT 20
Unknown column 'u.user_name' in 'field list'

Here is my site info:

I have successfully applied this mode:  "4images Gallery 1.7 + vB 3.0.x"  
http://www.vbulletin.org/forum/showthread.php?t=66335&page=1&pp=15&highlight=4images

Versions I am using:

4images 1.7.1
vBulletin Version 3.0.7


As part of the integration with vBulletin my 4images data base has a prefix of "actors_" and is in the same data base as vBulletin which has no prefix. So, my 4images is using vBulletin's user table. Which results in my users registering and signing in once to use the forum and picture gallery.

My data base:

"actors_categories"        <---4images
"actors_comments"       <---4images
"actors_groupaccess"     <---4images
adminhelp                    <---vBulletin (no prefix)
user                            <---vBulletin (no prefix)
useractivation               <---vBulletin (no prefix)
etc..

I am wondering if this could be fixed easily or has the integration with vBulletin made this mod unsalable?

thanks - Jason




Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: [Mod] Toplist altered
« Reply #107 on: September 23, 2005, 12:16:36 PM »
Could someone edit the first post so it shows you how to edit the top images page? (It’s darn hard to look on 8 pages and not knowing what code I exactly should use)

Offline wydmuch

  • Pre-Newbie
  • Posts: 6
    • View Profile
    • High-End picture gallery
Re: [Mod] Toplist altered
« Reply #108 on: December 27, 2005, 02:30:33 PM »
I agree to Bart,
it is quite hard and time comsuming for a rookie to read 8 pages of discussion and error-tracking and fault finding.
It would be nice, if a mod has been seen as working error-free, to attach it somewhere for downloading.

To be honest, I also would like to use this thumb funtion, but I am not sure what to do and don't want to damage my working gallery :-(

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: [Mod] Toplist altered
« Reply #109 on: December 27, 2005, 02:42:45 PM »
I got it sorted out with thumbnails :)

top.html
add this to your top.html file
Code: [Select]
<table width="100%" border="0" cellpadding="3" cellspacing="0">
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">#</span></b></td>
    <td valign="middle" class="row1"><div align="center"></div></td>
    <td valign="middle" class="row1"><div align="center"><b><span id="topsite" class="bluetext">Name</span></b></div></td>
    <td valign="middle" class="row1"><div align="center"><b><span id="topsite" class="bluetext">By</span></b></div></td>
    <td valign="middle" class="row1"><div align="center"><b><span id="topsite" class="bluetext">Category</span></b></div></td>
    <td valign="middle" class="row1" nowrap="nowrap"><div align="center"><b><span id="topsite" class="bluetext">Hits</span></b></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">1</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_thumb_1}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_1}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_user_1}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_cat_1}</span></div></td>
    <td valign="middle" class="row1" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_hits_number_1}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">2</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_thumb_2}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_2}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_user_2}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_cat_2}</span></div></td>
    <td valign="middle" class="row2" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_hits_number_2}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">3</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_thumb_3}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_3}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_user_3}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_cat_3}</span></div></td>
    <td valign="middle" class="row1" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_hits_number_3}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">4</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_thumb_4}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_4}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_user_4}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_cat_4}</span></div></td>
    <td valign="middle" class="row2" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_hits_number_4}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">5</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_thumb_5}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_5}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_user_5}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_cat_5}</span></div></td>
    <td valign="middle" class="row1" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_hits_number_5}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">6</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_thumb_6}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_6}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_user_6}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_cat_6}</span></div></td>
    <td valign="middle" class="row2" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_hits_number_6}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">7</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_thumb_7}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_7}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_user_7}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_cat_7}</span></div></td>
    <td valign="middle" class="row1" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_hits_number_7}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">8</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_thumb_8}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_8}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_user_8}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_cat_8}</span></div></td>
    <td valign="middle" class="row2" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_hits_number_8}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">9</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_thumb_9}</span></div></td>
    <td valign="middle" class="row1"><span id="topsite" class="bluetext">
      <div align="center"><span id="topsite" class="bluetext">{image_hits_9}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_user_9}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_hits_cat_9}</span></div></td>
    <td valign="middle" class="row1" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_hits_number_9}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">10</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_thumb_10}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_10}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_user_10}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_hits_cat_10}</span></div></td>
    <td valign="middle" class="row2" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_hits_number_10}</span></div></td>
  </tr>
</table>
</div>
<div class="maincontent2">
<!-- baren med titlen af boxen -->
<div class="barmain">
{lang_top_image_rating}
</div>
<!-- div til indholdet af boxen -->
<table width="100%" border="0" cellpadding="3" cellspacing="0">
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">#</span></b></td>
    <td valign="middle" class="row1"><div align="center"></div></td>
    <td valign="middle" class="row1"><div align="center"><b><span id="topsite" class="bluetext">Name</span></b></div></td>
    <td valign="middle" class="row1"><div align="center"><b><span id="topsite" class="bluetext">By</span></b></div></td>
    <td valign="middle" class="row1"><div align="center"><b><span id="topsite" class="bluetext">Category</span></b></div></td>
    <td valign="middle" class="row1" nowrap><div align="center"><b><span id="topsite" class="bluetext">Rating</span></b></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">1</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_thumb_1}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_1}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_user_1}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_cat_1}</span></div></td>
    <td valign="middle" class="row1" nowrap><div align="center"><span id="topsite" class="bluetext">{image_rating_number_1}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">2</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_thumb_2}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_2}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_user_2}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_cat_2}</span></div></td>
    <td valign="middle" class="row2" nowrap><div align="center"><span id="topsite" class="bluetext">{image_rating_number_2}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">3</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_thumb_3}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_3}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_user_3}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_cat_3}</span></div></td>
    <td valign="middle" class="row1" nowrap><div align="center"><span id="topsite" class="bluetext">{image_rating_number_3}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">4</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_thumb_4}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_4}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_user_4}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_cat_4}</span></div></td>
    <td valign="middle" class="row2" nowrap><div align="center"><span id="topsite" class="bluetext">{image_rating_number_4}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">5</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_thumb_5}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_5}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_user_5}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_cat_5}</span></div></td>
    <td valign="middle" class="row1" nowrap><div align="center"><span id="topsite" class="bluetext">{image_rating_number_5}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">6</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_thumb_6}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_6}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_user_6}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_cat_6}</span></div></td>
    <td valign="middle" class="row2" nowrap><div align="center"><span id="topsite" class="bluetext">{image_rating_number_6}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">7</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_thumb_7}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_7}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_user_7}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_cat_7}</span></div></td>
    <td valign="middle" class="row1" nowrap><div align="center"><span id="topsite" class="bluetext">{image_rating_number_7}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">8</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_thumb_8}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_8}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_user_8}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_cat_8}</span></div></td>
    <td valign="middle" class="row2" nowrap><div align="center"><span id="topsite" class="bluetext">{image_rating_number_8}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">9</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_thumb_9}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_9}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_user_9}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_rating_cat_9}</span></div></td>
    <td valign="middle" class="row1" nowrap><div align="center"><span id="topsite" class="bluetext">{image_rating_number_9}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">10</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_thumb_10}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_10}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_user_10}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_rating_cat_10}</span></div></td>
    <td valign="middle" class="row2" nowrap><div align="center"><span id="topsite" class="bluetext">{image_rating_number_10}</span></div></td>
  </tr>
  <tr>
</table>
</div>
<div class="maincontent2">
<!-- baren med titlen af boxen -->
<div class="barmain">
{lang_top_image_votes}
</div>
<table width="100%" border="0" cellpadding="3" cellspacing="0">
  <tr>
    <td width="3%" valign="middle" class="row1"><b><span id="topsite" class="bluetext">#</span></b></td>
    <td width="17%" valign="middle" class="row1"><div align="center"></div></td>
    <td width="19%" valign="middle" class="row1"><div align="center"><b><span id="topsite" class="bluetext">Name</span></b></div></td>
    <td width="20%" valign="middle" class="row1"><div align="center"><b><span id="topsite" class="bluetext">By</span></b></div></td>
    <td width="19%" valign="middle" class="row1"><div align="center"><b><span id="topsite" class="bluetext">Category</span></b></div></td>
    <td width="22%" valign="middle" nowrap="nowrap" class="row1"><div align="center"><b><span id="topsite" class="bluetext">Rating</span></b></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">1</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_thumb_1}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_1}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_user_1}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_cat_1}</span></div></td>
    <td valign="middle" class="row1" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_votes_number_1}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">2</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_thumb_2}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_2}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_user_2}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_cat_2}</span></div></td>
    <td valign="middle" class="row2" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_votes_number_2}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">3</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_thumb_3}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_3}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_user_3}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_cat_3}</span></div></td>
    <td valign="middle" class="row1" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_votes_number_3}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">4</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_thumb_4}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_4}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_user_4}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_cat_4}</span></div></td>
    <td valign="middle" class="row2" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_votes_number_4}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">5</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_thumb_5}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_5}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_user_5}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_cat_5}</span></div></td>
    <td valign="middle" class="row1" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_votes_number_5}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">6</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_thumb_6}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_6}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_user_6}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_cat_6}</span></div></td>
    <td valign="middle" class="row2" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_votes_number_6}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">7</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_thumb_7}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_7}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_user_7}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_cat_7}</span></div></td>
    <td valign="middle" class="row1" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_votes_number_7}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">8</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_thumb_8}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_8}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_user_8}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_cat_8}</span></div></td>
    <td valign="middle" class="row2" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_votes_number_8}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row1"><b><span id="topsite" class="bluetext">9</span></b></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_thumb_9}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_9}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_user_9}</span></div></td>
    <td valign="middle" class="row1"><div align="center"><span id="topsite" class="bluetext">{image_votes_cat_9}</span></div></td>
    <td valign="middle" class="row1" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_votes_number_9}</span></div></td>
  </tr>
  <tr>
    <td valign="middle" class="row2"><b><span id="topsite" class="bluetext">10</span></b></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_thumb_10}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_10}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_user_10}</span></div></td>
    <td valign="middle" class="row2"><div align="center"><span id="topsite" class="bluetext">{image_votes_cat_10}</span></div></td>
    <td valign="middle" class="row2" nowrap="nowrap"><div align="center"><span id="topsite" class="bluetext">{image_votes_number_10}</span></div></td>
  </tr>
</table>
I can't remember what I changed in top.php so i'm going to post the whole file.

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

$main_template = 'top';

define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');

$cache_id = create_cache_id(
  'top',
  array(
    $user_info[$user_table_fields['user_id']],
    $cat_id,
    $config['template_dir'],
    $config['language_dir']
  )
);

if (!$cache_page_top || !$content = get_cache_file($cache_id)) {
if ($cache_page_top) {
  // Always append session id if cache is enabled
  $old_session_mode = $site_sess->mode;
  $site_sess->mode = 'get';
}

ob_start();

$cat_match_sql = ($cat_id && check_permission("auth_viewcat", $cat_id)) ? "AND i.cat_id = '$cat_id' " : "";
$register_array = array();

$cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN");

// Rating
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_thumb_file, i.image_name, i.image_rating, i.image_votes, c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id
        $cat_match_sql
        ORDER BY i.image_rating DESC, i.image_name ASC
        LIMIT 10";
$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 <= 10; $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']);
    if (isset($top_list[$i][$user_table_fields['user_name']]) && $top_list[$i]['user_id'] != GUEST) {
      $user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $top_list[$i]['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'];
      $register_array['image_rating_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".htmlspecialchars($top_list[$i][$user_table_fields['user_name']])."</a>";
    }
    else {
      $register_array['image_rating_user_'.$i] = $lang['userlevel_guest'];
    }
    $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']."\" 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_thumb_file, i.image_name, i.image_rating, i.image_votes, c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id
        $cat_match_sql
        ORDER BY i.image_votes DESC, i.image_name ASC
        LIMIT 10";
$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 <= 10; $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']);
    if (isset($top_list[$i][$user_table_fields['user_name']]) && $top_list[$i]['user_id'] != GUEST) {
      $user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $top_list[$i]['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'];
      $register_array['image_votes_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".htmlspecialchars($top_list[$i][$user_table_fields['user_name']])."</a>";
    }
    else {
      $register_array['image_votes_user_'.$i] = $lang['userlevel_guest'];
    }
    $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']."\" 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_thumb_file, i.image_name, i.image_hits, c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id
        $cat_match_sql
        ORDER BY i.image_hits DESC, i.image_name ASC
        LIMIT 10";
$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 <= 10; $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']);
    if (isset($top_list[$i][$user_table_fields['user_name']]) && $top_list[$i]['user_id'] != GUEST) {
      $user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $top_list[$i]['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'];
      $register_array['image_hits_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".htmlspecialchars($top_list[$i][$user_table_fields['user_name']])."</a>";
    }
    else {
      $register_array['image_hits_user_'.$i] = $lang['userlevel_guest'];
    }
    $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

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [Mod] Toplist altered
« Reply #110 on: December 27, 2005, 03:17:44 PM »
@BartAfterDark :

The problem is, by posting the whole top.php file, it could affect some MODs that users might of installed seperately which amended modifications to that file. ;)

The best way to remember where you did your modifications is by specifying "uncommented text"

like this for example :

Quote

// Top List Altered Starts here.

your codes . . .


Then, at the end ;

Quote

// Top List Altered Ends here.


This way, it will avoid questionnings from users on why they could encounter difficulties to manage their top page. ;)

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: [Mod] Toplist altered
« Reply #111 on: December 27, 2005, 04:03:15 PM »
Thats true.
But he/they could allways post here again, if it isn't working :)

@BartAfterDark :

The problem is, by posting the whole top.php file, it could affect some MODs that users might of installed seperately which amended modifications to that file. ;)

The best way to remember where you did your modifications is by specifying "uncommented text"

like this for example :

Quote

// Top List Altered Starts here.

your codes . . .


Then, at the end ;

Quote

// Top List Altered Ends here.


This way, it will avoid questionnings from users on why they could encounter difficulties to manage their top page. ;)

Offline egozent

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
Re: [Mod] Toplist altered
« Reply #112 on: February 22, 2006, 06:33:03 PM »
Ich erhalte folgende Fehlermeldung / I get this error message:
Code: [Select]
Fatal error: Call to undefined function: create_cache_id() in /www/htdocs/xxx/top.php on line 35 :(

Offline egozent

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
Re: [Mod] Toplist altered
« Reply #113 on: March 06, 2006, 06:01:35 PM »
Thank you! It works fine!  :D

Offline boerdi

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: [Mod] Toplist altered
« Reply #114 on: April 11, 2006, 11:28:31 AM »
i got following message
.Parse error: parse error in /usr/local/sites/prodersdorfat/public_html/album/top.php on line 171

have you post your full php-code???
because the last code is ......top_list[$i]['image_thumb_file&#03    end thats not the end, or yes????#

please help..thanks

Offline IWS_steffen

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • Kreuzfahrtschiffe gestern und heute
Re: [Mod] Toplist altered
« Reply #115 on: April 18, 2006, 06:44:14 PM »
cooler MOD

Thank you! It works fine! 

Steffen

Offline PartyPix

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: [Mod] Toplist altered
« Reply #116 on: April 19, 2006, 05:15:38 PM »
Hey
i have try to make the imagesize proportionaly how V@no describe but i became this ERROR Message : Parse error: syntax error, unexpected '}' in /usr/export/www/vhosts/funnetwork/hosting/funchecks/top.php on line 277

I will post my code here but Line 277 is by me not where, where i change anything. I change only the Rating part because i use only the Rating Part on the toplist.

Here is my code and where is the mistake ? Please Help me !


Code: [Select]
// 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();

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'];
}
     $thumb_info = @getimagesize($thumb_file);
     $width = $thumb_info[0];
     $height = $thumb_info[1];
     $dimension = 48;
     $ratio = $width / $height;
     if ($ratio > 1) {
       $new_width = $dimension;
       $new_height = floor(($dimension/$width) * $height);
     }else {
       $new_width = floor(($dimension/$height) * $width);
       $new_height = $dimension;
     }
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=\"$new_width\" height=\"$new_height\" 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] = "--";
 }
}

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] Toplist altered
« Reply #117 on: April 19, 2006, 05:20:52 PM »
@ PartyPix

... try to delete '}' in line ... (I think your latest '}' in your post)  ...  :wink:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline PartyPix

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: [Mod] Toplist altered
« Reply #118 on: April 19, 2006, 05:23:32 PM »
Quote
@ PartyPix

... try to delete '}' in line 277 ...  


That will go but now i have this error message:

Warning: Division by zero in /usr/export/www/vhosts/funnetwork/hosting/funchecks/top.php on line 84

Warning: Division by zero in /usr/export/www/vhosts/funnetwork/hosting/funchecks/top.php on line 89


and the Thumbnails will not show :(

What is now the problem ?


//EDIT

I have fix my problem. I Have forgot one line to copy ;)
« Last Edit: April 20, 2006, 01:02:23 AM by PartyPix »

Offline shakit

  • Pre-Newbie
  • Posts: 1
    • View Profile
    • shakit.de
Re: [Mod] Toplist altered
« Reply #119 on: June 07, 2006, 01:20:21 AM »
if a category has under 10 pictures, this error message comes:
categorie with 9 images:

Warning: Division by zero in xxx/top.php on line 85
Warning: Division by zero in xxx/top.php on line 90
Warning: Division by zero in xxx/top.php on line 135
Warning: Division by zero in xxx/top.php on line 140
Warning: Division by zero in xxx/top.php on line 185
Warning: Division by zero in xxx/top.php on line 190
Warning: Division by zero in xxx/top.php on line 235
Warning: Division by zero in xxx/top.php on line 240
Warning: Division by zero in xxx/top.php on line 285
Warning: Division by zero in xxx/top.php on line 290

line 85:      $ratio = $width / $height;
line 90:      $new_width = floor(($dimension/$height) * $width);
line 135:     $ratio = $width / $height;
...

http://www.shakit.de/gallery/top.php?cat_id=48

what is wrong?