PDA

View Full Version : Adding User Rank to Profile


MikQuattro
02-23-2010, 11:34 PM
For whatever reason, user ranks have disappeared from the member profile page in v4, and I simply want to add it back. I have tried stealing the code from the postbit:
<vb:if condition="$post['rank']">
<span class="rank">{vb:raw post.rank}</span>
</vb:if>
and adding it to the member profile template, but it didn't work. I'm assuming because the variable isn't available for that page, but I'm unsure how to make it work in v4. Can anyone help? Please? :D

--------------- Added 1267048529 at 1267048529 ---------------

Okay, so that's a no-go then. Well, let me ask this then: can someone tell me how I can display content (some text, for instance) on a member's profile page according to their usergroup?

So, if the user is a member of usergroup 5, then display the text "Hello World"....sort of thing?

ChopSuey
02-27-2010, 03:14 PM
<vb:if condition="is_member_of($bbuserinfo, 5)">Hello world</vb:if>

Try that :D if you want to add more usergroups try 5,(number),(nubmer) and so on ;)

MikQuattro
03-08-2010, 08:24 PM
Thanks for the reply ChopSuey...I appreciate it, but unfortunately I didn't explain myself well enough. That code will display "Hello World" only to the allowed usergroup that is viewing the page. I want "Hello World" to display on a user's page only if they are a member of that group.

Here's what I'm trying to do: I have a Spammer usergroup. On the Spammer's profile page, I want big bold letters to scream "SPAMMER", but of course I only want that text to show if the user is a member of the Spammer usergroup. So I want everyone to be able to view the text, but only want the text to show up if the user is a member of that group. I hope that explains it better.

That's why having the user rank display on the profile page was perfect, because it was based on usergroups.... ;)

TigerC10
03-23-2011, 05:01 PM
For anyone else out there that hasn't figured this one out...

Open your MEMBERINFO template.

Find:

<vb:if condition="$prepared['usertitle']">
<br />
<span class="usertitle">{vb:raw prepared.usertitle}</span>
</vb:if>


Add below:

<vb:if condition="$prepared['rank']">
<br />
<span class="usertitle">{vb:raw prepared.rank}</span>
</vb:if>

MikQuattro
04-27-2011, 12:21 AM
Awesome, that's exactly what I was looking for....;) Thanks!

MMObeat
04-27-2011, 12:37 AM
Thanks for this! I was having this same problem as well!

ihstiv
10-12-2011, 07:49 PM
thanks for this!