diff options
author | Robin Millette <millette@controlyourself.ca> | 2009-03-30 21:07:48 +0000 |
---|---|---|
committer | Robin Millette <millette@controlyourself.ca> | 2009-03-30 21:07:48 +0000 |
commit | 3861e348a4b4f00f3c0dcc5ba004e7dd80296078 (patch) | |
tree | 9e9a9214302950ba6aee535b56d167fb388526c5 /actions/public.php | |
parent | d5032a02774fcf2f01d92aa1c5ac182c9f2b618a (diff) |
added filler text to public timeline for when it's empty, encouraging user to post and/or register.
Diffstat (limited to 'actions/public.php')
-rw-r--r-- | actions/public.php | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/actions/public.php b/actions/public.php index 9b22e0a2c..96c766a57 100644 --- a/actions/public.php +++ b/actions/public.php @@ -166,6 +166,50 @@ 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!'); +/* + sprintf(_('You are logged in... %%%%site.name%%%% groups let you find and talk with ' . + 'people of similar interests. After you join a group ' . + 'you can send messages to all other members using the ' . + 'syntax "!groupname". Don\'t see a group you like? Try ' . + '[searching for one](%%%%action.groupsearch%%%%) or ' . + '[start your own!](%%%%action.newgroup%%%%)')); +*/ + } + else { + $message .= _('Why not [register an account](%%action.register%%) and be the first to post!'); +/* + sprintf(_('You are not logged in... %%%%site.name%%%% groups let you find and talk with ' . + 'people of similar interests. After you join a group ' . + 'you can send messages to all other members using the ' . + 'syntax "!groupname". Don\'t see a group you like? Try ' . + '[searching for one](%%%%action.groupsearch%%%%) or ' . + '[start your own!](%%%%action.newgroup%%%%)')); +*/ + } + + $this->elementStart('div', 'blankfiller'); + $this->raw(common_markup_to_html($message)); + $this->elementEnd('div'); + } + /** * Fill the content area * |