![]() |
Adsense as second post. 2 Sizes - Big for guests, small for members - Legacy Version
Hi
I made this template mod for my medical Forum and I decided to share this with you This hack is for forums that use the Postbit_legacy Template If you use the standard postbit template >> click here << What this hack does: This modification displays adsense as second post in every thread. Guest see a post like adsense with a product Referral (firefox in this code) and a leaderboard as post content. Registered Members see a standard banner so they don't get annoyed by the big advertising. I also included an information for guests, that they see a different not so disturbing ad if they register. This serves to purposes, one is to get more members to register of course the second purpose is to blend the advertising better into the post layout. ADD-ON: In addition you can add a Google Adsense link unit as last post of a thread on any page for members and guests. This advertising will only show if the thread has more then one post so that it does not show 2 advertisings directly below each other in case that the thread has no replies yet. Google Adsense has updated its ToS so that you are now allowed to use up to three link units on one page. So if you already use my "Adsense Link Unit in Navbar" Mod there woun't be a problem. See screenshots ;) How to install: In template postbit (legacy version) search: Code:
<if condition="$post['userid'] AND $show['member']"> Code:
<!-- Google AdSense in Posts for Guests --> Add this code below the last line of my above code: Code:
<!-- Google AdSense Link unit as last post for all --> <!-- Adsense Referal Code start --> <!-- Adsense large rectangle start --> <!-- Adsense standard banner start --> Add-on: <!-- Adsense Link Unit start --> replace "YOUR PUB ID HERE" with your pub-ID and fit the colors of adsense to your color scheme Demo: Elternfragen.net - Das Forum f?r Eltern mit (medizinischen) Fragen Just go into any thread. I hope you like it and if you do, don't forget to mark es installed ;) Changelog: v1.15 - 2007/07/22: NO CHANGES, just removed my Pub-ID from the hack! v1.15 - 2007/06/11: Add-on - Google Adsense Link unit as last post of every thread for guests and members. v1.1 - 2007/05/06: Condition altered to show advertising as second post on every page, not just the first. v1.0 - 2007/03/01: Changed a few German phrases to English, removed an unneccessary condition If you want more good placements for adsense code, check out my newest mod: Adsense Link Unit in Navbar StarBuG If you did not register for an Adsense account yet but you plan to, feel free to contact me. If you register via my referral I am willing to help you get the most out of your adsense placement by assisting you during the setup process and implementing the best adsense modifications. Just write me a Private message. |
Thank you so much :)
|
You'r welcome ;)
|
Works like a charm, btw.
|
Quote:
|
Oh, I missed a few german phrases, I have fixed that now.
StarBuG |
Mm, whenever I install it, the style gets messed up and the ads goes where the second username is. (Screen)
|
Do you use the legacy version of the postbit template?
Did you add the code below the above mentioned code? |
Ok, showing fine. Gotta change the username "Heute". I assume I can do that by editing this user in vbcp right?
|
Hi,
Works great. I am new to Vbulletin and I did it without any hitches. Very easy to understand. However, I have three points to make. 1. I use a sub-style and it only worked if I modified the parent style's Postbit template. Is this correct? Did not work (nothing happens) when I only modified the sub style. 2. Does the google adsense code generate ads based on the thread content? Does this mean different threads will have different ads? If not how do I configure the ads to be based on the thread content. 3. Where and what do I look for if I want to change the type of users who see the firefox ads? My forum threads are not viewable to guests (for privacy) and they have to register to view threads (in the general areas only), full members have to email me and I join them in a usergroup for full access. How do I enable only registered members & guests to view the firefox ads? Thanks. Keep up the great work and I for one really appreciate it. like I said before, works great. V |
@jmw: heute means "Today" and you don't need to create a user for this hack. I simply missed to translate the german phrase (it's fixed now ;))
@Volvoholic: 1) no it should work in the child style if you changed it in that postbit. Did you switch your forum view to that specific style? 2) yes. Google adsense is content based and it will show different ads for different threads. read google help or visit webmaster communities like www.theadminzone.com or www.digitalpoint.com for more infos and tips about adsense 3) that is generaly a bad idea because google is a guest too. If you block guest views google can't index your forum (you lose new visitors) and can't deliver targeted ads (you lose money). replace the condition at the beginning of my code with: Code:
<if condition="THIS_SCRIPT == 'showthread' AND $post[postid] == $GLOBALS['qrfirstpostid'] AND ($show[member]) AND $bbuserinfo['usergroupid'] == 'X'"> |
StarBug
thanks, i was not getting google targeted ads because my forum view is closed for guests. Thanks for that info. Cheers V |
Thanks........
|
nice thank you so much :D
|
I don't know if this is because I have some other modifications installed, but this breaks the multiquote feature on my boards for the posts below the AdSense ad. Can anyone else with it installed check to see if it's just on my board?
Edit: Nevermind. I managed to fix it - It had something to do with my postbit_wrapper template being screwed, but I figured it out :) |
Quote:
|
starbug can you help me?
|
*Installs* ...and good working :D StarBug :up:
|
Quote:
|
@Mrdby: That totally depends on your problem. First step would be to tell me where I should help you ;)
Edit: Wrong thread. Check my reply in the other thread ;) @jmw: remove the condition "AND (!$show[member])" and the whole 2nd part (either the member or guest part), depending on which advertising you want to show. |
Quote:
|
Very nice, thanks. Installs.
|
I have changed the condition to show the advertising on every page as second post, not just on page one.
The old condition was: Code:
<if condition="THIS_SCRIPT == 'showthread' AND $post[postid] == $GLOBALS['qrfirstpostid'] AND ($show[member])"> Code:
<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND ($show[member])"> StarBuG The hack is now version 1.1 Best regards StarBuG |
Quote:
|
I have just released an add-on for this mod.
ADD-ON: In addition you can add a Google Adsense link unit as last post of a thread on any page for members and guests. This advertising will only show if the thread has more then one post so that it does not show 2 advertisings directly below each other in case that the thread has no replies yet. Google Adsense has updated its ToS so that you are now allowed to use up to three link units on one page. So if you already use my "Adsense Link Unit in Navbar" Mod there woun't be a problem. I hope you like it. Let me know how it works out ;) StarBuG |
How does Google check for content to display content-relevant ads? Mine appears to not be working - it seems to ignore all the thread content. Every add is the same on all forums and is advertising "clutches" since my site title is Clutch Fitness.
|
They have a spider to fetch your content.
But it normaly takes 2-3 weeks for the ads to get relevant if you just started display them. |
is there a way to keep this from showing in some forums i dont want it in my staff area or some other forums
|
You could exclude forums by changing the condition like:
<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND (!$show[member])" AND !in_array($forum[forumid], array(16,17,18,19)> replace 16,17,18,19 with the forum IDs you don't want the ad to show StarBuG |
thnx man i will try this out
|
it didnt work for me i will do it on my test board later and post the error but it said a conditional error was there and none of my posts showed on my forums when viewing them
|
works fine without using the forums conditions
|
Thank you much! Wow, almost spiritual!:)
|
Thank you so much! Could anyone teach me how to not show ads to members at all please?
|
Quote:
<!-- Google AdSense in Posts for Members --> |
Anybody know whether this works on 3.6.8, I have the following code at the end of the postbit legacy template:
Code:
<if condition="$post['userid'] AND $show['member']"> |
Ok, I got your code to work. I have always used this expression in the past to exclude certain groups from seeing the ads:
Code:
<if condition="!is_member_of($bbuserinfo, 6, 7)"> |
You can't replace it, you need to ADD it to my condition ;)
|
I saw that the avatar image for the Advertising post (for guests) is a Firefox emblem.
Is that served by Google? Are there any valid 125 x 125 ad units that would ever be served there? Are there other 125 x 125 items that I can use? And, do you know of any way to customize the google_cpa_choice parameter? |
Yes, there are lots of Referral Images in all sizes and for numerous products.
I did not made the FF banner myself ;) What do you mean by "google_cpa_choice parameter"? |
All times are GMT. The time now is 05:22 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|