Ban via Post

Daz

New Member
This mod allows your moderators to do the following:

1. Ban a user from the site and/or a thread via the username drop down menu in a post
(as well as the admin/mod cp).

All moderators with banning/unbanning permissions for the forum can use this feature.
This opens a page which allows you to select a ban period, whether or not to allow the user to view the thread (for thread bans), and provide a text message which the user will see when trying to enter the site or view / reply to the thread.
2. Once you ban the user you are returned to the same post from which you banned the user.
You will now notice a small icon besides the ip icon.
Clicking on that will open a page that will display the current ban information and in the case of a thread ban, also a list of other threads from which this user is banned.
You will also have the option to edit or lift the ban from here.
You may now also unban the user from the username drop down menu.
3. From the admin cp vbulletin settings you can set whether you wish to have a Private Message sent to the user whenever they are banned/unbanned from a thread.
4. You may also view, edit, or lift bans from the admin/mod control panel. Just click on the ‘view banned users’ or 'view banned from thread users' link. If you turned on the feature to moderate permanent bans, this is where you will see a list of bans awaiting approval. You may approve, reject (lift), or edit (modify) moderated bans.


Available Options:

* Limit bans to only Thread, only Site, or both Thread and Site bans via the postbit
* Send PM to User:
You may choose whether you wish to send a private message to the user whenever they are thread banned/unbanned
* Moderate Permanent Bans:
Whether to moderate (approve, edit, reject) permanent site and/or thread bans.
If this feature is turned on, all permanent site and/or thread bans are entered into a moderation queue requiring admin attention within 7 days of ban date. If no action is taken (approve, edit, reject), the ban reverts to a 7 day ban.
You may also provide an email address to be used for notification that a permanent ban awaits approval.
sample1-1.gif

sample1-2.jpg

sample3.gif

sample6.gif

sample8.gif
 

shunli

New Member
I think I messed up the code so, could anyone please attatch the files you need to modify here, Thnx in advance

( maybe this is usefull, I am using vbulletin 3.6.8 )
 

dutchwii

New Member
shunli said:
I think I messed up the code so, could anyone please attatch the files you need to modify here, Thnx in advance

( maybe this is usefull, I am using vbulletin 3.6.8 )

Maybe a nice tip before you have a mod where you need edit files make a backup of files and database so when messed up you can restore
 

shunli

New Member
well yes, I did so i restored them en redid the files, but when I go to adminCP then ban user or view banned users ( from thread ) I get this error
Parse error: syntax error, unexpected $end in /mnt/web2/11/32/51647432/htdocs/forum/upload/modcp/banning.php on line 2232
so i go to that file and go to line 2232, but that line it completely blank.
 

Daz

New Member
The coder has released a couple of bug fixes today, maybe thats your problem, they are

in the postings php info it said:


3). FIND (~ line 85)

PHP:
case 'mergethread': $navbits[''] = $vbphrase['merge_threads']; break;
}

REPLACE with

PHP:
// start code 'ban via post'
case 'banuserthread': $navbits[''] = $vbphrase['bvp_banthread']; break;
case 'liftbanthread': $navbits[''] = $vbphrase['bvp_liftthread']; break;
case 'banthreadinfo': $navbits[''] = $vbphrase['bvp_banthreadinfo']; break;
case 'banusersite': $navbits[''] = $vbphrase['ban_from_site']; break;
case 'liftbansite': $navbits[''] = $vbphrase['bvp_liftsite']; break;
case 'bansiteinfo': $navbits[''] = $vbphrase['bvp_bansiteinfo']; break;
// end code 'ban via post'
}

it should really say:
FIND (~ line 85)

PHP:
case 'mergethread': $navbits[''] = $vbphrase['merge_threads']; break;
}
REPLACE with

PHP:
case 'mergethread': $navbits[''] = $vbphrase['merge_threads']; break;
// start code 'ban via post'
case 'banuserthread': $navbits[''] = $vbphrase['bvp_banthread']; break;
case 'liftbanthread': $navbits[''] = $vbphrase['bvp_liftthread']; break;
case 'banthreadinfo': $navbits[''] = $vbphrase['bvp_banthreadinfo']; break;
case 'banusersite': $navbits[''] = $vbphrase['ban_from_site']; break;
case 'liftbansite': $navbits[''] = $vbphrase['bvp_liftsite']; break;
case 'bansiteinfo': $navbits[''] = $vbphrase['bvp_bansiteinfo']; break;
// end code 'ban via post'
}



and

there is also a mistake in the modcp/banning.php instructions.

it says

4). FIND (~ line 339)

PHP:
$vbulletin->input->clean_array_gpc('r', array(
'userid' => TYPE_INT,
'period' => TYPE_STR,
'threadid' => TYPE_INT
));

REPLACE with


PHP:
// start code 'ban via post'
// added 'threadid' => TYPE_INT,
// end code 'ban via post'

$vbulletin->input->clean_array_gpc('r', array(
'userid' => TYPE_INT,
'period' => TYPE_STR,
'threadid' => TYPE_INT
));


and it should say:


4). FIND (~ line 339)

PHP:
$vbulletin->input->clean_array_gpc('r', array(
'userid' => TYPE_INT,
'period' => TYPE_STR,
));

REPLACE with

PHP:
// start code 'ban via post'
// added 'threadid' => TYPE_INT,
$vbulletin->input->clean_array_gpc('r', array(
'userid' => TYPE_INT,
'period' => TYPE_STR,
'threadid' => TYPE_INT
));
// end code 'ban via post'
 

shunli

New Member
Going to redo the entire thing "again" Hopefully it will work now, but thank you for your fast reply's

*EDIT*

Still an error, so think its has something to do with the code.
Hopefully someone has it working though and wants to share the files, please
~Shunli
 
Top