]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/public.php
Merge branch 'adrianlang-827' of git://gitorious.org/laconica/adrianlang-clone into...
[quix0rs-gnu-social.git] / actions / public.php
index 9b22e0a2ceefe1ff991453cc4e37abab12b6a559..b7b7fc6b767913e043cf7dea9a8d3e02ea169551 100644 (file)
@@ -166,6 +166,33 @@ class PublicAction extends Action
         $nav->show();
     }
 
+    function showPageNotice()
+    {
+        $notice = new Notice;
+
+        if (!$notice) {
+            $this->serverError(_('Could not retrieve public stream.'));
+            return;
+        }
+
+        if ($notice->count()) {
+            return;
+        }
+
+        $message = _('This is the public timeline for %%site.name%% but no one has posted anything yet.') . ' ';
+
+        if (common_logged_in()) {
+            $message .= _('Be the first to post!');
+        }
+        else {
+            $message .= _('Why not [register an account](%%action.register%%) and be the first to post!');
+        }
+
+        $this->elementStart('div', 'guide');
+        $this->raw(common_markup_to_html($message));
+        $this->elementEnd('div');
+    }
+
     /**
      * Fill the content area
      *