vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Modifying specific post number in thread (https://vborg.vbsupport.ru/showthread.php?t=257332)

SirGeo 01-18-2011 07:52 AM

Modifying specific post number in thread
 
Hey all,

Trying to figure out how to insert code (an ad) in the 4th post signature.

Similar to First post sig ad location, but 4th post of each page.... Um, don't know what else to say..

Anyway i'm stuck.. I get that it will have to be inserted in the postbit, but how do I specify 4th posts of each page? postcount?

Is there a 'isforthpost' code? any other ideas I can try?

Thanks in advance.

Lynne 01-18-2011 07:13 PM

You would use the remainder operator. Look at post number divided by 4 and if remainder is 0 then do.....

http://php.net/manual/en/language.op...arithmetic.php

SirGeo 01-19-2011 02:39 AM

Done!

Just incase someone stumbles upon this asking a similar question...

Code:


<if condition="($post[postcount] -4) %25== 0">
</if>

shows up on the forth post of every page. (i'm set to 25 posts per page).


All times are GMT. The time now is 11:29 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.00990 seconds
  • Memory Usage 1,707KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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