The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Default text to display in every first post
I'm trying to display some text which will show in every first post in every thread, but I also only want it to display in a specific forum section. The id of the forum is definitely 22 and I've already found some code which apparently should work.
Here is the code I am currently using in the template "ad_showthread_firstpost_start". Code:
<vb:if condition="$forum[forumid] == 22"> This is the custom text. </vb:if> If I remove the if condition then the text displays fine, but it obviously then displays in every single thread on the site. I am testing this on a dev forum so the forums are turned off. I can't see that being an issue but thought worth mentioning in case. Any help would be much appreciated! Thanks. |
#3
|
|||
|
|||
Thanks for the help.
I hadn't tried that until you just suggested it but sadly it didn't make any difference. |
#4
|
|||
|
|||
Has anyone on here ever tried to get default text into the first post of every threads in a specific forum?
Must be someone on here! Any help on how to do it would be greatly appreciated, thanks! |
#5
|
||||
|
||||
Looking at the code, you cannot do this without a using a hook.
No variables other than the adsense details are registered for that template when its created, so you need to pre-register either $forum or $thread. PHP Code:
The 'postbit_display_complete' hook should be ok to use. |
#6
|
|||
|
|||
Quote:
Unfortunately I haven't done any work with hooks before so not sure where to start! Where would I find the 'postbit_display_complete' hook? Thanks again. |
#8
|
|||
|
|||
Thank you guys! That worked brilliantly.
Excellent help. Really appreciate it! |
#9
|
|||
|
|||
Is there any way to adapt this so that the text is entered into the post box while the user is typing the post?
I want to have default text in my for sale sections so users will know what is expected in terms of info. |
#10
|
||||
|
||||
Go search for the Stencil Mod. That should do what you want.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|