Bravo List
Register
Go Back   > Bravo List > Sourcecode > Free Torrent Source > Mods & Themes
Reply
  #1  
Old 08-12-09, 10:41
elvira's Avatar
elvira elvira is offline
Veteran
 
Join Date: Jan 2008
Slovenia
Posts: 65
Default 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("<tr><td class=rowhead>Download possible??</td><td colspan=2 align=left><input type=radio name=downloadpos value=yes" .($user["downloadpos"]=="yes" ? " checked" : "") . ">Yes <input type=radio name=downloadpos value=no" .($user["downloadpos"]=="no" ? " checked" : "") . ">No</td></tr>\n");  
add:
Code:
print("<tr><td class=rowhead>Karma system enabled?</td><td colspan=2 align=left><input type=radio name=karmapos value=yes" .($user["karmapos"]=="yes" ? " checked" : "") . ">Yes <input type=radio name=karmapos value=no" .($user["karmapos"]=="no" ? " checked" : "") . ">No</td></tr>\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
Reply With Quote
The Following User Says Thank You to elvira For This Useful Post:
Edgein (08-12-09)
  #2  
Old 08-12-09, 11:21
Edgein's Avatar
Edgein Edgein is offline
Staff
 
Join Date: Sep 2008
Netherlands
Posts: 154
Default
Nice mod m8
Reply With Quote
Reply

Tags
karma , remove , rights , system , user

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Commenting Rights Enable/Disable blargh Mods & Themes 0 02-06-10 01:29
Karma Bonus Point System yoligim Free Torrent Source 5 04-01-10 16:02
karma bonus points problem tunad TBDev 2 04-08-09 11:11
How can i remove the TTL System DooM TBDev 2 25-05-09 14:56
how change the normal user to power or admin user in ts TS Special Edition v.5.1 theway Template Shares 2 27-09-08 14:44



All times are GMT +2. The time now is 13:21. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2017, vBulletin Solutions Inc.