Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: burzum - marraskuu 12, 2005, 05:13:13 AP

Otsikko: Parse BBCode outside of the forum?
Kirjoitti: burzum - marraskuu 12, 2005, 05:13:13 AP
Hello,

i want to display some postings as news outside of the forum. My problem is now that the messages are stored as plain BBCode in the database. I'm to lazy to rewrite my own parser to fit ALL the bbcode from SMF.

My question is now which file i have to include from the forum to access the parser (cant find it) and how do i parse the messagedata?
Otsikko: Re: Parse BBCode outside of the forum?
Kirjoitti: Trekkie101 - marraskuu 12, 2005, 06:04:52 AP
http://mods.simplemachines.org/index.php?mod=18

This mod when used to pull messages, will parse the BBCode aswell, if you look it's code youll also see the parsebbc code.

$row['body'] = doUBBC($row['body'], $row['smileysEnabled']);
Otsikko: Re: Parse BBCode outside of the forum?
Kirjoitti: burzum - marraskuu 12, 2005, 06:46:52 AP
Works!
$message   = doUBBC($row->body);

Thank you :)