+// Escpecially for Diaspora (there mustn't be links in the share information)
+function bb_ShareAttributesDiaspora($match) {
+
+ $attributes = $match[2];
+
+ $author = "";
+ preg_match("/author='(.*?)'/ism", $attributes, $matches);
+ if ($matches[1] != "")
+ $author = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
+
+ preg_match('/author="(.*?)"/ism', $attributes, $matches);
+ if ($matches[1] != "")
+ $author = $matches[1];
+
+ $profile = "";
+ preg_match("/profile='(.*?)'/ism", $attributes, $matches);
+ if ($matches[1] != "")
+ $profile = $matches[1];
+
+ preg_match('/profile="(.*?)"/ism', $attributes, $matches);
+ 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]));
+
+ $userid = GetProfileUsername($profile,$author);
+
+ $headline = '<div class="shared_header">';
+ $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="external-link">%s</a>%s:</b></span>'), $profile, $userid, $posted);
+ $headline .= "</div>";
+
+ $text = trim($match[1]);
+
+ if ($text != "")
+ $text .= "<hr />";
+
+ $text .= $headline.'<blockquote class="shared_content">'.trim($match[3])."</blockquote><br />";
+ //$text .= $headline."<br />".trim($match[3])."<br />";
+
+ return($text);
+}
+
+// Optimized for Libertree, Wordpress, Tumblr, ...
+function bb_ShareAttributesForExport($match) {
+
+ $attributes = $match[2];
+
+ $author = "";
+ preg_match("/author='(.*?)'/ism", $attributes, $matches);
+ if ($matches[1] != "")
+ $author = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
+
+ preg_match('/author="(.*?)"/ism', $attributes, $matches);
+ if ($matches[1] != "")
+ $author = $matches[1];
+
+ $profile = "";
+ preg_match("/profile='(.*?)'/ism", $attributes, $matches);
+ if ($matches[1] != "")
+ $profile = $matches[1];
+
+ preg_match('/profile="(.*?)"/ism', $attributes, $matches);
+ if ($matches[1] != "")
+ $profile = $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];
+
+ if ($link == "")
+ $link = $profile;
+
+ $userid = GetProfileUsername($profile,$author);
+
+ $headline = '<div class="shared_header">';
+ $headline .= sprintf(t('<span><b>'.
+ html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').
+ '<a href="%s" target="external-link">%s</a>%s:</b></span>'), $link, $userid, $posted);
+ $headline .= "</div>";
+
+ $text = trim($match[1]);
+
+ if ($text != "")
+ $text .= "<hr />";
+
+ $text .= $headline.'<blockquote class="shared_content">'.trim($match[3])."</blockquote><br />";
+
+ return($text);
+}
+
+// Still in use?