}
if($item['last-child']) {
$comment = replace_macros($cmnt_tpl,array(
- '$return_path' => $_SESSION['return_url'],
+ '$return_path' => '',
+ '$jsreload' => $_SESSION['return_url'],
'$type' => 'wall-comment',
'$id' => $item['item_id'],
'$parent' => $item['parent'],
$redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
+ // I think this is redundant now but too chicken to remove it unless
+ // I've had six cups of coffee and tested it completely
+
if(($item['network'] === 'dfrn') && (! $item['self'] )) {
$profile_url = $redirect_url;
$sparkle = ' sparkle';
$template = $wallwall;
$commentww = 'ww';
// If it is our contact, use a friendly redirect link
- if(($item['owner-link'] == $item['url']) && ($item['network'] === 'dfrn')) {
+ if((link_compare($item['owner-link'],$item['url'])) && ($item['network'] === 'dfrn')) {
$owner_url = $redirect_url;
$osparkle = ' sparkle';
}
}
}
- $diff_author = (($item['url'] !== $item['author-link']) ? true : false);
+ $diff_author = ((link_compare($item['url'],$item['author-link'])) ? false : true);
$profile_name = (((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']);
$profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $item['thumb']);
- $profile_link = $profile_url;
+ // Can we use our special contact URL for this author?
+
+ if(strlen($item['author-link'])) {
+ if((link_compare($item['author-link'],$item['url'])) && ($item['network'] === 'dfrn') && (! $item['self'])) {
+ $profile_link = $redirect_url;
+ $sparkle = ' sparkle';
+ }
+ else {
+ $profile_link = $item['author-link'];
+ $sparkle = '';
+ }
+ }
if(($item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
- $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));
+ $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
else
$drop = replace_macros(load_view_file('view/wall_fake_drop.tpl'), array('$id' => $item['id']));
$tmp_item = replace_macros($template,array(
'$id' => $item['item_id'],
- '$title' => t('View $name\'s profile'),
+ '$linktitle' => t('View $name\'s profile'),
+ '$olinktitle' => t('View $owner_name\'s profile'),
+ '$to' => t('to'),
+ '$wall' => t('Wall-to-Wall'),
+ '$vwall' => t('via Wall-To-Wall:'),
'$profile_url' => $profile_link,
'$name' => $profile_name,
'$sparkle' => $sparkle,
'$owner_url' => $owner_url,
'$owner_photo' => $owner_photo,
'$owner_name' => $owner_name,
+ '$plink' => get_plink($item),
'$drop' => $drop,
'$vote' => $likebuttons,
'$like' => $like,
}
}
+
+ $o .= '<div class="cc-license">' . t('Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.') . '</div>';
+
return $o;
}