MyBB Central

Full Version: Profile Ban
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Labrocca, I'm attempting to change the perm ban to a temp one. To test, I've added a week to the time function. Here is what I replaced "perm" with:

Code:
time() + 604800

That time equates to a week in the future. I'm able to ban a user, but when I look in the ACP, I'm told the user was banned "today" and the ban is lifted "today" with remaining time in the negative at -337491 hours. There are only 168 hours in a week, and it shouldn't be negative, should it? Also, when I go to edit the ban, only 1 day is listed as the ban time.
Change

PHP Code:
$ban_array1 = array(
        
"uid" => $buid,
        
"gid" => "7",
        
"oldgroup" => $banneduser['usergroup'],
        
"oldadditionalgroups" => $banneduser['additionalusergroups'],
        
"olddisplaygroup" => $banneduser['displaygroup'],
        
"admin" => $mybb->user['uid'],
        
"dateline" => time(),
        
"bantime" => "perm",
        
"lifted" => 0,
        
"reason" => "",
        ); 

into

PHP Code:
$ban_array1 = array(
        
"uid" => $buid,
        
"gid" => "7",
        
"oldgroup" => $banneduser['usergroup'],
        
"oldadditionalgroups" => $banneduser['additionalusergroups'],
        
"olddisplaygroup" => $banneduser['displaygroup'],
        
"admin" => $mybb->user['uid'],
        
"dateline" => time(),
        
"bantime" => "7-0-0",
        
"lifted" => time()+604800,
        
"reason" => "",
        ); 
Yeah easy enough to do manually. I didn't want to add a setting for it.
Thanks, Lex! I was thinking that the lifted area should be something other than 0 but had no idea how to change that myself! Tongue
Cool thanks
whoud be nice a settings for quick ban. For reason & how much time.
(Sep 11, 2008 12:02 PM)ciorax Wrote: [ -> ]whoud be nice a settings for quick ban. For reason & how much time.

This defeats the point of a "Quick Ban".

Would love to see this for 1.4.
Thanks alot for this it will come in handy
Pages: 1 2
Reference URL's