Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Replace "Display Options" In Forum Display With "Google Adsense" Details »»
Replace "Display Options" In Forum Display With "Google Adsense"
Version: 1.00, by ShawneyJ ShawneyJ is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.8.x Rating:
Released: 03-27-2011 Last Update: Never Installs: 4
 
No support by the author.

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&nbsp;</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&nbsp;</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">
and change it to eg:
Code:
<td class="alt1" width="470">
as you can see we are just changing the number in size <td class="alt1" width="470"> change that to suit your needs.

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: Teen Forums
Screen Shot Below.

P.S I Am Currently Running Vbulletin 3.8.7.

Screenshots

File Type: jpg adsenseads.jpg (50.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-31-2011, 05:45 AM
FreshFroot's Avatar
FreshFroot FreshFroot is offline
 
Join Date: Jul 2005
Posts: 770
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the tips. This will come in handy!
Reply With Quote
  #3  
Old 11-25-2012, 06:59 PM
al2thero al2thero is offline
 
Join Date: Aug 2008
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04326 seconds
  • Memory Usage 2,238KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (1)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete