Vesthelm Engine

2.1.4 User Guide

BBCode Class

BBCode Class provides functions to parse BB codes to HTML.

Calling the BBCode Class

$BBCode = $this->BBCode;

Parse BB Codes

$html = $this->BBCode->parse('[b]Bold text[/b]');

echo $html; //output: <b>Bold text</b>

Adding Smileys

Add to file bbcode_smileys.php

$smileys[':smiley:'] = 'smiley.png';

after array $smileys

:smiley: - text replaced with smiley.

smiley.png - image filename.

Add smiley.png to directory uploads/emoticons/