The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Google/Youtube AJAX code

4 posters

Go down

Google/Youtube AJAX code Empty Google/Youtube AJAX code

Post by MAHAM September 24th 2008, 9:53 am

Hi guys and gals. Im a new administrator and Im having a few problems.

Ive been messin around with the video bars and news bars through google. I did a search and found nothing here, which I was surprised. Youtube/google API's are awesome. I can get the codes to work on HTML pages but what i want is for the codes to work in the widget HTML. ]

I host a football fan site and I also wanted to put a news bar in my homepage message. this is the code that i have. when i put it where i want, i just see the word 'loading...'.
Code:

<!-- ++Begin News 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 newsbar.
  // You can place this anywhere on your page.
  -->
  <div id="newsBar-bar">
    <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span>
  </div>

  <!-- 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 src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-nbw"
    type="text/javascript"></script>
  <style type="text/css">
    @import url("http://www.google.com/uds/css/gsearch.css");
  </style>

  <!-- News Bar Code and Stylesheet -->
  <script type="text/javascript">
    window._uds_nbw_donotrepair = true;
  </script>
  <script src="http://www.google.com/uds/solutions/newsbar/gsnewsbar.js?mode=new"
    type="text/javascript"></script>
  <style type="text/css">
    @import url("http://www.google.com/uds/solutions/newsbar/gsnewsbar.css");
  </style>

  <script type="text/javascript">
    function LoadNewsBar() {
      var newsBar;
      var options = {
        largeResultSet : false,
        title : "In the news",
        horizontal : true,
        autoExecuteList : {
          executeList : ["NFL"]
        }
      }

      newsBar = new GSnewsBar(document.getElementById("newsBar-bar"), options);
    }
    // arrange for this function to be called during body.onload
    // event processing
    GSearch.setOnLoadCallback(LoadNewsBar);
  </script>
<!-- ++End News Bar Wizard Generated Code++ -->


Last edited by MAHAM on September 25th 2008, 6:18 am; edited 2 times in total
MAHAM
MAHAM
New Member

Male Posts : 22
Reputation : 0
Language : English

http://coltsuniverse.forumotion.net/index.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by MAHAM September 24th 2008, 10:06 am

here is my other code for custom youtube videos and search on my page:

Code:
<!-- ++Begin Video Search Control 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 Video Search Control.
  // You can place this anywhere on your page.
  -->
  <div id="videoControl">
    <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span>
  </div>

  <!-- Ajax Search Api and Stylesheet
  // Note: If you are already using the AJAX Search API, then do not include it
  //      or its stylesheet again
  //
  // The Key Embedded in the following script tag is designed to work with
  // the following site:
  // http://coltsuniverse.forumotion.net/index.htm
  -->
  <script src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-vsw&key=ABQIAAAAPFVewlfAvzqSTXovBNjZDRTtk47StttYR7rVwtJzmlJ0lnbyORTq9TWTTsqqMT6dj47r9wBZLt6a-g"
    type="text/javascript"></script>
  <style type="text/css">
    @import url("http://www.google.com/uds/css/gsearch.css");
  </style>

  <!-- Video Search Control and Stylesheet -->
  <script type="text/javascript">
    window._uds_vsw_donotrepair = true;
  </script>
  <script src="http://www.google.com/uds/solutions/videosearch/gsvideosearch.js?mode=new"
    type="text/javascript"></script>
  <style type="text/css">
    @import url("http://www.google.com/uds/solutions/videosearch/gsvideosearch.css");
  </style>

  <script type="text/javascript">
    function LoadVideoSearchControl() {
      var options = {
        twoRowMode : true
      };
      var videoSearch = new GSvideoSearchControl(
                              document.getElementById("videoControl"),
                              [{ query : "marvin harrison"}, { query : "peyton manning"}, { query : "dwight freeney"}, { query : "tony dungy"}, { query : "bob sanders"}, { query : "reggie wayne"}, { query : "colts"}, { query : "dallas clark"}, { query : "joseph addai"}, { query : "mike hart"}, { query : "jamie silva"}, { query : "robert mathis"}, { query : "jeff saturday"}, { query : "XLI"}, { query : "anthony gozalez"}, { query : "gary brackett"}], null, null, options);
    }
    // arrange for this function to be called during body.onload
    // event processing
    GSearch.setOnLoadCallback(LoadVideoSearchControl);
  </script>
