YouTube feeds and e107 A while ago I posted about working on integrating feeds into e107, beginning with the
Amazon API. I have yet to progress my work with Amazon web services, however I have been experimenting with adding new feeds into my e107 affiliate plugin. Youtube has always provided an API to allow development against their content but in the post Google phase this has really taken off.
The ultimate goal will be to add YouTube driven uploads and content directly into wistop.com. But for now I have created a small shortcode to simply display and play the video!
[youtube]Xlh8gSF_hhE[/youtube]
The shortcode accepts a single parameter - the video code that we all know and love. It then passes this code over to the affiliate plugin which goes away, gets the details, and then maps this to the template.
e107 YouTube BBCode:
Scriptaculous The other exciting part of this excerise is the opportunity to experiment with
scriptaculous. This is a handy set of functions that very very easily enables web developers to add flashy ajax style effects to their website. The chaps over at the e107
free source site have already integrated the scripts into their plugins. Initially with their lightbox plugin and a more robust solution was introduced with their widgets plugin. In due course I will be upgrading this site to make use of this.
Now you see it, now you don't! Replacing the thumbnail with the full video became very easy thanks to the
appear function.
<div id="appear_demo" style="display:none; width:80px; height:80px; background:#c2defb; border:1px solid #333;"></div><ul> <li><a href="#" onclick="$('appear_demo').appear(); return false;">Click here for a demo!</a></li> <li><a href="#" onclick="$('appear_demo').hide(); return false;">Reset</a></li></ul>
The advantage of this over the e107 expandit() function is that it allows full control over which elements you wish to show and which you wish to hide. So one click hides the thumbnail and shows the video.
Web 2.0 Ajax and e107 Having seen how easy it is to use the functions of scriptaculous I am now starting to think about all the different uses for it around the wistop.com site or e107 plugins. It is also exciting to know that close integration with these scripts is on the
e107 roadmap thus ensuring full support in the long awaited e107 0.8 release.
Rest assured, any cool new ideas, hints and tips will be documented in our blog.
Posted by
wistop on Wednesday 01 October 2008 - 10:19:08