Log in

View Full Version : Reputation, turn off for those who opt not to display


louis_chypher
05-02-2006, 04:20 PM
In the postbit template there exist the following lines:

<if condition="$show['reputationlink']"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a> &nbsp;</if>

I'd like to wrap those lines with a conditional that stops the display of the reputation link if the user has opted not to display their reputation. Something like:

<!-- reputation opt in/out detection -->
<if condition=" WHAT GOES HERE TO DETECT IF USER IS OPTED NOT TO DISPLAY THEIR REPUTATION?">
<if condition="$show['reputationlink']"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a> &nbsp;</if>
</if>

I'm trying to figure out how to detect that the user is allowing their reputation to be shown and then, as I said, not allow them to vote on reputations.

Any suggestions would be grand!

InsaneContender
05-02-2006, 07:56 PM
As far as I know, they can disable it - however, I don't think they could get rid of it completely. It is a good idea, however. I would like something like that as well.

louis_chypher
05-03-2006, 01:54 PM
<!-- reputation opt in/out detection -->
<if condition=" $vbulletin->bf_misc_useroptions['showreputation']">
<if condition="$show['reputationlink']"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a> &nbsp;</if>
</if>

Looks like "$vbulletin->bf_misc_useroptions['showreputation']" is supposed to be the item I am looking for but it does not seem to function to well in a conditional. Any ideas on how to properly make "$vbulletin->bf_misc_useroptions['showreputation']" work in a conditional?

antialiasis
05-03-2006, 03:20 PM
There should not be a space between the " and the $ in that line, but I don't know if that's the problem...

louis_chypher
05-03-2006, 05:10 PM
<!-- reputation on/off opt in/out detection -->
<if condition="$vbulletin->userinfo['showreputation']">
<if condition="$show['reputationlink']"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a> &nbsp;</if>
</if>