This hack includes a small script and instructions on how to install and set up the system.
Purpose: Just a simple engine that allows mods and admins to award arbitrary points to users, which will be displayed under their names/avatars.
The points can be named anything you wish, and represent anything you choose. You can use the script to add or subtract them.
As the script utilizes a Custom Profile Field, the point field can be directly edited in the CP when editing a user, allowing you to place text in the field rather than merely a number.
On our forum, the points are called Gil and represent our virtual currency
It is used to purchase perks like Custom Titles and avatars.
Our staff, having no use for Gil, instead like to have snappy quotes in the field, like "I send greetings of death!!!" (Reno) and "Who needs Gil when you have power?" (Sephiroth)
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Originally posted by Lesane Thanks for this great Hack Palmer, one question: What to do if i only want that admins can give points?
In points.php
Replace
PHP Code:
$perms=getpermissions();
if (!$perms[ismoderator] and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid]")) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
With
PHP Code:
if (!$bbuserinfo[usergroupid]==6) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
In moderator.php
Replace
PHP Code:
if ($action=="points") {
$userid = verifyid("user",$userid);
$permissions=getpermissions();
if ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1"))
$perms=getpermissions();
if (!$perms[ismoderator] and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid]")) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
With
PHP Code:
if (!$bbuserinfo[usergroupid]==6) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
In moderator.php
Replace
PHP Code:
if ($action=="points") {
$userid = verifyid("user",$userid);
$permissions=getpermissions();
if ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1"))
Is it possible to "excempt" admins and mods from this user point system? Is it also possible to excempt a particular user group from having user points? Thanks
Well, exempt them so that they are not entitled to points, hence no points will show up in their postbit (or at least, something to the effect of "N/A" instead of the user points themselves).
I have mods and staffers in my site, and I don't want them to take part in the user points system (because it's all to easy to have the mods give points to themselves or to their fellow mods - not that they are doing it but the temptation is there )
Hence, I want administrators, super mods, moderators to be exempted ... also a particular user group (staffers) if it's possible...
Not having them show up in their postbits or getinfo will also work for me, if the above is not possible Thanks!