The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Variables in Hooks
I have a variable problem in a hook. Can anyone help with why case 2 or case 3 do not work? Thanks in advance for any replies.
Case 1 (Works fine) $test1 = "333"; build_something($test1, 0, 0) Case 2 (Does not work) $another1 is 333 when displayed in a template $test1 = $another1; build_something($test1, 0, 0) Case 3 (Does not work) $another1 is 333 when displayed in a template build_something($another1, 0, 0) |
#2
|
||||
|
||||
Very difficult to say when you aren't telling us which hook location and which template. It could be the variable for the template is rendered after your plugin and so the variable isn't available at the time.
|
#3
|
|||
|
|||
Quote:
It's as if this works: $test1 = "333"; build_something($test1, 0, 0) But this doesnt: $another1 = "333"; $test1 = $another1; build_something($test1, 0, 0) |
#4
|
||||
|
||||
Sorry, but what is above should work. If you want us to figure out why it isn't working, you'll need to be more specific and post code, hook locations, and template stuff.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|