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 - Mijo

Pages: 1
1
F.A.Q.s / Re: .m3u or rss templates for HFS (customize MIME needed)
« on: December 17, 2010, 05:19:59 PM »
Other small modifications:

Code: [Select]
{.if|{.=|{.urlvar|filetype.}|m3u.}|#EXTM3U.}
%files%

[style]

[files]
{.if|{.=|{.urlvar|filetype.}|m3u.}|{:{.mime|audio/x-mpegurl.}:}.}
%list%

[file.mp3 = file.mpeg = file.mp4 = file.wmv = file.wma = file.avi = file.flac = file.wav = file.ogg = file.ogm = file.mkv = file.mka]
%item-full-url%

[folder]
%item-name%/

It only includes media files, but probably the list is far from complete.
%item-full-url% returns the correct absolute link, but it is not listed here: http://www.rejetto.com/wiki/index.php/HFS:_Template_symbols.

Mijo

2
F.A.Q.s / Re: .m3u or rss templates for HFS (customize MIME needed)
« on: October 19, 2010, 08:46:40 AM »
I made some modifications, to support both normal lists and m3u files.

I added conditional statements which recognize a new GET parameter "filetype". If it is there, and its value is "m3u", then a .m3u file is generated.

filelist.tpl
Code: [Select]
{.if|{.=|{.urlvar|filetype.}|m3u.}|#EXTM3U.}
%files%

[style]

[files]
{.if|{.=|{.urlvar|filetype.}|m3u.}|{:{.mime|audio/x-mpegurl.}:}.}
%list%

[file]
%item-url%

[folder]
%item-name%/

Then in the hfs.tpl add a line like this in the menu's div. I used it right after the normal File list.

hfs.tpl
Code: [Select]
<li class="last"><a href="{.get|url|tpl=list|filetype=m3u|folders-filter=\|recursive.}">File list (.M3U)</a></li>
Enjoy!
Mijo

Pages: 1