The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Randomly positioned ad in between postbits in showthread Details »» | |||||||||||||||||||||||||||
Randomly positioned ad in between postbits in showthread
Developer Last Online: Mar 2013
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: HTML Code:
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0"> $spacer_open <div style="padding:0px 0px $stylevar[cellpadding]px 0px"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="thead" align="left">Sponsored Links</td> </tr> <tr> <td class="alt1" align="center"> <!-- ad code goes here --> </td> </tr> </table> </div> $spacer_close </if> 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. Supporters / CoAuthors Show Your Support
|
Comments |
#2
|
||||
|
||||
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. |
#3
|
||||
|
||||
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 |
#4
|
|||
|
|||
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. |
#5
|
||||
|
||||
nice one! just wish we could add/edit the ads without going into the template.
|
#6
|
||||
|
||||
can you select certain usergroups not to see this?
|
#7
|
||||
|
||||
yea i got the same question, id prefer only guests see the ads, not logged in members, i get more guests than anything
|
#8
|
||||
|
||||
mandatory "is there a screen shot?" request.
|
#9
|
||||
|
||||
To make only guest see the ads take this code and add it at the end of the postbit (_legacy) template.
Code:
<if condition="in_array($bbuserinfo[usergroupid], array(1))"> <if condition="$GLOBALS['adsense_position'] == $post['postcount']"> $spacer_open <div style="padding:0px 0px $stylevar[cellpadding]px 0px"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="thead" align="left">Sponsored Links</td> </tr> <tr> <td class="alt1" align="center"> <!-- ad code goes here --> </td> </tr> </table> </div> $spacer_close </if> </if> |
#10
|
||||
|
||||
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!
|
#11
|
||||
|
||||
Quote:
|
#12
|
||||
|
||||
Quote:
|
#13
|
|||
|
|||
how do you add additional usergroups? to
Code:
<if condition="in_array($bbuserinfo[usergroupid], array(1))"> Code:
<if condition="in_array($bbuserinfo[usergroupid], array(1, 2, 3, 4))"> |
#14
|
||||
|
||||
This does appear to work with click for quick reply.
**clicks install** |
#15
|
||||
|
||||
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) PHP Code:
PHP Code:
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|