Talk:Web Frameworks - Workbook

From mi-linux
Jump to navigationJump to search

ajax you tube table - use ajax via googles API to grab you tube videos

// this goes in your layout.phtml file
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-vbw"
   type="text/javascript"></script>
 <style type="text/css">
   @import url("http://www.google.com/uds/css/gsearch.css");
 </style>
 
 
 <script type="text/javascript">
   window._uds_vbw_donotrepair = true;
 </script>
 <script src="http://www.google.com/uds/solutions/videobar/gsvideobar.js?mode=new"
   type="text/javascript"></script>
 <style type="text/css">
   @import url("http://www.google.com/uds/solutions/videobar/gsvideobar.css");
 </style>
 <style type="text/css">
   .playerInnerBox_gsvb .player_gsvb {
     width : 320px;
     height : 260px;
   }
 </style>
 <script type="text/javascript">
   function LoadVideoBar() {
   var videoBar;
   var options = {
       largeResultSet : !false,
       horizontal : false,
       autoExecuteList : {
         cycleTime : GSvideoBar.CYCLE_TIME_MEDIUM,
         cycleMode : GSvideoBar.CYCLE_MODE_LINEAR,
         executeList : ["ytfeed:most_viewed.this_week","audio equipment"]
       }
     }
   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>
//then to position it by using external CSS (remember to insert chevrons at the start and end of the div tags)
  div id="videoBar-bar"
   div

// then in your external sheet position it using something like this.. videoBar-bar {

 position:absolute;
 left:10px;
 top:200px;

}