From 3d8a8aa03c7672966006aa0b7be5da699decbcb3 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 19 Mar 2009 11:36:24 -0400 Subject: redirect to original URL or URI for remote notices --- actions/shownotice.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'actions') diff --git a/actions/shownotice.php b/actions/shownotice.php index d5f35cd84..ccae49bb3 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -177,10 +177,17 @@ class ShownoticeAction extends Action { parent::handle($args); - $this->showPage(); + if ($this->notice->is_local == 0) { + if (!empty($this->notice->url)) { + common_redirect($this->notice->url, 301); + } else if (!empty($this->notice->uri) && preg_match('/^https?:/', $this->notice->uri)) { + common_redirect($this->notice->uri, 301); + } + } else { + $this->showPage(); + } } - /** * Don't show local navigation * @@ -191,7 +198,6 @@ class ShownoticeAction extends Action { } - /** * Fill the content area of the page * @@ -208,8 +214,6 @@ class ShownoticeAction extends Action $this->elementEnd('ul'); } - - /** * Don't show page notice * @@ -220,7 +224,6 @@ class ShownoticeAction extends Action { } - /** * Don't show aside * @@ -230,7 +233,6 @@ class ShownoticeAction extends Action function showAside() { } - /** * Extra content * -- cgit v1.2.3-54-g00ecf From 0e1186dfd0e96a64688c107f28a93b1ef172f56a Mon Sep 17 00:00:00 2001 From: CiaranG Date: Thu, 19 Mar 2009 18:08:49 +0000 Subject: Get rid of 'Join now...' message if site is closed or invite only. See ticket #1335 --- actions/public.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'actions') diff --git a/actions/public.php b/actions/public.php index a20ae4032..9b22e0a2c 100644 --- a/actions/public.php +++ b/actions/public.php @@ -207,9 +207,14 @@ class PublicAction extends Action function showAnonymousMessage() { - $m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . - 'based on the Free Software [Laconica](http://laconi.ca/) tool. ' . - '[Join now](%%action.register%%) to share notices about yourself with friends, family, and colleagues! ([Read more](%%doc.help%%))'); + if (! (common_config('site','closed') || common_config('site','inviteonly'))) { + $m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . + 'based on the Free Software [Laconica](http://laconi.ca/) tool. ' . + '[Join now](%%action.register%%) to share notices about yourself with friends, family, and colleagues! ([Read more](%%doc.help%%))'); + } else { + $m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . + 'based on the Free Software [Laconica](http://laconi.ca/) tool.'); + } $this->elementStart('div', array('id' => 'anon_notice')); $this->raw(common_markup_to_html($m)); $this->elementEnd('div'); -- cgit v1.2.3-54-g00ecf From b4c273113cc5d16dfa1ea3236dd8c78d1169cbf3 Mon Sep 17 00:00:00 2001 From: CiaranG Date: Thu, 19 Mar 2009 21:55:03 +0000 Subject: A couple more 'Join Now' messages that need disabling when the site is closed or invite only --- actions/showgroup.php | 15 +++++++++++---- actions/showstream.php | 14 ++++++++++---- 2 files changed, 21 insertions(+), 8 deletions(-) (limited to 'actions') diff --git a/actions/showgroup.php b/actions/showgroup.php index b6022840b..58cc7a97c 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -390,11 +390,18 @@ class ShowgroupAction extends Action function showAnonymousMessage() { - $m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . - 'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' . - 'short messages about their life and interests. '. - '[Join now](%%%%action.register%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'), + if (!(common_config('site','closed') || common_config('site','inviteonly'))) { + $m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . + 'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' . + 'short messages about their life and interests. '. + '[Join now](%%%%action.register%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'), $this->group->nickname); + } else { + $m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . + 'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' . + 'short messages about their life and interests. '), + $this->group->nickname); + } $this->elementStart('div', array('id' => 'anon_notice')); $this->raw(common_markup_to_html($m)); $this->elementEnd('div'); diff --git a/actions/showstream.php b/actions/showstream.php index 65482167e..b83f45d53 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -539,10 +539,16 @@ class ShowstreamAction extends Action function showAnonymousMessage() { - $m = sprintf(_('**%s** has an account on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . - 'based on the Free Software [Laconica](http://laconi.ca/) tool. ' . - '[Join now](%%%%action.register%%%%) to follow **%s**\'s notices and many more! ([Read more](%%%%doc.help%%%%))'), - $this->user->nickname, $this->user->nickname); + if (!(common_config('site','closed') || common_config('site','inviteonly'))) { + $m = sprintf(_('**%s** has an account on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . + 'based on the Free Software [Laconica](http://laconi.ca/) tool. ' . + '[Join now](%%%%action.register%%%%) to follow **%s**\'s notices and many more! ([Read more](%%%%doc.help%%%%))'), + $this->user->nickname, $this->user->nickname); + } else { + $m = sprintf(_('**%s** has an account on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . + 'based on the Free Software [Laconica](http://laconi.ca/) tool. '), + $this->user->nickname, $this->user->nickname); + } $this->elementStart('div', array('id' => 'anon_notice')); $this->raw(common_markup_to_html($m)); $this->elementEnd('div'); -- cgit v1.2.3-54-g00ecf From a9a71297f4c915c11e573adafffeccf3ff65a31c Mon Sep 17 00:00:00 2001 From: CiaranG Date: Fri, 20 Mar 2009 22:02:35 +0000 Subject: Use correct page information for notice search. See ticket #1333 --- actions/noticesearch.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actions') diff --git a/actions/noticesearch.php b/actions/noticesearch.php index eb4a072de..4aec41621 100644 --- a/actions/noticesearch.php +++ b/actions/noticesearch.php @@ -122,8 +122,8 @@ class NoticesearchAction extends SearchAction $cnt = $nl->show(); - $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, - $this->page, 'noticesearch', array('q' => $q)); + $this->pagination($page > 1, $cnt > NOTICES_PER_PAGE, + $page, 'noticesearch', array('q' => $q)); } function isReadOnly() { -- cgit v1.2.3-54-g00ecf From fadae96a74abd710316d336109bf8eca4d9394ac Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 22 Mar 2009 20:21:32 +0000 Subject: Password recover and change form markup updated. --- actions/recoverpassword.php | 22 ++++++++++++++++++++-- theme/base/css/display.css | 4 +++- 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'actions') diff --git a/actions/recoverpassword.php b/actions/recoverpassword.php index eeb6b2516..620fe7eb8 100644 --- a/actions/recoverpassword.php +++ b/actions/recoverpassword.php @@ -181,13 +181,21 @@ class RecoverpasswordAction extends Action function showRecoverForm() { $this->elementStart('form', array('method' => 'post', - 'id' => 'recoverpassword', + 'id' => 'form_password_recover', + 'class' => 'form_settings', 'action' => common_local_url('recoverpassword'))); + $this->elementStart('fieldset'); + $this->element('legend', null, _('Password recover')); + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); $this->input('nicknameoremail', _('Nickname or email'), $this->trimmed('nicknameoremail'), _('Your nickname on this server, ' . 'or your registered email address.')); + $this->elementEnd('li'); + $this->elementEnd('ul'); $this->submit('recover', _('Recover')); + $this->elementEnd('fieldset'); $this->elementEnd('form'); } @@ -213,14 +221,24 @@ class RecoverpasswordAction extends Action function showResetForm() { $this->elementStart('form', array('method' => 'post', - 'id' => 'recoverpassword', + 'id' => 'form_password_change', + 'class' => 'form_settings', 'action' => common_local_url('recoverpassword'))); + $this->elementStart('fieldset'); + $this->element('legend', null, _('Password change')); $this->hidden('token', common_session_token()); + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); $this->password('newpassword', _('New password'), _('6 or more characters, and don\'t forget it!')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->password('confirm', _('Confirm'), _('Same as password above')); + $this->elementEnd('li'); + $this->elementEnd('ul'); $this->submit('reset', _('Reset')); + $this->elementEnd('fieldset'); $this->elementEnd('form'); } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index c741ed4cb..a10ec0223 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -150,7 +150,9 @@ font-weight:bold; #form_openid_login legend, #form_search legend, #form_invite legend, -#form_notice_delete legend { +#form_notice_delete legend, +#form_password_recover legend, +#form_password_change legend { display:none; } -- cgit v1.2.3-54-g00ecf From 73fbf6580045939bfe9276820476be01d72c0687 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 30 Mar 2009 09:58:28 -0400 Subject: full name in title and h1 of the personal profile --- actions/showstream.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'actions') diff --git a/actions/showstream.php b/actions/showstream.php index b83f45d53..f5886f3d3 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -67,11 +67,17 @@ class ShowstreamAction extends Action function title() { + if (!empty($this->profile->fullname)) { + $base = $this->profile->fullname . ' (' . $this->user->nickname . ') '; + } else { + $base = $this->user->nickname; + } + if ($this->page == 1) { - return $this->user->nickname; + return $base; } else { return sprintf(_("%s, page %d"), - $this->user->nickname, + $base, $this->page); } } @@ -140,16 +146,6 @@ class ShowstreamAction extends Action $nav->show(); } - function showPageTitle() - { - $user =& common_current_user(); - if ($user && ($user->id == $this->profile->id)) { - $this->element('h1', NULL, _("Your profile")); - } else { - $this->element('h1', NULL, sprintf(_('%s\'s profile'), $this->profile->nickname)); - } - } - function showPageNoticeBlock() { return; -- cgit v1.2.3-54-g00ecf From 3861e348a4b4f00f3c0dcc5ba004e7dd80296078 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Mon, 30 Mar 2009 21:07:48 +0000 Subject: added filler text to public timeline for when it's empty, encouraging user to post and/or register. --- actions/public.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'actions') 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 * -- cgit v1.2.3-54-g00ecf