aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-06-15 02:31:34 -0700
committerfriendica <info@friendica.com>2013-06-15 02:31:34 -0700
commit87e4f50edab4e32a6191cd1fa5c1ee9f5dba791e (patch)
treec09eefbb4bb95dfc5fe6915adff8531c9bd60893 /mod/item.php
parentb7854c89b1e568353ddfa576fc9baec432eff7c0 (diff)
downloadvolse-hubzilla-87e4f50edab4e32a6191cd1fa5c1ee9f5dba791e.tar.gz
volse-hubzilla-87e4f50edab4e32a6191cd1fa5c1ee9f5dba791e.tar.bz2
volse-hubzilla-87e4f50edab4e32a6191cd1fa5c1ee9f5dba791e.zip
hijack the #getzot tag
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php26
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