UBBCode: Replaces the ubb tags with HTML, and vice versa

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 72%Total: 2,563 All time: 1,483 This week: 331Up
Version License Categories
ubb 1.0GNU Lesser Genera...HTML, Text processing
Description Author

Replaces the UBB tags listed below with HTML tags, and vice versa.
Also keeps the line feeds in the text and removes all HTML tags.

UBB Tags:
[b]...[/b] bold
[i]...[/i] italic
[code]...[/code] source code
[img], [/img] images
[quote]...[/quote] blockquote
[url]http//www.link[/url] links
[url=http//www.link]name[/url] links
[email]me@home.de[/email] email link
[email=me@home.de]name[/email] email link

Additional Tags:
[u]...[/u] underline
[center]..[/center] center
[color=name]...[/color] colors

For a description of ubbcodes see: http://community.infopop.net/infopop/ubbcode.html

function encode($str)
function decode($str)
function strip($str)
function listCodes()

Picture of L
Name: L <contact>
Classes: 13 packages by
Country: Germany Germany
Age: 47
All time rank: 525 in Germany Germany
Week rank: 481 Down23 in Germany Germany Down

  Files folder image Files  
File Role Description
Accessible without login HTML file testUBBCode.html Output example output
Accessible without login Plain text file testUBBCode.php Example example
Accessible without login HTML file UBBCode.html Doc. phpdoc
Plain text file UBBCode.php Class main class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:1,483
This week:331Up
 User Ratings  
 All time
For more information send a message to info at phpclasses dot org.