REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Profile Ban
#11
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.
#12
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" => "",
        ); 
#13
Yeah easy enough to do manually. I didn't want to add a setting for it.
#14
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
#15
Cool thanks
#16
whoud be nice a settings for quick ban. For reason & how much time.
#17
(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.
#18
Thanks alot for this it will come in handy


Forum Jump:


Users browsing this thread: 1 Guest(s)