The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||
********** Kill File Hack v1.0 **********
vB Code Base used: v1.1.3 Author: ~shabang~ In action @ http://www.overgrow.com/edge/index.php Latest version: http://www.overgrow.com/archive/KillFile.zip The Kill File is an addition onto the wildly succesful PM hack. This would not be possible without the fine work of Mike (Ed) Sullivan. Some parts (a query or two) are pulled from his code. ** The PM hack is a pre-requisite to installing the Kill File. ** ** DO NOT PROCEED unless you have Private Messaging ** http://www.vbulletin.com/forum/showt...?threadid=1772 *********************************** Design Document: Overall: -Allow any registered and cookied user to selectively ignore any poster. -The handle ignored can be either registered or unregistered. -Allow a global setting to ignore all unregistered users. Ignore List: -Database is already in place with PM, just need to integrate with forums. -User can edit the ignore list in PM. -After editing ignore list, user is sent back to the original thread. Ignore Mechanism: -At the bottom of every post will be an ignore button to turn it on. -If a post is ignored, the message will not be displayed. -Instead of the message a link to bypass the ignore setting is used. -This link would then display the message regardless of the ignore. This install will add 1 template: postbit_ignored Edit 4 templates: postbit, showthread, redirect_pmignoreedited, showignore and Edit 2 PHP files: private.php, showthread.php Download complete instructions: http://www.overgrow.com/archive/KillFile.zip (if you downloaded within the first 5 minutes of my post, please download again-- I forgot one small template addition that is now fixed) [Edited by Overgrow on 09-27-2000 at 01:17 PM] Show Your Support
|
Comments |
#12
|
|||
|
|||
![]()
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")) { 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>"; } } // 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.) |
#13
|
|||
|
|||
![]()
Overgrow - I noticed that you took the ignore feature off of your site. Was it not working well for you?
Why did you take it off? Thanks. Just curious if it caused load problems or something. |
#14
|
|||
|
|||
![]()
Sorry, it is still there. I haven't taken it down at all-- I think what happened is you weren't logged in. I was messing with the cookies this week and I had it only setting temporary cookies... so when you came back, you weren't logged in and you had no ignore list.
I've fixed the temp/perm cookies now and also implemented the above query fix-- all is well on my little 60-concurrent-user board ![]() |
#15
|
|||
|
|||
![]()
I really hope this makes it into the next vB. After all, what's the point of having dynamically-generated thread pages if you can't further control what you see (like this hack lets you)?
This is one cool hack! |
#16
|
|||
|
|||
![]()
Did the fix...putting it in global make it faster?
|
#17
|
|||
|
|||
![]()
Jim it should make no change on your forum speed now. Try it out.
|
#18
|
|||
|
|||
![]()
Is the zip version the most efficient and updated one?
Thanks! |
#19
|
|||
|
|||
![]()
Hello Overgrow,
I wanted to run the SELECT query you suggested to see who the most ignored user was. So I created a file called most_ignored.php. It looks like this: Code:
<?php chdir($DOCUMENT_ROOT); require($DOCUMENT_ROOT . "global.php"); $loggedins=$DB_site->query_first("SELECT user,ignorelist FROM user WHERE ignorelist !=''"); $user=$loggedins[user]; echo "$user"; ?> But I get this error: Code:
Database error in vBulletin: Invalid SQL: SELECT user,ignorelist FROM user WHERE ignorelist !='' mysql error: Unknown column 'user' in 'field list' mysql error number: 1054 Date: Wednesday 11th of October 2000 02:23:38 AM Script: /etc/most_ignored.php |
#20
|
|||
|
|||
![]()
I have updated the zip file to 1.1 to reflect the query optimizations by rangersfan. You can find the newest version, including instructions on updating the old version, here:
http://www.overgrow.com/archive/KillFile.zip VT, I'm working on that most ignored script. I'm sorry I had quoted that query incorrectly-- there is no field "user" in the table "user"... the query should be: select username,ignorelist from user where ignorelist !=""; I'm working on the file so it will give the results you want.. will post in a bit. |
#21
|
|||
|
|||
![]()
OK VT, once you get me started... Here is a little script that will report your kill file stats (who is being ignored). Save it with any name in the same directory as your forum index.php.
Code:
<?php require("global.php"); echo "<font face=verdana,arial size=2><b>username</b>: who they are ignoring<br> <br>"; $ignorequery = $DB_site->query("SELECT username,ignorelist FROM user WHERE ignorelist !=''"); while($ui=$DB_site->fetch_array($ignorequery)) { $user=$ui[username]; $ignorelist=$ui[ignorelist]; echo "<b>$user</b>: "; $ignorelist2 = split("\n", $ui[ignorelist]); while (list($key,$val)=each($ignorelist2)) { $val = trim($val); if ($val!="" and strlen($val) > 1) { $id=intval($val); if ($check=$DB_site->query_first("SELECT username FROM user WHERE userid=$id")) { $val = $check[username]; } echo "\"$val\" "; $icount[$val] = $icount[$val] + 1; } } echo "<br>"; } echo " <br>"; asort($icount); while (list($key,$val)=each($icount)) { echo "$key has been ignored $val times.<br>"; } ?> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|