Merge pull request #2085 from annando/1511-forumlist-fix

This is a quick fix for the the forumlist.
This commit is contained in:
fabrixxm 2015-11-18 09:04:10 +01:00
commit a4f66ea4ca
4 changed files with 30 additions and 17 deletions

View File

@ -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)
);

View File

@ -37,9 +37,9 @@ function showHideForumlist() {
{{/foreach}}
{{if $total > $visible_forums }}
<ul class="forum-widget-ul">
<li onclick="showHideForumlist(); return false;" id="forum-widget-collapse" class="fakelink tool">{{$showmore}}</li>
</ul>
<div id="forum-widget-showmore" class="forum-widget-entry" role="menuitem">
<a onclick="showHideForumlist(); return false;" id="forum-widget-collapse" class="forum-widget-link">{{$showmore}}</a>
</div>
{{/if}}
</div>

View File

@ -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;
}

View File

@ -33,7 +33,8 @@ function vier_init(&$a) {
$a->page['htmlhead'] .= '<meta name=viewport content="width=device-width, initial-scale=1">'."\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="view/theme/vier/mobile.css" media="screen"/>'."\n";
}
#$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="view/theme/vier/mobile.css" media="screen and (max-width: 1000px)"/>'."\n";
// deactivated since it doesn't work with desktop browsers at the moment (To-Do)
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="view/theme/vier/mobile.css" media="screen and (max-width: 1000px)"/>'."\n";
$a->page['htmlhead'] .= <<< EOT
<link rel='stylesheet' type='text/css' href='view/theme/vier/narrow.css' media='screen and (max-width: 1100px)' />