diff --git a/pageheader.tgz b/pageheader.tgz new file mode 100644 index 000000000..2dfa6785e Binary files /dev/null and b/pageheader.tgz differ diff --git a/pageheader/README b/pageheader/README new file mode 100644 index 000000000..f9b1752b7 --- /dev/null +++ b/pageheader/README @@ -0,0 +1,5 @@ +Page Header + +For server admins only. +Displays a text message for system announcements' +The message is entered in the admin account at settings, Plugin settings. diff --git a/pageheader/pageheader.css b/pageheader/pageheader.css new file mode 100644 index 000000000..49232cfa5 --- /dev/null +++ b/pageheader/pageheader.css @@ -0,0 +1,21 @@ +#pageheader-label { + float: left; + width: 300px; + margin-top: 10px; +} + +#pageheader-words { + float: left; + margin-top: 10px; +} + +#pageheader-submit { + margin-top: 15px; +} + +.pageheader { + text-align: center; + width 100%; + margin-top: 25px; + font-size: 20px; +} diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php new file mode 100644 index 000000000..d9b187de3 --- /dev/null +++ b/pageheader/pageheader.php @@ -0,0 +1,78 @@ + + * + */ + +function pageheader_install() { + register_hook('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch'); + register_hook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings'); + register_hook('plugin_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post'); + +} + + +function pageheader_uninstall() { + unregister_hook('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch'); + unregister_hook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings'); + unregister_hook('plugin_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post'); + +} + + + + + +function pageheader_addon_settings(&$a,&$s) { + + + if(! is_site_admin()) + return; + + /* Add our stylesheet to the page so we can make our settings look nice */ + + $a->page['htmlhead'] .= '' . "\r\n"; + + + $words = get_config('pageheader','text'); + if(! $words) + $words = 'pageheader,'; + + $s .= '