Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=113)
-   -   Remove karma system rights for one user (http://www.bvlist.com/showthread.php?t=3951)

\n"); 
add:
Code:

print("
\n"); 
In modtask.php add:
Code:

$curkarmapos = $arr["karmapos"];
this:
Code:

if ($karmapos != $curkarmapos)
    {
        if (
$karmapos == 'yes')
        {
           
$modcomment = gmdate("Y-m-d") . " - Karma system enabled by " . $CURUSER['username'] . ".\n" . $modcomment;
           
$msg = sqlesc("Your karma system access have been given back by " . $CURUSER['username'] . ". You can use the system again.");
           
$added = sqlesc(get_date_time());
           
sql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES (0, $userid, $msg, $added)") or sqlerr(__FILE__, __LINE__);
        }
        else
        {
           
$modcomment = gmdate("Y-m-d") . " - Karma system disabled by " . $CURUSER['username'] . ".\n" . $modcomment;
           
$msg = sqlesc("Your karma system access have been removed by " . $CURUSER['username'] . ", propably because you misbehaved.");
           
$added = sqlesc(get_date_time());
           
sql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES (0, $userid, $msg, $added)") or sqlerr(__FILE__, __LINE__);
        }
    } 

and this:
Code:

$updateset[] = "karmapos = " . sqlesc($karmapos);
works on my FTS 1.0.0
elvira 8th December 2009 10:41

Remove karma system rights for one user
 
This mod enables you to disable access to mybonus.php for one single user.

In database, run:
Code:

ALTER TABLE `users` ADD `karmapos` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'yes' AFTER `downloadpos` ;
In mybonus.php under
Code:

parked();
add:
Code:

if ($CURUSER["karmapos"] == "no")
   
stderr("Sorry!","The karma system has been disabled for this account. Probably beacuse you misbehaved."); 

In userdetails.php under:
Code:

print("
Download possible??.($user["downloadpos"]=="yes" ? " checked" : "") . ">Yes .($user["downloadpos"]=="no" ? " checked" : "") . ">No
Karma system enabled?.($user["karmapos"]=="yes" ? " checked" : "") . ">Yes .($user["karmapos"]=="no" ? " checked" : "") . ">No

Edgein 8th December 2009 11:21

Nice mod m8


All times are GMT +2. The time now is 19:52.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.