Contents

BBCode::Internal_DumpStack( $array = false,  $raw = false )

Description

Source

File: bp-forums/admin/parser.php

1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
function Internal_DumpStack($array = false, $raw = false) {
if (!$raw) $string = "<span style='color: #00C;'>";
else $string = "";
if ($array === false)
$array = $this->stack;
foreach ($array as $item) {
switch (@$item[BBCODE_STACK_TOKEN]) {
case BBCODE_TEXT:
$string .= "\"" . htmlspecialchars(@$item[BBCODE_STACK_TEXT]) . "\" ";
break;
case BBCODE_WS:
$string .= "WS ";
break;
case BBCODE_NL:
$string .= "NL ";
break;
case BBCODE_TAG:
$string .= "[" . htmlspecialchars(@$item[BBCODE_STACK_TAG]['_name']) . "] ";
break;
default:
$string .= "unknown ";
break;
}
}
if (!$raw) $string .= "</span>";
return $string;
}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.