1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remove Points From Sidebar Visitor Panel

Discussion in 'Styling and Customization Questions' started by DRE, Feb 5, 2013.

  1. DRE

    DRE Well-Known Member

    How do you remove 'points'?

    Screen Shot 2013-02-05 at 1.33.31 AM.png
     
  2. TRACKMIXERS

    TRACKMIXERS Member

    You can comment out/remove this line in sidebar_visitor_panel template:

    Code:
    <dl class="pairsJustified"><dt>{xen:phrase points}:</dt> <dd>{xen:number $visitor.trophy_points}</dd></dl>
     
    Brandon Sheley likes this.
  3. DRE

    DRE Well-Known Member

    That also removes Post Ratings....
     
  4. EQnoble

    EQnoble Well-Known Member


    what happens if you replace above with this?
    Code:
    <dl class="pairsJustified">
     
        <!-- <dt>{xen:phrase points}:</dt> <dd>{xen:number $visitor.trophy_points}</dd> -->
     
    </dl>
     
  5. TRACKMIXERS

    TRACKMIXERS Member

    That still removes Post Ratings.
     
  6. EQnoble

    EQnoble Well-Known Member

    what ratings is that? is that an addon?
     
  7. TRACKMIXERS

    TRACKMIXERS Member

  8. EQnoble

    EQnoble Well-Known Member

    ahhh....well without access to someones board who uses this I cant test it, (not trying to be shyster or anything, but now a days I am broke and can't just buy an addon to test it for someone and possibly find that it is not the problem.)

    If you can find me a board owner who will let me poke around I am sure I can fix it.
     
  9. DRE

    DRE Well-Known Member

    I think the hook in Post Ratings has to be changed so that it doesn't use the Trophy Points position.

    I'll ask Luke Foreman (Post Ratings Author).

    library/Dark/PostRating/EventListener.php

    Starting at around Line 110

    Code:
    else if ($hookName == 'sidebar_visitor_panel_stats'){
     
    $options = XenForo_Application::get('options');
    if($options->dark_postrating_member_card){
     
    $params = $template->getParams();
    $params += $hookParams;
    $params['user'] = $params['visitor'];
    $content_totals = $template->create('dark_postrating_visitor_panel', $params);
     
    // Hide Likes received if being shown as ratings
    if($options->dark_postrating_like_show){
    $likesReceived = (string)new XenForo_Phrase('likes');
    $content = preg_replace('#(<dl.*?><dt>'.$likesReceived.':</dt>\s*<dd>.*?</dd></dl>)#', '', $content);
    }
     
    if($hookName == 'member_view_info_block')
    $content .= $content_totals;   
    else {
    $trophyPoints = (string)new XenForo_Phrase('points');
    $content = preg_replace('#(<dl.*?><dt>'.$trophyPoints.')#', $content_totals . '$1', $content, 1);
    
     
  10. EQnoble

    EQnoble Well-Known Member

    what is in
    dark_postrating_visitor_panel

    i bet you could work it from there
     
  11. Sheldon

    Sheldon Well-Known Member

    Code:
    <xen:require css="dark_postrating.css" />
    <dl class="pairsJustified">
    <dt>{xen:phrase dark_ratings}:</dt>
        <dd><xen:if is="{$postrating_enabled_ratings.positive}"><span class="dark_postrating_positive">{$postrating_ratings_total.positive}</span><xen:if is="{$postrating_enabled_ratings.neutral} || {$postrating_enabled_ratings.negative}">/</xen:if></xen:if><xen:if is="{$postrating_enabled_ratings.neutral}"><span class="dark_postrating_neutral">{$postrating_ratings_total.neutral}</span><xen:if is="{$postrating_enabled_ratings.negative}">/</xen:if></xen:if><xen:if is="{$postrating_enabled_ratings.negative}"><span class="dark_postrating_negative">{$postrating_ratings_total.negative}</span></xen:if></dd></dl>
     
    
    I can get the trophy part to be removed, have Ratings shown... but no numbers.
     
  12. EQnoble

    EQnoble Well-Known Member

    Is that the whole of the template there ?
     
  13. Sheldon

    Sheldon Well-Known Member

  14. EQnoble

    EQnoble Well-Known Member

    Nothing is jumping out at me as the immediate answer, but I have a hunch not that I know how to explain it...I would really need hands on or I am going to have you doing and undoing a bunch of stuff until I get it...if you have a testboard with it installed I can try for you otherwise I dont want to suggest something that wont work especially for others who may be following along.
     

Share This Page