|
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
| 2 | +<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?> |
| 3 | +<!--NOTICE: Please open this file in your web browser. If presented with a security warning, you may safely tell it to allow the blocked content.--> |
| 4 | +<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD.\nAlthough MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD.\nNo support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/--> |
| 5 | +<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd"> |
| 6 | + <header> |
| 7 | + <meta name="generator" content="MODX file generated with PP MODX Creator by tumba25 (online version)"/> |
| 8 | + <meta name="generator" content="MODX file generated by MODX Generator by tumba25"/> |
| 9 | + <license><![CDATA[http://opensource.org/licenses/gpl-license.php GNU General Public License v2]]></license> |
| 10 | + <title lang="en"><![CDATA[Reputation System (update from version 0.6.3 to 0.7.0)]]></title> |
| 11 | + <description lang="en"><![CDATA[This mod adds a reputation system to your phpBB3 board]]></description> |
| 12 | + <author-group> |
| 13 | + <author> |
| 14 | + <username><![CDATA[Pico88]]></username> |
| 15 | + <homepage><![CDATA[http://pico88.github.com/phpBB-Reputation-System/]]></homepage> |
| 16 | + </author> |
| 17 | + </author-group> |
| 18 | + <mod-version>0.7.0</mod-version> |
| 19 | + <installation> |
| 20 | + <level>easy</level> |
| 21 | + <time>60</time> |
| 22 | + <target-version>3.0.11</target-version> |
| 23 | + </installation> |
| 24 | + <link-group> |
| 25 | + <link type="contrib" href="../install_mod.xml" lang="en">Main Install File</link> |
| 26 | + </link-group> |
| 27 | + </header> |
| 28 | + <action-group> |
| 29 | + <copy> |
| 30 | + <file from="root/*.*" to="*.*"/> |
| 31 | + </copy> |
| 32 | + <open src="includes/constants.php"> |
| 33 | + <edit> |
| 34 | + <find><![CDATA[//Reputation System |
| 35 | +define('RS_COMMENT_OFF', 0); |
| 36 | +define('RS_COMMENT_BOTH', 1); |
| 37 | +define('RS_COMMENT_POST', 2); |
| 38 | +define('RS_COMMENT_USER', 3); |
| 39 | +define('REPUTATIONS_TABLE', $table_prefix . 'reputations'); |
| 40 | +define('REPUTATIONS_RANKS_TABLE', $table_prefix . 'reputations_ranks'); |
| 41 | +define('REPUTATIONS_BANS_TABLE', $table_prefix . 'reputations_bans');]]></find> |
| 42 | + <action type="replace-with"><![CDATA[//Reputation System |
| 43 | +define('REPUTATIONS_TABLE', $table_prefix . 'reputations'); |
| 44 | +define('REPUTATIONS_RANKS_TABLE', $table_prefix . 'reputations_ranks');]]></action> |
| 45 | + </edit> |
| 46 | + </open> |
| 47 | + <open src="includes/functions_user.php"> |
| 48 | + <edit> |
| 49 | + <find><![CDATA[ if ($mode == 'user' && !$ban_exclude && $config['rs_max_power_ban'])]]></find> |
| 50 | + <action type="replace-with"><![CDATA[ if ($mode == 'user' && !$ban_exclude && $config['rs_max_power_ban'] > 0)]]></action> |
| 51 | + </edit> |
| 52 | + <edit> |
| 53 | + <find><![CDATA[ $ban_id = $db->sql_nextid(); |
| 54 | + $ban_time = round(($ban_end - $current_time) / 3600);]]></find> |
| 55 | + <action type="replace-with"><![CDATA[ $ban_time = round(($ban_end - $current_time) / 3600);]]></action> |
| 56 | + </edit> |
| 57 | + </open> |
| 58 | + <open src="includes/mcp/mcp_warn.php"> |
| 59 | + <edit> |
| 60 | + <find><![CDATA[ $rep_point = (isset($_REQUEST['rep_point'])) ? true : false; |
| 61 | + $rep_power = request_var('rep_power', '');]]></find> |
| 62 | + <action type="replace-with"><![CDATA[ |
| 63 | + // Reputation System - warnings |
| 64 | + $reputation = (isset($_REQUEST['reputation'])) ? true : false; |
| 65 | + $comment = utf8_normalize_nfc(request_var('comment', '', true)); |
| 66 | + $points = request_var('points', '');]]></action> |
| 67 | + </edit> |
| 68 | + <edit> |
| 69 | + <find><![CDATA[ $rp_power = ''; |
| 70 | + for($i = 1; $i <= $config['rs_max_power_warning']; ++$i) |
| 71 | + { |
| 72 | + $rp_power = '<option value="-' . $i . '"> (-' . $i . ') </option>'; |
| 73 | + $template->assign_block_vars('reputation', array( |
| 74 | + 'REPUTATION_POWER' => $rp_power) |
| 75 | + ); |
| 76 | + }]]></find> |
| 77 | + <action type="replace-with"><![CDATA[ // Reputation System - warnings |
| 78 | + $voting_power_pulldown = ''; |
| 79 | + for($i = 1; $i <= $config['rs_max_power_warning']; ++$i) |
| 80 | + { |
| 81 | + $voting_power_pulldown = '<option value="-' . $i . '"> (-' . $i . ') </option>'; |
| 82 | + $template->assign_block_vars('reputation', array( |
| 83 | + 'REPUTATION_POWER' => $voting_power_pulldown) |
| 84 | + ); |
| 85 | + } |
| 86 | + // Reputation System - warnings |
| 87 | +]]></action> |
| 88 | + </edit> |
| 89 | + <edit> |
| 90 | + <find><![CDATA[ add_warning($user_row, $warning, $notify, $post_id, $rep_point, $rep_power);]]></find> |
| 91 | + <action type="replace-with"><![CDATA[ add_warning($user_row, $warning, $notify, $post_id);]]></action> |
| 92 | + </edit> |
| 93 | + <edit> |
| 94 | + <find><![CDATA[ $msg = $user->lang['USER_WARNING_ADDED'];]]></find> |
| 95 | + <action type="after-add"><![CDATA[ // Reputation System - warnings |
| 96 | + if ($config['rs_warning'] && $reputation) |
| 97 | + { |
| 98 | + include_once($phpbb_root_path . 'includes/functions_reputation.' . $phpEx); |
| 99 | +
|
| 100 | + reputation::give_point($user_id, $post_id, $comment, false, $points, 'warning'); |
| 101 | + } |
| 102 | + // Reputation System - warnings]]></action> |
| 103 | + </edit> |
| 104 | + <edit> |
| 105 | + <remove><![CDATA[ 'S_RS_WARNING' => ($config['rs_warning'] && $config['rs_max_power_warning']) ? true : false,]]></remove> |
| 106 | + </edit> |
| 107 | + <edit> |
| 108 | + <find><![CDATA[ 'S_CAN_NOTIFY' => $s_can_notify,]]></find> |
| 109 | + <action type="after-add"><![CDATA[ // Reputation System - warnings |
| 110 | + 'S_RS_WARNING' => ($config['rs_warning'] && $config['rs_max_power_warning']) ? true : false,]]></action> |
| 111 | + </edit> |
| 112 | + <edit> |
| 113 | + <find><![CDATA[ $rep_point = (isset($_REQUEST['rep_point'])) ? true : false; |
| 114 | + $rep_power = request_var('rep_power', '');]]></find> |
| 115 | + <action type="replace-with"><![CDATA[ // Reputation System - warnings |
| 116 | + $reputation = (isset($_REQUEST['reputation'])) ? true : false; |
| 117 | + $comment = utf8_normalize_nfc(request_var('comment', '', true)); |
| 118 | + $points = request_var('points', ''); |
| 119 | +]]></action> |
| 120 | + </edit> |
| 121 | + <edit> |
| 122 | + <find><![CDATA[ $rp_power = ''; |
| 123 | + for($i = 1; $i <= $config['rs_max_power_warning']; ++$i) |
| 124 | + { |
| 125 | + $rp_power = '<option value="-' . $i . '"> (-' . $i . ') </option>'; |
| 126 | + $template->assign_block_vars('reputation', array( |
| 127 | + 'REPUTATION_POWER' => $rp_power) |
| 128 | + ); |
| 129 | + }]]></find> |
| 130 | + <action type="replace-with"><![CDATA[ // Reputation System - warnings |
| 131 | + $voting_power_pulldown = ''; |
| 132 | + for($i = 1; $i <= $config['rs_max_power_warning']; ++$i) |
| 133 | + { |
| 134 | + $voting_power_pulldown = '<option value="-' . $i . '"> (-' . $i . ') </option>'; |
| 135 | + $template->assign_block_vars('reputation', array( |
| 136 | + 'REPUTATION_POWER' => $voting_power_pulldown) |
| 137 | + ); |
| 138 | + } |
| 139 | + // Reputation System - warnings |
| 140 | +]]></action> |
| 141 | + </edit> |
| 142 | + <edit> |
| 143 | + <find><![CDATA[ add_warning($user_row, $warning, $notify, 0, $rep_point, $rep_power);]]></find> |
| 144 | + <action type="replace-with"><![CDATA[ add_warning($user_row, $warning, $notify);]]></action> |
| 145 | + </edit> |
| 146 | + <edit> |
| 147 | + <find><![CDATA[ $msg = $user->lang['USER_WARNING_ADDED'];]]></find> |
| 148 | + <action type="after-add"><![CDATA[ // Reputation System - warnings |
| 149 | + if ($config['rs_warning'] && $reputation) |
| 150 | + { |
| 151 | + include_once($phpbb_root_path . 'includes/functions_reputation.' . $phpEx); |
| 152 | +
|
| 153 | + reputation::give_point($user_id, 0, $comment, false, $points, 'warning'); |
| 154 | + } |
| 155 | + // Reputation System - wa]]></action> |
| 156 | + </edit> |
| 157 | + <edit> |
| 158 | + <remove><![CDATA[ 'S_RS_WARNING' => ($config['rs_warning'] && $config['rs_max_power_warning']) ? true : false,]]></remove> |
| 159 | + </edit> |
| 160 | + <edit> |
| 161 | + <find><![CDATA[ 'S_CAN_NOTIFY' => $s_can_notify,]]></find> |
| 162 | + <action type="after-add"><![CDATA[ // Reputation System - warnings |
| 163 | + 'S_RS_WARNING' => ($config['rs_warning'] && $config['rs_max_power_warning']) ? true : false,]]></action> |
| 164 | + </edit> |
| 165 | + <edit> |
| 166 | + <find><![CDATA[function add_warning($user_row, $warning, $send_pm = true, $post_id = 0, $rep_point = false, $rep_power)]]></find> |
| 167 | + <action type="replace-with"><![CDATA[function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)]]></action> |
| 168 | + </edit> |
| 169 | + <edit> |
| 170 | + <remove><![CDATA[ if ($rep_point) |
| 171 | + { |
| 172 | + include_once($phpbb_root_path . 'includes/functions_reputation.' . $phpEx); |
| 173 | + $reputation = new reputation(); |
| 174 | + $reputation->give_point($user_row['user_id'], $post_id, $warning, false, $rep_power, 'warning'); |
| 175 | + }]]></remove> |
| 176 | + </edit> |
| 177 | + </open> |
| 178 | + <open src="styles/prosilver/template/mcp_warn_post.html"> |
| 179 | + <edit> |
| 180 | + <remove><![CDATA[ <!-- IF S_REPUTATION and S_RS_WARNING --> |
| 181 | + <br /><br /> |
| 182 | + <dl class="panel"> |
| 183 | + <dt><label>{L_MCP_RS_REP_POINT}</label></dt> |
| 184 | + <dd><select name="rep_power" id="rep_power"> |
| 185 | + <!-- BEGIN reputation --> |
| 186 | + {reputation.REPUTATION_POWER} |
| 187 | + <!-- END reputation --> |
| 188 | + </select></dd> |
| 189 | + </dl> |
| 190 | + <dl class="panel"> |
| 191 | + <dt> </dt> |
| 192 | + <dd><label><input type="checkbox" name="rep_point" /> {L_MCP_RS_GIVE_REP_POINT}</label></dd> |
| 193 | + </dl> |
| 194 | + <!-- ENDIF -->]]></remove> |
| 195 | + </edit> |
| 196 | + <edit> |
| 197 | + <find><![CDATA[<fieldset class="submit-buttons">]]></find> |
| 198 | + <action type="before-add"><![CDATA[<!-- IF S_REPUTATION and S_RS_WARNING --> |
| 199 | +<!-- INCLUDE reputation/mcp_warning.html --> |
| 200 | +<!-- ENDIF --> |
| 201 | +]]></action> |
| 202 | + </edit> |
| 203 | + </open> |
| 204 | + <open src="styles/prosilver/template/mcp_warn_user.html"> |
| 205 | + <edit> |
| 206 | + <remove><![CDATA[ <!-- IF S_REPUTATION and S_RS_WARNING --> |
| 207 | + <br /><br /> |
| 208 | + <dl class="panel"> |
| 209 | + <dt><label>{L_MCP_RS_REP_POINT}</label></dt> |
| 210 | + <dd><select name="rep_power" id="rep_power"> |
| 211 | + <!-- BEGIN reputation --> |
| 212 | + {reputation.REPUTATION_POWER} |
| 213 | + <!-- END reputation --> |
| 214 | + </select></dd> |
| 215 | + </dl> |
| 216 | + <dl class="panel"> |
| 217 | + <dt> </dt> |
| 218 | + <dd><label><input type="checkbox" name="rep_point" /> {L_MCP_RS_GIVE_REP_POINT}</label></dd> |
| 219 | + </dl> |
| 220 | + <!-- ENDIF -->]]></remove> |
| 221 | + </edit> |
| 222 | + <edit> |
| 223 | + <find><![CDATA[<fieldset class="submit-buttons">]]></find> |
| 224 | + <action type="before-add"><![CDATA[<!-- IF S_REPUTATION and S_RS_WARNING --> |
| 225 | +<!-- INCLUDE reputation/mcp_warning.html --> |
| 226 | +<!-- ENDIF --> |
| 227 | +]]></action> |
| 228 | + </edit> |
| 229 | + </open> |
| 230 | + <php-installer><![CDATA[install_reputation.php]]></php-installer> |
| 231 | + </action-group> |
| 232 | +</mod> |
0 commit comments