summaryrefslogtreecommitdiffstats
path: root/templates/bbcode.inc.php
blob: 8a41d4629b1ab0a9062e9ecafe5401d38464541c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?PHP
  require_once('code/message.inc.php');
  require_once('code/modules.inc.php');
  
  require_mod('code/bbcode.inc.php');
  
  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;
?>