PDA

View Full Version : Mini Mods - UKBL ~ Ajax Google News Bar on ForumHome


UKBusinessLive
18 Feb 2009, 14:22
UKBL ~ Ajax Google News Bar on ForumHome

https://www.vbulletin.org/forum/external/2009/02/43.jpg

Heres another Great Google addition for your Site, A customised Google News bar, Sits quitely under your Navbar and updates with your chosen news type.

https://www.vbulletin.org/forum/external/2009/02/56.png

This is really easy to edit and upload to your site.

First of all Download the Code in the Zip File, Open in a text editor, Notepads fine, and ...

and Find

executeList : ["Business News"]


Change the word "Business News" with any other search term associated with your site, so if your site is a Parenting Site, then you would add words associated with that.

So change the words within the brackets and save.

Then Copy and paste the entire code to the very end of your Header Template, or anywhere else on your forum.

Click Install if you use ;)

DobieGillis©
18 Feb 2009, 14:31
how do you change the test color? It's dark blue and can barely be seen on my black background?

UKBusinessLive
18 Feb 2009, 14:38
how do you change the test color? It's dark blue and can barely be seen on my black background?

Find this in the code...

<span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span>

and change the Hex Color

#676767

to something more suitable ;)

DobieGillis©
18 Feb 2009, 14:46
Find this in the code...

<span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span>

and change the Hex Color

#676767

to something more suitable ;)

I changed it to #FFFFFF which I think is white, but it still remains bluse, lol. thanks for the quick reply.

UKBusinessLive
18 Feb 2009, 14:50
I changed it to #FFFFFF which I think is white, but it still remains bluse, lol. thanks for the quick reply.

Are all the clickable links on your site Blue ?? You may need to change some of the Css in your styles template Via your Admin CP :confused:

DobieGillis©
18 Feb 2009, 15:05
Are all the clickable links on your site Blue ?? You may need to change some of the Css in your styles template Via your Admin CP :confused:

I found it but it changes every link to the color i choose. Thanks again!

UKBusinessLive
18 Feb 2009, 15:07
I found it but it changes every link to the color i choose. Thanks again!

No worries Mate, Glad to help :D

itsheinz
18 Feb 2009, 15:21
Thanks for this im using it now.It is located below my navigation.

UKBusinessLive
18 Feb 2009, 15:23
Thanks for this im using it now.It is located below my navigation. Nice :up:

DobieGillis©
18 Feb 2009, 16:26
how often do the feeds change? Still seeing the same ones over and over.

UKBusinessLive
18 Feb 2009, 18:04
how often do the feeds change? Still seeing the same ones over and over. Should change automatically on their own, Its Ajax based

puertoblack2003
18 Feb 2009, 20:56
it'll be nice if it can generate revenue:D and can we change the news to something other then Business News?

UKBusinessLive
18 Feb 2009, 21:00
it'll be nice if it can generate revenue:D and can we change the news to something other then Business News?

Sure, Its in the first post how to do it :D

First of all Download the Code in the Zip File, Open in a text editor, Notepads fine, and ...

and Find

executeList : ["Business News"]


Change the word "Business News" with any other search term associated with your site, so if your site is a Parenting Site, then you would add words associated with that.

So change the words within the brackets and save.

DobieGillis©
18 Feb 2009, 21:08
Sure, Its in the first post how to do it :D

First of all Download the Code in the Zip File, Open in a text editor, Notepads fine, and ...

and Find

executeList : ["Business News"]


Change the word "Business News" with any other search term associated with your site, so if your site is a Parenting Site, then you would add words associated with that.

So change the words within the brackets and save.


you have the coolest stuff...by far! Keep em coming.

TimberFloorAu
18 Feb 2009, 21:18
In case anyone is interested, from a css color schema point of view.

Download nattywares pixie.

Its invaluable when choosing hex colours. etc.

http://nattyware.com/pixie.php

Its free too

TimberFloorAu
18 Feb 2009, 21:29
*********************************

Could a new template be created called say : googlenewsbar

and a call to this from designated templated , using $googlenewsbar ?

Not sure if its dooable>

I see it done for navbar header etc

Could make code easier to control

NAZIA
18 Feb 2009, 22:19
nice work...

UKBusinessLive
18 Feb 2009, 22:57
nice work...

Thanks ;)

UKBusinessLive
18 Feb 2009, 22:58
*********************************

Could a new template be created called say : googlenewsbar

and a call to this from designated templated , using $googlenewsbar ?

Not sure if its dooable>

I see it done for navbar header etc

Could make code easier to control


Have a bash by all means buddy :cool:

mark370
18 Feb 2009, 23:12
Nice Addition to our Site :)

Thanks

UKBusinessLive
18 Feb 2009, 23:25
Nice Addition to our Site :)

Thanks

Cheers Mark ;)

scottny
19 Feb 2009, 03:04
Installed and working great.

thanks.

UKBusinessLive
19 Feb 2009, 05:37
Installed and working great.

thanks.

Thanks :D

Vinyljunky
19 Feb 2009, 10:55
Be great if it interacted with Google Adsense :D

