PDA

View Full Version : Add Advertising after first post - Postbit Alteration


GoTTi
08 Sep 2006, 19:01
go into your postbit or postbit_legacy template and add this to the END of the template:


<if condition="!$GLOBALS['FIRSTPOSTID']">
<br>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">
Sponsored Links
</td>
</tr>
<tr>
<td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxx";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="xxxxxxx";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</td>
</tr>
</table>
</if>


Note: This example shows code for a google ad. you can remove the entire google ad and place a different code in there. perhaps phpadsnew code or some other advertising companies codes. whatever you like.

This is the standard code without ads inside.


<if condition="!$GLOBALS['FIRSTPOSTID']">
<br>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">
Sponsored Links
</td>
</tr>
<tr>
<td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<center>
------PLACE AD CODE HERE------
</center>
</td>
</tr>
</table>
</if>

Selene
08 Sep 2006, 20:08
Hi, thanks for this one!

*installed*

Dark Riku
08 Sep 2006, 20:25
does quick reply work with this?

Jesus05uk
10 Sep 2006, 18:17
How Can I make this only appear for guests?

Kintaro81
11 Sep 2006, 16:23
How Can I make this only appear for guests?

<if condition="!$GLOBALS['FIRSTPOSTID'] & is_member_of($bbuserinfo, 1)">

@Gotti
And for add advertising before last post?

DPSR
12 Sep 2006, 14:15
Yea i also want to know how to add advert after/before last post ?

LBSources
12 Sep 2006, 20:38
I had to disable this for all users as it conflicts with a quick reply issue ..

http://www.vbulletin.com/forum/showthread.php?t=197619&highlight=quick+reply+page+white

But enabling for GUESTS only makes it all better...

Just in case anyone else is having this issue.. its an FF issue.. not noticed in IE.

Farjad
13 Sep 2006, 21:52
Quick Reply Issue FiX:

<if condition="(!$GLOBALS['FIRSTPOSTID'] and !$GLOBALS['vbulletin']->GPC['ajax'])">

LBSources
18 Sep 2006, 20:11
quick question .. is it possible to set by FORUM ID where the ads should show up? similar to restricting it to certain usergroups, what if an array of forum ids equal that then dont show the ads ..

possible or too much to ask?

rezapci
18 Sep 2006, 21:16
thank you :)

LBSources
20 Sep 2006, 11:31
quick question .. is it possible to set by FORUM ID where the ads should show up? similar to restricting it to certain usergroups, what if an array of forum ids equal that then dont show the ads ..

possible or too much to ask?BUMP! ...

any ideas? :)

itsatonline
22 Sep 2006, 11:33
how can i add advertising aftar x post?

mkdevo
24 Sep 2006, 21:25
how can i add advertising aftar x post?

see this thread (http://www.vbulletin.com/forum/showthread.php?t=198875).

Mecho
26 Sep 2006, 21:05
Tnx for this great hack . but i have one problem .

how can i fix the size of ads so that it covers the whole area of the Sponserd links Box ? like the image that u attached !

tnx in advance

javo
27 Sep 2006, 18:36
Is there a way to exclude certain forums?
I see from the link I can enable it on forums specified but it would be easier if I could just specify the ones to not show up.

Thanks in advance.

farooqaaa
29 Sep 2006, 16:12
Thanks!!

Farooqaaa is clicking "Install"

ehsanix
29 Sep 2006, 18:43
thank u for this useful hack...

spipo
30 Sep 2006, 16:36
jello
I would like to put adense before "first thread" and after the "post reply boutton" .

like this exemple

http://img509.imageshack.us/img509/3324/ggggmg8.jpg



thanks to all

KevinLiles
15 Oct 2006, 21:41
Thank you

oldfan
16 Oct 2006, 17:25
why is it messing up my page format?
http://www.metallifukinca.com/showthread.php?p=48672#post48672

dieselpowered
16 Oct 2006, 20:18
Only problem with this hack is after you edit a post, you will notice the box stays but the content is gone. Hit refresh, and then all is good. Must be playing havok with the AJAX or something.

OoogleeMooglee
16 Oct 2006, 20:33
Is there a way to edit this so that it only displays the ad if someone actually replies to a thread? I have an ad that displays on the bottom of every forum page and when there is a new post with no replies, the ad shows up under the first post which (because there are no replies yet) ends up right on top of my bottom ad. Any thoughts?

oldfan
18 Oct 2006, 03:41
why is it messing up my page format?
http://www.metallifukinca.com/showthread.php?p=48672#post48672


bump :)

gamesmastervide
20 Oct 2006, 17:16
i read through that link but anyway to make it viweable by certain usergroups?? I have a vip system and I would like to remove ads for vips...

I tried this
<if condition="$post[postcount] == 1 AND in_array($GLOBALS[usergroupid], array(6,9,14))">

but it did not work no groups could see it i got the same prob for certain forums aswell using that code on the link provided in this post...

oldfan
24 Oct 2006, 06:31
bump :)

anyone?

toonysnn
25 Oct 2006, 02:00
Nice hack, installed.
I modified it a bit to show a bit diffrently like a normal post, to make it seem like someone is posting so they will read it :p Thanks.

Prince
05 Nov 2006, 17:03
Quick Reply Issue FiX:

<if condition="(!$GLOBALS['FIRSTPOSTID'] and !$GLOBALS['vbulletin']->GPC['ajax'])">

where exactly is this code supposed to go?

Mecho
05 Nov 2006, 18:46
Quick Reply Issue FiX:

