The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Passing variable to a plugin?
Hey all
I hope someone can help me with this. I know how to create separate php files but can anyone tell me how I can pass a variable from the template to the php file? eg. how can I send the threadid to my php script so that I can use it there? Many thanks for looking and thanks in advance if you're able to help EDIT: OK. I've worked out that I need to use $vbulletin->userinfo['usergroupid'] type thing on the php file but what would that be if I wanted the threadid? I'm editing threadbit and FORUMDISPLAY if that helps. |
#2
|
|||
|
|||
Please can someone help me with this?
I'm editing the threadbit template as I'd like to add some additional information from new columns added to the thread table which will show on forumdisplay. I need to use the threadid in the database query on the plugin but there doesn't seem to be anyway that I can "pass" it through to the plugin? I can use {vb:raw thread.realthreadid} in the actual template but it doesn't seem to work in the plugin as it just comes out blank. Can anyone please tell me what I'm doing wrong? |
#3
|
||||
|
||||
In the plugin, you would use php, so $thread['readlthreadid'] would be used. (Hard to tell though since you have not said what hook location nor have you posted your code.)
|
#4
|
|||
|
|||
Thanks for the reply.
I managed to work it out though First time I've ever used vBulletin so taking a little time getting used to it especially as the documentation for 4.x seems to be next to nothing. $GLOBALS['threadid'] |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|