![]() |
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? |
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).
|
Thank you! :)
|
All times are GMT. The time now is 06:51 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|