rejetto forum

%ext% in [file]

0 Members and 1 Guest are viewing this topic.

Offline Giant Eagle

  • Tireless poster
  • ****
    • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
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


Offline rejetto

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

Offline Giant Eagle

  • Tireless poster
  • ****
    • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com

Offline radd

  • Tireless poster
  • ****
    • Posts: 145
    • View Profile
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


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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.


Offline Giant Eagle

  • Tireless poster
  • ****
    • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
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="" />


Offline radd

  • Tireless poster
  • ****
    • Posts: 145
    • View Profile
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
« Last Edit: July 10, 2007, 08:35:04 AM by radd »


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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.


Offline Giant Eagle

  • Tireless poster
  • ****
    • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
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?)



Offline maverick

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

Yes, using ALT and TITLE Attributes creates effective page content.  I use them throughout my site.
maverick


Offline radd

  • Tireless poster
  • ****
    • Posts: 145
    • View Profile
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


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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.


Offline radd

  • Tireless poster
  • ****
    • Posts: 145
    • View Profile

Offline radd

  • Tireless poster
  • ****
    • Posts: 145
    • View Profile
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