Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

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
  #2  
Old 09-27-2000, 04:33 PM
Guest
 
Posts: n/a
Default

Something interesting to do after you've had this installed a few days... run this query:

SELECT user,ignorelist FROM user WHERE ignorelist !="";

And you can see who is your most ignored user
Reply With Quote
  #3  
Old 09-27-2000, 05:27 PM
Guest
 
Posts: n/a
Default

ITs working awesome.

Quick question. Being that now the system checks the Ignore list for each and every user that views a thread....does your hack eat up system resources?

I have over 6300 registered members, and over 250 members online at once during peak hours...I want to try and stay away from hacks that eat up my system resources.

Let me know your opinion. Thanks again for all your hard work. And you to Ed!
Reply With Quote
  #4  
Old 09-27-2000, 05:37 PM
Guest
 
Posts: n/a
Default

I was just thinking....it would be cool if the hack was set up so that users could not ignore "Admins" or "Moderators" or "Super Moderators". This way all the necessary posts can get to the users.

Just a thought.
Reply With Quote
  #5  
Old 09-27-2000, 06:16 PM
Guest
 
Posts: n/a
Default

Ahh so glad to hear that it works for you. I hope my instructions were clear. Disclaimer: I am a graphic artist that learned to program-- so I'm not really qualified to be doing this or to give you advice on your system resources... but I'll do it anyway.

This hack should only add 1 query to your showthread. That is 1 query per load of the page to fetch the reader's ignore list-- not 1 query per post. It fetches the ignore list at the top of the script when it is first loaded. It parses this list into an array.

Lower down it uses the array. Once for each post on the page, it checks to see if the poster's name is contained in the ignore array. If it is there, it switches to the _ignored template.

So you're adding 1 query per page view and 1 possibly 3 if statements per post. I don't think it should be that resource intensive.

RE: Admins & Moderators

Please correct me if I'm wrong, but the only real way to tell if someone is an Admin or Mod is to do a getpermissions and cross reference their userid with the current forum.. which would add 1 query per post on the page-- something I'm not willing to do myself.

The cheat way to do it is hardcode the user titles into showthread. Change:

Code:
if ((isset($ignore[$userid]) || isset($ignore[($username)])) || ($usertitle=="Guest" && isset($ignore[$guestcode]))) {
to

Code:
$modtitle["Drug Czar"] = "yes";
$modtitle["Administrator"] = "yes";
$modtitle["Moderator"] = "yes";

if ((!isset($modtitle[$usertitle])) && ((isset($ignore[$userid]) || isset($ignore[($username)])) ||
($usertitle=="Guest" && isset($ignore[$guestcode])))) {
And of course replace your Admin/Mod titles in the array. If you want to be more efficient, move those $modtitle variables up to the top of the script and out of the post if.
Reply With Quote
  #6  
Old 09-28-2000, 07:54 AM
Guest
 
Posts: n/a
Default

I had a problem with the hack. My site was running great as of late...then after I installed the hack in sent MySQL into overtime causing the load to increase making the site unaccessable.

Just thought you'd like to know. Kind of sucks...I want to use this bad.
Reply With Quote
  #7  
Old 09-28-2000, 01:07 PM
Guest
 
Posts: n/a
Default

Quote:
then after I installed the hack in sent MySQL into overtime causing the load to increase making the site unaccessable.
Really sorry man.. I should've had a better disclaimer at the top of the hack. As far as I know it's only adding one query to the user table for each time showthread is loaded. If you use fodder's numbers, that page already had over 100 queries per view if you don't optimize the queries with Join. I'm not sure how adding 1 query can bring a system to it's knees like that.

My board goes to a max of maybe 60 users at peak and I haven't noticed a difference between pre- and post- ignore hack. Anyone want to take a guess as to why this hack might slow down VT's board?
Reply With Quote
  #8  
Old 09-28-2000, 02:30 PM
Guest
 
Posts: n/a
Default

Yeah it's weird. The hackis awesome and my users are pissed cause they want it back.

I don't see how one query does it either. I get arond 260+ users during peak hours..maybe that's why. I am going to monitor the site again today with te hack off of it and make sure that was what it was.
Reply With Quote
  #9  
Old 09-28-2000, 03:26 PM
Guest
 
Posts: n/a
Default

Overgrow - may I suggest you select your "ignorelist" in global.php on the same line where everything else is already being selected for the user instead of running a seperate query in showthread. Doing it this way will not add the same overhead even though it will effectively be available on every page.

if ($userinfo=$DB_site->query_first("SELECT daysprune,lastvisit,lastactivity,cookieuser,userna me,password,usergroupid,timezo neoffset FROM user WHERE userid=$bbuserid")) {

Add "ignorelist" to that line.

Also "ignorelist" is a blob field and that will effect performance.

[Edited by rangersfan on 09-28-2000 at 12:29 PM]
Reply With Quote
  #10  
Old 09-28-2000, 04:55 PM
Guest
 
Posts: n/a
Default

this sounds like a very good start on a great hack

with a little fine tuning I'm sure it will become one of the more popular features at my board. I have a few users who are just PITA.
Reply With Quote
Reply

Thread Tools

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 09:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04825 seconds
  • Memory Usage 2,266KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_code
  • (1)bbcode_quote
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)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