News:

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

Main Menu

Custom Profile Field Mod

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

Previous topic - Next topic

brenda_babylon

This is a very high level question!
I can't seem to find where the data from my fields are going. I don't see a smf_custom_fields or any new entries under smf_members.
Where is this data stored for members?

metallica48423

Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

brenda_babylon


brenda_babylon

Hi Again!
Now I can see where and how the data is being stored there's something I'd like to raise.
Say, hypothetically, I wanted to create 5 attributes for members to fill in. At present this will make 5 new entries under smf_themes for each member. Now multiply the membership by say... I donno 100. This would be 500 extra rows in smf_themes?

Would it be possbile to create a new column under smf_members, one for each new attribute instead? That way, the number of extra records are reduced to... well zero as they are now entries under the membership data?

I guess what I'm saying here is that I'm not sure why we're putting this info in one table, possible growing at a fast rate when we could opt to add/delete custom profile data as columns in smf_members. Does anyone know why it was made this way?

Kindred

that would change the way the mod works.   You COULD do it...  but you'd have to change the very infrastructure of the mod's db calls, etc.
Слaва
Украинi

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."

gibsongk55

Hi,

I added a field and it works fine but on registration the field shows up two times.  How do i get rid of the extra duplicate?

Thanks,

Gibs

Rumbaar

Is it for all fields or just that one?  If it's all field being duplicated, then I would assume the mods code has been duplicated in the Register.template.php.  Take a look at your themes file and check to make sure the appropriate code isn't in twice.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

gibsongk55

#2467
Quote from: Rumbaar on March 23, 2009, 10:48:38 PM
Is it for all fields or just that one?  If it's all field being duplicated, then I would assume the mods code has been duplicated in the Register.template.php.  Take a look at your themes file and check to make sure the appropriate code isn't in twice.

Thanks for the reply.  Ok i just checked and there is no duplicated code there.  Though there was a duplicate code in /Sources/Register.php.  I removed and went to register a user and the duplicate field is still there.  I am only using one field which is all i need.

Thanks,

Gibs

Rumbaar

Ah, yes sorry the source files would be the place to look.

There might be additional duplicated code, you might have to check all file affected by the mod for duplicate code.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

gibsongk55

HELP

I found duplicate code in the themes/default/Register.template.php

I took it out and now the forum will not work.  I reverted back to the original file and it still will not work.

I changed this:

global $sourcedir;
require_once($sourcedir . '/CustomProfile.php');
RegistrationFields();
global $sourcedir;
require_once($sourcedir . '/CustomProfile.php');
RegistrationFields();
echo '
</table>
</td>
</tr>
</table>';


to this:

global $sourcedir;
require_once($sourcedir . '/CustomProfile.php');
RegistrationFields();
echo '
</table>
</td>
</tr>
</table>';


And both ways the board will not come up.  I now receive this error:

Template เกิà¸"à¸,้อผิà¸"พลาà¸"!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

Rumbaar

You should just remove:
global $sourcedir;
   require_once($sourcedir . '/CustomProfile.php');
   RegistrationFields();


But make sure you use a decent text editor, what are you using to edit your files?  and how?  FTP to your computer use Notepad++, edit, save, upload and you should be set.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

gibsongk55

That is exactly what i did.  I used MS frontpage to edit.  Never had a problem with it.  Works the same as dreamweaver.

Now what can i do?  I don't want to start all over because of this one file.

Thanks,

Gibs

Rumbaar

Well do not use any of those to edit your php text files, I've found that can alter encoding or add hidden code that can corrupt text based php files.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

gibsongk55

okay.. so now what?  Delete the forum and start over?

Rumbaar

No, if it's just that file and you don't have a backup.  You can get it from the Large Upgrade package.  Then perform any mod specific changes to it and upload it to your forum.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

rollingrock


happyfeet

I have this mod installed and everything is working great!

I would like to take the information captured from these custom profile fields and display them on my memberlist page. I have worked out the details to modify the memberlist.php and my column headings are displaying correctly.

Can anyone tell me what code is necessary to display a custom profile field on my memberlist.template.php? For testing, I am using the default naming of the mod, so "CP1" is the name of the first custom profile, etc. I have tried to use something like:

<td class="windowbg" align="left">', $member['options']['cp1'], '</td>

and different variations, but keep striking out.

Any help would be greatly appreciated. Of course I would like to get it right so that my forum error log does not fill up with index event errors too :)

SgtMic

If you were using 2.0 RC1, you could use this mod.
Mod

But there might be something in there that will help.
There is nothing more deadly than a US Marine and his rifle.
A close second is a US Marine and his K-BAR.
2/5 Fox Co.  (BlackHearts)
FAST Co. 5th Plt. (FIDO)

happyfeet

Well, I solved my issue of displaying the custom profile field on the memberlist page. I am still receiving undefined index event errors in my error log. Any suggestions what to check? Is this stemming from something missing in my index.english.php file? What prompts undefined index event errors in the forum error log? 

Example:

8: Undefined index: CP1
File: /home/content/html/Themes/default/Memberlist.template.php

locutusweb

Quote from: Kindred on March 15, 2009, 08:17:44 PM
there will not be another release.   This capability is built in standard to SMF 2.0

Wow, cool!

Will the information of custom profile mod converted to the integrated function SMF 2.0?

Advertisement: