]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
use gravatar for default avatars
[friendica.git] / mod / item.php
index d960b6b1f44da15dabd2a14b5cc769ade2f97f73..430500f99876906ef5d4fe1d48d05f31c3748e44 100644 (file)
@@ -121,6 +121,11 @@ function item_post(&$a) {
 
        if(count($tags)) {
                foreach($tags as $tag) {
+                       if(strpos($tag,'#') === 0) {
+                               $basetag = substr($tag,1);
+                               $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . urlencode($basetag) . ']' . $basetag . '[/url]',$body);
+                               continue;
+                       }
                        if(strpos($tag,'@') === 0) {
                                $name = substr($tag,1);
                                if((strpos($name,'@')) || (strpos($name,'http://'))) {
@@ -155,6 +160,7 @@ function item_post(&$a) {
                                        }
                                        if(count($r)) {
                                                $profile = $r[0]['url'];
+                                               $newname = $r[0]['name'];
                                                if(strlen($inform))
                                                        $inform .= ',';
                                                $inform .= 'cid:' . $r[0]['id'];
@@ -251,6 +257,7 @@ function item_post(&$a) {
                                        '$username' => $user['username'],
                                        '$email' => $user['email'],
                                        '$from' => $from,
+                                       '$display' => $a->get_baseurl() . '/display/' . $post_id,
                                        '$body' => strip_tags(bbcode($body))
                                ));
 
@@ -273,6 +280,7 @@ function item_post(&$a) {
                                        '$username' => $user['username'],
                                        '$email' => $user['email'],
                                        '$from' => $from,
+                                       '$display' => $a->get_baseurl() . '/display/' . $post_id,
                                        '$body' => strip_tags(bbcode($body))
                                ));