<if condition="(!$GLOBALS['FIRSTPOSTID'] and !$GLOBALS['vbulletin']->GPC['ajax'])">

Tnx Man .. its ok now

Mecho
05 Nov 2006, 18:50
where exactly is this code supposed to go?


Find this code in postbit_legacy :

<if condition="!$GLOBALS['FIRSTPOSTID']">

Replace with :
<if condition="(!$GLOBALS['FIRSTPOSTID'] and !$GLOBALS['vbulletin']->GPC['ajax'])">

;)

UncoderMom
06 Nov 2006, 17:23
How do I get this only to show for showthread. Its gone all wacky in the new groups hack!

It was showing in my pms but that didn't bother me. I just don't know if it was a legal content area.

UncoderMom
11 Nov 2006, 17:31
anyone??

KipLarson
14 Nov 2006, 15:50
Does this work in 3.61? Also, is this a violation of Google's TOS? I can only assume it is not as Google themselves recommend placing ads after the first post on forum sites.

See this link

https://www.google.com/adsense/support/bin/answer.py?answer=43868

kman5428
14 Nov 2006, 18:20
Hey I'm using the above hack and love it, currently I use it to show PHPadsNew ads to only guest on the forum with this code:

<if condition="$post[postcount] % $vboptions[maxposts] == 1 AND !$bbuserinfo[userid]">


but I want to also show the ads after the last post on each page, how can I add that to the code?

KipLarson
16 Nov 2006, 22:01
Anyone know if this works with 3.61? Please respond :(

Mecho
16 Nov 2006, 22:13
Anyone know if this works with 3.61? Please respond :(


yes . it works

KipLarson
17 Nov 2006, 15:48
yes . it works

What about 3.54? I might try it on my 3.61 forum first. (Thanks by the way for the response)

KipLarson
19 Nov 2006, 20:28
Ok, I posted this on two of my forums, however I use vb advanced links directory and the ads are displayed after every single reply in the links directory.

It works fine in the forum though.

Here is the code I'm using:

<if condition="!is_member_of($bbuserinfo, 2, 3, 6, 7, 9, 10) AND !$GLOBALS['FIRSTPOSTID']">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="0px" cellspacing="$stylevar[cellspacing]" border="0" width="100%" <td align="center">
<tr>
<td class="thead" align="left">Sponsored Links: Log in or <a href="http://www.haloboards.com/register.php?">Register</a> to remove these</td>
</tr>
<tr>
<td class="alt1" align="center">

Adsense Ad here

</td>

</tr>
</table>

</div>
$spacer_close

</if>

So why is it showing up on after every reply in my links directory? I tried using an if conditional to not show it on that page, but I didn't do it right and can't figure out how to fix it. Any help please?

RealRnB
26 Nov 2006, 08:39
thanks

JohnGBSA
28 Nov 2006, 20:57
This is confusing me no end right now...

I added the code as the last thing in my legacy_postbit template, and made sure I replaced the adsense code with my own. However I get nothing when I look at my forum. No advertising at all.

I'm running 3.6.4 so I'm not sure if that has anything to do with it.

Any help would be apreciated.

/John

GFX Brands
07 Dec 2006, 00:53
i have a question

if i use a banner system already

i tried to put in my code

$bannerads

but no ads showed up any help ?

The Notorious
22 Dec 2006, 22:24
So this quick reply code is not showing a new page when the post limit is reached. I have a 10 posts per page limit and this keeps adding posts to the same page...

ra7al
13 May 2007, 05:26
Nice Work Perfect

seangworld
21 May 2007, 08:01
this doesnt work for me either. all i get is the blank space where the ad is supposed to go.

ehsanix
21 May 2007, 09:41
i'm using also post thank u hack
when the first post of a page is thanked the style of page goes wrong
why?

Icyeb
07 Jun 2007, 06:41
nice work got it to work, thanks for the fix

Concha
09 Jul 2007, 05:06
How show this mod only one forum?

esck
12 Jul 2007, 23:14
this hack is great, but I have a problem, ads are showing when checking private messages :S

Chuck Evans
22 Jul 2007, 15:17
Is there a way to place ads that are generated by the webmaster instead of google or others?

Thanks,

chuck

esck
31 Jul 2007, 20:52
anyone knows what can I do to prevent this?

bigraph
01 Aug 2007, 23:22
this isn't working for me at all, my vbulettin not supported?

http://shadowrunforums.com

rapidphim
09 Aug 2007, 00:23
nice one. Been looking for this. Thanks!

rayw
12 Sep 2007, 02:58
Works great. Thanks a lot. :)

directprint
07 Oct 2007, 14:21
Is there a way that this can be shown as the last post on the page instead of after the first.?

pspmaster93
19 Oct 2007, 01:15
how can i make it appear after EVERY post in EVERY forum for EVERY usergroup?

SBlueman
03 Nov 2007, 23:27
how can i make it appear after EVERY post in EVERY forum for EVERY usergroup?

Wow....you want to drive people away? I think they will get tired of that fast.

CLF
07 Apr 2008, 22:00
Interesting. I think I'm gonna try... :)

AtoZ
14 Jul 2008, 07:41
Just installed on 3.6.8 - works great. I used this conditional so it shows only to guests:

<if condition="(!$GLOBALS['FIRSTPOSTID'] and !$GLOBALS['vbulletin']->GPC['ajax']) and is_member_of($bbuserinfo, 1)">

GuyLewin
15 Jul 2008, 10:22
Thank you very much, worked like a charm.

shai321
05 Oct 2010, 14:05
thanks man, i searching that a long time!

Sworm
12 May 2011, 21:34
Is not aligned