stop an onAfterDisplayContent from triggering
Posted: Wed Nov 07, 2007 4:20 pm
Hi,, I have a mambot which is set as 'onAfterDisplayContent'
before I have coded 'onPrepareContent' mambots and have escaped them by using
this replaces the {mambot off} call with blanks and exits.
however I dont seem to be able to apply the above to the onAfterDisplayContent mambot. If I try It does escape (stop) the mambot but does not replace the mambot call with blanks, I also get an annoying number 1 appear later in the output.
can anyone tell me how I might get an onAfterDisplayContent mambot to abort if a mambot regex like (mambot off} is found in the content item.
Thanks
Lee
before I have coded 'onPrepareContent' mambots and have escaped them by using
Code: Select all
if ( strpos( $row->text, "{mambot off}" ) ) {
$row->text = str_replace( "{mambot off}", '', $row->text );
return true;
}
this replaces the {mambot off} call with blanks and exits.
however I dont seem to be able to apply the above to the onAfterDisplayContent mambot. If I try It does escape (stop) the mambot but does not replace the mambot call with blanks, I also get an annoying number 1 appear later in the output.
can anyone tell me how I might get an onAfterDisplayContent mambot to abort if a mambot regex like (mambot off} is found in the content item.
Thanks
Lee