Zeile 43 | Zeile 43 |
---|
{ $subforums = $sub_forums = ''; $lastpost_data = array(
|
{ $subforums = $sub_forums = ''; $lastpost_data = array(
|
'lastpost' => 0
| 'lastpost' => 0, 'lastposter' => '',
|
); $forum_viewers_text = ''; $forum_viewers_text_plain = '';
| ); $forum_viewers_text = ''; $forum_viewers_text_plain = '';
|
Zeile 62 | Zeile 63 |
---|
// Build the link to this forum $forum_url = get_forum_link($forum['fid']);
|
// Build the link to this forum $forum_url = get_forum_link($forum['fid']);
|
// This forum has a password, and the user isn't authenticated with it - hide post information
| |
$hideinfo = $hidecounters = false; $hidelastpostinfo = false; $showlockicon = 0;
|
$hideinfo = $hidecounters = false; $hidelastpostinfo = false; $showlockicon = 0;
|
if(isset($permissions['canviewthreads']) && $permissions['canviewthreads'] != 1)
| // Hide post info if user cannot view forum or cannot view threads if($permissions['canview'] != 1 || (isset($permissions['canviewthreads']) && $permissions['canviewthreads'] != 1))
|
{
|
{
|
$hideinfo = true;
| $hideinfo = true;
|
}
if(isset($permissions['canonlyviewownthreads']) && $permissions['canonlyviewownthreads'] == 1)
| }
if(isset($permissions['canonlyviewownthreads']) && $permissions['canonlyviewownthreads'] == 1)
|
Zeile 108 | Zeile 110 |
---|
} }
|
} }
|
if($private_forums[$forum['fid']]['lastpost'])
| if(!empty($private_forums[$forum['fid']]['lastpost']))
|
{ $forum['lastpost'] = $private_forums[$forum['fid']]['lastpost'];
| { $forum['lastpost'] = $private_forums[$forum['fid']]['lastpost'];
|
Zeile 124 | Zeile 126 |
---|
"lastposttid" => $private_forums[$forum['fid']]['tid'], "lastposteruid" => $private_forums[$forum['fid']]['lastposteruid'] );
|
"lastposttid" => $private_forums[$forum['fid']]['tid'], "lastposteruid" => $private_forums[$forum['fid']]['lastposteruid'] );
|
}
| }
|
} else {
| } else {
|
Zeile 142 | Zeile 144 |
---|
); }
|
); }
|
if($forum['password'])
| // This forum has a password, and the user isn't authenticated with it - hide post information if(!forum_password_validated($forum, true))
|
{
|
{
|
if(!isset($mybb->cookies['forumpass'][$forum['fid']]) || !my_hash_equals($mybb->cookies['forumpass'][$forum['fid']], md5($mybb->user['uid'].$forum['password']))) { $hideinfo = true; $showlockicon = 1; }
| $hideinfo = true; $showlockicon = 1;
|
}
// Fetch subforums of this forum
| }
// Fetch subforums of this forum
|
Zeile 168 | Zeile 168 |
---|
}
// 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.
|
if($forum_info['lastpost']['lastpost'] > $lastpost_data['lastpost'])
| if(isset($forum_info['lastpost']['lastpost']) && $forum_info['lastpost']['lastpost'] > $lastpost_data['lastpost'])
|
{ $lastpost_data = $forum_info['lastpost'];
| { $lastpost_data = $forum_info['lastpost'];
|
Zeile 189 | Zeile 189 |
---|
}
// If we are hiding information (lastpost) because we aren't authenticated against the password for this forum, remove them
|
}
// If we are hiding information (lastpost) because we aren't authenticated against the password for this forum, remove them
|
if($hidelastpostinfo == true)
| if($hideinfo == true || $hidelastpostinfo == true)
|
{
|
{
|
| // Used later for get_forum_lightbulb function call - Setting to 0 prevents the bulb from being lit up // If hiding info or hiding lastpost info no "unread" posts indication should be shown to the user.
|
$lastpost_data = array( 'lastpost' => 0,
|
$lastpost_data = array( 'lastpost' => 0,
|
'lastposter' => ''
| 'lastposter' => '',
|
); }
| ); }
|
Zeile 427 | Zeile 429 |
---|
// Check if this category is either expanded or collapsed and hide it as necessary. $expdisplay = '';
|
// Check if this category is either expanded or collapsed and hide it as necessary. $expdisplay = '';
|
$collapsed_name = "cat_{$forum['fid']}_c"; if(isset($collapsed[$collapsed_name]) && $collapsed[$collapsed_name] == "display: show;")
| $collapsed_name = "cat_{$forum['fid']}_e"; if(isset($collapsed[$collapsed_name]) && $collapsed[$collapsed_name] == "display: none;")
|
{ $expcolimage = "collapse_collapsed.png"; $expdisplay = "display: none;"; $expthead = " thead_collapsed";
|
{ $expcolimage = "collapse_collapsed.png"; $expdisplay = "display: none;"; $expthead = " thead_collapsed";
|
$expaltext = "[+]";
| $expaltext = $lang->expcol_expand;
|
} else { $expcolimage = "collapse.png"; $expthead = "";
|
} else { $expcolimage = "collapse.png"; $expthead = "";
|
$expaltext = "[-]";
| $expaltext = $lang->expcol_collapse;
|
}
// Swap over the alternate backgrounds
| }
// Swap over the alternate backgrounds
|