PDA

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


MadKad
08 Oct 2006, 10:17
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
08 Oct 2006, 10:20
Screen shots here

https://www.vbulletin.org/forum/external/2007/01/13.jpg

and here

https://www.vbulletin.org/forum/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
08 Oct 2006, 14:42
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
13 Oct 2006, 14:39
Hi I have edited the secound post that will tell you how to do this :)

dont forget to click install :)

Caiman
13 Oct 2006, 16:44
I can't seem to find


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


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

MadKad
13 Oct 2006, 16:52
did you use the find box and click find?

Caiman
13 Oct 2006, 16:55
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
14 Oct 2006, 11:06
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
14 Oct 2006, 12:31
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
31 Oct 2006, 02:58
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
31 Oct 2006, 05:45
please can you show me the website?

also you template on the google adds :)

Milez
07 Nov 2006, 08:24
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 Jan 2007, 22:44
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
13 Jan 2007, 19:12
You sure it doesn't violates the Google ToS?

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

Thanks.

MadKad
13 Jan 2007, 21:02
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
15 Jan 2007, 02:56
Screen shots here

http://www.vbulletin.org/forum/attachment.php?attachmentid=49961&d=1151253034

and here

http://www.vbulletin.org/forum/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
15 Jan 2007, 18:20
please could you post the code for your postbit_legacy and postbit templates, so I can see what these look like :)

nocturnix
15 Jan 2007, 22:14
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
16 Jan 2007, 23:52
thaks :)

o0Hubba0o
21 Jan 2007, 04:44
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
14 Apr 2007, 09:12
by the way this works on the latest version as well :D

South Fork
19 Apr 2007, 23:29
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
20 Apr 2007, 13:49
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
28 Aug 2007, 23:46
Not working with 3.6.8

mattyk72
08 Oct 2007, 18:43
Is there an update for 3.6.8 yet?? I really liked this.

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

Greetz and thx!