UKBusinessLive
19 Feb 2009, 18:08
Be great if it interacted with Google Adsense :D

Knowing Google it will soon enough :D

concepts
21 Feb 2009, 12:00
Question, my site revolves around a variety (HipHop News, Mustangs, Chargers, Camaro's for our car club) and Modeling News... this only allows for the entry of one search.. anyway to have it pull random news based on a variety entry?

ex.. executeList : ["Ford Mustang, Dodge Charger, Chevrolet Camaro, HipHop, Urban Fashion"]

UKBusinessLive
21 Feb 2009, 16:01
Question, my site revolves around a variety (HipHop News, Mustangs, Chargers, Camaro's for our car club) and Modeling News... this only allows for the entry of one search.. anyway to have it pull random news based on a variety entry?

ex.. executeList : ["Ford Mustang, Dodge Charger, Chevrolet Camaro, HipHop, Urban Fashion"]

It should do, i'm not sure what the maximium amount of keywords you can use, This is a relatively new thing for google, I think you'll need to wait a bit longer to find out exactly what google intend on doing with this, have you tried with 2 or 3 and then try more to see if it works??? :confused:

concepts
21 Feb 2009, 16:25
ill try it shortly.. lets hope it works! I did it once, then it pulled some generic news, I will try again though.

UKBusinessLive
21 Feb 2009, 18:04
ill try it shortly.. lets hope it works! I did it once, then it pulled some generic news, I will try again though.

Thanks let me know how you got on ;)

Bmastro
22 Feb 2009, 14:03
Thanks let me know how you got on ;)

You made a very nice job!
But I would like to open a new page to read the news (I don't want that my forum's visitors go away).
I know that I have to put this in the code:

/**
* open links in a new window
*/
options = {
linkTarget : GSearch.LINK_TARGET_BLANK
};

But I don't know where.
So what have I to do? :confused:

And also I tried to change the colour of the words, but nothing happened.
Maybe this is helpful to you:
http://www.google.com/uds/solutions/newsbar/reference.html#_css
BTW, the problem of the colour is not very important compared to the one of the "new" page.

UKBusinessLive
22 Feb 2009, 14:19
You made a very nice job!
But I would like to open a new page to read the news (I don't want that my forum's visitors go away).
I know that I have to put this in the code:

/**
* open links in a new window
*/
options = {
linkTarget : GSearch.LINK_TARGET_BLANK
};

But I don't know where.
So what have I to do? :confused:

And also I tried to change the colour of the words, but nothing happened.
Maybe this is helpful to you:
http://www.google.com/uds/solutions/newsbar/reference.html#_css
BTW, the problem of the colour is not very important compared to the one of the "new" page.


if you want to make any changes to the basic code you need to register with Google for your Own API key

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

Then you can adapt and modify the code to your own needs ;)

Internetcafe
22 Feb 2009, 14:22
How can you get the links from the newsfeed to open in a new window ?

UKBusinessLive
22 Feb 2009, 14:35
How can you get the links from the newsfeed to open in a new window ?

See the post above, to edit the news feed further you need your own API key direct from google :up:

Bmastro
22 Feb 2009, 15:51
Now I have the API key, but I don't know where to type it in your code :confused:

