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

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

0 Members and 1 Guest are viewing this topic.

Offline limes

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
hm?
« Reply #30 on: November 17, 2002, 12:11:51 AM »
you wrote at the first page of the thread:

"... Here I post the Top.php code I altered. You should be able to create the needed changes in the Top template and add a new line in the English and german language mail.php file..."

i can't find am "mail.php"-file. what file do you mean?

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Typo
« Reply #31 on: November 17, 2002, 02:35:50 AM »
Vraxor meant "main.php"  You can find this file under each language pack directory.

Offline Vraxor

  • Full Member
  • ***
  • Posts: 134
    • View Profile
    • http://tc-revolution.net
[Mod] Toplist altered
« Reply #32 on: November 17, 2002, 08:31:25 AM »
:o , sorry now I understand what you meant by Mail.php  :oops:

yes, this should be main.php, I really have a problem with typing  :)

Cheers,
Vraxor

Offline limes

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
aha
« Reply #33 on: November 17, 2002, 10:33:01 AM »
ok, thank you  :D

but, what " ... new line in the English and german language main.php file ..." i have to insert???

Offline threelum

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • http://www.threelum.com/imagenation/
[Mod] Toplist altered
« Reply #34 on: November 17, 2002, 06:27:37 PM »
look at the code,

you have now 5 categories in the top.php and the new one is comments. you must add the new comment tag in the ../lang/english(deutsch)/main.php. It is only for the new comments header {lang_top_image_comments} in the top.html and you must modify in all language packs you are use.

1. add the comments description in the image details

Code: [Select]

//-----------------------------------------------------
//--- Image Details --------------------------------
//-----------------------------------------------------

$lang['hits'] = "Hits:";
$lang['downloads'] = "Downloads:";
$lang['rating'] = "Rating:";
$lang['votes'] = "Vote(s)";
$lang['comments']="Comments";


2. add the comments tag the top images details and if you have set more then 10 Top images you must change this to your prefer (5,20,50,?). look to the top.html here is the {lang_top_image_comments}

Code: [Select]

//-----------------------------------------------------
//--- Top Images --------------------------------------
//-----------------------------------------------------
$lang['top_image_hits'] = "Top 10 images by hits";
$lang['top_image_downloads'] = "Top 10 images by downloads";
$lang['top_image_rating'] = "Top 10 images by rating";
$lang['top_image_votes'] = "Top 10 images by votes";
$lang['top_image_comments'] = "Top 10 images by comments";


3. change of top.html for the new thumbnails

add a new tablerow for the thumbnails. in the new cells you write the thumb tag {image_hits_thumb_1} {image_downloads_thumb_1} {image_rating_thumb_1} {image_votes_thumb_1} and so on (_2, _3, _4,...) for the different top categories.

4. change the top.html for the new comment category

add new tablecells for the new top comments category. in the header you write {lang_top_image_comments} and in the cells you write the same as in the hits, downloads, rating,... but modifying the new comments tag z.B. {image_comments_thumb_1} {image_comments_1} {image_comments_user_1} {image_comments_cat_1} {image_comments_number_1} and so on (_2, _3, _4,...).

 i hope it's clear
 
 much fun threelum

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 #35 on: January 02, 2003, 08:08:08 PM »
finaly got it work... :D
but... :?  how about media files? it displays bronken picture.
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 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 #36 on: January 02, 2003, 08:48:25 PM »
ok, fixed that.
if anyone need it I'll post the code. :wink:
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 limes

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
i need the code
« Reply #37 on: January 02, 2003, 08:50:57 PM »
hi,

ich need the code:
macho@imperium.de
thx
markus

Offline Jasondavis

  • Full Member
  • ***
  • Posts: 157
    • View Profile
help
« Reply #38 on: January 03, 2003, 01:25:56 AM »
V@no if it's possible could u send me your files that r edited? Im lost on this mod but I want it

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Yes please
« Reply #39 on: January 03, 2003, 02:50:35 AM »
Quote from: V@no
ok, fixed that.
if anyone need it I'll post the code. :wink:


Please post it.  Thanks.

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 #40 on: January 03, 2003, 04:03:16 AM »
Ok, there is not much to change in the Vraxor's code
I will show on example of RATING code.
so, here it goes:
1. u need add i.image_media_file in $sql line, in each part for RATING, VOTES, DOWNLOADS, HITS:
Quote
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_media_file, i.image_rating, i.image_votes, c.cat_name, u.user_name

2. add after line in each part for RATING, VOTES, DOWNLOADS, HITS:
Code: [Select]
for ($i = 1; $i <= 20; $i++) {
this code:
Code: [Select]
 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'];
         }
}

3. change this:
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=\"\" />";to this:
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=\"".$thumb_file."\" width=\"48\" height=\"36\" border=\"1\" alt=\"\" />";
so, basicaly all u need is to change in last code - "<img src=....>"
Code: [Select]
<img src=\"".$thumb_file."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />
for VOTES, DOWNLOADS, HITS u'll need change in step 3. :
image_rating_thumb_
to:
image_votes_thumb_
image_downloads_thumb_
image_hits_thumb_
hope that's understandable...;)
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 Amosnet

  • Full Member
  • ***
  • Posts: 104
    • View Profile
    • Bilder verkaufen
[Mod] Toplist altered
« Reply #41 on: January 07, 2003, 01:16:56 PM »
I get an "not found" Error, if i have no Thumbnail set for a picture.
For Example if a Video File ist locatet in the TOp Script, you have
no standart Thumbnail. Then you get:

Anyone a idea?

http://www.amosnet.de/4images/top.php
I love 4images! http://www.fotos-verkaufen.de Fotos verkaufen online Tips und Tricks und http://www.fotoskaufen.de

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 #42 on: January 07, 2003, 08:39:10 PM »
did u missed my post above?  8O
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 limes

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
[Mod] Toplist altered
« Reply #43 on: January 12, 2003, 11:46:31 PM »
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.

Offline Amosnet

  • Full Member
  • ***
  • Posts: 104
    • View Profile
    • Bilder verkaufen
[Mod] Toplist altered
« Reply #44 on: January 17, 2003, 02:35:54 PM »
Can somebody please post the code for the broken link problem please?
I love 4images! http://www.fotos-verkaufen.de Fotos verkaufen online Tips und Tricks und http://www.fotoskaufen.de