Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've installed this module and also the Imagecache Profiles module (5.x-1.4). Everything seems to be working fine as far as the profile picture caching is concerned: when I go to user/1, for example, I see the nice cached user picture, correct size. However, if I send a private message from say user 1 to user 2, and then go I go to user/2/privatemsg to get the message, I see the HUGE, un-resized profile picture of user 1. Is this an issue with this module, or with Imagecache Profiles? Any ideas on how to fix it?
Any help is very much appreciated!
Comments
Comment #1
ron_s CreditAttribution: ron_s commentedThe theming for the picture resides in the
theme_privatemsg_user_picture
function. Copy and paste this function into yourtemplate.php
file, then change the name of the function to be associated with your theme. For example, if using the garland theme, your function name would begarland_privatemsg_user_picture
.Then what you want to do is look for the following code:
... and you want to change the $picture line to the following:
This will use the theming for your user_picture by default, which will be the theming associated with ImageCache if you have ImageCache Profiles installed.
Comment #2
JordanMagnuson CreditAttribution: JordanMagnuson commentedThanks so much ron_s!
Comment #3
plan9 CreditAttribution: plan9 commentedThanks!!
;)
Comment #4
Flplsx CreditAttribution: Flplsx commentedcan anyone help with getting this to work in drupal 6.x?
it looks like you'd override the
privatemsg_preprocess_privatemsg_view()
function, but I don't know nearly enough PHP to do it myself.Comment #5
BerdirWell, what do you want to do?
I just did a short test, enabled all required imagecache modules, did set a preset for profile/comment *and* default, uploaded a profile picture and it is being displayed when viewing a message I wrote.
Comment #6
BerdirComment #7
Flplsx CreditAttribution: Flplsx commentedHow do you select which imagecache preset you want to use for privatemsg?
Thanks for the reply!
Comment #8
BerdirThere is no custom one for privatemsg (we could create one, but I would have to figure out how), for now, it does use the default preset.
Comment #9
BerdirI assume the question has been answered, feel free to re-open the issue or create a new one if you have more questions.
Comment #10
Flplsx CreditAttribution: Flplsx commentedsorry, thought i wrote back.....
thanks! Now to figure out how to make an imagecache preset the default.....
Comment #11
BerdirThat should be easy. At admin/user/settings, there are 3 options available for me: Profile/Comment and Default picture preset.
Once a preset is set for the "Default picture preset", it should show up correctly on the messages/view page.
Comment #12
Flplsx CreditAttribution: Flplsx commentedoh man, completely missed that, thanks a ton!