##
##
## Mod title: Reputation System
##
## Mod version: 1.0.0
## Works on PunBB: 1.2.*
## Release date: 2005-08-13
## Author: Sakuza (sakuza@sakuza.com)
##
## Description: Allow users to give reputation points to other users.
##
## Affected files: admin_options.php
## viewtopic.php
##
## Affects DB:
## New options:
## 'o_reputation_timeout'
##
## Notes: 1. The install_mod routine currently works only for MySQL.
##
## DISCLAIMER: Please note that "mods" are not officially supported by
## PunBB. Installation of this modification is done at your
## own risk. Backup your forum database and any and all
## applicable files before proceeding.
##
##
#
#---------[ 1. UPLOAD ]------------------------------------------------------
#
install_mod.php
reputation.php
include/reputation/admin_options.php
img/plus.png
img/minus.png
lang/English/reputation.php
#---------[ 2. RUN ]---------------------------------------------------
#
install_mod.php
#
#---------[ 3. DELETE ]---------------------------------------------------
#
install_mod.php
#
#---------[ 4. OPEN ]---------------------------------------------------
#
viewtopic.php
#
#---------[ 5. FIND (line:41) ]---------------------------------------------------
#
require PUN_ROOT.'lang/'.$pun_user['language'].'/topic.php';
#
#---------[ 6. AFTER, ADD ]---------------------------------------------------
#
require PUN_ROOT.'lang/'.$pun_user['language'].'/reputation.php';
#
#---------[ 7. FIND (line:186) ]---------------------------------------------------
#
$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
#
#---------[ 8. REPLACE WITH ]---------------------------------------------------
#
$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, u.reputation_minus, u.reputation_plus, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
#
#---------[ 9. FIND (line:322) ]---------------------------------------------------
#
<?php if (count($user_info)) echo "\t\t\t\t\t".implode('</dd>'."\n\t\t\t\t\t", $user_info).'</dd>'."\n"; ?>
<?php if (count($user_contacts)) echo "\t\t\t\t\t".'<dd class="usercontacts">'.implode(' ', $user_contacts).'</dd>'."\n"; ?>
#
#---------[ 10. REPLACE WITH ]-----------------------------------------------------
#
<?php if (count($user_info)) echo "\t\t\t\t\t".implode('</dd>'."\n\t\t\t\t\t", $user_info).'</dd>'."\n"; ?>
<dd>
<?php
//Is rep. system enabled
if($pun_config['o_reputation_enabled'] == '1') {
echo $lang_reputation['Reputation'];
?> :
<?php
//If viewer are guest or user who post this message,then we do not show control buttons
if($pun_user['is_guest'] != true && $pun_user['username'] != $cur_post['username']) {
?>
<a href="./reputation.php?id=<?php echo $cur_post['poster_id']; ?>&plus"><img src="./img/plus.png" alt="+" border="0"></a>
<a href="./reputation.php?id=<?php echo $cur_post['poster_id']; ?>&minus"><img src="./img/minus.png" alt="-" border="0"></a>
<?php } ?>
<strong><small>[+ <?php echo $cur_post['reputation_plus']; ?>/ -<?php echo $cur_post['reputation_minus']; ?> ]</small></strong>
<?php }?>
</dd>
<?php if (count($user_contacts)) echo "\t\t\t\t\t".'<dd class="usercontacts">'.implode(' ', $user_contacts).'</dd>'."\n"; ?>
#
#---------[ 11. OPEN ]-----------------------------------------------------
#
admin_options.php
#
#---------[ 12. FIND (line:404) ]---------------------------------------------------
#
#
#---------[ 13. ADD ]---------------------------------------------------
#
<?php require(PUN_ROOT.'include/reputation/admin_options.php'); ?>