Hi, I'm trying to alter the alt text on user profile pictures. I don't want them to see the username, i want them to see the Full Name field.

I have tried copying the template_preprocess_user_picture function into my template.php file
- i've tried making the pictures not link, as suggested here: http://api.drupal.org/api/drupal/modules!user!user.module/function/template_preprocess_user_picture/6 (didn't work)
- i've tried simply changing the text in this line of code from the theme:

$alt = t("@user's picture", array('@user' => $account->name ? $account->name : variable_get('anonymous', t('Anonymous'))));
// to this even:  but no change here shows up in my site.... 
$alt = t("picture", array('@user' => $account->name ? $account->name : variable_get('anonymous', t('Anonymous'))));
//ideally i would want something like this, however you do it:
$alt = t("profile_full_name", array('@user' => $account->name ? $account->name : variable_get('anonymous', t('Anonymous'))));

I need help... I have found some resources but its not working out well.
I looked at this: http://preprocess.me/theming-the-drupal-username and he talks about several different functions that you do, but this is modifying this differently, and i don't even know if this would affect my user pictures at all. If I COULD change the username that is displayed anywhere to be the Full Name instead, that'd be great. But how would i know that doing these changes (if they work) would be able to happen before the picture alt value is loaded, so that the username value there is affected...

or is there a way i can modify the username's value in my function, from the code in this article?

and if i want to modify this function, don't i put it in my template.php? I don't understand why it's having no effect there...It should be overwriting the user.module code - why did the change i made to '@user's picture' not show up?

sorry I don't understand all of this core module interworking-stuff.


katrialesser’s picture

umm I feel stupid...so there's a difference between trying to override theme functions and core functions...

The user module is a core module - so it has core functions? Or since this is about theming, and the user.module file is related to the user template file in there, it's a theme function?

If anyone knows the difference, or how to know what to do here...i would really appreciate it.

It's impossible to override core functions - http://drupal.org/node/223794

So hopefully I was thinking about this correctly before, and it's a theme function? because other people have overridden it - http://api.drupal.org/api/drupal/modules!user!user.module/function/templ... so this is a theme function?