I have built a simple video gallery for my site - using divs and HTML5 stuff - and it works really well for showing videos that I drop onto my web server in the /video/ directory. Basically, I define the video that will play, it's height, width, and a caption, by hard coding the HTML, and reloading the page. In the code snippet below are 3 example videos:
<div class="video_gallery_container">
<p><a class="videoLink" videowidth="1280" videoheight="720" videofile="myfirstvideo" videocaption="video1caption" ></a>
<a class="videoLink" videowidth="1280" videoheight="720" videofile="mysecondvideo" videocaption="second video caption" ></a>
<a class="videoLink" videowidth="400" videoheight="250" videofile="video3" videocaption="woohoo"></a>
</p>
<div class="clear_both"></div>
</div>
It all works really well. Apart from it's not dynamic. What I want to prevent is the situation where the user(s) of my site change the videos, and I have to manually come in and update the links.
I can't think of a good clean way that's easy to implement, whereby they drop the new files into the directory, then access a management page, hit a button to regenerate the links, and insert the newly created HTML into the main page.
Any of you web-heads got any ideas on how this could be achieved? I should add that this is for a closed intranet (not public internet facing) and my server is an IIS server.
Posts
1) Code something from scratch that will do this using a server-side scripting technology such as ASP, .NET, PHP, or Ruby.
2) Adopt a CMS (content management system) that has this functionality already, and learn just enough PHP or Ruby to tweak that CMS.
Most of the time, #2 is your better option.
#1 is fine if:
- You only want your site to perform this one task.
- You will never want to expand your site to perform more than this one task.
- If you ever leave this job, you don't expect the person coming after you to ever want to expand this site to perform more than this one task.
- The site is always going to be for internal use only, and never ever exposed to the Internet.
If you choose to do #2, the big two CMS options are Wordpress and Drupal. Both are written in PHP. Some other reasonable alternatives are Concrete5, Refinery, and Radiant.
If you have a license for it (which you might, if you already have Microsoft server software), then you can also give Sharepoint a try. (Personally, I despise Sharepoint, but people out there seem to love it... for some reason...)
Of these, Wordpress is the simplest to get started and the most popular. The workflow to get started would look something like this:
Install a SQL database (MySQL or Microsoft SQL Server Express).
Install PHP.
Install Wordpress.
Find a plugin for your specific task. One of the more popular relevant plugins is WP Video Posts.
Find a custom theme that you like. Tweak that theme a little to your taste.
You can find more detailed instructions for each step via the Googles.
the "no true scotch man" fallacy.