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 |
#92
|
|||
|
|||
Quote:
Quote:
Awesome idea - i hope that will pull up my click-through rate a bit... *installed* |
#93
|
||||
|
||||
Brilliant? Absolutely Brilliant?
Cheers! (installed) Here is my thank you? enjoy |
#94
|
|||
|
|||
Does this deffinetly work with 3.5.3? I've installed it and it doesn't appear at al;l no matter which of the 2 postbits I put the code in. I'm having some issues with my skin since upgrading and not sure if this is all connected.
I know it's for 3.5.2 but wasn't sure if it's just not compatible with my version or caused by my other issues. |
#95
|
||||
|
||||
I usually just do the patches and wait a week or so to see if there are any issues like this. I have to admit though with the new plugin system it will be a lot easier to do a global update. For me now its not a matter of reinstalling my hacks its more of will they work with the next version. Anyway I too would like to know if anyone else is having an issue.
|
#96
|
|||
|
|||
thanks 1st of all
this works fine for me to show to everyone - i can see ads but doesnt work for me when i change to this - (so usergroups cannot see) Code:
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && is_member_of($bbuserinfo,array(1,2,3))"> my code: 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"> <!-- MY AD CODE HERE --> </td> </tr> </table> </div> $spacer_close </if> just want certain usergroups not to be able to see |
#97
|
||||
|
||||
Just installed and lovin' it. Mine also needed to go to the postbit-legacy.
I do have one question. I have a space below my ad and my other posts don't have that. If possible, I would like to remove that space below my ad. Anyone know how? |
#98
|
|||
|
|||
Is there a way to post the ads on top of the first post?
|
#99
|
||||
|
||||
Quote:
|
#100
|
||||
|
||||
A little help for a newbie.
I got this working great and then wanted to set it up to show up only for guests, etc. I got this error after making the change: The following error occurred when attempting to evaluate this template: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jfuqua/public_html/goForum/includes/adminfunctions_template.php(3532) : eval()'d code on line 223 This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish. Here's what I added: <!-- / post #$post[postid] --> <if condition="is_member_of($bbuserinfo,array(2,5,6,7) )"> <if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0"> $spacer_open <div style="padding:0px 0px $stylevar[cellpadding]px 0px"> My goal is for groups 2,5,6,7 to not see the ads. Where did I goof? Thanks. |
#101
|
||||
|
||||
Quote:
|
#102
|
||||
|
||||
Quote:
Also, I'm wondering if there is a way to randomize ads for that area if you want to rotate banners along with AdSense. |
#103
|
||||
|
||||
Bump for the cause.
|
#104
|
|||
|
|||
thanks for the hack, works well
|
#105
|
|||
|
|||
Quote:
Thanks for the wonderful hack! DC |
#106
|
||||
|
||||
Quote:
You're logic would also only show it to users that are in groups 2,5,6,7. If you want to stop them from seeing it I suggest you use the template code listed in my first post with the following change: instead of PHP Code:
PHP Code:
If you wanted to do the opposite and only show it to groups 2,5,6 and 7 then you should remove the ! like: PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|