vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=98057

Randomly positioned ad in between postbits in showthread
by UK Jimbo
10 Oct 2005 19:07

2 Attachment(s)
Inspired by this hack.

The ad is positioned randomly after one of the postbits. We use this for positioning adsense ads on visordown.com.

Install the attached plugin then add the following code to your postbit or postbit_legacy template:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Changelog

v1.01
Bug fix: The ad code shouldn't appear on PMs any more (template change)

Donations

Hopefully this plugin will earn you provide you with some good revenue. If you'd like to show your appreciation please donate as little or as much as you like.

https://www.vbulletin.org/forum/external/2010/02/12.gif

Wachtmeister 10 Oct 2005 20:44

I'll give this one a try, because the "Adsense after first post" did not work with Firefox at "Quick Reply". Thanks for releasing this one.

edit: works perfect.

dieselpowered 10 Oct 2005 21:20

I had the same problem with the adsense code affecting the functionality of AJAX. Quick reply would work ONLY if you did not have to click to activate it. One thing you may want to test is to attempt to click quick reply in a post AFTER the display of the adsense and see if it works.

The code I have now will allow you to click quick reply in a post above the adsense, however, not in a post below it.

If this works I will be using it :)

DeeperImage 11 Oct 2005 02:53

I've installed the plugging and the code and this is not working, What am I doing wrong? Thanks.

It just doesn't show up.

auz1111 11 Oct 2005 03:28

nice one! just wish we could add/edit the ads without going into the template.

hbalagh1 11 Oct 2005 04:35

can you select certain usergroups not to see this?

Keyser Söze 11 Oct 2005 05:57

yea i got the same question, id prefer only guests see the ads, not logged in members, i get more guests than anything

GrendelKhan{TSU 11 Oct 2005 06:01

mandatory "is there a screen shot?" request. ;) :p

Doc Great 11 Oct 2005 09:38

To make only guest see the ads take this code and add it at the end of the postbit (_legacy) template.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

@UK Jimbo, do you allow me to translate/modify and post this modification @ www.vbhacks-germany.com (of course with your copyright)? :)

UK Jimbo 11 Oct 2005 10:36

Thanks for posting the usergroup variation Doc Great. I've got no issues with you re-posting the code elsewhere as long as it's not being sold!

UK Jimbo 11 Oct 2005 10:41

Quote:

Originally Posted by GrendelKhan{TSU
mandatory "is there a screen shot?" request. ;) :p

done

Doc Great 11 Oct 2005 11:17

Quote:

Originally Posted by UK Jimbo
Thanks for posting the usergroup variation Doc Great. I've got no issues with you re-posting the code elsewhere as long as it's not being sold!

Thats for sure :) i hate making profit with "simple" php code :D Thanks for sharing.

dsotmoon 11 Oct 2005 17:48

how do you add additional usergroups? to


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

like this?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

ect etc?

dieselpowered 11 Oct 2005 17:49

This does appear to work with click for quick reply.

**clicks install**

UK Jimbo 11 Oct 2005 18:07

To limit it just to certain user groups I'd recommend the following conditional rather than the in_array() solution posted above. This version ensures that secondary group assignments are checked too.

For a single user group (1 in this case)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

For multiple user groups (1, 2 & 3 in this case)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



All times are GMT. The time now is 08:12.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.