Replace "Display Options" In Forum Display With "Google Adsense"
I searched all over Vb org for a mod to replace "display options" with a google ad in Forum Display. Sorry if there is some sort of mod out there, but i couldnt find one.
Im not sure if this mod will be at any use to anyone, but i wanted it, i seen it on a forum while searching the net. What i came up with was not spot on the same as the forum i seen it at, but i came damn close to it, if not spot on. Im also not sure if my code is %100 perfect but i have tested on IE and FF and it works like a charm. First you need to install kira's modification, Big thanks to him/her for that mod. After you have finished installing kira's mod, NEXT, Find In Forum Display Templates >> FORUMDISPLAY Code:
<!-- Simplified Active Users in this Forum (and sub-forums) and Moderators --> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <if condition="$show['activeusers']"> <td class="tcat">$vbphrase[currently_active_users]</td> </if> <if condition="$show['moderators']"> <td class="tcat">$vbphrase[moderators]</td> </if> </tr> <tr> <if condition="$show['activeusers']"> <td class="thead">$totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_y_guests]</phrase>)</td> </if> <if condition="$show['moderators']"> <td class="thead">$vbphrase[moderators] : $totalmods</td> </if> </tr> <tr> <if condition="$show['activeusers']"> <td class="alt1"><div class="smallfont">$activeusers</div></td> </if> <if condition="$show['moderators']"> <td class="alt1"><div class="smallfont">$moderatorslist </div></td> </if> </tr> </table> <!-- End Simplified Active Users in this Forum (and sub-forums) and Moderators --> AND REPLACE THE ABOVE CODE WITH THIS: Code:
<!-- Active Users in this Forum (and sub-forums) and Moderators --> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="tcat">Advertisement</td> <if condition="$show['activeusers']"> <td class="tcat">$vbphrase[currently_active_users]</td> </if> <if condition="$show['moderators']"> <td class="tcat">$vbphrase[moderators]</td> </if> </tr> <tr> <td class="thead"></td> <if condition="$show['activeusers']"> <td class="thead">$totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_y_guests]</phrase>)</td> </if> <if condition="$show['moderators']"> <td class="thead">$vbphrase[moderators] : $totalmods</td> </if> </tr> <tr valign="top"> <td class="alt1" width="340"> <table cellpadding="0" cellspacing="0" border="0"> <div>YOUR ADSENSE CODE HERE</div> </tr></td> </table> <if condition="$show['activeusers']"> <td class="alt1"><div class="smallfont">$activeusers</div></td> </if> <if condition="$show['moderators']"> <td class="alt1"><div class="smallfont">$moderatorslist </div></td> </if> </tr> </table> <!-- End Active Users in this Forum (and sub-forums) and Moderators --> Replace Your Adsense Code With The Part In The Red. I am using a (336 x 280) google ad, so if you want to put in say a (468x60) ad, find in the code above: Code:
<td class="alt1" width="340"> Code:
<td class="alt1" width="470"> sorry if the code is a bit messy, i had to add the <div> tags around the google ad to make it display with IE Anyway, just thought i'd share this, a good coder would have worked this out quick, but took me ages lol. cheers. DEMO: http://www.teenark.com/webmasters-world/613524-replace-display-options-forum-display-google-adsense.html Screen Shot Below. P.S I Am Currently Running Vbulletin 3.8.7. Download No files for download. Screenshots |