aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-08 22:39:03 -0800
committerFriendika <info@friendika.com>2010-11-08 22:39:03 -0800
commit098478e3a59b9283dea2591807d99c24ea6f8837 (patch)
treed0a0ee671f322092f060ad5a6e9b076d8181a266 /mod/item.php
parent9f606be54093b934081eb32f6d1a66f4d9fa9268 (diff)
downloadvolse-hubzilla-098478e3a59b9283dea2591807d99c24ea6f8837.tar.gz
volse-hubzilla-098478e3a59b9283dea2591807d99c24ea6f8837.tar.bz2
volse-hubzilla-098478e3a59b9283dea2591807d99c24ea6f8837.zip
linkify hash tags
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/mod/item.php b/mod/item.php
index 75822936a..430500f99 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -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://'))) {