Module: Enhanced Custom Profiles
Posted by Joe Curia
Re: Module: Enhanced Custom Profiles October 18, 2010 10:45AM |
Registered: 13 years ago Posts: 24 |
Re: Module: Enhanced Custom Profiles April 05, 2011 05:36AM |
Registered: 13 years ago Posts: 44 |
This is a great module.
Someone else asked about this two years ago, and I don't know if Joe was able to adopt it. Or maybe I just can't figure it out.
I want people to have to fill in their real name when they register, and for that data to be automatically part of their profile, like username and passwordl. Then I would like them to be able to decide if their real name is shown on their profile, just as with emails.
Is this possible? I'm using the emerald template.
Someone else asked about this two years ago, and I don't know if Joe was able to adopt it. Or maybe I just can't figure it out.
I want people to have to fill in their real name when they register, and for that data to be automatically part of their profile, like username and passwordl. Then I would like them to be able to decide if their real name is shown on their profile, just as with emails.
Is this possible? I'm using the emerald template.
Re: Module: Enhanced Custom Profiles April 05, 2011 07:24AM |
Registered: 17 years ago Posts: 533 |
Quote
dsibilant
This is a great module.
Someone else asked about this two years ago, and I don't know if Joe was able to adopt it. Or maybe I just can't figure it out.
I want people to have to fill in their real name when they register, and for that data to be automatically part of their profile, like username and passwordl. Then I would like them to be able to decide if their real name is shown on their profile, just as with emails.
Is this possible? I'm using the emerald template.
Yes it is very possible. I am sure it is possible with this module too, but I don't use it myself.
Instead, I have created a custom template, created custom profile fields using the admin panel, and manually changed the HTML in the register.tpl, profile.tpl, cc_start.tpl, and cc_usersettings.tpl
I am not sure how the module works, but you will want to make sure that those files are effected.
register.tpl = registration
profile.tpl = view a users profile
cc_start.tpl = view your own profile in your Control Center
cc_usersettings.tpl = edit your profile in the Control Center.
Robert Angle
Phorum lover, nothing more.
Ruminations
Re: Module: Enhanced Custom Profiles April 05, 2011 10:21AM |
Registered: 15 years ago Posts: 753 |
Hi, This is untested but it might help you reaching your goal:
Put this into register.tpl:
You add this as a single file under /mods:
Edited 1 time(s). Last edit at 04/05/2011 02:25PM by korsakov.
Put this into register.tpl:
Language: PHP<label for="real_name">{LANG->RealName} *</label><input type="text" name="real_name" id="real_name" size="15" />
You add this as a single file under /mods:
Language: PHP<?php /* phorum module info title: user_management | Real Name Registration category: user_management author: korsakov desc: Including real name within registration process. version: 1.0 hook: before_register|mod_yourMod_before_register hook: after_register|mod_yourMod_after_register */ function mod_yourMod_before_register ($data) { if (empty($_POST[';real_name';])) $data[';error';] = ';You forgot to enter your real name!';; return $data; } function mod_yourMod_after_register ($userdata) { if (isset($_POST[';real_name';])) $real_name = htmlspecialchars(trim($_POST[';real_name';]), ENT_COMPAT, $PHORUM["DATA"]["HCHARSET"]); $userdata = array( "user_id" => $userdata[';user_id';], "real_name" => $real_name ); phorum_api_user_save($userdata); return $userdata; } ?>
Edited 1 time(s). Last edit at 04/05/2011 02:25PM by korsakov.
Re: Module: Enhanced Custom Profiles April 05, 2011 12:50PM |
Admin Registered: 20 years ago Posts: 8,532 |
Please edit your message and add the necessary info like title: and such.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Enhanced Custom Profiles April 06, 2011 04:37AM |
Registered: 13 years ago Posts: 44 |
Re: Module: Enhanced Custom Profiles April 06, 2011 07:23AM |
Registered: 15 years ago Posts: 753 |
Re: Module: Enhanced Custom Profiles April 08, 2011 01:30AM |
Registered: 13 years ago Posts: 44 |
Re: Module: Enhanced Custom Profiles April 21, 2011 11:55PM |
Registered: 15 years ago Posts: 1 |
Re: Module: Enhanced Custom Profiles June 02, 2011 06:07AM |
Registered: 13 years ago Posts: 16 |
Sorry, only registered users may post in this forum.