]> git.mxchange.org Git - friendica.git/blobdiff - include/bbcode.php
Merge pull request #2574 from rabuzarus/0607-saved-search
[friendica.git] / include / bbcode.php
index bc307677702bc6ce40c1cd45734f4d1ff92ae2ea..6cce25bcf4ab1a92df350176a682d02b3cad0e1f 100644 (file)
@@ -489,13 +489,16 @@ function bb_ShareAttributes($share, $simplehtml) {
                                $text .= "<br /><br />".$link;
                        break;
                default:
-                       $headline = trim($share[1]).'<div class="shared_header">';
+                       $headline = trim($share[1])."\n";
+                       $headline .= '<div class="shared-wrapper">'."\n";
+                       $headline .= '<div class="shared_header">'."\n";
                        if ($avatar != "")
                                $headline .= '<img src="'.proxy_url($avatar, false, PROXY_SIZE_MICRO).'" height="32" width="32" >';
 
                        $headline .= sprintf(t('<span><a href="%s" target="_blank">%s</a> wrote the following <a href="%s" target="_blank">post</a>'.$reldate.':</span>'), $profile, $author, $link);
-                       $headline .= "</div>";
-                       $text = $headline.'<blockquote class="shared_content">'.trim($share[3])."</blockquote>";
+                       $headline .= "</div>\n";
+                       $text = $headline.'<blockquote class="shared_content">'.trim($share[3])."</blockquote>\n";
+                       $text .= "<div>\n";
                        break;
        }
        return($text);
@@ -809,7 +812,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
                $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
                        '$1<span class="vcard"><a href="$2" class="url" title="$3"><span class="fn nickname mention">$3</span></a></span>',
                        $Text);
-
+       elseif (!$simplehtml)
+               $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
+                       '$1<a href="$2" class="userinfo mention" title="$3">$3</a>',
+                       $Text);
 
        // Bookmarks in red - will be converted to bookmarks in friendica
        $Text = preg_replace("/#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '[bookmark=$1]$1[/bookmark]', $Text);
@@ -851,6 +857,9 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        if ($tryoembed)
                $Text = preg_replace_callback("/\[url\]([$URLSearchString]*)\[\/url\]/ism",'tryoembed',$Text);
 
+       $Text = preg_replace("/([#])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
+                               '$1<a href="$2" class="tag" title="$3">$3</a>', $Text);
+
        $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$1</a>', $Text);
        $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);
        //$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);