From 214468d17ea7342a76868030bb0ef83d47276296 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 20 Mar 2009 05:59:03 -0700 Subject: added a few Laconica events --- lib/action.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/action.php') diff --git a/lib/action.php b/lib/action.php index 975c2bfcb..799854177 100644 --- a/lib/action.php +++ b/lib/action.php @@ -97,9 +97,18 @@ class Action extends HTMLOutputter // lawsuit $this->startHTML(); Event::handle('EndShowHTML', array($this)); } + if (Event::handle('StartShowHead', array($this))) { $this->showHead(); + Event::handle('EndShowHead', array($this)); + } + if (Event::handle('StartShowBody', array($this))) { $this->showBody(); + Event::handle('EndShowBody', array($this)); + } + if (Event::handle('StartEndHTML', array($this))) { $this->endHTML(); + Event::handle('EndEndHTML', array($this)); + } } /** @@ -577,7 +586,10 @@ class Action extends HTMLOutputter // lawsuit { $this->elementStart('div', array('id' => 'aside_primary', 'class' => 'aside')); + if (Event::handle('StartShowExportData', array($this))) { $this->showExportData(); + Event::handle('EndShowExportData', array($this)); + } if (Event::handle('StartShowSections', array($this))) { $this->showSections(); Event::handle('EndShowSections', array($this)); -- cgit v1.2.3-54-g00ecf From 4cc6d0ea2c7bec551c7726d7a336afea17d27df8 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 7 Apr 2009 11:40:13 -0400 Subject: make tags in list work --- lib/action.php | 4 ++++ lib/galleryaction.php | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/action.php') diff --git a/lib/action.php b/lib/action.php index 5d0d5b758..bba76d833 100644 --- a/lib/action.php +++ b/lib/action.php @@ -921,11 +921,15 @@ class Action extends HTMLOutputter // lawsuit * * @return string current URL */ + function selfUrl() { $action = $this->trimmed('action'); $args = $this->args; unset($args['action']); + if (array_key_exists('submit', $args)) { + unset($args['submit']); + } foreach (array_keys($_COOKIE) as $cookie) { unset($args[$cookie]); } diff --git a/lib/galleryaction.php b/lib/galleryaction.php index 25a5e3fd5..8e21d7393 100644 --- a/lib/galleryaction.php +++ b/lib/galleryaction.php @@ -50,7 +50,7 @@ class GalleryAction extends Action if ($this->arg('page') && $this->arg('page') != 1) { $args['page'] = $this->arg['page']; } - common_redirect(common_local_url('subscriptions', $args), 301); + common_redirect(common_local_url($this->trimmed('action'), $args), 301); return false; } @@ -71,6 +71,7 @@ class GalleryAction extends Action $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; $this->tag = $this->trimmed('tag'); + $this->q = $this->trimmed('q'); return true; } @@ -87,7 +88,7 @@ class GalleryAction extends Action # Post from the tag dropdown; redirect to a GET if ($_SERVER['REQUEST_METHOD'] == 'POST') { - common_redirect($this->selfUrl(), 307); + common_redirect($this->selfUrl(), 303); return; } @@ -136,7 +137,7 @@ class GalleryAction extends Action 'method' => 'post')); $this->dropdown('tag', _('Tag'), $content, _('Choose a tag to narrow list'), false, $tag); - $this->submit('go', _('Go')); + $this->submit('submit', _('Go')); $this->elementEnd('form'); $this->elementEnd('li'); $this->elementEnd('ul'); -- cgit v1.2.3-54-g00ecf From 7f5e2c5e57561a90478af1ce62b7a65641125568 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 7 Apr 2009 18:08:56 +0000 Subject: Added Invite link to global navigation --- lib/action.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/action.php') diff --git a/lib/action.php b/lib/action.php index 5d0d5b758..4ea9ba465 100644 --- a/lib/action.php +++ b/lib/action.php @@ -416,6 +416,11 @@ class Action extends HTMLOutputter // lawsuit $this->menuItem(common_local_url('smssettings'), _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect'); } + $this->menuItem(common_local_url('invite'), + _('Invite'), + sprintf(_('Invite friends and colleagues to join you on %s'), + common_config('site', 'name')), + false, 'nav_invitecontact'); $this->menuItem(common_local_url('logout'), _('Logout'), _('Logout from the site'), false, 'nav_logout'); } else { -- cgit v1.2.3-54-g00ecf From ef2d22a84b0b2cd35801bfbf3c9130826fec61bd Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 7 Apr 2009 18:09:54 +0000 Subject: Rearranged the global navigation items for better usability. Reason a) placement of Search at the edge of the viewport for quicker access and b) placement of the links that are always available (whether user is logged in or not) in the same location (i.e., Login/Logout, Help, Search) --- lib/action.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'lib/action.php') diff --git a/lib/action.php b/lib/action.php index 4ea9ba465..b93d8d21c 100644 --- a/lib/action.php +++ b/lib/action.php @@ -402,13 +402,8 @@ class Action extends HTMLOutputter // lawsuit if ($user) { $this->menuItem(common_local_url('all', array('nickname' => $user->nickname)), _('Home'), _('Personal profile and friends timeline'), false, 'nav_home'); - } - $this->menuItem(common_local_url('peoplesearch'), - _('Search'), _('Search for people or text'), false, 'nav_search'); - if ($user) { $this->menuItem(common_local_url('profilesettings'), _('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account'); - if (common_config('xmpp', 'enabled')) { $this->menuItem(common_local_url('imsettings'), _('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect'); @@ -423,18 +418,21 @@ class Action extends HTMLOutputter // lawsuit false, 'nav_invitecontact'); $this->menuItem(common_local_url('logout'), _('Logout'), _('Logout from the site'), false, 'nav_logout'); - } else { - $this->menuItem(common_local_url('login'), - _('Login'), _('Login to the site'), false, 'nav_login'); + } + else { if (!common_config('site', 'closed')) { $this->menuItem(common_local_url('register'), _('Register'), _('Create an account'), false, 'nav_register'); } $this->menuItem(common_local_url('openidlogin'), _('OpenID'), _('Login with OpenID'), false, 'nav_openid'); + $this->menuItem(common_local_url('login'), + _('Login'), _('Login to the site'), false, 'nav_login'); } $this->menuItem(common_local_url('doc', array('title' => 'help')), _('Help'), _('Help me!'), false, 'nav_help'); + $this->menuItem(common_local_url('peoplesearch'), + _('Search'), _('Search for people or text'), false, 'nav_search'); Event::handle('EndPrimaryNav', array($this)); } $this->elementEnd('ul'); -- cgit v1.2.3-54-g00ecf