Not Solved [How To?] check custom profile field
#1
Not Solved
hi,
i want to create code into templates to check a custom profile field selection

for example there is a custom profile field with options: red,green,blue

i want to add code into a template to check the option and show a message like this:

if custom profile field selection is red the message is "hi, your's choice is red"
if custom profile field selection is green the message is "hi, your's choice is green"
if custom profile field selection is blue the message is "hi, your's choice is blue"
Reply
#2
Not Solved
Were this message will be displayed?
My Projects - Support My Projects

Don't forget to rate posts!
Reply
#3
Not Solved
showthread template...
Reply
#4
Not Solved
any idea???
Reply
#5
Not Solved
I don't know if it works but in Italy we say "Tentar non nuoce", 'there's no harm in trying idiom' with google translate so you can try.

1. Add new profile field and set this 2 settings:
-Display on profile? No
-Display on postbit? No
2. Go in your template set -> Post Bit Templates -> postbit_author_user
3. At the and add {$custom_profile}
4. Open inc/functions_post.php file
5. search
eval("\$post['user_details'] = \"".$templates->get("postbit_author_user")."\";");
6. add before
$custom_profile = sprintf("hi, your choise is %s", $mybb->user['your custom profile fid (if 3 write fid3)']);
My Projects - Support My Projects

Don't forget to rate posts!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)