rejetto forum

Need some help on some codes

DNA1010 · 8 · 12309

0 Members and 1 Guest are viewing this topic.

Offline DNA1010

  • Occasional poster
  • *
    • Posts: 10
    • View Profile
I'm currently using

Code: [Select]
<img width=35px src="{.if|{.filesize|%item-resource%\folder.jpg.}|%item-url%folder.jpg |/template/{.!theme.}/images/icons/folder.gif.}"/>
in Live 3.0.1

If folder.jpg is not found, then default folder.gif will be used.

I wanna make it look for folder.png also since some mp3 files was embedded with png instead of jpeg. It basically look for folder.jpg first, if it's not existed, look for folder.png, if both jpg and png are not avail, use default folder.gif.

Thanks in advance


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
try this (not tested)
<img width=35px src="{.if|{.filesize|%item-resource%\folder.jpg.}|%item-url%folder.jpg|{.if|{.filesize|%item-resource%\folder.png.}|%item-url%folder.png|/template/{.!theme.}/images/icons/folder.gif.}.}"/>


Offline DNA1010

  • Occasional poster
  • *
    • Posts: 10
    • View Profile
Thanks for the quick respond and it's working perfectly.

Bumping into another problem tho. When the folder name/link contains %E6%9C%83 for a unicode character, the folder.jpg or png just won't load. If I delete that specific character in the folder name, the pic loads fine. It doesn't matter where I place that character in the folder name, as long as it's in the name, the pic just won't load.

Thanks

« Last Edit: March 01, 2011, 09:35:47 PM by DNA1010 »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
that's 會
do you have a japanese Windows or what?
HFS support for unicode is limited, and it depends on this.


Offline DNA1010

  • Occasional poster
  • *
    • Posts: 10
    • View Profile
that's 會
do you have a japanese Windows or what?
HFS support for unicode is limited, and it depends on this.


Both the folder and file names contain the same character and have no problem downloading.


Offline rejetto

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

Offline DNA1010

  • Occasional poster
  • *
    • Posts: 10
    • View Profile
you missed my question

I'm using English WHS with Tradition Chinese enabled in unicode support. Running HFS as service.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
being your Windows an english version may be the problem (related to the limited utf-8 support of HFS).
Please describe your virtual file system, only the branch related to this problematic folder.