PDA

View Full Version : New User - State Required


deanlovvorn
03-21-2010, 07:26 PM
I'm trying to make it a requirement when registering that the new member has to let me know the state that they live in.

Why? Because on my forum, each state has a different requirement. If I can see their state on their info, then I can answer better and more accurate.

If there is no easy way of doing this, I can always just ask them to put it on themselves. I just thought if there was a way ... this would be better.

Videx
03-22-2010, 01:23 AM
You can add fields and make them mandatory. AdminCP>User Profile Fields>Add new...

Charlie98902
03-22-2010, 02:22 PM
If you want it in a postbit you can do this as well.

This isn't to hard and this is what I did:

1. Create a new plugin via the plugin manager.

2. product - vbulletin

3. Hook - postbit_display_start

4. title - extra profile fields

5. execution order - mine is set at 5.

6. plugin php code:


if($post[fieldx]) $html .= '<dt>Name</dt> <dd>'.$post[fieldX].'</dd>';
if($post[fieldx]) $html .= '<dt>Name</dt> <dd>'.$post[fieldX].'</dd>';
$html .='<br /><br />';

$template_hook['postbit_userinfo_right_after_posts'] .= $html;



Edit all the red and as you can see you can add more to it copying and pasting the one line of code to have 3,4,5,6, etc.... You do need to edit the red so you will need to make the profile fields first then add this plugin.