aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-17 14:56:41 -0800
committerFriendika <info@friendika.com>2010-11-17 14:56:41 -0800
commit56ccf0920a48ba0c4ed2d12a0ab2c8c850ef9d24 (patch)
tree9c48ad24312532b4ae44d43f9a125a36f724cf60 /mod/item.php
parent5e6e92a10bbca8e2beb44b4d2aa0ae772eb56295 (diff)
downloadvolse-hubzilla-56ccf0920a48ba0c4ed2d12a0ab2c8c850ef9d24.tar.gz
volse-hubzilla-56ccf0920a48ba0c4ed2d12a0ab2c8c850ef9d24.tar.bz2
volse-hubzilla-56ccf0920a48ba0c4ed2d12a0ab2c8c850ef9d24.zip
add linked hashtags to item tag
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/item.php b/mod/item.php
index 430500f99..4b95f2d9b 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -124,6 +124,9 @@ function item_post(&$a) {
if(strpos($tag,'#') === 0) {
$basetag = substr($tag,1);
$body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . urlencode($basetag) . ']' . $basetag . '[/url]',$body);
+ if(strlen($str_tags))
+ $str_tags .= ',';
+ $str_tags .= '#[url=' . $a->get_baseurl() . '/search?search=' . urlencode($basetag) . ']' . $basetag . '[/url]';
continue;
}
if(strpos($tag,'@') === 0) {
@@ -168,9 +171,9 @@ function item_post(&$a) {
}
if($profile) {
$body = str_replace($name,'[url=' . $profile . ']' . $newname . '[/url]', $body);
+ $profile = str_replace(',','%2c',$profile);
if(strlen($str_tags))
$str_tags .= ',';
- $profile = str_replace(',','%2c',$profile);
$str_tags .= '@[url=' . $profile . ']' . $newname . '[/url]';
}
}