BLOG:CMS :: Support Forum

Support Forum for BLOG:CMS

You are not logged in.

#1 06.01.2008 23:09

badlee
BLOG:CMS Junior
Registered: 31.12.2007
Posts: 11

Folder content browser

I have been playing around with adding a Video library to my website, i have had luck in making the videos play, but as far as how they are presented is less than wonderful. I have played around with the idea of using the phpinclude function in a skin, but it does not appear to work for having a simple php script to display the contents of a folder containing the videos. Any suggestions on how to make something like that work?

so far this is what I have

in the skin file,

<%phpcontent(dirlist.php)%>

and a php file called dirlist.php with

<?php
if ($handle = opendir('/Movies')){
echo "<select name='selector'>";
while (false !== ($file = readdir($handle))){
if ($file != "." && $file != ".."){
echo "<option value=''>$file</option<br>";
}}
echo "</select>";}
?>

and it does nothing.

Badlee

Offline

 

#2 07.01.2008 00:31

Radek Hulán
Site Admin
From: Prague, Czech Republic
Registered: 17.03.2004
Posts: 2509
Website

Re: Folder content browser

<%phpcontent()%> will execute the content, <%phpinclude()%> will include  the file (this is what you need).


--= BLOG:CMS developer =--

Offline

 

#3 08.01.2008 20:20

statiq
BLOG:CMS Junior
From: Seattle, WA
Registered: 03.07.2007
Posts: 37
Website

Re: Folder content browser

I have not been able to get this work either, but I haven't spent enough time to fully troubleshoot it. Ideally the include *should* work, but I haven't been successful, so if you are Badlee, lets us know.


:: StatiQ is running BLOG:CMS 4.2.0 ::

Offline

 

#4 14.01.2008 22:55

badlee
BLOG:CMS Junior
Registered: 31.12.2007
Posts: 11

Re: Folder content browser

I have been sucessful with the phpcontent function. It was agrivating at first because it was not working for me, but the php script itself worked. What needed to be done was have the php output to html directly, and then all worked out very well.

Badlee

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

TOPlist