vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Mini Mods - UKBL ~ Ajax Google News Bar on ForumHome (https://vborg.vbsupport.ru/showthread.php?t=205796)

UKBusinessLive 02-17-2009 10:00 PM

UKBL ~ Ajax Google News Bar on ForumHome
 
1 Attachment(s)
UKBL ~ Ajax Google News Bar on ForumHome



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://vborg.vbsupport.ru/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

Code:

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? 02-18-2009 01:31 PM

how do you change the test color? It's dark blue and can barely be seen on my black background?

UKBusinessLive 02-18-2009 01:38 PM

Quote:

Originally Posted by DobieGillis? (Post 1747950)
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...

Code:

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

Code:

#676767
to something more suitable ;)

DobieGillis? 02-18-2009 01:46 PM

Quote:

Originally Posted by UKBusinessLive (Post 1747957)
Find this in the code...

Code:

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

Code:

#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 02-18-2009 01:50 PM

Quote:

Originally Posted by DobieGillis? (Post 1747963)
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? 02-18-2009 02:05 PM

Quote:

Originally Posted by UKBusinessLive (Post 1747968)
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 02-18-2009 02:07 PM

Quote:

Originally Posted by DobieGillis? (Post 1747984)
I found it but it changes every link to the color i choose. Thanks again!

No worries Mate, Glad to help :D

itsheinz 02-18-2009 02:21 PM

Thanks for this im using it now.It is located below my navigation.

UKBusinessLive 02-18-2009 02:23 PM

Quote:

Originally Posted by itsheinz (Post 1748004)
Thanks for this im using it now.It is located below my navigation.

Nice :up:

DobieGillis? 02-18-2009 03:26 PM

how often do the feeds change? Still seeing the same ones over and over.

UKBusinessLive 02-18-2009 05:04 PM

Quote:

Originally Posted by DobieGillis? (Post 1748081)
how often do the feeds change? Still seeing the same ones over and over.

Should change automatically on their own, Its Ajax based

puertoblack2003 02-18-2009 07:56 PM

it'll be nice if it can generate revenue:D and can we change the news to something other then Business News?

UKBusinessLive 02-18-2009 08:00 PM

Quote:

Originally Posted by puertoblack2003 (Post 1748387)
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

Code:

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? 02-18-2009 08:08 PM

Quote:

Originally Posted by UKBusinessLive (Post 1748391)
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

Code:

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 02-18-2009 08:18 PM

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 02-18-2009 08:29 PM

*********************************

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 02-18-2009 09:19 PM

nice work...

UKBusinessLive 02-18-2009 09:57 PM

Quote:

Originally Posted by NAZIA (Post 1748462)
nice work...

Thanks ;)

UKBusinessLive 02-18-2009 09:58 PM

Quote:

Originally Posted by TimberFloorAu (Post 1748432)
*********************************

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 02-18-2009 10:12 PM

Nice Addition to our Site :)

Thanks

UKBusinessLive 02-18-2009 10:25 PM

Quote:

Originally Posted by mark370 (Post 1748512)
Nice Addition to our Site :)

Thanks

Cheers Mark ;)

scottny 02-19-2009 02:04 AM

Installed and working great.

thanks.

UKBusinessLive 02-19-2009 04:37 AM

Quote:

Originally Posted by scottny (Post 1748653)
Installed and working great.

thanks.

Thanks :D

Vinyljunky 02-19-2009 09:55 AM

Be great if it interacted with Google Adsense :D

UKBusinessLive 02-19-2009 05:08 PM

Quote:

Originally Posted by Vinyljunky (Post 1748867)
Be great if it interacted with Google Adsense :D

Knowing Google it will soon enough :D

concepts 02-21-2009 11:00 AM

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..
PHP Code:

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


UKBusinessLive 02-21-2009 03:01 PM

Quote:

Originally Posted by concepts (Post 1750592)
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..
PHP Code:

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 02-21-2009 03:25 PM

ill try it shortly.. lets hope it works! I did it once, then it pulled some generic news, I will try again though.

UKBusinessLive 02-21-2009 05:04 PM

Quote:

Originally Posted by concepts (Post 1750774)
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 02-22-2009 01:03 PM

Quote:

Originally Posted by UKBusinessLive (Post 1750842)
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/...ence.html#_css
BTW, the problem of the colour is not very important compared to the one of the "new" page.

UKBusinessLive 02-22-2009 01:19 PM

Quote:

Originally Posted by Bmastro (Post 1751384)
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/...ence.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 02-22-2009 01:22 PM

How can you get the links from the newsfeed to open in a new window ?

UKBusinessLive 02-22-2009 01:35 PM

Quote:

Originally Posted by Internetcafe (Post 1751398)
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 02-22-2009 02:51 PM

Now I have the API key, but I don't know where to type it in your code :confused:

leenster 02-22-2009 08:12 PM

Quote:

Originally Posted by concepts (Post 1750592)
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..
PHP Code:

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


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

PHP Code:

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


leenster 02-22-2009 08:23 PM

Quote:

Originally Posted by Internetcafe (Post 1751398)
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....


PHP Code:

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

Under that ADD :
PHP Code:

linkTarget GSearch.LINK_TARGET_BLANK




worked for me :)

Bmastro 02-22-2009 09:21 PM

Quote:

Originally Posted by leenster (Post 1751754)
i didnt need to get my own api key: this is how to do it....

PHP Code:

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

Under that ADD :
PHP Code:

linkTarget GSearch.LINK_TARGET_BLANK

worked for me :)

Yes, it works!
Great!!!

SuperTaz 02-23-2009 05:53 AM

Just to let you know, you can do without this code:

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 02-23-2009 09:42 PM

Great mod but is there anyway of adapting it for a live currency rate?

UKBusinessLive 02-23-2009 11:30 PM

Quote:

Originally Posted by zelnik (Post 1752704)
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

Code:

<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 ;)


All times are GMT. The time now is 05:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01479 seconds
  • Memory Usage 1,845KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (8)bbcode_php_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete