The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Plugin System Design Hole
Am I the only one thats noticed you cant use a plugin to modify the $specialtemplates via plugin prior to their first call through init.php
This means regardless, I have to use atleast 1 query if I have anything extra that I need for the hack ie. a datastore item; that could have otherwise been fetched on the initial run. Gotta love plugins. ps. Yes I know plugin code is stored in the datstore itself which would present the flawed logic of "Cannot modify specialtemplates prior to init due to the fact the plugin code for the specified hook has to be fetched before it can be evald into modifying anything." Thus the answer would seem that plugins need to be stored somewhere other than the datastore; so it can be used prior to init.php |
#2
|
||||
|
||||
check through Andreas' hacks, you are not the only one
|
#3
|
|||
|
|||
See for discussion: CODERS PLEASE DISCUSS!!! Pre-Datastore modifications with XML-files (UPDATE 28-7)
PS A finished implementation is now not released by Andreas anymore, Brad has taken over this one: [developers] Custom datastore support for products |
#4
|
||||
|
||||
There are many ways to get round it - the easiest being to add a line at the bottom of config.php.
Personally I think you could just use the XML system that bitfields, cpnav etc use - it just looks for xml files of the form datastore_xxxx.xml Inside those XML files is Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <datastore product="xxxxxxx"> <script> <load>spiders_wol</load> <load>other_item1</load> </script> <script name="zzzzzzz"> <load>other_item2</load> <load>other_item3</load> </script> </datastore> The script tag 'name=' is checked against "THIS_SCRIPT" and if matched, all the datastore items specified in load tags are loaded. If the script tag has no name parameter then it is always processed. You no longer need a $specialtemplates array at all then, since vbulletin would have a default database_vbulletin.xml Just an idea, allthough I've actually thought of doing this for myself to test it, but not got round to it yet. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|