]> git.mxchange.org Git - friendica.git/commitdiff
Repeated messages to Diaspora now contain a link to the original content at the botto...
authorMichael Vogel <icarus@dabo.de>
Sun, 11 May 2014 20:07:37 +0000 (22:07 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 11 May 2014 20:07:37 +0000 (22:07 +0200)
.gitignore
include/bbcode.php

index 71528335901c55cdb6b5ae4c75faeecae5670bb5..655df82c0904005fad15c2c2a40b98b579ff5c1a 100644 (file)
@@ -1,5 +1,6 @@
 favicon.*\r
 .htconfig.php\r
+.htpreconfig.php\r
 \#*\r
 include/jquery-1.4.2.min.js\r
 *.log\r
index 26783440374b45468a3786e0b13406c178389418..686bd41b8e1aa8a939066dec24a9fcf0d60e7a3b 100644 (file)
@@ -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 = '<div class="shared_header">';
        $headline .= '<span><b>'.html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8').$userid.':</b></span>';
-       //$headline .= sprintf(t('<span><b>'.
-       //              html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8').
-       //              '<a href="%s" target="_blank">%s</a>%s:</b></span>'), $profile, $userid, $posted);
         $headline .= "</div>";
 
        $text = trim($match[1]);
@@ -410,7 +407,11 @@ function bb_ShareAttributesDiaspora($match) {
                $text .= "<hr />";
 
        $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);
 }