PDA

View Full Version : Ad after first post


blueuniverse
09-25-2004, 01:56 PM
I have looked about for the last 30 mins, but I didn't manage to find a thread like this, that allows you on vb3, to have some ad space after the first post in the thread.

I am pretty sure this is possible, with conditionals, but how would you do it?

Dean C
09-25-2004, 02:29 PM
Questions about modifying vBulletin's default behaviour and asking about modifications in general, should be posted in General vBulletin Questions. Please read the forum descriptions more carefully in future. I've moved your thread there for you :)

Thanks,
- Dean

blueuniverse
09-25-2004, 02:31 PM
sorry about that, I've got a lot of browser windows open on this forum, must've accidently posted in the wrong one.

Milorad
09-25-2004, 04:12 PM
Put this at the END of your postbit (or postbit_legacy) template. The ad will only be displayed after the first post in each thread.



<if condition="$post['postid'] == $thread['firstpostid']">

Your Ad Code Goes Here

</if>

blueuniverse
09-25-2004, 04:30 PM
Thanks, I'll give that a go.

blueuniverse
09-25-2004, 05:14 PM
Yeah, that worked brilliantly. Thanks

blueuniverse
09-29-2004, 02:34 PM
Ok, it did work rather well....but I need a bit more help.

It is reasonably OK, but, when it shows on private messages, it displays like this (ridhproblems.gif)

The 2 problems with this, are that it goes to the side a bit (the sponsors box, which is the bit after the first post), and also there is no break.

Included, is a pic of how I want it to look (ridhright.gif). It displays like this on normal topics, although, topics with only 1 post, still have the line gap problem.

E.g. of how it is displayed right... http://www.rouseindahouse.com/showthread.php?t=69&page=1&pp=20


The code for this is basically the following


<if condition="$post['postid'] == $thread['firstpostid']">
<!-- text advertising -->
<div id="posts">
<div align="center">
<div class="page" style="width:100%; text-align:left">
<div style="padding:0px 25px 0px 25px">
<div style="padding:0px 0px 6px 0px">
<table class="tborder" cellpadding="6" cellspacing="0" border="0" width="100%" align="center">
<tr> <td class="thead" style="font-weight:normal" ><strong>Sponsors</strong></td> </tr>
<tr>
<td class="alt1" align="center">
Google ads script here (not pasted)
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</if>


This is at the bottom, of the postbit template, as well as the postbit_legacy.

What would the problem be?

blueuniverse
10-01-2004, 05:58 AM
*bump*

JuicyDuff
10-18-2004, 07:43 PM
I'm having a few problems as you can see at: http://www.forum.juicyduff.com/showthread.php?t=32

What I want is the bg around the banner to be the same as the bg of the banner (AED1D7) and the bits outside the border ... please help!

Here is the post bit code:

</if>
<!-- / post #$post[postid] -->
<if condition="$post['postid'] == $thread['firstpostid']">
<table class="tborder" cellpadding="6" cellspacing="0" border="0" width="710" align="center"> <tr> <td class="thead" style="font-weight:normal" ><strong>Sponsors</strong></td> </tr>
<tr>
<td class="alt1" align="center">
(adsense code here)
</td>
</tr>
</table>

</if>

JuicyDuff
10-18-2004, 09:38 PM
No one here to help?

Natch
10-18-2004, 11:46 PM
</if>
<!-- / post #$post[postid] -->
<if condition="$post['postid'] == $thread['firstpostid']">
<table class="tborder" cellpadding="6" cellspacing="0" border="0" width="710" align="center"> <tr> <td class="thead" style="font-weight:normal" ><strong>Sponsors</strong></td> </tr>
<tr>
<td class="alt1" style="background-color:#AED1D7;color:inherit" align="center">
(adsense code here)
</td>
</tr>
</table>

</if>

JuicyDuff
10-19-2004, 05:53 AM
Hey thanks alot Natch :) ... that solved 1/2 of the problem :)

How do I get rid of the dark green bits around the table and replace it with the normal bg and kill the border around the table?

JuicyDuff
10-19-2004, 05:56 AM
Actually I just want the dark green bits gone mainly

The other problem

1) Move the area below the banner by 1 (like it is above the banner)

Natch
10-19-2004, 11:32 AM
</if>
<!-- / post #$post[postid] -->
<if condition="$post['postid'] == $thread['firstpostid']">
<table cellpadding="6" cellspacing="0" border="0" width="710" align="center">
<tr>
<td class="thead" style="font-weight:normal" ><strong>Sponsors</strong></td>
</tr>
<tr>
<td style="background-color:#AED1D7; color:inherit" align="center">
(adsense code here)
</td>
</tr>
</table>
<div style="padding:3px 0 0 0"></div>

</if>Try that...

Roms
10-19-2004, 03:36 PM
Thanks... Added a banner. :)

blueuniverse
10-28-2004, 08:17 PM
Could I bump this for a solution to my problem. Its still showing up as here.

https://vborg.vbsupport.ru/showpost.php?p=557107&postcount=7

Also on the PM display it is showing up which is good, but it is affected by that problem, and also both the left and right hand sides are padded.

Any ideas?

bgray
11-13-2004, 06:42 PM
Anyone know what the code would be for 2.2.x ?

petertdavis
12-01-2004, 03:45 AM
I can't seem to get this to work in 3.0.3. I edit the postbit template, add this to the bottom, insert adsense code, and nothing. Is it because of something changed in 3.0.3, or something I'm not doing right?


<if condition="$post['postid'] == $thread['firstpostid']">

Your Adsense Code Goes Here

</if>

petertdavis
12-01-2004, 11:51 AM
Heh, shouldn't work when I'm so tired, it's working now.

eva01_
04-09-2005, 03:29 PM
it is against the rules to show entire templates in your post

and do as post 18 stated

RichieBoy67
04-09-2005, 03:31 PM
Sorry Gestapo.... lol

Obviously I tried what post 18 said... If it worked I wouldn't have posted....

There I took away half my template.....

eva01_
04-09-2005, 03:33 PM
Sorry Gestapo.... lol


Obviously I tried what post 18 said... If it worked I wouldn't have posted....

There I took away half my template.....

its against Jelsofts policy, gets your license revoked, so i not being the gestapo

and did it show nothing? after you added the code

RichieBoy67
04-09-2005, 03:35 PM
forget it.... thanks anyways but I can figure it out... I just didn't sleep much... seems easy and I am just being lazy...

There... done... I just had to think a little...lol

monkeyjoe
04-12-2005, 08:59 PM
BRAVO firs topic i looked at and i needed it thanks :)