summaryrefslogtreecommitdiff
path: root/actions/public.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-04-03 13:24:01 -0700
committerZach Copley <zach@controlyourself.ca>2009-04-03 13:24:01 -0700
commit590cc0c9a41206ba58c9333b4e9ef8931285f7e4 (patch)
tree6b6457534c26890e4d5912bc1afeabd63cf9c0c7 /actions/public.php
parentab2946047cd08c6b66cbc57410fa8a99430530f6 (diff)
parent81c72956a615eee04cf3770b4e197dd7fe563357 (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'actions/public.php')
-rw-r--r--actions/public.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/actions/public.php b/actions/public.php
index 9b22e0a2c..fca90488f 100644
--- a/actions/public.php
+++ b/actions/public.php
@@ -166,6 +166,34 @@ class PublicAction extends Action
$nav->show();
}
+ function showPageNotice()
+ {
+ $notice = Notice::publicStream(0, 1);
+
+ if (!$notice) {
+ $this->serverError(_('Could not retrieve public stream.'));
+ return;
+ }
+
+ // no notices in the public stream, let's get out of here
+ 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
*