Adding Custom User Profile Fields in Joomla 2.5 - Step 1/3 - Copy the Plugin
Joomla 2.5 has reached its end of life as for 12/31/2014. Please be advised this may be a security risk to your website. You can view more information about the end of life here.
The default Joomla 2.5 user profile plugin allows your site users to input more information about themselves than what is by default allowed. You can find more information here on the fields included by default within the Joomla 2.5 user plugin.
There are many users that would like to add more fields to the plugin to make it work better for them. For example, if you're running a website about baseball, you may want to allow people to input their favorite baseball team or what position they play.
To add new fields to the user profile plugin, you will need to edit the plugin itself. This is not always an easy task, so be sure to find a solid tutorial, such as this one, that walks you through all of the needed steps. In the next few tutorials, we're going to show you how to create a custom user profile plugin so you can add additional custom profile fields.
In this first tutorial, we're going to make a copy of the current user profile plugin. We're not going to edit the current profile plugin because we may lose any changes we make if Joomla updates the files.
Steps to create a copy of the current user profile plugin in Joomla 2.5
- Create a folder on your desktop named profile10.
- Connect to your Joomla server via FTP.
- Copy all files in the plugins/user/profile folder into the profile10 plugin folder on your desktop.
- Copy the following files from /administrator/language/en-GB to the profile10 folder on your desktop.
- In the profile10 folder, Rename the following files:
en-GB.plg_user_profile.ini to en-GB.plg_user_profile10.ini
en-GB.plg_user_profile.sys.ini to en-GB.plg_user_profile10.sys.ini
- The following steps will require that we change several references of "profile" to "profile10", the name of our new user profile plugin. Find the following lines in the following files, and make the necessary changes.
Rename profile.xml to profile10.xml in the code of the file.
LINE 3: <name>plg_user_profile10</name> LINE 14: <filename plugin="profile10">profile10.php</filename> LINE 19: <language tag="en-GB">en-GB.plg_user_profile10.ini</language> LINE 20: <language tag="en-GB">en-GB.plg_user_profile10.sys.ini</language>
- Rename profile.php to profile10.php.
LINE 18: class plgUserProfile10 extends JPlugin
- Zip the profile10 folder on your desktop to profile10.zip.
- Check the User - Profile Plugin. If it is enabled, disable the standard User - Profile plugin
- Just like any other plugin, install the profile10.zip plugin.
Our next step is to update the user facing user profile form so that users can type in a value for the new field that you will be adding.
‹Section 4: How to create a User Profile menu item in Joomla 2.5
›Section 6: Adding Custom User Profile Fields in Joomla 2.5 - Step 2/3 - The Front End Form
Joomla Community Google+ Hangout #3
June 3rd, 2014
Thank you @RustyJoomla for letting me speak on the Joomla Community Google+ Hangout!
Support Center Login
Social Media Login
Joomla 2.5 User Profile Plugin
2013-05-09 7:13 pm
It is telling me the folder plugins/user/profile is already in use, deleting it just makes a new error saying the plugin profile10 already exists
2013-05-09 7:26 pm
Sorry you are having problems with these instructions. Are attempting to make changes with the folder on your desktop? Make sure that after you moved all of the files, that you disconnect the FTP site first, and then make changes to folder - you may need to close down the FTP application. Also, be sure that nothing else (application-wise) has those folders or files open. Also, I noted that yo state that plugins/user/profile is already in use. The instructions ask you rename the file to profile10.php. Also, try renaming it something else - like profile11. Try this first, please and then let us know if you continue to have problems.
If you have any further questions, please contact technical support available 24 hours a day / 7 days a week.
Community Support Team
2013-10-24 5:41 am
FYI, I had the same problem as daxl70, you need to make sure that on step 6 line 14 you rename the plugin to the name of your new version i.e. plugin="plugin10" and not just rename profile.php to profile10.php
2013-11-26 6:12 pm
<div style="background-color: #FFF; padding-left: 10px;">Hello lianna,
This user profile plugin should be compatible with <strong>Joomla 3.0</strong> as <a href="http://docs.joomla.org/Will_my_Joomla!_2.5_extensions_work_with_Joomla!_3.x%3F" target="_blank">native Joomla 2.5 extensions should work with Joomla 3.0</a>.
If you're having any issues at all getting it working, please let us know!
2014-01-14 10:29 pm
I have followed all steps in this tutorial, and was:
1. able to put some custom registration fields in place.
2. able to set the fields otions (required / optional / etc) in Admin backend
So far so good........
3. I have also enabled the field TOS ( Terms of Services ).... now her is my problem...
The field TOS is being displayed as a TEXT input field. (????????)
I would expect it to show a checkbox instead.... does anyone have a clue as to what is going wrong here?
Thanks for your help.
cheers . . . . . .
Ps. sorry for the double post.. Could not find where to edit the first post.
I forgot to mention my platform:
1) Developiin on WAMP
2) Using Joomla 3.2.1
3) With Artisteer generated template
2014-01-15 10:59 am
You would need to define a checkbox a bit differently than you would a form field. The following Joomla documentation should help you out with this:
<a href="http://docs.joomla.org/Checkbox_form_field_type">Checkbox form field type</a>
2014-01-15 3:52 pm
QUOTE: " You would need to define a checkbox a bit differently than you would a form field. The following Joomla documentation should help you out with this: Checkbox form field type"
Thanks for your reply JeffMA....
Could you explain me the following?....
1) When I use the standard TOS that is present in the standard Joomla 3.2.1. user profile, it is displayed as :
two radiobuttons with label including a "terms of Service hyperlink that leads to the terms of service article. That works for me except for the fact that I need extra custom fields.
2) Why is it that the radio buttons an hyperlink of the standard TOS are lost / changed when duplicating the plugin to be able to provide extra fields ? How can I fix this?
2014-01-15 5:25 pm
Never mind the last question...
( I gave banging my head against the wall a rest and came back with a fresh pair of eyes... an found the issue)
it so happens that when you install the plugin after zipping it, the installation omits adding the "fields" folder in the newly made "profile10" (even though you have copied it in the first step of the tutorial)
I noticed this when comparing the contents of the profile10 folder with the original profile folder.
My sollution was to copy the "fields" folder out of the original profile folder to the new profile10 folder.
After doing that, the TOS two radio buttons and Terms of Service hyperlink appear.
2014-01-15 6:04 pm
<div style="background-color: #FFF; padding-left: 10px;">Hello Orlando,
Thanks for posting back on this article and letting us know your solution. It's strange that a particular folder like <strong>fields</strong> would be left out.
Did you happen to notice this folder inside your <strong>profile10.zip</strong> file? It almost sounds like when you zipped up the <strong>/profile10</strong> directory that your zip application was not setup to also include sub-folders.
2014-01-15 7:12 pm
I went back and double checked the zip file oddly enough, the "fields" folder IS included in the zip.
So i have to conclude that upon installation of the plug-in it is somehow being ommitted (maybe Joomla 3.2.1. bug? )
2014-05-14 10:27 am
It is not a bugYou should edit the profile10.xml file. At line 16 you should find this<folder>profiles</folder>at line 17 add the following<folder>fields</folder>In this way Joomla will know that the plugin also needs the fields folder
2014-01-16 10:00 am
It does indeed appear that if it was missing after installation, but is included in the zip file, that Joomla omitted it from being installed. I recommend bringing this up at the <a href="http://forum.joomla.org/">Joomla forums</a> as there may be a reason (or a bug) for this.
2014-02-02 11:28 am
i followed all the steps, but when i try to install the plugin i get this warnig:
JInstaller: :Install: Cannot find Joomla XML setup file
2014-02-03 9:08 am
If you are getting this error, this means that your XML file does not exist within your newly created zip file. Ensure that you have included the profile10.xml file within your zip.
2014-11-03 2:19 am
Hello. I having a trouble uploading my new plugin. I followed the instructions above change it into profile10 still has an error stating, "Plugin Install: Another plugin is already using directory: /hsphere/local/home/a897837/filestatecorp.com/mrtshops/plugins/user/contactcreator". Any ideas how to solve this? I will really appreciate your help.
2014-11-03 11:56 am
Thank you for your question. I found a similar issue with a different plugin in the official Joomla Support Forum, where they are offering several solutions.
If you have any further questions, feel free to post them below.
2016-02-14 8:53 am
I double checked steps 1 to 9 of your instruction and everything was OK. However I was not able to install the new profile 10 plugin in my J 3.4.8 version. I was getting following messages:
JFolder: :delete: ......
JInstaller: :Install: File „/home/xxxxxx/logs/install_56c06fd187511/profiles10“ does not exist.
What could the problem be?
BTW. Line 6 of your tutorial 1/3 is a bit unclear to me: Has the file profile.xml to be renamed to profile10.xml itself or only the code inside the file?
Thanks for your help.