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

XF 1.5 Using a variable from a plugin?

Discussion in 'Styling and Customization Questions' started by son et lumiere, Oct 2, 2016.

Thread Status:
Not open for further replies.
  1. I'm trying to create a reputation bar to display on my forum, but to do so I need to check the total rep value of a user. Unfortunately it returns a null value.


    This is the syntax, by the way:

    <xen:if is="{$user.xf_bdreputation_given} > 0">
    <div class="RepBarPositive"><img src="https://i.imgur.com/Rf60SHQ.png" alt="Mountain View" style="width:8px;height:11px;"></div>
    <xen:elseif is="{$user.xf_bdreputation_given} < 0">
    <div class="RepBarNegative"><img src="https://i.imgur.com/Uxa9TBg.png" alt="Mountain View" style="width:8px;height:11px;"></div>
    <xen:else />
    <div class="RepBarNeutral"><img src="http://i.imgur.com/V5bYENo.png" alt="Mountain View" style="width:8px;height:11px;"></div>
    It's currently only meant to show a blob for positive, negative and neutral rep. I will add the rest later, but for now I can't even get it to check the variable for a numeric value.

    $user.xf_bdreputation_given is always NULL
  2. Brogan

    Brogan XenForo Moderator Staff Member

Thread Status:
Not open for further replies.

Share This Page