No HTML, mabey BBCode!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

No HTML, mabey BBCode!

Post by Joe »

I was curious if anyone knew any references to tutorials on BBCode in php. I have barred tags so no-one can use html but I wish for people to use bold, italic, and line break tags.

Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

check evilwalrus.com there's a few bbcode scripts there.. :)
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

regEx

str_replace

simple example of a effective regEx:

preg_match('/:\)(?!\))/')

this would locate a :) but not a :)) and so on.
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

posted my bbcode-formatting code on some topic, search this forum for BBCode and you'll probably find it ;)
Post Reply