Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.



This function will strip declared BBCodes and their content away from quoted messages.

[intro]The strip_bbcodes() function and $__BBCODE_NOT_QUOTABLE__ array were developed when a bug occurred with the [hide] BBCode. When one of admin wants to hide his message from common members, but wants to send something to other admins, he can put his message into [hide] bbcode. All was fine, but when message was quoted, using the quote feature in the forum, everything appeared and could be read from the quoted text.[/intro]

So if any of bbcode puts itself to the $__BBCODE_NOT_QUOTABLE__ array it will be stripped.

If some_bbcode must be hidden it is declare in some_bbcode_include_var.php => $__BBCODE_NOT_QUOTABLE__[] = "some_bbcode"; then will be auto-stripped by strip_bbcodes() function from quoted message in the forum.


 // The [hidden] BBCode has added it self to the
 // $__BBCODE_NOT_QUOTABLE__ array and will be
 // stripped from the text containing BBCodes
 $text = "This is a text with some bold text
 and a link.
 But we have some [hidden]this text is hidden[/hidden] hidden text.";
 echo strip_bbcodes($text);


The string of text containing bbcodes which will be checked and returned stripped.

See also …