The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I am trying to put some text only after the first post in a thread for a specific forum . I've tried...
<if condition="$forum['forumid'] == 24 AND !$GLOBALS['FIRSTPOSTID']">text here</if> the only issue I am having is that it's appearing after the first post on every page for a thread that has multiple pages. is there a conditional that would include it only after the first post of the whole thread so that it wouldn't show on the 2nd page? thank you |
#2
|
|||
|
|||
![]()
How about including page number as part of the condition?
|
#3
|
|||
|
|||
![]()
Hi thank you for the reply.
I tried... <if condition="$forum['forumid'] == 24 AND !$GLOBALS['FIRSTPOSTID'] AND $pagenumber == 1"> but that didn't seem to work. Nothing showed up on any of the pages. wasn't sure if it's because I am not allowed to use multiple AND's? |
#4
|
|||
|
|||
![]()
I just looked at that because someone asked something similar a couple days ago. If you are putting your "if" condition in a postbit template, I don't think the page number is available, but you could use a plugin to make it available if you wanted.
|
#5
|
|||
|
|||
![]()
I found this
https://vborg.vbsupport.ru/showthread.php?t=208945&highlight=$pagenumber but does anyone know if that solution would cause any sort of additional db queries? Do you know which plugin that is? |
#6
|
|||
|
|||
![]()
That's the same kind of thing I was talking about except editing the file instead of a plugin.
No, it won't add any db queries. ETA: postbit_display_complete should work - of course you'd have to add a separate "global" line instead of adding to the existing one. |
#7
|
|||
|
|||
![]() Quote:
Is postbit_display_complete a template? Couldn't find it in the templates or in the php files? And would I add something like global $pagenumber; to the top of this file? Sorry for my igorance...pretty much know how to search for things but not much else... |
#8
|
|||
|
|||
![]()
No, I'm sorry I assumed you would know what I meant.
postbit_display_complete is a hook location, so you could create a new plugin and select that hook location and for the code use "global $pagenumber;" (you need a title so you'll remember what it is, and you need to select the "Yes" radio button on the bottom to activate it, but the other fields don't matter). You could also edit the class_post.php file like that post suggests if you want, but I think it's easier to manage upgrades if you avoid editing your php files. |
#9
|
|||
|
|||
![]()
Thank you very much!
![]() |
#10
|
|||
|
|||
![]()
Are you editing the postbit template? How about something like this at the end of the postbit template instead?
Code:
<if condition="$post[postcount] == 1"> <div style="padding-top:5px"> text here </div> </if> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|