From: Zach Prezkuta Date: Fri, 10 Aug 2012 03:17:11 +0000 (-0600) Subject: - Frost Mobile: redo CSS to adjust automatically to the screen width X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d9279da369d34a804f9e1af6b5b88ae0c3864854;p=friendica.git - Frost Mobile: redo CSS to adjust automatically to the screen width - Frost Mobile: various tweaks and fixes - Allow themes to limit number of items on the Network page --- diff --git a/boot.php b/boot.php index c50dbb582f..647f779e81 100644 --- a/boot.php +++ b/boot.php @@ -364,6 +364,7 @@ if(! class_exists('App')) { public $sourcename = ''; public $videowidth = 425; public $videoheight = 350; + public $force_max_items = 0; private $scheme; private $hostname; diff --git a/mod/network.php b/mod/network.php index 17368ab92d..97f00eeda9 100644 --- a/mod/network.php +++ b/mod/network.php @@ -563,7 +563,7 @@ function network_content(&$a, $update = 0) { } else { - if(! get_pconfig(local_user(),'system','alt_pager')) { + if(! get_pconfig(local_user(),'system','alt_pager')) { $r = q("SELECT COUNT(*) AS `total` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 @@ -576,10 +576,15 @@ function network_content(&$a, $update = 0) { if(count($r)) { $a->set_pager_total($r[0]['total']); } - } - $itemspage_network = get_pconfig(local_user(),'system','itemspage_network'); - $a->set_pager_itemspage(((intval($itemspage_network)) ? $itemspage_network : 40)); - $pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage'])); + } + + $itemspage_network = get_pconfig(local_user(),'system','itemspage_network'); + $itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 40); + if(($a->force_max_items > 0) && ($a->force_max_items < $itemspage_network)) + $itemspage_network = $a->force_max_items; + + $a->set_pager_itemspage($itemspage_network); + $pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage'])); } $simple_update = (($update) ? " and `item`.`unseen` = 1 " : ''); diff --git a/view/theme/frost-mobile/TODO b/view/theme/frost-mobile/TODO index 940d9e588b..05e32cb47f 100644 --- a/view/theme/frost-mobile/TODO +++ b/view/theme/frost-mobile/TODO @@ -12,11 +12,15 @@ Photo album display? - Admin: access to more pages than summary? -- Embedded video playback is way too big +- Find a way to show embedded videos at the normal size for tablets that can handle it + +- Need to find a way to deal with freakin annoying elements that don't respect screen width limits. Specifically, need to find a way to keep them from forcing a horizontal scroll bar to show up and making the rest of the body text overflow the item's borders that is screen-width sensitive (it's annoying to have a 300px truncated code block on a 1024px wide screen). At least the following cause problems: + - code blocks + - blockquote blocks + - #reallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongtags - Needs to be faster! - Reduce DOM elements (~2400 for 10 items, ~8400 for 40 items) - - Automatically set limit of 10 items for Network and Profile? diff --git a/view/theme/frost-mobile/head.tpl b/view/theme/frost-mobile/head.tpl index 8496667e13..a849f44593 100644 --- a/view/theme/frost-mobile/head.tpl +++ b/view/theme/frost-mobile/head.tpl @@ -1,7 +1,10 @@ - + + + +