vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Ad after first post (https://vborg.vbsupport.ru/showthread.php?t=69863)

blueuniverse 09-25-2004 01:56 PM

Ad after first post
 
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.

HTML Code:


<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

1 Attachment(s)
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/showth...9&page=1&pp=20


The code for this is basically the following

Code:

<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:

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

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" 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

Code:

</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....07&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?

Code:

<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

Quote:

Originally Posted by RichieBoy67
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 :)


All times are GMT. The time now is 04:49 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
  • Page Generation 0.01127 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (24)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete