Zeile 41 | Zeile 41 |
---|
{ foreach($parent as $forum) {
|
{ foreach($parent as $forum) {
|
| $forum['viewers'] = 0;
|
$subforums = $sub_forums = ''; $lastpost_data = array( 'lastpost' => 0,
| $subforums = $sub_forums = ''; $lastpost_data = array( 'lastpost' => 0,
|
Zeile 102 | Zeile 103 |
---|
while($thread = $db->fetch_array($query)) {
|
while($thread = $db->fetch_array($query)) {
|
if(!$private_forums[$thread['fid']])
| if(!isset($private_forums[$thread['fid']]))
|
{ $private_forums[$thread['fid']] = $thread; }
| { $private_forums[$thread['fid']] = $thread; }
|
Zeile 149 | Zeile 150 |
---|
{ $hideinfo = true; $showlockicon = 1;
|
{ $hideinfo = true; $showlockicon = 1;
|
| }
if(is_array($forum_viewers) && isset($forum_viewers[$forum['fid']]) && $forum_viewers[$forum['fid']] > 0) { $forum['viewers'] = $forum_viewers[$forum['fid']];
|
}
// Fetch subforums of this forum
| }
// Fetch subforums of this forum
|
Zeile 162 | Zeile 168 |
---|
$forum['unapprovedthreads'] += $forum_info['counters']['unapprovedthreads']; $forum['unapprovedposts'] += $forum_info['counters']['unapprovedposts'];
|
$forum['unapprovedthreads'] += $forum_info['counters']['unapprovedthreads']; $forum['unapprovedposts'] += $forum_info['counters']['unapprovedposts'];
|
if(!empty($forum_info['counters']['viewing']))
| if(!empty($forum_info['counters']['viewers']))
|
{
|
{
|
$forum['viewers'] += $forum_info['counters']['viewing'];
| $forum['viewers'] += $forum_info['counters']['viewers'];
|
}
// If the child forums' lastpost is greater than the one for this forum, set it as the child forums greatest.
| }
// If the child forums' lastpost is greater than the one for this forum, set it as the child forums greatest.
|
Zeile 203 | Zeile 209 |
---|
if((!isset($parent_lastpost) || $lastpost_data['lastpost'] > $parent_lastpost['lastpost']) && $hideinfo != true) { $parent_lastpost = $lastpost_data;
|
if((!isset($parent_lastpost) || $lastpost_data['lastpost'] > $parent_lastpost['lastpost']) && $hideinfo != true) { $parent_lastpost = $lastpost_data;
|
}
if(is_array($forum_viewers) && isset($forum_viewers[$forum['fid']]) && $forum_viewers[$forum['fid']] > 0) { $forum['viewers'] = $forum_viewers[$forum['fid']];
| |
}
// Increment the counters for the parent forum (returned later)
| }
// Increment the counters for the parent forum (returned later)
|
Zeile 217 | Zeile 218 |
---|
$parent_counters['posts'] += $forum['posts']; $parent_counters['unapprovedposts'] += $forum['unapprovedposts']; $parent_counters['unapprovedthreads'] += $forum['unapprovedthreads'];
|
$parent_counters['posts'] += $forum['posts']; $parent_counters['unapprovedposts'] += $forum['unapprovedposts']; $parent_counters['unapprovedthreads'] += $forum['unapprovedthreads'];
|
|
|
if(!empty($forum['viewers'])) { $parent_counters['viewers'] += $forum['viewers']; }
|
if(!empty($forum['viewers'])) { $parent_counters['viewers'] += $forum['viewers']; }
|
}
| }
|
// Done with our math, lets talk about displaying - only display forums which are under a certain depth if($depth > $showdepth)
|
// Done with our math, lets talk about displaying - only display forums which are under a certain depth if($depth > $showdepth)
|
{
| {
|
continue;
|
continue;
|
}
| }
|
// Get the lightbulb status indicator for this forum based on the lastpost $lightbulb = get_forum_lightbulb($forum, $lastpost_data, $showlockicon);
// Fetch the number of unapproved threads and posts for this forum
|
// Get the lightbulb status indicator for this forum based on the lastpost $lightbulb = get_forum_lightbulb($forum, $lastpost_data, $showlockicon);
// Fetch the number of unapproved threads and posts for this forum
|
$unapproved = get_forum_unapproved($forum);
| |
if($hideinfo == true) {
|
if($hideinfo == true) {
|
unset($unapproved);
| $unapproved = array( "unapproved_posts" => '', "unapproved_threads" => '', ); } else { $unapproved = get_forum_unapproved($forum);
|
}
// Sanitize name and description of forum.
| }
// Sanitize name and description of forum.
|
Zeile 317 | Zeile 323 |
---|
} $lastpost_subject = htmlspecialchars_uni($lastpost_subject); $full_lastpost_subject = htmlspecialchars_uni($full_lastpost_subject);
|
} $lastpost_subject = htmlspecialchars_uni($lastpost_subject); $full_lastpost_subject = htmlspecialchars_uni($full_lastpost_subject);
|
|
|
// Call lastpost template if($depth != 1) {
| // Call lastpost template if($depth != 1) {
|
Zeile 358 | Zeile 364 |
---|
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_hidden")."\";"); }
|
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_hidden")."\";"); }
|
// Moderator column is not off
| // Moderator column $modlist = '';
|
if($mybb->settings['modlist'] != 0) { $done_moderators = array(
| if($mybb->settings['modlist'] != 0) { $done_moderators = array(
|
Zeile 381 | Zeile 388 |
---|
if($moderator['isgroup']) { if(in_array($moderator['id'], $done_moderators['groups']))
|
if($moderator['isgroup']) { if(in_array($moderator['id'], $done_moderators['groups']))
|
{ continue; }
| { continue; }
|
$moderator['title'] = htmlspecialchars_uni($moderator['title']);
| $moderator['title'] = htmlspecialchars_uni($moderator['title']);
|
Zeile 399 | Zeile 406 |
---|
$moderator['profilelink'] = get_profile_link($moderator['id']); $moderator['username'] = htmlspecialchars_uni($moderator['username']);
|
$moderator['profilelink'] = get_profile_link($moderator['id']); $moderator['username'] = htmlspecialchars_uni($moderator['username']);
|
|
|
eval("\$moderators .= \"".$templates->get("forumbit_moderators_user", 1, 0)."\";"); $done_moderators['users'][] = $moderator['id']; }
| eval("\$moderators .= \"".$templates->get("forumbit_moderators_user", 1, 0)."\";"); $done_moderators['users'][] = $moderator['id']; }
|
Zeile 414 | Zeile 421 |
---|
if($moderators) { eval("\$modlist = \"".$templates->get("forumbit_moderators")."\";");
|
if($moderators) { eval("\$modlist = \"".$templates->get("forumbit_moderators")."\";");
|
} else { $modlist = '';
| |
} }
| } }
|
Zeile 484 | Zeile 487 |
---|
global $mybb, $lang, $db, $unread_forums;
// This forum is a redirect, so override the folder icon with the "offlink" icon.
|
global $mybb, $lang, $db, $unread_forums;
// This forum is a redirect, so override the folder icon with the "offlink" icon.
|
if($forum['linkto'] != '')
| if(!empty($forum['linkto']))
|
{ $folder = "offlink"; $altonoff = $lang->forum_redirect;
| { $folder = "offlink"; $altonoff = $lang->forum_redirect;
|