From: Michael Vogel Date: Sun, 11 May 2014 20:07:37 +0000 (+0200) Subject: Repeated messages to Diaspora now contain a link to the original content at the botto... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a6742d3db65b5ad430ba83d9f752931458861bc2;p=friendica.git Repeated messages to Diaspora now contain a link to the original content at the bottom of the message. --- diff --git a/.gitignore b/.gitignore index 7152833590..655df82c09 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ favicon.* .htconfig.php +.htpreconfig.php \#* include/jquery-1.4.2.min.js *.log diff --git a/include/bbcode.php b/include/bbcode.php index 2678344037..686bd41b8e 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -386,22 +386,19 @@ function bb_ShareAttributesDiaspora($match) { if ($matches[1] != "") $profile = $matches[1]; - $posted = ""; -// preg_match("/posted='(.*?)'/ism", $attributes, $matches); -// if ($matches[1] != "") -// $posted = " ".date("Y-m-d H:i", strtotime($matches[1])); -// -// preg_match('/posted="(.*?)"/ism', $attributes, $matches); -// if ($matches[1] != "") -// $posted = " ".date("Y-m-d H:i", strtotime($matches[1])); + $link = ""; + preg_match("/link='(.*?)'/ism", $attributes, $matches); + if ($matches[1] != "") + $link = $matches[1]; + + preg_match('/link="(.*?)"/ism', $attributes, $matches); + if ($matches[1] != "") + $link = $matches[1]; $userid = GetProfileUsername($profile,$author); $headline = '
'; $headline .= ''.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').$userid.':'; - //$headline .= sprintf(t(''. - // html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8'). - // '%s%s:'), $profile, $userid, $posted); $headline .= "
"; $text = trim($match[1]); @@ -410,7 +407,11 @@ function bb_ShareAttributesDiaspora($match) { $text .= "
"; $text .= $headline.'
'.trim($match[3])."

"; - //$text .= $headline."
".trim($match[3])."
"; + + if ($link != "") + $text .= '
[l]'; + + // $text .= '
'.t("Link").' [l]'; return($text); }