Quote:
Originally Posted by KirbyDE
Seems like you don't understand me, or I don't understand you
Let's say a Hack needs attachmentcache which isn't in $specialtemplates for the Script.
What should the Plugin do in order to get this?
|
Maybe just a crossed wire
1) The plugin that accesses a hook should do the standard thing it does to access the datastore item. (IIRC, $vbulletin->name) - however, it may need to be unserialized. I dont see an issue with unserializing in global_start.
2) The
product should add a row into the NEWTABLE table with relevant details of the datastore item. Name, Product ID, Scripts that the datastore item should be loaded on (THIS_SCRIPT names) and any other details that are needed - havent fully thought of them.
At this point, the datastore class for DB type will query the datastore table joining the new table into it looking for conditions that match to load extra items (or if it exists in $specialtemplates).
See query I posted above.
For the other datastore types,
(because there are no queries involved for other types) it should be as simple as querying the datastore table once (an extra query for one page load) to load the datastore item into the other types' storage method.
There is an issue with this in that if the datastore item updates in the datastore, the
product will have to deal with it gracefully and update the datastore properly, calling the datastore methods that do the magic they do.