Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 09-27-2000 Last Update: Never Installs: 0
 
No support by the author.

********** 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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-28-2000, 05:37 PM
Guest
 
Posts: n/a
Default

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.)
Reply With Quote
  #13  
Old 09-29-2000, 01:58 AM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #14  
Old 09-29-2000, 07:28 AM
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #15  
Old 09-29-2000, 07:49 AM
Guest
 
Posts: n/a
Default

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!
Reply With Quote
  #16  
Old 09-30-2000, 10:59 PM
Guest
 
Posts: n/a
Default

Did the fix...putting it in global make it faster?
Reply With Quote
  #17  
Old 10-01-2000, 02:37 AM
Guest
 
Posts: n/a
Default

Jim it should make no change on your forum speed now. Try it out.
Reply With Quote
  #18  
Old 10-04-2000, 05:29 AM
Guest
 
Posts: n/a
Default

Is the zip version the most efficient and updated one?

Thanks!
Reply With Quote
  #19  
Old 10-11-2000, 06:21 AM
Guest
 
Posts: n/a
Default

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?
Reply With Quote
  #20  
Old 10-11-2000, 03:27 PM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #21  
Old 10-11-2000, 04:20 PM
Guest
 
Posts: n/a
Default

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>";
	}

?>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:58 AM.


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.04242 seconds
  • Memory Usage 2,283KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete