Page 1 of 1

listing a folders contents

Posted: Fri Jul 23, 2010 2:23 pm
by handcoded
Hi

I am in the planning stage of building a CMS MS web site for a video production company. They setup all the equipment needed for company presentations such as the lighting, sound desk, projectors etc.

I want to be able to list all of the videos on a page which when clicked can either be downloaded or played in either an external video player or if it can be achieved an embedded video player. The video files when output from a capture station are .m4v so Quicktime would be preferred.

I'm hoping there is a module that can either do this or be hacked in order to do this.
All video files will be uploaded to /uploads/company name/ of which there will be many companies and many videos.

A point in the right direction on this would be gratefully received.

Re: listing a folders contents

Posted: Fri Jul 23, 2010 2:53 pm
by NaN
Take a look in the download section and just search for download.
Thera are many modules that creates link lists from folders etc.
And i'm sure they also have categorization etc.
Here some quick search results:

Uploads
PodcastManager
List Downloads
DownloadManager
DownloadModule
File List

I never used one of these so i cannot tell you anything about wich one is the most stable one or what is the easiest to use or best functions etc.

To embed media you can use the object tag.

If you convert your video files to flv you might take a look on at the Play module (or other flv player modules).
i believe playing videos using flash seems to be the most common way than embeding them directly in the page. I don't know if flash player can handle m4v videos. You should first do some research of the most valueable flash video player and then look how to integrate it into CMSms. (this is how i would do it - i prefer JW Player or NeoLao)

Good luck for you and your project.

Re: listing a folders contents

Posted: Fri Jul 23, 2010 4:00 pm
by handcoded
Thanks for the advice  8)

I opted to use the file list module as this looked like the simplest solution. I'm just playing around at the moment but this is definitely getting me on my way.

There is a bug in the file list module on line 20 but a fix has been posted on the forge.

Thanks again

Re: listing a folders contents

Posted: Fri Jul 23, 2010 4:54 pm
by hlf
Simple is the best

Code: Select all

<?php
function smarty_function_videos($params, &$smarty) {    
    $smarty->assign('allvideos',glob('uploads/*/*.m4v'));
}
?>

Re: listing a folders contents

Posted: Fri Jul 23, 2010 5:00 pm
by calguy1000
{assign var='list' value='/uploads/*/*.m4v'|glob}

Re: listing a folders contents

Posted: Fri Jul 23, 2010 8:19 pm
by handcoded
Thanks  ;D

That is simpler. I love this software as it can always do what I want it to without causing any major headaches.