Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 10:16 pm EST
Geeklog Forums
Additional User Profile Fields
Status: offline
JRGilliam
Forum User
Newbie
Registered: 11/11/06
Posts: 8
I've scoured the GL site, including the forums, trying to find information about how to add additional fields to the user profile, all to no avail.
I thought the Custom Registration process might do the trick, but I don't want new users to fill in extra fields just to register -- user name and Email is enough to ask.
However, I do want them, once they've joined and received their PW, to have extra fields in the profile for things like company name, city, state.
Is there a plugin for this? If so, where would I find it? Seems I saw a post from Dirk saying one existed.
If there isn't a plugin, how proficient in PHP must I be to make this happen (I'm a true novice)? What files, besides the templates, would need to be edited?
And if all else fails, hopefully Blaine will see this message: how can I hire you to help me with this, as I think from what I've read thus far, you might be just the person who could do it?
Thanks!
_____________
JR Gilliam
I thought the Custom Registration process might do the trick, but I don't want new users to fill in extra fields just to register -- user name and Email is enough to ask.
However, I do want them, once they've joined and received their PW, to have extra fields in the profile for things like company name, city, state.
Is there a plugin for this? If so, where would I find it? Seems I saw a post from Dirk saying one existed.
If there isn't a plugin, how proficient in PHP must I be to make this happen (I'm a true novice)? What files, besides the templates, would need to be edited?
And if all else fails, hopefully Blaine will see this message: how can I hire you to help me with this, as I think from what I've read thus far, you might be just the person who could do it?
Thanks!
_____________
JR Gilliam
12
18
Quote
Status: offline
jmucchiello
Forum User
Full Member
Registered: 08/29/05
Posts: 985
Custom registration does both. Read lib-custom.php more closely. These functions handle fields displayed to the user:
function CUSTOM_userDisplay($uid)
function CUSTOM_userEdit($uid)
function CUSTOM_userSave($uid)
function CUSTOM_userDisplay($uid)
function CUSTOM_userEdit($uid)
function CUSTOM_userSave($uid)
13
15
Quote
Status: offline
JRGilliam
Forum User
Newbie
Registered: 11/11/06
Posts: 8
Thank you both for the feedback -- I truly appreciate it!
But did I mention that I was a PHP novice?
I have no idea how to use the feedback you've given me, but I'll at least read through both the lib-custom.php and lib-plugins.php files you mentioned, and pull out my PHP manual, to see if anything makes sense to me.
It occurred to me though, that perhaps I COULD use the custom registration, but only add fields to the profile form, not to the registration process itself. Is that possible?
At any rate, the probability is high that I'll pose another question soon, though! Thanks again!
____________
JR Gilliam
But did I mention that I was a PHP novice?
I have no idea how to use the feedback you've given me, but I'll at least read through both the lib-custom.php and lib-plugins.php files you mentioned, and pull out my PHP manual, to see if anything makes sense to me.
It occurred to me though, that perhaps I COULD use the custom registration, but only add fields to the profile form, not to the registration process itself. Is that possible?
At any rate, the probability is high that I'll pose another question soon, though! Thanks again!
____________
JR Gilliam
14
16
Quote
Status: offline
JRGilliam
Forum User
Newbie
Registered: 11/11/06
Posts: 8
OK -- I've analyzed the files and functions you suggested, and here's where things stand now...
I implemented Blaine's custom registration example SUCCESSFULLY with what I believe is only one glitch, but I don't know how to fix it.
The custom user profile fields appear everywhere they're supposed to -- and only the ones I want show up upon new user registration -- however, users already in the db are not able to update their profile by adding info to the new fields.
The admin, however, CAN edit the records and add data to at least one of the new fields -- fullname-- which is the only custom field displayed on when the admin edits a user's profile.
However, the minute an existing user (including the admin) attempts to update their own record, upon submit, no data gets posted to the db, nothing is displayed in the custom fields. In fact, the fullname field actually empties upon submit.
Any suggestions about where I should look for the culprit? It seems like it's the function custom_useredit when called from usersettings.php that's the problem, but I'm not sure how to resolve.
Thanks for the help thus far -- a little more will get me where I need to go! I anxiously await...
_____________________
JR Gilliam
I implemented Blaine's custom registration example SUCCESSFULLY with what I believe is only one glitch, but I don't know how to fix it.
The custom user profile fields appear everywhere they're supposed to -- and only the ones I want show up upon new user registration -- however, users already in the db are not able to update their profile by adding info to the new fields.
The admin, however, CAN edit the records and add data to at least one of the new fields -- fullname-- which is the only custom field displayed on when the admin edits a user's profile.
However, the minute an existing user (including the admin) attempts to update their own record, upon submit, no data gets posted to the db, nothing is displayed in the custom fields. In fact, the fullname field actually empties upon submit.
Any suggestions about where I should look for the culprit? It seems like it's the function custom_useredit when called from usersettings.php that's the problem, but I'm not sure how to resolve.
Thanks for the help thus far -- a little more will get me where I need to go! I anxiously await...
_____________________
JR Gilliam
17
20
Quote
Status: offline
JRGilliam
Forum User
Newbie
Registered: 11/11/06
Posts: 8
I'm still hopeful that I'll get some additional help/feedback regarding my problem with the custom registration example provided by Blaine.
Can someone at least tell me this: in addition to following Blaine's instructions, do I need to also edit the users.php and the usersettings.php files to get this example to work?
Again, I thought I had the code implemented correctly, but when users update their profiles, no data gets written to the database.
Ever hopeful someone will offer some meaningful assistance for this PHP novice. Thanks again.
__________________
JR Gilliam
Can someone at least tell me this: in addition to following Blaine's instructions, do I need to also edit the users.php and the usersettings.php files to get this example to work?
Again, I thought I had the code implemented correctly, but when users update their profiles, no data gets written to the database.
Ever hopeful someone will offer some meaningful assistance for this PHP novice. Thanks again.
__________________
JR Gilliam
13
13
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The custom registration, as the name suggests, only provides hooks so that you can write your own registration forms. It has nothing to do with the display of the user profile. For that, you would need the plugin API functions I mentioned above.
bye, Dirk
bye, Dirk
15
29
Quote
All times are EST. The time is now 10:16 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content