rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: Data-Base on April 22, 2006, 10:12:35 PM
-
hello,
is it possible to add function to show thumbnail for Images in the file listing ?
Thanks for the cool program :-)
-
Check the To-Do list. Poll isn't necessary.
-
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
-
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:
%encoded-folder% = directory
thumb = is thumbdir
%item-name%" = filename
[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
-
musicman, improve the quality of thumbnails. in the program you use, search for "resample".
-
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.).
-
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
-
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).
-
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.
-
in version 2.1 you no longer need to use javascript
-
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