PDA

View Full Version : registration required and display


juan71287
05-19-2015, 12:27 PM
Hi all. I have not been here in I would say YEARS. I been doing other things and have not done much with vB. I recently came back for a small work project and need a bit of help. I am creating an online FORUM for my job and I am getting the employees to register and I need a few things, see if someone here can help me.

1. Registration requirements/POSTBIT:
- I am looking to add fields in the registration the are REQUIRED. Then those field I want them to be displayed on the POSTBIT so that in every post they do you see the required fields.

2. User display name and login different:
- Since there are so many employees, I would like their login to be whatever they want but the board display name be their ID. So many John Smith out there, they all cant show up as John smith. So I want to be able to register as "crazyman22" but when I post on forum the user show "JohnS21"

- The display of the Username I would like to have a prefix, like [FH]JohnS21". Would I be able to do that in the user group Username HTML Markup to add the "[FH]" to everyone under that user group?

I know I may be asking a lot but thanks if you can help.

kh99
05-19-2015, 06:48 PM
1) In admincp, User Profile Fields > Add New User Profile Field, and set 'Field Required' to what you want (probably 'Yes, at registration and profile updating'). Also I think if you want to display it on the postbit it can't be 'private' (but if you're displaying it than I guess you wouldn't want that anyway). Then in postbit you should be able to use {vb:var post.fieldX} where X is the profile field id. But I didn't try this before posting, so I might be remembering wrong. Sometimes I think that's going to work and it turns out the data isn't there unless you explicitly do a query for it.

The second one's more difficult. Maybe the easiest way would be to have a second field as the login name (Maybe a profile field or maybe you'd have to add a custom field), then modify the login code to use that. I'm thinking that may be easier than making a special display name because I think the login name is only checked in one place but the username is displayed in many places.

But anyway I guess that doesn't help much in knowing how to do all that. I know people have made a relatively easy change to use the email address in place of the username to log in, so probably the harder part would be to add the custom login name field.