![]() |
An idea to the "Query Problem"
1 Attachment(s)
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> |
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. |
The class would indeed need a lot of work.
That's why I said it's just to proof the concept :) |
Won't this add a lot of php processing time to every query ?
|
the microseconds it adds are a tradeoff of flexability of database abstraction and or hacks not needing to modify even more things.
|
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. :) |
functions are slightly different. (though people who talk about peformance overheads of an if statement imo dont know what they're talking about)
|
All times are GMT. The time now is 09:35 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|