Гость
07 Март 2014 06:10

In my custom template, instead of the usual block at the bottom of a record with author name, hits, rating and if on line or not, I need to have a sentence like this:

“This article was submitted by [author name]. To contact [author name] please click below.”

(After this is the ‘email’ field.)

In the custom template, how can I automatically add the authors name to the sentence above?


Sergey
Total posts: 13,748
07 Март 2014 06:16

I am not sure exactly because that depends if you want multiple language support or not.

echo CCommunityHelper::getName($item->user_id, $this->section);

Somethign like this.


Mel VIP
Total posts: 126
07 Март 2014 06:46

Hi Sergey, thanks it works but it has the small ‘user online/offline’ button in front of the name. How can I have just the name?


Sergey
Total posts: 13,748
07 Март 2014 12:32
echo CCommunityHelper::getName($item->user_id, $this->section, TRUE);
Работает на Cobalt