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

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

0 Members and 1 Guest are viewing this topic.

Offline limes

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: media files
« Reply #75 on: April 14, 2003, 11:06:42 PM »
Quote from: V@no
Quote from: limes
->  What about the other media files, will their thumbnails be shown?

What are the others? :?
By media files I ment any files that dont have thumbnails and uses media icons.


my problem was, that i get a broken image if i have no Thumbnail set for a picture. and i am totally lost between the 5 pages, like aymanati.
cu
markus

Offline M@2T

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://4images.aliciakeysfan.com
[Mod] Toplist altered
« Reply #76 on: April 16, 2003, 08:49:29 PM »
Super mod!!.......realy make the top list page look so much better.

But I have one question.......many of my images are different sizes, some landscape and some portraite etc....

I have found in the code the "width" & "height" variables, is there a way to set the width and have the hight set proportionaly? so that the image will not be streched?  this is the case when the thumbnails are created normaly.

Many 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 #77 on: April 16, 2003, 10:52:04 PM »
Quote from: M@2T
I have found in the code the "width" & "height" variables, is there a way to set the width and have the hight set proportionaly? so that the image will not be streched?

I'm not gonna post changes for original code, just for this fix:
http://4homepages.de/forum/viewtopic.php?p=13855#13855

So, in that fix, replace changes in step 2. to this:
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;
      }

then, changee width=\"48\" to width=\"$new_width\"
same for height.
Repeat for each section.
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 M@2T

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://4images.aliciakeysfan.com
[Mod] Toplist altered
« Reply #78 on: April 18, 2003, 07:00:58 PM »
Superb!!! Worked like a charm!!  Many Many thanx for this, looks so cool.

Cheers V@no & Vraxor :D Super V's :P

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[Mod] Toplist altered
« Reply #79 on: April 24, 2003, 04:14:18 AM »
i can't get this to set proportionaly :(

i only accept .jpg files in my gallery, and i see that this fix has mentioned something about .gif. can this be the reason?

i can post my top.php code if needed
i envy M@2T gallery topimages page... it's so good lucking with that thumbnails ok...   :cry:

please help me
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 #80 on: April 24, 2003, 03:34:51 PM »
Quote from: Bomba
i can't get this to set proportionaly :(

i only accept .jpg files in my gallery, and i see that this fix has mentioned something about .gif. can this be the reason?

i can post my top.php code if needed
i envy M@2T gallery topimages page... it's so good lucking with that thumbnails ok...   :cry:

please help me
Thanks

so, where the problem?
the .gif files are actualy the media icons that shows when no thumbnail available.
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 Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[Mod] Toplist altered
« Reply #81 on: April 24, 2003, 03:47:08 PM »
but i don't accept any media files, i only accept .jpg files
can't this be the problem? cause im inserting that code refering that i might be using media files, when i don't.

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 #82 on: April 24, 2003, 04:00:18 PM »
Quote from: Bomba
but i don't accept any media files, i only accept .jpg files
can't this be the problem? cause im inserting that code refering that i might be using media files, when i don't.

there is nothing to do what u accept and what u dont.
for every image/media/whatever when THUMBNAIL doesnt exist, will be showed an ICON acording tipe of the file, that calls MEDIA ICONS.
even if u accept only .jpg files and one of your picture doesnt have thumbnail, instead of showing red X it will display media icon (/templates/<yourtemplate>/media/jpg.gif)
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 balu

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • http://www.coverengine.de/4images
Tiling the top.html
« Reply #83 on: May 15, 2003, 08:19:59 PM »
Hi, there
I just added the "thumbnails" in my toplist - now the site is very long - I now want to tile this page in 4 pages - top 10 votes, top 10 downloads, top 10 visits...
how must I change the page_header.php to do this?

thx for helping a newbie in php!
Jürgen
-------------------------------------------------------
Wer Rechtschreibfehler findet, darf sie behalten!


Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
[Mod] Toplist altered
« Reply #84 on: May 16, 2003, 04:10:40 AM »
You don't.  You edit the top.html template instead.  :wink:

Offline balu

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • http://www.coverengine.de/4images
[Mod] Toplist altered
« Reply #85 on: May 16, 2003, 07:46:41 AM »
thx - already done - i added 4 new top.php´s and 4 new top.html´s and i included them in the page_header - now you  switch between 4 toplists!
Jürgen
-------------------------------------------------------
Wer Rechtschreibfehler findet, darf sie behalten!


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 #86 on: May 16, 2003, 07:50:48 AM »
Quote from: balu
i added 4 new top.php´s and 4 new top.html´s and i included them in the page_header - now you  switch between 4 toplists!

u must be kidding! right?? 8O 8O 8O 8O
do u show your "TOP" images on each page? 8O 8O 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 balu

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • http://www.coverengine.de/4images
[Mod] Toplist altered
« Reply #87 on: May 16, 2003, 07:57:08 AM »
no - now i have 4 pages:
Top downloads
top hits
top ranking
top votes

not all in one page

have a look: http://www.coverengine.de/4images/
Jürgen
-------------------------------------------------------
Wer Rechtschreibfehler findet, darf sie behalten!


Offline balu

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • http://www.coverengine.de/4images
[Mod] Toplist altered
« Reply #88 on: May 16, 2003, 07:58:57 AM »
... but btw I have a problem with my memberlist - it don´t work correctly - maybe you be so kind to have look at this

thx
Jürgen
-------------------------------------------------------
Wer Rechtschreibfehler findet, darf sie behalten!


Offline artpapa

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: [Mod] Toplist altered
« Reply #89 on: May 17, 2003, 10:03:28 PM »
Quote from: Vraxor
Yesterday I started changing the code of 4 images for the first time and with succes. I altered the Toplist to show a top 10 of Most commented images.

I also added some lines to the top.php file to show the thumbnails, this last edit took me many hours since I do not have any programming skills yet, I'm a quick learner so I will be able to mange soon enough I think ;-)

Feel free to take a look and if enough people love the way I changed the toplist I might write a tutorial here.

to view the toplist: http://haunter.student.utwente.nl/Terrarevolution/galleries/top.php

Cheers,
Vraxor


Hi, Vraxor.
I cannot writ those scripts at all, but I can follow directions.
What do you think it will be possible to do and how difficult it will be to modify your script something like this: instead text links- a pictures, instead ten best -one best?
This little JPG will explain better what I mean:

http://www.artpapa.com/best.jpg

And one more nave question: do you think it will be possible to display this script in the static HTML, or it supposed to be PHP?

Thank you

Alexei

www.artpapa.com