From aaa2dd2712504dc9399d6cc5e1a002eb08ce6d4f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 12 Jan 2010 01:02:55 +0000 Subject: Styles for application details page --- theme/base/css/display.css | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'theme/base') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 2e4c88dfa..5e280bdfe 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -894,6 +894,39 @@ font-weight:normal; margin-right:11px; } +#showapplication .entity_profile { +width:68%; +} +#showapplication .entity_profile img { +max-width:96px; +max-height:96px; +} +#showapplication .entity_profile .entity_fn { +margin-left:0; +} +#showapplication .entity_profile .entity_fn .fn:before, +#showapplication .entity_profile .entity_fn .fn:after { +content:''; +} +#showapplication .entity_data { +clear:both; +margin-bottom:18px; +} +#showapplication .entity_data h2 { +display:none; +} +#showapplication .entity_data dl { +margin-bottom:18px; +} +#showapplication .entity_data dt { +font-weight:bold; +} +#showapplication .entity_data dd { +margin-left:1.795%; +font-family:monospace; +font-size:1.3em; +} + /* NOTICE */ .notice, .profile { -- cgit v1.2.3-54-g00ecf From f3c732587ca17d7fe693d2f3830bd65f3b1f678f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 12 Jan 2010 02:04:20 +0000 Subject: Styles for application list --- theme/base/css/display.css | 16 +++++++++++++++- theme/default/css/display.css | 2 ++ theme/identica/css/display.css | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) (limited to 'theme/base') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 5e280bdfe..c33f64aca 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -894,6 +894,19 @@ font-weight:normal; margin-right:11px; } +/*applications*/ +.applications { +margin-bottom:18px; +float:left; +width:100%; +} +.applications li { +list-style-type:none; +} +.application img { +max-width:96px; +max-height:96px; +} #showapplication .entity_profile { width:68%; } @@ -929,7 +942,8 @@ font-size:1.3em; /* NOTICE */ .notice, -.profile { +.profile, +.application { position:relative; padding-top:11px; padding-bottom:11px; diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 8a2c01175..4a45303ca 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -129,6 +129,7 @@ color:#002FA7; .notice, .profile, +.application, #content tbody tr { border-top-color:#C8D1D5; } @@ -378,6 +379,7 @@ box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3); -webkit-box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3); } #content .notices li:hover, +#content .applications li:hover, #content tbody tr:hover { background-color:rgba(240, 240, 240, 0.2); } diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index 4ee48459d..96e3c61bc 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -129,6 +129,7 @@ color:#002FA7; .notice, .profile, +.application, #content tbody tr { border-top-color:#CEE1E9; } @@ -377,6 +378,7 @@ box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3); -webkit-box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3); } #content .notices li:hover, +#content .applications li:hover, #content tbody tr:hover { background-color:rgba(240, 240, 240, 0.2); } -- cgit v1.2.3-54-g00ecf From cae113941d9c2aadcbe4763a481b2bb25a205075 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 12 Jan 2010 02:33:36 +0000 Subject: Added key icon for application key and secret rest action --- theme/base/images/icons/icons-01.gif | Bin 3607 -> 3650 bytes theme/base/images/icons/twotone/green/key.gif | Bin 0 -> 76 bytes theme/default/css/display.css | 6 +++++- theme/identica/css/display.css | 6 +++++- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 theme/base/images/icons/twotone/green/key.gif (limited to 'theme/base') diff --git a/theme/base/images/icons/icons-01.gif b/theme/base/images/icons/icons-01.gif index 06202a047..f93d33d79 100644 Binary files a/theme/base/images/icons/icons-01.gif and b/theme/base/images/icons/icons-01.gif differ diff --git a/theme/base/images/icons/twotone/green/key.gif b/theme/base/images/icons/twotone/green/key.gif new file mode 100644 index 000000000..ccf357ab2 Binary files /dev/null and b/theme/base/images/icons/twotone/green/key.gif differ diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 4a45303ca..3aebb239d 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -188,7 +188,8 @@ button.close, .entity_delete input.submit, .notice-options .repeated, .form_notice label[for=notice_data-geo], -button.minimize { +button.minimize, +.form_reset_key input.submit { background-image:url(../../base/images/icons/icons-01.gif); background-repeat:no-repeat; background-color:transparent; @@ -333,6 +334,9 @@ background-position: 5px -1445px; .entity_delete input.submit { background-position: 5px -1511px; } +.form_reset_key input.submit { +background-position: 5px -1973px; +} /* NOTICES */ .notice .attachment { diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index 96e3c61bc..2818196c2 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -188,7 +188,8 @@ button.close, .entity_delete input.submit, .notice-options .repeated, .form_notice label[for=notice_data-geo], -button.minimize { +button.minimize, +.form_reset_key input.submit { background-image:url(../../base/images/icons/icons-01.gif); background-repeat:no-repeat; background-color:transparent; @@ -332,6 +333,9 @@ background-position: 5px -1445px; .entity_delete input.submit { background-position: 5px -1511px; } +.form_reset_key input.submit { +background-position: 5px -1973px; +} /* NOTICES */ .notice .attachment { -- cgit v1.2.3-54-g00ecf From e7c26eb443df709b9526d94d7103766baec114b2 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 12 Jan 2010 02:51:33 +0000 Subject: Styles for image max width/height and radio form controls --- theme/base/css/display.css | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'theme/base') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index c33f64aca..507733979 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -903,17 +903,15 @@ width:100%; .applications li { list-style-type:none; } -.application img { +.application img, +#showapplication .entity_profile img, +#editapplication .form_data #application_icon img { max-width:96px; max-height:96px; } #showapplication .entity_profile { width:68%; } -#showapplication .entity_profile img { -max-width:96px; -max-height:96px; -} #showapplication .entity_profile .entity_fn { margin-left:0; } @@ -939,6 +937,10 @@ margin-left:1.795%; font-family:monospace; font-size:1.3em; } +#editapplication .form_data #application_types label.radio, +#editapplication .form_data #default_access_types label.radio { +width:15%; +} /* NOTICE */ .notice, -- cgit v1.2.3-54-g00ecf From 2a1ab137cc233314b4c115d0687c27c7dbaec96f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 16 Jan 2010 20:57:18 +0000 Subject: Using visibility:hidden instead of display:none for checkbox --- theme/base/css/display.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'theme/base') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 507733979..fc11a9234 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -73,7 +73,7 @@ input.checkbox, input.radio { position:relative; top:2px; -left:0; +left:auto; border:0; } @@ -567,7 +567,8 @@ float:right; font-size:0.8em; } -.form_notice #notice_data-geo_wrap label { +.form_notice #notice_data-geo_wrap label, +.form_notice #notice_data-geo_wrap input { position:absolute; top:25px; right:4px; @@ -578,7 +579,7 @@ height:16px; display:block; } .form_notice #notice_data-geo_wrap input { -display:none; +visibility:hidden; } .form_notice #notice_data-geo_wrap label { font-weight:normal; -- cgit v1.2.3-54-g00ecf From f92a9dad8c68c8a1355a2f00b29d21209b62dd34 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 18 Jan 2010 11:12:05 +0000 Subject: Moved farbtastic's stylesheet to use relative paths for its own images --- js/farbtastic/farbtastic.css | 32 ++++++++++++++++++++++++++++++++ theme/base/css/farbtastic.css | 32 -------------------------------- 2 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 js/farbtastic/farbtastic.css delete mode 100644 theme/base/css/farbtastic.css (limited to 'theme/base') diff --git a/js/farbtastic/farbtastic.css b/js/farbtastic/farbtastic.css new file mode 100644 index 000000000..a88e7b868 --- /dev/null +++ b/js/farbtastic/farbtastic.css @@ -0,0 +1,32 @@ +.farbtastic { + position: relative; +} +.farbtastic * { + position: absolute; + cursor: crosshair; +} +.farbtastic, .farbtastic .wheel { + width: 195px; + height: 195px; +} +.farbtastic .color, .farbtastic .overlay { + top: 47px; + left: 47px; + width: 101px; + height: 101px; +} +.farbtastic .wheel { + background: url(wheel.png) no-repeat; + width: 195px; + height: 195px; +} +.farbtastic .overlay { + background: url(mask.png) no-repeat; +} +.farbtastic .marker { + width: 17px; + height: 17px; + margin: -8px 0 0 -8px; + overflow: hidden; + background: url(marker.png) no-repeat; +} diff --git a/theme/base/css/farbtastic.css b/theme/base/css/farbtastic.css deleted file mode 100644 index 7efcc73c3..000000000 --- a/theme/base/css/farbtastic.css +++ /dev/null @@ -1,32 +0,0 @@ -.farbtastic { - position: relative; -} -.farbtastic * { - position: absolute; - cursor: crosshair; -} -.farbtastic, .farbtastic .wheel { - width: 195px; - height: 195px; -} -.farbtastic .color, .farbtastic .overlay { - top: 47px; - left: 47px; - width: 101px; - height: 101px; -} -.farbtastic .wheel { - background: url(../../../js/farbtastic/wheel.png) no-repeat; - width: 195px; - height: 195px; -} -.farbtastic .overlay { - background: url(../../../js/farbtastic/mask.png) no-repeat; -} -.farbtastic .marker { - width: 17px; - height: 17px; - margin: -8px 0 0 -8px; - overflow: hidden; - background: url(../../../js/farbtastic/marker.png) no-repeat; -} -- cgit v1.2.3-54-g00ecf From e3ee5663abfc5fa873f4b2c76f6f89971c3c9aae Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 20 Jan 2010 18:32:24 +0100 Subject: Updated notice item view where a) notice text no longer wraps around (under author's photo) b) supplemental notice content and options will start right under notice text. --- plugins/MobileProfile/mp-screen.css | 12 +++++++++++- theme/base/css/display.css | 22 +++++++++++++++++++--- 2 files changed, 30 insertions(+), 4 deletions(-) (limited to 'theme/base') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 472fbb001..76071352d 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -176,8 +176,18 @@ margin-bottom:0; .profile { padding-top:4px; padding-bottom:4px; +min-height:65px; } -.notice div.entry-content { +#content .notice .entry-title { +float:left; +width:100%; +margin-left:0; +} +#content .notice .author .photo { +position:static; +float:left; +} +#content .notice div.entry-content { margin-left:0; width:75%; max-width:100%; diff --git a/theme/base/css/display.css b/theme/base/css/display.css index fc11a9234..82670c964 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -1006,6 +1006,16 @@ float:left; #shownotice .vcard .photo { margin-bottom:4px; } +#content .notice .author .photo { +position:absolute; +top:11px; +left:0; +float:none; +} +#content .notice .entry-title { +margin-left:59px; +} + .vcard .url { text-decoration:none; } @@ -1014,13 +1024,19 @@ text-decoration:underline; } .notice .entry-title { -float:left; -width:100%; overflow:hidden; } .notice .entry-title.ov { overflow:visible; } +#showstream .notice .entry-title, +#showstream .notice div.entry-content { +margin-left:0; +} +#shownotice .notice .entry-title, +#shownotice .notice div.entry-content { +margin-left:110px; +} #shownotice .notice .entry-title { font-size:2.2em; } @@ -1050,7 +1066,6 @@ max-width:70%; } #showstream .notice div.entry-content, #shownotice .notice div.entry-content { -margin-left:0; max-width:79%; } @@ -1114,6 +1129,7 @@ position:relative; font-size:0.95em; width:113px; float:right; +margin-top:3px; margin-right:4px; } -- cgit v1.2.3-54-g00ecf From fed111f08aeba6be5bfc5e924975048e6a8f6521 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 21 Jan 2010 13:23:04 +0100 Subject: Removed mobile stylesheet from core output. If Mobile support is seeked, MobileProfile plugin should be used. --- lib/action.php | 4 -- theme/base/css/mobile.css | 150 ---------------------------------------------- 2 files changed, 154 deletions(-) delete mode 100644 theme/base/css/mobile.css (limited to 'theme/base') diff --git a/lib/action.php b/lib/action.php index 22425e682..e24277558 100644 --- a/lib/action.php +++ b/lib/action.php @@ -199,10 +199,6 @@ class Action extends HTMLOutputter // lawsuit if (Event::handle('StartShowStatusNetStyles', array($this)) && Event::handle('StartShowLaconicaStyles', array($this))) { $this->cssLink('css/display.css',null,'screen, projection, tv'); - if (common_config('site', 'mobile')) { - // TODO: "handheld" CSS for other mobile devices - $this->cssLink('css/mobile.css','base','only screen and (max-device-width: 480px)'); // Mobile WebKit - } $this->cssLink('css/print.css','base','print'); Event::handle('EndShowStatusNetStyles', array($this)); Event::handle('EndShowLaconicaStyles', array($this)); diff --git a/theme/base/css/mobile.css b/theme/base/css/mobile.css deleted file mode 100644 index f6c53ea8d..000000000 --- a/theme/base/css/mobile.css +++ /dev/null @@ -1,150 +0,0 @@ -/** theme: base - * - * @package StatusNet - * @author Meitar Moscovitz - * @author Sarven Capadisli - * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://status.net/ - */ - -body { -font-size:2.5em; -} - -#wrap { -width:95%; -} - -#header, -#header address, -#anon_notice, -#site_nav_local_views .nav, -#form_notice, -#form_notice .form_data li, -#core, -#content_inner, -#notices_primary, -.notice, -.notice .entry-title, -.notice div.entry-content, -.notice-options, -.notice .notice-options a, -.pagination, -.pagination .nav, -.aside .section { -float:none; -} - -.notice-options .notice_reply, -.notice-options .notice_delete, -.notice-options .form_favor, -.notice-options .form_disfavor { -position:static; -} - -#form_notice, -#anon_notice, -#footer, -#form_notice .form_actions input.submit { -width:auto; -} - -.form_settings label { -width:25%; -} -.form_settings .form_data p.form_guide { -margin-left:26%; -} - -#site_nav_global_primary { -width:75%; -} - -.entity_profile { -width:65%; -} -.entity_actions { -margin-left:0; -} - -#form_notice, -#anon_notice { -clear:both; -} - -#content, -#aside_primary { -width:96%; -padding-left:2%; -padding-right:2%; -} - -#site_notice { -position:static; -float:right; -clear:right; -width:75%; -margin-right:0; -margin-bottom:11px; -} - -.notices { -font-size:1.5em; -} - -#form_notice textarea { -width:80%; -height:5em; -} -#form_notice .form_note { -right:20%; -top:6em; -} - - -.vcard .photo, -.section .vcard .photo { -margin-right:18px; -} -.notice, -.profile { -margin-bottom:18px; -} - -.notices .entry-title, -.notices div.entry-content { -width:90%; -} -.notice div.entry-content { -margin-left:0; -} - -.notice .author .photo { -height:4.5em; -width:4.5em; -} -.notice-options { -position:absolute; -top:0; -right:0; -padding-left:7%; -width:3%; -} - -.notice-options .notice_delete a { -float:left; -} -.pagination .nav { -overflow:auto; -} - -#export_data { -display:none; -} - -#site_nav_local_views li { -margin-right:4px; -} -#site_nav_local_views a { -padding:18px 11px; -} -- cgit v1.2.3-54-g00ecf From 6d58ef4abb12d735b6be777ea79f99a07c68694a Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 13 Jan 2010 20:10:09 +0000 Subject: Updated apioauthauthorize markup and styles --- actions/apioauthauthorize.php | 46 +++++++++++-------------------------------- theme/base/css/display.css | 10 ++++++++-- 2 files changed, 20 insertions(+), 36 deletions(-) (limited to 'theme/base') diff --git a/actions/apioauthauthorize.php b/actions/apioauthauthorize.php index 0966ba1d7..72d142651 100644 --- a/actions/apioauthauthorize.php +++ b/actions/apioauthauthorize.php @@ -273,27 +273,6 @@ class ApiOauthAuthorizeAction extends ApiOauthAction return _('An application would like to connect to your account'); } - /** - * Show page notice - * - * Display a notice for how to use the page, or the - * error if it exists. - * - * @return void - */ - - function showPageNotice() - { - if ($this->error) { - $this->element('p', 'error', $this->error); - } else { - $instr = $this->getInstructions(); - $output = common_markup_to_html($instr); - - $this->raw($output); - } - } - /** * Shows the authorization form. * @@ -303,40 +282,38 @@ class ApiOauthAuthorizeAction extends ApiOauthAction function showContent() { $this->elementStart('form', array('method' => 'post', - 'id' => 'form_login', + 'id' => 'form_apioauthauthorize', 'class' => 'form_settings', 'action' => common_local_url('apioauthauthorize'))); + $this->elementStart('fieldset'); + $this->element('legend', array('id' => 'apioauthauthorize_allowdeny'), + _('Allow or deny access')); $this->hidden('token', common_session_token()); $this->hidden('oauth_token', $this->oauth_token); $this->hidden('oauth_callback', $this->callback); - $this->elementStart('fieldset'); - - $this->elementStart('ul'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); + $this->elementStart('p'); if (!empty($this->app->icon)) { $this->element('img', array('src' => $this->app->icon)); } - $this->elementEnd('li'); - $this->elementStart('li'); $access = ($this->app->access_type & Oauth_application::$writeAccess) ? 'access and update' : 'access'; - $msg = _("The application %s by %s would like " . - "the ability to %s your account data."); + $msg = _("The application %s by %s would like " . + "the ability to %s your account data."); $this->raw(sprintf($msg, $this->app->name, $this->app->organization, $access)); - + $this->elementEnd('p'); $this->elementEnd('li'); $this->elementEnd('ul'); - $this->elementEnd('fieldset'); - if (!common_logged_in()) { $this->elementStart('fieldset'); @@ -355,17 +332,18 @@ class ApiOauthAuthorizeAction extends ApiOauthAction } $this->element('input', array('id' => 'deny_submit', - 'class' => 'submit', + 'class' => 'submit submit form_action-primary', 'name' => 'deny', 'type' => 'submit', 'value' => _('Deny'))); $this->element('input', array('id' => 'allow_submit', - 'class' => 'submit', + 'class' => 'submit submit form_action-secondary', 'name' => 'allow', 'type' => 'submit', 'value' => _('Allow'))); + $this->elementEnd('fieldset'); $this->elementEnd('form'); } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 82670c964..ff81d3727 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -177,7 +177,8 @@ font-weight:bold; #form_password_recover legend, #form_password_change legend, .form_entity_block legend, -#form_filter_bytag legend { +#form_filter_bytag legend, +#apioauthauthorize_allowdeny { display:none; } @@ -906,10 +907,15 @@ list-style-type:none; } .application img, #showapplication .entity_profile img, -#editapplication .form_data #application_icon img { +#editapplication .form_data #application_icon, +#apioauthauthorize .form_data img { max-width:96px; max-height:96px; } +#apioauthauthorize .form_data img { +margin-right:18px; +float:left; +} #showapplication .entity_profile { width:68%; } -- cgit v1.2.3-54-g00ecf From 6a4c88afe723b246cf3a2158ac2c1ad4161bdd43 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 14 Jan 2010 02:32:59 +0000 Subject: More relaxed selector for application icon and form checkbox --- theme/base/css/display.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'theme/base') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index ff81d3727..84e9426c7 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -907,7 +907,7 @@ list-style-type:none; } .application img, #showapplication .entity_profile img, -#editapplication .form_data #application_icon, +.form_data #application_icon img, #apioauthauthorize .form_data img { max-width:96px; max-height:96px; @@ -944,9 +944,9 @@ margin-left:1.795%; font-family:monospace; font-size:1.3em; } -#editapplication .form_data #application_types label.radio, -#editapplication .form_data #default_access_types label.radio { -width:15%; +.form_data #application_types label.radio, +.form_data #default_access_types label.radio { +width:14.5%; } /* NOTICE */ -- cgit v1.2.3-54-g00ecf From 04a37fa1c703955a51862033d83e59836c35d74f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 27 Jan 2010 15:08:33 +0000 Subject: Better alignment for notice in shownotice page --- theme/base/css/display.css | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'theme/base') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 84e9426c7..65dd15990 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -1039,12 +1039,13 @@ overflow:visible; #showstream .notice div.entry-content { margin-left:0; } -#shownotice .notice .entry-title, -#shownotice .notice div.entry-content { -margin-left:110px; -} #shownotice .notice .entry-title { +margin-left:110px; font-size:2.2em; +min-height:123px; +} +#shownotice .notice div.entry-content { +margin-left:0; } .notice p.entry-content { -- cgit v1.2.3-54-g00ecf From 1758ed453bcf2abd11bc2fde8768632099fe0de3 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 27 Jan 2010 06:25:22 -0500 Subject: move UAP plugin to core --- lib/uapplugin.php | 176 ++++++++++++++++++++++++++++++++++++++++++++++ plugins/UAP/UAPPlugin.php | 176 ---------------------------------------------- plugins/UAP/uap.css | 50 ------------- theme/base/css/uap.css | 50 +++++++++++++ 4 files changed, 226 insertions(+), 226 deletions(-) create mode 100644 lib/uapplugin.php delete mode 100644 plugins/UAP/UAPPlugin.php delete mode 100644 plugins/UAP/uap.css create mode 100644 theme/base/css/uap.css (limited to 'theme/base') diff --git a/lib/uapplugin.php b/lib/uapplugin.php new file mode 100644 index 000000000..f3b16548d --- /dev/null +++ b/lib/uapplugin.php @@ -0,0 +1,176 @@ +. + * + * @category Action + * @package StatusNet + * @author Sarven Capadisli + * @copyright 2010 StatusNet, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://status.net/ + */ + +if (!defined('STATUSNET') && !defined('LACONICA')) { + exit(1); +} + +/** + * Outputs the following ad types (based on UAP): + * Medium Rectangle 300x250 + * Rectangle 180x150 + * Leaderboard 728x90 + * Wide Skyscraper 160x600 + * + * Any number of ad types can be used. Enable all using example: + * addPlugin('UAP', array( + * 'MediumRectangle' => '', + * 'Rectangle' => '', + * 'Leaderboard' => '', + * 'WideSkyscraper' => '' + * ) + * ); + * + * @category Plugin + * @package StatusNet + * @author Sarven Capadisli + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://status.net/ + */ + +class UAPPlugin extends Plugin +{ + public $MediumRectangle = null; + public $Rectangle = null; + public $Leaderboard = null; + public $WideSkyscraper = null; + + function __construct($uap = array()) + { + $this->uap = $uap; + + parent::__construct(); + } + + function onInitializePlugin() + { + foreach($this->uap as $key => $value) { + switch(strtolower($key)) { + case 'mediumrectangle': default: + $this->MediumRectangle = $value; + break; + case 'rectangle': + $this->Rectangle = $value; + break; + case 'leaderboard': + $this->Leaderboard = $value; + break; + case 'wideskyscraper': + $this->WideSkyscraper = $value; + break; + } + } + } + + function onEndShowStatusNetStyles($action) + { + $action->cssLink(common_path('plugins/UAP/uap.css'), + null, 'screen, projection, tv'); + return true; + } + + //MediumRectangle ad + function onStartShowAside($action) + { + if (!$this->MediumRectangle) { + return true; + } + + $this->showAd($action, array('id' => 'ad_medium-rectangle'), + $this->MediumRectangle); + + return true; + } + +/* + //Rectangle ad + function onEndShowSiteNotice($action) + { + if (!$this->Rectangle) { + return true; + } + + $this->showAd($action, array('id' => 'ad_rectangle'), + $this->Rectangle); + + return true; + } +*/ + + //Leaderboard and Rectangle ad + function onStartShowHeader($action) + { + if ($this->Leaderboard) { + $this->showAd($action, array('id' => 'ad_leaderboard'), + $this->Leaderboard); + } + + if ($this->Rectangle) { + $this->showAd($action, array('id' => 'ad_rectangle'), + $this->Rectangle); + } + + return true; + } + + //WideSkyscraper ad + function onEndShowAside($action) + { + if (!$this->WideSkyscraper) { + return true; + } + + $this->showAd($action, array('id' => 'ad_wide-skyscraper'), + $this->WideSkyscraper); + + return true; + } + + //Output ad container + function showAd($action, $attr=array(), $value) + { + $classes = ($attr['class']) ? $attr['class'].' ' : ''; + + $action->elementStart('div', array('id' => $attr['id'], + 'class' => $classes.'ad')); + $action->raw($value); + $action->elementEnd('div'); + } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'UAP', + 'version' => STATUSNET_VERSION, + 'author' => 'Sarven Capadisli', + 'homepage' => 'http://status.net/wiki/Plugin:UAP', + 'rawdescription' => + _m('Outputs ad placements based on Universal Ad Package')); + return true; + } +} diff --git a/plugins/UAP/UAPPlugin.php b/plugins/UAP/UAPPlugin.php deleted file mode 100644 index f3b16548d..000000000 --- a/plugins/UAP/UAPPlugin.php +++ /dev/null @@ -1,176 +0,0 @@ -. - * - * @category Action - * @package StatusNet - * @author Sarven Capadisli - * @copyright 2010 StatusNet, Inc. - * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://status.net/ - */ - -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} - -/** - * Outputs the following ad types (based on UAP): - * Medium Rectangle 300x250 - * Rectangle 180x150 - * Leaderboard 728x90 - * Wide Skyscraper 160x600 - * - * Any number of ad types can be used. Enable all using example: - * addPlugin('UAP', array( - * 'MediumRectangle' => '', - * 'Rectangle' => '', - * 'Leaderboard' => '', - * 'WideSkyscraper' => '' - * ) - * ); - * - * @category Plugin - * @package StatusNet - * @author Sarven Capadisli - * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://status.net/ - */ - -class UAPPlugin extends Plugin -{ - public $MediumRectangle = null; - public $Rectangle = null; - public $Leaderboard = null; - public $WideSkyscraper = null; - - function __construct($uap = array()) - { - $this->uap = $uap; - - parent::__construct(); - } - - function onInitializePlugin() - { - foreach($this->uap as $key => $value) { - switch(strtolower($key)) { - case 'mediumrectangle': default: - $this->MediumRectangle = $value; - break; - case 'rectangle': - $this->Rectangle = $value; - break; - case 'leaderboard': - $this->Leaderboard = $value; - break; - case 'wideskyscraper': - $this->WideSkyscraper = $value; - break; - } - } - } - - function onEndShowStatusNetStyles($action) - { - $action->cssLink(common_path('plugins/UAP/uap.css'), - null, 'screen, projection, tv'); - return true; - } - - //MediumRectangle ad - function onStartShowAside($action) - { - if (!$this->MediumRectangle) { - return true; - } - - $this->showAd($action, array('id' => 'ad_medium-rectangle'), - $this->MediumRectangle); - - return true; - } - -/* - //Rectangle ad - function onEndShowSiteNotice($action) - { - if (!$this->Rectangle) { - return true; - } - - $this->showAd($action, array('id' => 'ad_rectangle'), - $this->Rectangle); - - return true; - } -*/ - - //Leaderboard and Rectangle ad - function onStartShowHeader($action) - { - if ($this->Leaderboard) { - $this->showAd($action, array('id' => 'ad_leaderboard'), - $this->Leaderboard); - } - - if ($this->Rectangle) { - $this->showAd($action, array('id' => 'ad_rectangle'), - $this->Rectangle); - } - - return true; - } - - //WideSkyscraper ad - function onEndShowAside($action) - { - if (!$this->WideSkyscraper) { - return true; - } - - $this->showAd($action, array('id' => 'ad_wide-skyscraper'), - $this->WideSkyscraper); - - return true; - } - - //Output ad container - function showAd($action, $attr=array(), $value) - { - $classes = ($attr['class']) ? $attr['class'].' ' : ''; - - $action->elementStart('div', array('id' => $attr['id'], - 'class' => $classes.'ad')); - $action->raw($value); - $action->elementEnd('div'); - } - - function onPluginVersion(&$versions) - { - $versions[] = array('name' => 'UAP', - 'version' => STATUSNET_VERSION, - 'author' => 'Sarven Capadisli', - 'homepage' => 'http://status.net/wiki/Plugin:UAP', - 'rawdescription' => - _m('Outputs ad placements based on Universal Ad Package')); - return true; - } -} diff --git a/plugins/UAP/uap.css b/plugins/UAP/uap.css deleted file mode 100644 index 90abe5180..000000000 --- a/plugins/UAP/uap.css +++ /dev/null @@ -1,50 +0,0 @@ -/** Universal Ad Package styles: - * Medium Rectangle 300x250 - * Rectangle 180x150 - * Leaderboard 728x90 - * Wide Skyscraper 160x600 - * - * @package StatusNet - * @author Sarven Capadisli - * @copyright 2010 StatusNet, Inc. - * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://status.net/ - */ - - -.ad { -border:1px solid #CCC; -float:left; -} - -#ad_medium-rectangle { -width:300px; -height:250px; - -margin-left:1.35%; -margin-bottom:18px; -} - -#ad_rectangle { -width:180px; -height:150px; - -float:right; -margin-right:18px; -} - -#ad_leaderboard { -width:728px; -height:90px; - -margin:29px 18px 0 0; -clear:both; -} - -#ad_wide-skyscraper { -width:160px; -height:600px; - -margin-top:18px; -margin-left:8.5%; -} diff --git a/theme/base/css/uap.css b/theme/base/css/uap.css new file mode 100644 index 000000000..90abe5180 --- /dev/null +++ b/theme/base/css/uap.css @@ -0,0 +1,50 @@ +/** Universal Ad Package styles: + * Medium Rectangle 300x250 + * Rectangle 180x150 + * Leaderboard 728x90 + * Wide Skyscraper 160x600 + * + * @package StatusNet + * @author Sarven Capadisli + * @copyright 2010 StatusNet, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://status.net/ + */ + + +.ad { +border:1px solid #CCC; +float:left; +} + +#ad_medium-rectangle { +width:300px; +height:250px; + +margin-left:1.35%; +margin-bottom:18px; +} + +#ad_rectangle { +width:180px; +height:150px; + +float:right; +margin-right:18px; +} + +#ad_leaderboard { +width:728px; +height:90px; + +margin:29px 18px 0 0; +clear:both; +} + +#ad_wide-skyscraper { +width:160px; +height:600px; + +margin-top:18px; +margin-left:8.5%; +} -- cgit v1.2.3-54-g00ecf From e3bd97bfe46ee7d063a45eec282b28faee1ca83f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 27 Jan 2010 15:14:00 +0100 Subject: Aligning wide skyscraper to the right instead of left --- theme/base/css/uap.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'theme/base') diff --git a/theme/base/css/uap.css b/theme/base/css/uap.css index 90abe5180..b95e9b2ce 100644 --- a/theme/base/css/uap.css +++ b/theme/base/css/uap.css @@ -45,6 +45,7 @@ clear:both; width:160px; height:600px; +float:right; margin-top:18px; -margin-left:8.5%; +margin-right:8.25%; } -- cgit v1.2.3-54-g00ecf From 1c875a53952506ca95716992511421d110a37d4d Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 27 Jan 2010 15:32:59 +0100 Subject: Moved rectangle ad into aside and leaderboard to the right in header. Intention for this layout was to reduce whitespace in header area --- lib/uapplugin.php | 15 ++++++++++++++- theme/base/css/uap.css | 9 ++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'theme/base') diff --git a/lib/uapplugin.php b/lib/uapplugin.php index 4364b1e19..69b68f936 100644 --- a/lib/uapplugin.php +++ b/lib/uapplugin.php @@ -99,7 +99,7 @@ abstract class UAPPlugin extends Plugin } /** - * Add a leaderboard and/or rectangle in the header + * Add a leaderboard in the header * * @param Action $action Action being shown * @@ -116,6 +116,19 @@ abstract class UAPPlugin extends Plugin $action->elementEnd('div'); } + return true; + } + + /** + * Add a rectangle before aside sections + * + * @param Action $action Action being shown + * + * @return boolean hook flag + */ + + function onStartShowSections($action) + { if (!is_null($this->rectangle)) { $action->elementStart('div', array('id' => 'ad_rectangle', diff --git a/theme/base/css/uap.css b/theme/base/css/uap.css index b95e9b2ce..d7fa02c7f 100644 --- a/theme/base/css/uap.css +++ b/theme/base/css/uap.css @@ -29,15 +29,18 @@ margin-bottom:18px; width:180px; height:150px; -float:right; -margin-right:18px; +float:none; +clear:both; +margin:0 auto; +margin-bottom:29px; } #ad_leaderboard { width:728px; height:90px; -margin:29px 18px 0 0; +margin:11px 18px 0 0; +float:right; clear:both; } -- cgit v1.2.3-54-g00ecf From 5e31ecd82aaf102382380b1352503303893cf9ba Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 27 Jan 2010 16:52:18 +0100 Subject: Centred leaderboard ad --- theme/base/css/uap.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'theme/base') diff --git a/theme/base/css/uap.css b/theme/base/css/uap.css index d7fa02c7f..73be5f0c1 100644 --- a/theme/base/css/uap.css +++ b/theme/base/css/uap.css @@ -39,8 +39,8 @@ margin-bottom:29px; width:728px; height:90px; -margin:11px 18px 0 0; -float:right; +margin:0 auto 18px; +float:none; clear:both; } -- cgit v1.2.3-54-g00ecf