Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

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
  #12  
Old 08-17-2011, 02:38 AM
paul1972 paul1972 is offline
 
Join Date: Dec 2010
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so if a post get a certain number of complaints then it will be forwarded to a moderators section?

or how does this work?

is there a button to click on to report the violation to the moderators?
Reply With Quote
  #13  
Old 08-17-2011, 03:00 AM
Wonksta Wonksta is offline
 
Join Date: Apr 2009
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by paul1972 View Post
so if a post get a certain number of complaints then it will be forwarded to a moderators section?

or how does this work?

is there a button to click on to report the violation to the moderators?
Click on a post and select 'Disapprove' that's all it does to a post/thread.
Reply With Quote
  #14  
Old 08-18-2011, 09:31 PM
MoMan MoMan is offline
 
Join Date: Oct 2005
Location: USA
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FYI with this mod you get a database error if you try to report a PM/VM/picture comment.

In order to fix this, change the plugin code to the following:

PHP Code:
if ($_POST['do'] == 'sendemail' AND isset($postinfo['postid']) 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']);
    }

Essentially you are adding isset($postinfo['postid']) to the main conditional.
Reply With Quote
  #15  
Old 08-18-2011, 11:15 PM
SnakeV SnakeV is offline
 
Join Date: Jun 2008
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good catch.

One question, did you use this mod directly with it's default install code?

Code:
ALTER TABLE " . TABLE_PREFIX . "post ADD reports INT(10) UNSIGNED NOT NULL DEFAULT '0'
Because i have also have more than 1.5M of posts like your forum and i think that it could take some time to execute that query.

Quote:
Originally Posted by MoMan View Post
FYI with this mod you get a database error if you try to report a PM/VM/picture comment.

In order to fix this, change the plugin code to the following:

PHP Code:
if ($_POST['do'] == 'sendemail' AND isset($postinfo['postid']) 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']);
    }

Essentially you are adding isset($postinfo['postid']) to the main conditional.
Reply With Quote
  #16  
Old 08-20-2011, 11:09 AM
home9000 home9000 is offline
 
Join Date: Aug 2005
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

MoMan or anymone

we need this hack updated anyone can help
Reply With Quote
  #17  
Old 08-25-2011, 12:46 AM
MoMan MoMan is offline
 
Join Date: Oct 2005
Location: USA
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SnakeV View Post
Good catch.

One question, did you use this mod directly with it's default install code?

Code:
ALTER TABLE " . TABLE_PREFIX . "post ADD reports INT(10) UNSIGNED NOT NULL DEFAULT '0'
Because i have also have more than 1.5M of posts like your forum and i think that it could take some time to execute that query.
Yes, it will take several seconds - ideally you should close your board, but I decided not to and got no crashes.
Reply With Quote
  #18  
Old 09-12-2011, 12:37 PM
JesterP JesterP is offline
 
Join Date: Jun 2007
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can even imagine why this isn't already in vBulletin. Fantastic addition and thank you to the others for the improvements.

Nominated.
Reply With Quote
  #19  
Old 09-14-2011, 04:11 AM
hpidriver hpidriver is offline
 
Join Date: Jun 2009
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^^ What version of vb are you running?

marked as tagged
Reply With Quote
  #20  
Old 10-23-2011, 12:33 AM
JesterP JesterP is offline
 
Join Date: Jun 2007
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have multiple sites running this, 3.8.x and a couple 4.1.7 forums.
Reply With Quote
  #21  
Old 10-24-2011, 10:33 AM
lm3a.net's Avatar
lm3a.net lm3a.net is offline
 
Join Date: May 2009
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's good but after installing it the sending via email for the reported post is not working also after uninstalling the product
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 02:09 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.05769 seconds
  • Memory Usage 2,374KB
  • 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
  • (2)bbcode_php
  • (3)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
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (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
  • 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