Hello,

since this module overrides the default template_preprocess_user_picture() function I'd like to know how I can override this in my template.php file?
Sometimes I need to remove the link from the picture element and I neither want to hack the module nor create a separate module for this little code change.
Help is much appreciated.

Thank you very much for this great module - I use it on almost every site I build. :)

Stefan

Comments

yannickoo’s picture

subscribe

dawehner’s picture

There are two ways to do it:

First you could add another preprocess function which overrides the variable.
Second you could use hook_theme_registry_alter and remove the old preprocess function and replace it with your own.

d0t101101’s picture

I'm having difficulty with this. It seems as though imagecache_profiles_preprocess_user_picture() always takes precedence. I've even tried using hook_theme_registry_alter in a custom module to no avail.

Could you kindly offer some examples?

Basically I want to have it so 'view user profile.' tooltip always appears to anonymous users, and '@user's picture.' appears to registered users. Any help with this would be greatly appreciated.

Thanks, and great module!
.

d0t101101’s picture

Nevermind, I managed to fix this.

I believe the problem was that I needed to clear the views cache (admin/build/views/tools), so the panel's contents would refresh use the new pre-process function.

.

d0t101101’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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