The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Connect to database before of global.php
Hi
I want connect to database before of include("global.php"); trying to use the same connection, How can I do it? In class_core.php have the functions to do it, in the 154 line of init.php is calling to the function connect(), and the info of connection in config.php, then is really dispersed the functions, the most near to one "class" is in class_database_explain.php, but nothing of them using it like include, is working for me Then Should I open a new connection? or not will be needed? or What files Should I include to open the existent conecction?, this before of load the global.php Best Regards and Happy New Year PHP Code:
Anyother idea? |
#2
|
|||
|
|||
Your are, as you point out, making two database connections which means more resources. Plus, you are double caching the global templates.
You may as well, or should, just run through global.php first and use what is already available rather then create the redundancies. |
#3
|
|||
|
|||
Quote:
Are there some way to get the templates after of global.php? without define the globaltemplates array before of global.php? or Is there some other array with the same function than globaltemplates but with the posibility to define after of global.php? |
#4
|
|||
|
|||
You can use the "cache_templates" hook to add a template to the cache.
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|