PDA

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


GoTTi
09-07-2006, 10:00 PM
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
09-08-2006, 07:08 PM
Hi, thanks for this one!

*installed*

Dark Riku
09-08-2006, 07:25 PM
does quick reply work with this?

Jesus05uk
09-10-2006, 05:17 PM
How Can I make this only appear for guests?

Kintaro81
09-11-2006, 03:23 PM
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
09-12-2006, 01:15 PM
Yea i also want to know how to add advert after/before last post ?

LBSources
09-12-2006, 07:38 PM
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
09-13-2006, 08:52 PM
Quick Reply Issue FiX:

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

LBSources
09-18-2006, 07:11 PM
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
09-18-2006, 08:16 PM
thank you :)

LBSources
09-20-2006, 10:31 AM
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
09-22-2006, 10:33 AM
how can i add advertising aftar x post?

mkdevo
09-24-2006, 08:25 PM
how can i add advertising aftar x post?

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

Mecho
09-26-2006, 08:05 PM
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
09-27-2006, 05:36 PM
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
09-29-2006, 03:12 PM
Thanks!!

Farooqaaa is clicking "Install"

ehsanix
09-29-2006, 05:43 PM
thank u for this useful hack...

spipo
09-30-2006, 03:36 PM
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
10-15-2006, 08:41 PM
Thank you

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

dieselpowered
10-16-2006, 07:18 PM
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
10-16-2006, 07:33 PM
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
10-18-2006, 02:41 AM
why is it messing up my page format?
http://www.metallifukinca.com/showthread.php?p=48672#post48672


bump :)

gamesmastervide
10-20-2006, 04:16 PM
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
10-24-2006, 05:31 AM
bump :)

anyone?

toonysnn
10-25-2006, 01:00 AM
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
11-05-2006, 04:03 PM
Quick Reply Issue FiX:

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

where exactly is this code supposed to go?

Mecho
11-05-2006, 05:46 PM
Quick Reply Issue FiX:

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

Tnx Man .. its ok now

Mecho
11-05-2006, 05:50 PM
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
11-06-2006, 04:23 PM
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-11-2006, 04:31 PM
anyone??

KipLarson
11-14-2006, 02:50 PM
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
11-14-2006, 05:20 PM
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
11-16-2006, 09:01 PM
Anyone know if this works with 3.61? Please respond :(

Mecho
11-16-2006, 09:13 PM
Anyone know if this works with 3.61? Please respond :(


yes . it works

KipLarson
11-17-2006, 02:48 PM
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
11-19-2006, 07:28 PM
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
11-26-2006, 07:39 AM
thanks

JohnGBSA
11-28-2006, 07:57 PM
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
12-06-2006, 11:53 PM
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
12-22-2006, 09:24 PM
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
05-13-2007, 04:26 AM
Nice Work Perfect

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

ehsanix
05-21-2007, 08:41 AM
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
06-07-2007, 05:41 AM
nice work got it to work, thanks for the fix

Concha
07-09-2007, 04:06 AM
How show this mod only one forum?

esck
07-12-2007, 10:14 PM
this hack is great, but I have a problem, ads are showing when checking private messages :S

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

Thanks,

chuck

esck
07-31-2007, 07:52 PM
anyone knows what can I do to prevent this?

bigraph
08-01-2007, 10:22 PM
this isn't working for me at all, my vbulettin not supported?

http://shadowrunforums.com

rapidphim
08-08-2007, 11:23 PM
nice one. Been looking for this. Thanks!

rayw
09-12-2007, 01:58 AM
Works great. Thanks a lot. :)

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

pspmaster93
10-19-2007, 12:15 AM
how can i make it appear after EVERY post in EVERY forum for EVERY usergroup?

SBlueman
11-03-2007, 10:27 PM
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
04-07-2008, 09:00 PM
Interesting. I think I'm gonna try... :)

AtoZ
07-14-2008, 06:41 AM
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
07-15-2008, 09:22 AM
Thank you very much, worked like a charm.

shai321
10-05-2010, 01:05 PM
thanks man, i searching that a long time!

Sworm
05-12-2011, 08:34 PM
Is not aligned