mirror of
https://github.com/friendica/friendica
synced 2025-04-25 12:30:11 +00:00
provide a date indication in reshared content
This commit is contained in:
parent
b42427d576
commit
30f1fb2c4d
5 changed files with 118 additions and 99 deletions
|
@ -254,12 +254,22 @@ function bb_ShareAttributes($match) {
|
|||
if ($matches[1] != "")
|
||||
$profile = $matches[1];
|
||||
|
||||
$posted = "";
|
||||
preg_match("/posted='(.*?)'/ism", $attributes, $matches);
|
||||
if ($matches[1] != "")
|
||||
$posted = $matches[1];
|
||||
|
||||
preg_match('/posted="(.*?)"/ism', $attributes, $matches);
|
||||
if ($matches[1] != "")
|
||||
$posted = $matches[1];
|
||||
$reldate = (($posted) ? " " . relative_date($posted) : '');
|
||||
|
||||
$headline = '<div class="shared_header">';
|
||||
|
||||
if ($avatar != "")
|
||||
$headline .= '<img src="'.$avatar.'" height="32" width="32" >';
|
||||
|
||||
$headline .= sprintf(t('<span><a href="%s" target="external-link">%s</a> wrote the following <a href="%s" target="external-link">post</a>:</span>'), $profile, $author, $link);
|
||||
$headline .= sprintf(t('<span><a href="%s" target="external-link">%s</a> wrote the following <a href="%s" target="external-link">post</a>'.$reldate.':</span>'), $profile, $author, $link);
|
||||
|
||||
$headline .= "</div>";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue