vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [RELEASE] Kill File v1.0 -- ignore lists (https://vborg.vbsupport.ru/showthread.php?t=3510)

09-28-2000 05:37 PM

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.)

09-29-2000 01:58 AM

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.

09-29-2000 07:28 AM

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 :)

09-29-2000 07:49 AM

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!

09-30-2000 10:59 PM

Did the fix...putting it in global make it faster?

10-01-2000 02:37 AM

Jim it should make no change on your forum speed now. Try it out.

10-04-2000 05:29 AM

Is the zip version the most efficient and updated one?

Thanks!

10-11-2000 06:21 AM

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

I also tried running the query in phpMyAdmin and got the same error. Any ideas?

10-11-2000 03:27 PM

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.

10-11-2000 04:20 PM

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>&nbsp;<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 "&nbsp;<br>";

        asort($icount);

        while (list($key,$val)=each($icount)) {
                echo "$key has been ignored $val times.<br>";
        }

?>



All times are GMT. The time now is 07:44 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
  • Page Generation 0.01087 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete