New Topic
Results 1 to 4 of 4

Thread: Disable Member Posting Until Message has been read (ACP Profile)

  1. Gavo's Avatar
    • My Website(s)
      DirtyWarez.org Forum.DirtyWarez.com
    • My Statistics
    #1
    28th Jun 2014, 12:02 AM
    I quickly made a mod so staff can disable members posting until they read a message and accept it, there isn't currently a mod to do this so I made one.

    This is good when autoposters ignore PM's and warnings, It gives another option rather than banning.


    I might as well share it here then I cant loose it


    SQL
    PHP Code:
    ALTER TABLE phpbb_users ADD user_accept_rules SMALLINTNOT NULL DEFAULT '0'
    Open: includes/functions.php

    Find
    PHP Code:
        header('Pragma: no-cache'); 
    Add After
    PHP Code:
        if ($user->data['user_accept_rules'] == && $user->data['is_registered'] && !$user->data['is_bot'] && (request_var('mode''') != 'terms'))
        {
            if (
    confirm_box(true))
            {
                
    $sql 'UPDATE ' USERS_TABLE '
                    SET user_accept_rules = 0
                    WHERE user_id = ' 
    $user->data['user_id'];
                
    $db->sql_query($sql);
            }
            else
            {
                
    confirm_box(falsesprintf($user->lang['NEW_RULES'], '<a href="' append_sid("{$phpbb_root_path}ucp.$phpEx"'mode=terms') . '">''</a>'));
                
    header("Location: " append_sid("{$phpbb_root_path}ucp.$phpEx?mode=logout&sid=" $user->session_id));
            }
        } 
    Open: language/en/common.php

    Find
    PHP Code:
        'NEW_POSTS'                    => 'New posts'
    Add After
    PHP Code:
        'NEW_RULES'                    => 'Your account has been temporary disabled by staff due to ignoring warnings or private messages.<br/><br/>Please check for any private messages or warnings issued, if you ignore this polite warning a ban will likely be issued.<br/><br/><br/>After you confirm (Yes), your account will be restored.<br/>',
        
    'UPDATE_TERMS'                => 'Accept Terms'
    Open: adm/style/acp_users_overview.html

    Find
    PHP Code:
    <dl>
        <
    dt><label for="user_founder">{L_FOUNDER}:</label><br /><span>{L_FOUNDER_EXPLAIN}</span></dt>
        <
    dd><label><input type="radio" class="radio" name="user_founder" value="1"<!-- IF S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> /> {L_YES}</label>
            <
    label><input type="radio" class="radio" name="user_founder" value="0"<!-- IF not S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> /> {L_NO}</label></dd>
    </
    dl
    Add After
    PHP Code:
    <dl>
        <
    dt><label for="user_force">Disable Posting:</label><br /><span>Force Member to read a warning message before being able to post again.</span></dt>
        <
    dd><label><input type="radio" class="radio" name="user_force" value="1"<!-- IF S_USER_FORCE --> id="user_force" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
            <
    label><input type="radio" class="radio" name="user_force" value="0"<!-- IF not S_USER_FORCE --> id="user_force" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
    </
    dl
    Open: includes/acp/acp_users.php

    Find
    PHP Code:
                            'user_founder'        => request_var('user_founder', ($user_row['user_type'] == USER_FOUNDER) ? 0), 
    Add After
    PHP Code:
                            'user_force'        => request_var('user_force', ($user_row['user_accept_rules '] == 0) ? 0), 
    Find
    PHP Code:
    // Which updates do we need to do? 
    Add After
    PHP Code:
                        $update_user_force = ($user_row['user_accept_rules '] != $data['user_force']) ? $data['user_force'] : false
    Find
    PHP Code:
        trigger_error($user->lang['AT_LEAST_ONE_FOUNDER'] . adm_back_link($this->u_action '&amp;u=' $user_id), E_USER_WARNING);
                                        }
                                    }
                                }
                            } 
    Add After
    PHP Code:
                            if ($update_user_force !== false)
                            {
                                if (
    $data['user_force']==1)
                                    {
                                    
    $sql_ary['user_accept_rules'] = 1;
                                    }
                                else
                                    {
                                    
    $sql_ary['user_accept_rules'] = 0;
                                    }
                                    
    add_log('user'$user_id$user_row['username'].'- Forced to read warning page'$user_row['username'], $update_user_force);
                            } 
    Find
    PHP Code:
                        'S_USER_IP'            => ($user_row['user_ip']) ? true false
    Add After
    PHP Code:
                        'S_USER_FORCE'      => ($user_row['user_accept_rules'] == 1) ? true false


    ACP User Management Disable Posting.




    Disabled Profile.

  2. Nenad__'s Avatar
    • My Website(s)
      forum.dirtywarez.com vurmin.co movie-forum.co warez-bb.org
    • My Statistics
    #2
    30th Jun 2014, 09:19 PM
    Good job Gavo!

  3. PerMaFrOsT's Avatar
    • My Statistics
    #3
    1st Jul 2014, 12:40 AM
    Nice share, good job. Will try in a dummy site

  4. ThumperTM's Avatar
    • My Website(s)
      Windows93.net
    • My Statistics
    #4
    16th Nov 2014, 02:50 PM
    Thank you!

Similar Threads

  1. Capital S has been disabled lol?
    By Sp32 in forum Feedback and Suggestions - Archive
    Replies: 15
    Last Post: 12th Dec 2013, 05:00 AM
  2. the number of times a keyword has been searched in google
    By lana2008 in forum General Discussion - Archive
    Replies: 3
    Last Post: 16th Jul 2010, 03:26 PM
  3. VBulletin 3.8.4 has been exploited
    By Hx in forum News & Current Events - Archive
    Replies: 41
    Last Post: 31st Mar 2010, 08:28 PM
  4. Member Posting CP
    By Mr Happy in forum Webmaster Discussion - Archive
    Replies: 25
    Last Post: 7th Mar 2010, 06:10 AM
  5. Members Post Your Pics
    By JMaldo in forum General Discussion - Archive
    Replies: 10
    Last Post: 27th Feb 2009, 06:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •