From c6816c163e813ac4bc8163cba7ab08c54d8320d5 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 15 May 2009 14:18:04 -0400 Subject: reformat action.php --- lib/action.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/action.php b/lib/action.php index 2ec9329e0..4bd41c226 100644 --- a/lib/action.php +++ b/lib/action.php @@ -98,15 +98,15 @@ class Action extends HTMLOutputter // lawsuit Event::handle('EndShowHTML', array($this)); } if (Event::handle('StartShowHead', array($this))) { - $this->showHead(); + $this->showHead(); Event::handle('EndShowHead', array($this)); } if (Event::handle('StartShowBody', array($this))) { - $this->showBody(); + $this->showBody(); Event::handle('EndShowBody', array($this)); } if (Event::handle('StartEndHTML', array($this))) { - $this->endHTML(); + $this->endHTML(); Event::handle('EndEndHTML', array($this)); } } @@ -347,7 +347,7 @@ class Action extends HTMLOutputter // lawsuit { $this->elementStart('body', (common_current_user()) ? array('id' => $this->trimmed('action'), 'class' => 'user_in') - : array('id' => $this->trimmed('action'))); + : array('id' => $this->trimmed('action'))); $this->elementStart('div', array('id' => 'wrap')); if (Event::handle('StartShowHeader', array($this))) { $this->showHeader(); @@ -431,10 +431,10 @@ class Action extends HTMLOutputter // lawsuit _('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'); + _('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'); } @@ -629,7 +629,7 @@ class Action extends HTMLOutputter // lawsuit $this->elementStart('div', array('id' => 'aside_primary', 'class' => 'aside')); if (Event::handle('StartShowExportData', array($this))) { - $this->showExportData(); + $this->showExportData(); Event::handle('EndShowExportData', array($this)); } if (Event::handle('StartShowSections', array($this))) { -- cgit v1.2.3-54-g00ecf From 14662354dc501e811dd714aa72fd8001842ee672 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 15 May 2009 14:22:49 -0400 Subject: add hooks for subgroupnav showing --- EVENTS.txt | 6 +++++ lib/subgroupnav.php | 68 +++++++++++++++++++++++++++++------------------------ 2 files changed, 43 insertions(+), 31 deletions(-) diff --git a/EVENTS.txt b/EVENTS.txt index 5edf59245..07fc446c3 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -100,6 +100,12 @@ StartPublicGroupNav: Showing the public group nav menu EndPublicGroupNav: At the end of the public group nav menu - $action: the current action +StartSubGroupNav: Showing the subscriptions group nav menu +- $action: the current action + +EndSubGroupNav: At the end of the subscriptions group nav menu +- $action: the current action + RouterInitialized: After the router instance has been initialized - $m: the Net_URL_Mapper that has just been set up diff --git a/lib/subgroupnav.php b/lib/subgroupnav.php index 31c3ea0b5..4a9b36ae8 100644 --- a/lib/subgroupnav.php +++ b/lib/subgroupnav.php @@ -74,38 +74,44 @@ class SubGroupNav extends Widget $this->out->elementStart('ul', array('class' => 'nav')); - $this->out->menuItem(common_local_url('subscriptions', - array('nickname' => - $this->user->nickname)), - _('Subscriptions'), - sprintf(_('People %s subscribes to'), - $this->user->nickname), - $action == 'subscriptions', - 'nav_subscriptions'); - $this->out->menuItem(common_local_url('subscribers', - array('nickname' => - $this->user->nickname)), - _('Subscribers'), - sprintf(_('People subscribed to %s'), - $this->user->nickname), - $action == 'subscribers', - 'nav_subscribers'); - $this->out->menuItem(common_local_url('usergroups', - array('nickname' => - $this->user->nickname)), - _('Groups'), - sprintf(_('Groups %s is a member of'), - $this->user->nickname), - $action == 'usergroups', - 'nav_usergroups'); - if (!is_null($cur) && $this->user->id === $cur->id) { - $this->out->menuItem(common_local_url('invite'), - _('Invite'), - sprintf(_('Invite friends and colleagues to join you on %s'), - common_config('site', 'name')), - $action == 'invite', - 'nav_invite'); + if (Event::handle('StartSubGroupNav', array($this))) { + + $this->out->menuItem(common_local_url('subscriptions', + array('nickname' => + $this->user->nickname)), + _('Subscriptions'), + sprintf(_('People %s subscribes to'), + $this->user->nickname), + $action == 'subscriptions', + 'nav_subscriptions'); + $this->out->menuItem(common_local_url('subscribers', + array('nickname' => + $this->user->nickname)), + _('Subscribers'), + sprintf(_('People subscribed to %s'), + $this->user->nickname), + $action == 'subscribers', + 'nav_subscribers'); + $this->out->menuItem(common_local_url('usergroups', + array('nickname' => + $this->user->nickname)), + _('Groups'), + sprintf(_('Groups %s is a member of'), + $this->user->nickname), + $action == 'usergroups', + 'nav_usergroups'); + if (!is_null($cur) && $this->user->id === $cur->id) { + $this->out->menuItem(common_local_url('invite'), + _('Invite'), + sprintf(_('Invite friends and colleagues to join you on %s'), + common_config('site', 'name')), + $action == 'invite', + 'nav_invite'); + } + + Event::handle('EndSubGroupNav', array($this)); } + $this->out->elementEnd('ul'); } } -- cgit v1.2.3-54-g00ecf From 6b4410d9eace776182f373886785cfd1f2736764 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 15 May 2009 15:07:23 -0400 Subject: add a hook to muck around with the arguments array after it's initialized --- EVENTS.txt | 2 ++ index.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/EVENTS.txt b/EVENTS.txt index 07fc446c3..e0ce11666 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -109,3 +109,5 @@ EndSubGroupNav: At the end of the subscriptions group nav menu RouterInitialized: After the router instance has been initialized - $m: the Net_URL_Mapper that has just been set up +ArgsInitialized: After the argument array has been initialized +- $args: associative array of arguments, can be modified diff --git a/index.php b/index.php index e24bde917..0c69e226f 100644 --- a/index.php +++ b/index.php @@ -101,6 +101,8 @@ function main() $args = array_merge($args, $_REQUEST); + Event::handle('ArgsInitialize', array(&$args)); + $action = $args['action']; if (!$action || !preg_match('/^[a-zA-Z0-9_-]*$/', $action)) { -- cgit v1.2.3-54-g00ecf From 9d13890a859eb657c1ee95b1b2a1144fdf46d6b4 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 15 May 2009 17:11:28 -0400 Subject: add a hook for the page notice --- lib/action.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/action.php b/lib/action.php index 4bd41c226..6b130b6d5 100644 --- a/lib/action.php +++ b/lib/action.php @@ -591,7 +591,10 @@ class Action extends HTMLOutputter // lawsuit 'class' => 'system_notice')); $this->element('dt', null, _('Page notice')); $this->elementStart('dd'); - $this->showPageNotice(); + if (Event::handle('StartShowPageNotice', array($this))) { + $this->showPageNotice(); + Event::handle('EndShowPageNotice', array($this)); + } $this->elementEnd('dd'); $this->elementEnd('dl'); } -- cgit v1.2.3-54-g00ecf From dcd69eec9098fd6bc6340a233796d6b242953057 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 18 May 2009 23:23:00 +0000 Subject: Increase entity_profile fn, nickname font-size slightly. Gave entity_profile more width. --- theme/base/css/display.css | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/theme/base/css/display.css b/theme/base/css/display.css index dc6b4bc29..8029a5eee 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -492,7 +492,7 @@ line-height:1.618; /* entity_profile */ .entity_profile { position:relative; -width:67.702%; +width:74.702%; min-height:123px; float:left; margin-bottom:18px; @@ -528,12 +528,15 @@ margin-bottom:4px; .entity_profile .entity_nickname { margin-left:11px; display:inline; -font-weight:bold; } .entity_profile .entity_nickname { margin-left:0; } - +.entity_profile .fn, +.entity_profile .nickname { +font-size:1.1em; +font-weight:bold; +} .entity_profile .entity_fn dd:before { content: "("; font-weight:normal; @@ -555,7 +558,7 @@ display:none; /*entity_actions*/ .entity_actions { float:right; -margin-left:4.35%; +margin-left:2.35%; max-width:25%; } .entity_actions h2 { -- cgit v1.2.3-54-g00ecf