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

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

0 Members and 1 Guest are viewing this topic.

Offline SprinterMadl

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Sprintermadl´s OnlineSite
Re: [Mod] Toplist altered
« Reply #195 on: June 06, 2009, 04:31:15 PM »
So. ich hab jetzt glaub ich ca. 3 Stunden gebraucht um mich in diesen Thread "einzuarbeiten", und die Schnipsel zu "installieren".

Ich gehör mit Sicherheit nicht zu denen die zu faul zum suchen sind, oder alles vorgekaut bekommen wollen, bin auch in der Lage ne Weile zu suchen bis ich das finde was ich brauche, bevor ich einen Thread auf machen, oder hier antworte.

Aber Dieser hier ist mal wieder das beste Beispiel, momentan 13 Seiten, und überall liegen Schnipsel rum, für nen Newbie ist es hier unmöglich sich Informationen zu holen und zu verarbeiten, ohne blöde Fragen zu stellen.
Gruß SprinterMadl


Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [Mod] Toplist altered
« Reply #196 on: October 12, 2009, 01:28:29 PM »
servus!

also wenn du den input von UFO aus diesem Thread hier befolgst, bekommst du ohne probleme die "10 meisten Kommentare" zum Laufen => Link
was brauchst du sonst noch?

gruss, bergblume

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [Mod] Toplist altered
« Reply #197 on: August 11, 2010, 01:23:31 AM »
@Vano

I have finally fixed this, this is the first MOD i think i tried to do but was scared and i finally did.

If u click this link Vano, http://www.4homepages.de/forum/index.php?topic=2544.75 u will be directed to another page in this topic, please look at the 3 rd which is yours, u r trying to help someone with the proportionality of images in the top, i tried to click that link but the link is dead. Is there another link which u can show me to fix this proportionality issue i have.

God bless u vano and thanks again for a great help and MOD

Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: [Mod] Toplist altered
« Reply #198 on: August 11, 2010, 02:24:17 AM »
Yes, an old link from the times when we used phpbb forum software.
Link fixed now.

P.S.
In case you didn't know, each reply has a unique address which you can find by hovering over headline. You can use these links instead of saying which post from the top you mean.

for example: http://www.4homepages.de/forum/index.php?topic=2544.msg22107#msg22107
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [Mod] Toplist altered
« Reply #199 on: August 11, 2010, 02:46:09 PM »
@ Vano,

Thank u so much for the advice, its funny u mentioned it because i have spent hours trying to find out how it worked  :P and al i had to really do was to click on the header title.

1)
Sir i did exactly like u said and thank u for fixing the link, it was much appreciated. I have done it, but below is an image of what it looks like, i just wanted to know sir, is this how is suppose to look. The images up are all dummy images and some images are not in proportion to others, as u can see from the image below. I followed ur advice in proportionality



2)
and also one more thing sir in this link http://www.4homepages.de/forum/index.php?topic=2544.msg22107#msg22107 you are just missing 1 more parenthesis at the end inside the code. Sorry if i am wrong.

Thank u again Vano for great help and god bless u sir.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Toplist altered
« Reply #200 on: August 11, 2010, 04:03:06 PM »
It seems it's resizes by height...

Since this topic pretty much messed up, what code do you use, from witch reply?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [Mod] Toplist altered
« Reply #201 on: August 11, 2010, 04:23:41 PM »
Hello Vano

Im so so sorry sir, but u said that "what code do i size, from which reply", please do not be angry sir but i did not understand what u mean by this. But i assume u r saying to me show u the code tht i used for this. If i am wrong please i apologize.

Below is the code i used to bring the images on toplist to proportion..

 
Code: [Select]
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;
      }

Sorry if this is not what u are asking of me sir.

Thank u vano

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Toplist altered
« Reply #202 on: August 11, 2010, 04:48:16 PM »
actually I said "use", not "size" ;) wanted you to point out at the reply with the code of this mod you are using, but it's ok now, don't worry about it.

Looking at your screenshot, the images are proportional and resized properly, maintaining 48 pixels width or height which ever is larger.
If you want it always maintain 48 pixels width then replace
Code: [Select]
     if ($ratio > 1) {
        $new_width = $dimension;
        $new_height = floor(($dimension/$width) * $height);
      }else {
        $new_width = floor(($dimension/$height) * $width);
        $new_height = $dimension;
      }

with:
Code: [Select]
       $new_width = $dimension;
        $new_height = floor(($dimension/$width) * $height);
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [Mod] Toplist altered
« Reply #203 on: August 11, 2010, 05:12:59 PM »
@VAno,

Im so very sorry, i should have read ur post more carefully, how can i confuse size with use  :P

Vano i want to thank u again, i have tremandous admiration for u. Im very glad that u r not working for google or microsoft or apple because they will not appreciate ur work like we do. To many good and amazing programmers like u are very scarce and just make companies billions each year. Its very nice to see at least 1 like ur self helping out the community and have made an amazing software which i highly respect and i for one am very appreciative for it. I have through every post said thank u to u, but like i said, no words can show how much gratitude i hold for ur help.

thank u so much vano

 

Post your comments here