• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Trophy Conditionals?

nrep

Well-known member
#1
Is there a way to get a list of all of the trophies a member has, or check for a specific trophy using the templates system?

I've seen the trophies code, but wasn't sure if this is something I can add on to another page and re-use:

Code:
        <ol class="overlayScroll">
        <xen:foreach loop="$trophies" value="$trophy">
            <li class="primaryContent">
                <xen:include template="trophy" />
            </li>
        </xen:foreach>
I'm looking at adding some code to the message_user_info template so that I can add an icon if a specific trophies have been awarded to that user.

There's currently an addon by xfrocks that does something similar, but it's not quite what I'm after - so I'm trying to code my own. If there was a conditional I could use to check for a trophy awarded to the user in "message_user_info", then it should be easy enough to code. Or, perhaps a way to look through all of the trophies they have.
 

nrep

Well-known member
#3
Ah, that's what I feared. I hoped there was a way I could check some sort of $user.trophy variable.

Thanks for the help!