News:

Wondering if this will always be free?  See why free is better.

Main Menu

Custom Profile Field Mod

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

Previous topic - Next topic

Kindred

(It's been answered about 20 times...)

this mod stores information in the smf_themes table
Сл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."

ozcantekil

i think you mean smf_settings .  because the other 20 answer say so .  : )

Arantor

No. The entries as to what fields are what should be in smf_settings AFAIK, but the actual values for each user's answers are smf_themes. Slightly different in 2.0 though.

KnowNothing

Hello,
I installed this mod yesterday.

The fields show up on the registration form, but do not show up in the member's profile, even thought that is enabled. Can anyone tell me why?

Thanks,
Mike

Arantor

Does your theme have a custom Profile.template.php file?

KnowNothing

Quote from: Arantor on October 14, 2009, 01:50:40 PM
Does your theme have a custom Profile.template.php file?
I use the default theme, and there is a profile.template.php file that was changed yesterday (I'm sure when I installed the mod).
Mike

Arantor

Hmm.

Did you configure the fields to show up on the profile area? They don't generally IIRC.

Also, what other mods do you have?

KnowNothing

Quote from: Arantor on October 14, 2009, 04:40:13 PM
Hmm.

Did you configure the fields to show up on the profile area? They don't generally IIRC.

Also, what other mods do you have?
Yes, I checked the "show in profile" check box for the fields.

The other mods I have:

Admin Notepad, Topics Filter, Copy Topics, Custom Board Sort, Simple Portal

Thanks

Arantor

Hmm. Any errors in the error log?

KnowNothing

I figured out what it the issue is. Seems like a bug to me, but maybe I don't understand it completely.

In Configuration,
The "Only Allow Admin To Edit Field" check box has to be unchecked.
There has to be a value for the "Text To Display Before Field" field

If either of the above is not true for a custom field, the value for the field entered at registration will not dosplay in the profile.

Thanks,
Mike

gastan

Using v1.1.10 which I installed yesterday.  This is for a non-profit ... no IT pros working here ... just me on a volunteer basis.  We would like to get a forum going but it will not be open to the general public ... members of the non-profit only.

I installed the Custom Profile Field Mod  successfully (used the package manager) and added two fields (name and member id#) to member registration and made them "force input" so I could check eligibility before approving membership (I have registration set to "member approval").  I checked the "only allow admins to edit field" and "only allow admins to view field" thinking that the info would be visible to me in the Profile Information "summary" tab.

I then logged out as administrator and registered with a phony bunch of info.  Everything worked as planned ... I was forced to enter a name and id# ... to complete registration.

Logged back in as administrator and went looking for the extra info but cannot find it anywhere.  It's not in the Profile Info "summary" tab for the member I created.  It's not in the Modify Profile "acct related settings" tab.  The two fields are shown in the Modify Profile "forum profile info" tab but they are blank.  (BTW ... I don't want this info to show on any page except one an admin can see ... users will have no need to relate real names to user names or know anyone elses member ID#) It's not shown in the "members awaiting approval" section, either.  That just shows the username and e-mail address.

I'm using the default theme.  And the only other mod I've installed is View_Only_Boards_1.2a

Any hints appreciated.  I've spent an hour or so going thru 30 or so pages of this 138 page thread and am getting burned out.  I am not a coder and my head is starting to hurt from reading some of this stuff.  Important points are 1. added info needed to verify eligibility for memebership and 2. added info should only be viewable to administrator and of course 3.  where is the added info being entered going?



gastan

I tried what KnowNothing said and went in and unchecked the "Only allow Admin to edit field" in both new fields and now the required info shows up in the Modify Profile > Forum Profile Info tab for the user.  I guess the work around for now is to go in and manually delete that info for each member after I okay registration.  Cumbersome.  I see from searching this thread that version 2 will have this functionality built in.  Will RC2 be stable enough to use live, do you think?

Arantor

Well, this forum runs RC2 as you can tell, as are a number of the Charter members (since they get a preview of it), but RC2 public should be stable enough to do so.

In fact, RC1.2 (which is publicly available) is stable enough. I use it on my sites.

jerdna

my problem is that i dont see custome fields bar in features and options... i have custom theme...and i think my mod settings is not good... my version is 1.1.10
in my attachment is mod settings... and i dont have PersonalMessage.template.php in custom theme what should i do?

Arantor

If you don't have PersonalMessage.template.php in your custom theme, edit PersonalMessage.template.php in Themes/default instead.

If you have the admin options it's already in ModSettings.php IIRC.

jerdna

yea but its not there, look at picture attachmant... somethings wrong:( should i just transfer php's that i dont have in custome? OR?

Arantor

Ah, that's because your theme is missing some changes in some of the language strings. It should be generating errors in your forum error log, presumably because edits were made to Themes/default/Modifications.english.php that weren't made to your theme's Modifications.english.php file.

jerdna

unfortunately i dont have modifications.english.php in custome theme/language... only settings.english.utf8.php..
i see the error... its:
Apply Filter: Only show the errors with the same message
Unable to load the 'CustomProfile.english-utf8' language file.
what am i suposed to do?
P.S. sorry 4 all the trouble.. im still learning:P

Arantor

Copy CustomProfile.english.php to CustomProfile.english-utf8.php.

gastan

#2759
Quote from: Kindred on December 16, 2006, 06:49:04 PM
WOW!!!!   I seem to have found a BIG oversight here...

if you add a custom text field, there is no limit to the number of characters that can be added...

in other words, in the display screen, a person can have 300 lines of text added...

I think you need to add a maxlength stat in the field settings... 
(the current "size" of the field is set to 50, but that should probably be the same size as "maxlength", especially if you make it into a settable variable.)

for the moment, I have change the field size and maxlength (in my set up) to 25...
If anyone else is interested in 'fixing" this:

line 31 in CustomProfile.php

<td><b>' . $modSettings['CP' . $i . '_name'] . ': </b>' , !empty($modSettings['CP' . $i . '_desc']) ? '<div class="smalltext">' . $modSettings['CP' . $i . '_desc'] . '</div>' : '' , '</td><td><input type="text" name="default_options[' . $modSettings['CP' . $i . '_id'] . ']" size="25" maxlength="25" value="', @$context['member']['options'][$modSettings['CP' . $i . '_id']], '" /></td>


Would this edit limit character length for all added fields if you have more than one?  Say you set it at 8 ... would all added fields be limited to 8 characters?

I have two added fields but only want to set a character length limit for the 2nd one.  I found the code mentioned on two lines (lines 30 and 88 in my file).  I changed the one on line 88 thinking it would limit the 2nd field but it had no effect.  Do I need to change both?  If I change both, will it effect all added fields?

BTW, the code in my file doesn't exactly match the one Kindred posted. It doesn't have the 'max length'.  It looks like this:

                              <td><b>' . $modSettings['CP' . $i . '_name'] . ': </b>' , !empty($modSettings['CP' . $i . '_desc']) ? '<div class="smalltext">' . $modSettings['CP' . $i . '_desc'] . '</div>' : '' , '</td><td><input type="text" name="default_options[' . $modSettings['CP' . $i . '_id'] . ']" size="50" value="', @$context['member']['options'][$modSettings['CP' . $i . '_id']], '" /></td>


I guess what I'm asking is how do I set a character size limit for a particular added field.

Thanks.


Advertisement: