vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do you add adverts under the first post of any thread? (see example) (https://vborg.vbsupport.ru/showthread.php?t=71127)

mcyates 10-29-2004 10:05 AM

How do you add adverts under the first post of any thread? (see example)
 
How do you add adverts under the first post of any thread? (see example)

If you look at the forum below, under the first advert there is a good advert. How doe he do it?

http://forums.digitalpoint.com/showthread.php?t=4496

AN-net 10-29-2004 10:10 AM

there was a post already about this, please use the forum search feature:)

mcyates 10-29-2004 10:28 AM

I did use the search. I always do before i post, but i couldn't find anything.

Beermonster 10-29-2004 01:40 PM

Quote:

Originally Posted by AN-net
there was a post already about this, please use the forum search feature:)

Where's the helping community spirit ;)

Here you go, in your postbit or postbit_legacy at the bottom find

Code:

<!-- / post #$post[postid] -->
Add after it

Code:


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

PUT YOUR CODE HERE


</if>


digitalpoint 10-30-2004 02:44 PM

I'm the one that did it in the example shown... I didn't use the $GLOBALS array, instead I did it like so:

Code:

<if condition="$post[postcount] % 10 == 1">
That lets you put it after whatever post you want, for example it could be == 4 if you want it to be after the 4th post. You could get a little trickier and take into account if users choose to display something other than 10 posts per page, but it was a 30 second job, and I was feeling lazy. :)

mcyates 10-30-2004 03:23 PM

Quote:

Originally Posted by digitalpoint
I'm the one that did it in the example shown... I didn't use the $GLOBALS array, instead I did it like so:

Code:

<if condition="$post[postcount] % 10 == 1">
That lets you put it after whatever post you want, for example it could be == 4 if you want it to be after the 4th post. You could get a little trickier and take into account if users choose to display something other than 10 posts per page, but it was a 30 second job, and I was feeling lazy. :)

Thanks guys

Which script did you use to get the posts to be separated from each other? Thanks in advance but i'm obviously crap at searching things.


All times are GMT. The time now is 07:13 AM.

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.01008 seconds
  • Memory Usage 1,725KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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