vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Mini Mods - Guest Only AdSense below Navbar - Increase registrations & revenue (https://vborg.vbsupport.ru/showthread.php?t=145915)

04-26-2007 10:00 PM

Guest Only AdSense below Navbar - Increase registrations & revenue
 
This is pretty a straightforward template edit that will display adsense below the navbar for guests only. Not only will it put adsense in a decent location overall for revenue, but it will encourage new registrations as well.

Template Edits: 1
Install Time: 2 minutes
Difficulty: Easy

Step 1:
AdminCP -> Styles and Templates -> Style Manager

Edit the navbar template. At the very bottom, add the following:

Code:

<!-- Guest Adsense -->
<if condition="$bbuserinfo['userid'] == 0">
<div align="center">
<!-- AdSense Start -->

### PASTE YOUR ADSENSE CODE HERE ###

<!-- /AdSense -->
</div>
<br />
</if>
<!-- /Guest Adsense -->

Paste your Adsense ad unit code in place, and you're good to go.

Optional

I put a small blurb about logging in to remove the adds underneath it. To do so, add the following:

Code:

<br>
<font face="arial" size="1" color="#FFFFF">Login to remove these ads.</font>

UNDER:

Code:

<!-- /AdSense -->
Screenshot:

https://vborg.vbsupport.ru/

Demo: http://www.sevenstring.org

Please click Install if you find this useful.

Cheers. :)

osmanungur 05-18-2007 02:34 PM

thanks man
this is very useful

Tearstone 05-20-2007 02:32 AM

Impressive! Good work Chris.

TheProphet 05-20-2007 06:23 AM

Thx for yer work m8

snoopy5 05-20-2007 04:40 PM

Hi

great MOD!

How can you vary this, so that only specific usergroups do not see the ad (i.e. paying members)?

REIGN SS 09-28-2007 05:36 AM

i believe that all you to is add the user id numbers here

Code:

<if condition="$bbuserinfo['userid'] == 1,2,3,0">
(the red text is just an example of what to add, depending on what your user group # are it will vary)

REIGN SS 09-28-2007 05:37 AM

p.s: Installed!!

Phr34q 03-06-2008 06:58 AM

*clicks installed and MOTM*

Bexter 03-22-2008 09:57 AM

Hmm, the "<if condition="$bbuserinfo['userid'] == 1,2,3,0">" doesnt work, tells me


Parse error: syntax error, unexpected ',' in /home/girlgame/public_html/forums/includes/adminfunctions_template.php(3681) : eval()'d code on line 262


Doesnt like the comma lol. Any other ideas?


Edit nvm i found out how. For those wondering.........

Use the conditional that matches your needs - http://www.vbulletin.com/forum/showt...t=Conditionals

For me i didnt want the ads to show to premium members, so i used
Code:

<if condition="!is_member_of($bbuserinfo, X)">

vithorius 04-01-2009 03:14 PM

Quote:

Originally Posted by REIGN SS (Post 1348767)
i believe that all you to is add the user id numbers here

Code:

<if condition="$bbuserinfo['userid'] == 1,2,3,0">
(the red text is just an example of what to add, depending on what your user group # are it will vary)

Ok, I believe that the info bellow is correct and the above should be considered as an error, right? :confused: :erm: :eek: :confused:




Quote:

Originally Posted by Bexter (Post 1471458)
Hmm, the "<if condition="$bbuserinfo['userid'] == 1,2,3,0">" doesnt work, tells me


Parse error: syntax error, unexpected ',' in /home/girlgame/public_html/forums/includes/adminfunctions_template.php(3681) : eval()'d code on line 262


Doesnt like the comma lol. Any other ideas?


Edit nvm i found out how. For those wondering.........

Use the conditional that matches your needs - http://www.vbulletin.com/forum/showt...t=Conditionals

For me i didnt want the ads to show to premium members, so i used
Code:

<if condition="!is_member_of($bbuserinfo, X)">

Ok, this info is quite useful! But what if I need to exclude more than one group? (in my case, I would like to exclude Premium, Admins and Mods.) :confused:

Thank you!! :up: :up:


All times are GMT. The time now is 03:42 AM.

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.01170 seconds
  • Memory Usage 1,739KB
  • 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
  • (7)bbcode_code_printable
  • (2)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
  • (10)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