<!-- --End Video Search Control Wizard Generated Code-- -->[code]
this is how it looks now:
http://coltsuniverse.forumotion.net/Colts-Youtube-h6.html

my other video bar looks like it would fit ideal in a widget on the forum:
http://coltsuniverse.forumotion.net/You-Tube-h4.htm

All 3 codes say 'loading' when in a widget, and my news bar says 'loading'. The news bar, again, I tried to place in the greeting.

Hopefuly someone can help me with an EZ~fix.
Thanks in Advance
Hello
MAHAM
MAHAM
New Member

Male Posts : 22
Reputation : 0
Language : English

http://coltsuniverse.forumotion.net/index.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by RCMZ September 24th 2008, 11:49 am

yea, COLTS, u from indiana?

and im not sure what ajax is, is it like an embed, but updates as vids are uploaded?
avatar
RCMZ
Forumember

Posts : 283
Reputation : 0
Language : English

http://mytestforum.activebb.net/portal.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by MAHAM September 24th 2008, 10:12 pm

RCMZ wrote:yea, COLTS, u from indiana?

and im not sure what ajax is, is it like an embed, but updates as vids are uploaded?

Yeah, Im from Indy although I dont live there now.

It is an embed that auto updateds. I think the data one uses an rss feed and the youtube uses preset search options i entered. The code was generated for me, I just had to adjust the presets. Theres much more that you can do too. Like I said, everything shows on the HTML pages i made, but Id like to put the code elsewhwere.

Any ideas?
MAHAM
MAHAM
New Member

Male Posts : 22
Reputation : 0
Language : English

http://coltsuniverse.forumotion.net/index.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by The Black Rose September 25th 2008, 2:10 am

so wait is there some how i can get youtube on my site?


oh btw; go bears! isnt it funny how you beat us in the super bowl when after the lights go out and we come back and beat you in a game? Mr. Green
The Black Rose
The Black Rose
Forumember

Male Posts : 28
Reputation : 0
Language : English
Location : Behind you

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by MAHAM September 25th 2008, 5:48 am

The Black Rose wrote:so wait is there some how i can get youtube on my site?


oh btw; go bears! isnt it funny how you beat us in the super bowl when after the lights go out and we come back and beat you in a game? Mr. Green

I can get it for the HTML pages. Look at my links above. You can use my second code and change the search options if you like. *edit you have to register a for site code-free*
Otherwise go to youtube/scroll to the bottom of the page/click on 'developer api's' to create your own code.

Yes, the Bears beat the Colts in 'a' game...not 'the' game Very good


...and yes, it is funny that Da' Bears actually won a game after the mess of a season you guys had last year tongue Can't you guys just stick with Grossman? HA!

Back to the issue, can someone help me out? I know someone can.
Thanks in Advance
MAHAM
MAHAM
New Member

Male Posts : 22
Reputation : 0
Language : English

http://coltsuniverse.forumotion.net/index.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by MAHAM September 25th 2008, 7:39 pm

fufufu
MAHAM
MAHAM
New Member

Male Posts : 22
Reputation : 0
Language : English

http://coltsuniverse.forumotion.net/index.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by xxxG September 25th 2008, 8:07 pm

I think that is not AJAX code.
avatar
xxxG
New Member

Posts : 21
Reputation : 0
Language : MK

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by MAHAM September 26th 2008, 7:23 am

xxxG wrote:I think that is not AJAX code.
Im not sure.
Someone can figure it out. This is a good site for all of us:

http://code.google.com/apis/ajaxsearch/



cool-blue
MAHAM
MAHAM
New Member

Male Posts : 22
Reputation : 0
Language : English

http://coltsuniverse.forumotion.net/index.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by RCMZ September 26th 2008, 7:41 am

alright, i got good news for you Wink

for google ajax's, here is my code, which is an example. better yet, ill do it for your site. test it out, Wink


