Joomla! 1.6 custom profiles
Friday, 04 June 2010A nice feature that Joomla! 1.6 will ship with is custom profiles: The site administrator will have the option to enable or disable extra fields that ship with the user-component. But does this mean you don't need community-tools like Community Builder or JomSocial anymore? Let's take a look.
Custom profiles
Within Joomla! an user record contains fields like an username, a friendly name, an emailaddress and a password. But a long-standing request is to add custom fields to this user record as well: A streetaddress, hobies, occupation. For this purpose there are third party extensions like JomSocial and Community Builder available. Also, the upcoming Anahita (based on the Nooku Framework) will fill in this gap nicely.
But now this functionality becomes part of the Joomla! core itself? ... or is it? We took the Joomla! 1.6 nightly build, which has a complete dump of the current alpha-version of 1.6, installed it on our local machine and checkout the functionality.
Activating the extra fields

To activate this new Joomla! 1.6 functionality, you'll need to activate the plugin User - Profile through the Joomla! Plugin Manager. Besides activating the plugin it also makes sense to configure the plugin: Within the parameters you can configure which fields should become active, and which fields should become mandatory as well:
- Address-related fields
- Website
- Favorite book
- About Me
- Terms of service
- Date of birth
After activating the right fields, these extra fields become available in both the backend as the frontend.

Customizing fields
One of the fields is the field Terms of service, which creates a checkbox that needs to be selected once a new user registers on the site. But by default the field only states Agree, which is most probably you want to customize. This text can only be customized by editing the right language-file - administrator/language/en-GB/en-GB.plg_user_profile.ini:
PLG_USER_PROFILE_OPTION_AGREE="I agree to the <a href='/terms'>Terms & Conditions</a>"
You can learn how to modify language-files by searching the Joomla! Documentation project at docs.joomla.org.
Adding new fields
Adding new fields also seems not possible at the moment. The userfields are defined in the XML-files of the User Profile plugin and again, this XML should not be hacked directly. The XML is used to create a complete form (thanks to the new JForm API), so a change in this XML-file could offer an easy solution.
Perhaps a major improvement in Joomla! could be to allow for overriding the XML-file within the template - sort of a template override for XML-definitions? Perhaps it is something the JForm API itself could be used for.
Forget about third party extensions?
When building a community, there are far more things to think about than just customizable fields. So the question would be: Why do you need those extra fields? If you want to build some kind of social network, it makes sense that you want to fully customize the fields anyway - which is at the moment not possible yet with Joomla! 1.6 Alpha. It's perhaps better to look at JomSocial, Anahita and/or Community Builder anyway.
Or if you want to reuse the customers fields within some kind of e-commerce solution (VirtueMart, MageBridge, Tienda), the e-commerce solution should actually offer this functionality, not Joomla!. But the fact that this functionality already ships in Joomla! 1.6 Alpha 2 is promising.
