Closed (fixed)
Project:
ImageCache Profiles
Version:
6.x-1.3
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 May 2010 at 16:58 UTC
Updated:
22 Sep 2010 at 02:20 UTC
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
Comment #1
yannickoosubscribe
Comment #2
dawehnerThere 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.
Comment #3
d0t101101 commentedI'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!
.
Comment #4
d0t101101 commentedNevermind, 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.
.
Comment #5
d0t101101 commented