The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How do I get threadid from showpost?
vB4.2
I'm creating a new plugin that needs the threadid of the thread the user is currently viewing. I have read this article: https://vborg.vbsupport.ru/showthread.php?t=228078 I am unsure what to preregister for threadid and what variable to use on the template. The hook I've tried is at showthread_complete. I have tried all kinds of different vars and none seem to work. Search function grabs all kinds of answers but I think I am trying them out of context. $threadid thread['$threadid] {vb:raw thread.threadid} {vb:raw threadid} /head explodes. Any ideas? |
#2
|
|||
|
|||
In your plugin code you can use $threadinfo['threadid']. If you want to use it in the SHOWTHHEAD template it's already registered, and you can use {threadinfo.threadid}. You would only need to register it if you're rendering a custom template, in which case you'd use register() (not preRegister). If you really do want to preRegister to one of the other existing vb templates (e.g. header, headinclude, footer), then you might want to use hook parse_templates (but it really depends on exactly what you're trying to do).
|
#3
|
|||
|
|||
Thank you!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|