Hi,
Thank you for responding to my previous posting, which you moved to ImageCache, yet sorry but I don't think it belongs there ..
In the output of the user_visits.module you have:
$output .= theme('user_picture', $account);
You responded with:
If you want to add manually an image and apply an imagecache preset on it, you need to add a code snippet to the desired .tpl.php file:
<?php print theme('imagecache', $preset, $image['filepath'], $alt, $title, $attributes); ?>
So, replacing
<?php $output .= theme('user_picture', $account); ?>
with something like
<?php $output .= theme('imagecache', 'YOUR_PREVIOUSLY_CREATED_PRESET', $account->picture, $alt, $title, $attributes); ?>
should do the trick (untested).
============================
The problem is .. I don't want to change my user picture everywhere on the site, just to make it small on user_visits.module which is my preset in imagecache 'profile_small'.
============================
Would appreciate your help, and again, thank you for your wonderful module.
Comments
Comment #1
sanduhrsStill the same solution.
Just place the following function in your themes template.php
See the docs [1] for more info on themeable functions:
[1] http://drupal.org/node/55126
Comment #2
Liliplanet CreditAttribution: Liliplanet commentedThank you sanduhrs for your reply ..
I added the following to my template:
and sorry, no difference here .. still the big profile picture. My theme is 'endless_news' and my imagecache preset is 'profile_small'.
Did I do that correctly? Most appreciate your help, and thank you again.
Lilian
Comment #3
sanduhrsReally, this is well documented and no issue with the module.
Check the documentation for D6 [1] - you are at step 4 - or ask for support in the forums or on IRC.
[1] http://drupal.org/node/341628
[2] http://drupal.org/forum
[3] http://drupal.org/irc
Comment #4
Liliplanet CreditAttribution: Liliplanet commentedMy absolute apologies .. after cron run it was updated and beautiful! Thank you so much!
Comment #5
czeky CreditAttribution: czeky commentedhi, thanx, working fine... but .. is it possible to make the user picture clickable?
many thanx
zdenek
Comment #6
gitin CreditAttribution: gitin commentedhas anybody found the way to make pictures clickable..?
thanx
gee
Comment #7
czeky CreditAttribution: czeky commentedI have this in a block, set to 5 users and user image is clickable
Comment #8
Albrecht Marignoni CreditAttribution: Albrecht Marignoni commentedIt´s a very big problem...
Where is the problem with this?
/**
* kleine
*/
function user_visits($account, $timestamp = NULL, $referer = NULL) {
$output = '
$output .= theme('imagecache', 'user_image_default', $account->picture, $alt, $title, $attributes);
$output .= '
'."\n";
if ($timestamp) {
$output .= $timestamp ? '
'."\n" : '';
$output .= $referer ? '
'."\n" : '';
}
$output .= '
'."\n";
return $output;
}
Comment #9
mmachina CreditAttribution: mmachina commentedI applied to code to the template
everything works fine... the images have become the size that I need...
But they are no longer clickable. Anyway i can get the pictures to be able to link to the user profile?
Thanks!