Announcement

Collapse
No announcement yet.

How do I add a random banner after the first post of a thread?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • toolmanwill
    replied
    Ok i made the edit to have this show every 1st post and to array of users but its still showing for everyone, i need it to show for only usergroup ids 2, 5 and 6 abd coded it accordingly but it still shows for everyone.

    Thanks in advance.

    Leave a comment:


  • h2ojunkie
    replied
    Ok, I've got one.

    I'd like to show a banner between the last, and 2nd to last post on every page of a thread, no matter how long the thread is, or what the user has selected in their options for max posts.

    For example.

    Forum default setting for max posts is 10

    User A has set their options to display max of 40 posts.

    Thread A is 6 posts long - the ad should show between post 5 and 6

    Thread B is 1 post long - the ad should show directly after the 1st post since there is only one post in this thread

    Thread C is 50 posts long - For a guest, the add would show on page one between post 9 and 10, on page 2 between posts 19 and 20 (which would be the 9th and 10th posts shown on that page), and so on.
    For User A that has max posts set to 40, the ad would show between posts 39 and 40 on page one, and between posts 49 and 50 on page 2 (which would be the 9th and 10th posts shown on that page)

    Basically, I'm looking for a way to show an add as the 2nd to last post no matter what page they are on, what their max post options are set to, and if the thread is only 1 post long, the ad would still show right after the 1st post until more posts are made in that thread.

    Leave a comment:


  • Jose Amaral Rego
    replied
    Do a check to see what you have and compare to see if your custom coding has been updated to vb3.5.3 and check www.vbulletin.org if you have hacks.

    http://www.vbulletin.com/forum/forumdisplay.php?f=107

    Leave a comment:


  • hdtvoice
    replied
    any devs help me?

    i have these mods installed to show the banners... but im running 3.0.8

    can i upgrade t 3.5 without any issues?

    Leave a comment:


  • hdtvoice
    replied
    crap, i was just about to upgrade to vbulletin 3.5.3... but since i have these hacks installed, should i not do it now?

    Leave a comment:


  • Jake Bunce
    replied
    I haven't had to chance to port this to version 3.5. I will probably update all of my template mods after the final release.

    Leave a comment:


  • jmvb
    replied
    It appears these instructions are not for 3.5 RC3 given the many users having problems with it at vbulletin.org

    Leave a comment:


  • beano33
    replied
    Thanks Jake, that's just what I was looking for.

    Leave a comment:


  • Jake Bunce
    replied
    Originally posted by beano33
    I'm displaying an ad after first post in a thread using the postbit. I'd also like to show an ad after the last post using showthread. Seems simple enough, but it gets tricky. The ads can not be displayed on the same page or it will be a TOS violation. I need a conditional so the ad after the last post will not display when an ad after the first post is shown. In other words whatever ad code I put in showthread has to be blocked if the code in the postbit is being displayed. Anyone know how to do this? Thanks!
    So it will be on every page except the first page?

    In the SHOWTHREAD template:

    Code:
    <if condition="$pagenumber > 1">
    
    </if>

    Leave a comment:


  • beano33
    replied
    I'm displaying an ad after first post in a thread using the postbit. I'd also like to show an ad after the last post using showthread. Seems simple enough, but it gets tricky. The ads can not be displayed on the same page or it will be a TOS violation. I need a conditional so the ad after the last post will not display when an ad after the first post is shown. In other words whatever ad code I put in showthread has to be blocked if the code in the postbit is being displayed. Anyone know how to do this? Thanks!

    Leave a comment:


  • djwins
    replied
    Success!

    Thanks a lot, you are the wind beneath my wings!

    Leave a comment:


  • Jake Bunce
    replied
    I am running out of colors!

    Try adding the orange code (parenthesis):

    Code:
    <if condition="($post[postcount] % 10 == 0 OR $post[postcount] == 1) AND !$bbuserinfo[userid]">
    
    $spacer_open
    <div style="padding:0px 0px $stylevar[cellpadding]px 0px">
    
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
    	<td class="thead" align="left">Sponsored Links</td>
    </tr>
    <tr>
    	<td class="alt1" align="center">
    		BANNER CODE HERE
    	</td>
    </tr>
    </table>
    
    </div>
    $spacer_close
    
    </if>

    Leave a comment:


  • djwins
    replied
    Jake,
    I tried the code and it is showing ads (every 10 posts) to logged in users.
    Thanks!

    Leave a comment:


  • Jake Bunce
    replied
    Add the purple code:

    Code:
    <if condition="$post[postcount] % 10 == 0 OR $post[postcount] == 1 AND !$bbuserinfo[userid]">
    
    $spacer_open
    <div style="padding:0px 0px $stylevar[cellpadding]px 0px">
    
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
    	<td class="thead" align="left">Sponsored Links</td>
    </tr>
    <tr>
    	<td class="alt1" align="center">
    		BANNER CODE HERE
    	</td>
    </tr>
    </table>
    
    </div>
    $spacer_close
    
    </if>

    Leave a comment:


  • djwins
    replied
    Now, this is the money shot...I tried to fake it but I couldn't get it to work.
    I thought this would do it.
    Code:
     <if condition="$post[postcount] % 10 == 0 OR $post[postcount] == 1 && !$bbuserinfo[userid]">
    How do you get the ads to display with all the following criteria:
    1) To guests
    2) after first post
    3) every 10 posts

    Thanks!
    Last edited by djwins; Wed 3rd Aug '05, 5:29pm.

    Leave a comment:

widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X