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
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@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/ ]
Maybe theme_render_template($template_file, $variables) is what you are looking for?
I found that hint here: http://gazebo.commonplaces.com/2009/05/theming-template-calls-in-drupal-6/
Best regards
Jørn
On Fri, Jun 12, 2009 at 4:43 AM, Neil Coghlan neil@esl-lounge.com wrote:
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/ ]