[What] [is] [this]?
The utility class, tagreplacer provides a simple method to set up a conversion function to change text formatted with [ ] tags to html for display.
The class bbtags is an example of an implementation of the tagreplacer. To get an example of how it works, post a message in my guestbook, using any of these tags:
[b]bold[/b], [i]italic[/i], [u]underline[/u]
[url=http://www.yourwebsite.com]The name of your website[/url]
or just: [url]http://www.yourwebsite.com[/url]
Or quote someone else with [quote=who said it]I said it![/quote]
if you use [email=you@yourdomain.com]your name here[/email] then people can contact you.
bold, italic, underline
The name of your website
or just: http://www.yourwebsite.com
Or quote someone else with Quote from who said it:I said it!
if you use your name here then people can contact you.
Oh, and see what happens if you put some code between some php tags.
Example:
<?php
$text = "[b]Hello World[/b]"; // or from your weblog, guestbook etc
$bb = new bbtags;
echo $bb->replace($text);
?>
Output:Hello World
Have a look at the bbtags class to understand how to add custom tags.
Ask in the support forum if you need help.
|