The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
An idea to the "Query Problem"
This work might be useless, and it might be difficult to understand it - but I wanted to give it a shot at least
We all know that is is difficult (and in most cases not possible) to modify queries through Plugins. IMHO this is a major problem for many hacks, and thus they will rely on file edits. Therefore, my idea was to create a Query Class to be able to manipulate queries. I did that ... but the class isn't fully implemented yet, nor optimized or anything. Consider it proof-of-concept code or a tech-demo. I took forumdisplay.php as an example and replaced all queries with this class. As there are many changes the instructions would become quite long and complicated, therefore I just created a unified diff file you can apply to an unmodified vBulletin 3.5.0 Beta 1 forumdisplay.php "Installation instructions" Upload class_query.php to folder includes. Execute Code:
patch<forumdisplay.patch Then upload the patched forumdisplay.php In order to use the new Hooks, you must add the following entries to hooktype forumdisplay in file includes/xml/hooks_vbulletin.xml: Code:
<hook>query_forumread_update</hook> <hook>query_forumusers</hook> <hook>query_announcements</hook> <hook>query_threadscount</hook> <hook>query_stickies</hook> <hook>query_getthreadids</hook> <hook>query_threads</hook> |
#2
|
|||
|
|||
Great Idea, though there is heaps of stuff to be done on this class.
Group by is the first one that comes to mind But this could be the first step towards database abstraction. |
#3
|
||||
|
||||
The class would indeed need a lot of work.
That's why I said it's just to proof the concept |
#4
|
||||
|
||||
Won't this add a lot of php processing time to every query ?
|
#5
|
|||
|
|||
the microseconds it adds are a tradeoff of flexability of database abstraction and or hacks not needing to modify even more things.
|
#6
|
||||
|
||||
LOL - When I suggested adding hooks to allow the replacing of some functions, I got shot down because "it would add extra processing time", which is exactly what this will do as well - oh well. :disappointed:
It's a nice idea, but I would be wary of the overhead it adds. |
#7
|
|||
|
|||
functions are slightly different. (though people who talk about peformance overheads of an if statement imo dont know what they're talking about)
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|