Zeile 134 | Zeile 134 |
---|
cache_forums();
// If we're accessing a post, fetch the forum theme for it and if we're overriding it
|
cache_forums();
// If we're accessing a post, fetch the forum theme for it and if we're overriding it
|
if(!empty($mybb->input['pid']))
| if(!empty($mybb->input['pid']) && THIS_SCRIPT != "polls.php")
|
{ $query = $db->simple_select("posts", "fid", "pid = '".intval($mybb->input['pid'])."'", array("limit" => 1)); $fid = $db->fetch_field($query, "fid");
| { $query = $db->simple_select("posts", "fid", "pid = '".intval($mybb->input['pid'])."'", array("limit" => 1)); $fid = $db->fetch_field($query, "fid");
|
Zeile 157 | Zeile 157 |
---|
$load_from_forum = 1; } }
|
$load_from_forum = 1; } }
|
| // If we're accessing poll results, fetch the forum theme for it and if we're overriding it else if(!empty($mybb->input['pid']) && THIS_SCRIPT == "polls.php") { $query = $db->simple_select("threads", "fid", "poll = '".intval($mybb->input['pid'])."'", array("limit" => 1)); $fid = $db->fetch_field($query, "fid");
|
|
|
| if($fid) { $style = $forum_cache[$fid]; $load_from_forum = 1; } }
|
// We have a forum id - simply load the theme from it else if($mybb->input['fid']) {
| // We have a forum id - simply load the theme from it else if($mybb->input['fid']) {
|
Zeile 221 | Zeile 232 |
---|
foreach($stylesheet_actions as $stylesheet_action) { if(!$stylesheet_action)
|
foreach($stylesheet_actions as $stylesheet_action) { if(!$stylesheet_action)
|
{ continue; }
| { continue; }
|
if(!empty($theme['stylesheets'][$stylesheet_script][$stylesheet_action])) {
| if(!empty($theme['stylesheets'][$stylesheet_script][$stylesheet_action])) {
|
Zeile 253 | Zeile 264 |
---|
{ // Check if a custom language directory exists for this theme if(!empty($mybb->settings['bblanguage']))
|
{ // Check if a custom language directory exists for this theme if(!empty($mybb->settings['bblanguage']))
|
{ $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage']; } // Otherwise, the image language directory is the same as the language directory for the theme else { $theme['imglangdir'] = $theme['imgdir']; } }
| { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage']; } // Otherwise, the image language directory is the same as the language directory for the theme else { $theme['imglangdir'] = $theme['imgdir']; } }
|
} else {
| } else {
|
Zeile 286 | Zeile 297 |
---|
else { $theme['imglangdir'] = $theme['imgdir'];
|
else { $theme['imglangdir'] = $theme['imgdir'];
|
} } }
| } } }
|
// Theme logo - is it a relative URL to the forum root? Append bburl if(!preg_match("#^(\.\.?(/|$)|([a-z0-9]+)://)#i", $theme['logo']) && substr($theme['logo'], 0, 1) != "/") { $theme['logo'] = $mybb->settings['bburl']."/".$theme['logo'];
|
// Theme logo - is it a relative URL to the forum root? Append bburl if(!preg_match("#^(\.\.?(/|$)|([a-z0-9]+)://)#i", $theme['logo']) && substr($theme['logo'], 0, 1) != "/") { $theme['logo'] = $mybb->settings['bburl']."/".$theme['logo'];
|
}
| }
|
// Load Main Templates and Cached Templates if(isset($templatelist))
|
// Load Main Templates and Cached Templates if(isset($templatelist))
|
{
| {
|
$templatelist .= ','; } $templatelist .= "headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_guest,header_welcomeblock_member_admin,global_pm_alert,global_unreadreports";
| $templatelist .= ','; } $templatelist .= "headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_guest,header_welcomeblock_member_admin,global_pm_alert,global_unreadreports";
|
Zeile 310 | Zeile 321 |
---|
$datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false); $timenow = my_date($mybb->settings['timeformat'], TIME_NOW); $lang->welcome_current_time = $lang->sprintf($lang->welcome_current_time, $datenow.', '.$timenow);
|
$datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false); $timenow = my_date($mybb->settings['timeformat'], TIME_NOW); $lang->welcome_current_time = $lang->sprintf($lang->welcome_current_time, $datenow.', '.$timenow);
|
|
|
// Format the last visit date of this user appropriately if(isset($mybb->user['lastvisit'])) {
| // Format the last visit date of this user appropriately if(isset($mybb->user['lastvisit'])) {
|
Zeile 321 | Zeile 332 |
---|
else { $lastvisit = $lang->lastvisit_never;
|
else { $lastvisit = $lang->lastvisit_never;
|
}
| }
|
// If the board is closed and we have an Administrator, show board closed warning $bbclosedwarning = ''; if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['cancp'] == 1)
| // If the board is closed and we have an Administrator, show board closed warning $bbclosedwarning = ''; if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['cancp'] == 1)
|
Zeile 388 | Zeile 399 |
---|
foreach($groupleader as $user) { if($user['canmanagerequests'] != 1)
|
foreach($groupleader as $user) { if($user['canmanagerequests'] != 1)
|
{
| {
|
continue; } $gids .= ",{$user['gid']}";
|
continue; } $gids .= ",{$user['gid']}";
|
}
| }
|
$query = $db->simple_select("joinrequests", "COUNT(uid) as total", "gid IN (0{$gids})"); $total_joinrequests = $db->fetch_field($query, "total");
|
$query = $db->simple_select("joinrequests", "COUNT(uid) as total", "gid IN (0{$gids})"); $total_joinrequests = $db->fetch_field($query, "total");
|
|
|
$pending_joinrequests = ""; if($total_joinrequests > 0) {
| $pending_joinrequests = ""; if($total_joinrequests > 0) {
|
Zeile 415 | Zeile 426 |
---|
$unreadreports = ''; // This user is a moderator, super moderator or administrator
|
$unreadreports = ''; // This user is a moderator, super moderator or administrator
|
if($mybb->usergroup['cancp'] == 1 || $mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'])
| if($mybb->usergroup['cancp'] == 1 || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp']))
|
{
|
{
|
// Read the reported posts cache $reported = $cache->read("reportedposts");
| // Only worth checking if we are here because we have ACP permissions and the other condition fails if($mybb->usergroup['cancp'] == 1 && !($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'])) { // First we check if the user's a super admin: if yes, we don't care about permissions $can_access_moderationqueue = true; $is_super_admin = is_super_admin($recipient['uid']); if(!$is_super_admin) { // Include admin functions if(!file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php")) { $can_access_moderationqueue = false; }
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";
// Verify if we have permissions to access forum-moderation_queue require_once MYBB_ROOT.$mybb->config['admin_dir']."/modules/forum/module_meta.php"; if(function_exists("forum_admin_permissions")) { // Get admin permissions $adminperms = get_admin_permissions($mybb->user['uid']);
|
|
|
// 0 or more reported posts currently exist if($reported['unread'] > 0)
| $permissions = forum_admin_permissions(); if(array_key_exists('moderation_queue', $permissions['permissions']) && $adminperms['forum']['moderation_queue'] != 1) { $can_access_moderationqueue = false; } } } } else { $can_access_moderationqueue = false; } if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp']))
|
{
|
{
|
if($reported['unread'] == 1)
| // Read the reported posts cache $reported = $cache->read("reportedposts");
// 0 or more reported posts currently exist if($reported['unread'] > 0)
|
{
|
{
|
$lang->unread_reports = $lang->unread_report; } else { $lang->unread_reports = $lang->sprintf($lang->unread_reports, $reported['unread']);
| if($reported['unread'] == 1) { $lang->unread_reports = $lang->unread_report; } else { $lang->unread_reports = $lang->sprintf($lang->unread_reports, $reported['unread']); } eval("\$unreadreports = \"".$templates->get("global_unreadreports")."\";");
|
}
|
}
|
eval("\$unreadreports = \"".$templates->get("global_unreadreports")."\";");
| |
} }
| } }
|