]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
Merge branch 'uiredesign' of ../evan into uiredesign
[quix0rs-gnu-social.git] / lib / action.php
index d5eb6de2d5eff0cd231d1e513e350eb265cd8310..33b138905474c68590736dad67400b3383f059ff 100644 (file)
@@ -208,7 +208,11 @@ class Action extends HTMLOutputter // lawsuit
         $this->showLogo();
         $this->showPrimaryNav();
         $this->showSiteNotice();
-        $this->showNoticeForm();
+       if (common_logged_in()) {
+           $this->showNoticeForm();
+       } else {
+           $this->showAnonymousMessage();
+       }
         $this->elementEnd('div');
     }
 
@@ -285,9 +289,14 @@ class Action extends HTMLOutputter // lawsuit
         $notice_form->show();
     }
 
+    function showAnonymousMessage()
+    {
+       // needs to be defined by the class
+    }
+    
     function showCore()
     {
-        $this->elementStart('div', array('class' => 'core'));
+        $this->elementStart('div', array('id' => 'core'));
         $this->showLocalNav();
         $this->showContentBlock();
         $this->showAside();
@@ -305,43 +314,48 @@ class Action extends HTMLOutputter // lawsuit
     {
         $this->elementStart('div', array('id' => 'content'));
         $this->showPageTitle();
-        $this->showPageNotice();
+        $this->showPageNoticeBlock();
+        $this->elementStart('div', array('id' => 'content_inner'));
+        // show the actual content (forms, lists, whatever)
         $this->showContent();
         $this->elementEnd('div');
+        $this->elementEnd('div');
     }
 
     function showPageTitle() {
         $this->element('h1', NULL, $this->title());
     }
 
+    function showPageNoticeBlock()
+    {
+       $this->elementStart('dl', array('id' => 'page_notice',
+                                       'class' => 'system_notice'));
+       $this->element('dt', null, _('Page notice'));
+       $this->elementStart('dd', null);
+       $this->showPageNotice();
+       $this->elementEnd('dd');
+       $this->elementEnd('dl');
+       }
+
     // SHOULD overload (unless there's not a notice)
 
     function showPageNotice()
     {
-        $this->elementStart('dl', array('id' => 'page_notice',
-                                        'class' => 'system_notice'));
-        $this->element('dt', null, _('Page notice'));
-        $this->elementStart('dd', null);
-        // Output a bunch of paragraphs here
-        $this->elementEnd('dd');
-        $this->elementEnd('dl');
     }
-
+    
     // MUST overload
 
     function showContent()
     {
-        // show the actual content (forms, lists, whatever)
-        $this->elementStart('div', array('id' => 'content_inner'));
-        $this->elementEnd('div');
     }
 
     function showAside()
     {
-       $this->elementStart('div', 'aside');
+        $this->elementStart('div', array('id' => 'aside_primary',
+                                         'class' => 'aside'));
         $this->showExportData();
         $this->showSections();
-       $this->elementEnd('div');
+        $this->elementEnd('div');
     }
 
     // MAY overload if there are feeds
@@ -422,13 +436,13 @@ class Action extends HTMLOutputter // lawsuit
         $this->text(_('Unless otherwise specified, contents of this site are copyright by the contributors and available under the '));
         $this->element('a', array('class' => 'license',
                                   'rel' => 'external license',
-                                  'href' => $config['license']['url']),
-                       $config['license']['title']);
+                                  'href' => common_config('license', 'url')),
+                       common_config('license', 'title'));
         $this->text(_('. Contributors should be attributed by full name or nickname.'));
         $this->elementEnd('p');
         $this->element('img', array('id' => 'license_cc',
-                                    'src' => $config['license']['image'],
-                                    'alt' => $config['license']['title']));
+                                    'src' => common_config('license', 'image'),
+                                    'alt' => common_config('license', 'title')));
         $this->elementEnd('dd');
     }
 
@@ -514,14 +528,14 @@ class Action extends HTMLOutputter // lawsuit
         }
     }
 
-    function server_error($msg, $code=500)
+    function serverError($msg, $code=500)
     {
         $action = $this->trimmed('action');
         common_debug("Server error '$code' on '$action': $msg", __FILE__);
         common_server_error($msg, $code);
     }
 
-    function client_error($msg, $code=400)
+    function clientError($msg, $code=400)
     {
         $action = $this->trimmed('action');
         common_debug("User error '$code' on '$action': $msg", __FILE__);