PDA

View Full Version : Adsense as a poster on your forums


Keyser520
22 Feb 2006, 19:55
So I've been playing around a bit with my new vb board, and figured out how to make it appear as if the "advertiser" has the second post on every page.

You can play around with the code some more to change some of the messages from the ones I have on there (i.e. posts: location:, etc)

For kicks, I have the "online" icon set to say "Google is online", so change this tag if you want it to say something else.

This was designed for "legacy". I do not know if it works for the new forum layout

You can also ad a custom ad "Avatar" as well. Just replace the "<!-- IF YOU WANT TO GIVE THE AD AN AVATAR, BUT IT HERE -->" with the code for the avatar.

Add this code to the END of your postbit_legacy template

<if condition="$post[postcount] % $vboptions[maxposts] == 1">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead" style="font-weight:normal" align="left">
<!-- status icon and date -->
Sponsored Ads
</td>
<td class="thead" style="font-weight:normal" align="right">
&nbsp;
#<a><strong>1.5</strong></a>
</td>

</tr>
<tr valign="top">
<td class="alt2" width="175">

<div>

<a class="bigusername" href="">Advertisement</a>
</div>

<div class="smallfont"><div class="smallfont">Sponsored posting</div></div>
<div class="smallfont">
&nbsp;<br />
<!-- IF YOU WANT TO GIVE THE AD AN AVATAR, BUT IT HERE -->
</div>

<div class="smallfont">
&nbsp;<br />
<if condition="$post['joindate']"><div>$vbphrase[join_date]: the beginning</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: everywhere</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: really old</div></if>
<div>
$vbphrase[posts]: lots
</div>
</div>

</td>
<td class="alt1">


<!-- icon and title -->
<div class="smallfont">
<if condition="$post['title']"><strong>Sponsored...</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->

<!-- message -->
<div align="center">
<!--PUT YOUR ADSENSE CODE HERE -->
</div>
<!-- / message -->


</td>
</tr>
<tr>
<td class="alt2">
<img class="inlineimg" src="images/statusiconrunes/user_online.gif" alt="Google is online" border="0" />
&nbsp;
</td>
<td class="alt1" align="right">

<!-- controls -->
<!-- / controls -->
</td>
</tr>
</table>

</div>
$spacer_close

</if>

RichieBoy67
22 Feb 2006, 20:16
I like that!! Thanks

Moparx
22 Feb 2006, 20:19
you need to remove 'Keep the site running'. You are not allowed to have any text which asks or suggests to your members or guests to click adsense ads.

Keyser520
22 Feb 2006, 20:58
Thanks.

I replaced it with "Sponsored posting" but you could make it whatever you want.

GamerJunk.net
22 Feb 2006, 21:08
This is cool.

Keyser520
22 Feb 2006, 21:17
Thanks. It probably took me about 5 hours (off an on) to go through and figure out what did what. I'm pretty happy with it, though. I can do the same for the posbit normal rather than legacy if enough want it done, though no promises on how long it will take.. lol

Lineman28645
22 Feb 2006, 21:42
Great! I'll be using this!

Keyser520
22 Feb 2006, 21:47
The "avatar" spot that I included under the "poster name" is a great place to put something like the google firefox referal icon, ...

The Chief
22 Feb 2006, 23:32
lol, this is pretty cool, like it :)

might be installing this soon...

MagikMuzik
23 Feb 2006, 00:11
lol, this is pretty cool, like it :)

might be installing this soon...

looks great, might give it a whirl later on.

Smiry Kin's
23 Feb 2006, 02:15
thanks for saving me the work! i see this someone where was gonna make it :P very nice dude!

neutek
23 Feb 2006, 02:30
thanks! does this have support for horizontal user info view also?

influence
23 Feb 2006, 02:32
wasn't this created long time ago? I have seen few sites with it before

AshokForums.com
23 Feb 2006, 03:09
looks great mate..

kall
23 Feb 2006, 03:28
Thanks.

I replaced it with "Sponsored posting" but you could make it whatever you want.

Not true.


Incentives

Web pages may not include incentives of any kind for users to click on ads. This includes encouraging users to click on the ads or to visit the advertisers' sites as well as drawing any undue attention to the ads. For example, your site cannot contain phrases such as "click here," "support us," "visit these links," or other similar language that could apply to any ad, regardless of content. These activities are strictly prohibited in order to avoid potential inflation of advertiser costs. In addition, publishers may not bring unnatural attention to sites displaying ads or referral buttons through unsolicited mass emails or unwanted advertisements on third-party websites. Publishers are also not permitted to use deceptive or unnatural means to draw attention to or incite clicks on referral buttons.

