Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Reputation-Based Post Filtering Details »»
Reputation-Based Post Filtering
Version: 1.00, by TWTCommish TWTCommish is offline
Developer Last Online: Dec 2022 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-08-2004 Last Update: Never Installs: 9
 
No support by the author.

I like the reputation system, but came to the conclusion early on that it wouldn't be particularly pragmatic unless modified. It's good for cutting down on "right on!" posts, but it's rather like warning someone on AIM; it doesn't have much of a tangible effect. Until now, that is.

This hack, when employed, will filter out posts by any user with less than X number of reputation points. It is customizable for each user, so if someone wishes to screen out all posts by an individual with negative rep points, they can, and if someone wants to let all posts through, they can as well.

The filter does not skip over the posts, but rather, hides them in a way very similar to the Ignore List. This hack requires the addition of one custom field, three code edits in two files, two new phrases, and one new template.

Step One
Create a new User Profile Field. Choose "Single-Selection Menu" and enter the following criteria:
  • Title: Reputation-Based Filtering

  • Description: Filter out posts by users with less than a certain number of reputation points.

  • Options (substitute your own):
    -1
    -10
    -25
    -50
    -100
    -200
    -300

  • Field Required: No.
    Field Editable by User? Yes
    Field Hidden on Profile? No
    Field Searchable on Members List? No
    Show on Members List? No
    Allow user to input their own value for this option - No
    Which page displays this option? Options: Thread Viewing
Once you're done with this, go to your User Profile Field Manager and make note of the new field's name; IE: field5, field6, etc.


Step Two

Open showthread.php, and find this around line 87:

PHP Code:
// ######################### REQUIRE BACK-END ############################
require_once('./global.php'); 
Right after it, add this:

PHP Code:
  if (strlen($bbuserinfo[field6])) {
    
$reputationfilter $bbuserinfo[field6];
  } 
Change "field6" to your own field name, determined in Step One.

Still in showthread.php, find this:

PHP Code:
 while ($post $DB_site->fetch_array($posts))
 { 
Right after it, add this:

PHP Code:
$post[reputationfilter] = $reputationfilter
Save and close.


Step Three
Open functions_showthread.php in your /includes directory. Find this:

PHP Code:
$show['messageicon'] = iif($post['iconpath'], truefalse);
 eval(
'$retval = "' fetch_template($maintemplatename) . '";');
 return 
$retval
Right BEFORE it, add this:

PHP Code:
if ($post[reputation] < $post[reputationfilter]) 
 {
  
$maintemplatename 'postbit_filter';
 } 

Step Four
Add the following phrases:
  • message_hidden_x_filter
    This message is hidden because <strong>{1}</strong>'s reputation does not meet your <a href="{2}" target="_blank">specified standards</a>.
  • change_reputation_filter
    Change Reputation Filter

Step Five

Add the template found in the attached text file.

All done! Screenshot of what a filtered post looks like below.

Show Your Support

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

Comments
  #12  
Old 02-06-2004, 02:06 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack will install ...
Reply With Quote
  #13  
Old 02-06-2004, 02:34 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TWTCommish
You mean specific posts that have been marked down? I suppose so, yeah. Wasn't planning it, if only because you'd need to have a huge board for such a hack to have much meaningful effect.
Actually that's what I was looking for.

Members are inconsistent... sometimes they talk tripe... othertimes it's quality stuff... we'd want specific posts to be excluded a.l.a Slashdot.

This would also give us a chance to use it for things like moderating down posts which we don't want google to spider... because we could set 'guest' to have a low tolerance... which means that we could avoid attracting perverts, etc to the forum.

Post based reputation filtering my community would love. They have a big problem with member based filtering
Reply With Quote
  #14  
Old 02-06-2004, 03:28 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can see this going down a storm on several boards I visit !
Reply With Quote
  #15  
Old 02-09-2004, 04:52 PM
Mr. Brian's Avatar
Mr. Brian Mr. Brian is offline
 
Join Date: Jan 2003
Location: Internet
Posts: 300
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's weird..

For no reason, or.. maybe Yes..?

I found that the post filtering system seem totally disappeared from my forum..
Reply With Quote
  #16  
Old 04-26-2004, 08:44 PM
Cold Steel's Avatar
Cold Steel Cold Steel is offline
 
Join Date: Nov 2001
Location: Manhattan
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me installs.
Reply With Quote
  #17  
Old 04-27-2004, 05:49 PM
Cold Steel's Avatar
Cold Steel Cold Steel is offline
 
Join Date: Nov 2001
Location: Manhattan
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works great, except our user with the lowest reputation (-1912) has a green bar.
Reply With Quote
  #18  
Old 04-27-2004, 06:58 PM
DalaiLamaBob DalaiLamaBob is offline
 
Join Date: Sep 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Cold Steel
This works great, except our user with the lowest reputation (-1912) has a green bar.
Wrong hack. But I did mention that too in the thread with that hack.
Reply With Quote
  #19  
Old 04-27-2004, 07:29 PM
Cold Steel's Avatar
Cold Steel Cold Steel is offline
 
Join Date: Nov 2001
Location: Manhattan
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops, sorry. Please ignore my above post.
Reply With Quote
  #20  
Old 07-02-2004, 10:06 AM
Sanity Sanity is offline
 
Join Date: Mar 2002
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great and pretty usefull hack, but i get a parse error in line 87 (step 2). I changed the field number to5 as it is my number in the new added profile.

Whats my mistake?

vb3.0.1
Reply With Quote
  #21  
Old 08-15-2004, 05:59 PM
euangel euangel is offline
 
Join Date: Jan 2003
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack...THANKS!
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 05:00 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.08274 seconds
  • Memory Usage 2,311KB
  • 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_php
  • (2)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
  • (1)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_onlinestatus
  • (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
  • postbit_imicons
  • 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