PDA

View Full Version : Show Thread Enhancements - Show Google Adsense / Adbrite Ads After X charaters in First Post


Neutral Singh
09-23-2010, 10:00 PM
Show Google Adsense / Adbrite Ads After X charater in First Post

This should work on all versions of vbulletin 3.5.x and above.
Keywords: google, adsense, adbrite, yahoo publisher, earn, income, showthread, first post, thread, topic

Google Policy on showing competitive advertisements at end of this post:

Context: Time to make some neat money on google adsense. Well, this is a cute little plugin which enables an admin to show variable adsense or adbrite code on the first post of the thread/topic based on the length of the message. This helps in keeping in shape the demographics of the forum by keeping the things neat and tidy. You can visit my forums on my website (http://www.sikhphilosophy.net/) and surf through some threads/topics to get a clear picture of what i am saying.

Installation Instructions:

Go to Plugin Manager > Add new Plugin

Product: vbulletin
Hook Location: postbit_display_complete
Title: Google Adsense in Postbits Based on the Length of Message
Execution Order: 5
Plugin PHP code: $post['text_length'] = strlen($post['message']);

Now edit Template posbit or postbit_legacy

Find:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>

Add Below: (Put the following code where ever you feel like adding.)

<if condition="THIS_SCRIPT == 'showthread'"> <if condition="$post['text_length'] < 1200"> <br> Google Adsense/Adbrite/Publisher Code # 1 Here <else /> <br> Google Adsense/adbrite/Publisher Code # 2 Here </if> </if>
Here, 1,200 is the variable to adjust the length of message to change your adsense accordingly.

You are done! You can play with this thing to add your own advertising banners.

Demo: http://www.sikhphilosophy.net (http://www.sikhphilosophy.net/)

ShawneyJ
01-09-2011, 03:22 AM
completely out of whack. maybe you need to explain more or better instructions.
post bit L, appears under avatar posts etc.
also appears on every post, not only first as stated.
message appears under the ad when placed code some where else in post bit L.
just wasted me time with this sorry.
an easyone to install: https://vborg.vbsupport.ru/showthread.php?t=222389&highlight=google+first+post