yinyang
23 Feb 2006, 03:49
nice research kall. ahhhhh... the fine print. the fine print always bites you in the arse.

MissKalunji
23 Feb 2006, 05:03
nice research kall. ahhhhh... the fine print. the fine print always bites you in the arse.

lol yes they do

Smiry Kin's
23 Feb 2006, 05:58
can you make it show like this one?? say if you got a big thread, make it show more then once?

http://www.vbulletin.org/forum/showthread.php?t=106596

Keyser520
23 Feb 2006, 15:06
I'm confused. What fine print does this violate?

Smirky, the same if conditionals that Moparx used will work in the one I did as well. The real difference between the two is that mine is designed to LOOk like an actual post, where his is more of an inserted banner. It's just a matter of which style you want to use.

thedvs
23 Feb 2006, 17:27
thank you nice hack

Keyser520
23 Feb 2006, 17:36
If someone can explain to me what it is about my code that violates google TOS, I will change it so that's it's "legal".

I just don't know what the problem is yet..

Thanks.

Taylor123
23 Feb 2006, 18:49
has anyone tried installing it on 3.5.4?

Xplorer4x4
23 Feb 2006, 18:52
If someone can explain to me what it is about my code that violates google TOS, I will change it so that's it's "legal".

I just don't know what the problem is yet..

Thanks.
As far as I can tell it is legal so long as your not having more then 3 ad units on any page.

Keyser520
23 Feb 2006, 19:16
I haven't upgraded to 3.5.4 yet, but I will hopefully tonight or tomorrow. When I do so, I"ll post if it works on 3.5.4 or not. The only thing that might cause a problem is if the variable names changed. If so, I'll have a new version up in a couple of days time.

I am also thinking about making it so that the "post time" for the add shows up as the same time as the first post, and adding the code to cause it to NOT display if there are fewer than 5 posts for a page or something like that.... (I know someone did something like that somehwere---I just have to find it).

Moparx
23 Feb 2006, 19:20
If someone can explain to me what it is about my code that violates google TOS, I will change it so that's it's "legal".

I just don't know what the problem is yet..

Thanks.
It is fine now since you changed the wording that was used earlier :)
and adding the code to cause it to NOT display if there are fewer than 5 posts for a page or something like that.... (I know someone did something like that somehwere---I just have to find it).
The link to one of my templates in this thread has the code to do it if you want to use it.

Smiry Kin's
23 Feb 2006, 19:52
I'm confused. What fine print does this violate?

Smirky, the same if conditionals that Moparx used will work in the one I did as well. The real difference between the two is that mine is designed to LOOk like an actual post, where his is more of an inserted banner. It's just a matter of which style you want to use.

so how i do that?... o.0
p.s works ok on 3.5.4

misticjeff
23 Feb 2006, 23:46
Installed!!

Question: can a conditional be put in so that it does not insert for certain membergroups??? Like an <if> statement or something.... obviously you see i'm not a coder in any way.

Moparx
24 Feb 2006, 00:04
Installed!!

Question: can a conditional be put in so that it does not insert for certain membergroups??? Like an <if> statement or something.... obviously you see i'm not a coder in any way.
Change:
<if condition="$post[postcount] % $vboptions[maxposts] == 1">
To:
<if condition="is_member_of($bbuserinfo, 1,2) AND $post[postcount] % $vboptions[maxposts] == 1">

currently it is configured to groups 1 & 2 so it will show for the guest and registered user usergroups

kall
24 Feb 2006, 02:26
If someone can explain to me what it is about my code that violates google TOS, I will change it so that's it's "legal".

I just don't know what the problem is yet..

Thanks.

Have you asked Google if presenting the ads in this way violates their TOS?

They emailed me to advise that presenting the ads in such a way as to make it appear the Google Adsense was a Poster was, in itself, a violation of the TOU.

No 'click here' or anything to be seen, just EXACTLY what you have done here. It is against the TOU to make the adsense appear to be a poster.

Keyser520
24 Feb 2006, 13:37
Well, if it's against the Google TOU, then don't use it. I will email them to see what they say about it. I read the TOS and didn't see how it violated it, but I could have missed something.

However, I'm sure it could be used for other advertisement purposes... if you use other providers, or the like.

