mirror of https://github.com/BOINC/boinc.git
Drupal: Fix Gravatar support on private message pages
Uploaded user avatars were appearing as expected on private messages, but Gravatars did not render; updated to make private message template consistent with forum comment template as far as how avatars are rendered https://dev.gridrepublic.org/browse/DBOINCP-264
This commit is contained in:
parent
fec828843e
commit
3efbd9d0f6
|
@ -607,12 +607,17 @@ function boinc_preprocess_views_view(&$vars, $hook) {
|
|||
*/
|
||||
///* -- Delete this line if you want to use this function
|
||||
function boinc_preprocess_privatemsg_view(&$vars, $hook) {
|
||||
$author_picture = '<div class="picture">';
|
||||
$user_image = boincuser_get_user_profile_image($vars['message']['author']->uid);
|
||||
if ($user_image['image']['filepath']) {
|
||||
$author_picture = '<div class="picture">';
|
||||
$author_picture .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
|
||||
$author_picture .= '</div>';
|
||||
if ($user_image) {
|
||||
if (is_array($user_image) AND $user_image['image']['filepath']) {
|
||||
$author_picture .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
|
||||
}
|
||||
elseif (is_string($user_image)) {
|
||||
$author_picture .= '<img src="' . $user_image . '"/>';
|
||||
}
|
||||
}
|
||||
$author_picture .= '</div>';
|
||||
$vars['author_picture'] = $author_picture;
|
||||
$vars['message_timestamp'] = date('j M Y H:i:s T', $vars['message']['timestamp']);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue