Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to show Points with Author Meta?

13»

Comments

  • @peregrine said:
    array('class' => 'Points Count', 'title'= 'Points description on hover'));

    I think "=" should be "=>" instead. Thanks, working!

  • peregrineperegrine MVP
    edited May 2014

    see my comment above.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine said:
    or

    this should work with translations.
    echo Wrap($Author->Points . " " . T("Point") ,'span',array('class' => 'Points Count', 'title' => sprintf(T('Points description on hover'))));

    Great, I added translations.

  • And what about the link? I used a href but I'm not sure how to direct it to each $user profile.

    echo Wrap($Author->Points . " " .T("<a href=http://website.com>Points</a>") ,'span', array('class' => 'Points Count', 'title' => sprintf(T('Total Points'))));

  • peregrineperegrine MVP
    edited May 2014

    you can certainly learn this stuff by looking at a few other plugins (as well as code), and learning about Anchor links.

    reviewing other plugins and taking a php tutorial are the best ways to learn.

    Anchor(

    you can also see about 5 variations of the anchor link in use here:

    https://github.com/vanilla/vanilla/blob/master/applications/vanilla/views/discussions/helper_functions.php

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Nice!

    My suggestions include adding Yaga to the required applications list and using the Plural translate function. Something like echo Anchor(Plural($Author->Points, '%s Point', '%s Points'), 'profile/' . $Author->Name, 'Point Count')); should do it.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • haven't tested your statement hg, but Plural is certainly better as it better uses vanilla functions.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • BigPlural might even be a better option - if points get to be large numbers.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited May 2014

    edited out.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.