PDA

View Full Version : Adsense, different sizes for visitors to members


MadKad
10-07-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

More good news
This mod also adds the adverts to the bottom of the read pm page just under the PM msg :up:


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
10-08-2006, 09:20 AM
Screen shots here

https://vborg.vbsupport.ru/external/2007/01/13.jpg

and here

https://vborg.vbsupport.ru/external/2007/01/13.jpg

Adding the adverts after the first post insted or as well please do the following


After first post ad's:
================================================

Template > postbit_legacy

Find: the very bottom of code in template

After add:

<!-- Start Google bottom -->
<if condition="!$GLOBALS['FIRSTPOSTID']">
<br />
$google_bottom
</if>
<!-- / End Google bottom -->


=================================================

Template > postbit

Find: the very bottom of code in template

After add:

<!-- Start Google bottom -->
<if condition="!$GLOBALS['FIRSTPOSTID']">
<br />
$google_bottom
</if>
<!-- / End Google bottom -->


=================================================

Thats it that is the codes needed for both post styles after the first post :cool:

fuzionpoker
10-08-2006, 01:42 PM
Hi ive added this and it looks quite good!

However, the ads move so that there under the last post... is it possible for me to make it so that they stay after the 1st post?!

Thanks
JoRd

MadKad
10-13-2006, 01:39 PM
Hi I have edited the secound post that will tell you how to do this :)

dont forget to click install :)

Caiman
10-13-2006, 03:44 PM
I can't seem to find


<!-- / post #$post[postid] -->


in any of my postbit templates, hmm... maybe im being blind... be back soon.

MadKad
10-13-2006, 03:52 PM
did you use the find box and click find?

Caiman
10-13-2006, 03:55 PM
Of course. Doesn't seem to exist in my unmodified, original vB template either. (3.6.2) Hmm. Mod works fine otherwise, just want it after the first post too, still investigating, I might be doing something no0bishly wrong.

MadKad
10-14-2006, 10:06 AM
oooops :( looks like that code isnt there in the new version!!

I will now look for a different cod efor you sorry about this :(

MadKad
10-14-2006, 11:31 AM
ok I have changed the secound post and it all words :)

sorry about the problem also I have updated the files, to upgrade just uplaod the new version and tick overwrite then all should change apart from the template you have allready installed :)

AMG021
10-31-2006, 01:58 AM
nice mod. everything works but under first post it won't show the add the under the last one it shows but not first help dude

MadKad
10-31-2006, 04:45 AM
please can you show me the website?

also you template on the google adds :)

Milez
11-07-2006, 07:24 AM
Can anyone modify this to display the ads after a post randomly. There is a 3.5 hack that did this very well.

MadKad
01-01-2007, 09:44 PM
if you can show me the 3.5 hack that did that then I might be able to get a little better idea on how they did it, but I would think there is alot of work to be done to get this to do it :)

TheFrienzNet
01-13-2007, 06:12 PM
You sure it doesn't violates the Google ToS?

If not, then I think i'll use it.

Thanks.

MadKad
01-13-2007, 08:02 PM
You sure it doesn't violates the Google ToS?

If not, then I think i'll use it.

Thanks.

No it doesnt :), ifact it cant, if you have it set to show big ad's to visitors then small or none to members there is no way it can :)

fxs158
01-15-2007, 01:56 AM
Screen shots here

https://vborg.vbsupport.ru/attachment.php?attachmentid=49961&d=1151253034

and here

https://vborg.vbsupport.ru/attachment.php?attachmentid=49962&d=1151253034

Adding the adverts after the first post insted or as well please do the following


After first post ad's:
================================================

Template > postbit_legacy

Find: the very bottom of code in template

After add:

<!-- Start Google bottom -->
<if condition="!$GLOBALS['FIRSTPOSTID']">
<br />
$google_bottom
</if>
<!-- / End Google bottom -->


=================================================

Template > postbit

Find: the very bottom of code in template

After add:

<!-- Start Google bottom -->
<if condition="!$GLOBALS['FIRSTPOSTID']">
<br />
$google_bottom
</if>
<!-- / End Google bottom -->


=================================================

Thats it that is the codes needed for both post styles after the first post :cool:


Tried doing this but it has yet to show after firs post, did anything change on 3.6.4 that affects this?

MadKad
01-15-2007, 05:20 PM
please could you post the code for your postbit_legacy and postbit templates, so I can see what these look like :)

nocturnix
01-15-2007, 09:14 PM
I cant even import...

Maybe im not doing this right...

VB 3.6.4...

I go to styles and templates in admin cp...
Click download/upload style...

Import style xml file (browse to your xml file on my computer)
select merge INTO the style I want.
select ignore style version.

Click import and I get...

"invalid file specified"

ZzZ_ZzZ
01-16-2007, 10:52 PM
thaks :)

o0Hubba0o
01-21-2007, 03:44 AM
I cant even import...

Maybe im not doing this right...

VB 3.6.4...

I go to styles and templates in admin cp...
Click download/upload style...

Import style xml file (browse to your xml file on my computer)
select merge INTO the style I want.
select ignore style version.

Click import and I get...

"invalid file specified"

This isn't a style, it's a product. ;)

MadKad
04-14-2007, 08:12 AM
by the way this works on the latest version as well :D

South Fork
04-19-2007, 10:29 PM
Very nice, thank you! Installs.

Any suggest for qualifying the display of the banner based on post count within the thread? I run one of the other adsense add-on's which places an add after the first post. If there is only one post in thread the banners are doubled up and a bit much.

Thanks for any suggestions.

South Fork

MadKad
04-20-2007, 12:49 PM
Very nice, thank you! Installs.

Any suggest for qualifying the display of the banner based on post count within the thread? I run one of the other adsense add-on's which places an add after the first post. If there is only one post in thread the banners are doubled up and a bit much.

Thanks for any suggestions.

South Fork


I know what you meen but at this time I dont think there is, well not that I know of :( sorry

jmw
08-28-2007, 10:46 PM
Not working with 3.6.8

mattyk72
10-08-2007, 05:43 PM
Is there an update for 3.6.8 yet?? I really liked this.

unixboard
07-16-2008, 07:20 PM
The Adsense under the first post dosnĀ“t work for me also :-)
Any hints? I am using vb 3.6.8

Greetz and thx!