BBCodeLibrary::DoList( $bbcode, $action, $name, $default, $params, $content )
Description
Source
File: bp-forums/admin/parser.php
function DoList($bbcode, $action, $name, $default, $params, $content) { $list_styles = Array( '1' => 'decimal', '01' => 'decimal-leading-zero', 'i' => 'lower-roman', 'I' => 'upper-roman', 'a' => 'lower-alpha', 'A' => 'upper-alpha', ); $ci_list_styles = Array( 'circle' => 'circle', 'disc' => 'disc', 'square' => 'square', 'greek' => 'lower-greek', 'armenian' => 'armenian', 'georgian' => 'georgian', ); $ul_types = Array( 'circle' => 'circle', 'disc' => 'disc', 'square' => 'square', ); $default = trim($default); if ($action == BBCODE_CHECK) { if (!is_string($default) || strlen($default) == "") return true; else if (isset($list_styles[$default])) return true; else if (isset($ci_list_styles[strtolower($default)])) return true; else return false; } if (!is_string($default) || strlen($default) == "") { $elem = 'ul'; $type = ''; } else if ($default == '1') { $elem = 'ol'; $type = ''; } else if (isset($list_styles[$default])) { $elem = 'ol'; $type = $list_styles[$default]; } else { $default = strtolower($default); if (isset($ul_types[$default])) { $elem = 'ul'; $type = $ul_types[$default]; } else if (isset($ci_list_styles[$default])) { $elem = 'ol'; $type = $ci_list_styles[$default]; } } if (strlen($type)) return "\n<$elem class=\"bbcode_list\" style=\"list-style-type:$type\">\n$content</$elem>\n"; else return "\n<$elem class=\"bbcode_list\">\n$content</$elem>\n"; }
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.