mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:02:54 +00:00
Repeated messages to Diaspora now contain a link to the original content at the bottom of the message.
This commit is contained in:
parent
acf1c3956c
commit
a6742d3db6
2 changed files with 14 additions and 12 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
||||||
favicon.*
|
favicon.*
|
||||||
.htconfig.php
|
.htconfig.php
|
||||||
|
.htpreconfig.php
|
||||||
\#*
|
\#*
|
||||||
include/jquery-1.4.2.min.js
|
include/jquery-1.4.2.min.js
|
||||||
*.log
|
*.log
|
||||||
|
|
|
@ -386,22 +386,19 @@ function bb_ShareAttributesDiaspora($match) {
|
||||||
if ($matches[1] != "")
|
if ($matches[1] != "")
|
||||||
$profile = $matches[1];
|
$profile = $matches[1];
|
||||||
|
|
||||||
$posted = "";
|
$link = "";
|
||||||
// preg_match("/posted='(.*?)'/ism", $attributes, $matches);
|
preg_match("/link='(.*?)'/ism", $attributes, $matches);
|
||||||
// if ($matches[1] != "")
|
if ($matches[1] != "")
|
||||||
// $posted = " ".date("Y-m-d H:i", strtotime($matches[1]));
|
$link = $matches[1];
|
||||||
//
|
|
||||||
// preg_match('/posted="(.*?)"/ism', $attributes, $matches);
|
preg_match('/link="(.*?)"/ism', $attributes, $matches);
|
||||||
// if ($matches[1] != "")
|
if ($matches[1] != "")
|
||||||
// $posted = " ".date("Y-m-d H:i", strtotime($matches[1]));
|
$link = $matches[1];
|
||||||
|
|
||||||
$userid = GetProfileUsername($profile,$author);
|
$userid = GetProfileUsername($profile,$author);
|
||||||
|
|
||||||
$headline = '<div class="shared_header">';
|
$headline = '<div class="shared_header">';
|
||||||
$headline .= '<span><b>'.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').$userid.':</b></span>';
|
$headline .= '<span><b>'.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').$userid.':</b></span>';
|
||||||
//$headline .= sprintf(t('<span><b>'.
|
|
||||||
// html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').
|
|
||||||
// '<a href="%s" target="_blank">%s</a>%s:</b></span>'), $profile, $userid, $posted);
|
|
||||||
$headline .= "</div>";
|
$headline .= "</div>";
|
||||||
|
|
||||||
$text = trim($match[1]);
|
$text = trim($match[1]);
|
||||||
|
@ -410,7 +407,11 @@ function bb_ShareAttributesDiaspora($match) {
|
||||||
$text .= "<hr />";
|
$text .= "<hr />";
|
||||||
|
|
||||||
$text .= $headline.'<blockquote class="shared_content">'.trim($match[3])."</blockquote><br />";
|
$text .= $headline.'<blockquote class="shared_content">'.trim($match[3])."</blockquote><br />";
|
||||||
//$text .= $headline."<br />".trim($match[3])."<br />";
|
|
||||||
|
if ($link != "")
|
||||||
|
$text .= '<br /><a href="'.$link.'">[l]</a>';
|
||||||
|
|
||||||
|
// $text .= '<br /><a href="'.$link.'">'.t("Link").' [l]</a>';
|
||||||
|
|
||||||
return($text);
|
return($text);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue