HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Point leader-board

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#52764 (In Topic #11483)
Avatar

Community saint

HOW TO?

It shows the member name and a link to their profile. Is it easy to modify so instead of the member name, it shows the member avatar?

Eric DeMars . com
My electronic portfolio and personal site. Uses ocPortal!
Back to the top
 
Posted
Rating:
#52768
Avatar

Well-settled

Hi,

I just took a look at main_leader_board.php and it's unfortunately not passing in a member ID to the POINTS_LEADERBOARD_ROW template, which makes things a little trickier.

Nevertheless, Tempcode can still do it. I think changing {NAME*} to:

Code

<img alt="{NAME*}" src="{$AVATAR*,{$USER,{NAME}}}" />
would work.

(it get's the member ID from the username, and then calculates the avatar from that)
Back to the top
 
Posted
Rating:
#52769
Avatar

Community saint

That worked!  :thumbs:

Thank you, duder911!

Eric DeMars . com
My electronic portfolio and personal site. Uses ocPortal!
Back to the top
 
Posted
Rating:
#52809
Avatar

Community saint

duder911 said

Hi,

I just took a look at main_leader_board.php and it's unfortunately not passing in a member ID to the POINTS_LEADERBOARD_ROW template, which makes things a little trickier.

Nevertheless, Tempcode can still do it. I think changing {NAME*} to:

Code

<img alt="{NAME*}" src="{$AVATAR*,{$USER,{NAME}}}" />
would work.

(it get's the member ID from the username, and then calculates the avatar from that)

This is so Cool!:cool:
Great idea Eric!
Thanks for the code duder911; you're a Champ!:thumbs:
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: