Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-02-2011, 01:52 AM
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Location: Pensacola, FL
Posts: 772
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Google Adsense Background Color

How do I change this default vbulletin google adsense background (low settings). I inspected it in Firebug and saw no stylevar, .css class or html code for it in Templates, so is it changeable in the actual javascript code of vbulletin? Today I started using low settings in combination with Google Adsense Channels for 'Manage Ads'.

Reply With Quote
  #2  
Old 08-02-2011, 02:01 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As far as I know, there is no way to change that background color. (I could be wrong)
Reply With Quote
  #3  
Old 08-02-2011, 02:06 AM
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Location: Pensacola, FL
Posts: 772
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HMBeaty View Post
As far as I know, there is no way to change that background color. (I could be wrong)
Where there's a will there's a way! I'll break my whole site if I have to.
Reply With Quote
  #4  
Old 08-02-2011, 02:08 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update: I found this: http://www.guruofsearch.com/adsense-...ent-background

Quote:
Yes, it's possible, but we don't recommend it as it may prove to be a violation of your Google Adsense user agreement (or TOS = Terms of Service)
Reply With Quote
  #5  
Old 08-02-2011, 02:13 AM
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Location: Pensacola, FL
Posts: 772
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HMBeaty View Post
I just want to change it to my site's background color.


Use solid colors instead

You might be set on the whole transparent background thing, and might actually have a situation where it looks quite good. But the bottom line is you don't want to risk having your Adsense account suspended. Instead, we'd like to point out the advantages of using solid colors for your ad backgrounds.

* Solid colors pop more, and make the Adsense text more visible.
* If you want to blend your ads, you can choose an Adsense background color that matches the background color of your website.
* In some instances, you may actually want to vary the background color of your Adsense ad, as it will make it stand out from the rest of your site content.

--------------- Added [DATE]1312256984[/DATE] at [TIME]1312256984[/TIME] ---------------

It's the top one in navbar template.

{vb:raw ad_location.ad_navbar_below} <---- This is where you set adsense low to high
{vb:raw ad_location.global_below_navbar} <---- That's for manage ads.

Where do I go to access this?


--------------- Added [DATE]1312315659[/DATE] at [TIME]1312315659[/TIME] ---------------

I have not figured this out yet but until then, I'm doing it manually.
Reply With Quote
  #6  
Old 08-04-2011, 03:54 AM
Crotan's Avatar
Crotan Crotan is offline
 
Join Date: Feb 2010
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do they show up in your adsense account after adding them through the vbulletin integrated mod?

If they do you can change the color palette there.
(I'm pretty sure they don't)

Otherwise there is an old thread that was responded to by Steve for vb 3.8: https://www.vbulletin.com/forum/show...Google-Adsense

Quote:
Here are the variables you can add to your code to change specific colors:

google_color_border = "336666";
google_color_bg = "FFE6CC";
google_color_link = "000000";
google_color_text = "000000";
google_color_url = "CC0000";

Substitute your color hex codes of course.
Go into admincp -> Styles & Templates -> Search in Templates. Search for "ad" You'll see ad_navbar_below and global_below_navbar both listed along with various other ad location templates.

--------------- Added [DATE]1312434954[/DATE] at [TIME]1312434954[/TIME] ---------------

ad_navbar_below is the template you will want to change to customize the
Code:
A small 5-link advertising unit under the navigation bar. This location only shows text ads in the Low package.
Surprisingly the already established values in that template were
Code:
google_color_border = "{vb:stylevar page_bgcolor_hex}";
google_color_bg = "{vb:stylevar page_bgcolor_hex}";
google_color_link = "{vb:stylevar body_link_n_fgcolor_hex}";
google_color_text = "{vb:stylevar body_fgcolor_hex}";
google_color_url = "{vb:stylevar body_link_n_fgcolor_hex}";
So looks like you have some stylevar hunting to do. On the other hand you could always directly change that code to my last post and it will do it all the same. However the stylevars are probably safer to update, the world won't end if you get your hex color code wrong. So i'd go with the stylevars over a direct edit of the code for this route

