rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - vervethe

Pages: 1
1
but contructing regular express is slow.

this is better:
Code: [Select]
<tr><td class=row>%new% <a href="%item-url%">
<script language="jscript">
var c='%item-name%';
switch (  c.substr(  c.lastIndexOf('.')  ) .toLowerCase()  )
{
case '.txt' : document.write('<img align=top src="/imgs/txt__13[].gif"> ');break;
case '.htm' : case '.html' : document.write('<img align=top src="/imgs/net doc_13[].gif"> ');break;
case '.url' : case '.lnk' : document.write('<img align=top src="/imgs/Pointer_or_url__13[].gif"> ');break;
case '.exe' : case '.com' : document.write('<img align=top src="/imgs/runnerA_13[].gif"> ');break;
case '.dll' : document.write('<img align=top src="/imgs/dll_13[].gif"> ');break;
case '.zip' : case '.rar' : document.write('<img align=top src="/imgs/ar_11_8_13[]_orange.gif"> ');break;
case '.jpg' :case '.jpeg': case '.gif' : case '.png' :case '.ico':case '.bmp': document.write('<img align=top src="%item-url%"> ');break;
case '.wav':case '.aiff':case '.au':case '.cda':case '.ape': document.write('<img align=top src="/imgs/sound.gif"> ');break;
case '.m4a' : case '.mp4' : case '.aac' : document.write('<img align=top src="/imgs/leaf_G_13[].gif"> ');break;
case '.ogg':case '.wma':case '.mp3':case '.ra':case '.mpc': document.write('<img align=top src="/imgs/leaf.gif"> ');break;
case '.mid' : document.write('<img align=top src="/imgs/bowstr_13[].gif"> ');break;
case '.wmv':case '.rm':case '.rmvb':case '.avi':case '.dat': document.write('<img align=top src="/imgs/screen_9_6_13[].gif"> ');break;
case '.doc' : document.write('<img align=top src="/imgs/paper_13[].gif"> ');break;
case '.lrc' : document.write('<img align=top src="/imgs/Icon47_13[].gif"> ');break;
case '.ini' : case '.inf' : document.write('<img align=top src="/imgs/ini__13[].gif"> ');break;
case '.js':case '.vbs': document.write('<img align=top src="/imgs/winScript_13[].gif"> ');break;
case '.fnd': document.write('<img align=top src="/imgs/searCH.gif"> ');break;
case '.sf2':case '.akp':case '.exs':case '.fxp':case '.sxt':case '.nki': document.write('<img align=top src="/imgs/guitar_13[].gif"> ');break;
default : document.write('<img align=top 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%

2
also:

Code: [Select]
[file]
<tr><td class=row>%new% <a href="%item-url%">
<script language="jscript">
if (  '%item-name%'.match(/\.(jpg)|(gif)|(png)$/i)  ) document.write('<img align=top src="%item-url%"> ');
else if (  '%item-name%'.match(/\.wav$/i)  ) document.write('<img align=top src="/imgs/sound.gif"> ');
else if (  '%item-name%'.match(/\.dll$/i)  ) document.write('<img align=top src="/imgs/dll_13[].gif"> ');
else if (  '%item-name%'.match(/\.m4a$/i)  ) document.write('<img align=top src="/imgs/leaf_G_13[].gif"> ');
else if (  '%item-name%'.match(/\.doc$/i)  ) document.write('<img align=top src="/imgs/paper_13[].gif"> ');
else if (  '%item-name%'.match(/\.lrc$/i)  ) document.write('<img align=top src="/imgs/Icon47_13[].gif"> ');
else if (  '%item-name%'.match(/\.txt$/i)  ) document.write('<img align=top src="/imgs/txt__13[].gif"> ');
else if (  '%item-name%'.match(/\.url$/i)  ) document.write('<img align=top src="/imgs/Pointer_or_url__13[].gif"> ');
else if (  '%item-name%'.match(/\.htm$/i)  ) document.write('<img align=top src="/imgs/net doc_13[].gif"> ');
else if (  '%item-name%'.match(/\.exe$/i)  ) document.write('<img align=top src="/imgs/runnerA_13[].gif"> ');
else if (  '%item-name%'.match(/\.(zip)|(rar)$/i)  ) document.write('<img align=top src="/imgs/ar_11_8_13[]_orange.gif"> ');
else if (  '%item-name%'.match(/\.ini$/i)  ) document.write('<img align=top src="/imgs/ini__13[].gif"> ');
else document.write('<img align=top 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%

3
in list,how to display the file if file is a jpg/gif?
in Template,[file] section,default code is
Code: [Select]
[file]
<tr><td class=row>%new% <a href="%item-url%"><img align=top src="/~img_file"> %item-name%</a>%comment%<td class="row right">%item-size%<td class="row right">%item-modified%<td class="row right">%item-dl-count%
i want to check %item-name%,if the file is a jpg or gif,then display the file  instead of “/~img_file”.how to write the [file] section code?

4
HFS ~ HTTP File Server / About language
« on: October 18, 2005, 12:27:11 AM »
NoTiCe:
 [settings>>>>open directly in-browser]
can set the filename extension.
then,  (filename encoding on downloading) is correct

5
HTML & templates / My hfs
« on: October 14, 2004, 01:39:49 AM »
how to write template?
ÔõôдµÄ£¿

6
HFS ~ HTTP File Server / only hfs work well
« on: September 20, 2004, 01:38:40 AM »
i have test many web file server.only hfs work well.
when download,many software can not keep filename with local encoding.

Pages: 1