summaryrefslogtreecommitdiffstats
path: root/templates/bbcode.inc.php
blob: e5de9ce5c8be769e25dace4b779fdd7b818d63a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?PHP
  Uses('message', 'bbcode');
  
  class bbcode_template {
    function Get($data) {
      if($data['title'])
        $title = htmlspecialchars($data['title']);
      else
        $title = strtr($data['_page'], array(':' => ' - '));
      $content = '<h2>' . $title . '</h2>' . $GLOBALS['bbcode']->Parse($data['code']);
      
      return array('title' => $title, 'content' => $content);
    }
  }
  
  $GLOBALS['templates']['bbcode'] = new bbcode_template;
?>