rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: Giant Eagle on July 04, 2007, 10:46:55 PM

Title: %ext% in [file]
Post by: Giant Eagle on July 04, 2007, 10:46:55 PM
Would it be possible to have a variable that changes into the extension of the file that is being processed..

For example, if i have [file.exe = file.zip = file.rar = <-- insert every supported extension here --> file.tar]
then when a file called 'test.zip' is being processed, %ext% would result in 'zip'

This would be ideal for the case of Terayon where every extension has the same code except for the Icon code. I could simply use <img src="/template/icons/%ext%.gif" /> instead of having 50 sheets of code
Title: Re: %ext% in [file]
Post by: rejetto on July 04, 2007, 11:01:37 PM
%item-ext% from next build
Title: Re: %ext% in [file]
Post by: Giant Eagle on July 05, 2007, 11:57:18 AM
Thanks ^^
Title: Re: %ext% in [file]
Post by: radd on July 09, 2007, 02:50:57 PM
giant-eagle, what about if the file have extension that u dont have specific icon. just for example: .mpeg(instead of mpg), .t3d,  dont u think will going to be mess up?

p/s- i use tetrayon with 'little bit' modification but feel ashame to show it to u all guys
Title: Re: %ext% in [file]
Post by: TSG on July 09, 2007, 04:33:36 PM
Well in the Terayon currently we have a default icon set... [file] which currently has the default icon we currently use for all unknown extensions. Although i think a %item-.file% might be needed... for a default setting. Customisable like the rest with its own section.
Title: Re: %ext% in [file]
Post by: Giant Eagle on July 09, 2007, 05:15:30 PM
no it wont mess up, not if you use it correctly:

[file.jpg = file.bmp = file.bmp = file.rar = file.zip = file.txt = file.bat = file.exe = file.gif = file.tgz = file.mpg = file.wmv = file.avi = file.mp3 ETC ETC]
<img src="/template/icons/%item-ext%.gif" alt="" />

this way, only the extensions where an icon have been made for will have the %item-ext% feature.



[file.mpeg]
<img src="/template/icons/mpg.gif" alt="" />

Only a few require this, but its worth it.



and last:

[file] -- for every non-set extension
<img src="/template/icons/file.gif" alt="" />
Title: Re: %ext% in [file]
Post by: radd on July 10, 2007, 08:30:55 AM
yeah, i got it!! thanks.

another things, i try put comment under alt for example

<img src="/template/icons/file.gif" alt="%item-comment%" />

but it not functioning. are there any way to make it function. just asking. sorry if i post not i correct topic
Title: Re: %ext% in [file]
Post by: TSG on July 10, 2007, 11:29:14 AM
yeah, i got it!! thanks.

another things, i try put comment under alt for example

<img src="/template/icons/file.gif" alt="%item-comment%" />

but it not functioning. are there any way to make it function. just asking. sorry if i post not i correct topic

This will depend on what you have in the [item-comment] section. If it writes just basic text it will work perfectly. But if there is any HTML in the comment it will break.
Title: Re: %ext% in [file]
Post by: Giant Eagle on July 10, 2007, 04:22:56 PM
The alt thing
Code: [Select]
alt="text goes here" only shows up as a cover for if the actual image has not been found or is unavailable.   (right?)
Title: Re: %ext% in [file]
Post by: KalleB on July 10, 2007, 07:36:08 PM
Correct, see also:

http://www.netmechanic.com/news/vol6/html_no1.htm
Title: Re: %ext% in [file]
Post by: maverick on July 10, 2007, 10:00:09 PM

Yes, using ALT and TITLE Attributes creates effective page content.  I use them throughout my site.
Title: Re: %ext% in [file]
Post by: radd on July 11, 2007, 01:39:10 AM
The alt thing
Code: [Select]
alt="text goes here" only shows up as a cover for if the actual image has not been found or is unavailable.   (right?)

owhh.. i tot the alt thing will be display during mouseover. that means i ive to find other way to view item-comment
Title: Re: %ext% in [file]
Post by: TSG on July 11, 2007, 05:22:18 AM
Well... You could try title="meeeh" but i think it wont show if you have html in it. Its the default tooltip code.

You could also try the javascript tooltip code I use.... It would require a unique ID, using the sequential feature. so. ID="t%sequential%". Then whatever is in the comment will show in a tooltip. Post back if you want me to make an example that might work.
Title: Re: %ext% in [file]
Post by: radd on July 11, 2007, 06:24:08 AM
example, steven.
thanks
Title: Re: %ext% in [file]
Post by: radd on July 11, 2007, 12:23:49 PM
Well... You could try title="meeeh" but i think it wont show if you have html in it. Its the default tooltip code.

You could also try the javascript tooltip code I use.... It would require a unique ID, using the sequential feature. so. ID="t%sequential%". Then whatever is in the comment will show in a tooltip. Post back if you want me to make an example that might work.

tsg, can u please teach me that script