diff --git a/parsers/BBCodeParser.php b/parsers/BBCodeParser.php new file mode 100644 index 000000000..c1554ac7d --- /dev/null +++ b/parsers/BBCodeParser.php @@ -0,0 +1,111 @@ + "Bold Text", + "Example" => "[b]Bold[/b]" + )), + new ArrayData(array( + "Title" => "Italic Text", + "Example" => "[i]Italics[/i]" + )), + new ArrayData(array( + "Title" => "Underlined Text", + "Example" => "[u]Underlined[/u]" + )), + new ArrayData(array( + "Title" => "Struck-out Text", + "Example" => "[s]Struck-out[/s]" + )), + + new ArrayData(array( + "Title" => "Website link", + "Description" => "Link to another website or URL", + "Example" => "[url]http://www.website.com/[/url]" + )), + new ArrayData(array( + "Title" => "Website link", + "Description" => "Link to another website or URL", + "Example" => "[url=http://www.website.com/]Some website[/url]" + )), + new ArrayData(array( + "Title" => "Email link", + "Description" => "Create link to an email address", + "Example" => "[email]you@yoursite.com[/email]" + )), + new ArrayData(array( + "Title" => "Email link", + "Description" => "Create link to an email address", + "Example" => "[email=you@yoursite.com]email me[/email]" + )), + + new ArrayData(array( + "Title" => "Image", + "Description" => "Show an image in your post", + "Example" => "[img]http://www.website.com/image.jpg[/img]" + )), + + new ArrayData(array( + "Title" => "Code Block", + "Description" => "Unformatted code block", + "Example" => "[code]Code block[/code]" + )), + new ArrayData(array( + "Title" => "HTML Code Block", + "Description" => "HTML-formatted code block", + "Example" => "[html]HTML code block[/html]" + )), + new ArrayData(array( + "Title" => "HTML Code Block", + "Description" => "HTML-formatted code block", + "Example" => "[code html]HTML code block[/code]" + )), + new ArrayData(array( + "Title" => "PHP Code Block", + "Description" => "PHP-formatted code block", + "Example" => "[php]PHP code block[/php]" + )), + new ArrayData(array( + "Title" => "PHP Code Block", + "Description" => "PHP-formatted code block", + "Example" => "[code php]PHP code block[/code]" + )) + + ); + } + + function useable_tagsHTML(){ + $useabletags = ""; + } + + + function parse() { + $this->content = str_replace(array('&', '<', '>'), array('&', '<', '>'), $this->content); + return HTML_BBCodeParser::staticQparse($this->content); + } + + +} +?> \ No newline at end of file