Zeile 11 | Zeile 11 |
---|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'forumdisplay.php');
|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'forumdisplay.php');
|
$templatelist = "forumdisplay,forumdisplay_thread,forumbit_depth1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,forumdisplay_moderatedby,forumdisplay_searchforum,forumdisplay_thread_rating,forumdisplay_threadlist_rating";
| $templatelist = "forumdisplay,forumdisplay_thread,forumbit_depth1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,forumdisplay_moderatedby,forumdisplay_searchforum,forumdisplay_forumsort,forumdisplay_thread_rating,forumdisplay_threadlist_rating";
|
$templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_gotounread,forumbit_depth2_forum_lastpost,forumdisplay_rules_link,forumdisplay_orderarrow,forumdisplay_newthread"; $templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,forumdisplay_thread_unapproved_posts,forumdisplay_nothreads"; $templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdisplay_password_wrongpass,forumdisplay_password,forumdisplay_inlinemoderation_custom_tool,forumbit_subforums,forumbit_moderators,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden";
| $templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_gotounread,forumbit_depth2_forum_lastpost,forumdisplay_rules_link,forumdisplay_orderarrow,forumdisplay_newthread"; $templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,forumdisplay_thread_unapproved_posts,forumdisplay_nothreads"; $templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdisplay_password_wrongpass,forumdisplay_password,forumdisplay_inlinemoderation_custom_tool,forumbit_subforums,forumbit_moderators,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden";
|
Zeile 152 | Zeile 152 |
---|
$subforums = ''; $child_forums = build_forumbits($fid, 2);
|
$subforums = ''; $child_forums = build_forumbits($fid, 2);
|
$forums = $child_forums['forum_list'];
| |
|
|
if($forums)
| if(!empty($child_forums) && !empty($child_forums['forum_list']))
|
{
|
{
|
| $forums = $child_forums['forum_list'];
|
$lang->sub_forums_in = $lang->sprintf($lang->sub_forums_in, $foruminfo['name']); eval("\$subforums = \"".$templates->get("forumdisplay_subforums")."\";"); }
| $lang->sub_forums_in = $lang->sprintf($lang->sub_forums_in, $foruminfo['name']); eval("\$subforums = \"".$templates->get("forumdisplay_subforums")."\";"); }
|
Zeile 177 | Zeile 177 |
---|
$forumjump = build_forum_jump("", $fid, 1); }
|
$forumjump = build_forum_jump("", $fid, 1); }
|
| $newthread = '';
|
if($foruminfo['type'] == "f" && $foruminfo['open'] != 0 && $fpermissions['canpostthreads'] != 0 && $mybb->user['suspendposting'] == 0) { eval("\$newthread = \"".$templates->get("forumdisplay_newthread")."\";"); }
|
if($foruminfo['type'] == "f" && $foruminfo['open'] != 0 && $fpermissions['canpostthreads'] != 0 && $mybb->user['suspendposting'] == 0) { eval("\$newthread = \"".$templates->get("forumdisplay_newthread")."\";"); }
|
| $searchforum = '';
|
if($fpermissions['cansearch'] != 0 && $foruminfo['type'] == "f") { eval("\$searchforum = \"".$templates->get("forumdisplay_searchforum")."\";");
| if($fpermissions['cansearch'] != 0 && $foruminfo['type'] == "f") { eval("\$searchforum = \"".$templates->get("forumdisplay_searchforum")."\";");
|
Zeile 213 | Zeile 215 |
---|
$moderators = ''; $parentlistexploded = explode(",", $parentlist);
|
$moderators = ''; $parentlistexploded = explode(",", $parentlist);
|
| $comma = '';
|
foreach($parentlistexploded as $mfid) { // This forum has moderators
|
foreach($parentlistexploded as $mfid) { // This forum has moderators
|
if(is_array($moderatorcache[$mfid]))
| if(isset($moderatorcache[$mfid]) && is_array($moderatorcache[$mfid]))
|
{ // Fetch each moderator from the cache and format it, appending it to the list foreach($moderatorcache[$mfid] as $modtype)
| { // Fetch each moderator from the cache and format it, appending it to the list foreach($moderatorcache[$mfid] as $modtype)
|
Zeile 302 | Zeile 305 |
---|
{ $doneusers[$user['uid']] = $user['time']; ++$membercount;
|
{ $doneusers[$user['uid']] = $user['time']; ++$membercount;
|
if($user['invisible'] == 1)
| if($user['invisible'] == 1 && $mybb->usergroup['canbeinvisible'] == 1)
|
{ $invisiblemark = "*"; ++$inviscount;
| { $invisiblemark = "*"; ++$inviscount;
|
Zeile 607 | Zeile 610 |
---|
if($fpermissions['canviewthreads'] != 0) { // How many threads are there?
|
if($fpermissions['canviewthreads'] != 0) { // How many threads are there?
|
$query = $db->simple_select("threads t", "COUNT(tid) AS threads", "fid = '$fid' $tuseronly $tvisibleonly $datecutsql2 $prefixsql2"); $threadcount = $db->fetch_field($query, "threads");
| if ($useronly === "" && $datecutsql === "" && $prefixsql === "") { $threadcount = 0;
$query = $db->simple_select("forums", "threads, unapprovedthreads, deletedthreads", "fid=".(int)$fid); $forum_threads = $db->fetch_array($query);
if(in_array(1, $visible_states)) { $threadcount += $forum_threads['threads']; }
if(in_array(-1, $visible_states)) { $threadcount += $forum_threads['deletedthreads']; }
if(in_array(0, $visible_states)) { $threadcount += $forum_threads['unapprovedthreads']; } elseif($mybb->user['uid'] && $mybb->settings['showownunapproved']) { $query = $db->simple_select("threads t", "COUNT(tid) AS threads", "fid = '$fid' AND t.visible=0 AND t.uid=".(int)$mybb->user['uid']); $threadcount += $db->fetch_field($query, "threads"); } } else { $query = $db->simple_select("threads t", "COUNT(tid) AS threads", "fid = '$fid' $tuseronly $tvisibleonly $datecutsql2 $prefixsql2");
$threadcount = $db->fetch_field($query, "threads"); }
|
}
// How many pages are there?
| }
// How many pages are there?
|
Zeile 629 | Zeile 663 |
---|
{ $start = 0; $page = 1;
|
{ $start = 0; $page = 1;
|
}
| }
|
} else {
| } else {
|
Zeile 657 | Zeile 691 |
---|
$and = ''; } else
|
$and = ''; } else
|
{ $q = ''; $and = "&";
| { $q = ''; $and = "&";
|
}
if((!empty($foruminfo['defaultsortby']) && $sortby != $foruminfo['defaultsortby']) || (empty($foruminfo['defaultsortby']) && $sortby != "lastpost"))
| }
if((!empty($foruminfo['defaultsortby']) && $sortby != $foruminfo['defaultsortby']) || (empty($foruminfo['defaultsortby']) && $sortby != "lastpost"))
|
Zeile 686 | Zeile 720 |
---|
if($tprefix != 0) { $page_url .= "{$q}{$and}prefix={$tprefix}";
|
if($tprefix != 0) { $page_url .= "{$q}{$and}prefix={$tprefix}";
|
} } else {
| } } else {
|
$page_url = str_replace("{fid}", $fid, FORUM_URL_PAGED); } $multipage = multipage($threadcount, $perpage, $page, $page_url);
|
$page_url = str_replace("{fid}", $fid, FORUM_URL_PAGED); } $multipage = multipage($threadcount, $perpage, $page, $page_url);
|
| $ratingcol = $ratingsort = '';
|
if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $fpermissions['canviewthreads'] != 0) { $lang->load("ratethread");
| if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $fpermissions['canviewthreads'] != 0) { $lang->load("ratethread");
|
Zeile 881 | Zeile 916 |
---|
} } }
|
} } }
|
| $args = array( 'threadcache' => &$threadcache, 'tids' => &$tids );
$plugins->run_hooks("forumdisplay_before_thread", $args);
|
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) {
|
Zeile 924 | Zeile 966 |
---|
if($threadcache[$post['tid']]) { $threadcache[$post['tid']]['doticon'] = 1;
|
if($threadcache[$post['tid']]) { $threadcache[$post['tid']]['doticon'] = 1;
|
} } }
| } } }
|
// Read threads if($mybb->user['uid'] && $mybb->settings['threadreadcut'] > 0 && !empty($threadcache)) {
| // Read threads if($mybb->user['uid'] && $mybb->settings['threadreadcut'] > 0 && !empty($threadcache)) {
|
Zeile 935 | Zeile 977 |
---|
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']]) { $threadcache[$readthread['tid']]['lastread'] = $readthread['dateline'];
|
$readthread['tid'] = $moved_threads[$readthread['tid']]; } if($threadcache[$readthread['tid']]) { $threadcache[$readthread['tid']]['lastread'] = $readthread['dateline'];
|
} } }
| } } }
|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'])
|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'])
|
{
| { $forum_read = 0;
|
$query = $db->simple_select("forumsread", "dateline", "fid='{$fid}' AND uid='{$mybb->user['uid']}'");
|
$query = $db->simple_select("forumsread", "dateline", "fid='{$fid}' AND uid='{$mybb->user['uid']}'");
|
$forum_read = $db->fetch_field($query, "dateline");
| if($db->num_rows($query) > 0) { $forum_read = $db->fetch_field($query, "dateline"); }
|
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($forum_read == 0 || $forum_read < $read_cutoff)
| $read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($forum_read == 0 || $forum_read < $read_cutoff)
|
Zeile 959 | Zeile 1005 |
---|
else { $forum_read = my_get_array_cookie("forumread", $fid);
|
else { $forum_read = my_get_array_cookie("forumread", $fid);
|
|
|
if(isset($mybb->cookies['mybb']['readallforums']) && !$forum_read) { $forum_read = $mybb->cookies['mybb']['lastvisit']; } }
|
if(isset($mybb->cookies['mybb']['readallforums']) && !$forum_read) { $forum_read = $mybb->cookies['mybb']['lastvisit']; } }
|
|
|
$unreadpost = 0; $threads = ''; if(!empty($threadcache) && is_array($threadcache))
| $unreadpost = 0; $threads = ''; if(!empty($threadcache) && is_array($threadcache))
|
Zeile 973 | Zeile 1019 |
---|
if(!$mybb->settings['maxmultipagelinks']) { $mybb->settings['maxmultipagelinks'] = 5;
|
if(!$mybb->settings['maxmultipagelinks']) { $mybb->settings['maxmultipagelinks'] = 5;
|
}
| }
|
if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
|
if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
|
{
| {
|
$mybb->settings['postsperpage'] = 20; }
| $mybb->settings['postsperpage'] = 20; }
|
Zeile 989 | Zeile 1035 |
---|
if($thread['visible'] == 0) { $bgcolor = "trow_shaded";
|
if($thread['visible'] == 0) { $bgcolor = "trow_shaded";
|
}
| }
|
elseif($thread['visible'] == -1 && is_moderator($fid, "canviewdeleted")) { $bgcolor = "trow_shaded trow_deleted";
|
elseif($thread['visible'] == -1 && is_moderator($fid, "canviewdeleted")) { $bgcolor = "trow_shaded trow_deleted";
|
} else { $bgcolor = alt_trow();
| } else { $bgcolor = alt_trow();
|
}
if($thread['sticky'] == 1)
|
}
if($thread['sticky'] == 1)
|
{
| {
|
$thread_type_class = " forumdisplay_sticky";
|
$thread_type_class = " forumdisplay_sticky";
|
} else {
| } else {
|
$thread_type_class = " forumdisplay_regular"; }
| $thread_type_class = " forumdisplay_regular"; }
|
Zeile 1318 | Zeile 1364 |
---|
}
eval("\$attachment_count = \"".$templates->get("forumdisplay_thread_attachment_count")."\";");
|
}
eval("\$attachment_count = \"".$templates->get("forumdisplay_thread_attachment_count")."\";");
|
} else
| } else
|
{ $attachment_count = ''; }
| { $attachment_count = ''; }
|
Zeile 1332 | Zeile 1378 |
---|
} else {
|
} else {
|
| $thread['start_datetime'] = my_date('relative', $thread['dateline']);
|
eval("\$threads .= \"".$templates->get("forumdisplay_thread")."\";"); } }
| eval("\$threads .= \"".$templates->get("forumdisplay_thread")."\";"); } }
|
Zeile 1377 | Zeile 1424 |
---|
{ eval("\$customthreadtools = \"".$templates->get("forumdisplay_inlinemoderation_custom")."\";"); }
|
{ eval("\$customthreadtools = \"".$templates->get("forumdisplay_inlinemoderation_custom")."\";"); }
|
}
| }
|
$inlinemodopenclose = $inlinemodstickunstick = $inlinemodsoftdelete = $inlinemodrestore = $inlinemoddelete = $inlinemodmanage = $inlinemodapproveunapprove = '';
if(is_moderator($fid, "canopenclosethreads"))
| $inlinemodopenclose = $inlinemodstickunstick = $inlinemodsoftdelete = $inlinemodrestore = $inlinemoddelete = $inlinemodmanage = $inlinemodapproveunapprove = '';
if(is_moderator($fid, "canopenclosethreads"))
|
Zeile 1436 | Zeile 1483 |
---|
if($unread_threads !== false && $unread_threads == 0 && empty($unread_forums)) { mark_forum_read($fid);
|
if($unread_threads !== false && $unread_threads == 0 && empty($unread_forums)) { mark_forum_read($fid);
|
}
| }
|
// Subscription status $add_remove_subscription = 'add'; $add_remove_subscription_text = $lang->subscribe_forum;
| // Subscription status $add_remove_subscription = 'add'; $add_remove_subscription_text = $lang->subscribe_forum;
|
Zeile 1447 | Zeile 1494 |
---|
{ $query = $db->simple_select("forumsubscriptions", "fid", "fid='".$fid."' AND uid='{$mybb->user['uid']}'", array('limit' => 1));
|
{ $query = $db->simple_select("forumsubscriptions", "fid", "fid='".$fid."' AND uid='{$mybb->user['uid']}'", array('limit' => 1));
|
if($db->fetch_field($query, 'fid'))
| if($db->num_rows($query) > 0)
|
{ $add_remove_subscription = 'remove'; $add_remove_subscription_text = $lang->unsubscribe_forum;
| { $add_remove_subscription = 'remove'; $add_remove_subscription_text = $lang->unsubscribe_forum;
|
Zeile 1478 | Zeile 1525 |
---|
}
$prefixselect = build_forum_prefix_select($fid, $tprefix);
|
}
$prefixselect = build_forum_prefix_select($fid, $tprefix);
|
| // Populate Forumsort $forumsort = ''; eval("\$forumsort = \"".$templates->get("forumdisplay_forumsort")."\";");
|
$plugins->run_hooks("forumdisplay_threadlist");
| $plugins->run_hooks("forumdisplay_threadlist");
|