/*
* @based based on Seb's BB-Code-Parser script by seb
* @url http://www.traum-projekt.com/forum/54-traum-scripts/25292-sebs-bb-code-parser.html
*/
public static function bbCodeReplace($string, $currentString = '')
{
while ($currentString != $string) {
$currentString = $string;
$string = preg_replace_callback('{\\[(\\w+)((=)(.+)|())\\]((.|\\n)*)\\[/\\1\\]}U', array('PhocaGalleryComment', 'bbCodeCallback'), $string);
}
return $string;
}