The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
performance: postbit_display_complete hook
hello,
I face a performance problem with postbit_display_complete hook. this hook can't read from other hooks such as global_start and parse_templates? also this hook can't replace str from forum templates? I used a fetch_array function in parse_templates to declare variables fetching a template like below: PHP Code:
but if i but this code in postbit hook will execute each time postbit show.. so if I have a 10 posts within the page it's will give me 3*10= 30 queries! too much how can I solve this? I want to use the variables templates called by postbit_display_complete, but they don't work if I don't but the code in the hook. hope it's clear enough? sorry for my bad english thanks |
#2
|
||||
|
||||
Why use the postbit_display_complete hook if you don't want it run each time a postbit is displayed? I fyou only want it run once per page on a thread, then pic another hook location (a showthread_* one?). I don't see anything in that plugin that has to be run in the postbit hook location.
|
#3
|
||||
|
||||
I use postbit_display_complete becuase I need to execute some codes inside postbit
the only one I don't want to execute it each time a postbit displayed is the code above. but still I need to execute it once. Q. If I put the previous code in a showthread_* one I can use VARIABLES declared there in postbit_display_complete? |
#4
|
||||
|
||||
I would try putting that in a plugin that uses in the correct showthread_* hook location (one that is run after the postbit_* hook you are using to create the variables) and see what happens. You may have to use the variable $GLOBALS['yourvariable'], but I would try without doing that first.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|