Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 02-26-2016, 05:48 PM
phalanxents phalanxents is offline
 
Join Date: Feb 2016
Location: UK
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default User Profiles

I really need this for a few of my sites. Very little vb knowledge, although I did see there's an archived 2.2 mod that would have done something SIMILAR.

I want one profile layout for 1 usergroup,
another profile layout for another usergroup
another for another

so on and so on.

Would any <if> statements do this? Really need this to work
Reply With Quote
  #2  
Old 02-26-2016, 06:14 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

one way to do it would be to edit the memberinfo template and use

Code:
<if condition="$userinfo[usergroupid] == ##">
example admin and registered user templates

Code:
<if condition="$userinfo[usergroupid] == 6">
ADMIN
</if>

<if condition="$userinfo[usergroupid] == 2">
MEMBER
</if>
just place all of the memberinfo template into each if condition and change accordingly

i would recommend keeping the <head> stuff and doing this in the body part of MEMBERINFO
Reply With Quote
  #3  
Old 02-26-2016, 07:24 PM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I never thought about doing this this way, opens many ideas for me, thanks Mark!
I have hid profile fields this way but not on member page.
Reply With Quote
Благодарность от:
Dr.CustUmz
  #4  
Old 02-26-2016, 07:36 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by blind-eddie View Post
thanks Mark!
whos mark lol
Reply With Quote
  #5  
Old 02-26-2016, 07:49 PM
phalanxents phalanxents is offline
 
Join Date: Feb 2016
Location: UK
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dr.CustUmz View Post
one way to do it would be to edit the memberinfo template and use

Code:
<if condition="$userinfo[usergroupid] == ##">
example admin and registered user templates

Code:
<if condition="$userinfo[usergroupid] == 6">
ADMIN
</if>

<if condition="$userinfo[usergroupid] == 2">
MEMBER
</if>
just place all of the memberinfo template into each if condition and change accordingly

i would recommend keeping the <head> stuff and doing this in the body part of MEMBERINFO
Spot on! That's exactly what I wanted!!! Thank you!!!
Reply With Quote
Благодарность от:
Dr.CustUmz
  #6  
Old 02-26-2016, 09:41 PM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dr.CustUmz View Post
whos mark lol
oops, Sorry Ryan, I was just reading another post by MarkFL and was thinking I was replying to him.
Reply With Quote
  #7  
Old 02-26-2016, 09:47 PM
phalanxents phalanxents is offline
 
Join Date: Feb 2016
Location: UK
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am doing the links in the UserCP, as I want different links to show depending on which profile is logged in and it won't show the other ones

I have a hairdressing directory and it will show the options for the price list edits for hairdressers (userid=9) but it won't show the edit price list to beauticians (userid=10)


Here's my code (USERCP_SHELL):

Code:
<if condition="$userinfo[usergroupid] == 9">
<tr><td class="$navclass[men]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=men">Edit Price List (Men)</a></td></tr>
<tr><td class="$navclass[women]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=women">Edit Price List (Women)</a></td></tr>
</if>
<if condition="$userinfo[usergroupid] == 10">
<tr><td class="$navclass[waxing]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=waxing">Edit Waxing</a></td></tr>
<tr><td class="$navclass[nails]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=nails">Edit Nails</a></td></tr>
<tr><td class="$navclass[facials]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=facials">Edit Facials</a></td></tr>
</if>
Reply With Quote
  #8  
Old 02-27-2016, 12:45 AM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm a little confused here.
You're wanting links to show based on the user logged in so if I'm logged in and I'm a beautician I see certain links? Right?
Reply With Quote
  #9  
Old 02-27-2016, 11:28 AM
phalanxents phalanxents is offline
 
Join Date: Feb 2016
Location: UK
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, that's correct.

Obviously hairdressers have different price lists to beauticians. I've used the extra profile fields page and managed to get the extra pages working with the relevant profile fields, I just can't get the links to show for that particular usergroup
Reply With Quote
  #10  
Old 02-27-2016, 12:34 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<if condition="is_member_of($bbuserinfo, ##)"> LINK FOR ##</if>

replace ## with usergroup id

--------------- Added [DATE]1456583844[/DATE] at [TIME]1456583844[/TIME] ---------------

more than one usergroup can see the same link would be <if condition="is_member_of($bbuserinfo, ##, 6, #, ##)"> LINK FOR ##</if>
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08683 seconds
  • Memory Usage 2,263KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete