Looking for a way to pragmatically load youtube video’s onto your website within your wordpress post? Here’s a old google AJAX search with video bar script. I’ll update this once I figure out how to get the script to pull in the keywords from your article. Anticipated April 2013
Right now the script looks at predefined keywords you define within the script. In the script below we use the keywords “Austin Johnson Tennessee football”,”Austin Johnson”,”Tennessee football” – all you do is replace them with your desired Video keywords and you’re good to go.
[code]
<!– ++Begin Video Bar Wizard Generated Code++ –>
<!– // Created with a Google AJAX Search Wizard // http://code.google.com/apis/ajaxsearch/wizards.html –>
<!– // The Following div element will end up holding the actual videobar. // You can place this anywhere on your page. –></pre>
<div id="videoBar-bar"><span style="color: #676767; font-size: 11px; margin: 10px; padding: 4px;">Loading…</span></div>
<pre>
<!– Ajax Search Api and Stylesheet // Note: If you are already using the AJAX Search API, then do not include it // or its stylesheet again –>
<script type="text/javascript" src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-vbw"></script></pre>
<style type="text/css"><!–
@import url("http://www.google.com/uds/css/gsearch.css");
–></style>
<pre>
<!– Video Bar Code and Stylesheet –><script type="text/javascript">// <![CDATA[
window._uds_vbw_donotrepair = true;
// ]]></script>
<script type="text/javascript" src="http://www.google.com/uds/solutions/videobar/gsvideobar.js?mode=new"></script></pre>
<style type="text/css"><!–
@import url("http://www.google.com/uds/solutions/videobar/gsvideobar.css");
–></style>
<pre>
</pre>
<style type="text/css"><!–
.playerInnerBox_gsvb .player_gsvb {
width : 445px;
height : 364px;
}
–></style>
<pre>
<script type="text/javascript">// <![CDATA[
function LoadVideoBar() {
var videoBar;
var options = {
largeResultSet : !true,
horizontal : true,
autoExecuteList : {
cycleTime : GSvideoBar.CYCLE_TIME_MEDIUM,
cycleMode : GSvideoBar.CYCLE_MODE_LINEAR,
executeList : ["Austin Johnson Tennessee football","Austin Johnson","Tennessee football"]
}
}
videoBar = new GSvideoBar(document.getElementById("videoBar-bar"),
GSvideoBar.PLAYER_ROOT_FLOATING,
options);
}
// arrange for this function to be called during body.onload
// event processing
GSearch.setOnLoadCallback(LoadVideoBar);
// ]]></script>
<!– ++End Video Bar Wizard Generated Code++ –>[/code]
Here’s another one to pull in an RSS feed. Not tested.
[code]<script type="text/javascript" src="http://www.rss2java.com/feed.php?number=0&date=1&desc=1&html=2&new=1&url=http%3A%2F%2Fnews.google.com%2Fnews%3Fsvnum%3D10%26as_scoring%3Dn%26hl%3Den%26tab%3Dwn%26ned%3Dus%26q%3D%2522Austin%2BJohnson%2522%26ie%3DUTF-8%26output%3Drss" language="Javascript"></script>
<noscript><a href=’http://www.rss2java.com/’ target=_blank>RSS2JAVA</a></noscript>
[/code]
ref 1