--------------- Added [DATE]1312435585[/DATE] at [TIME]1312435585[/TIME] ---------------
However

Personally I wouldn't use the vbulletin mod because of the lack of integration with your actual adsense account.

You get so much more control if you generate the code from within your adsense account. you can use custom channels and all.

What I would recommend however is altering their placement templates with your own google ad code, for the placements you want. you can pick and choose your locations rather than using the all or nothing method their integration forces with the two options
Reply With Quote
  #7  
Old 08-04-2011, 05:17 PM
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Location: Pensacola, FL
Posts: 772
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Crotan View Post
Do they show up in your adsense account after adding them through the vbulletin integrated mod?

If they do you can change the color palette there.
(I'm pretty sure they don't)

Otherwise there is an old thread that was responded to by Steve for vb 3.8: https://www.vbulletin.com/forum/show...Google-Adsense



Go into admincp -> Styles & Templates -> Search in Templates. Search for "ad" You'll see ad_navbar_below and global_below_navbar both listed along with various other ad location templates.

--------------- Added [DATE]1312434954[/DATE] at [TIME]1312434954[/TIME] ---------------

ad_navbar_below is the template you will want to change to customize the
Code:
A small 5-link advertising unit under the navigation bar. This location only shows text ads in the Low package.
Surprisingly the already established values in that template were
Code:
google_color_border = "{vb:stylevar page_bgcolor_hex}";
google_color_bg = "{vb:stylevar page_bgcolor_hex}";
google_color_link = "{vb:stylevar body_link_n_fgcolor_hex}";
google_color_text = "{vb:stylevar body_fgcolor_hex}";
google_color_url = "{vb:stylevar body_link_n_fgcolor_hex}";
So looks like you have some stylevar hunting to do. On the other hand you could always directly change that code to my last post and it will do it all the same. However the stylevars are probably safer to update, the world won't end if you get your hex color code wrong. So i'd go with the stylevars over a direct edit of the code for this route

--------------- Added [DATE]1312435585[/DATE] at [TIME]1312435585[/TIME] ---------------
However

Personally I wouldn't use the vbulletin mod because of the lack of integration with your actual adsense account.

You get so much more control if you generate the code from within your adsense account. you can use custom channels and all.

What I would recommend however is altering their placement templates with your own google ad code, for the placements you want. you can pick and choose your locations rather than using the all or nothing method their integration forces with the two options
That's true but isn't the adsense code javascript built in and when adding custom adsense code you are making the site load a little longer? I found those templates but decided instead of the default 5 they give for text links I prefer 6 and because I use custom channels, I need to figure out how to ad my own custom codes to specific threads. I tried doing it by creating a replacement bb code and putting it inside the postbit with a google bot account but it made the thread load weird.
Reply With Quote
  #8  
Old 08-04-2011, 07:06 PM
Crotan's Avatar
Crotan Crotan is offline
 
Join Date: Feb 2010
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Octavius. View Post
That's true but isn't the adsense code javascript built in and when adding custom adsense code you are making the site load a little longer? I found those templates but decided instead of the default 5 they give for text links I prefer 6 and because I use custom channels, I need to figure out how to ad my own custom codes to specific threads. I tried doing it by creating a replacement bb code and putting it inside the postbit with a google bot account but it made the thread load weird.
Compare the template the vbulletin included adsense mod creates to the code google will create for you. They both load javascript from google. Only difference is the vbulletin code grabs color information from stylevars where as adsense code from google will grab it from the configuration you setup in your adsense account.

I can't really help you do anything with specific threads, that might be something for another request.

The ad template to put google adsense in the first post of every thread is "ad_thread_first_post_content"
Reply With Quote
  #9  
Old 08-04-2011, 07:34 PM
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Location: Pensacola, FL
Posts: 772
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

K thanks man. I thought that the code they used was compressed javascript inside the vbulletin's core javascript files which makes the site faster. I was wondering is there a way to call that inside the template instead of using the whole javascript code since in-line javascript is a no-no?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:48 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.04337 seconds
  • Memory Usage 2,259KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete