vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   After first post and last post (https://vborg.vbsupport.ru/showthread.php?t=323189)

Talk Hard 08-06-2016 11:27 PM

After first post and last post
 
I used to have some code on my 3version., it doesn't work on 4.

It would put an ad on the first post, then the last post.
If there was 2 or 20 on the page it adjusted to it automatically.

If someone could give me the code I'd greatly appreciate it. Thanks

MarkFL 08-06-2016 11:38 PM

If you are talking about both first and last posts on the page, then use:

$post['isfirstshown']

$post['islastshown']

If you are talking about the first and last posts in the thread, then use:

$post['postcount'] == 1

$post['postid'] == $post['lastpostid']

Talk Hard 08-07-2016 12:16 AM

I want the one for the page. This is the only code I need ? Is there something before and after I need to add in?

MarkFL 08-07-2016 12:21 AM

I gave you the conditions that will be true for posts meeting the criteria. These are the conditions that you can use in PHP code hooked at "postbit_display_complete" or within your postbit (or postbit_legacy) template in a template conditional.

Talk Hard 08-07-2016 12:22 AM

Never mind I got it thanks man!

blind-eddie 08-07-2016 12:40 AM

I liked your post Mark but, you just can't see that I liked it because I am liking to many of your post and therefore cannot like your post for now.


All times are GMT. The time now is 01:06 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.01178 seconds
  • Memory Usage 1,709KB
  • 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)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