vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Adding User Rank to Profile (https://vborg.vbsupport.ru/showthread.php?t=236729)

MikQuattro 02-23-2010 11:34 PM

Adding User Rank to Profile
 
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:
Code:

<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 [DATE]1267048529[/DATE] at [TIME]1267048529[/TIME] ---------------

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

HTML Code:

<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:
Code:

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

Add below:
Code:

                                                <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!


All times are GMT. The time now is 04:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01196 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete