Friday, March 09, 2007

JOOMLA -Video


Let's use an example with videos in particular. Don't worry about audio/music files. The procedure is the same!
First we setup a "video folder" that we store all our videos inside our Joomla! website. By default this folder is called "videos" and resides within images/stories. So the full path to this folder would be images/stories/videos.Say you uploaded 2 videos called trip_to_paris.flv and mariasparty.wmv. You open up a new or existing content item and simply add {flv}trip_to_paris{/flv} and {wmv}mariasparty{/wmv}!! Couldn't be more simple, right?

Let's have a look at what we did here. We have 2 video files, one is flv type, the other is wmv. We added each video to our content by inserting a "mambot string" of this form:

{video_file_type}video_file_name{/video_file_type}

Notice that we did not include the "video" folder in the mambot strings in the examples above, cause this is already set from the plugin's parameters (on the right of this page). But what do you do when you want to categorize videos into subfolders, within the "master" video folder? Say we wanted to have 2 subfolders on the previous example, "holidays" and "fun", on which we would put trip_to_paris.flv and mariasparty.wmv respectively. Then the mambot strings inserted into our content items would simply be of this form:

{video_file_type}subfolder/video_file_name{/video_file_type}

So the above files would be inserted with the strings:

{flv}holidays/trip_to_paris{/flv} and {wmv}fun/mariasparty{/wmv}
When embedding files on our own server, like FLVs or MP3s, we never use the file extension (like .flv or .mp3 respectively) in the AllVideos bot strings! So we just use the filename alone!


See how easy it is?
If the case was with audio/music files, we would use something like {mp3}nadasurf-popular{/mp3} or {wma}marilyn_manson_idontlikethedrugs(butthedrugslikeme){/wma}.

Imagine now that people usually stick to one format when "playing around" with videos (or audio), so it's easy for you to train others (= your customers or friends!) to easily insert video or audio content inside Joomla! content items.
Please note that when you want to stream files hosted on other servers than yours, you must use a bot string like {wmvremote}http://www.remoteserver.com/folder/myvideo.wmv{/wmvremote} or {mp3remote}http://www.remoteserver.com/somedirectory/file.mp3{/mp3remote}. You simply add "remote" after the filetype and use full paths -links- to the files hosted on other servers (including file extensions). Simple, right?

No comments:

Post a Comment