Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Rename a Profile PropertyRename a Profile Property
Previous
 
Next
New Post
1/16/2007 11:53 AM
 
I need to rename some profile properties.

I could just create new profile properties and delete the old properties but I don't want to lose info that users have added into them.

I can't seem to do this in the admin settings under user accounts. I could possibly go straight for the DB but I believe that would probably break something.
 
New Post
1/16/2007 2:45 PM
 

Have you considered just changing the text title of the field in the resource file, leaving the actual property name alone?  An example using the Profile Property "FirstName" and changing it to "NickName".  NOTE: My example is using DNN 4.4.0.  The actual steps may be different if you are using an earlier version.

Login as admin or host and go to the Admin menu and select "Languages" on the first screen click the "Language Editor" link in the bottom left of the module window. This takes you to the Language Editor screen.  In the "Tree View" on the left navigate to LocalResources / Admin / Users / AppLocalResources.  Next find the file named "Profile.ascx" and click on it.  This will load all the entries in the Resource file.  Scroll down the page and find the entry labeled "Resource Name: ProfileProperties_FirstName.Text" (the entries are sorted alphabetically).  In the text box labeled "Localized" value enter "Nick Name:".  Scroll to the very bottom of the page and click update.

This will create a new resource file named "Profile.ascx.Portal-X.resx" where X is the portal id.  This new resource file is specific to the portal it was created in.

Word of caution... changing the meaning of fields can be dangerous however deleting a core field can be even more dangerous.  If you delete a core field that is used elsewhere you can have all kinds of problems.

I hope this helpful.  Regards,

Chuck R.

 
New Post
1/16/2007 2:56 PM
 
Thanks, Ok I went through and that will for sure work, I would just need to change the way I'm creating the name of a column I'm displaying.


How about extra profile properties that have been added, I'm not finding any listed?
 
New Post
1/17/2007 3:29 PM
 

As far as I know all Profile Property fields (core as well as any you add) are defined in a table called "ProfilePropertyDefinition".  This table contains the specifics of the Profile Property fields (like the name, category, etc.).  The primary key to this table is the field "PropertyDefinitionID".  The PropertyDefinitionID is used to link to the "UserProfile" table which contains the values of the fields for the users.

I hope this helps.  Post back if you need more info.

Chuck R.

 
New Post
1/18/2007 8:19 PM
 

I just re-read your follow-up post and realized I answered the wrong question.

You are correct.  The Resource Files only contain the standard profile entries.  You have two options.  1) Add your new fields to the standard resource file or 2) create a "portal specific" resource file containing only your added fields. 

The main difference is that if you add your new entries to the standard resource file they will be visible to administrators of any portal within your DNN install.  If you create a "portal specific" resource file and put your custom entries in there then they will be visible only to the administrator of the specific portal.  The way this is done is the language editor first loads the standard resource file.  Then it loads any "portal specific" resource file if one exists.  The results displayed in the language editor is in effect the "merged" files.

Regardless of which way you choose adding new entries required manually adding them to the file using a text editor.  This will require file-level-access to the web server.  I prefer option #2 (portal specific respurce files). Read on and I will detail the steps.

"Portal specific" resource files are named the same as the base resource file with "Portal-x" injected into the name (the x is the numeric portalID that the resource file is being used on).  Since we are talking about Profile Properties, the standard resource file name is "Profile.ascx.resx".  You will find this file in the Admin\Users\App_LocalResources folder under your DNN root.

Let's say that the portal you are creating the custom entries for is portalID 3.  The "portal specific" resource file will need to create will be named "Profile.ascx.Portal-3.resx".

First, I make a copy of Profile.ascx.resx and rename it  "Profile.ascx.Portal-3.resx".

Next, I open the file using my favorite text editor (PSPad, it's free and available at http://www.pspad.com) and delete all the existing entries.  I may leave one or two if I can use them for copy and past to create my new ones.  Take special note to leave the existing header intact -- there will be a number of xsd... and resheader... entries at the top.  Also, the very last line must be </root>.  You will be deleting all the <data> </data> blocks and replacing them with your own.

NOTE: Before deleting the existing entries note the use of them.  In many resource files you will see three or four entries for each data element.  ElementName.Text, ElementName.Help, ElementName.Error and ElementName.Required.  The suffixes used have special uses and the entire entry IS CASE SENSITIVE!

.Text is the value used for the text of the label, .Help is the value used for the help display, .Error is the message displayed is a field fails validation (if you have a validation rule defined) and .Required is the message displayed if a user does not make an entry in a required field.

Also note that in the case of Profile Properties all entries begin with "ProfileProperties_" and are followd by the actual field name of the profile property (i.e. "ProfileProperties_LastName.Text"

With all that said, create your entries in such as below...

    <data name="ProfileProperties_MyProfileProperty1.Text">
        <value>My Profile Property 1:</value>
    </data>
    <data name="ProfileProperties_MyProfileProperty1.Help">
        <value>Please enter the value for My Profile Property 1</value>
    </data>
    <data name="ProfileProperties_AnotherProfileProperty.Text">
        <value>Another Profile Property:</value>
    </data>
    <data name="ProfileProperties_AnotherProfileProperty.Help">
        <value>Please enter the value for Another Profile Property</value>
    </data>
    <data name="ProfileProperties_AnotherProfileProperty.Required">
        <value>Another Profile Property is a required field</value>
    </data>

Sorry for being so long winded!  I hope this helps.

Regards,
Chuck R.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Rename a Profile PropertyRename a Profile Property


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out