Smiry Kin's
24 Feb 2006, 14:14
it isnt agaisnt it, google can bann you with out contacting you, tell you, and replying to your future emails, theres nothing you can do, google adsense is crap full stop, i use this for other adsense sites, far more better. :)

Keyser520
24 Feb 2006, 16:51
What sites would you recommend that are far better?

Keyser520
24 Feb 2006, 16:59
Moparx...what would the if statement be in order to have it check for how many replies are on that page? i.e. so that it shows if you have more than 5 replies on a page rather than more than 5 replies total?

Smiry Kin's
24 Feb 2006, 17:07
What sites would you recommend that are far better?

depends what your sites about? if its porn theres some nice places, if not, theres a few. im currently on two of them, one only open to large sites, other, is publicly.

Moparx
24 Feb 2006, 18:45
Moparx...what would the if statement be in order to have it check for how many replies are on that page? i.e. so that it shows if you have more than 5 replies on a page rather than more than 5 replies total?
Add this to the end of your conditional
AND $GLOBALS[threadinfo][replycount] >= 5

Keyser520
24 Feb 2006, 19:04
smirky, it is NOT porn. So what are the sites?

Moparx.. That conditional sets it for 5 posts or more in the whole thread. I want to do it as 5 posts or more per page. In other words, if the thread has 1 2 3 or 4 posts, no ad is shown, but at 5 or more, then and add is shown. If a thread shows 20 posts per page and there are 21 pages, then page 2 shows 1 posts and 1 add...but I don't want it to show the ad UNTIL there are 5 posts on page 2.... and the same for each subsequent page...

Does this have to be done as some kind of formula such as:

(last thread number shown on current page) mod (total replies shown per page) >=5

If so, then what are those variables stored as?

theodonnells
26 Feb 2006, 17:00
I installed this and it worked fine, but my pages seemed to hang a little before they loaded.So have uninstalled it....

Smiry Kin's
26 Feb 2006, 21:59
I installed this and it worked fine, but my pages seemed to hang a little before they loaded.So have uninstalled it....

thats your adds, if you use slow loading ones..

Keyser520
27 Feb 2006, 15:10
theodonnells, try changing the ad type you are displaying, play around with image vs links vs text and see if any give you faster loading time?

thedvs
28 Feb 2006, 21:11
i inserted mine and if the quick reply click icon is enabled
the 3rd post qr icon doesnt seem to work..

Keyser520
28 Feb 2006, 21:17
I haven't come across that error. I have quick reply enabled on my forums and it works just fine www.runeescape.net/Escape


Honestly, I'm not sure how to diagnose that one...any experienced coders around that could take a look at that?

mholtum
28 Feb 2006, 23:33
Any news on the postbit version?

mikehawk
28 Feb 2006, 23:49
Thankyou! *installed*

faisj
02 Mar 2006, 16:38
I really have no idea where to place this php code?
( in witch file should I add it )?

my forum: www.twentyfourforum.com

Keyser520
02 Mar 2006, 16:48
As far as the postbit version goes, Id suggest using one of the other adsense codes that has been shown here, as they already look a lot like the postibit. This one was designed for legacy.

You add it into your postbit_legacy template. Go to the admint cp, styles manager, and find that template. Add the code at the END of that template.

wwwdjrcs
04 Mar 2006, 02:51
Works great, thanks

http://forum.djrcs.com

indie
04 Mar 2006, 03:29
Nice! But do you know why in Firefox, the google ad "sometimes" has a white strip underneath it. Try refreshing a few times, and wait for it to appear. Using the leaderboard.

wwwdjrcs
04 Mar 2006, 06:11
How come I get a red "x" where the picture says that Google is online?

icare
05 Mar 2006, 20:46
Nice one *clicks install*

Can anybody help, I want to make that it shows after fist page on every page. Fo rnow i think ti shows on after fist post on first page...

and ohter thing i would like is that user name on top rather than havin on side as

per my setting my username is above the post not at the sides.

Please help...

Nathan2006
09 Mar 2006, 17:37
Thank you it looks great! :)

Install

HappyDJ
11 Mar 2006, 22:23
I can not get this to work at all!

I have opened the file postbit_legacy and at the very end of the file (after <!-- / post #$post[postid] -->) - I then added the code and inserted my adsence code. Then looked, but nothing!

so,

I then tried again but moved the code above the <!-- / post #$post[postid] --> - tried again and still nothing!

Can anyone please help?

bizpro
08 May 2006, 01:31
I want this to be the last post of every thread.

what do I do?

tanker300
08 May 2006, 06:01
Nice Nice Nice idea. It works for me when I paste in the postbit. My only question is the image area on the lower left "user_online.gif" does not show a image I want. I even changed the name to "user_onlines.gif" in the code and uploaded my preffered image and nothing. Just the red X. I changed permissions from 644 to 777 and still 0. How do we get an image to appear.

Bro_Joey_Gowdy
11 May 2006, 18:19
Any updates ?

brianmt
11 May 2006, 18:41
is there a way to make it do this in only certain forums?

Keyser520
11 May 2006, 19:16
THere are ways to do it in certain forums and to make it the last post etc, but I don't have those conditionals. The other adsense topics address those.

As far as the green "online" image goes, please right click on it and tell me it says the properties are? Or link me to your forum.

monkeywarplane
19 May 2006, 22:27
Works great, it's a nice personal touch to the site instead of just jamming the ads in. I am also getting the red-box-image-not-uploaded. My site is http://www.interbasket.net and the forums at forums.interbasket.net

Again, great hack... *clicks install

Stuart

P.S. Keyser520, have you emailed Google about whether this is a violation to their terms of service? This is a great install, but I don't want to risk my account being deleted because of it. I've actually taken out the parts that says sponsored posting and replaced it with advertisement, I think that'll help.

Kwak
23 May 2006, 20:53
Nice. Installed. Thankyou.

Hornstar
25 May 2006, 21:06
I just had an awesome idea. Have not installed it yet so dont know if its already got it.

Can you give this advertisement a sig?

Then I can add links to a donation, premium, advertise my other sites, rules, faq etc. and it will be in every single thread.

mholtum
25 May 2006, 21:16
Yes you can. Just add whatever you want to display as his sig.

FASherman
29 May 2006, 15:40
I am amazed at all of the people installing this, knowing it violates Google TOU and that you will all eventually be banned.

When will the madness end?

almukmin
02 Jun 2006, 05:11
How more dorky + geeky can someone be?

Anyway, I was wondering if someone can mod the code so that it displays at the end of the page.

As the last post to be exact.

Areku
06 Jun 2006, 09:29
I am amazed at all of the people installing this, knowing it violates Google TOU and that you will all eventually be banned.

When will the madness end?


Does it!?!?!

Where? Why?

Wondering from un-knowledge, not because of untrusting you.

Thanks!

almukmin
07 Jun 2006, 02:31
Last post please.

ZrH
07 Jun 2006, 22:27
does this work for 3.5.4?? as i cant get it to work.. (im using a custom template, not sure if it makes a difference).

Crissy18
07 Jun 2006, 23:55
does this work for 3.5.4?? as i cant get it to work.. (im using a custom template, not sure if it makes a difference).

I couldn't get it to work either :confused:

Netdesignz
09 Jun 2006, 13:03
I have this working which is great as this is one of the first mods ive installed.

But as i am quite new to all this can you explain to how i make this advert the same size as all my other posts please as its looking a little out of place at the moment and i have no idea to change that.

http://www.netdesignz.org/showthread.php?t=12 shows what i mean.

RDX1
09 Jun 2006, 16:09
Could you make a non-legacy version?

kartik786
14 Jun 2006, 16:46
I remember i released SAME hack way back ...titled " google adsense optimised :) " or something and people pwned my a$$ .

Not only that, I got email from google to remove the damn thing :(

kall
14 Jun 2006, 20:08
I remember i released SAME hack way back ...titled " google adsense optimised :) " or something and people pwned my a$$ .

Not only that, I got email from google to remove the damn thing :(
You included your own google code in the template modification.

Not the best thing to do if you don't want to get banned from Adsense.

basskiller
14 Jun 2006, 22:50
anyone have this working in 3.5.4?

basskiller
16 Jun 2006, 00:17
I did a little bit more configuring to make it seem like a real user on the boards. It has fooled some into thinking we were hacked with some form of adware..LOL

But I had to place the code at the end of the template postbit
it wouldn't work in postbit_legacy on 3.5.4
I named him KHAN
http://www.worldclassbodybuilding.com/forums/showthread.php?t=22666

MaK10
20 Jun 2006, 12:44
i got an email from google yesterday it says im in violation of policy, but only in one of my forum sections cause its a "Not work safe" section, which I understand is against their policies so I need a slight conditional that only allows this code to post the adsense in as the 2nd post in everything except a certain forum id... can anyone help? Im searching around here, but any help would be appreciated. Thanks

*EDIT*

Nevermind, found the answer.

xec
26 Jun 2006, 02:03
i got an email from google yesterday it says im in violation of policy, but only in one of my forum sections cause its a "Not work safe" section, which I understand is against their policies so I need a slight conditional that only allows this code to post the adsense in as the 2nd post in everything except a certain forum id... can anyone help? Im searching around here, but any help would be appreciated. Thanks

*EDIT*

Nevermind, found the answer.So how did you do it? Thanks.

kall
26 Jun 2006, 03:37
<if condition="$forum[forumid] != 3">Blah blah</if>

That should work for forums...

category
12 Jul 2006, 06:38
where is the user ID so i can show for specific user groups?

Harley D
04 Aug 2006, 16:59
I am having a tough time getting the code to match my skin.

So I was thinking... What if you added a member, used your google adsense code in that specific members signature, then called the added member to post in the second post of each thread. similar to what the orginal code does.

Am I making sense? rather than having the original code in the postbit "in my case" create a fake member, have it call that specifc "Fake" member so it will match the layout and all skins.

can anybody help?

VBUsers
11 Aug 2006, 00:50
is there a working one for 3.6.0 ? i have installed this and its coming broken up.

Smoothie
15 Aug 2006, 04:18
Can someone update this for 3.6 please?

Jealousy10312
02 Sep 2006, 00:55
For some reason, my ad is messed up in the forums:

http://blabsource.com/showthread.php?p=551

Jealousy10312
02 Sep 2006, 00:55
Can anyone help us?

mrahul
02 Sep 2006, 11:20
so it will display posts as : lots or it will keep counting ??

Triggerhappy
07 Sep 2006, 15:20
Ive got it working on VB 3.6 all that needs to be changed is the location of the online icon.

find

images/statusiconrunes/user_online.gif

replace with

http://www.yourdomain.net/forums/images/statusicon/user_online.gif

Obviously changing it to where its located on your server.

Its seen here (http://www.eugaming.net) if you want to see how it works on a active board :)

tweakmonkey
08 Sep 2006, 10:04
Before anyone installs this that uses Google Adsense, they should definitely read the terms of service. You cannot put any words before an advertisement except the exact phrases, "Advertisements" or "Sponsored Links". I personally know people who have had their Adsense accounts terminated without warning for this exact offense. Just a heads-up.

Great mod, thanks. I installed it on VB 3.6 by editing the postbit_wrapper template.

---
Also, if you're using borders on your table cells of your forum (which I believe the default VB skin does...) you might want to add 1px borders to this fake post, or you'll be able to clearly see it's an ad.

navjotjsingh
10 Sep 2006, 14:17
Great mod, thanks. I installed it on VB 3.6 by editing the postbit_wrapper template.

---
Also, if you're using borders on your table cells of your forum (which I believe the default VB skin does...) you might want to add 1px borders to this fake post, or you'll be able to clearly see it's an ad.

What sort of editing you did for vb 3.6.0? Can you explain a bit...since I am not a expert at these things.

VBUsers
12 Sep 2006, 20:03
yea can some one tell me why this on 3.6 adds the adsense to every post in the thread. i just want it on the first post of everypage. who can help?

R.Solutions
16 Sep 2006, 07:14
Can this be usuable for 3.6.0

VBUsers
16 Sep 2006, 07:19
Can this be usuable for 3.6.0

yes i have it on 3 - 3.6 forums. i recommend this 100%

R.Solutions
16 Sep 2006, 19:17
Hmm well i tried, it and it messed up my board.

VBUsers
16 Sep 2006, 19:37
Hmm well i tried, it and it messed up my board.

what happened do you have a link for me?

Strafe
18 Sep 2006, 03:52
Any luck with the horizontal version?

CORSO
06 Aug 2007, 11:08
I have a problem with de margins, the adense post itīs small than others posts

LBSources
03 Dec 2007, 11:12
Any such hacks like this for 3.6.8?

Rob1986
22 Dec 2007, 18:30
Need update for vb6.8 please.

bijju
14 Jan 2008, 18:46
let me try this one

goranbaxy
20 Jan 2008, 21:43
Doesn't work for me, I don't see post :(

Yuvraj420
15 Sep 2008, 00:53
looking gud, thanx a ton

mholtum
15 Sep 2008, 01:02
Doesn't work for me, I don't see post :(
You have to set the usergroup perams.