. * * @category Plugin * @package StatusNet * @author Evan Prodromou * @copyright 2011 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ if (!defined('STATUSNET')) { // This check helps protect against security problems; // your code file can't be executed directly from the web. exit(1); } /** * Put the site notice in the sidebar * * @category General * @package StatusNet * @author Evan Prodromou * @copyright 2011 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ class SiteNoticeInSidebarPlugin extends Plugin { /** * Function comment * * @param * * @return */ function onStartShowSiteNotice(Action $action) { return false; } function onStartShowSections(Action $action) { $text = common_config('site', 'notice'); if (!empty($text)) { $sns = new SiteNoticeSection($action, $text); $sns->show(); } return true; } function onEndShowStyles(Action $action) { $action->element('style', null, '#site_notice { width: 100% }'); return true; } }