12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- if (!defined('STATUSNET')) {
-
-
- exit(1);
- }
- class SiteNoticeInSidebarPlugin extends Plugin
- {
-
- function onStartShowSiteNotice($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->element('style', null, '#site_notice { width: 100% }');
- return true;
- }
- }
|