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 |
#63
|
|||
|
|||
install, thanks for this Jimbo, works perfectly
|
#64
|
|||
|
|||
one last question, i think, what would I add to the following to keep this from showing in certain forums...
Code:
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && is_member_of($bbuserinfo,array(1,2,3,4,8,9,11,14,15,19))"> |
#65
|
||||
|
||||
I did (it again ) --> a little modification to show all guests Ad, but let the reg. users choose if they want to get ad-posts or not.
Install: new profile field (single choice) On/Off (parameters) - note the field numer (e.g. 6) Ad the following code at the end of your postbit (_legacy) Code:
<if condition="in_array($bbuserinfo[usergroupid], array(1))"> <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 Start --> <!-- Ad between --> </td> </tr> </table> </div> $spacer_close </if></if> <else /> <if condition="$vbulletin->userinfo['field6'] == 'On'"> <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 Start --> <!-- Ad between --> </td> </tr> </table> </div> $spacer_close </if></if> |
#66
|
|||
|
|||
Could some1 tell me where to put the HTML code,
i installed the xml file through plug-in manager, but What Now? |
#67
|
||||
|
||||
Quote:
The vBulletin manual explains how to edit styles/templates. |
#68
|
|||
|
|||
Quote:
PHP Code:
Quote:
|
#69
|
|||
|
|||
OK, I added Doc's code....doesn't seem to be working. All members are seeing the ads with the default for members set to off.
Doc, where you have ad start and ad between twice in the code, am I right in thinking the adsense code should be inserted in both areas? |
#70
|
|||
|
|||
<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"> <!--e-bannerx.com code begin-->
<SCRIPT language=JavaScript type=text/javascript> <!-- var rnd = Math.round(Math.random() * 10000000); document.writeln('<SCR'+'IPT language=JavaScript type=text/javascript src="http://www.e-bannerx.com:8888/adrevolver/banner?js&place=13471&cpy='+rnd+'">'); document.writeln('</SC'+'RIPT>'); //--> </SCRIPT><NOSCRIPT> <IFRAME src="http://www.e-bannerx.com:8888/adrevolver/banner?place=13471&cpy=1" width=468 height=60 scrolling=no allowtransparency=true frameborder=0 marginheight=0 marginwidth=0> <A href="http://www.e-bannerx.com:8888/adrevolver/href?place=13471&rnd=1000" target="_blank"> <IMG src="http://www.e-bannerx.com:8888/adrevolver/banner?img&place=13471&rnd=1000" width=468 height=60 border=0 alt="e-bannerx.com" ismap></A></IFRAME></NOSCRIPT> <!--e-bannerx.com code end--> </td> </tr> </table> </div> $spacer_close </if> ($hook = vBulletinHook::fetch_hook('postbit_imicons')) ? eval($hook) : false; where in postbit do I add this, I have tried the end it dont work |
#71
|
||||
|
||||
Quote:
I've no idea what you're doing with the code $hook = vBulletinHook::fetch_hook('postbit_imicons')) that shouldn't be in a template anywhere and isn't part of this hack. |
#72
|
|||
|
|||
add it where, I dont know where to add it, and I copied and pasted from this thread
|
#73
|
|||
|
|||
<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> |
#74
|
||||
|
||||
Install the plugin then at the end of the postbit or postbit_legacy template copy in the code as per the instructions at the top of this thread.
Info on how to edit templates and how to upload plugins is described in detail on the vBulletin site. http://www.vbulletin.com/ |
#75
|
|||
|
|||
Brilliant! This is exactly the kind of ad placement that I was hoping to find. Tower and header/footer ads get ignored, and intrusive pop-over ads are just wrong. This is perfect!
Many Thanks! |
#76
|
|||
|
|||
where in the end why isnt there a find this and add below it like most plugins?
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|