News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Custom fields in the profile, where are they saved?

Started by fractalbit, August 07, 2006, 10:53:00 AM

Previous topic - Next topic

fractalbit

Hello, i 've read this : http://www.unknownbrackets.com/tutorials/custom-profile

it' s very usefull but i would like to know: where in the database are the fields saved?

I check the updateMemberData function but this only changes the members table that does not have those fields.

So what function updates those data and in what table in the database? Please reply cause it's driving me nuts!  :D

winrules

They are stored in the themes table. The fields can be loaded with loadThemeOptions($ID_MEMBER) in Profile.php.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


fractalbit

Quote from: winrules on August 07, 2006, 11:40:53 AM
They are stored in the themes table. The fields can be loaded with loadThemeOptions($ID_MEMBER) in Profile.php.

Thank you very much  :)

fractalbit

One more question. I have some custom fields located in the members table (from yabbse). I figured out how to show the choices i want in a section of the profile and also how to have previously selected choices checked but now i cannot figure out how to save them.

It seems that the key is the $profile_vars variable in the function ModifyProfile2 and then the updateMemberData($memID, $profile_vars); which is pretty straight forward as to what it does. But $profile_vars is the new mystery for me. Where exactly is this array populated? I see ...

// Start with no updates and no errors.
$profile_vars = array();
// My_comment: So we have an empty array, ok so far
// ... then ...
// Change the IP address in the database.
if ($context['user']['is_owner'])
$profile_vars['memberIP'] = "'$user_info[ip]'";
// My_comment: ...OK ...
saveProfileChanges($profile_vars, $post_errors, $memID);
// My_comment: So we are saving what? Only the memberIP? Where are the rest of the variables that should be saved?


I am confused or i am maybe completely wrong. Please help ...

Advertisement: