The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
which hook I should use, to take a variable in postbit and SHOWTHREAD
I use this php code in showthread_complete hook and work in SHOWTHREAD template
PHP Code:
some idea? I need the variable $userdok created using my custom field in thread table.. and that result use to in postbits template..... and I not want to make a SQL sentency for know that field of the table for each postbit Thank You |
#2
|
||||
|
||||
showthread_complete is after the postbits have been evaluated. You need to get that data before postbits are evaluated, then in postbit(_legacy), use $GLOBALS[userok].
|
#3
|
||||
|
||||
excelent, then I need to use showthread_post_start (yeah, now work) I'm always forget that in postbit I need use $GLOBALS
Thank you |
#4
|
|||
|
|||
Is a HOOK the same thing as a EVENT?
Hooks get fired, the same way events get fired? |
#5
|
||||
|
||||
I'm not sure what an Event is. If you look at a vB script, php page, you will see 'hooks' scattered throughout. Those are places you may insert your own php code through the use of plugins. You may want to read up on Products and Plugins in the manual.
|
#6
|
|||
|
|||
Quote:
like there is a Page_Init event, Page_Load, Page_PreRender, etc... you can wire up methods to those events.... something like Code:
override protected void OnInit() { this.PreRender += new EventHandler(this.Page_PreRender); } void Page_PreRender() { throw new Exception("Your Method Executed!"); } |
#7
|
||||
|
||||
OK, I guess they are kinda similar. Hooks are page specific, although sometimes the hook is in a page that is run on several pages (like if the hook is in global.php). Like, if you hooked into the hook "member_start" then you are adding code to the beginning of the member.php page, so it only gets executed then. If you hooked into the hook "global_start", then you are adding code to the global.php page which gets executed on nearly every page.
|
#8
|
||||
|
||||
Quote:
|
#9
|
||||
|
||||
if you look this like a programmer, yes, the hook its like a event beacuse you can add code when something is happening
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|