It mean translatable string. Anything that has a T for translate can be changed with a language locale to another language. So if I use a spanish locale for example, that word would be translated after I add the $Definition in the file for the locale if it is not there already.
I used position: absolute and left/top to position the element under the user avatar (bootstrap theme). Is there a better way to do this? @vrijvlinder you are the expert in css right?
@vrijvlinder said:
It mean translatable string. Anything that has a T for translate can be changed with a language locale to another language. So if I use a spanish locale for example, that word would be translated after I add the $Definition in the file for the locale if it is not there already.
Awesome, the translatable string might come in handy!
It's working fine with both classes, I just needed it to work with PhotoWrap class. I was only wondering if there is a better way to position elements, besides position absolute and left/top etc.
How about making it into a hyperlink that goes to say /profile/name page? I'm also not sure where to add/edit the html property title="Points description on hover". How would this be done?
this should work with translations. echo Wrap($Author->Points . " " . T("Point") ,'span',array('class' => 'Points Count', 'title' => sprintf(T('Points description on hover'))));
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Comments
Done: http://vanillaforums.org/addon/myyagapoints-plugin
Very Nice !!
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thanks @vrijvlinder!
I need to actually learn some real coding now...
...now that I'm part of the team haha
How can I add text next to the number of points eg. "10 Points" ?
try this
echo Wrap($Author->Points . " Points",'span', array('class' => 'Points Count'));
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Try this
echo Wrap(T('Points'),$Author->Points,'span', array('class' => 'Points Count'));
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
the only time it would be point - would be 1 Point
you could put a test to determine pseudocode if $Author->Points == 1 then echo " Point" insead
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
That easy huh, I wonder how many more cool things I can learn. Thanks @peregrine!
yes a T (good idea V) would be better if you are going to upload and make it translateable.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
You are lucky, some people can't cut and paste successfully ...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
What's does the "T" do?
Working perfectly, thanks guys!
It mean translatable string. Anything that has a T for translate can be changed with a language locale to another language. So if I use a spanish locale for example, that word would be translated after I add the $Definition in the file for the locale if it is not there already.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I used position: absolute and left/top to position the element under the user avatar (bootstrap theme). Is there a better way to do this? @vrijvlinder you are the expert in css right?
Awesome, the translatable string might come in handy!
I would need to see it to help you with that.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
You could try changing the span class to AuthorInfo instead of Points Count and see if it lines up proper on it's own
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
It's working fine with both classes, I just needed it to work with PhotoWrap class. I was only wondering if there is a better way to position elements, besides position absolute and left/top etc.
Don't use Photowrap class because that is only for the user image user link
AuthorInfo is for the span that contains it. Then you can add css example. So it targets the right element
you can also do it like this
echo Wrap($Author->Points . " " . T("Points") ,'span', array('class' => 'Points Count'));
the css
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
How about making it into a hyperlink that goes to say /profile/name page? I'm also not sure where to add/edit the html property title="Points description on hover". How would this be done?
array('class' => 'Points Count', 'title'=> 'Points description on hover'));
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
or
this should work with translations.
echo Wrap($Author->Points . " " . T("Point") ,'span',array('class' => 'Points Count', 'title' => sprintf(T('Points description on hover'))));
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.