[support] transforming a customised 5.x theme into a 6.x theme

Sven Decabooter sdecabooter at gmail.com
Fri Jun 12 08:01:32 UTC 2009


That _phptemplate_callback function was supposedly used to call a template
file called "user_profile.tpl.php" in your theme directory, and pass it the
2 variables $account and $fields.
As of Drupal 6, this is default behaviour. You should check the file
user-profile.tpl.php in /modules/user/ to see the default implementation in
Drupal 6. If you would want to customize the user profile template, you
could just copy this user-profile.tpl.php file into your themes directory
and modify it to suit your needs.

Of course we don't know what logic is currently in your user_profile.tpl.php
(D5) file, but you will probably have to change all the references to
$account and $fields, and replace them with the values that come from the 2
default variables in the D6 template file: $user_profile and $profile.

Sven

2009/6/12 Neil Coghlan <neil at esl-lounge.com>

>  I've decided to bite the bullet on this and give it a go myself.
>
> I installed D6 and then uploaded the customised theme with an info file
> with the customised regions listed.
>
> I followed the advice here: http://wtanaka.com/drupal/convert-theme-6
>
> and renamed some of the variables throughout the theme. I'm currently stuck
> at number 5 on that page as I have the following in my custom theme's
> template.php
>
> /**
> * Catch the theme_profile_profile function, and redirect through the
> template api
> */
> function phptemplate_user_profile($user, $fields = array()) {
>   // Pass to phptemplate, including translating the parameters to an
> associative array. The element names are the names that the variables
>   // will be assigned within your template.
>   /* potential need for other code to extract field info */
> return _phptemplate_callback('user_profile', array('account' => $user,
> 'fields' => $fields));
>   }
>
> When I try to go to user/1 on my new D6 site, I get this:
>
> *Fatal error*: Call to undefined function _phptemplate_callback() in *
> /d6/sites/all/themes/xxx/template.php* on line *115*
>
> and I presume it's something to do with this. The above page says to get
> rid of phptemplate_callback () but not what to replace it with.
>
> I would appreciate any help with this. I think I'm about 70% of the way
> towards a 6.x theme and this would be another big step.
>
> Thanks
>
> Neil
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/support/attachments/20090612/e603b731/attachment.htm>


More information about the support mailing list