• Welcome to Simple Machines Community Forum. Please login or sign up.
January 20, 2022, 12:00:57 AM


Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Custom Profile Field Mod

Started by winrules, March 30, 2006, 02:21:25 PM

Previous topic - Next topic


Quote from: winrules on January 20, 2007, 11:09:35 PM
I'll try to answer the unanswered questions tomorrow.

Please understand that I have not lost intrest in this project. I am currently developing a new version of the mod (4.0) which is a complete rewrite. I am also planning on starting a support site for my mods (though this might not happen so no guarantees). I know the current verison of this mod is quite buggy. That is why I am rewriting the entire mod and how it stores its data. I won't be making any more bug patches or adding new features (with the exception of security patches if issues arise) to the 3.x line.

Good stuff!

May I suggest that you have a look at a similar MOD for phpBB at:
I suggest that if you were to give it a try, install it using Easymod.

It's called the Xdata_CPF (Custom Profile Field) and really works well, you can even rearrange and modify the default fields.

Sorry for mentioning the "competition" but at this moment, I'm trying out SMF, phpBB2 and Joomla! with Community Builder (with other modules) to know which one suits my purpose.

Raygene (AKA Gemigene)
"Religion is metaphysical statism. I will be ruled by no man on earth, nor by any god in heaven"


I'd second what gemigene said. Being able to rearrange and modify the default fields would be extremely useful.


January 21, 2007, 03:03:03 PM #822 Last Edit: January 21, 2007, 04:00:43 PM by Torch
Just one question...where in the database are values of custom fields stored (for each individual user)? :/


Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


I have never managed to get package manage to work, so I installed this mod:


manually and all seems ok.

However, one question I have about the installation.  In the file tablanguageissue in the unzipped files, the first bit of code is the following:

<file name="$sourcedir/ModSettings.php">
         <search position="replace"><![CDATA[
            'title' => 'Custom Profile Fields',
            'title' => $txt['cp_cpfields'],

I searched the ModSettings.php file in the source directory, but found no such entry to replace.  Have I done something wrong?  Will it work ok without this addition?

Also, by default it places custom fields after the "online status".

Is it possible to edit the order of custom fields, so that they appear before the online status?


you can eddit the other fields, you just have to hack the forum up a bit.. they have details about it.. for instance, i used one of the suggestion tips on here, and made it so all my aim/yim/whatever fields, as well as some others, dont show up unless there is data in them.. (much smaller profiles, and much more room for my other information that i would prefer far more to have on the forum)

do NOT milk the bull!


Has the Admin register issue been integrated so that the admin can use the custom fields when registering? 

Is there a way to modify the ManageRegistration.php file manually to accommodate?



Quote from: samames on January 20, 2007, 01:35:56 PM
I think this may be related to calimarinas post but am not sure, i have this mod now uninstalled and i cannot see my posts, instead i get this error:

Fatal error: template_main() [function.require]: Failed opening required '/x/x/x/forums/Sources/CustomProfile.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in
/x/x/x/forums/Sources/Load.php(1744) : eval()'d code on line 372

thanx in advanxce

ps: smf 1.1.1
Please help me I really need to get my forum back up and in action
Firefox 3 user. Mac user. Pc user.


I am trying to install this mod on v 1.108 (mod v 3.16) and got following errors.

Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/ModSettings.php Failure
2. Execute Modification ./Themes/default/Profile.template.php Failure
3. Execute Modification ./Themes/default/Display.template.php Success
4. Execute Modification ./Themes/default/PersonalMessage.template.php File not found
5. Execute Modification ./Themes/default/Register.template.php Failure
6. Execute Modification ./Sources/Register.php Failure
7. Extract File ./Sources/CustomProfile.php 
8. Extract File ./Themes/default/languages/CustomProfile.english.php 

Any suggestions?
Marines M/C

Davey D.

Worked with two issues.

1st -  My 2 custom fields appear well below the CAPTCHA, and even though I have these fields triggered to alert the registrant that they missed filling them in, I would really like to replace the single "username" field with these new "First Name" and "Last Name" fields, and as such, placing them right at the beginning of the registration.

Can this mod replace the single "username" field that is now on the SMF registration page, and if so, would someone be so kind as to explain how?

2nd - The First name and Last name are not appearing under the Username within posts even though I have selected this when I created the two fields. Again, I would really prefer these two fields to just replace the username field, thus making this issue moot.


Username (aka display name) is a critical field in the user's record. It is required in various palces throughout the SMF code and can not be replaced.

However, setting the template for messages to display first/last rather than username is easy. Just modify display.template.php to display the fields you want rather than username.
(of course, you would have to modify messageindex.template.php and boardindex.template.php as well..)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


i think what hes suggesting is an interesting idea.. not necisarily getting rid of username.. instead.. splitting it in to two parts.. (both with a check value to make sure they are filled) so you have to put the first part of the username (the first name) then the second part of the username (the last name) with a space added between on entering, and they are conjoined.

do NOT milk the bull!

Davey D.

January 23, 2007, 11:09:45 AM #832 Last Edit: January 23, 2007, 11:21:11 AM by davidkirk
I'm willing to get dirty so if someone could give me some direction I would appreciate it.

This Web site is for professionals collaborating from all over the country, and I've already realized most of them never used a message board and don't understand (funny) "username" only. A small problem that will have to be fixed later is some have entered, "john smith" or "John Smith" or just "John" or "J. Smith."

This mod works because it will force them to realize they must enter First and Last name and a company or organization name. Unfortunately, and I realize the "username" is a required input, some have complained about the redundant field, and why is the "First" and "Last" name fields at the bottom of the form (under the CAPTCHA).

The screenshot shows how it looks right now.

Any help with this please?


Okay. Can I rename "username" to "First and Last Name" and change the description under this to read, "Please enter your full name, ie., Jane Smith?"

The only issue then would be how to get the "Company/Organization" field moved up to under the name field.


at this point, I think you are going beyond what this mod was intended to do and you are looking for a specific mod that will do something different....

You are looking for a mod that is a HUGE change.
I did a little looking, and if your users do not understand usernames, then you are going to have some major problems... 
(but seriously, what person in today's computer world does not understand the concept of username?)

For example:
PMs are sent to people by using username...
messages are stored using username...
users online are displayed using username...

the list goes on.

the EASIEST thing to do is to modify the use of "username" in your language files to be "first and last name" or something similar...
that way your users will enter their first and last name as their username...

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Davey D.

I understand.

I made some changes (screenshot), however I would like to know, is it possible to at least move the last two fields, "Company" and "Position" under the name field?


January 23, 2007, 12:23:50 PM #835 Last Edit: January 24, 2007, 05:34:49 AM by samames
this mod is not working i reinstalled it and then went into features and settings and got this error:
Fatal error: Cannot redeclare modifyprofilesettings() (previously declared in /x/x/x/forums/Sources/ModSettings.php:344) in /x/x/x/forums/Sources/ModSettings.php on line 349
Firefox 3 user. Mac user. Pc user.


looks like you attempted to install the mod twice.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Chriss Cohn

I Hope that in the new 4.0 Version, it it possible to show the custom fields under the Avatar and over the images, also with a little formatting.

Regards Christian


I'm sure I didn't try to install it twice. musta been some truble wiv d theme
Firefox 3 user. Mac user. Pc user.


Look at the files. If the code has been duplicated you installed it twice. It's happened to me.