The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Some way to edit a query without a hook?
So i've been updating my "All Topics" mod and got an excellent version going that needs no file edits working from vBulletin 3.6 through 4.0.7 just fine...
But in 4.0.8 (and I presume, above) vital code was changed in 1 part which kills my hopes for a mod requiring no file edits. I'm looking at forumdisplay.php at the forumdiplay_query_threadscount hook. The relevant code is: PHP Code:
PHP Code:
I thought about overriding the entire $threadcount variable in a plugin but there is no hook between the time the variable is given value and the time it's used. Are there any other tricks for this? Basically I need to change WHERE forumid = $foruminfo[forumid] to WHERE forumid IN ($myforums)... I know I don't usually visit the 4.x forums- let me find out what I've been missing. Also I'm 98% this is impossible but I wanted to confirm before I make people do manual file edits. |
#2
|
||||
|
||||
No other way to do it other than a file edit, AFAIK. If you wanted to add something to $hook_query_where, then yes, a plugin would work fine. But to change the query itself would need a file edit.
|
#3
|
||||
|
||||
Thanks... that's what I suspected... good news is I may not need to edit that query at all... Now I just have to deal with VB4 template difference... <no appropriate smiley exists for what I'm feeling right now.>
|
#4
|
||||
|
||||
You'll get it. I have faith in you.
|
#5
|
||||
|
||||
Something very advanced and drastic (due to some reference juggling), but I've actually used successfully, is to temporarily override the $db variable that way you can intercept the query that it makes and pass along the one you actually want to the original $db variable. No file edits! But complicated
|
#6
|
||||
|
||||
Wow.. if that's even half as hard as it sounds it's going to be beyond me... Luckily in this case after further evaluation I didn't need to change this particular query to begin with and the 1 query I had to alter I was still able to. So the VB4 version will not need file edits after all. :up:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|