leenster
22 Feb 2009, 21:12
Question, my site revolves around a variety (HipHop News, Mustangs, Chargers, Camaro's for our car club) and Modeling News... this only allows for the entry of one search.. anyway to have it pull random news based on a variety entry?

ex.. executeList : ["Ford Mustang, Dodge Charger, Chevrolet Camaro, HipHop, Urban Fashion"]

i think you need to do it like this...


executeList : ["Ford Mustang", "Dodge Charger", "Chevrolet Camaro", "HipHop", "Urban Fashion"]

leenster
22 Feb 2009, 21:23
How can you get the links from the newsfeed to open in a new window ?
i didnt need to get my own api key: this is how to do it....


FIND:
<script type="text/javascript">
function LoadNewsBar() {
var newsBar;
var options = {


Under that ADD : linkTarget : GSearch.LINK_TARGET_BLANK,




worked for me :)

Bmastro
22 Feb 2009, 22:21
i didnt need to get my own api key: this is how to do it....

FIND:
<script type="text/javascript">
function LoadNewsBar() {
var newsBar;
var options = {


Under that ADD : linkTarget : GSearch.LINK_TARGET_BLANK,

worked for me :)

Yes, it works!
Great!!!

SuperTaz
23 Feb 2009, 06:53
Just to let you know, you can do without this code:

// The Following div element will end up holding the actual newsbar.
// You can place this anywhere on your page.
-->


When I left it in there, it actually showed on the site along with the news. lol

zelnik
23 Feb 2009, 22:42
Great mod but is there anyway of adapting it for a live currency rate?

UKBusinessLive
24 Feb 2009, 00:30
Great mod but is there anyway of adapting it for a live currency rate?

Not that i know off :o You could use "Currancy" as a keyword, but that would just add currancy news as oppose to "Live" Rates

What you could used is a "Live" Currancy" News Ticker like this

<script src="http://www.forex-rates.biz/index.php?step=ticker_docwr&bgc=white&fntc=Blue&fsize=14px&ffam=Arial, Helvetica, sans-serif&width=100%&height=20px"></script>

add that to the end of your header ;)

zelnik
24 Feb 2009, 13:46
Not that i know off :o You could use "Currancy" as a keyword, but that would just add currancy news as oppose to "Live" Rates

What you could used is a "Live" Currancy" News Ticker like this

<script src="http://www.forex-rates.biz/index.php?step=ticker_docwr&bgc=white&fntc=Blue&fsize=14px&ffam=Arial, Helvetica, sans-serif&width=100%&height=20px"></script>

add that to the end of your header ;)

Thanks I'll give it a whirl! :)

concepts
25 Feb 2009, 11:59
i think you need to do it like this...


executeList : ["Ford Mustang", "Dodge Charger", "Chevrolet Camaro", "HipHop", "Urban Fashion"]


I will try this out and let you know, thankyou! *Crosses Fingers*

:cool:

cddw.ltd
17 Mar 2009, 15:01
If you place the bits between the <SCRIPT> tags just before your </BODY> tags at the end of the page, it prevents the small delay that appears when the "Loading...." div is created.

Hachi Go
07 Apr 2009, 12:18
Is anyone else having an issue with the search bar moving around on IE (but not Firefox)?

If you scroll the site in IE the News Bar floats down the site as you scroll down the page, but then it does return back to it's original position.

I have the code in my header template as well.

Here's the site too if you'd like to see for yourself: http://www.bengalsroar.com

Also did anyone ever figure out how to adjust the font color of the feed? It seems that if you remove the url for the gsearch.css and actually copy in the css text instead you can then alter the colors of everything except the feed portion. The feed portion is still being controled by the CSS color codes in the body css under "normal links css"

So is there a way around that?

Thanks in advance.

Prisim
26 Apr 2009, 08:01
Thankd dear...Successfully installed.

ubcforums
29 Jun 2009, 14:29
Thanks ..Installed :P

nnStaff
02 Jul 2009, 12:48
Is anyone else having an issue with the search bar moving around on IE (but not Firefox)?

If you scroll the site in IE the News Bar floats down the site as you scroll down the page, but then it does return back to it's original position.

I have the code in my header template as well.

Here's the site too if you'd like to see for yourself: http://www.bengalsroar.com

Also did anyone ever figure out how to adjust the font color of the feed? It seems that if you remove the url for the gsearch.css and actually copy in the css text instead you can then alter the colors of everything except the feed portion. The feed portion is still being controled by the CSS color codes in the body css under "normal links css"

So is there a way around that?

Thanks in advance.
create a CSS ID for that span and call it -- it will override the forum's settings

AdrianH
21 Jul 2009, 17:17
I like this but all the news is from the USA.......... not a lot of good for my UK site,is there a UK feed available?

UKBusinessLive
21 Jul 2009, 18:57
I like this but all the news is from the USA.......... not a lot of good for my UK site,is there a UK feed available?

Hi Buddy :D

First of all Download the Code in the Zip File, Open in a text editor, Notepads fine, and ...

and Find

executeList : ["Business News"]


Change the word "Business News" with any other search term associated with your site, so if your site is a Parenting Site, then you would add words associated with that, Not 100% sure but if you want to change the Default Business news to a different search result why don't you add "in UK" to the Search parameters

Like this

executeList : ["Business News in UK"]


So change the words within the brackets and save.

Let me know how you got on ;)

AdrianH
22 Jul 2009, 12:28
Thanks, I tried that and it worked to a point,however I have had complaints about the terrible lag on the forum since adding this code.

Pages take forever to load while waiting for the newsbar to load up, remove the Google code and problem is gone. We are on our own fast server and have no issues otherwise.

UKBusinessLive
22 Jul 2009, 18:00
Thanks, I tried that and it worked to a point,however I have had complaints about the terrible lag on the forum since adding this code.

Pages take forever to load while waiting for the newsbar to load up, remove the Google code and problem is gone. We are on our own fast server and have no issues otherwise.

Strange, i've heard it take a few seconds to collect the data, But i didn't think it would effect the forums, How about you add the newsbar on a blank HTML page in your forum root and show it on your site via an i-frame, Then the forum should load correctly and google new bar when it does in its own time ;)

Just a thought, It'll depend if you feel the newsbar is benificial to your forums or not to do the extra work??

:)

zelnik
16 Aug 2009, 09:01
Hi UKBL,

Great mod I have finally had the time to try it out but unfortunately it's next to useless or my the news feed I require "Spain News" tried lots of different keywords and it just shows up 3 outdated bits of news.

What I find strange about that is the google news rss feed for the same keyword has loads of the latest news! :(

Is there anyway of adapting this to use with an RSS Feed?

Thanks.

dadoc
22 Aug 2009, 03:52
Great mod thanks,

It works very well, I want it to display on my main/index page only?
what template should I add it to? or is a code change that I can do to have it only display on that page only?

dadoc
03 Sep 2009, 10:16
I would also be interested if it could work with RSS feeds?