Resource icon

User Ranks Based on Trophy Points

AzzidReign

Well-known member
AzzidReign submitted a new resource:

User Ranks Based on Trophy Points - Display a rank image in the postbit based on trophy points earned

To display a rank image based on trophy points, you can do something like this (be sure to replace [path_to_image] with your image):

HTML:
        <xen:if is="{$user.trophy_points} >= 130" />
            <a href="{xen:link members/trophies, $user}" class="concealed OverlayTrigger"><img src="[path_to_image]" class="Tooltip" title="{xen:phrase trophy_points}: {$user.trophy_points}" /></a>
        <xen:elseif is="{$user.trophy_points} >= 85" />
            <a href="{xen:link...

Read more about this resource...
 
I replaced

HTML:
<span class="arrow"><span></span></span>

with the code you provided and I get...

"The following error occurred:
The following templates contained errors and were not saved: message_user_info: 1) Line 124: Template syntax error."

I was wondering what I did wrong.

btw, thanks for this, it looks really nice!
 
I replaced

HTML:
<span class="arrow"><span></span></span>

with the code you provided and I get...

"The following error occurred:
The following templates contained errors and were not saved: message_user_info: 1) Line 124: Template syntax error."

I was wondering what I did wrong.

btw, thanks for this, it looks really nice!

Oh, you should probably keep the last 2 spans.
 
What was it? Is it something wrong I said?

No, I'm guessing it was a conflict on my end as I went over the code character by character and it looked fine. And it doesn't seem like anybody else had the same problem as I. So I took out everything and just left the if statements, image source, and tooltip popup codes and it worked perfectly. Although, I couldn't figure out exactly why it didn't work, I still got to the finish line. Thank you so much much for all your help. I very much appreciate it!
 
Nice feature Azzid.
The code will give a syntax error because this line:

<xen:if is="{$user.trophy_points} >= 130" />

Should be:

<xen:if is="{$user.trophy_points} >= 130" >
 
Nice feature Azzid.
The code will give a syntax error because this line:

<xen:if is="{$user.trophy_points} >= 130" />

Should be:

<xen:if is="{$user.trophy_points} >= 130" >
Thank you. I have a much bigger list on my site so I just removed a ton of the ones we have and didn't notice that. :)
 
Top Bottom