Firefox PHP

Module: Enhanced Custom Profiles

Posted by Joe Curia 
Re: Module: Enhanced Custom Profiles
October 18, 2010 10:45AM
hey,
it seems the update of the birthday module was the key , everything is now working great , thanks alot guys ,
just now have to fix the birthday module , showing in all the edit menus in the control panel :D any tips :D

Thanks again guys :D so much!
Re: Module: Enhanced Custom Profiles
April 05, 2011 05:36AM
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.
Re: Module: Enhanced Custom Profiles
April 05, 2011 07:24AM
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
Hi, This is untested but it might help you reaching your goal:

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
Please edit your message and add the necessary info like title: and such.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Enhanced Custom Profiles
April 06, 2011 04:37AM
Thank you. What should be the filename?
Re: Module: Enhanced Custom Profiles
April 06, 2011 07:23AM
As long as you place this script under /mods you can name it as you wish. The "title" for the module will be displayed on the "Modules" page of the admin interface.
Re: Module: Enhanced Custom Profiles
April 08, 2011 01:30AM
Thank you, korsakov. Your code worked great.
Re: Module: Enhanced Custom Profiles
April 21, 2011 11:55PM
Any way to add custom profile fields that can only be edited by admin?
Re: Module: Enhanced Custom Profiles
June 02, 2011 06:07AM
a great tool, not just great, i think its greater than any other module i'm using.. but one problem when i activate this module User Tagging (version 1.0.7) module does not work.. whats the problem? pls help
Sorry, only registered users may post in this forum.

Click here to login