Skip to content
Browse files

hide banner to read only users

  • Loading branch information...
1 parent 546b37f commit 2391ef60fd8fce312ac865e9c24ca6df580e6d7c @splitbrain splitbrain committed Dec 20, 2012
Showing with 10 additions and 4 deletions.
  1. +3 −0 action/banner.php
  2. +3 −2 conf/default.php
  3. +2 −1 conf/metadata.php
  4. +2 −1 lang/en/settings.php
View
3 action/banner.php
@@ -39,6 +39,9 @@ function handle_display_banner(&$event, $param) {
$meta['approval'] = array();
}
+ if($INFO['perm'] <= AUTH_READ && $this->getConf('hidereaderbanner')){
+ return;
+ }
$this->showBanner();
return;
View
5 conf/default.php
@@ -2,7 +2,8 @@
$conf['apr_namespaces'] = '';
$conf['number_of_approved'] = 1;
-$conf['hide drafts'] = false;
+$conf['hidereaderbanner'] = 0;
+$conf['hide drafts'] = 0;
$conf['author groups'] = '';
$conf['internal note'] = '';
-$conf['delete attic on first approve'] = 0;
+$conf['delete attic on first approve'] = 0;
View
3 conf/metadata.php
@@ -3,6 +3,7 @@
$meta['apr_namespaces'] = array('string');
$meta['number_of_approved'] = array('numeric', '_min' => 1);
$meta['hide drafts'] = array('onoff');
+$meta['hidereaderbanner'] = array('onoff');
$meta['author groups'] = array('string');
$meta['internal note'] = array('string');
-$meta['delete attic on first approve'] = array('onoff');
+$meta['delete attic on first approve'] = array('onoff');
View
3 lang/en/settings.php
@@ -2,7 +2,8 @@
$lang['apr_namespaces'] = 'Namespaces this plugin applies to.';
$lang['number_of_approved'] = 'Number of users needed to approve a page.';
+$lang['hidereaderbanner'] = 'Hide banner to read only users';
$lang['hide drafts'] = 'Hide drafts to read only users';
$lang['author groups'] = 'Groups that can see drafts (separate by blank)';
$lang['internal note'] = 'Note on unapproved pages';
-$conf['delete attic on first approve'] = 'Delete attic on first approve';
+$conf['delete attic on first approve'] = 'Delete attic on first approve';

0 comments on commit 2391ef6

Please sign in to comment.
Something went wrong with that request. Please try again.