Code:
<div id="videoControl">    <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span>  </div>  <script src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-vsw&key=ABQIAAAAPFVewlfAvzqSTXovBNjZDRTtk47StttYR7rVwtJzmlJ0lnbyORTq9TWTTsqqMT6dj47r9wBZLt6a-g"    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_vsw_donotrepair = true;  </script>  <script src="http://www.google.com/uds/solutions/videosearch/gsvideosearch.js?mode=new"    type="text/javascript"></script>  <style type="text/css">    @import url("http://www.google.com/uds/solutions/videosearch/gsvideosearch.css");  </style>  <script type="text/javascript">    function LoadVideoSearchControl() {      var options = {        twoRowMode : true      };      var videoSearch = new GSvideoSearchControl(                              document.getElementById("videoControl"),                              [{ query : "marvin harrison"}, { query : "peyton manning"}, { query : "dwight freeney"}, { query : "tony dungy"}, { query : "bob sanders"}, { query : "reggie wayne"}, { query : "colts"}, { query : "dallas clark"}, { query : "joseph addai"}, { query : "mike hart"}, { query : "jamie silva"}, { query : "robert mathis"}, { query : "jeff saturday"}, { query : "XLI"}, { query : "anthony gozalez"}, { query : "gary brackett"}], null, null, options);    }      GSearch.setOnLoadCallback(LoadVideoSearchControl);  </script>
avatar
RCMZ
Forumember

Posts : 283
Reputation : 0
Language : English

http://mytestforum.activebb.net/portal.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by MAHAM September 26th 2008, 7:58 am

banana
MAHAM
MAHAM
New Member

Male Posts : 22
Reputation : 0
Language : English

http://coltsuniverse.forumotion.net/index.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by RCMZ September 26th 2008, 8:05 am

pretty weird, but all the "information, of what things are" type things, needed to be removed, than it worked fine. enjoy Wink
avatar
RCMZ
Forumember

Posts : 283
Reputation : 0
Language : English

http://mytestforum.activebb.net/portal.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by MAHAM September 26th 2008, 8:12 am

RCMZ wrote:pretty weird, but all the "information, of what things are" type things, needed to be removed, than it worked fine. enjoy Wink

Youre Awesome. I still have to adjust a few things but Thanks thumright


Last edited by MAHAM on September 26th 2008, 8:14 am; edited 1 time in total
MAHAM
MAHAM
New Member

Male Posts : 22
Reputation : 0
Language : English

http://coltsuniverse.forumotion.net/index.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by RCMZ September 26th 2008, 8:14 am

no problem, let your headaches disappear, mods can i change my username to tylenol? lol!
avatar
RCMZ
Forumember

Posts : 283
Reputation : 0
Language : English

http://mytestforum.activebb.net/portal.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by MAHAM September 26th 2008, 8:50 am

I put the new widget I made in my Portal and it looks sweet!

A horizontal video bar would fit perfect in a widget on the side of the forum.
This is the horizontal video bar im workin on.

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.
  -->
  <div id="videoBar-bar">
    <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span>
  </div>

  <!-- 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 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>

  <!-- Video Bar Code and Stylesheet -->
  <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 : ["marvin Harrison","peyton manning","bobsanders","dwight freeney","mike hart","jeff saturday","reggie wayne","anthony gonzalez","joseph addai","colts"]
        }
      }

    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++ -->

I edited out the 'where things go' script yet I cant get it to work. Can you see something I forgot? Whenever you have time.

Code:
<div id="videoBar-bar">    <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span>  </div>  <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 : ["marvin Harrison","peyton manning","bobsanders","dwight freeney","colts"]        }      }    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>


Last edited by MAHAM on September 26th 2008, 9:22 am; edited 2 times in total (Reason for editing : missed something)
MAHAM
MAHAM
New Member

Male Posts : 22
Reputation : 0
Language : English

http://coltsuniverse.forumotion.net/index.htm

Back to top Go down

Google/Youtube AJAX code Empty Re: Google/Youtube AJAX code

Post by RCMZ September 26th 2008, 9:33 am

edit: im testing it and messing with it, i found 1 part you missed, but still rejecting it.

hmm, not sure why this one isnt working. its rejecting something in the list.
avatar
RCMZ
Forumember

Posts : 283
Reputation : 0
Language : English

http://mytestforum.activebb.net/portal.htm

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum