rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: DNA1010 on March 01, 2011, 04:46:49 AM

Title: Need some help on some codes
Post by: DNA1010 on March 01, 2011, 04:46:49 AM
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
Title: Re: Need some help on some codes
Post by: rejetto on March 01, 2011, 03:50:02 PM
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.}.}"/>
Title: Re: Need some help on some codes
Post by: DNA1010 on March 01, 2011, 09:18:24 PM
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

Title: Re: Need some help on some codes
Post by: rejetto on March 13, 2011, 02:01:23 PM
that's 會
do you have a japanese Windows or what?
HFS support for unicode is limited, and it depends on this.
Title: Re: Need some help on some codes
Post by: DNA1010 on March 16, 2011, 12:36:41 AM
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.
Title: Re: Need some help on some codes
Post by: rejetto on March 17, 2011, 05:20:28 PM
you missed my question
Title: Re: Need some help on some codes
Post by: DNA1010 on March 18, 2011, 12:44:52 AM
you missed my question

I'm using English WHS with Tradition Chinese enabled in unicode support. Running HFS as service.
Title: Re: Need some help on some codes
Post by: rejetto on March 18, 2011, 10:19:52 AM
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.