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

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

0 Members and 1 Guest are viewing this topic.

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: [Mod] Toplist altered
« Reply #120 on: June 12, 2006, 08:29:56 PM »
http://www.foto-kocher.com/top.php?cat_id=96
in my case there is no error coming out - maybe the error is to find between the version 1.6 and 1.6.2
sincerly
vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline Partyfinger

  • Pre-Newbie
  • Posts: 1
    • View Profile
    • Partyfinger.de
Re: [Mod] Toplist altered
« Reply #121 on: July 04, 2006, 11:09:51 AM »
Hallo zusammen.
Würde auch gerne dies Bilderfunktion bei meinen TOP Bilder einsetzen.
habe was auf Seite 3 gefunden.
Leider komme ich nicht klar.
Geht dies überhaupt mit der Version 1.7.2 ?
Habe schon Probleme wenn ich Schritt eins durchführen soll.
Finde nix im HTML Code.
Kann mir bitte jemand mit einer deutschen Anleitung helfen?
Gruß Stephan


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:

//-----------------------------------------------------
//--- 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:

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

Offline Partyfinger

  • Pre-Newbie
  • Posts: 1
    • View Profile
    • Partyfinger.de
Re: [Mod] Toplist altered
« Reply #122 on: July 04, 2006, 11:11:15 AM »
am besten , Schritt für Schritt.

Danke

Offline Partyfinger

  • Pre-Newbie
  • Posts: 1
    • View Profile
    • Partyfinger.de
Re: [Mod] Toplist altered
« Reply #123 on: July 07, 2006, 06:31:08 PM »
Kann mir keiner helfen?

Offline Ch*yeuk

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: [Mod] Toplist altered
« Reply #124 on: July 13, 2006, 04:03:54 AM »
Thanks for sharing! I've changed my toplist to show only thumbnails and it looks great.

Offline slime

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: [Mod] Toplist altered
« Reply #125 on: July 18, 2006, 11:20:13 PM »
bei mir klappt das auch bißher noch nicht .....wenn du es hinbekomen hast partyfinger wäre nett wenn du es nochmal posten könntest was du gemacht hat weil bei mir klappt es einfach nicht !!

Offline ahmad6

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [Mod] Toplist altered
« Reply #126 on: August 10, 2006, 01:45:47 PM »
HI

dear friends

Please help me i want show image in top image but only name image show

Please help me

Offline Brainwrek

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [Mod] Toplist altered
« Reply #127 on: August 21, 2006, 08:52:54 AM »
Hello.  I have followed this tutorial very carefully (several times), and I am having a troubling problem with it.

Thumbs are only being shown on the ODD numbers (#1, #3, #5, #7, #9).  The even numbered thumbs are not being displayed.  In fact, the even numbered template variables (example: {image_rating_thumb_2}) are not being parsed at all.  So I end up with a page that looks like this:

|----------------------|
|----------------------|
|----------------------|
|-----THUMB #1 ----|
|----------------------|
|----------------------|
|----------------------|

{image_rating_thumb_2}

|----------------------|
|----------------------|
|----------------------|
|-----THUMB #3 ----|
|----------------------|
|----------------------|
|----------------------|

{image_rating_thumb_4}

|----------------------|
|----------------------|
|----------------------|
|-----THUMB #5 ----|
|----------------------|
|----------------------|
|----------------------|

{image_rating_thumb_6}

|----------------------|
|----------------------|
|----------------------|
|-----THUMB #7 ----|
|----------------------|
|----------------------|
|----------------------|

{image_rating_thumb_8}

|----------------------|
|----------------------|
|----------------------|
|-----THUMB #9 ----|
|----------------------|
|----------------------|
|----------------------|

{image_rating_thumb_10}


Here is a sample of the code I am using:

Code: [Select]
// Rating
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name, i.image_thumb_file".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'])."\">".format_text($top_list[$i]['image_name'])."</a>" : format_text($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\">".format_text($top_list[$i]['image_name'])."</a>" : format_text($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)."\">".format_text($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'])."\">".format_text($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] = "--";
  }
}


BTW... I'm running v1.7.2
Anyone have a clue what's going on here?

Thanks!

Offline Brainwrek

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [Mod] Toplist altered
« Reply #128 on: August 23, 2006, 11:05:59 PM »
Ahum... any ideas on my previous post?  This is really strange.

Offline slime

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: [Mod] Toplist altered
« Reply #129 on: September 03, 2006, 07:02:07 PM »
gibst diesen mod auch komplett zusammen gefasst das man ihn auch verstehen kan sind einfach zuviel seiten !
Kann bitte den jemand mal zusammen fassen das man ihn versteht ?????? Bitte

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
Re: [Mod] Toplist altered
« Reply #130 on: September 16, 2006, 02:15:50 AM »
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
Re: [Mod] Toplist altered
« Reply #131 on: September 20, 2006, 03:11:46 AM »
you do something wrong, that all I can guess...these errors should not be showed if you are using the original code with image dimention addon.
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 chull

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: [Mod] Toplist altered
« Reply #132 on: September 25, 2006, 11:15:59 PM »
Hello,

I've installed the Mod with succes. Very nice!!! But I've also installed the Popup- message mod.(http://www.4homepages.de/forum/index.php?topic=3304.0). When I click now on a picture in the Toplist, the Popup didn't appear. Please Help!!!

Thanks and Greetz

Chull

Offline Partyfinger

  • Pre-Newbie
  • Posts: 1
    • View Profile
    • Partyfinger.de
Re: [Mod] Toplist altered
« Reply #133 on: December 08, 2006, 01:40:18 PM »
Leider klappt es nicht.   :cry:
Werde jetzt einfach warten bis das nächste Update 1.7.5 erscheint und hoffen das man dann diese „Bildanzeig-Funktion“ und „Top 20 Anzeige“ auf der TOP Seite , einfach über die Control Panel Seite einstellen kann.

Gruß Partyfinger.de

Offline mikum

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • picspack.de
Re: [Mod] Toplist altered
« Reply #134 on: January 16, 2007, 02:17:23 PM »
Hi *,

at first thanx for the mod. It works well on my page http://www.picspack.de/top.php.

However there is a little problem with the sorting:

In the first section 'highest rating' it sorts all photos with max. rate alphabetically. But I think it would make more sence if it would sort photos with the same rating for the most rates.

Cheers,
mikum