From d09444309f80fe1f274ec2dda4975a96506fcca9 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 2 Oct 2009 11:46:14 +0000 Subject: Init for WAP 2.0 and XHTML Mobile Profile support. WAP20Plugin is a superclass for various WAP 2.0 document types. MobileProfilePlugin extends WAP20Plugin and it is intended for serving XHTML Mobile Profile 1.0. Feature support for document types like WML 2.0 or WAP Push should be created as seperate plugins and quite possibly extend WAP20Plugin. --- plugins/Mobile/WAP20Plugin.php | 56 +++++++++++ plugins/MobileProfile/MobileProfilePlugin.php | 129 ++++++++++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 plugins/Mobile/WAP20Plugin.php create mode 100644 plugins/MobileProfile/MobileProfilePlugin.php (limited to 'plugins') diff --git a/plugins/Mobile/WAP20Plugin.php b/plugins/Mobile/WAP20Plugin.php new file mode 100644 index 000000000..aae48a520 --- /dev/null +++ b/plugins/Mobile/WAP20Plugin.php @@ -0,0 +1,56 @@ +. + * + * @category Plugin + * @package StatusNet + * @author Sarven Capadisli + * @copyright 2009 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); +} + + +/** + * Superclass for plugin to output XHTML Mobile Profile + * + * @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 WAP20Plugin extends Plugin +{ + + function onStartShowHTML($action) + { + + } + +} + + +?> diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php new file mode 100644 index 000000000..5ee2d9097 --- /dev/null +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -0,0 +1,129 @@ +. + * + * @category Plugin + * @package StatusNet + * @author Sarven Capadisli + * @copyright 2009 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); +} + +define('PAGE_TYPE_PREFS', + 'application/vnd.wap.xhtml+xml, application/xhtml+xml, text/xml;q=0.9'. + ', text/html;q=0.3' + ); + +require_once INSTALLDIR.'/plugins/Mobile/WAP20Plugin.php'; + + +/** + * Superclass for plugin to output XHTML Mobile Profile + * + * @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 MobileProfilePlugin extends WAP20Plugin +{ + public $DTDversion = null; + public $serveMobile = false; + + function __construct($DTD='http://www.wapforum.org/DTD/xhtml-mobile10.dtd') + { + $this->DTD = $DTD; + + parent::__construct(); + } + + + function onStartShowHTML($action) + { + if (!$type) { + $httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? + $_SERVER['HTTP_ACCEPT'] : null; + + $cp = common_accept_to_prefs($httpaccept); + $sp = common_accept_to_prefs(PAGE_TYPE_PREFS); + + $type = common_negotiate_type($cp, $sp); + + if (!$type) { + throw new ClientException(_('This page is not available in a '. + 'media type you accept'), 406); + } + } + + // XXX: If user is on the mobile site e.g., m.siteserver.com + // or they really want it, serve the mobile version + + // FIXME: This is dirty and probably not accurate of doing it + if ((common_config('site', 'mobileserver').'/'.common_config('site', 'path').'/' == + $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']) || + preg_match("/.*\/.*wap.*xml/", $type)) { + + $this->serveMobile = true; + } + else { + $this->serveMobile = false; + return true; + } + + header('Content-Type: '.$type); + + $action->extraHeaders(); + + $action->startXML('html', + '-//WAPFORUM//DTD XHTML Mobile 1.0//EN', + $this->DTD); + + $language = $action->getLanguage(); + + $action->elementStart('html', array('xmlns' => 'http://www.w3.org/1999/xhtml', + 'xml:lang' => $language)); + + return false; + } + + + + function onStartShowAside($action) + { + + } + + + function onStartShowScripts($action) + { + + } + +} + + +?> -- cgit v1.2.3-54-g00ecf From 43cd0f87190e55c0973350265fffd2e6c3e5caa2 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 2 Oct 2009 12:46:26 +0000 Subject: Don't need text/xml until further evidence --- plugins/MobileProfile/MobileProfilePlugin.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 5ee2d9097..dd67ffcc9 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -32,9 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { } define('PAGE_TYPE_PREFS', - 'application/vnd.wap.xhtml+xml, application/xhtml+xml, text/xml;q=0.9'. - ', text/html;q=0.3' - ); + 'application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html;q=0.9'); require_once INSTALLDIR.'/plugins/Mobile/WAP20Plugin.php'; -- cgit v1.2.3-54-g00ecf From c2046a9ab6539669f8fdfe24798b124246e7807c Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 2 Oct 2009 15:38:20 +0000 Subject: Better logic to determine what to do with the visitor. Whether to serve them the Mobile Profile or not, and possibly redirect. --- plugins/MobileProfile/MobileProfilePlugin.php | 54 +++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 8 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index dd67ffcc9..cce8f8081 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -77,19 +77,57 @@ class MobileProfilePlugin extends WAP20Plugin } } - // XXX: If user is on the mobile site e.g., m.siteserver.com - // or they really want it, serve the mobile version + // XXX: This should probably graduate to WAP20Plugin - // FIXME: This is dirty and probably not accurate of doing it - if ((common_config('site', 'mobileserver').'/'.common_config('site', 'path').'/' == - $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']) || - preg_match("/.*\/.*wap.*xml/", $type)) { + // If they are on the mobile site, serve them MP + if ((common_config('site', 'mobileserver').'/'. + common_config('site', 'path').'/' == + $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])) { $this->serveMobile = true; } else { - $this->serveMobile = false; - return true; + // If they like the WAP 2.0 mimetype, serve them MP + if (strstr('application/vnd.wap.xhtml+xml', $type) !== false) { + $this->serveMobile = true; + } + else { + // If they are a mobile device that supports WAP 2.0, + // serve them MP + + // XXX: Browser sniffing sucks + // I really don't like going through this every page, + // find a better way + $this->mobiledevices = + array('alcatel', 'android', 'audiovox', 'au-mic,', + 'avantgo', 'blackberry', 'blazer', 'cldc-', 'danger', + 'epoc', 'ericsson', 'ericy', 'ipone', 'ipaq', 'j2me', + 'lg', 'midp-', 'mobile', 'mot', 'netfront', 'nitro', + 'nokia', 'opera mini', 'palm', 'palmsource', + 'panasonic', 'philips', 'pocketpc', 'portalmmm', + 'rover', 'samsung', 'sanyo', 'series60', 'sharp', + 'sie-', 'smartphone', 'sony', 'symbian', + 'up.browser', 'up.link', 'up.link', 'vodafone', + 'wap1', 'wap2', 'windows ce'); + + $httpuseragent = strtolower($_SERVER['HTTP_USER_AGENT']); + + foreach($this->mobiledevices as $mb) { + if (strstr($httpuseragent, $mb) !== false) { + $this->serveMobile = true; + break; + } + } + } + + // If they are okay with MP, and the site has a mobile server, + // redirect there + if ($this->serveMobile && + common_config('site', 'mobileserver') !== false) { + + header("Location: ".common_config('site', 'mobileserver')); + exit(); + } } header('Content-Type: '.$type); -- cgit v1.2.3-54-g00ecf From 604cfd8b116886cac04a8d062c66f11fb601318f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 3 Oct 2009 20:17:26 +0000 Subject: Updated comment about browser sniffing --- plugins/MobileProfile/MobileProfilePlugin.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index cce8f8081..f594f3c0e 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -96,8 +96,16 @@ class MobileProfilePlugin extends WAP20Plugin // serve them MP // XXX: Browser sniffing sucks + // I really don't like going through this every page, // find a better way + + // May be better to categorize the devices in terms of + // low,mid,high-end + + // Or, detect the mobile devices based on their support for + // MP 1.0, 1.1, or 1.2 may be ideal. Possible? + $this->mobiledevices = array('alcatel', 'android', 'audiovox', 'au-mic,', 'avantgo', 'blackberry', 'blazer', 'cldc-', 'danger', @@ -112,8 +120,8 @@ class MobileProfilePlugin extends WAP20Plugin $httpuseragent = strtolower($_SERVER['HTTP_USER_AGENT']); - foreach($this->mobiledevices as $mb) { - if (strstr($httpuseragent, $mb) !== false) { + foreach($this->mobiledevices as $md) { + if (strstr($httpuseragent, $md) !== false) { $this->serveMobile = true; break; } -- cgit v1.2.3-54-g00ecf From 63700f79588ded641645bc5eaf9265ea837bfff6 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 3 Oct 2009 20:22:40 +0000 Subject: Minor correction to public variable name --- plugins/MobileProfile/MobileProfilePlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index f594f3c0e..cd88a6f7b 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -49,7 +49,7 @@ require_once INSTALLDIR.'/plugins/Mobile/WAP20Plugin.php'; class MobileProfilePlugin extends WAP20Plugin { - public $DTDversion = null; + public $DTD = null; public $serveMobile = false; function __construct($DTD='http://www.wapforum.org/DTD/xhtml-mobile10.dtd') -- cgit v1.2.3-54-g00ecf From f344a49b11607d4dbb64ab6935237cd5185a06b4 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 3 Oct 2009 21:29:14 +0000 Subject: Don't show .aside --- plugins/MobileProfile/MobileProfilePlugin.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index cd88a6f7b..932550189 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -49,7 +49,7 @@ require_once INSTALLDIR.'/plugins/Mobile/WAP20Plugin.php'; class MobileProfilePlugin extends WAP20Plugin { - public $DTD = null; + public $DTD = null; public $serveMobile = false; function __construct($DTD='http://www.wapforum.org/DTD/xhtml-mobile10.dtd') @@ -158,7 +158,9 @@ class MobileProfilePlugin extends WAP20Plugin function onStartShowAside($action) { - + if ($this->serveMobile) { + return false; + } } -- cgit v1.2.3-54-g00ecf From 960207c81eb9f420f916c6889f2f4b4c09a5a480 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 13:27:46 +0000 Subject: Don't redirect if mobile server is same as site server --- plugins/MobileProfile/MobileProfilePlugin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 932550189..d854b6e5e 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -131,7 +131,9 @@ class MobileProfilePlugin extends WAP20Plugin // If they are okay with MP, and the site has a mobile server, // redirect there if ($this->serveMobile && - common_config('site', 'mobileserver') !== false) { + common_config('site', 'mobileserver') !== false && + common_config('site', 'mobileserver') != + common_config('site', 'server')) { header("Location: ".common_config('site', 'mobileserver')); exit(); -- cgit v1.2.3-54-g00ecf From c64e1792bf108961c288ffa91667be34d9e6ca6a Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 13:58:29 +0000 Subject: Fixed redirect. Added common_path for mobileserver --- plugins/MobileProfile/MobileProfilePlugin.php | 28 ++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index d854b6e5e..02a732493 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -132,10 +132,11 @@ class MobileProfilePlugin extends WAP20Plugin // redirect there if ($this->serveMobile && common_config('site', 'mobileserver') !== false && - common_config('site', 'mobileserver') != - common_config('site', 'server')) { + (common_config('site', 'mobileserver') != + common_config('site', 'server'))) { - header("Location: ".common_config('site', 'mobileserver')); + // FIXME: Redirect to equivalent page on mobile site instead + header("Location: ".$this->_common_path('')); exit(); } } @@ -171,6 +172,27 @@ class MobileProfilePlugin extends WAP20Plugin } + + function _common_path($relative, $ssl=false) + { + $pathpart = (common_config('site', 'path')) ? common_config('site', 'path')."/" : ''; + + if (($ssl && (common_config('site', 'ssl') === 'sometimes')) + || common_config('site', 'ssl') === 'always') { + $proto = 'https'; + if (is_string(common_config('site', 'sslserver')) && + mb_strlen(common_config('site', 'sslserver')) > 0) { + $serverpart = common_config('site', 'sslserver'); + } else { + $serverpart = common_config('site', 'mobileserver'); + } + } else { + $proto = 'http'; + $serverpart = common_config('site', 'mobileserver'); + } + + return $proto.'://'.$serverpart.'/'.$pathpart.$relative; + } } -- cgit v1.2.3-54-g00ecf From 7addccacaab5bf7510fbe537b512bc8d5c3f558f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 16:26:04 +0000 Subject: Added ability to define mobile stylesheets (handheld, screen) at the theme level. If there are no mobile stylesheets in the theme directory, it will use the ones that come with the plugin. --- plugins/MobileProfile/MobileProfilePlugin.php | 24 ++++++++++++++++++++++++ plugins/MobileProfile/mp-handheld.css | 0 plugins/MobileProfile/mp-screen.css | 1 + 3 files changed, 25 insertions(+) create mode 100644 plugins/MobileProfile/mp-handheld.css create mode 100644 plugins/MobileProfile/mp-screen.css (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 02a732493..35756cfe7 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -158,6 +158,30 @@ class MobileProfilePlugin extends WAP20Plugin } + function onStartShowStatusNetStyles($action) { + if (file_exists(theme_file('css/mp-screen.css'))) { + $action->cssLink('css/mp-screen.css', null, 'screen'); + } + else { + $action->element('link', array('rel' => 'stylesheet', + 'type' => 'text/css', + 'href' => common_path('plugins/MobileProfile/mp-screen.css') . '?version=' . STATUSNET_VERSION, + 'media' => 'screen')); + } + + if (file_exists(theme_file('css/mp-handheld.css'))) { + $action->cssLink('css/mp-handheld.css', null, 'handheld'); + } + else { + $action->element('link', array('rel' => 'stylesheet', + 'type' => 'text/css', + 'href' => common_path('plugins/MobileProfile/mp-handheld.css') . '?version=' . STATUSNET_VERSION, + 'media' => 'handheld')); + } + + return false; + } + function onStartShowAside($action) { diff --git a/plugins/MobileProfile/mp-handheld.css b/plugins/MobileProfile/mp-handheld.css new file mode 100644 index 000000000..e69de29bb diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css new file mode 100644 index 000000000..31986eef0 --- /dev/null +++ b/plugins/MobileProfile/mp-screen.css @@ -0,0 +1 @@ +@import url(../../theme/base/css/display.css); -- cgit v1.2.3-54-g00ecf From de2c4e36bc5e36714db32b4987f1fde1903dc059 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 16:33:52 +0000 Subject: Mobile Profile plugin will use the identica theme for now --- plugins/MobileProfile/mp-screen.css | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 31986eef0..5aec3c372 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -1 +1,2 @@ @import url(../../theme/base/css/display.css); +@import url(../../theme/identica/css/display.css); -- cgit v1.2.3-54-g00ecf From a7bed6f7d90098a16ec6da743ac34f0983e6afe3 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 16:50:53 +0000 Subject: Added custom showHead --- plugins/MobileProfile/MobileProfilePlugin.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 35756cfe7..e7db09f15 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -158,6 +158,20 @@ class MobileProfilePlugin extends WAP20Plugin } + function onStartShowHeadElements($action) { + if (!$action->serveMobile) { + return true; + } + + $action->showTitle(); + $action->showShortcutIcon(); + $action->showStylesheets(); + $action->showFeeds(); + $action->showDescription(); + $action->extraHead(); + } + + function onStartShowStatusNetStyles($action) { if (file_exists(theme_file('css/mp-screen.css'))) { $action->cssLink('css/mp-screen.css', null, 'screen'); -- cgit v1.2.3-54-g00ecf From ef7e4cb72d12b714215317635e1de4badf340529 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 20:42:03 +0000 Subject: If not meant to serveMobile, show the default styles --- plugins/MobileProfile/MobileProfilePlugin.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index e7db09f15..117e0aae6 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -173,6 +173,10 @@ class MobileProfilePlugin extends WAP20Plugin function onStartShowStatusNetStyles($action) { + if (!$action->serveMobile) { + return true; + } + if (file_exists(theme_file('css/mp-screen.css'))) { $action->cssLink('css/mp-screen.css', null, 'screen'); } -- cgit v1.2.3-54-g00ecf From 3ee1af9aaa3a7e69a97f36498e6fe9617f708581 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 20:43:52 +0000 Subject: Minor adjustment to indenting --- plugins/MobileProfile/MobileProfilePlugin.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 117e0aae6..3f3d10261 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -158,7 +158,8 @@ class MobileProfilePlugin extends WAP20Plugin } - function onStartShowHeadElements($action) { + function onStartShowHeadElements($action) + { if (!$action->serveMobile) { return true; } @@ -172,7 +173,8 @@ class MobileProfilePlugin extends WAP20Plugin } - function onStartShowStatusNetStyles($action) { + function onStartShowStatusNetStyles($action) + { if (!$action->serveMobile) { return true; } -- cgit v1.2.3-54-g00ecf From fe4a49d4a5cc728d6ee0484ceecba796af29fc42 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 20:53:30 +0000 Subject: If they are not on the mobile site or not interested in getting the mobile profile, then give them the regular output. --- plugins/MobileProfile/MobileProfilePlugin.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 3f3d10261..28a2eb0c1 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -141,6 +141,10 @@ class MobileProfilePlugin extends WAP20Plugin } } + if (!$this->serveMobile) { + return true; + } + header('Content-Type: '.$type); $action->extraHeaders(); -- cgit v1.2.3-54-g00ecf From 5087a24c487891f4c5bc9fe2ff65be12fa74b930 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 21:09:16 +0000 Subject: Init showHeader --- plugins/MobileProfile/MobileProfilePlugin.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 28a2eb0c1..90ec8129d 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -207,6 +207,25 @@ class MobileProfilePlugin extends WAP20Plugin } + function onStartShowHeader($action) + { + if (!$this->serveMobile) { + return true; + } + + $action->elementStart('div', array('id' => 'header')); + $action->showLogo(); + $action->showPrimaryNav(); + $action->showSiteNotice(); + if (common_logged_in()) { + $action->showNoticeForm(); + } else { + $action->showAnonymousMessage(); + } + $action->elementEnd('div'); + } + + function onStartShowAside($action) { if ($this->serveMobile) { -- cgit v1.2.3-54-g00ecf From d001c5f4b1ebfd2a28baba3138eae4902598618c Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 21:37:05 +0000 Subject: Init showLogo --- plugins/MobileProfile/MobileProfilePlugin.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 90ec8129d..4e9bfd6c8 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -214,7 +214,7 @@ class MobileProfilePlugin extends WAP20Plugin } $action->elementStart('div', array('id' => 'header')); - $action->showLogo(); + $this->_showLogo($action); $action->showPrimaryNav(); $action->showSiteNotice(); if (common_logged_in()) { @@ -226,6 +226,26 @@ class MobileProfilePlugin extends WAP20Plugin } + function _showLogo($action) + { + $action->elementStart('address', 'vcard'); + $action->elementStart('a', array('class' => 'url home bookmark', + 'href' => common_local_url('public'))); + if (common_config('site', 'mobilelogo') || + file_exists(theme_file('logo.png')) || + file_exists(theme_file('mobilelogo.gif'))) { + + $action->element('img', array('class' => 'photo', + 'src' => (common_config('site', 'mobilelogo')) ? common_config('site', 'mobilelogo') : + ((file_exists(theme_file('mobilelogo.gif'))) ? (theme_path('mobilelogo.gif')): theme_path('logo.png')), + 'alt' => common_config('site', 'name'))); + } + $action->element('span', array('class' => 'fn org'), common_config('site', 'name')); + $action->elementEnd('a'); + $action->elementEnd('address'); + } + + function onStartShowAside($action) { if ($this->serveMobile) { -- cgit v1.2.3-54-g00ecf From 3c9f177c03f631cdbc8f0a440fd2dc84d6252419 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 21:37:24 +0000 Subject: Stop output after showing header --- plugins/MobileProfile/MobileProfilePlugin.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 4e9bfd6c8..c28d61cbe 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -223,6 +223,8 @@ class MobileProfilePlugin extends WAP20Plugin $action->showAnonymousMessage(); } $action->elementEnd('div'); + + return false; } -- cgit v1.2.3-54-g00ecf From 479a5e74a3cdc70c1e69c96d04c505c8efa00eb9 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 21:42:38 +0000 Subject: Removed site_notice and anon_notice from output because this information is not particularly crucial for the mobile user. --- plugins/MobileProfile/MobileProfilePlugin.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index c28d61cbe..37aeeee87 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -216,11 +216,8 @@ class MobileProfilePlugin extends WAP20Plugin $action->elementStart('div', array('id' => 'header')); $this->_showLogo($action); $action->showPrimaryNav(); - $action->showSiteNotice(); if (common_logged_in()) { $action->showNoticeForm(); - } else { - $action->showAnonymousMessage(); } $action->elementEnd('div'); -- cgit v1.2.3-54-g00ecf From acda8d4c7914b0bcea974c34d72c8b93ba731c17 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 4 Oct 2009 22:16:59 +0000 Subject: Init showPrimaryNav --- plugins/MobileProfile/MobileProfilePlugin.php | 48 ++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 37aeeee87..7a36522f1 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -215,7 +215,7 @@ class MobileProfilePlugin extends WAP20Plugin $action->elementStart('div', array('id' => 'header')); $this->_showLogo($action); - $action->showPrimaryNav(); + $this->_showPrimaryNav($action); if (common_logged_in()) { $action->showNoticeForm(); } @@ -245,6 +245,52 @@ class MobileProfilePlugin extends WAP20Plugin } + function _showPrimaryNav($action) { + $user = common_current_user(); + $connect = ''; + if (common_config('xmpp', 'enabled')) { + $connect = 'imsettings'; + } else if (common_config('sms', 'enabled')) { + $connect = 'smssettings'; + } else if (common_config('twitter', 'enabled')) { + $connect = 'twittersettings'; + } + + $action->elementStart('ul', array('id' => 'site_nav_global_primary')); + if ($user) { + $action->menuItem(common_local_url('all', array('nickname' => $user->nickname)), + _('Home')); + $action->menuItem(common_local_url('profilesettings'), + _('Account')); + if ($connect) { + $action->menuItem(common_local_url($connect), + _('Connect')); + } + if (common_config('invite', 'enabled')) { + $action->menuItem(common_local_url('invite'), + _('Invite')); + } + $action->menuItem(common_local_url('logout'), + _('Logout')); + } + else { + if (!common_config('site', 'closed')) { + $action->menuItem(common_local_url('register'), + _('Register')); + } + $action->menuItem(common_local_url('login'), + _('Login')); + } + $action->menuItem(common_local_url('doc', array('title' => 'help')), + _('Help')); + if ($user || !common_config('site', 'private')) { + $action->menuItem(common_local_url('peoplesearch'), + _('Search')); + } + $action->elementEnd('ul'); + } + + function onStartShowAside($action) { if ($this->serveMobile) { -- cgit v1.2.3-54-g00ecf From 5c01501f5534fed7d0ec32ac4a33396bd99f508d Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 5 Oct 2009 10:29:34 +0000 Subject: Minor correction --- plugins/MobileProfile/MobileProfilePlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 7a36522f1..79b080b03 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -179,7 +179,7 @@ class MobileProfilePlugin extends WAP20Plugin function onStartShowStatusNetStyles($action) { - if (!$action->serveMobile) { + if (!$this->serveMobile) { return true; } -- cgit v1.2.3-54-g00ecf From 676f681d22bcb1d4b3b3b4216622d2cbf7f637c3 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 5 Oct 2009 11:04:32 +0000 Subject: Init mobile profile screen stylesheet. It reuses base and identica themes. The handheld stylesheet could import this stylesheet as well. --- plugins/MobileProfile/mp-screen.css | 61 +++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 5aec3c372..9ed3a1900 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -1,2 +1,63 @@ @import url(../../theme/base/css/display.css); @import url(../../theme/identica/css/display.css); + +#wrap { +min-width:0; +max-width:100%; +} + +#header { +margin:2%; +} + +address { +margin:0 1% 0; +} +address .vcard .photo { +margin-right:0; +} + +#site_nav_global_primary { +margin-right:0; +width:35%; +list-style-type:none; +} +#site_nav_global_primary li { +margin-left:3%; +} + +/*Remove this from HTML*/ +#form_notice label[for=notice_data-text] { +display:none; +} + +#form_notice { +width:100%; +} + +#site_nav_local_views li { +margin-left:1px; +margin-right:0; +} +#site_nav_local_views li:first-child { +margin-left:0; +} +#site_nav_local_views a { +padding:0 3%; +display:block; +} +#site_nav_local_views .current a { +text-shadow:none; +} +#site_nav_local_views li { +-moz-box-shadow:none; +-webkit-box-shadow:none; +box-shadow:none; +} + + +#content { +width:96.41%; +} + + -- cgit v1.2.3-54-g00ecf From 7b4d138946d76200ce1c7c20e85e67538be5bf10 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 5 Oct 2009 14:42:11 +0000 Subject: Init showNoticeFormData --- plugins/MobileProfile/MobileProfilePlugin.php | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 79b080b03..21eaa124e 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -291,6 +291,45 @@ class MobileProfilePlugin extends WAP20Plugin } + function onStartShowNoticeFormData($form) + { + if (!$this->serveMobile) { + return true; + } + + $form->out->element('textarea', array('id' => 'notice_data-text', + 'cols' => 35, + 'rows' => 4, + 'name' => 'status_textarea'), + ($form->content) ? $form->content : ''); + + $contentLimit = Notice::maxContent(); + + $form->out->element('script', array('type' => 'text/javascript'), + 'maxLength = ' . $contentLimit . ';'); + + if ($contentLimit > 0) { + $form->out->element('div', array('id' => 'notice_text-count'), + $contentLimit); + } + + if (common_config('attachments', 'uploads')) { + $form->out->element('label', array('for' => 'notice_data-attach'),_('Attach')); + $form->out->element('input', array('id' => 'notice_data-attach', + 'type' => 'file', + 'name' => 'attach', + 'title' => _('Attach a file'))); + $form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota')); + } + if ($form->action) { + $form->out->hidden('notice_return-to', $form->action, 'returnto'); + } + $form->out->hidden('notice_in-reply-to', $form->inreplyto, 'inreplyto'); + + return false; + } + + function onStartShowAside($action) { if ($this->serveMobile) { -- cgit v1.2.3-54-g00ecf From 9898a38b34d9ae1131beb6278e3bc353c4123ccd Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 5 Oct 2009 15:46:32 +0000 Subject: No longer need to style --- plugins/MobileProfile/mp-screen.css | 4 ---- 1 file changed, 4 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 9ed3a1900..09c8b4127 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -26,10 +26,6 @@ list-style-type:none; margin-left:3%; } -/*Remove this from HTML*/ -#form_notice label[for=notice_data-text] { -display:none; -} #form_notice { width:100%; -- cgit v1.2.3-54-g00ecf From e224da0bf655678322b388164a4c4f9d249eaecb Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 5 Oct 2009 16:59:41 +0000 Subject: Init styles for form_notice --- plugins/MobileProfile/mp-screen.css | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 09c8b4127..641921f14 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -31,6 +31,22 @@ margin-left:3%; width:100%; } +#form_notice textarea { +width:75%; +} + +#notice_text-count { +position:absolute; +bottom:2px; +right:32.5%; +z-index:9; +} + +#notice_action-submit { +width:17%; +} + + #site_nav_local_views li { margin-left:1px; margin-right:0; -- cgit v1.2.3-54-g00ecf From 921b25bf6281eb9d9d500eb8f5d98b8b473794cb Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 9 Oct 2009 11:31:52 +0000 Subject: Some UI adjustments for form notice --- plugins/MobileProfile/mp-screen.css | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 641921f14..a8135e0b4 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -7,11 +7,11 @@ max-width:100%; } #header { -margin:2%; +margin:2% 4% 4% 2%; } address { -margin:0 1% 0; +margin:0 2% 0; } address .vcard .photo { margin-right:0; @@ -32,18 +32,27 @@ width:100%; } #form_notice textarea { -width:75%; +width:60%; +height:20px; } #notice_text-count { position:absolute; bottom:2px; -right:32.5%; +right:40%; z-index:9; } -#notice_action-submit { -width:17%; +#form_notice label[for="notice_data-attach"], +#form_notice #notice_data-attach { +top:0; +right:28%; +} + +#form_notice #notice_action-submit { +width:20%; +right:4%; +text-align:center; } -- cgit v1.2.3-54-g00ecf From e36c9523383769313b11a67aa3859cb09b20ec52 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 9 Oct 2009 12:28:38 +0000 Subject: Fixed notice-options --- plugins/MobileProfile/mp-screen.css | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index a8135e0b4..1fff2273d 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -82,3 +82,8 @@ width:96.41%; } +.notice-options { +width:90px; +margin-right:2%; +} + -- cgit v1.2.3-54-g00ecf From 0799f48197c67dbbbd1b613f1fc9c66d9250f2ae Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 9 Oct 2009 14:48:14 +0000 Subject: Updated mobilelogo extension --- plugins/MobileProfile/MobileProfilePlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 21eaa124e..1164974b9 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -236,7 +236,7 @@ class MobileProfilePlugin extends WAP20Plugin $action->element('img', array('class' => 'photo', 'src' => (common_config('site', 'mobilelogo')) ? common_config('site', 'mobilelogo') : - ((file_exists(theme_file('mobilelogo.gif'))) ? (theme_path('mobilelogo.gif')): theme_path('logo.png')), + ((file_exists(theme_file('mobilelogo.png'))) ? (theme_path('mobilelogo.png')) : theme_path('logo.png')), 'alt' => common_config('site', 'name'))); } $action->element('span', array('class' => 'fn org'), common_config('site', 'name')); -- cgit v1.2.3-54-g00ecf From 0b741f15c2519103240fcdc9e74651a5c584724f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 9 Oct 2009 15:32:56 +0000 Subject: Removed the Help item from global primary navigation in the header since it is also used in the footer area. Frees up 'precious'space. --- plugins/MobileProfile/MobileProfilePlugin.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 1164974b9..ecaea29c0 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -281,8 +281,6 @@ class MobileProfilePlugin extends WAP20Plugin $action->menuItem(common_local_url('login'), _('Login')); } - $action->menuItem(common_local_url('doc', array('title' => 'help')), - _('Help')); if ($user || !common_config('site', 'private')) { $action->menuItem(common_local_url('peoplesearch'), _('Search')); -- cgit v1.2.3-54-g00ecf From 76d7fa475e3bdfdf0f70da55d3a51d1123aa3e14 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 9 Oct 2009 15:34:57 +0000 Subject: Updated header UI --- plugins/MobileProfile/mp-screen.css | 40 +++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 1fff2273d..afc07422b 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -7,23 +7,42 @@ max-width:100%; } #header { -margin:2% 4% 4% 2%; +margin:0; +padding:2%; +width:96%; } address { -margin:0 2% 0; +margin:4% 0 0 0; } address .vcard .photo { margin-right:0; } +address img + .fn { +display:block; +margin-top:6%; +width:100%; +} + +.vcard .photo { +margin-right:7px; +} + + #site_nav_global_primary { -margin-right:0; -width:35%; +margin:0; +width:100%; list-style-type:none; +position:absolute; +top:0; +left:0; } #site_nav_global_primary li { -margin-left:3%; +margin-left:0; +margin-right:1%; +float:left; +font-size:0.9em; } @@ -43,10 +62,15 @@ right:40%; z-index:9; } +/*input type=file no good in +iPhone/iPod Touch, Android, Opera Mini Simulator +*/ +#form_notice #notice_text-count + label, #form_notice label[for="notice_data-attach"], #form_notice #notice_data-attach { top:0; -right:28%; +/*right:28%; Looks good but no good in iDevice, Android*/ +right:40%; } #form_notice #notice_action-submit { @@ -57,14 +81,14 @@ text-align:center; #site_nav_local_views li { -margin-left:1px; +margin-left:0; margin-right:0; } #site_nav_local_views li:first-child { margin-left:0; } #site_nav_local_views a { -padding:0 3%; +padding:0; display:block; } #site_nav_local_views .current a { -- cgit v1.2.3-54-g00ecf From 5dc728a756b37f552480b72237f227a659f57928 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 9 Oct 2009 16:18:47 +0000 Subject: Reduced whitespace --- plugins/MobileProfile/mp-screen.css | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index afc07422b..9b42149c0 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -21,7 +21,7 @@ margin-right:0; address img + .fn { display:block; -margin-top:6%; +margin-top:8%; width:100%; } @@ -40,7 +40,7 @@ left:0; } #site_nav_global_primary li { margin-left:0; -margin-right:1%; +margin-right:2%; float:left; font-size:0.9em; } @@ -105,9 +105,30 @@ box-shadow:none; width:96.41%; } +h1 { +margin-bottom:0; +} + +.notice, +.profile { +padding-top:4px; +padding-bottom:4px; +} +.notice .entry-title { +} +.notice div.entry-content { +margin-left:0; +width:75%; +} .notice-options { -width:90px; +width:70px; margin-right:2%; } + +#footer { +width:96%; +padding:2%; +} + -- cgit v1.2.3-54-g00ecf From 0947ca8b9331b03a172d86b37a511e50100fd0bb Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 12 Oct 2009 12:29:19 +0000 Subject: Init mp-handheld stylesheet. For now, it is reusing mp-screen. Future updates will handle media queries --- plugins/MobileProfile/mp-handheld.css | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-handheld.css b/plugins/MobileProfile/mp-handheld.css index e69de29bb..e0ea823d5 100644 --- a/plugins/MobileProfile/mp-handheld.css +++ b/plugins/MobileProfile/mp-handheld.css @@ -0,0 +1 @@ +@import url(mp-screen.css); -- cgit v1.2.3-54-g00ecf From 7af1c83f4e8d66e2f70006bf6568c5b8410a2311 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 12 Oct 2009 12:30:00 +0000 Subject: Fixed typo, added ipod --- plugins/MobileProfile/MobileProfilePlugin.php | 58 ++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 10 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index ecaea29c0..3785feeec 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -107,16 +107,54 @@ class MobileProfilePlugin extends WAP20Plugin // MP 1.0, 1.1, or 1.2 may be ideal. Possible? $this->mobiledevices = - array('alcatel', 'android', 'audiovox', 'au-mic,', - 'avantgo', 'blackberry', 'blazer', 'cldc-', 'danger', - 'epoc', 'ericsson', 'ericy', 'ipone', 'ipaq', 'j2me', - 'lg', 'midp-', 'mobile', 'mot', 'netfront', 'nitro', - 'nokia', 'opera mini', 'palm', 'palmsource', - 'panasonic', 'philips', 'pocketpc', 'portalmmm', - 'rover', 'samsung', 'sanyo', 'series60', 'sharp', - 'sie-', 'smartphone', 'sony', 'symbian', - 'up.browser', 'up.link', 'up.link', 'vodafone', - 'wap1', 'wap2', 'windows ce'); + array( + 'alcatel', + 'android', + 'audiovox', + 'au-mic,', + 'avantgo', + 'blackberry', + 'blazer', + 'cldc-', + 'danger', + 'epoc', + 'ericsson', + 'ericy', + 'iphone', + 'ipaq', + 'ipod', + 'j2me', + 'lg', + 'midp-', + 'mobile', + 'mot', + 'netfront', + 'nitro', + 'nokia', + 'opera mini', + 'palm', + 'palmsource', + 'panasonic', + 'philips', + 'pocketpc', + 'portalmmm', + 'rover', + 'samsung', + 'sanyo', + 'series60', + 'sharp', + 'sie-', + 'smartphone', + 'sony', + 'symbian', + 'up.browser', + 'up.link', + 'up.link', + 'vodafone', + 'wap1', + 'wap2', + 'windows ce' + ); $httpuseragent = strtolower($_SERVER['HTTP_USER_AGENT']); -- cgit v1.2.3-54-g00ecf From 44a5cd28050fa732c32943a8193664f44a4cfad1 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 12 Oct 2009 12:46:53 +0000 Subject: Added function to set a list of features the mobile device supports and output accordingly e.g., if device is not known to have an open file system or unable to make use of input type="file" don't output that feature --- plugins/MobileProfile/MobileProfilePlugin.php | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 3785feeec..f36d97ad9 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -51,6 +51,7 @@ class MobileProfilePlugin extends WAP20Plugin { public $DTD = null; public $serveMobile = false; + public $mobileFeatures = array(); function __construct($DTD='http://www.wapforum.org/DTD/xhtml-mobile10.dtd') { @@ -106,8 +107,7 @@ class MobileProfilePlugin extends WAP20Plugin // Or, detect the mobile devices based on their support for // MP 1.0, 1.1, or 1.2 may be ideal. Possible? - $this->mobiledevices = - array( + $this->mobiledevices = array( 'alcatel', 'android', 'audiovox', @@ -160,6 +160,8 @@ class MobileProfilePlugin extends WAP20Plugin foreach($this->mobiledevices as $md) { if (strstr($httpuseragent, $md) !== false) { + setMobileFeatures($httpuseragent); + $this->serveMobile = true; break; } @@ -200,6 +202,24 @@ class MobileProfilePlugin extends WAP20Plugin } + function setMobileFeatures($useragent) + { + /* List of devices that support input type="file" */ + $mobiledeviceInputFileType = array( + 'nokia' + ); + + $this->mobileFeatures['inputfiletype'] = false; + + foreach($mobiledeviceInputFileType as $md) { + if (strstr($useragent, $md) !== false) { + $this->mobileFeatures['inputfiletype'] = true; + break; + } + } + } + + function onStartShowHeadElements($action) { if (!$action->serveMobile) { -- cgit v1.2.3-54-g00ecf From 410883d146282a0a416181f8ca0dae817597593b Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 12 Oct 2009 12:58:51 +0000 Subject: Ran phpcs and fixed a few errors and warnings --- plugins/MobileProfile/MobileProfilePlugin.php | 37 ++++++++++++--------------- 1 file changed, 16 insertions(+), 21 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index f36d97ad9..dada1948f 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -49,13 +49,13 @@ require_once INSTALLDIR.'/plugins/Mobile/WAP20Plugin.php'; class MobileProfilePlugin extends WAP20Plugin { - public $DTD = null; - public $serveMobile = false; - public $mobileFeatures = array(); + public $DTD = null; + public $serveMobile = false; + public $mobileFeatures = array(); function __construct($DTD='http://www.wapforum.org/DTD/xhtml-mobile10.dtd') { - $this->DTD = $DTD; + $this->DTD = $DTD; parent::__construct(); } @@ -86,13 +86,11 @@ class MobileProfilePlugin extends WAP20Plugin $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])) { $this->serveMobile = true; - } - else { + } else { // If they like the WAP 2.0 mimetype, serve them MP if (strstr('application/vnd.wap.xhtml+xml', $type) !== false) { $this->serveMobile = true; - } - else { + } else { // If they are a mobile device that supports WAP 2.0, // serve them MP @@ -158,7 +156,7 @@ class MobileProfilePlugin extends WAP20Plugin $httpuseragent = strtolower($_SERVER['HTTP_USER_AGENT']); - foreach($this->mobiledevices as $md) { + foreach ($this->mobiledevices as $md) { if (strstr($httpuseragent, $md) !== false) { setMobileFeatures($httpuseragent); @@ -204,14 +202,13 @@ class MobileProfilePlugin extends WAP20Plugin function setMobileFeatures($useragent) { - /* List of devices that support input type="file" */ $mobiledeviceInputFileType = array( 'nokia' ); $this->mobileFeatures['inputfiletype'] = false; - foreach($mobiledeviceInputFileType as $md) { + foreach ($mobiledeviceInputFileType as $md) { if (strstr($useragent, $md) !== false) { $this->mobileFeatures['inputfiletype'] = true; break; @@ -243,8 +240,7 @@ class MobileProfilePlugin extends WAP20Plugin if (file_exists(theme_file('css/mp-screen.css'))) { $action->cssLink('css/mp-screen.css', null, 'screen'); - } - else { + } else { $action->element('link', array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => common_path('plugins/MobileProfile/mp-screen.css') . '?version=' . STATUSNET_VERSION, @@ -253,8 +249,7 @@ class MobileProfilePlugin extends WAP20Plugin if (file_exists(theme_file('css/mp-handheld.css'))) { $action->cssLink('css/mp-handheld.css', null, 'handheld'); - } - else { + } else { $action->element('link', array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => common_path('plugins/MobileProfile/mp-handheld.css') . '?version=' . STATUSNET_VERSION, @@ -303,8 +298,9 @@ class MobileProfilePlugin extends WAP20Plugin } - function _showPrimaryNav($action) { - $user = common_current_user(); + function _showPrimaryNav($action) + { + $user = common_current_user(); $connect = ''; if (common_config('xmpp', 'enabled')) { $connect = 'imsettings'; @@ -330,8 +326,7 @@ class MobileProfilePlugin extends WAP20Plugin } $action->menuItem(common_local_url('logout'), _('Logout')); - } - else { + } else { if (!common_config('site', 'closed')) { $action->menuItem(common_local_url('register'), _('Register')); @@ -370,7 +365,7 @@ class MobileProfilePlugin extends WAP20Plugin } if (common_config('attachments', 'uploads')) { - $form->out->element('label', array('for' => 'notice_data-attach'),_('Attach')); + $form->out->element('label', array('for' => 'notice_data-attach'), _('Attach')); $form->out->element('input', array('id' => 'notice_data-attach', 'type' => 'file', 'name' => 'attach', @@ -414,7 +409,7 @@ class MobileProfilePlugin extends WAP20Plugin $serverpart = common_config('site', 'mobileserver'); } } else { - $proto = 'http'; + $proto = 'http'; $serverpart = common_config('site', 'mobileserver'); } -- cgit v1.2.3-54-g00ecf From d65702b301a15b9255e9cdb89d3a31c5c6bc355f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 12 Oct 2009 13:05:19 +0000 Subject: Only output attachment if the mobile device is interested --- plugins/MobileProfile/MobileProfilePlugin.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index dada1948f..2b1ccf520 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -365,12 +365,14 @@ class MobileProfilePlugin extends WAP20Plugin } if (common_config('attachments', 'uploads')) { - $form->out->element('label', array('for' => 'notice_data-attach'), _('Attach')); - $form->out->element('input', array('id' => 'notice_data-attach', - 'type' => 'file', - 'name' => 'attach', - 'title' => _('Attach a file'))); - $form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota')); + if ($this->mobileFeatures['inputfiletype']) { + $form->out->element('label', array('for' => 'notice_data-attach'), _('Attach')); + $form->out->element('input', array('id' => 'notice_data-attach', + 'type' => 'file', + 'name' => 'attach', + 'title' => _('Attach a file'))); + $form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota')); + } } if ($form->action) { $form->out->hidden('notice_return-to', $form->action, 'returnto'); -- cgit v1.2.3-54-g00ecf From 0e333200a45402c7e040cf1e8c36808c93052b9f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 12 Oct 2009 13:06:16 +0000 Subject: Added missing $this --- plugins/MobileProfile/MobileProfilePlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 2b1ccf520..518ceb758 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -158,7 +158,7 @@ class MobileProfilePlugin extends WAP20Plugin foreach ($this->mobiledevices as $md) { if (strstr($httpuseragent, $md) !== false) { - setMobileFeatures($httpuseragent); + $this->setMobileFeatures($httpuseragent); $this->serveMobile = true; break; -- cgit v1.2.3-54-g00ecf From a74bb63adda8bf2658f43a850e2474f23b126abc Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 13 Oct 2009 13:42:58 +0000 Subject: Added styles for the Profile page --- plugins/MobileProfile/mp-screen.css | 39 ++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 9b42149c0..7bab15141 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -66,16 +66,22 @@ z-index:9; iPhone/iPod Touch, Android, Opera Mini Simulator */ #form_notice #notice_text-count + label, -#form_notice label[for="notice_data-attach"], +#form_notice label[for="notice_data-attach"] { +display:none; +} #form_notice #notice_data-attach { -top:0; -/*right:28%; Looks good but no good in iDevice, Android*/ -right:40%; +top:auto; +bottom:0; +left:0; +right:auto; +opacity:1; +z-index:9; +width:65%; } #form_notice #notice_action-submit { width:20%; -right:4%; +right:2%; text-align:center; } @@ -127,6 +133,29 @@ margin-right:2%; } + +.entity_profile { +width:auto; +} +.entity_actions { +margin-right:0; +margin-left:0; +clear:both; +float:left; +width:auto; +max-width:9999px; +} + +.entity_profile { +margin-bottom:7px; +} + +.entity_actions li { +float:left; +margin-right:2%; +} + + #footer { width:96%; padding:2%; -- cgit v1.2.3-54-g00ecf From dff412a3b15ac7136884eec5280f4552f8dda759 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 13 Oct 2009 14:56:58 +0000 Subject: Styles for entity actions --- plugins/MobileProfile/mp-screen.css | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 7bab15141..89e1c4d48 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -137,24 +137,53 @@ margin-right:2%; .entity_profile { width:auto; } + + + .entity_actions { margin-right:0; margin-left:0; clear:both; -float:left; +float:none; width:auto; max-width:9999px; } .entity_profile { margin-bottom:7px; +min-height:0; } .entity_actions li { float:left; -margin-right:2%; +margin-right:1.5%; +margin-bottom:0; } +.entity_profile .entity_fn, +.entity_profile .entity_nickname, +.entity_profile .entity_location, +.entity_profile .entity_url, +.entity_profile .entity_note, +.entity_profile .entity_tags, +.entity_profile .entity_aliases { +line-height:1.4; +} +.form_user_block input.submit, +.form_user_unblock input.submit, +.form_group_block input.submit, +.form_group_unblock input.submit, +.entity_send-a-message a, +.entity_edit a, +.form_user_nudge input.submit, +.entity_nudge p, +.form_make_admin input.submit { + +} + +.entity_profile .entity_depiction { +margin-bottom:2%; +} #footer { width:96%; -- cgit v1.2.3-54-g00ecf From e6c4dceb5a39b9f834b37a0d68ea9aa018e15b74 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 13 Oct 2009 15:22:05 +0000 Subject: Updated Profile view. Works better in Opera Mini, Webkits --- plugins/MobileProfile/mp-screen.css | 44 ++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 18 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 89e1c4d48..28b7f49ab 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -145,7 +145,7 @@ margin-right:0; margin-left:0; clear:both; float:none; -width:auto; +width:100%; max-width:9999px; } @@ -154,12 +154,6 @@ margin-bottom:7px; min-height:0; } -.entity_actions li { -float:left; -margin-right:1.5%; -margin-bottom:0; -} - .entity_profile .entity_fn, .entity_profile .entity_nickname, .entity_profile .entity_location, @@ -168,23 +162,37 @@ margin-bottom:0; .entity_profile .entity_tags, .entity_profile .entity_aliases { line-height:1.4; +margin-left:0; } -.form_user_block input.submit, -.form_user_unblock input.submit, -.form_group_block input.submit, -.form_group_unblock input.submit, -.entity_send-a-message a, -.entity_edit a, -.form_user_nudge input.submit, -.entity_nudge p, -.form_make_admin input.submit { +.entity_profile .entity_depiction { +margin-bottom:1%; +margin-right:7px; } -.entity_profile .entity_depiction { -margin-bottom:2%; +.entity_actions { +margin-bottom:1%; +float:left; +width:100%; } +.entity_actions li { +float:left; +margin-right:1.5%; +margin-bottom:0; +height:29px; +width:40%; +} + +.user_in .entity_actions .entity_subscribe { +margin-bottom:47px; +width:auto; +height:auto; +margin-right:5%; +} + + + #footer { width:96%; padding:2%; -- cgit v1.2.3-54-g00ecf From ed85dc2700eb664c98ca74fef2db2e548cf1a104 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 15 Oct 2009 11:25:38 +0000 Subject: Updated comments --- plugins/MobileProfile/MobileProfilePlugin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 518ceb758..eba460ed6 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -63,6 +63,7 @@ class MobileProfilePlugin extends WAP20Plugin function onStartShowHTML($action) { + if (!$type) { $httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : null; @@ -97,9 +98,9 @@ class MobileProfilePlugin extends WAP20Plugin // XXX: Browser sniffing sucks // I really don't like going through this every page, - // find a better way + // perhaps use $_SESSION or cookies - // May be better to categorize the devices in terms of + // May be better to group the devices in terms of // low,mid,high-end // Or, detect the mobile devices based on their support for -- cgit v1.2.3-54-g00ecf From 94c7b2b43ab04c94e85bc276e6ee9bd59d424984 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 15 Oct 2009 12:47:59 +0000 Subject: Changed textarea @cols value for smaller screens --- plugins/MobileProfile/MobileProfilePlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index eba460ed6..4bbdb3541 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -350,7 +350,7 @@ class MobileProfilePlugin extends WAP20Plugin } $form->out->element('textarea', array('id' => 'notice_data-text', - 'cols' => 35, + 'cols' => 15, 'rows' => 4, 'name' => 'status_textarea'), ($form->content) ? $form->content : ''); -- cgit v1.2.3-54-g00ecf From d7efe87e770e83339a86dce83b7f75a99a52567d Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 15 Oct 2009 13:08:57 +0000 Subject: Better widths for notice options (improves Opera Mini's rendering) --- plugins/MobileProfile/mp-screen.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 28b7f49ab..d72b316cf 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -125,10 +125,10 @@ padding-bottom:4px; } .notice div.entry-content { margin-left:0; -width:75%; +width:65%; } .notice-options { -width:70px; +width:30%; margin-right:2%; } -- cgit v1.2.3-54-g00ecf From 70a39c5b7b99f6b9d8805761c23a585dc1016eb6 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 15 Oct 2009 14:05:43 +0000 Subject: Better layout for form_settings --- plugins/MobileProfile/mp-screen.css | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index d72b316cf..0f97de17c 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -30,6 +30,29 @@ margin-right:7px; } +.form_settings label { +width:auto; +display:block; +float:none; +} +.form_settings .form_data textarea, +.form_settings .form_data select, +.form_settings .form_data input { +margin-left:0; +display:block; +width:96.41%; +} +.form_settings .form_data label { +float:none; +} + +.form_settings .form_data p.form_guide { +width:auto; +margin-left:0; +} + + + #site_nav_global_primary { margin:0; width:100%; -- cgit v1.2.3-54-g00ecf From 9c90fd05f7377151c614aab76c69a346c3dd114a Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 15 Oct 2009 14:20:42 +0000 Subject: Set width only to textarea --- plugins/MobileProfile/mp-screen.css | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 0f97de17c..6adf7b1aa 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -40,8 +40,11 @@ float:none; .form_settings .form_data input { margin-left:0; display:block; +} +.form_settings .form_data textarea { width:96.41%; } + .form_settings .form_data label { float:none; } -- cgit v1.2.3-54-g00ecf From 63d2476d742a7d892b8fa7db0a9bccb7eb21bc55 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 15 Oct 2009 14:22:46 +0000 Subject: More margin for logo --- plugins/MobileProfile/mp-screen.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 6adf7b1aa..16d212c79 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -13,7 +13,7 @@ width:96%; } address { -margin:4% 0 0 0; +margin:5% 0 0 0; } address .vcard .photo { margin-right:0; -- cgit v1.2.3-54-g00ecf From 414ca4e83f85fc329b1c8469ded612e94272c9ff Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 15 Oct 2009 14:46:49 +0000 Subject: Adjusted global and local navigation spacing and size. Fixed logo's view in Opera Mini --- plugins/MobileProfile/mp-screen.css | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 16d212c79..9b7d53120 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -8,12 +8,14 @@ max-width:100%; #header { margin:0; -padding:2%; +padding:0.7em 2%; width:96%; } address { -margin:5% 0 0 0; +margin:1em 0 0 0; +float:left; +width:100%; } address .vcard .photo { margin-right:0; @@ -21,8 +23,8 @@ margin-right:0; address img + .fn { display:block; -margin-top:8%; -width:100%; +margin-top:1.25em; +float:left; } .vcard .photo { @@ -66,7 +68,7 @@ left:0; } #site_nav_global_primary li { margin-left:0; -margin-right:2%; +margin-right:4%; float:left; font-size:0.9em; } @@ -120,8 +122,9 @@ margin-right:0; margin-left:0; } #site_nav_local_views a { -padding:0; +padding:1px 4px; display:block; +font-size:0.9em; } #site_nav_local_views .current a { text-shadow:none; @@ -136,6 +139,11 @@ box-shadow:none; #content { width:96.41%; } +#content, +#site_nav_local_views a, +#aside_primary { +border:0; +} h1 { margin-bottom:0; -- cgit v1.2.3-54-g00ecf From 09bafa13b13a3bee581f7ace1e9f97ade24828c1 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 15 Oct 2009 14:52:49 +0000 Subject: Minor adjustment to site name spacing --- plugins/MobileProfile/mp-screen.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 9b7d53120..468d6b32c 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -23,7 +23,7 @@ margin-right:0; address img + .fn { display:block; -margin-top:1.25em; +margin-top:1em; float:left; } @@ -138,6 +138,7 @@ box-shadow:none; #content { width:96.41%; +min-height:auto; } #content, #site_nav_local_views a, -- cgit v1.2.3-54-g00ecf From afa00b558f981d1ae01715f5aa52ce992708bdd8 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 15 Oct 2009 14:59:21 +0000 Subject: Reduced some margin-bottoms --- plugins/MobileProfile/mp-screen.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 468d6b32c..15ec76339 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -32,11 +32,19 @@ margin-right:7px; } +.form_settings fieldset { +margin-bottom:7px; +} + .form_settings label { width:auto; display:block; float:none; } +.form_settings .form_data li { +margin-bottom:7px; +} + .form_settings .form_data textarea, .form_settings .form_data select, .form_settings .form_data input { @@ -146,6 +154,11 @@ min-height:auto; border:0; } +.instructions p, +.instructions ul { +margin-bottom:4px; +} + h1 { margin-bottom:0; } -- cgit v1.2.3-54-g00ecf From 42f3aff9eb412080579c349460835f7cae918775 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 15 Oct 2009 15:02:53 +0000 Subject: Slight adjustment to local navigation padding --- plugins/MobileProfile/mp-screen.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 15ec76339..1bb0248ec 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -130,7 +130,7 @@ margin-right:0; margin-left:0; } #site_nav_local_views a { -padding:1px 4px; +padding:1px 3px; display:block; font-size:0.9em; } -- cgit v1.2.3-54-g00ecf