X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=banana%2Fpage.inc.php;h=dcdfb67b1d0c2e30e4a6b47f28ce3395d7a90f18;hb=b10e281321dcc27740f64a6a384e295d5c8d3394;hp=d0d67b618e0504577d4ec2ba45e6faec1307cccf;hpb=8bfa4595f72d796e19c1e7e8829c02f4b67e9cde;p=banana.git diff --git a/banana/page.inc.php b/banana/page.inc.php index d0d67b6..dcdfb67 100644 --- a/banana/page.inc.php +++ b/banana/page.inc.php @@ -18,13 +18,15 @@ class BananaPage extends Smarty private $killed = array(); private $actions = array(); + public $css = ''; + public function __construct() { $this->Smarty(); $this->compile_check = Banana::$debug_smarty; $this->template_dir = dirname(__FILE__) . '/templates/'; - $this->compile_dir = dirname(dirname(__FILE__)) . '/spool/templates_c/'; + $this->compile_dir = Banana::$spool_root . '/templates_c/'; $this->register_prefilter('banana_trimwhitespace'); } @@ -88,6 +90,14 @@ class BananaPage extends Smarty $this->killed[] = $page; } + /** Add Inline CSS to put in the page headers + * @param css CSS code + */ + public function addCssInline($css) + { + $this->css .= $css; + } + /** Preparte the page generation * @return template to use */ @@ -140,6 +150,8 @@ class BananaPage extends Smarty $this->assign('spool', Banana::$spool); $this->assign('protocole', Banana::$protocole); $this->assign('showboxlist', Banana::$spool_boxlist); + $this->assign('showthread', Banana::$msgshow_withthread); + $this->assign('withtabs' , Banana::$withtabs); $this->register_function('url', array($this, 'makeUrl')); $this->register_function('link', array($this, 'makeLink'));