Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m relieved

Using SublimeVideo Playlist in Joomla CMS

First I have dabbled extensively with SublimeVideo Playlist example and just sharing my findings.

The best way to add the recommended JS and CSS scripts for the SV Playlist is to use Joomla's JHTML object. Directly inserting (or embedding) the requisite scripts and styles onto the template's index.php is calling for trouble. Joomla's GZIP and caching APIs will strip your tags into a troublesome .PHP file.

Yes, this automated Joomla action saves server CPU sweat but troublesome for web developers, nonetheless. Joomla CMS (on the server end) will build and form the web page fully when requested before any output is returned to the client browsers.

Joomla and RocketTheme templates users: Even though the Gantry framework is a brilliant work-of-art I wouldn't use their API unless you know the ins and outs of Gantry. Gantry is still dependent upon Joomla's framework so why not use that instead?

To be a well-formed XHTML document, embedding styles and scripts must happen within the confines of the ... section of the document. One would naturally think that pasting the and

** Refer to Joomla Wiki at: for more information

But wait you say. Where is the SV playlist JS? Well, you can't use JHTML for that since JHTML will embed that JS in the section and we don't want that. It will generate an error (I use Chrome and FF web developer plugin tool) and will stop processing successive JS scripts and your page source will look a jumbled spaghetti when that happens.

Also, the SV playlist javascript will look for the instance of "sublimevideo" in the DOM as soon as it has loaded. If its placed before the elements, it will execute and look for "sublimevideo" object in the DOM and it doesn't exist yet. It will generate a JS error and the playlist may/may not play correctly as designed although the playlist CSS may render it correctly on screen.

So, place the playlist JS at the end of the document but still within the section. I have tried several JS embed/insert modules in Joomla but I still have to find one that works without any trace of page source generation errors.

The one that worked for me is to aggregate (pasting) the JS code directly at the bottom of the section:

This forces Joomla to output the JS at the bottom of the document (which is a requirement of the playlist) without stripping out the elements have rendered in the DOM.

I know that is not very elegant way and I still have to test other plugins and modules to make this more beautiful. Modding the template's index.php is just calling for trouble and not future-proofing your site I might add.

I Hope that helps someone..
1 person likes
this idea