$itemcache = get_itemcachepath();
- // relative dates only make sense when they aren't cached
- if ($itemcache == "") {
- preg_match("/posted='(.*?)'/ism", $attributes, $matches);
- if ($matches[1] != "")
- $posted = $matches[1];
+ preg_match("/posted='(.*?)'/ism", $attributes, $matches);
+ if ($matches[1] != "")
+ $posted = $matches[1];
- preg_match('/posted="(.*?)"/ism', $attributes, $matches);
- if ($matches[1] != "")
- $posted = $matches[1];
+ preg_match('/posted="(.*?)"/ism', $attributes, $matches);
+ if ($matches[1] != "")
+ $posted = $matches[1];
+ // relative dates only make sense when they aren't cached
+ if ($itemcache == "")
$reldate = (($posted) ? " " . relative_date($posted) : '');
- }
$data = get_contact_details_by_url($profile);
$text .= "<br /><br />".$link;
break;
default:
- $headline = trim($share[1])."\n";
- $headline .= '<div class="shared-wrapper">'."\n";
- $headline .= '<div class="shared_header">'."\n";
- if ($avatar != "")
- $headline .= '<img src="'.proxy_url($avatar, false, PROXY_SIZE_MICRO).'" height="32" width="32" >';
-
- $headline .= sprintf(t('<span><a href="%s" target="_blank">%s</a> wrote the following <a href="%s" target="_blank">post</a>'.$reldate.':</span>'), $profile, $author, $link);
- $headline .= "</div>\n";
- $text = $headline.'<blockquote class="shared_content">'.trim($share[3])."</blockquote>\n";
- $text .= "<div>\n";
+ $text = trim($share[1])."\n";
+
+ $tpl = get_markup_template('shared-content.tpl');
+ $text .= replace_macros($tpl,
+ array(
+ '$profile' => $profile,
+ '$avatar' => $avatar,
+ '$author' => $author,
+ '$link' => $link,
+ '$posted' => $posted,
+ '$reldate' => $reldate,
+ '$content' => trim($share[3])
+ )
+ );
break;
}
return($text);
--- /dev/null
+<div class="shared-wrapper">
+ <div class="shared_header">
+ {{if $avatar}}
+ <a href="{{$profile}}" target="_blank" class="shared-userinfo">
+ <img src="{{$avatar}}" height="32" width="32">
+ </a>
+ {{/if}}
+ {{*<span><a href="{{$profile}}" target="_blank" class="shared-wall-item-name">{{$author}}</a> wrote the following <a href="{{$link}}" target="_blank">post</a>{{$reldate}}:</span>*}}
+ <div><a href="{{$profile}}" target="_blank" class="shared-wall-item-name"><span class="shared-author">{{$author}}</span></a></div>
+ <div class="shared-wall-item-ago"><small><a href="{{$link}}" target="_blank"><span class="shared-time">{{$posted}}</a></a></small></div>
+ </div>
+ <blockquote class="shared_content">{{$content}}</blockquote>
+<div>
font-size: 12px;
}
+.shared-time {
+ color: #999;
+ font-size: 12px;
+}
+
+.shared_header {
+ line-height: 14px;
+}
+
.wall-item-network {
color: #999;
font-size: 12px;
color: #36c;
}
-.wall-item-container .wall-item-name {
+.wall-item-container .wall-item-name,
+.wall-item-container .shared-author {
color: black;
font-weight: bold;
-webkit-transition: all 0.2s ease-in-out;
}
.toplevel_item:hover .wall-item-name,
-.wall-item-container:hover .wall-item-name {
+.wall-item-container:hover .wall-item-name,
+.toplevel_item:hover .shared-author,
+.wall-item-container:hover .shared-author {
color: #36c;
font-weight: bold;
-webkit-transition: all 0.2s ease-in-out;