Author Topic: FR: can we get [file.ext] section inside the filelist.tpl ???  (Read 1739 times)

0 Members and 1 Guest are viewing this topic.

Offline ledufe

  • Tireless poster
  • ****
  • Posts: 272
  • LEandro DUpont FErreira
    • View Profile
    • http://ledufe.no-ip.info:2222
FR: can we get [file.ext] section inside the filelist.tpl ???
« on: December 25, 2006, 08:29:56 AM »
it would solve one issue with many flash files and other things like rss feeds if we could get this
read and see if i am making myself understood....
sorry again my poor english

ledufe, thanks for that fantastic addon!
i did not make it, i just figure out how to use it with the hfs
also i got another cool test that may fit in your needs

I have one more question. Is there a way to make it to relay an internet radio stream? I mean this: I upload an .m3u file somewhere on the server and that .m3u is the one of the chosen radiostation. And is there a way to make it play?
it is not a m3u, but it is a cool combination of hfs+xml+flash
and now it plays not only mp3 or flv videos, but MP3/FLV/JPG/SWF/PNG/GIF
here the official website of the player
http://www.jeroenwijering.com/?item=Flash_Media_Player
and here is my test as much explayned as i can

first
i make it as this, on my root folder of my hfs i create a file called "filelist.tpl" and inside this file:
Code: [Select]
%files%

[files]
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
%list%
</trackList>
</playlist>

[file]
<track>
<title>%item-name%</title>
<creator>HttpFileServer %version%</creator>
<location>http://%host%%encoded-folder%%item-url%</location>
</track>

and again on the root folder of my hfs i put the file mediaplayer.swf

and also i inserted this code on the hfs template to call the swf and passing the argumment to load the playlist in xml
i putted it on the first section, but it could be inserted in a pop-up window to make it more attractive and minus invasive...

Code: [Select]
<embed src="/mediaplayer.swf" width="320" height="240" bgcolor="#FFFFFF"
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"
flashvars="file=%encoded-folder%~files.lst.xml&showdigits=true&autostart=false" />

and the playlist that is loaded is a xml file that is auto generated by the hfs if the file list.tpl is as as the one above...

but i must say this is only one of the many ways to use the hfs and some flash player using the filelist.tpl
and this technic only will work for especific folder with that type of files, at least until the

but if there is another file type on the folder it hangs, but is a new way to get a media player without javascript...

the filelist.tpl would be like this, to only be applyed to the right kind of files:
Code: [Select]
%files%

[files]
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
%list%
</trackList>
</playlist>

[file.mp3]
<track>
<title>%item-name%</title>
<creator>HttpFileServer %version%</creator>
<location>http://%host%%encoded-folder%%item-url%</location>
</track>

[file.flv]
<track>
<title>%item-name%</title>
<creator>HttpFileServer %version%</creator>
<location>http://%host%%encoded-folder%%item-url%</location>
</track>

[file.jpg]
<track>
<title>%item-name%</title>
<creator>HttpFileServer %version%</creator>
<location>http://%host%%encoded-folder%%item-url%</location>
</track>

[file.swf]
<track>
<title>%item-name%</title>
<creator>HttpFileServer %version%</creator>
<location>http://%host%%encoded-folder%%item-url%</location>
</track>

[file.png]
<track>
<title>%item-name%</title>
<creator>HttpFileServer %version%</creator>
<location>http://%host%%encoded-folder%%item-url%</location>
</track>

[file.gif]
<track>
<title>%item-name%</title>
<creator>HttpFileServer %version%</creator>
<location>http://%host%%encoded-folder%%item-url%</location>
</track>

[attachment deleted by admin]
« Last Edit: December 25, 2006, 08:32:36 AM by ledufe »
<<LeDuFe>>

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12945
    • View Profile
Re: FR: can we get [file.ext] section inside the filelist.tpl ???
« Reply #1 on: December 28, 2006, 03:15:20 AM »
the features available for filelist.tpl are the same as for the main template.
it already works!