hijack the #getzot tag
This commit is contained in:
parent
b7854c89b1
commit
87e4f50eda
10
mod/item.php
10
mod/item.php
@ -799,6 +799,14 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) {
|
|||||||
if(strpos($tag,'[zrl='))
|
if(strpos($tag,'[zrl='))
|
||||||
//...do nothing
|
//...do nothing
|
||||||
return $replaced;
|
return $replaced;
|
||||||
|
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
|
//base tag has the tags name only
|
||||||
$basetag = str_replace('_',' ',substr($tag,1));
|
$basetag = str_replace('_',' ',substr($tag,1));
|
||||||
//create text for link
|
//create text for link
|
||||||
@ -807,7 +815,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) {
|
|||||||
//replace tag by the link
|
//replace tag by the link
|
||||||
$body = str_replace($tag, $newtag, $body);
|
$body = str_replace($tag, $newtag, $body);
|
||||||
$replaced = true;
|
$replaced = true;
|
||||||
|
}
|
||||||
//is the link already in str_tags?
|
//is the link already in str_tags?
|
||||||
if(! stristr($str_tags,$newtag)) {
|
if(! stristr($str_tags,$newtag)) {
|
||||||
//append or set str_tags
|
//append or set str_tags
|
||||||
|
Reference in New Issue
Block a user