Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-23-2010, 11:34 PM
MikQuattro MikQuattro is offline
 
Join Date: Jul 2003
Location: UK
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?

--------------- 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?
Reply With Quote
  #2  
Old 02-27-2010, 03:14 PM
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Posts: 2,140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
<vb:if condition="is_member_of($bbuserinfo, 5)">Hello world</vb:if>
Try that if you want to add more usergroups try 5,(number),(nubmer) and so on
Reply With Quote
  #3  
Old 03-08-2010, 08:24 PM
MikQuattro MikQuattro is offline
 
Join Date: Jul 2003
Location: UK
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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....
Reply With Quote
  #4  
Old 03-23-2011, 05:01 PM
TigerC10's Avatar
TigerC10 TigerC10 is offline
 
Join Date: Apr 2006
Location: Austin, TX
Posts: 616
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #5  
Old 04-27-2011, 12:21 AM
MikQuattro MikQuattro is offline
 
Join Date: Jul 2003
Location: UK
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome, that's exactly what I was looking for.... Thanks!
Reply With Quote
  #6  
Old 04-27-2011, 12:37 AM
MMObeat MMObeat is offline
 
Join Date: Mar 2011
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this! I was having this same problem as well!
Reply With Quote
  #7  
Old 10-12-2011, 07:49 PM
ihstiv ihstiv is offline
 
Join Date: Jan 2009
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for this!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:43 AM.


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.04294 seconds
  • Memory Usage 2,215KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete