' . substr($part, 5);
$tags = '[/code]' . $tags;
}
elseif(substr($part, 0, 4) == 'url]') {
$tmpok = '
' . substr($part, 4) . '';
$tmpnok = $part;
$tmpend = '/url]';
}
elseif(substr($part, 0, 4) == 'url=') {
$l = strcspn(substr($part, 4), '[] ');
if($part[$l+4] == ']') {
$out .= '
' . substr($part, $l+5);
$tags = '[/url]' . $tags;
}
else $out .= '[' . $part;
}
elseif(substr($part, 0, 6) == 'email]') {
$tmpok = '' . substr($part, 6) . '';
$tmpnok = $part;
$tmpend = '/email]';
}
elseif(substr($part, 0, 6) == 'email=') {
$l = strcspn(substr($part, 6), '[] ');
if($part[$l+6] == ']') {
$out .= '
' . substr($part, $l+7);
$tags = '[/email]' . $tags;
}
else $out .= '[' . $part;
}
elseif(substr($part, 0, 4) == 'img]') {
$tmpok = '';
$tmpnok = $part;
$tmpend = '/img]';
}
elseif(substr($part, 0, 5) == 'list]') {
$tmpok = substr($part, 5) . '- ';
$tmpnok = $part;
$tmptag = '[/list]';
$tmpend = '*]';
$tmplist = 'u';
}
elseif(substr($part, 0, 7) == 'list=1]') {
$tmpok = substr($part, 7) . '
- ';
$tmpnok = $part;
$tmptag = '[/list]';
$tmpend = '*]';
$tmplist = 'o';
}
elseif(substr($part, 0, 7) == 'list=a]') {
$tmpok = substr($part, 7) . '
- ';
$tmpnok = $part;
$tmptag = '[/list]';
$tmpend = '*]';
$tmplist = 'o';
}
elseif(substr($part, 0, 2) == '*]') {
if(substr($tags, 0, 7) == '[/list]') $out .= '
- ' . substr($part, 2);
else $out .= '[' . $part;
}
elseif($tl && substr($part, 0, $tl) == substr($tags, 1, $tl)) {
$tags = substr($tags, $tl+1);
switch(substr($part, 1, $tl-2)) {
case 'b':
case 'i':
case 'u':
case 'size':
case 'color':
$out .= '';
break;
case 'url':
case 'email':
$out .= '
';
break;
case 'code':
$out .= '