this is a VERY resource thirsty hack. It adds an sql query to EVERY post!
What you want to do is forget about adding 'uignore' to the user table.
Instead, add it to the 'setting' table:
varname=uignore
vale = list of space-delimited userids
Same as IP banning.
This way, it won't add ANY queries AT ALL (because all the settings are loaded).
Instead, you'll need to add a 'checkuignore' function that explodes $uignore, and the bb admin will add the users via the Admin CP Options page -- again, exactly like ipban or emailban.
The other alternative is creating a usergroup "global ignore" and then usering the $userinfo[usergroupid] -- again, this is globally loaded so there won't be a need for additional queries.
Either way, your current method is highly unrecommended. On a thread with, say 40 or more posts, you are looking at adding 40 or more SQL queries!!! :stupid:
|