Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

WordTube Plugin > Custom Playlist Integration

1 reply [Last post]

I had created a custom playlist media player with multiple playlist selection withthe help of @kLink and @andersen. Klink virtually gave the entire code much to my relief and andersen helped me with the playlist slection.the code can eb found here http://www.longtailvideo.com/support/forum/JavaScript-Interaction/13831/Playlist-is-not-loading-in-Custom-Playlist-s

Witht the succes of this, i went an extra bit and integrated this with the wordtube plugin to make the player dynamic. Everything woks fine i.e. adding playlist and adding files ot it. afte doing so i hardcoded the playlist links like this

<div id="category">
<a href="javascript:createPlayer('wrapper', 'placeholder1', 'player1', 'http://localhost/wpcms/wp-content/plugins/wordtube/myextractXML.php?id=1', 'true','Cat_1')"><span>Category 1</span></a>

<a href="javascript:createPlayer('wrapper', 'placeholder1', 'player1', 'http://localhost/wpcms/wp-content/plugins/wordtube/myextractXML.php?id=2', 'true','Cat_2')" id="we_offer" ><span>Category 2</span></a>

<a href="javascript:createPlayer('wrapper', 'placeholder1', 'player1', 'http://localhost/wpcms/wp-content/plugins/wordtube/myextractXML.php?id=3', 'true','Cat_3')" id="sat_patients" ><span>Category 3</span></a>
</div>

http://localhost/wpcms/wp-content/plugins/wordtube/myextractXML.php?id=1 pointing to the xml file stored in the databse. The player works perfectly.

Now if this much can be achieved, is there anyway to make the category also dynamic. Since the playlist name and value is in the database, can we fetch it and display it here.

I have embeded the media player by creating a new page template inside the wordpress. and then calling the page template when creating a media page.

Do you mean this category?<span><strong>Category 3</strong></span>

Probably just put some PHP in there to extract the category during page generaton. Either call a new script, or use a function added to myextractXML.php if it's capable of retrieving the data from the database.

Something like:<span><?php getCategory('Cat_3'); ?></span>

(Just for the record, that was andersen's separate playlist code, I just "adjusted" it a bit.)

                                                                                            :D