codes/custom content for video widget
Hi!
I hope someone can help me a little bit on my way. I am not sure if I am even asking this in the right area so just let me know.
I wonder if anyone has any experience with setting up a widget on their forum that rotates videos from a youtube channel and uses the RSS feed to rotate the most recent additions.
We have a youtube channel and every week support videos are added to this channel. We want to make users aware of the new videos but rotating them in a widget.
An alternative is ofcourse to upload them and select the videos to rotate, I might be able to do that by using the code we currently have for images but the least maintenance the better...hence rotating based on a rss feed would be great.
If it helps, the code we use for rotating images is a follows, I am sure it's not 100% clean ( I did not develop this code and it seems the bottom piece is actually not an active part of the widget) but maybe it gives an idea.
Thanks for providing help...in any form or kind :-)
Cheers
Wendu
------------------------------------------------------------------------------------------------------------------------------------------
<!-- Begin rotating promo jjavascript S. Stonehocker 11/13/2008 -->
<script type="text/javascript" language="JavaScript">
var maxPromoNo = 6;
var promoNo;
var hpPromo = new Array();
hpPromo[0] = '<a href=" http://h30478.www3.hp.com/t5/Nouvelles-de-la-communaut%C3%A9/L-EXPERT-DAY/td-p/71555"><img src/html/assets/ExpertDay_French-Orange.JPG " border=" border="0"></a>';
hpPromo[1] = '<a href="http://h30478.www3.hp.com/t5/Annonces/Acc%C3%A9dez-au-Forum-des-utilisateurs-HP-sur-votre-mobile/td-p/40229"><img src="/html/assets/2012_01QR_Code.JPG" border="0"></a>';
hpPromo[2] = '<a href="http://h30478.www3.hp.com/t5/Nouvelles-de-la-communaut%C3%A9/L-EXPERT-DAY/td-p/71555"><img src="/html/assets/ExpertDay - Blue - 239x150 - French.jpg" border="0"></a>';
hpPromo[3] = '<a href="http://h30478.www3.hp.com/t5/Annonces/Acc%C3%A9dez-au-Forum-des-utilisateurs-HP-sur-votre-mobile/td-p/40229"><img src="/html/assets/2012_01QR_Code.JPG" border="0"></a>';
hpPromo[4] = '<a href=" http://www.youtube.com/HPSupportFrancais"><img src="/html/assets/2012_01_Youtube.JPG" border="0"></a>';
hpPromo[5] = '<a href=" http://www.youtube.com/HPSupportFrancais"><img src="/html/assets/2012_01_Youtube.JPG" border="0"></a>';
hpPromo[6] = '<a href=" http://h30478.www3.hp.com/t5/Le-Meilleur-de-la-Communaut%C3%A9/LE-MEILLEUR-DU-MOIS-Mai-2012/ba-p/142618"><img src="/html/assets/5_BOTM_French_Mai.jpg" border="0"></a>';
</script>
<!-- End -->
<script type="text/javascript" language="JavaScript">
// Store URLs in an array. These must match the elements in the
// pull-down. In this example, the first element is the pull-down
// says 'Select a URL', thus mySelect_URLs[0] contains an empty
// string. Note in this case that the name of the URL array
// is mapped to that of the Menu. This is assumed in the
// function below.
var mySelect_URLs = new Array();
mySelect_URLs[0] = "";
mySelect_URLs[1] = "http://www.communities.hp.com/securitysoftware/";
mySelect_URLs[2] = "http://forums12.itrc.hp.com/service/forums/home.do";
mySelect_URLs[3]="http://forums13.itrc.hp.com/service/forums/bizsupport/home.do?forumId=2";
mySelect_URLs[4] = "http://www.communities.hp.com/online/";
mySelect_URLs[5] = "http://www.thenextbench.com/";
// NOTE: the jumpToURL function is included automatically if hpweb_utilities.js is included
</script>
<div align="center">
<!-- Begin code for rotating promos S. Stonehocker 11/13/2008 -->
<SCRIPT LANGUAGE="JavaScript">
promoNo = Math.round(Math.random() * maxPromoNo);
document.write(hpPromo[promoNo]);
</script>
<!-- End -->
</div>