this should work with translations. echo Wrap($Author->Points . " " . T("Point") ,'span',array('class' => 'Points Count', 'title' => sprintf(T('Points description on hover'))));
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.
Comments
I think "=" should be "=>" instead. Thanks, working!
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.
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'))));
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.
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.