diff --git a/include/forums.php b/include/forums.php index e604a31567..d8da36cc5c 100644 --- a/include/forums.php +++ b/include/forums.php @@ -2,13 +2,13 @@ /** * @file include/forums.php - * @brief Functions related to forum functionality * + * @brief Functions related to forum functionality * */ /** * @brief Function to list all forums a user is connected with - * + * * @param int $uid of the profile owner * @param boolean $showhidden * Show frorums which are not hidden @@ -16,7 +16,7 @@ * Sort by lastitem * @param boolean $showprivate * Show private groups - * + * * @returns array * 'url' => forum url * 'name' => forum name @@ -27,16 +27,17 @@ function get_forumlist($uid, $showhidden = true, $lastitem, $showprivate = false $forumlist = array(); - $order = (($showhidden) ? '' : ' AND `hidden` = 0 '); - $order .= (($lastitem) ? ' ORDER BY `last-item` ASC ' : ' ORDER BY `name` ASC '); - $select = '`forum` = 1'; + $order = (($showhidden) ? '' : ' AND NOT `hidden` '); + $order .= (($lastitem) ? ' ORDER BY `last-item` DESC ' : ' ORDER BY `name` ASC '); + $select = '`forum` '; if ($showprivate) { - $select = '( `forum` = 1 OR `prv` = 1 )'; + $select = '(`forum` OR `prv`)'; } - $contacts = q("SELECT `contact`.`id`, `contact`.`url`, `contact`.`name`, `contact`.`micro` FROM contact + $contacts = q("SELECT `contact`.`id`, `contact`.`url`, `contact`.`name`, `contact`.`micro` FROM `contact` WHERE `network`= 'dfrn' AND $select AND `uid` = %d - AND `blocked` = 0 AND `hidden` = 0 AND `pending` = 0 AND `archive` = 0 + AND NOT `blocked` AND NOT `hidden` AND NOT `pending` AND NOT `archive` + AND `success_update` > `failure_update` $order ", intval($uid) ); diff --git a/view/templates/widget_forumlist.tpl b/view/templates/widget_forumlist.tpl index cfc3f8cbcc..44dcd8f1e8 100644 --- a/view/templates/widget_forumlist.tpl +++ b/view/templates/widget_forumlist.tpl @@ -37,9 +37,9 @@ function showHideForumlist() { {{/foreach}} {{if $total > $visible_forums }} - + {{/if}} diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index a59d7a9df3..db96be9fb1 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -401,7 +401,7 @@ code { } .sidebar-group-li:hover, #sidebar-new-group:hover, #hide-forum-list:hover, -#sidebar-ungrouped:hover, .side-link:hover, .nets-ul li:hover, #forum-list div:hover, #forum-list-right div:hover, +#sidebar-ungrouped:hover, .side-link:hover, .nets-ul li:hover, #forumlist-sidebar div:hover, #forum-list-right div:hover, .nets-all:hover, .saved-search-li:hover, li.tool:hover, .admin.link:hover, aside h4 a:hover, right_aside h4 a:hover, #message-new:hover { /* background-color: #ddd; */ /* background-color: #e5e5e5; */ @@ -420,7 +420,7 @@ code { font-weight: bold; } -#sidebar-new-group, #hide-forum-list, #forum-list, #forum-list-right, #sidebar-ungrouped, +#forum-widget-showmore, #sidebar-new-group, #hide-forum-list, #forum-list-right, #sidebar-ungrouped, .side-link, #peoplefind-desc, #connect-desc, .nets-all, .admin.link, #message-new { padding-left: 10px; padding-top: 3px; @@ -429,6 +429,17 @@ code { display: block; } +#forumlist-sidebar { + padding-top: 3px; + padding-bottom: 3px; + display: block; +} + +.forum-widget-entry { + padding-left: 10px; + padding-right: 5px; +} + a.nets-link, .side-link a, #sidebar-new-group a, a.savedsearchterm, a.fileas-link, aside h4 a, right_aside h4 a { display: block; color: #737373; @@ -456,11 +467,11 @@ a.sidebar-group-element { color: black; } -#forum-list a, #forum-list-right a, .tool a, .admin.link a { +#forumlist-sidebar a, #forum-list-right a, .tool a, .admin.link a { color: #737373; } -#forum-list, #forum-list-right { +#forumlist-sidebar, #forum-list-right { margin-top: 2px; } diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php index 3ab1c7edb5..3c808b52af 100644 --- a/view/theme/vier/theme.php +++ b/view/theme/vier/theme.php @@ -33,7 +33,8 @@ function vier_init(&$a) { $a->page['htmlhead'] .= ''."\n"; $a->page['htmlhead'] .= ''."\n"; } - #$a->page['htmlhead'] .= ''."\n"; + // deactivated since it doesn't work with desktop browsers at the moment (To-Do) + //$a->page['htmlhead'] .= ''."\n"; $a->page['htmlhead'] .= <<< EOT