]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/public.php
Added filler text to popular page for when it's empty, encouraging user to add favori...
[quix0rs-gnu-social.git] / actions / public.php
index 9b22e0a2ceefe1ff991453cc4e37abab12b6a559..5a2720a9ad919cdbb8442e3832c1c470908d5be2 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 noone 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', 'blankfiller');
+        $this->raw(common_markup_to_html($message));
+        $this->elementEnd('div');
+    }
+
     /**
      * Fill the content area
      *