Marvelous suggestion.. I removed the query out of showthread and into global. But one problem, we don't need the blobby ignorelist loaded with EVERY single page. So I made it dependent on whether it's showthread calling global.... like this:
In global.php change:
Code:
if ($userinfo=$DB_site->query_first("SELECT daysprune,lastvisit,lastactivity,cookieuser,username,password,usergroupid,timezoneoffset FROM user WHERE userid=$bbuserid")) {
to
Code:
if ($userinfo=$DB_site->query_first("SELECT daysprune,lastvisit,lastactivity,cookieuser,username,password,usergroupid,timezoneoffset".$queryinsert." FROM user WHERE userid=$bbuserid")) {
At the top of showthread.php add
$queryinsert=",ignorelist";
right above
require("global.php");
This will add ignorelist onto the global query only when showthread is the one calling. Then go into showthread.php and change the first part of the hack to:
Code:
// IGNORE HACK ************************************************************************************ IGNORE HACK
if ($bbuserid) {
if (!$cancelig) { // if Ignore processing is on:
$ignorelist = split("\n", $userinfo[ignorelist]);
while (list($key,$val)=each($ignorelist)) {
$val = trim($val);
$ignore[$val] = "yes";
}
$resumeignore = "<smallfont><b>Kill File:</b> ON - <a href=\"" . $REQUEST_URI . "&cancelig=on\">Bypass Ignore Processing</a></smallfont>";
} else { // if it's off:
$resumeignore = "<smallfont><b>Kill File:</b> OFF - <a href=\"showthread.php?threadid=$threadid\">Resume Ignore Processing</a></smallfont>";
}
}
//
And that will remove the query from showthread. If this works for you VT I will change it in the overall hack. I mean I have tested this fix and it works, but lets see how it does on a board with more traffic.
P.S. Please take a look
this thread in our Shark Tank. It's about message board communites and how we handle our problem users. Feel free to leave your own comments as owners of large message boards, you don't need to register for the Shark Tank. (The tank is our catch all for crap posts-- we never delete anything, just move it to the Tank in the spirit of free speech.)