limit number of items on profile page too; add show more back to Frost mobile; some show more fixes

This commit is contained in:
Zach Prezkuta 2012-08-26 15:21:26 -06:00
parent 0765ab5203
commit c681e69794
8 changed files with 39 additions and 21 deletions

View File

@ -229,21 +229,27 @@ function profile_content(&$a, $update = 0) {
$sql_extra2 .= protect_sprintf(sprintf(" AND item.created >= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery2))));
}
if(! get_pconfig($a->profile['profile_uid'],'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
and `item`.`moderated` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 1
$sql_extra $sql_extra2 ",
intval($a->profile['profile_uid'])
);
if(! get_pconfig($a->profile['profile_uid'],'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
and `item`.`moderated` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 1
$sql_extra $sql_extra2 ",
intval($a->profile['profile_uid'])
);
if(count($r)) {
$a->set_pager_total($r[0]['total']);
if(count($r)) {
$a->set_pager_total($r[0]['total']);
}
}
}
$a->set_pager_itemspage(40);
$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']));

View File

@ -755,7 +755,7 @@ function settings_content(&$a) {
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes),
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
'$itemspage_network' => array('itemspage_network', t("Number of items to display on the network page:"), $itemspage_network, t('Maximum of 100 items')),
'$itemspage_network' => array('itemspage_network', t("Number of items to display per page:"), $itemspage_network, t('Maximum of 100 items')),
'$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''),
'$theme_config' => $theme_config,

View File

@ -350,7 +350,7 @@
/* autocomplete @nicknames */
$j(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl");
/*var bimgs = $j(".wall-item-body > img").not(function() { return this.complete; });
var bimgs = $j(".wall-item-body > img").not(function() { return this.complete; });
var bimgcount = bimgs.length;
if (bimgcount) {
@ -363,12 +363,12 @@
});
} else {
collapseHeight();
}*/
}
});
}
/* function collapseHeight() {
function collapseHeight() {
$j(".wall-item-body").each(function() {
if($j(this).height() > 310) {
if(! $j(this).hasClass('divmore')) {
@ -377,7 +377,7 @@
}
}
});
}*/
}
function imgbright(node) {
$j(node).removeClass("drophide").addClass("drop");

File diff suppressed because one or more lines are too long

View File

@ -1347,6 +1347,11 @@ input#dfrn-url {
max-width: 280px;
}
.divgrow-showmore {
display: block;
clear: both;
}
.wall-item-title {
float: left;

View File

@ -4,7 +4,7 @@
* Name: Frost--mobile version
* Description: Like frosted glass
* Credits: Navigation icons taken from http://iconza.com. Other icons taken from http://thenounproject.com, including: Like, Dislike, Black Lock, Unlock, Pencil, Tag, Camera, Paperclip (Marie Coons), Folder (Sergio Calcara), Chain-link (Andrew Fortnum), Speaker (Harold Kim), Quotes (Henry Ryder), Video Camera (Anas Ramadan), and Left Arrow, Right Arrow, and Delete X (all three P.J. Onori). All under Attribution (CC BY 3.0). Others from The Noun Project are public domain or No Rights Reserved (CC0).
* Version: Version 0.2.9
* Version: Version 0.2.10
* Author: Zach P <techcity@f.shmuz.in>
* Maintainer: Zach P <techcity@f.shmuz.in>
*/
@ -27,5 +27,6 @@ function frost_mobile_init(&$a) {
$a->videowidth = 250;
$a->videoheight = 200;
$a->theme_thread_allow = false;
$a->force_max_items = 10;
}

View File

@ -1304,6 +1304,11 @@ input#dfrn-url {
max-width: 100%;
}
.divgrow-showmore {
display: block;
clear: both;
}
.wall-item-title {

View File

@ -4,7 +4,7 @@
* Name: Frost
* Description: Like frosted glass
* Credits: Navigation icons taken from http://iconza.com. Other icons taken from http://thenounproject.com, including: Like, Dislike, Black Lock, Unlock, Pencil, Tag, Camera, Paperclip (Marie Coons), Folder (Sergio Calcara), Chain-link (Andrew Fortnum), Speaker (Harold Kim), Quotes (Henry Ryder), Video Camera (Anas Ramadan), and Left Arrow, Right Arrow, and Delete X (all three P.J. Onori). All under Attribution (CC BY 3.0). Others from The Noun Project are public domain or No Rights Reserved (CC0).
* Version: Version 0.2.7
* Version: Version 0.2.8
* Author: Zach P <techcity@f.shmuz.in>
* Maintainer: Zach P <techcity@f.shmuz.in>
*/
@ -23,5 +23,6 @@ function frost_init(&$a) {
$a->videowidth = 400;
$a->videoheight = 330;
$a->theme_thread_allow = false;
}