itwasntme
User
| Posts: 6 |   |
|
Hulu Template - 2009/02/02 20:21
I have a client who wanted to show some Hulu videos on his site, so I created a simple template to do so. In case there are others who would like to use it, I thought I would share it here.
The trick to using it is finding the correct identifier for the video. The easiest way is to browse to the video you want to use on the Hulu site, then click the "Embed" link that appears over the top right of the video when you hover your cursor over it. Look for the part of the <embed> tag that looks like this:
| Code: | <embed src="http://www.hulu.com/embed/XIngqVLTN0NwQddjbuldNg" type="application/x-shockwave-flash" allowFullScreen="true" width="512" height="296"></embed>
|
The video ID is the part after the "embed/" at the end of the src attribute. In this case, the Hulu ID would be "XIngqVLTN0NwQddjbuldNg."
To use the template, copy the attached file, hulu.tmpl, to your components/com_mgmedia2/templates file.
Add the following documentation to the components/com_mgmedia2/templates/Templates-Readme.html file if you would like, though it's not necessary to use the template:
| Code: | <h3>hulu player</h3>
<h4>Parameters:</h4>
<ul>
<li>type (mandatory, [hulu])</li>
<li>huluid (mandatory)</li>
<li>autoplay (optional, [true,false], default=see mgmediabot configuration)</li>
<li>wmode (optional, default=transparent)</li>
<li>width (optional, default=512)</li>
<li>height (optional, default=296)</li>
<li><a href="#moreparams">more parameters</a></li>
</ul>
<h4>Usage:</h4>
<pre style="width: 500px; border: 1px dotted black">
{mgmediabot2}type=hulu|huluid=12345{/mgmediabot2}
{mgmediabot2}type=hulu|huluid=12345|lightbox=true|lightboxcaption=My Video|lightboxpreview=images/stories/myvideothumb.jpg|width=512|height=296{/mgmediabot2}
{mgmediabot2}type=hulu|huluid=12345|popup=true|popupcaption=My Video|popuppreview=images/stories/myvideothumb.jpg|width=512|height=296{/mgmediabot2}
</pre>
| File Attachment:File name: hulu.tmplFile size:1323 bytes
|