Zeile 18 | Zeile 18 |
---|
$templatelist .= ",forumdisplay_usersbrowsing_user,forumdisplay_usersbrowsing,forumdisplay_inlinemoderation,forumdisplay_thread_modbit,forumdisplay_inlinemoderation_col,forumdisplay_inlinemoderation_selectall,forumdisplay_threadlist_clearpass,forumdisplay_thread_rating_moved"; $templatelist .= ",forumdisplay_announcements_announcement,forumdisplay_announcements,forumdisplay_threads_sep,forumbit_depth3_statusicon,forumbit_depth3,forumdisplay_sticky_sep,forumdisplay_thread_attachment_count,forumdisplay_rssdiscovery,forumdisplay_announcement_rating,forumbit_moderators_group"; $templatelist .= ",forumdisplay_inlinemoderation_openclose,forumdisplay_inlinemoderation_stickunstick,forumdisplay_inlinemoderation_softdelete,forumdisplay_inlinemoderation_restore,forumdisplay_inlinemoderation_delete,forumdisplay_inlinemoderation_manage,forumdisplay_inlinemoderation_approveunapprove";
|
$templatelist .= ",forumdisplay_usersbrowsing_user,forumdisplay_usersbrowsing,forumdisplay_inlinemoderation,forumdisplay_thread_modbit,forumdisplay_inlinemoderation_col,forumdisplay_inlinemoderation_selectall,forumdisplay_threadlist_clearpass,forumdisplay_thread_rating_moved"; $templatelist .= ",forumdisplay_announcements_announcement,forumdisplay_announcements,forumdisplay_threads_sep,forumbit_depth3_statusicon,forumbit_depth3,forumdisplay_sticky_sep,forumdisplay_thread_attachment_count,forumdisplay_rssdiscovery,forumdisplay_announcement_rating,forumbit_moderators_group"; $templatelist .= ",forumdisplay_inlinemoderation_openclose,forumdisplay_inlinemoderation_stickunstick,forumdisplay_inlinemoderation_softdelete,forumdisplay_inlinemoderation_restore,forumdisplay_inlinemoderation_delete,forumdisplay_inlinemoderation_manage,forumdisplay_inlinemoderation_approveunapprove";
|
$templatelist .= ",forumbit_depth2_forum_unapproved_posts,forumbit_depth2_forum_unapproved_threads,forumbit_moderators_user,forumdisplay_inlinemoderation_standard,forumdisplay_threadlist_prefixes_prefix,forumdisplay_threadlist_prefixes";
| $templatelist .= ",forumbit_depth2_forum_unapproved_posts,forumbit_depth2_forum_unapproved_threads,forumbit_moderators_user,forumdisplay_inlinemoderation_standard,forumdisplay_threadlist_prefixes_prefix,forumdisplay_threadlist_prefixes,forumdisplay_nopermission";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
| require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
|
Zeile 36 | Zeile 36 |
---|
$plugins->run_hooks("forumdisplay_start");
|
$plugins->run_hooks("forumdisplay_start");
|
$fid = $mybb->get_input('fid', 1);
| $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
if($fid < 0) { switch($fid)
| if($fid < 0) { switch($fid)
|
Zeile 314 | Zeile 314 |
---|
if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid']) {
|
if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid']) {
|
$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
| $user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);
|
$user['profilelink'] = build_profile_link($user['username'], $user['uid']); eval("\$onlinemembers .= \"".$templates->get("forumdisplay_usersbrowsing_user", 1, 0)."\";"); $comma = $lang->comma;
| $user['profilelink'] = build_profile_link($user['username'], $user['uid']); eval("\$onlinemembers .= \"".$templates->get("forumdisplay_usersbrowsing_user", 1, 0)."\";"); $comma = $lang->comma;
|
Zeile 327 | Zeile 327 |
---|
if($guestcount) { $guestsonline = $lang->sprintf($lang->users_browsing_forum_guests, $guestcount);
|
if($guestcount) { $guestsonline = $lang->sprintf($lang->users_browsing_forum_guests, $guestcount);
|
}
$onlinesep = ''; if($guestcount && $onlinemembers) { $onlinesep = $lang->comma;
| |
}
$invisonline = '';
|
}
$invisonline = '';
|
if($inviscount && $mybb->usergroup['canviewwolinvis'] != 1 && ($inviscount != 1 && $mybb->user['invisible'] != 1))
| if($mybb->user['invisible'] == 1) { // the user was counted as invisible user --> correct the inviscount $inviscount -= 1; } if($inviscount && $mybb->usergroup['canviewwolinvis'] != 1)
|
{ $invisonline = $lang->sprintf($lang->users_browsing_forum_invis, $inviscount);
|
{ $invisonline = $lang->sprintf($lang->users_browsing_forum_invis, $inviscount);
|
}
| }
$onlinesep = ''; if($invisonline != '' && $onlinemembers) { $onlinesep = $lang->comma; }
|
$onlinesep2 = '';
|
$onlinesep2 = '';
|
if($invisonline != '' && $guestcount)
| if($invisonline != '' && $guestcount || $onlinemembers && $guestcount)
|
{ $onlinesep2 = $lang->comma; }
eval("\$usersbrowsing = \"".$templates->get("forumdisplay_usersbrowsing")."\";");
|
{ $onlinesep2 = $lang->comma; }
eval("\$usersbrowsing = \"".$templates->get("forumdisplay_usersbrowsing")."\";");
|
}
| }
|
// Do we have any forum rules to show for this forum? $forumrules = '';
| // Do we have any forum rules to show for this forum? $forumrules = '';
|
Zeile 430 | Zeile 436 |
---|
// Pick out some sorting options. // First, the date cut for the threads.
|
// Pick out some sorting options. // First, the date cut for the threads.
|
$datecut = 0;
| $datecut = 9999;
|
if(empty($mybb->input['datecut'])) { // If the user manually set a date cut, use it.
|
if(empty($mybb->input['datecut'])) { // If the user manually set a date cut, use it.
|
if(isset($mybb->user['daysprune']))
| if(!empty($mybb->user['daysprune']))
|
{ $datecut = $mybb->user['daysprune']; }
| { $datecut = $mybb->user['daysprune']; }
|
Zeile 448 | Zeile 454 |
---|
} } // If there was a manual date cut override, use it.
|
} } // If there was a manual date cut override, use it.
|
else { $datecut = $mybb->get_input('datecut', 1); }
$datecut = (int)$datecut; $datecutsel[$datecut] = "selected=\"selected\""; if($datecut > 0 && $datecut != 9999)
| else { $datecut = $mybb->get_input('datecut', MyBB::INPUT_INT); }
$datecutsel[(int)$datecut] = ' selected="selected"'; if($datecut > 0 && $datecut != 9999)
|
{ $checkdate = TIME_NOW - ($datecut * 86400); $datecutsql = "AND (lastpost >= '$checkdate' OR sticky = '1')"; $datecutsql2 = "AND (t.lastpost >= '$checkdate' OR t.sticky = '1')";
|
{ $checkdate = TIME_NOW - ($datecut * 86400); $datecutsql = "AND (lastpost >= '$checkdate' OR sticky = '1')"; $datecutsql2 = "AND (t.lastpost >= '$checkdate' OR t.sticky = '1')";
|
}
| }
|
else
|
else
|
{
| {
|
$datecutsql = ''; $datecutsql2 = ''; }
// Sort by thread prefix
|
$datecutsql = ''; $datecutsql2 = ''; }
// Sort by thread prefix
|
$tprefix = $mybb->get_input('prefix', 1);
| $tprefix = $mybb->get_input('prefix', MyBB::INPUT_INT);
|
if($tprefix > 0)
|
if($tprefix > 0)
|
{ $prefixsql = "AND prefix='{$tprefix}'"; $prefixsql2 = "AND t.prefix='{$tprefix}'"; }
| { $prefixsql = "AND prefix = {$tprefix}"; $prefixsql2 = "AND t.prefix = {$tprefix}"; } else if($tprefix == -1) { $prefixsql = "AND prefix = 0"; $prefixsql2 = "AND t.prefix = 0"; } else if($tprefix == -2) { $prefixsql = "AND prefix != 0"; $prefixsql2 = "AND t.prefix != 0"; }
|
else {
|
else {
|
$prefixsql = ''; $prefixsql2 = '';
| $prefixsql = $prefixsql2 = '';
|
}
// Pick the sort order.
| }
// Pick the sort order.
|
Zeile 496 | Zeile 510 |
---|
{ case "asc": $sortordernow = "asc";
|
{ case "asc": $sortordernow = "asc";
|
$ordersel['asc'] = "selected=\"selected\"";
| $ordersel['asc'] = ' selected="selected"';
|
$oppsort = $lang->desc; $oppsortnext = "desc"; break; default: $sortordernow = "desc";
|
$oppsort = $lang->desc; $oppsortnext = "desc"; break; default: $sortordernow = "desc";
|
$ordersel['desc'] = "selected=\"selected\"";
| $ordersel['desc'] = ' selected="selected"';
|
$oppsort = $lang->asc; $oppsortnext = "asc"; break;
| $oppsort = $lang->asc; $oppsortnext = "asc"; break;
|
Zeile 553 | Zeile 567 |
---|
}
$sortsel['rating'] = ''; // Needs to be initialized in order to speed-up things. Fixes #2031
|
}
$sortsel['rating'] = ''; // Needs to be initialized in order to speed-up things. Fixes #2031
|
$sortsel[$mybb->input['sortby']] = "selected=\"selected\"";
| $sortsel[$mybb->input['sortby']] = ' selected="selected"';
|
// Pick the right string to join the sort URL if($mybb->seo_support == true)
| // Pick the right string to join the sort URL if($mybb->seo_support == true)
|
Zeile 566 | Zeile 580 |
---|
}
// Are we viewing a specific page?
|
}
// Are we viewing a specific page?
|
$mybb->input['page'] = $mybb->get_input('page', 1);
| $mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);
|
if($mybb->input['page'] > 1) { $sorturl = get_forum_link($fid, $mybb->input['page']).$string."datecut=$datecut&prefix=$tprefix";
| if($mybb->input['page'] > 1) { $sorturl = get_forum_link($fid, $mybb->input['page']).$string."datecut=$datecut&prefix=$tprefix";
|
Zeile 589 | Zeile 603 |
---|
if($fpermissions['canviewthreads'] != 0) { // How many posts are there?
|
if($fpermissions['canviewthreads'] != 0) { // How many posts are there?
|
if($datecut > 0 || isset($fpermissions['canonlyviewownthreads']) && $fpermissions['canonlyviewownthreads'] == 1)
| if(($datecut > 0 && $datecut != 9999) || isset($fpermissions['canonlyviewownthreads']) && $fpermissions['canonlyviewownthreads'] == 1)
|
{ $query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $useronly $visibleonly $datecutsql $prefixsql"); $threadcount = $db->fetch_field($query, "threads");
| { $query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $useronly $visibleonly $datecutsql $prefixsql"); $threadcount = $db->fetch_field($query, "threads");
|
Zeile 678 | Zeile 692 |
---|
$and = "&"; }
|
$and = "&"; }
|
if($datecut > 0)
| if($datecut > 0 && $datecut != 9999)
|
{ $page_url .= "{$q}{$and}datecut={$datecut}"; $q = ''; $and = "&"; }
|
{ $page_url .= "{$q}{$and}datecut={$datecut}"; $q = ''; $and = "&"; }
|
if($tprefix > 0)
| if($tprefix != 0)
|
{ $page_url .= "{$q}{$and}prefix={$tprefix}"; }
| { $page_url .= "{$q}{$and}prefix={$tprefix}"; }
|
Zeile 784 | Zeile 798 |
---|
$announcement['subject'] = $parser->parse_badwords($announcement['subject']); $announcement['subject'] = htmlspecialchars_uni($announcement['subject']); $postdate = my_date('relative', $announcement['startdate']);
|
$announcement['subject'] = $parser->parse_badwords($announcement['subject']); $announcement['subject'] = htmlspecialchars_uni($announcement['subject']); $postdate = my_date('relative', $announcement['startdate']);
|
| $announcement['username'] = htmlspecialchars_uni($announcement['username']);
|
$announcement['profilelink'] = build_profile_link($announcement['username'], $announcement['uid']);
if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $fpermissions['canviewthreads'] != 0)
|
$announcement['profilelink'] = build_profile_link($announcement['username'], $announcement['uid']);
if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $fpermissions['canviewthreads'] != 0)
|
{
| {
|
eval("\$rating = \"".$templates->get("forumdisplay_announcement_rating")."\";"); $lpbackground = "trow2"; }
| eval("\$rating = \"".$templates->get("forumdisplay_announcement_rating")."\";"); $lpbackground = "trow2"; }
|
Zeile 795 | Zeile 812 |
---|
{ $rating = ''; $lpbackground = "trow1";
|
{ $rating = ''; $lpbackground = "trow1";
|
}
| }
|
if($ismod) { eval("\$modann = \"".$templates->get("forumdisplay_announcements_announcement_modbit")."\";");
| if($ismod) { eval("\$modann = \"".$templates->get("forumdisplay_announcements_announcement_modbit")."\";");
|
Zeile 824 | Zeile 841 |
---|
} else if(!empty($cookie)) {
|
} else if(!empty($cookie)) {
|
my_setcookie("mybb[announcements]", addslashes(serialize($cookie)), -1);
| my_setcookie("mybb[announcements]", addslashes(my_serialize($cookie)), -1);
|
} } else
| } } else
|
Zeile 858 | Zeile 875 |
---|
if($thread['numratings'] > 0 && $ratings == false) { $ratings = true; // Looks for ratings in the forum
|
if($thread['numratings'] > 0 && $ratings == false) { $ratings = true; // Looks for ratings in the forum
|
}
| }
|
// If this is a moved thread - set the tid for participation marking and thread read marking to that of the moved thread if(substr($thread['closed'], 0, 5) == "moved")
| // If this is a moved thread - set the tid for participation marking and thread read marking to that of the moved thread if(substr($thread['closed'], 0, 5) == "moved")
|
Zeile 882 | Zeile 899 |
---|
}
if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $mybb->user['uid'] && !empty($threadcache) && $ratings == true)
|
}
if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $mybb->user['uid'] && !empty($threadcache) && $ratings == true)
|
{
| {
|
// Check if we've rated threads on this page // Guests get the pleasure of not being ID'd, but will be checked when they try and rate $imp = implode(",", array_keys($threadcache));
| // Check if we've rated threads on this page // Guests get the pleasure of not being ID'd, but will be checked when they try and rate $imp = implode(",", array_keys($threadcache));
|
Zeile 913 | Zeile 930 |
---|
// Check participation by the current user in any of these threads - for 'dot' folder icons if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && !empty($threadcache)) {
|
// Check participation by the current user in any of these threads - for 'dot' folder icons if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && !empty($threadcache)) {
|
$query = $db->simple_select("posts", "tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids}) {$visibleonly}");
| $query = $db->simple_select("posts", "DISTINCT tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids}) {$visibleonly}");
|
while($post = $db->fetch_array($query)) { if(!empty($moved_threads[$post['tid']]))
|
while($post = $db->fetch_array($query)) { if(!empty($moved_threads[$post['tid']]))
|
{
| {
|
$post['tid'] = $moved_threads[$post['tid']]; } if($threadcache[$post['tid']])
| $post['tid'] = $moved_threads[$post['tid']]; } if($threadcache[$post['tid']])
|
Zeile 934 | Zeile 951 |
---|
while($readthread = $db->fetch_array($query)) { if(!empty($moved_threads[$readthread['tid']]))
|
while($readthread = $db->fetch_array($query)) { if(!empty($moved_threads[$readthread['tid']]))
|
{
| {
|
$readthread['tid'] = $moved_threads[$readthread['tid']]; } if($threadcache[$readthread['tid']])
| $readthread['tid'] = $moved_threads[$readthread['tid']]; } if($threadcache[$readthread['tid']])
|
Zeile 984 | Zeile 1001 |
---|
$plugins->run_hooks("forumdisplay_thread");
$moved = explode("|", $thread['closed']);
|
$plugins->run_hooks("forumdisplay_thread");
$moved = explode("|", $thread['closed']);
|
|
|
if($thread['visible'] == 0) { $bgcolor = "trow_shaded";
| if($thread['visible'] == 0) { $bgcolor = "trow_shaded";
|
Zeile 1002 | Zeile 1019 |
---|
{ $thread_type_class = " forumdisplay_sticky"; }
|
{ $thread_type_class = " forumdisplay_sticky"; }
|
else { $thread_type_class = " forumdisplay_regular"; }
| else { $thread_type_class = " forumdisplay_regular"; }
|
$folder = ''; $prefix = '';
| $folder = ''; $prefix = '';
|
Zeile 1013 | Zeile 1030 |
---|
$thread['author'] = $thread['uid']; if(!$thread['username']) {
|
$thread['author'] = $thread['uid']; if(!$thread['username']) {
|
$thread['username'] = $thread['threadusername']; $thread['profilelink'] = $thread['threadusername'];
| $thread['username'] = $thread['profilelink'] = htmlspecialchars_uni($thread['threadusername']);
|
} else {
|
} else {
|
| $thread['username'] = htmlspecialchars_uni($thread['username']);
|
$thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);
|
$thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);
|
}
| }
|
// If this thread has a prefix, insert a space between prefix and subject $thread['threadprefix'] = $threadprefix = '';
| // If this thread has a prefix, insert a space between prefix and subject $thread['threadprefix'] = $threadprefix = '';
|
Zeile 1039 | Zeile 1056 |
---|
{ $icon = $icon_cache[$thread['icon']]; $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
|
{ $icon = $icon_cache[$thread['icon']]; $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
|
| $icon['path'] = htmlspecialchars_uni($icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']);
|
eval("\$icon = \"".$templates->get("forumdisplay_thread_icon")."\";"); } else
| eval("\$icon = \"".$templates->get("forumdisplay_thread_icon")."\";"); } else
|
Zeile 1240 | Zeile 1259 |
---|
$inline_edit_class = "subject_editable"; }
|
$inline_edit_class = "subject_editable"; }
|
$lastposter = $thread['lastposter'];
| $lastposter = htmlspecialchars_uni($thread['lastposter']);
|
$lastposteruid = $thread['lastposteruid']; $lastpostdate = my_date('relative', $thread['lastpost']);
| $lastposteruid = $thread['lastposteruid']; $lastpostdate = my_date('relative', $thread['lastpost']);
|
Zeile 1320 | Zeile 1339 |
---|
$gid = (int)$gid; $gidswhere .= " OR ','||groups||',' LIKE '%,{$gid},%'"; }
|
$gid = (int)$gid; $gidswhere .= " OR ','||groups||',' LIKE '%,{$gid},%'"; }
|
$query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND (groups=''{$gidswhere}) AND type = 't'");
| $query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND (groups='' OR ','||groups||',' LIKE '%,-1,%'{$gidswhere}) AND type = 't'");
|
break; default: foreach($gids as $gid)
| break; default: foreach($gids as $gid)
|
Zeile 1328 | Zeile 1347 |
---|
$gid = (int)$gid; $gidswhere .= " OR CONCAT(',',groups,',') LIKE '%,{$gid},%'"; }
|
$gid = (int)$gid; $gidswhere .= " OR CONCAT(',',groups,',') LIKE '%,{$gid},%'"; }
|
$query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND (groups=''{$gidswhere}) AND type = 't'");
| $query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND (groups='' OR CONCAT(',',groups,',') LIKE '%,-1,%'{$gidswhere}) AND type = 't'");
|
break; }
| break; }
|
Zeile 1422 | Zeile 1441 |
---|
// Is this a real forum with threads? if($foruminfo['type'] != "c") {
|
// Is this a real forum with threads? if($foruminfo['type'] != "c") {
|
if(!$threadcount)
| if($fpermissions['canviewthreads'] != 1) { eval("\$threads = \"".$templates->get("forumdisplay_nopermission")."\";"); }
if(!$threadcount && $fpermissions['canviewthreads'] == 1)
|
{ eval("\$threads = \"".$templates->get("forumdisplay_nothreads")."\";"); }
| { eval("\$threads = \"".$templates->get("forumdisplay_nothreads")."\";"); }
|