|
|
More with bbcode By Jonathan Street [b]Bold![/b][u]underline[/u][i]italic[/i][s]strikethrough[/s] Normal[sub]subscript[/sub][sup]superscript[/sup] [color=red]Red[/color][size=16]Size 16[/size] [font=verdana]different font[/font][align=right]right[/align] [quote=Me]some great idea[/quote][code][/code] [url]http://www.iceteks.com[/url] [url= http://www.iceteks.com]Chilly[/url] [email]me@somesite.com[/email] [email=me@somesite.com]send me an email[/email] [ulist] [*]one [*]two [/ulist] [list] [*]first [*]second [/list] [list=1] [*]ordered numbered 1 [*]ordered numbered 2 [/list] [list=i] [*]ordered style i [*]ordered style ii [/list] [list=I] [*]ordered style I [*]ordered style II [/list] [list=1 s=10] [*]numbered but not starting at 1 [*]numbered but not starting at 1 [/list] Nested lists are also possible but hopefully that little sample should give you a feel for the capabilities of the package. Handling bbcode doesn’t need to end with the filters bundled in with the package, extending it is relatively easy but I hope you now feel comfortable with what HTML_BBCodeParser has to offer. BBcode is not the only way your users can submit formatted content. If you want to give your users more choice you may have better luck with a different package available via the PEAR site. The Text_Wiki package and its associated packages allow several different forms of mark-up to be used as well as BBcode. Alternatively if you want to avoid transforming your users’ content from one format into (X)HTML you could just allow them to post in HTML. There are dangers in this and steps would have to be taken to prevent malicious code being displayed on your site but it does give your users far greater power in creating their content. If you do go down this route you may like to make available one of the javascript based WYSIWYG editors which have become more commonplace recently. TinyMCE seems popular but is by no means the only option. However you decide to allow your users to submit their own formatted content take a look at what is already available. This is an issue which is facing many webmasters and application developers and as such many of the options have already been investigated. Don’t re-invent the wheel unless you have to. If you're interested in giving Text_Wiki a try you may like to check my Web application blog over the coming weeks as I intend to give it a try and will no doubt be posting about my experiences.
|
![]() |
This site best viewed in a W3C standard browser at 800*600 or higher Site design by Red Squirrel | Contact © Copyright 2012 Ryan Auclair/IceTeks, All rights reserved |