summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xheartbeat.module17
1 files changed, 15 insertions, 2 deletions
diff --git a/heartbeat.module b/heartbeat.module
index c16b589..cc0771d 100755
--- a/heartbeat.module
+++ b/heartbeat.module
@@ -625,19 +625,32 @@ function heartbeat_activity_view($message, $view_mode = NULL) {
*/
function heartbeat_heartbeat_activity_view(HeartbeatActivity $heartbeatActivity, $view_mode = 'full', $language = NULL) {
- if ($heartbeatActivity->actor->picture) {
- $uri = (is_numeric($heartbeatActivity->actor->picture)) ? file_load($heartbeatActivity->actor->picture)->uri : $heartbeatActivity->actor->picture->uri;
+ // Avatar.
+ if (!empty($heartbeatActivity->actor->picture)) {
+ if (is_numeric($heartbeatActivity->actor->picture)) {
+ $uri = file_load($heartbeatActivity->actor->picture)->uri;
+ }
+ else {
+ $uri = $heartbeatActivity->actor->picture->uri;
+ }
$heartbeatActivity->content['avatar'] = theme('heartbeat_activity_avatar', array('heartbeatactivity' => $heartbeatActivity, 'uri' => $uri));
}
+ // Default avatar.
+ elseif (variable_get('user_picture_default', '')) {
+ $heartbeatActivity->content['avatar'] = theme('heartbeat_activity_avatar', array('heartbeatactivity' => $heartbeatActivity, 'uri' => variable_get('user_picture_default', '')));
+ }
+ // Activity message.
$heartbeatActivity->content['message'] = array(
'#attributes' => array('class' => array('activity-message')),
'#title' => t('Heartbeat activity message'),
'#markup' => $heartbeatActivity->message,
);
+ // Timestamp of occurrence.
$heartbeatActivity->content['time'] = array(
'#title' => t('Activity on'),
'#markup' => theme('heartbeat_time_ago', array('message' => $heartbeatActivity)),
);
+ // Buttons for this message.
$heartbeatActivity->content['buttons'] = array(
'#markup' => theme('heartbeat_buttons', array('message' => $heartbeatActivity)),
);