From e1fec6db2fdc9c28878c8f87bd5b55d1b1e5e1fa Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Fri, 3 Apr 2009 20:34:27 +0000 Subject: Simplified code for empty public timeline. --- actions/public.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/actions/public.php b/actions/public.php index fca90488f..5a2720a9a 100644 --- a/actions/public.php +++ b/actions/public.php @@ -168,14 +168,13 @@ class PublicAction extends Action function showPageNotice() { - $notice = Notice::publicStream(0, 1); + $notice = new Notice; 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; } -- cgit v1.2.3-54-g00ecf From 96982477220316ee7af0326dc6ff42d2438b540e Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Fri, 3 Apr 2009 20:35:18 +0000 Subject: Added filler text to popular page for when it's empty, encouraging user to add favorites and/or register. --- actions/favorited.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/actions/favorited.php b/actions/favorited.php index 231b97897..20a354674 100644 --- a/actions/favorited.php +++ b/actions/favorited.php @@ -143,6 +143,25 @@ class FavoritedAction extends Action $this->elementStart('div', 'instructions'); $this->raw($output); $this->elementEnd('div'); + + $favorite = new Fave; + + if ($favorite->count()) { + return; + } + + $message = _('Favorite notices appear on this page but noone has favorited one yet.') . ' '; + + if (common_logged_in()) { + $message .= _('Be the first to add a notice to your favorites by clicking the fave button next to any notice you like.'); + } + else { + $message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!'); + } + + $this->elementStart('div', 'blankfiller'); + $this->raw(common_markup_to_html($message)); + $this->elementEnd('div'); } /** -- cgit v1.2.3-54-g00ecf From 439d521c86e07fc7bc0c84e62022fc160f8f0fcf Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Fri, 3 Apr 2009 20:37:29 +0000 Subject: Tiny change to the public tag cloud dealing with empty page. --- actions/publictagcloud.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/publictagcloud.php b/actions/publictagcloud.php index 5322372b2..5bc7e0cbf 100644 --- a/actions/publictagcloud.php +++ b/actions/publictagcloud.php @@ -63,7 +63,7 @@ class PublictagcloudAction extends Action sprintf(_('These are most popular recent tags on %s '), common_config('site', 'name'))); - $tags = new Notice_tag(); + $tags = new Notice_tag; if ($tags->count()) { return; } -- cgit v1.2.3-54-g00ecf