Active
Project:
Content Profile
Version:
6.x-1.0-beta3
Component:
Base module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Mar 2009 at 21:50 UTC
Updated:
2 Dec 2009 at 02:39 UTC
I tried to theme my user_pictures with a Imagefield in a profile.
After creating this user-picture.tpl.php :
print $content_profile->get_variable('profile', 'field_userpicture');
i get the following error:
Fatal error: Call to a member function get_variable() on a non-object in /sites/all/themes/multiflex3/user-picture.tpl.php on line 21
Is the content-profile in this template not included? How do I theme user pictures?
Comments
Comment #1
michelleThat will only work where the variable $content_profile is defined. Looks like it's not defined in that template.
Michelle
Comment #2
a.siebel commentedThat's right.
I solved the problem manually:
My user-picture.tpl.php with imagecache support:
?>
(My user pictures are saved in user_pictures/uid )
In content_profile.module in line 558 i added the user_picture.tpl.php to the supported template functions
Comment #3
darrellhq commentedSo because you have to enable user picture support and pictures in post and comments for this to work it will also show an extra form on the user edit page. Anyway of getting around the whole thing and theming it to only use the field from content profile.
Comment #4
drumnjo commentedsubscribing