By ludo1960 on
Hello Drupalers,
I have a Development Site in Drupal 6. I want to customise the user profile page. I've been searching the Drupal site and what I want to do is something like what the Advanced Profile module achieves. This module is not avaialable for Drupal 6, so from what I have read I have to customise the user_profile.tpl. There are lots of posts on how to do this in Drupal 4.X and Drupal 5.X but nothing for Drupal 6!
Anyone got any tips for getting started with this?
Cheers,
Comments
Template
Yeah. It's documented, but probably not where you'd look. The user profile page is not created by the profile module -- the latter extends the profile system to include whatever fields you specify, but the basics are implemented by the user module. So in Drupal 6, with its fancy new enhanced templates, the place to look is user.
http://api.drupal.org/api/file/modules/user/user-profile.tpl.php/6 describes the default template for the user profile page. You'll see that it inherits precooked variables from another template that handles the grouping of profile fields into categories.
You can override either one by copying it from /modules/user/ into your theme directory and making changes as you wish.
http://api.drupal.org/api/function/template_preprocess_user_profile/6 is a function that you can override in template.php.
Now, if you want to fiddle with the profile listing pages, then the documentation for the profile module is the place to look,
Hmmm
Do you mean Tweak this file; http://api.drupal.org/api/file/modules/php/php.module/6/source ?
No
Absolutely not. That's a core filter that has nothing to do with profiles or templating.
http://api.drupal.org/api/file/modules/user/user-profile.tpl.php/6 documents how the profile page is generated, and as I said, if you copy user-profile.tpl.php to your theme directory you can make any changes you wish.
Yeah.
"Yeah. It's documented, but probably not where you'd look."
Ha! That pretty much sums up my entire experience with Drupal.
Content profile module
I'm not 100% certain what you actually want to achieve, but try the content profile module with CCK. A new content type (profile) is created (you can create others and assign fields to display on the user registration page), and you can use CCK fields to expand the user profile (can be role specific - just set user permissions).