1. dehness

    dehness - Aug 10, 2015 New Member VIP Member

    Credit
    Point
    Hi, I would like to remove the points adjuster from the comment popup for giving our rep points.

    Our forum uses only single point reps and has negative reps disabled. Therefore the Points adjuster is redundant.

    It's only just been installed and already people have given out reputation comments with 0 points. How do I remove this while ensuring that the default is 1 reputation point (as the default now appears as 0).

    I have correctly configured the permissions as well as tried a number of combinations, but to no avail.

    [​IMG]
     
    Loading...
  2. Lisa Nguyen

    Lisa Nguyen - Aug 10, 2015 Brivium Tester Staff Member VIP Member

    Credit
    Point
    Hello,

    You can set permission "Can give negative reputation" is NO.

    Please open file: library/Brivium/AdvancedReputationSystem/Model/Post.php and find

    Code:
    public function giveMinReputationPoints(array $viewingUser = null)
        {
        $this->standardizeViewingUserReference($viewingUser);
       
        if(!$this->canGiveNegativePoints($viewingUser))
        {
        return 0;
        }
       
        return -1 * $this->giveMaxReputationPoints($viewingUser);
        }
    
    Replace with

    Code:
     
    public function giveMinReputationPoints(array $viewingUser = null)
        {
        $this->standardizeViewingUserReference($viewingUser);
       
        if(!$this->canGiveNegativePoints($viewingUser))
        {
        return 1;
        }
       
        return -1 * $this->giveMaxReputationPoints($viewingUser);
        }
    
    After, you open template BRARS_reputation_edit and find

    Code:
    <input type="text"  id="ctrl_points" name="points" value="{$reputation.points}" class="textCtrl autoSize SpinBox"  min="{$post.minReputationPoints}" max="{$post.maxReputationPoints}" step="1"/>
    Replace with

    Code:
    <input type="text"  id="ctrl_points" name="points" value="{xen:if $reputation, $reputation.points, '{xen:calc '{$post.minReputationPoints} + 1'}'}" class="textCtrl autoSize SpinBox"  min="{$post.minReputationPoints}" max="{$post.maxReputationPoints}" step="1"/>
    And check it again.
     
    #2
  3. dehness

    dehness - Aug 10, 2015 New Member VIP Member

    Credit
    Point
    Thanks @Lisa Nguyen that worked to make 1 point the default.

    But is it possible to remove the points selector entirely? This part just makes it confusing for members:
     
    #3
  4. Brivium

    Brivium - Aug 13, 2015 XenForo Services Staff Member

    Credit
    Point
    #4
  5. dehness

    dehness - Aug 13, 2015 New Member VIP Member

    Credit
    Point
    Thanks guys! Excellent support.

    Should I revert the template changes I made from above now?
     
    #5
  6. Brivium

    Brivium - Aug 13, 2015 XenForo Services Staff Member

    Credit
    Point
    That's right. Please do it.
     
    #6