From eaf2a98daf2ad135f6daa1bcab391fbee7df3183 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 22 May 2009 00:54:22 +0000 Subject: - Show Facebook profile pic and favicon as dictated by Facebook Connnect policy - Logout fixed, again (cleans up Facebook cookies now) --- plugins/FBConnect/FBCLoginGroupNav.php | 12 ++- plugins/FBConnect/FBConnectAuth.php | 19 +++-- plugins/FBConnect/FBConnectPlugin.php | 134 +++++++++++++++++++------------- plugins/FBConnect/FBConnectSettings.php | 14 +++- plugins/FBConnect/fbfavicon.ico | Bin 0 -> 1150 bytes 5 files changed, 108 insertions(+), 71 deletions(-) create mode 100644 plugins/FBConnect/fbfavicon.ico diff --git a/plugins/FBConnect/FBCLoginGroupNav.php b/plugins/FBConnect/FBCLoginGroupNav.php index 9aa01a094..6eb09c3c0 100644 --- a/plugins/FBConnect/FBCLoginGroupNav.php +++ b/plugins/FBConnect/FBCLoginGroupNav.php @@ -71,26 +71,24 @@ class FBCLoginGroupNav extends Widget function show() { - common_debug('FBCLoginGroupNav'); - $this->action->elementStart('dl', array('id' => 'site_nav_local_views')); $this->action->element('dt', null, _('Local views')); $this->action->elementStart('dd'); - + // action => array('prompt', 'title') $menu = array(); $menu['login'] = array(_('Login'), _('Login with a username and password')); - + if (!(common_config('site','closed') || common_config('site','inviteonly'))) { $menu['register'] = array(_('Register'), _('Sign up for a new account')); } - + $menu['openidlogin'] = array(_('OpenID'), _('Login or register with OpenID')); - + $menu['FBConnectLogin'] = array(_('Facebook'), _('Login or register using Facebook')); @@ -105,7 +103,7 @@ class FBCLoginGroupNav extends Widget } $this->action->elementEnd('ul'); - + $this->action->elementEnd('dd'); $this->action->elementEnd('dl'); } diff --git a/plugins/FBConnect/FBConnectAuth.php b/plugins/FBConnect/FBConnectAuth.php index e8724cdf9..906e591ea 100644 --- a/plugins/FBConnect/FBConnectAuth.php +++ b/plugins/FBConnect/FBConnectAuth.php @@ -50,7 +50,8 @@ class FBConnectauthAction extends Action } } catch (Exception $e) { - common_debug("Problem getting fbuid."); + common_log(LOG_WARNING, 'Problem getting Facebook uid: ' . + $e->getMessage()); } return true; @@ -283,7 +284,7 @@ class FBConnectauthAction extends Action } else { - common_debug("no flink found for fbuid: $this->fbuid"); + common_debug("No flink found for fbuid: $this->fbuid"); $this->showForm(null, $this->bestNewNickname()); } @@ -306,8 +307,6 @@ class FBConnectauthAction extends Action function flinkUser($user_id, $fbuid) { - common_debug("flinkUser()"); - $flink = new Foreign_link(); $flink->user_id = $user_id; $flink->foreign_id = $fbuid; @@ -370,7 +369,10 @@ class FBConnectauthAction extends Action // XXX: Consider moving this to lib/facebookutil.php function getFacebookFields($fb_uid, $fields) { try { - $infos = getFacebook()->api_client->users_getInfo($fb_uid, $fields); + + $facebook = getFacebook(); + + $infos = $facebook->api_client->users_getInfo($fb_uid, $fields); if (empty($infos)) { return null; @@ -378,9 +380,10 @@ class FBConnectauthAction extends Action return reset($infos); } catch (Exception $e) { - error_log("Failure in the api when requesting " . join(",", $fields) - ." on uid " . $fb_uid . " : ". $e->getMessage()); - return null; + common_log(LOG_WARNING, "Facebook client failure when requesting " . + join(",", $fields) . " on uid " . $fb_uid . + " : ". $e->getMessage()); + return null; } } diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php index 36dee0448..4fb9a7ca4 100644 --- a/plugins/FBConnect/FBConnectPlugin.php +++ b/plugins/FBConnect/FBConnectPlugin.php @@ -40,7 +40,6 @@ require_once INSTALLDIR . '/plugins/FBConnect/FBConnectSettings.php'; require_once INSTALLDIR . '/plugins/FBConnect/FBCLoginGroupNav.php'; require_once INSTALLDIR . '/plugins/FBConnect/FBCSettingsNav.php'; - /** * Plugin to enable Facebook Connect * @@ -53,7 +52,6 @@ require_once INSTALLDIR . '/plugins/FBConnect/FBCSettingsNav.php'; class FBConnectPlugin extends Plugin { - function __construct() { parent::__construct(); @@ -84,29 +82,27 @@ class FBConnectPlugin extends Plugin 'media type you accept'), 406); } - header('Content-Type: '.$type); $action->extraHeaders(); $action->startXML('html', - '-//W3C//DTD XHTML 1.0 Strict//EN', - 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'); + '-//W3C//DTD XHTML 1.0 Strict//EN', + 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'); $language = $action->getLanguage(); - $action->elementStart('html', array('xmlns' => 'http://www.w3.org/1999/xhtml', - 'xmlns:fb' => 'http://www.facebook.com/2008/fbml', - 'xml:lang' => $language, - 'lang' => $language)); + $action->elementStart('html', + array('xmlns' => 'http://www.w3.org/1999/xhtml', + 'xmlns:fb' => 'http://www.facebook.com/2008/fbml', + 'xml:lang' => $language, + 'lang' => $language)); return false; - } function onEndShowLaconicaScripts($action) { - $action->element('script', array('type' => 'text/javascript', 'src' => 'http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php'), @@ -140,77 +136,92 @@ class FBConnectPlugin extends Plugin if ($user) { + $action->menuItem(common_local_url('all', array('nickname' => $user->nickname)), + _('Home'), _('Personal profile and friends timeline'), false, 'nav_home'); + $action->menuItem(common_local_url('profilesettings'), + _('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account'); + if (common_config('xmpp', 'enabled')) { + $action->menuItem(common_local_url('imsettings'), + _('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect'); + } else { + $action->menuItem(common_local_url('smssettings'), + _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect'); + } + $action->menuItem(common_local_url('invite'), + _('Invite'), + sprintf(_('Invite friends and colleagues to join you on %s'), + common_config('site', 'name')), + false, 'nav_invitecontact'); + $flink = Foreign_link::getByUserId($user->id, FACEBOOK_CONNECT_SERVICE); + $fbuid = 0; if ($flink) { - $facebook = getFacebook(); + try { - if ($facebook->api_client->users_isAppUser($flink->foreign_id) || - $facebook->api_client->added) { + $facebook = getFacebook(); + $fbuid = getFacebook()->get_loggedin_user(); + + } catch (Exception $e) { + common_log(LOG_WARNING, + 'Problem getting Facebook client: ' . + $e->getMessage()); + } - // XXX: We need to replace this with a proper mini-icon and only after - // checing the FB Connect JavaScript lib method to see what the Connect - // status is. Checking Connect status looks to be impossible with the - // PHP client. + // Display Facebook Logged in indicator w/Facebook favicon - $action->elementStart('li'); + if ($fbuid > 0) { + + $action->elementStart('li', array('id' => 'nav_fb')); $action->elementStart('fb:profile-pic', array('uid' => $flink->foreign_id, - 'facebook-logo' => 'true', 'linked' => 'false', - 'width' => 32, - 'height' => 32)); + 'width' => 16, + 'height' => 16)); $action->elementEnd('fb:profile-pic'); + + $iconurl = common_path('/plugins/FBConnect/fbfavicon.ico'); + $action->element('img', array('src' => $iconurl)); + $action->elementEnd('li'); - } + } } - - $action->menuItem(common_local_url('all', array('nickname' => $user->nickname)), - _('Home'), _('Personal profile and friends timeline'), false, 'nav_home'); - $action->menuItem(common_local_url('profilesettings'), - _('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account'); - if (common_config('xmpp', 'enabled')) { - $action->menuItem(common_local_url('imsettings'), - _('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect'); - } else { - $action->menuItem(common_local_url('smssettings'), - _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect'); - } - $action->menuItem(common_local_url('invite'), - _('Invite'), - sprintf(_('Invite friends and colleagues to join you on %s'), - common_config('site', 'name')), - false, 'nav_invitecontact'); - // Need to override the Logout link to make it do FB stuff + // Need to override the Logout link to make it do FB stuff + + if ($fbuid > 0) { - $logout_url = common_local_url('logout'); - $title = _('Logout from the site'); - $text = _('Logout'); + $logout_url = common_local_url('logout'); + $title = _('Logout from the site'); + $text = _('Logout'); - $html = sprintf('', + $html = sprintf('', $logout_url, $title, $text); - $action->raw($html); + $action->raw($html); + } else { + $action->menuItem(common_local_url('logout'), + _('Logout'), _('Logout from the site'), false, 'nav_logout'); + } } else { if (!common_config('site', 'closed')) { $action->menuItem(common_local_url('register'), - _('Register'), _('Create an account'), false, 'nav_register'); + _('Register'), _('Create an account'), false, 'nav_register'); } $action->menuItem(common_local_url('openidlogin'), - _('OpenID'), _('Login with OpenID'), false, 'nav_openid'); + _('OpenID'), _('Login with OpenID'), false, 'nav_openid'); $action->menuItem(common_local_url('login'), - _('Login'), _('Login to the site'), false, 'nav_login'); + _('Login'), _('Login to the site'), false, 'nav_login'); } $action->menuItem(common_local_url('doc', array('title' => 'help')), - _('Help'), _('Help me!'), false, 'nav_help'); + _('Help'), _('Help me!'), false, 'nav_help'); $action->menuItem(common_local_url('peoplesearch'), - _('Search'), _('Search for people or text'), false, 'nav_search'); + _('Search'), _('Search for people or text'), false, 'nav_search'); return false; } @@ -220,7 +231,7 @@ class FBConnectPlugin extends Plugin $action_name = get_class($action); $login_actions = array('LoginAction', 'RegisterAction', - 'OpenidloginAction', 'FacebookStart'); + 'OpenidloginAction', 'FBConnectLoginAction'); if (in_array($action_name, $login_actions)) { $nav = new FBCLoginGroupNav($action); @@ -240,6 +251,21 @@ class FBConnectPlugin extends Plugin return true; } -} + function onEndLogout($action) + { + try { + $facebook = getFacebook(); + $fbuid = $facebook->get_loggedin_user(); + + if ($fbuid > 0) { + $facebook->logout(common_local_url('public')); + } + } catch (Exception $e) { + common_log(LOG_WARNING, 'Could\'t logout of Facebook: ' . + $e->getMessage()); + } + } + +} diff --git a/plugins/FBConnect/FBConnectSettings.php b/plugins/FBConnect/FBConnectSettings.php index b7831269c..7e255f43a 100644 --- a/plugins/FBConnect/FBConnectSettings.php +++ b/plugins/FBConnect/FBConnectSettings.php @@ -169,8 +169,18 @@ class FBConnectSettingsAction extends ConnectSettingsAction return; } - $facebook = getFacebook(); - $facebook->logout(); + try { + + // XXX: not sure what exactly to do here + + $facebook = getFacebook(); + $facebook->clear_cookie_state(); + + } catch (Exception $e) { + common_log(LOG_WARNING, + 'Couldn\'t clear Facebook cookies: ' . + $e->getMessage()); + } $this->showForm(_('Facebook user disconnected.'), true); diff --git a/plugins/FBConnect/fbfavicon.ico b/plugins/FBConnect/fbfavicon.ico new file mode 100644 index 000000000..c57c0342f Binary files /dev/null and b/plugins/FBConnect/fbfavicon.ico differ -- cgit v1.2.3-54-g00ecf From b134784df913bdead51b2b8c5847acdae7e543ce Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 22 May 2009 01:22:07 +0000 Subject: Custom stylesheet for the Facebook Connect plugin --- plugins/FBConnect/FBConnectPlugin.css | 1 + plugins/FBConnect/FBConnectPlugin.php | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 plugins/FBConnect/FBConnectPlugin.css diff --git a/plugins/FBConnect/FBConnectPlugin.css b/plugins/FBConnect/FBConnectPlugin.css new file mode 100644 index 000000000..19a196f3a --- /dev/null +++ b/plugins/FBConnect/FBConnectPlugin.css @@ -0,0 +1 @@ +/* placeholder for csarven */ \ No newline at end of file diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php index 4fb9a7ca4..ad5e47e47 100644 --- a/plugins/FBConnect/FBConnectPlugin.php +++ b/plugins/FBConnect/FBConnectPlugin.php @@ -130,6 +130,13 @@ class FBConnectPlugin extends Plugin $action->raw($html); } + function onEndShowLaconicaStyles($action) + { + $action->element('link', array('rel' => 'stylesheet', + 'type' => 'text/css', + 'href' => common_path('plugins/FBConnect/FBConnectPlugin.css'))); + } + function onStartPrimaryNav($action) { $user = common_current_user(); -- cgit v1.2.3-54-g00ecf From a418958a0167aa08a5db1cde2b1374752e6dd8c8 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 22 May 2009 01:25:43 +0000 Subject: Styles for Facebook logo and user avatar --- plugins/FBConnect/FBConnectPlugin.css | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/plugins/FBConnect/FBConnectPlugin.css b/plugins/FBConnect/FBConnectPlugin.css index 19a196f3a..54506c042 100644 --- a/plugins/FBConnect/FBConnectPlugin.css +++ b/plugins/FBConnect/FBConnectPlugin.css @@ -1 +1,28 @@ -/* placeholder for csarven */ \ No newline at end of file +/** Styles for Facebook logo and Facebook user profile avatar. + * + * @package Laconica + * @author Sarven Capadisli + * @copyright 2009 Control Yourself, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + */ + +#site_nav_global_primary #nav_fb { +position:relative; +margin-left:18px; +margin-right:-7px; +} + +#nav_fb .fb_profile_pic_rendered img { +position:static; +display:inline; +border:1px solid #3B5998; +padding:1px; +} + +#nav_fb img { +position:absolute; +top:-13px; +left:-11px; +display:inline; +} -- cgit v1.2.3-54-g00ecf From eeb54ec97a1526cc6dd874f0ff8571cca4b22c1e Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 22 May 2009 01:29:16 +0000 Subject: Minor alignment for FB logo --- plugins/FBConnect/FBConnectPlugin.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/FBConnect/FBConnectPlugin.css b/plugins/FBConnect/FBConnectPlugin.css index 54506c042..a16fb4edb 100644 --- a/plugins/FBConnect/FBConnectPlugin.css +++ b/plugins/FBConnect/FBConnectPlugin.css @@ -14,7 +14,9 @@ margin-right:-7px; } #nav_fb .fb_profile_pic_rendered img { -position:static; +position:relative; +top:3px; +left:0; display:inline; border:1px solid #3B5998; padding:1px; -- cgit v1.2.3-54-g00ecf From 5b1ba5619c29c74d263b48ed0daaacdad13a976d Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 22 May 2009 01:43:01 +0000 Subject: Form markup for Facebook Connect --- plugins/FBConnect/FBConnectAuth.php | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/plugins/FBConnect/FBConnectAuth.php b/plugins/FBConnect/FBConnectAuth.php index 906e591ea..5399326d6 100644 --- a/plugins/FBConnect/FBConnectAuth.php +++ b/plugins/FBConnect/FBConnectAuth.php @@ -125,34 +125,54 @@ class FBConnectauthAction extends Action } $this->elementStart('form', array('method' => 'post', - 'id' => 'account_connect', + 'id' => 'form_facebook_account_connect', + 'class' => 'form_settings', 'action' => common_local_url('FBConnectAuth'))); + $this->elementStart('fieldset'); $this->hidden('token', common_session_token()); - $this->element('h2', null, + $this->element('legend', null, _('Create new account')); $this->element('p', null, _('Create a new user with this nickname.')); + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); $this->input('newname', _('New nickname'), ($this->username) ? $this->username : '', _('1-64 lowercase letters or numbers, no punctuation or spaces')); - $this->elementStart('p'); + $this->elementEnd('li'); + $this->elementStart('li'); $this->element('input', array('type' => 'checkbox', 'id' => 'license', + 'class' => 'checkbox', 'name' => 'license', 'value' => 'true')); + $this->elementStart('label', array('class' => 'checkbox', 'for' => 'license')); $this->text(_('My text and files are available under ')); $this->element('a', array('href' => common_config('license', 'url')), common_config('license', 'title')); $this->text(_(' except this private data: password, email address, IM address, phone number.')); - $this->elementEnd('p'); + $this->elementEnd('label'); + $this->elementEnd('li'); + $this->elementEnd('ul'); $this->submit('create', _('Create')); - $this->element('h2', null, + $this->elementEnd('fieldset'); + + $this->elementStart('fieldset'); + $this->element('legend', null, _('Connect existing account')); $this->element('p', null, _('If you already have an account, login with your username and password to connect it to your Facebook.')); + + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); $this->input('nickname', _('Existing nickname')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->password('password', _('Password')); + $this->elementEnd('li'); + $this->elementEnd('ul'); $this->submit('connect', _('Connect')); + $this->elementEnd('fieldset'); $this->elementEnd('form'); } -- cgit v1.2.3-54-g00ecf From 0b9c65ce4fca26be3f8c3048a67aad2744c7b17a Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 22 May 2009 01:53:58 +0000 Subject: Facebook Connect account setup markup and CSS rearrangement for license information (it comes before and applies to both connection options) --- plugins/FBConnect/FBConnectAuth.php | 32 +++++++++++++++++++------------- plugins/FBConnect/FBConnectPlugin.css | 7 +++++++ 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/plugins/FBConnect/FBConnectAuth.php b/plugins/FBConnect/FBConnectAuth.php index 5399326d6..233eb83ab 100644 --- a/plugins/FBConnect/FBConnectAuth.php +++ b/plugins/FBConnect/FBConnectAuth.php @@ -125,22 +125,13 @@ class FBConnectauthAction extends Action } $this->elementStart('form', array('method' => 'post', - 'id' => 'form_facebook_account_connect', + 'id' => 'form_settings_facebook_connect', 'class' => 'form_settings', 'action' => common_local_url('FBConnectAuth'))); - $this->elementStart('fieldset'); - $this->hidden('token', common_session_token()); - $this->element('legend', null, - _('Create new account')); - $this->element('p', null, - _('Create a new user with this nickname.')); + $this->elementStart('fieldset', array('id' => 'settings_facebook_connect_options')); + $this->element('legend', null, _('Connection options')); $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - $this->input('newname', _('New nickname'), - ($this->username) ? $this->username : '', - _('1-64 lowercase letters or numbers, no punctuation or spaces')); - $this->elementEnd('li'); - $this->elementStart('li'); $this->element('input', array('type' => 'checkbox', 'id' => 'license', 'class' => 'checkbox', @@ -154,6 +145,20 @@ class FBConnectauthAction extends Action $this->elementEnd('label'); $this->elementEnd('li'); $this->elementEnd('ul'); + + $this->elementStart('fieldset'); + $this->hidden('token', common_session_token()); + $this->element('legend', null, + _('Create new account')); + $this->element('p', null, + _('Create a new user with this nickname.')); + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); + $this->input('newname', _('New nickname'), + ($this->username) ? $this->username : '', + _('1-64 lowercase letters or numbers, no punctuation or spaces')); + $this->elementEnd('li'); + $this->elementEnd('ul'); $this->submit('create', _('Create')); $this->elementEnd('fieldset'); @@ -162,7 +167,6 @@ class FBConnectauthAction extends Action _('Connect existing account')); $this->element('p', null, _('If you already have an account, login with your username and password to connect it to your Facebook.')); - $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->input('nickname', _('Existing nickname')); @@ -172,6 +176,8 @@ class FBConnectauthAction extends Action $this->elementEnd('li'); $this->elementEnd('ul'); $this->submit('connect', _('Connect')); + $this->elementEnd('fieldset'); + $this->elementEnd('fieldset'); $this->elementEnd('form'); } diff --git a/plugins/FBConnect/FBConnectPlugin.css b/plugins/FBConnect/FBConnectPlugin.css index a16fb4edb..564fdaee9 100644 --- a/plugins/FBConnect/FBConnectPlugin.css +++ b/plugins/FBConnect/FBConnectPlugin.css @@ -28,3 +28,10 @@ top:-13px; left:-11px; display:inline; } + +#settings_facebook_connect_options legend { +display:none; +} +#form_settings_facebook_connect fieldset fieldset legend { +display:block; +} -- cgit v1.2.3-54-g00ecf From 69e88546fd846146e021b86b0d7d4ddfd382eb31 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 22 May 2009 02:46:22 +0000 Subject: Init styles for conversation page --- theme/base/css/display.css | 7 +++++++ theme/default/css/display.css | 17 +++++++++++++---- theme/identica/css/display.css | 17 +++++++++++++---- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/theme/base/css/display.css b/theme/base/css/display.css index edec14163..5d2b5231c 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -747,6 +747,13 @@ border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; } +.notices .notices { +margin-top:7px; +margin-left:3%; +width:97%; +float:left; +} + /* NOTICES */ #notices_primary { diff --git a/theme/default/css/display.css b/theme/default/css/display.css index fce2e7e29..16c9322a5 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -175,10 +175,6 @@ background-image:url(../../base/images/icons/twotone/green/shield.gif); } /* NOTICES */ -.notices li.over { -background-color:#fcfcfc; -} - .notice-options .notice_reply a, .notice-options form input.submit { background-color:transparent; @@ -214,6 +210,19 @@ font-family:sans-serif; .notices li.hover { background-color:#fcfcfc; } + +.notices .notices { +background-color:rgba(200, 200, 200, 0.025); +} +.notices .notices .notices { +background-color:rgba(200, 200, 200, 0.050); +} +.notices .notices .notices .notices { +background-color:rgba(200, 200, 200, 0.075); +} +.notices .notices .notices .notices .notices { +background-color:rgba(200, 200, 200, 0.100); +} /*END: NOTICES */ #new_group a { diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index df114417e..2fb123a20 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -175,10 +175,6 @@ background-image:url(../../base/images/icons/twotone/green/shield.gif); } /* NOTICES */ -.notices li.over { -background-color:#fcfcfc; -} - .notice-options .notice_reply a, .notice-options form input.submit { background-color:transparent; @@ -214,6 +210,19 @@ font-family:sans-serif; .notices li.hover { background-color:#fcfcfc; } + +.notices .notices { +background-color:rgba(200, 200, 200, 0.025); +} +.notices .notices .notices { +background-color:rgba(200, 200, 200, 0.050); +} +.notices .notices .notices .notices { +background-color:rgba(200, 200, 200, 0.075); +} +.notices .notices .notices .notices .notices { +background-color:rgba(200, 200, 200, 0.100); +} /*END: NOTICES */ #new_group a { -- cgit v1.2.3-54-g00ecf From 9f23807af4495889a96713c798c0007d5bd6cba7 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 22 May 2009 02:47:34 +0000 Subject: Removed inline styles from notice list items --- lib/noticelist.php | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/lib/noticelist.php b/lib/noticelist.php index 004905056..a52132171 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -180,25 +180,14 @@ class NoticeListItem extends Widget $this->showStart(); $this->showNotice(); $this->showNoticeAttachments(); - $this->showNoticeOptions(); $this->showNoticeInfo(); + $this->showNoticeOptions(); $this->showEnd(); } function showNotice() { -if(0) - $this->out->elementStart('entry-title'); -else - - if ('shownotice' === $this->out->args['action']) { - $width = '85%'; - } else { - $width = '90%'; - } - - - $this->out->elementStart('div', array('class' => 'entry-title', 'style' => "float: left; width: $width;")); + $this->out->elementStart('div', 'entry-title'); $this->showAuthor(); $this->showContent(); $this->out->elementEnd('div'); @@ -248,17 +237,7 @@ else function showNoticeInfo() { -if(0) $this->out->elementStart('div', 'entry-content'); -else - - if ('shownotice' === $this->out->args['action']) { - $width = '85%'; - } else { - $width = '90%'; - } - - $this->out->elementStart('div', array('class' => 'entry-content', 'style' => "float: left; width: $width;")); $this->showNoticeLink(); $this->showNoticeSource(); $this->showContext(); @@ -269,10 +248,7 @@ else { $user = common_current_user(); if ($user) { -if(0) $this->out->elementStart('div', 'notice-options'); -else - $this->out->elementStart('div', array('class' => 'notice-options', 'style' => 'float: right; width: 16%;')); $this->showFaveForm(); $this->showReplyLink(); $this->showDeleteLink(); -- cgit v1.2.3-54-g00ecf