PDA

View Full Version : After first post and last post


Talk Hard
08-06-2016, 11:27 PM
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.