vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Show text in postbit if user profile field is enabled? (https://vborg.vbsupport.ru/showthread.php?t=120360)

Guest20210415 07-05-2006 07:44 AM

Show text in postbit if user profile field is enabled?
 
Hi,

I have a problem. I want to show a small text in the postbit if the user of this post has enabled a radio button based user profile field.

For example:

I have an additional profile field: Show my secondary usergroup: yes/no

Then the postbit should show a small text, let's say "Premium Member", below the username.

How can I show this text based on the settings every user made in his profile.

Thanks in advance for any help.

rgds,
Roland

peterska2 07-05-2006 09:47 AM

Pop this in your postbit where you want it to show

Code:

<if condition="$post[field[high]X[/high]]=='yes'">stuff for yes<else />stuff for no</if>
You need to replace the [high]X[/high] with the field number for the profile field you are using. You can find this by going to the profile field manager page in the ACP and looking for where it says something like field5 for the field that you have created. Remember the number to replace the X with.

if you do not wish anything to show up if the answer is no, then use
Code:

<if condition="$post[field[high]X[/high]]=='yes'">stuff for yes</if>
NOTE: The yes must be identical to the one in the profile field otherwise this will not work.

Guest20210415 07-05-2006 09:55 AM

Thank you. It works. Great help!

Can you help me one more time?
For this feature I need a user profile field which only users can modify who are in a specific usergroup. This field should not be visible during registration and viewing the profile of other users. Just a radio button based user profile field visible at the options page.

Thanks in advance.

peterska2 07-05-2006 09:59 AM

That's not within the scope of standard features, so it will require some modifications to make it possible.


All times are GMT. The time now is 11:18 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.01547 seconds
  • Memory Usage 1,709KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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