View Full Version : Adsense, different sizes for visitors to members ? under last post
MadKad
06-24-2006, 10:00 PM
I made this for our forum because our members didn?t like it when we added the big Adsense banner under last post, so I made this small hack where it shows smaller adverts for members and bigger ones to visitors.
What it does:
Shows one size advert to visitors (Adsense, text links, banners or anything you want)
Can be set to have more features that to adds if you no coding (or ask)
Set to show for user groups
Files:
1 Product file
1 Main template edit
New template will need your ad?s adding
Folder contains:
product-google_adds_sizes.XML file
Read me first.txt file (please read first)
FAQ:
Q: will this work in 3.6.0
A: Yes :D
Q: Can I add more that two kinds of adverts?
A: Yes you will need to add more code to the template
Q: My ad's are not showing?
A: Please make sure you add your user groups like 1, 2, 3, 4 with the spaces and not 1,2,3,4
This is the code you will need I have commented it.
<if condition="in_array($bbuserinfo['usergroupid'], array(usergroupshere))">
advert here
</if>
Supported at webmaster forum (http://www.mkpitstop.co.uk/forum)
Thank you
MadKad
06-25-2006, 03:31 PM
Adding the adverts after the first post insted or as well please do the following
After first post ad's:
================================================
Template > postbit_legacy
Find:
<!-- / post #$post[postid] -->
After add:
<!-- Start Google bottom -->
$google_bottom
<!-- / End Google bottom -->
=================================================
Template > postbit
Find:
<!-- / post #$post[postid] -->
After add:
<!-- Start Google bottom -->
$google_bottom
<!-- / End Google bottom -->
=================================================
Thats it that is the codes needed for both post styles after the first post :cool:
Snake
06-25-2006, 05:00 PM
Very nice idea! :)
MadKad
06-25-2006, 05:12 PM
Thank you I have more Ideas for other things, I am just trying to think of best ways to do them lol, this was my first mod release :D
MadKad
06-25-2006, 06:01 PM
Post two I have added for the adverts to be able to go under the first post on every thread :D
wobbly
06-26-2006, 04:08 AM
Does this fall within the Adsense Terms of Service?
MadKad
06-26-2006, 05:59 AM
Yes, I have looked and there TOS doesnt say anything about changing the size of adverts :)
All it does is show the visitors a big banner and the members a small banner :)
egyptsons
06-26-2006, 06:12 AM
Great idea ;)
Installed
MadKad
06-26-2006, 06:31 AM
Thanks mate :D
*Makes me feel good*
hi there..
like ur idea...hope will use that....
can we share idea with u ?
can u integrate goolgle adsense , miva & clickshor ?
like google searc + miva search ?
https://vborg.vbsupport.ru/showthread.php?t=118940
* Zia kliks installed
MadKad
06-26-2006, 09:02 AM
hi there..
like ur idea...hope will use that....
can we share idea with u ?
can u integrate goolgle adsense , miva & clickshor ?
like google searc + miva search ?
https://vborg.vbsupport.ru/showthread.php?t=118940
* Zia kliks installed
Hi mate I have replied to your question and i will try my best to make this for you :)
MadKad
06-26-2006, 10:14 PM
np Zia :D
Amavisca
06-27-2006, 09:19 PM
MadKad this is a nice hack. Can you add the function that allow/not allow to show ads on a specific forum?
Crazy Serb
06-27-2006, 09:28 PM
I can't get this to work on my board... I do have vb cpms installed as well, so would that be a problem?
I get the code
<!-- Start Google bottom -->
<!-- / End Google bottom -->
to show, but "$google_bottom" content is nowhere to be found.
any ideas?
MadKad
06-28-2006, 10:22 AM
I can't get this to work on my board... I do have vb cpms installed as well, so would that be a problem?
I get the code
<!-- Start Google bottom -->
<!-- / End Google bottom -->
to show, but "$google_bottom" content is nowhere to be found.
any ideas?
did you install the xml file?
if so in your templates is there a template called google bottom?
MadKad this is a nice hack. Can you add the function that allow/not allow to show ads on a specific forum?
I dont know how to do that at this time but does sound like an idea I will try and look into it.
Crazy Serb
06-28-2006, 12:39 PM
did you install the xml file?
yes.
if so in your templates is there a template called google bottom?
yes.
i followed all the steps, edited all the code... and still nothing.
now i am thinking there might be some variables that i need to declare global somewhere somehow or I dunno...
MadKad
06-28-2006, 02:02 PM
Ok well please do the following
run database backup
then
go to manage products > Google Bottom > uninstall
then
download the fresh update I just uploaded and install it again, hopefully that should do it.
make sure you Allow Overwrite when re-installing it :) please tell me if that works
Crazy Serb
06-28-2006, 02:09 PM
Ok well please do the following
run database backup
then
go to manage products > Google Bottom > uninstall
then
download the fresh update I just uploaded and install it again, hopefully that should do it.
make sure you Allow Overwrite when re-installing it :) please tell me if that works
same problem.
it seems like the $google_bottom code isn't even recognized and doesn't get executed...
let me look into the vb cmps and see if that might be a problem...
MadKad
06-28-2006, 03:12 PM
i dont no much about vb cmps sorry it could be that :(
Snake
06-29-2006, 05:58 PM
Thanks a ton for this hack! :)
MadKad
06-29-2006, 06:04 PM
Thanks a ton for this hack! :)
no thank you for liking it :banana:
Blue-Inc
06-30-2006, 06:28 PM
Hi there,
Great Modification and thank you for making it.
One question:
If I installed this, could I some how make this work with adbrite.com
MadKad
06-30-2006, 07:13 PM
Hi there,
Great Modification and thank you for making it.
One question:
If I installed this, could I some how make this work with adbrite.com
Yer you can add any adverts you want, also you can add more adverts to show for different groups.
Just add your code for your adverts where it tells you on the template :D
webset32
07-08-2006, 07:46 AM
Thank you very much, very well implemented...;)
MadKad
07-09-2006, 07:45 AM
Thank you :D
rollo tamasi
07-16-2006, 02:38 PM
is there anyway i can make the ads just appear for visitors to the site and not to registered members. At the moment when i log out i can see the ads (great) but when i log in i just see the table area at the bottom of the threads with no content. Is it possible to have this table removed while i'm signed in?
Added a screen shot for clarity
rollo tamasi
07-16-2006, 07:38 PM
could you clarify this please
To change who sees what please add the user groups by doing the following
Find:
Usergroups
and replace with your registerd user groups like this = 3,6,9,10,4
where do i modify the usergroups? I'm using VB 3.5.4
At the moment i have installed your mod but my ads are not appearing to my members.
MadKad
07-17-2006, 10:59 AM
is there anyway i can make the ads just appear for visitors to the site and not to registered members. At the moment when i log out i can see the ads (great) but when i log in i just see the table area at the bottom of the threads with no content. Is it possible to have this table removed while i'm signed in?
Added a screen shot for clarity
if you want to do that just place all the new code that is in side your template in the middle of this
<if condition="in_array($bbuserinfo['usergroupid'], array(usergroupshere))">
all code here
</if>
could you clarify this please
where do i modify the usergroups? I'm using VB 3.5.4
At the moment i have installed your mod but my ads are not appearing to my members.
see the template
<if condition="in_array($bbuserinfo['usergroupid'], array(usergroupshere))">
all code here
</if>
that code where you placed your adds in the middle, you need to add the user groups where it says usergroupshere like the visitors as defoult are 1 so others will be 2 etc etc add them like
<if condition="in_array($bbuserinfo['usergroupid'], array(1,2,3))">
all code here
</if>
and it should work, any problems please say :)
please also note if you are using adsence then the ad's might not show straght away as google adsnce spider has to have visited your page first for ad's to show :)
rollo tamasi
07-17-2006, 11:25 AM
and it should work, any problems please say :)
sorry about this MadKad but i can't seem to get the correct combination code wise. This is what i'm using at the moment, i can see adverts when i log out but not when i log in.
<!--######## start of bottom add's ########-->
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead" style="font-weight:normal" align="left">Advertisements</td>
</tr>
<tr>
<td align="center" class="alt1">
<if condition="in_array($bbuserinfo['usergroupid'], array(1,2,3,4,5))">
<script type="text/javascript"><!--
google_ad_client = "pub-7213854248425086";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
//--></script>
<script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</if>
<!-- Ad End -->
<!-- User ad's end -->
</div>
</if>
</td>
</tr>
</table>
</div>
<!--####### end of bottom add's #######-->
MadKad
07-17-2006, 11:41 AM
np :D
ok for showing just the adds to your visitors and not the table to your registerd users do this
<!--######## start of bottom add's ########-->
<if condition="in_array($bbuserinfo['usergroupid'], array(1, 2, 3, 4, 5))">
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead" style="font-weight:normal" align="left">Advertisements</td>
</tr>
<tr>
<td align="center" class="alt1">
<script type="text/javascript"><!--
google_ad_client = "pub-7213854248425086";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
//--></script>
<script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- Ad End -->
<!-- User ad's end -->
</div>
</if>
</td>
</tr>
</table>
</div>
</if>
<!--####### end of bottom add's #######-->
and my fault you need to add spaces like this
<if condition="in_array($bbuserinfo['usergroupid'], array(1, 2, 3, 4, 5))">
anmd not like this
<if condition="in_array($bbuserinfo['usergroupid'], array(1,2,3,4,5))">
that is me that sorry :confused:
that should do it for you just copy that big code as I have set it all for you
rollo tamasi
07-17-2006, 11:48 AM
cheers mate :)
works a charm
MadKad
07-17-2006, 11:51 AM
np mate dont forget to click install :D
rollo tamasi
07-17-2006, 11:53 AM
installed!
MadKad
07-19-2006, 08:29 PM
Thanks mate :D
bollie
08-09-2006, 04:01 PM
Work for 3.6.0 ????
MadKad
08-09-2006, 04:54 PM
I havent tried but I dont see why not as there is no mager code used, if you try please tell us :)
bollie
08-10-2006, 05:05 AM
Work for 3.6.0 ;)
MadKad
08-29-2006, 09:54 AM
great thanks for telling us :D
novastar
09-07-2006, 02:12 AM
nice hack, had no problems installing it in 3.6.0
Thanks.
MadKad
09-13-2006, 08:43 AM
Great thank you, So two installs on the new version and its gone well looks like i will be able to place this in the new section, thank you. :)
oldfan
09-21-2006, 04:33 PM
I cannot get this too work after the first post, works with the last post no problem
http://www.metallifukinca.com
Adding the adverts after the first post insted or as well please do the following
After first post ad's:
================================================
Template > postbit_legacy
Find:
<!-- / post #$post[postid] -->
After add:
<!-- Start Google bottom -->
$google_bottom
<!-- / End Google bottom -->
=================================================
Template > postbit
Find:
<!-- / post #$post[postid] -->
After add:
<!-- Start Google bottom -->
$google_bottom
<!-- / End Google bottom -->
=================================================
Thats it that is the codes needed for both post styles after the first post :cool:
MadKad
09-21-2006, 06:06 PM
I see it with the first post, but not the last are you using the usergroup options?
If so please could you post your codes :)
Jelmertjee
10-08-2006, 07:53 AM
nice work, *installed* , do you have any idea how i could show the add under the header too?
MadKad
10-08-2006, 08:17 AM
Hi, yes you can add it there what you need to do is go to
style & templates > header
in the header template find
$_phpinclude_output
after add the code
<!-- Start Google bottom -->
$google_bottom
<!-- / End Google bottom -->
Hope that helps :D
MadKad
10-08-2006, 09:20 AM
Please note I have just posted this mod for the new version of VB here
https://vborg.vbsupport.ru/showthread.php?t=128551
Thank you
fluentdesigns
03-17-2007, 10:02 PM
Im able to get this to work for my visitors but not my members. Any ideas. It just shows the Advertisement table with nothing in it.
fluentdesigns
03-17-2007, 10:04 PM
nevermind just read the usergroup issue :)
MadKad
04-20-2007, 12:50 PM
np mate :)
popowich
04-22-2007, 04:50 PM
I stripped out the conditions for members and visitors and simply use it as a linkbar in last post.
Great mod, thanks!
-Raymond
popowich
04-22-2007, 06:39 PM
Hello,
I've unsuccessfully tried about 7 different locations for this within forumhome.
Where can I add this to forumhome so that it looks nice?
<!-- Start Google bottom -->
$google_bottom
<!-- / End Google bottom -->
Between What's going on? and logged in users seems to be the logical choice.
I can't seem to get the right placement, or it's simply not compatible with that location.
Thanks!
-Raymond
MadKad
04-22-2007, 07:51 PM
well if you are getting it to change size for members and not members then have it where the add's are now, one at top and one at bottom. then smaller for the members :)
popowich
04-22-2007, 08:04 PM
The size is OK. I display the same link bar for anyone. I already have a leaderboard in the footer, so this mod is great for a generic link bar. It works fine for showthead and I added it to forumdisplay too. I simply can't figure out how to add it to forumhome. Make sense?
-Raymond
MadKad
04-22-2007, 10:55 PM
are I see what site is it? the one in your sig?
popowich
04-22-2007, 11:10 PM
Yes, the WNYPoker.com (http://www.wnypoker.com/forums/). As you can see I have it working OK on showthread and forumdisplay. I'd like to add that same block above the currently active users in the "what's going on?" on forumhome. Is it possible insert the simple $google_bottom in forumhome and get the desired result? If not, can you provide some guidance for a second template and creating a $google_forumhome ? Thanks!
-Raymond
MadKad
04-23-2007, 09:26 AM
Hi ok I just looked
in template FORUMHOME find:
<!-- what's going on box -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="2">$vbphrase[whats_going_on]</td>
then above ad the code:
$google_forumhome
that should do the job spot on :D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.