The BETA 2 is already more than a half year old - so a new BETA release is really long overdue. So I've worked hard during last days to get a next BETA out of the door - finally it's there! Of course there were a lot of improvements and bug fixes since BETA 2, so let me mention only the most notable ones:
- added support for an edit tab at the users page: either on the top level or as secondary tab below the "Edit" tab.
- added an extension module for integration at the registration page
- made theming with content profile easier and added content profile docs for themers
- added the possibility for admins to add content profile nodes for other users
- basic support for translated profiles with the help of the "content translation" module
- added Views integration
- added rules integration with support of upgrading from nodeprofile workflow-ng rules.
- by Gundalo and Michelle: added Panels integration
- added more usage help and hints to the README
Theming with content profileWhen you have a "profile-as-nodes" you probably want to use some profile information stored in your profile content in some of your themes, e.g. to show some additional information about the author of a forum post. To do so, you previously had to manually load the profile node in your theme and output the right data at the right place - yeah and not forget to properly check your data... This cried for improvements, so I tackled this problem. We need to be able to easily access the data of the created profiles, where it should be already properly prepared for use in a template so you haven't to check it yourself. Yes and we should do that fast.. So just loading all profile data and putting it into $user is really no option. The solution I came up with is
$content_profile: A little nice variable which is available in templates related to users that let's you access all the information stored in profiles. The nice thing is that it offers you all variables you are used to have a in a "node template" and it lazy-loads the profile content nodes - so they aren't loaded for nothing. This is an example use you could put in a template to show the profile content's title:
For more, check out the README.txt which ships with the module.
echo $content_profile->get_variable('profile', 'title');
Rules integrationI've ported the workflow-ng integration of node profile over to content profiles & rules. This offers you a condition to check whether a user has already created a profile of a certain type. Then it offers an action for loading the content profile of a user, which makes it available to token replacements as well as to all other existing rules actions which deal with content. So this integration allows one to build some profile related rules with the rules module. As example the module ships with one deactivated default rule: "Redirect to profile creation page, if users have no profile." If you activate it at the rules "Triggered rules" page, it's going to be evaluated when a user logs in. This is how the example looks like for your users: So you could use this as an alternative to integrating in the registration form: Users first register and are redirected to their profile creation page when they login. Of course you can also alter the default rule and customise it so that it fits your needs, e.g. you can easily remove the redirect action so that only a message containing a link to the profile page is displayed.
Development state..You may wonder - is the module already usable, is it stable? I'd say yes - it's safe to use it. I'd call the base module feature complete and ready, but there also some points that still need some attention:
- The registration integration needs documentation and perhaps some love.
- We need more docs and tutorials.
- We need to write some simpletests! Perhaps start over with the tests of bio 5.x