dopetalk

Technology => SMF Forum Code Modifications => Topic started by: Chip on September 07, 2015, 11:48:15 PM

Title: Advanced Reputation System v1.8.3
Post by: Chip on September 07, 2015, 11:48:15 PM
http://custom.simplemachines.org/mods/index.php?mod=1129

IN TESTING SYSTEM ONLY

1. fix install error via ee Sources/Display.php and bring search target line back one tab (and the other line, too)
2. backup the current php file via cp Display.template.php Display.template.php-NOSMITE
3. add the smite option back in; copy the single line from Display.template.php-orig and save to Display.template.php-PREARS then cp Display.template.php-PREARS Display.template.php)

note - 3. failed so i used Display.template.php-orig to start with.
 I had to uninstall SA Facebook and reinstall because Display.template.php is updated by it.

Important Instructions!

Before using this mod, uninstall all other Karma-changing mods. This mod changes so much that most other Karma mods will be incompatible.
 
After installing, go into Configuration > Features & Options > Core Features and make sure Reputation is turned on. Then, go to Members > Permissions > General Permissions and select which membergroups you want to be able to give positive reputation. Click 'Advanced Options' and make sure Add Permission is selected in the bottom left dropdown box. In the bottom right, select 'Can +reputation other users' and click 'Set Permission'. Repeat for 'Can -reputation other users' and 'Disable display of own reputation'. Then select your Moderator groups and give them the permission to 'Delete reputuation actions'.

* then set permissions for the groups just affected.

* then run GiveReputation.php

+ you MAY HAVE TO LOGOUT and/or service httpd restart

That's about it! There are a dozen or so settings under Configuration > Figures & Options > Reputation that you can mess around with, and six images that you can change if you feel like it.

* Modify points per block from 1000 to ?
* Modify the new level comments.

One More Thing!

To install this modification in any theme other than Default, please click the box next to "Install in Other Themes" at the bottom of this page and check the applicable themes. This release only works for Curve-based themes. A compatibility pack will be released in the near future.
Title: Re: Advanced Reputation System v1.8.3
Post by: Chip on January 13, 2017, 12:32:22 AM
This code is now licensed and not freely available but we got in early so there is no issue.

I cannot and will not distribute the source to comply with Simple Machines policy.
Title: Re: Advanced Reputation System v1.8.3
Post by: Chip on July 07, 2018, 02:22:03 PM
bug fix (invalid index on $num_given):

at +2452 /var/www/html/Sources/Profile-View.php

from:
Code: [Select]
        $context['page_index'] = constructPageIndex($scripturl . '?action=reputation', $_REQUEST['start'], $num_given, 50);
to:
Code: [Select]
        $context['page_index'] = constructPageIndex($scripturl . '?action=reputation', $_REQUEST['start'], 0, 50);
Title: Re: Advanced Reputation System v1.8.3
Post by: Chip on May 30, 2021, 02:19:32 PM
PHP 7.4 issue that originates from install.xml:

error:
Code: [Select]
8192: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
File: /var/www/html/Themes/default/Display.template.php
Line: 50

in ./Themes/default/Display.template.php:

find:
Code: [Select]
<input type="radio" name="type" value="disagree"', !$context['can_neg_rep'] ? ' disabled="disabled"' : !$context['can_pos_rep'] ? ' checked="checked"' : '', ' /> ', $txt['karma_disagree'], '
replace:
Code: [Select]
<input type="radio" name="type" value="disagree"', (!$context['can_neg_rep'] ? ' disabled="disabled"' : !$context['can_pos_rep']) ? ' checked="checked"' : '', ' /> ', $txt['karma_disagree'], '
SimplePortal 2.3.6 © 2008-2014, SimplePortal