In the function call, you might want to make it clear to make $user global before the call. This worked for me.

	global $user;
	$meezResult = theme('user_meez', $user,'head_lg');
	print ('Meez name: ' . $meezResult);

Thanks for a great module and I will continue to post my contributions and I hope the rest of the users do as well!

CommentFileSizeAuthor
#2 269972_readme_cleanup.txt2.63 KBgreggles
#1 README.txt3.13 KBzcferres

Comments

zcferres’s picture

StatusFileSize
new3.13 KB

Attached is my remade readme.txt that is tested and works. It's really dumbed down though as for some reason the drupal theme_image api doesnt support remote/absolute links.

greggles’s picture

Status: Active » Needs review
StatusFileSize
new2.63 KB

Hi, thanks for the changes. The file had "DOS" line endings so it appeared to be changing more than it really was. I've attached a diff so we can discuss the individual changes.

I think that using THEMENAME_user_meez( is the appropriate thing rather than phptemplate. But you are definitely right that theme_user_meez doesn't really explain to the new themer that they will need to use their themename. How about THEMENAME instead.

The theme('image') call provides many benefits beyond just adding the img tags around it. According to the docs it should work with Either the path of the image file (relative to base_path()) or a full URL.. So, if there are difficulties using a full URL then that's a bug in core.

I wanted to use the core class for "picture" since that has some styling applied to it already on most sites. I think most people, if they need a specific class, will understand how to change that. I did clean up the quotes in that area.

Your idea to use global $user seems incorrect, though. Global $user will always be the user looking at the page. For a user avatar, we want to display the avatar of the account being reviewed.

I cleaned up a few other comments in the README as well.

Can you review this new patch?

greggles’s picture

Title: Better Documentation (Yet Still) » Updated README.txt for Meez Module (Yet Still)
greggles’s picture

Status: Needs review » Fixed
zcferres’s picture

Great, everything you said makes sense.

This issue with the drupal image function is a known bug in core:
http://drupal.org/node/119003

Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.