Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

Reply
 
Thread Tools
Unapprove Reported Posts (Based on No. of Reports & Usergroups) Details »»
Unapprove Reported Posts (Based on No. of Reports & Usergroups)
Version: 1.00, by Wonksta Wonksta is offline
Developer Last Online: Mar 2017 Show Printable Version Email this Page

Category: Moderators Functions - Version: 3.8.x Rating:
Released: 08-12-2011 Last Update: Never Installs: 21
DB Changes Uses Plugins
Re-useable Code  
No support by the author.

This modification has been based on the following Mod found here: https://vborg.vbsupport.ru/showthread.php?t=231622 - I have been given permission by that author to release this modified version of his original Mod.

This modification adds much needed features such as:

- Number of Reports required to send a post in Moderation Queue
- Usergroups which can bypass min. reports required.

Anyone who makes changes to this modification to better it in anyway, I only ask you share it with the rest of us in this thread!

Enjoy!

Download Now

File Type: xml product-unapprove_reported_posts.xml (3.7 KB, 82 views)

Screenshots

File Type: jpg Untitled.jpg (38.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
0ptima, xorex

Comments
  #2  
Old 08-13-2011, 12:36 PM
0ptima 0ptima is offline
 
Join Date: Feb 2002
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will check this out soon!
Reply With Quote
  #3  
Old 08-13-2011, 01:31 PM
Manoel J?nior Manoel J?nior is offline
 
Join Date: Feb 2009
Location: SP / Brasil
Posts: 778
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tagged
Reply With Quote
  #4  
Old 08-13-2011, 02:25 PM
inciarco's Avatar
inciarco inciarco is offline
 
Join Date: Mar 2007
Posts: 758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very Interesting Mod, Thank You For Sharing It. :up:

The Code Alters the "post" Table adding the Field "reports", You Should Add the "DB Changes" in the Mod's Specifications.

Code:
ALTER TABLE " . TABLE_PREFIX . "post ADD reports INT(10) UNSIGNED NOT NULL DEFAULT '0'
My Best Regards.

Reply With Quote
Благодарность от:
BirdOPrey5
  #5  
Old 08-13-2011, 04:39 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by inciarco View Post
Very Interesting Mod, Thank You For Sharing It. :up:

The Code Alters the "post" Table adding the Field "reports", You Should Add the "DB Changes" in the Mod's Specifications.

Code:
ALTER TABLE " . TABLE_PREFIX . "post ADD reports INT(10) UNSIGNED NOT NULL DEFAULT '0'
My Best Regards.

Good catch. I made the change.
Reply With Quote
  #6  
Old 08-13-2011, 05:48 PM
MoMan MoMan is offline
 
Join Date: Oct 2005
Location: USA
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice and elegant mod!
Reply With Quote
  #7  
Old 08-13-2011, 08:38 PM
Ramsesx's Avatar
Ramsesx Ramsesx is offline
 
Join Date: Aug 2005
Location: Southern Germany
Posts: 512
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool, that's what I need, thanks.
Reply With Quote
  #8  
Old 08-13-2011, 09:15 PM
MoMan MoMan is offline
 
Join Date: Oct 2005
Location: USA
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not that this really matters, but technically a redundant query is made once a post has enough reports and gets unapproved.

I've updated my plugin code to the following:

PHP Code:
if ($_POST['do'] == 'sendemail' AND !empty($_POST['reason']))
{
    
$reports $vbulletin->db->query_first("SELECT reports FROM " TABLE_PREFIX "post WHERE postid = " $postinfo['postid']);
    if (
$reports['reports'] + >= $vbulletin->options['unapprove_reported_posts_num_reports'] OR is_member_of($vbulletin->userinfounserialize($vbulletin->options['unapprove_reported_posts_bypass_usergroups'])))
    {
        
$modinfo fetch_userinfo($postinfo['userid']);
        
$uglist $modinfo['usergroupid'] . iif(trim($modinfo['membergroupids']), ",$modinfo[membergroupids]");
        if (!
can_moderate(0''$modinfo['userid'], $uglist) OR ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']))
        {
            require_once(
DIR'/includes/functions_databuild.php');
            
unapprove_post($postinfo['postid'], ($foruminfo['countposts'] AND !$postinfo['skippostcount']), true$postinfo$threadinfofalse);
            
$vbulletin->db->query_write("UPDATE " TABLE_PREFIX "post SET reports = 0 WHERE postid = " $postinfo['postid']);
        }
        else
        {
            
$vbulletin->db->query_write("UPDATE " TABLE_PREFIX "post SET reports = reports + 1 WHERE postid = " $postinfo['postid']);
        }
    }
    else
    {
        
$vbulletin->db->query_write("UPDATE " TABLE_PREFIX "post SET reports = reports + 1 WHERE postid = " $postinfo['postid']);
    }

Reply With Quote
Благодарность от:
Wonksta
  #9  
Old 08-17-2011, 01:36 AM
paul1972 paul1972 is offline
 
Join Date: Dec 2010
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

who has this on their website? I'd like to see it in action....please list your website
Reply With Quote
  #10  
Old 08-17-2011, 02:03 AM
Wonksta Wonksta is offline
 
Join Date: Apr 2009
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by paul1972 View Post
who has this on their website? I'd like to see it in action....please list your website
You can't see it in action unless you're a Moderator/Admin on the board it is installed on.

This modification works extremely well with the "Quick Moderation" Module with vBAdanced.

Here's a screeny:
Attached Images
File Type: png 33.png (5.8 KB, 0 views)
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 02:28 PM.


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.04547 seconds
  • Memory Usage 2,347KB
  • Queries Executed 26 (?)
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_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (4)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete