From ae81d361374641ce5cd73b353fae613711e145fe Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 30 Jul 2009 16:24:04 -0400 Subject: Site-wide design configuration I added some code so that the site-wide design can be set, using the configuration interface. I also moved the configuration option from $config['site']['design']['background'] to just $config['design']['background'], but the old syntax will still work. --- lib/action.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'lib/action.php') diff --git a/lib/action.php b/lib/action.php index 95ee10c64..a5244371a 100644 --- a/lib/action.php +++ b/lib/action.php @@ -191,6 +191,7 @@ class Action extends HTMLOutputter // lawsuit function showStylesheets() { if (Event::handle('StartShowStyles', array($this))) { + if (Event::handle('StartShowLaconicaStyles', array($this))) { $this->element('link', array('rel' => 'stylesheet', 'type' => 'text/css', @@ -209,6 +210,7 @@ class Action extends HTMLOutputter // lawsuit 'media' => 'print')); Event::handle('EndShowLaconicaStyles', array($this)); } + if (Event::handle('StartShowUAStyles', array($this))) { $this->comment('[if IE]>viewdesigns) { + $design = $this->getDesign(); + + if (!empty($design)) { + $design->showCSS($this); + } + } + + Event::handle('EndShowDesign', array($this)); + } Event::handle('EndShowStyles', array($this)); } } @@ -1074,4 +1091,15 @@ class Action extends HTMLOutputter // lawsuit { return null; } + + /** + * A design for this action + * + * @return Design a design object to use + */ + + function getDesign() + { + return Design::siteDesign(); + } } -- cgit v1.2.3-54-g00ecf