diff options
author | Thomas Willingham <founder@kakste.com> | 2013-06-16 14:59:17 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2013-06-16 14:59:17 +0100 |
commit | 33696cc8392daeb08d011aa3b1209f3b121898ea (patch) | |
tree | 466d48f5abc1a4ec1dbf83543471a8ac89428516 /mod/item.php | |
parent | 466a6d5227fbaf0a36cd76b5603cb42bb1b7462b (diff) | |
parent | c4c80a2e472173dfed9b982c6705ccfbb6e6cdab (diff) | |
download | volse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.tar.gz volse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.tar.bz2 volse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/item.php')
-rw-r--r-- | mod/item.php | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/mod/item.php b/mod/item.php index b09ee06f3..ed5941d2a 100644 --- a/mod/item.php +++ b/mod/item.php @@ -799,15 +799,23 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) { if(strpos($tag,'[zrl=')) //...do nothing return $replaced; - //base tag has the tags name only - $basetag = str_replace('_',' ',substr($tag,1)); - //create text for link - $url = $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag); - $newtag = '#[zrl=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/zrl]'; - //replace tag by the link - $body = str_replace($tag, $newtag, $body); - $replaced = true; - + if($tag == '#getzot') { + $basetag = 'getzot'; + $url = 'http://getzot.com'; + $newtag = '#[zrl=' . $url . ']' . $basetag . '[/zrl]'; + $body = str_replace($tag,$newtag,$body); + $replace = true; + } + else { + //base tag has the tags name only + $basetag = str_replace('_',' ',substr($tag,1)); + //create text for link + $url = $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag); + $newtag = '#[zrl=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/zrl]'; + //replace tag by the link + $body = str_replace($tag, $newtag, $body); + $replaced = true; + } //is the link already in str_tags? if(! stristr($str_tags,$newtag)) { //append or set str_tags |