rejetto forum

what abouit showing thumbnail for Images

Poll

do you like to have a thumbnail function for images?

Yes
3 (33.3%)
Yes with option for enable/disable it
6 (66.7%)
No
0 (0%)

Total Members Voted: 8

Voting closed: April 22, 2006, 10:12:35 PM

0 Members and 1 Guest are viewing this topic.

Offline Data-Base

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
hello,

is it possible to add function to show thumbnail for Images in the file listing ?

Thanks for the cool program :-)


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
Check the To-Do list.  Poll isn't necessary.
maverick


Offline Data-Base

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
Quote from: "maverick"
Check the To-Do list.  Poll isn't necessary.


oppps  :#)

i was reading it but some how  :roll:  i didn't see this line.

sorry & thanks mate


MusicMan

  • Guest
Pictures + Thumbs Preview

i found some code for that, and modifieded it a bit ...

i have a dir with pictures in it.
then i made thumbs from those pictures 100x100,
and placed them in a dir called "thumb"
when i list the pictures, a thumb is showed from the thumb dir...
this works very well, but................

the only drawback is:
1. when i dont have created the thumbs yet
2. the thumb dir is visible

so anyone knows how solve this:
1. if no thumb(file) exist, show the original picture (some kind of case/if structure)
2. make the thumb dir hidden

ofcource i have alot of picture dirs, and possible thumb dirs

info:
Code: [Select]
%encoded-folder%  =  directory
thumb  =  is thumbdir
%item-name%"  =  filename


Code: [Select]
[file]
<tr><td class=row>%new% <a href="%item-url%">

<script language="javascript">
var c='%item-name%';
switch (  c.substr(  c.lastIndexOf('.')  ) .toLowerCase()  )
   {
case '.jpg' : case '.jpeg' : case '.gif' : case '.png' :case '.ico' :case '.bmp' : document.write('<a href="%item-url%" target="_blank"><img align=middle width="100" height="100" src="%encoded-folder%thumb/%item-name%"> </a> ');break;
   default      : document.write('<img align=middle src="/~img_file"> ');
   }
</script>

 %item-name%</a>%comment%<td class="row right">%item-size%<td class="row right">%item-modified%<td class="row right">%item-dl-count%
</tr>


http://img190.imageshack.us/img190/5139/screenshot0013rh.jpg
http://img166.imageshack.us/img166/5670/screenshot0027sg.jpg
http://img166.imageshack.us/img166/5153/screenshot0030tp.jpg
http://img166.imageshack.us/img166/7698/screenshot0048yo.jpg


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
musicman, improve the quality of thumbnails. in the program you use, search for "resample".


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
musicman,

In addition to improving the quality of the thumbnails, keep aspect ratio and you won't have images that are distorted like you have now (stretched etc.).
maverick


MusicMan

  • Guest
Quote from: "rejetto"
musicman, improve the quality of thumbnails. in the program you use, search for "resample".

hee rejetto, and maverick, thx for reply, but .................

your answer has nothing to do with my question ?!


the question is how to test if a thumbfile exist, in thumb dir i.e.
so if i list a page with pictures, show a thumb (if exist) if not show the original picture 100x100
this because hfs has not yet an on the fly thumbcreation...

look at the code, now it wil use the thumbs, but if they dont exist, it shows now no picture !?

hope its clear now  :o


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
musicman,

Give all your thumbs a unique name to distinquish them from the full picture. Example tn_Nickie Cox.jpg. Add a tn_ in front of all your thumbnails. Adjust your code so that only the thumbs that do exist in your folder are shown. (example tn_*.jpg or tn_*.* etc).
maverick


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
Quote from: "MusicMan"
the question is how to test if a thumbfile exist, in thumb dir
it is a problem. javascript is client-side and the thumbnail is on the server.
anyway, i'm not a javascript programmer.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile

Offline MusicMan

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
Quote from: "rejetto"
in version 2.1 you no longer need to use javascript

cool, i did see that you bin working hard  ;)  for 2.1

and my  :?:  for descript.ion

wil test this .............

 :D  :D  :D  :D  :D  :D  :D  :D