Zeile 19 | Zeile 19 |
---|
$templatelist .= ",forumdisplay_announcements_announcement,forumdisplay_announcements,forumdisplay_threads_sep,forumbit_depth3_statusicon,forumbit_depth3,forumdisplay_sticky_sep,forumdisplay_thread_attachment_count,forumdisplay_rssdiscovery,forumbit_moderators_group"; $templatelist .= ",forumdisplay_inlinemoderation_openclose,forumdisplay_inlinemoderation_stickunstick,forumdisplay_inlinemoderation_softdelete,forumdisplay_inlinemoderation_restore,forumdisplay_inlinemoderation_delete,forumdisplay_inlinemoderation_manage,forumdisplay_nopermission"; $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_thread_icon,forumdisplay_rules";
|
$templatelist .= ",forumdisplay_announcements_announcement,forumdisplay_announcements,forumdisplay_threads_sep,forumbit_depth3_statusicon,forumbit_depth3,forumdisplay_sticky_sep,forumdisplay_thread_attachment_count,forumdisplay_rssdiscovery,forumbit_moderators_group"; $templatelist .= ",forumdisplay_inlinemoderation_openclose,forumdisplay_inlinemoderation_stickunstick,forumdisplay_inlinemoderation_softdelete,forumdisplay_inlinemoderation_restore,forumdisplay_inlinemoderation_delete,forumdisplay_inlinemoderation_manage,forumdisplay_nopermission"; $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_thread_icon,forumdisplay_rules";
|
$templatelist .= ",forumdisplay_thread_deleted,forumdisplay_announcements_announcement_modbit,forumbit_depth2_forum_viewers,forumdisplay_threadlist_sortrating,forumdisplay_inlinemoderation_custom,forumdisplay_announcement_rating,forumdisplay_inlinemoderation_approveunapprove";
| $templatelist .= ",forumdisplay_thread_deleted,forumdisplay_announcements_announcement_modbit,forumbit_depth2_forum_viewers,forumdisplay_threadlist_sortrating,forumdisplay_inlinemoderation_custom,forumdisplay_announcement_rating,forumdisplay_inlinemoderation_approveunapprove,forumdisplay_threadlist_subscription";
|
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 611 | Zeile 611 |
---|
if($fpermissions['canviewthreads'] != 0) {
|
if($fpermissions['canviewthreads'] != 0) {
|
// How many posts are there? 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"); } else { $query = $db->simple_select("forums", "threads, unapprovedthreads, deletedthreads", "fid = '{$fid}'", array('limit' => 1)); $forum_threads = $db->fetch_array($query); $threadcount = $forum_threads['threads']; if($ismod == true) { $threadcount += $forum_threads['unapprovedthreads'] + $forum_threads['deletedthreads']; }
// If we have 0 threads double check there aren't any "moved" threads if($threadcount == 0) { $query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $useronly $visibleonly", array('limit' => 1)); $threadcount = $db->fetch_field($query, "threads"); } }
| // How many threads are there? $query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $useronly $visibleonly $datecutsql $prefixsql"); $threadcount = $db->fetch_field($query, "threads");
|
}
// How many pages are there?
| }
// How many pages are there?
|
Zeile 826 | Zeile 806 |
---|
if($ismod) { eval("\$modann = \"".$templates->get("forumdisplay_announcements_announcement_modbit")."\";");
|
if($ismod) { eval("\$modann = \"".$templates->get("forumdisplay_announcements_announcement_modbit")."\";");
|
} else {
| } else {
|
$modann = ''; }
| $modann = ''; }
|
Zeile 841 | Zeile 821 |
---|
{ eval("\$announcementlist = \"".$templates->get("forumdisplay_announcements")."\";"); $shownormalsep = true;
|
{ eval("\$announcementlist = \"".$templates->get("forumdisplay_announcements")."\";"); $shownormalsep = true;
|
}
| }
|
if(empty($cookie)) {
| if(empty($cookie)) {
|
Zeile 854 | Zeile 834 |
---|
} } else
|
} } else
|
{
| {
|
$announcementlist = ''; }
|
$announcementlist = ''; }
|
|
|
$tids = $threadcache = array(); $icon_cache = $cache->read("posticons");
|
$tids = $threadcache = array(); $icon_cache = $cache->read("posticons");
|
|
|
if($fpermissions['canviewthreads'] != 0) { $plugins->run_hooks("forumdisplay_get_threads");
|
if($fpermissions['canviewthreads'] != 0) { $plugins->run_hooks("forumdisplay_get_threads");
|
| // Allow viewing unapproved threads for logged in users if($mybb->user['uid'] && $mybb->settings['showownunapproved']) { $tvisibleonly .= " OR (t.fid='$fid' AND t.uid=".$mybb->user['uid'].")"; }
|
// Start Getting Threads $query = $db->query("
| // Start Getting Threads $query = $db->query("
|
Zeile 904 | Zeile 890 |
---|
{ unset($moved_threads[$thread['tid']]); }
|
{ unset($moved_threads[$thread['tid']]); }
|
} }
| } }
|
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 929 | Zeile 915 |
---|
$lang->select_all = $lang->sprintf($lang->select_all, (int)$threadcount); $lang->all_selected = $lang->sprintf($lang->all_selected, (int)$threadcount); eval("\$selectall = \"".$templates->get("forumdisplay_inlinemoderation_selectall")."\";");
|
$lang->select_all = $lang->sprintf($lang->select_all, (int)$threadcount); $lang->all_selected = $lang->sprintf($lang->all_selected, (int)$threadcount); eval("\$selectall = \"".$templates->get("forumdisplay_inlinemoderation_selectall")."\";");
|
}
| }
|
if(!empty($tids))
|
if(!empty($tids))
|
{
| {
|
$tids = implode(",", $tids); }
| $tids = implode(",", $tids); }
|
Zeile 943 | Zeile 929 |
---|
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 966 | Zeile 952 |
---|
if($threadcache[$readthread['tid']]) { $threadcache[$readthread['tid']]['lastread'] = $readthread['dateline'];
|
if($threadcache[$readthread['tid']]) { $threadcache[$readthread['tid']]['lastread'] = $readthread['dateline'];
|
} } }
| } } }
|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid']) { $query = $db->simple_select("forumsread", "dateline", "fid='{$fid}' AND uid='{$mybb->user['uid']}'");
| if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid']) { $query = $db->simple_select("forumsread", "dateline", "fid='{$fid}' AND uid='{$mybb->user['uid']}'");
|
Zeile 1019 | Zeile 1005 |
---|
{ $bgcolor = "trow_shaded trow_deleted"; }
|
{ $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"; } else { $thread_type_class = " forumdisplay_regular";
|
$thread_type_class = " forumdisplay_sticky"; } else { $thread_type_class = " forumdisplay_regular";
|
}
| }
|
$folder = ''; $prefix = '';
$thread['author'] = $thread['uid']; if(!$thread['username']) {
|
$folder = ''; $prefix = '';
$thread['author'] = $thread['uid']; if(!$thread['username']) {
|
$thread['username'] = $thread['profilelink'] = htmlspecialchars_uni($thread['threadusername']);
| if(!$thread['threadusername']) { $thread['username'] = $thread['profilelink'] = htmlspecialchars_uni($lang->guest); } else { $thread['username'] = $thread['profilelink'] = htmlspecialchars_uni($thread['threadusername']); }
|
} else { $thread['username'] = htmlspecialchars_uni($thread['username']); $thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);
|
} else { $thread['username'] = htmlspecialchars_uni($thread['username']); $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($thread['prefix'] != 0)
| // If this thread has a prefix, insert a space between prefix and subject $thread['threadprefix'] = $threadprefix = ''; if($thread['prefix'] != 0)
|
Zeile 1059 | Zeile 1052 |
---|
}
$thread['subject'] = $parser->parse_badwords($thread['subject']);
|
}
$thread['subject'] = $parser->parse_badwords($thread['subject']);
|
$thread['subject'] = htmlspecialchars_uni($thread['subject']);
| $thread['subject'] = htmlspecialchars_uni($thread['subject']);
|
if($thread['icon'] > 0 && $icon_cache[$thread['icon']]) {
| if($thread['icon'] > 0 && $icon_cache[$thread['icon']]) {
|
Zeile 1072 | Zeile 1065 |
---|
else { $icon = " ";
|
else { $icon = " ";
|
}
| }
|
$prefix = ''; if($thread['poll'])
| $prefix = ''; if($thread['poll'])
|
Zeile 1110 | Zeile 1103 |
---|
{ $not_rated = ' star_rating_notrated'; }
|
{ $not_rated = ' star_rating_notrated'; }
|
|
|
$ratingvotesav = $lang->sprintf($lang->rating_votes_average, $thread['numratings'], $thread['averagerating']); eval("\$rating = \"".$templates->get("forumdisplay_thread_rating")."\";");
|
$ratingvotesav = $lang->sprintf($lang->rating_votes_average, $thread['numratings'], $thread['averagerating']); eval("\$rating = \"".$templates->get("forumdisplay_thread_rating")."\";");
|
}
| }
|
}
$thread['pages'] = 0;
| }
$thread['pages'] = 0;
|
Zeile 1121 | Zeile 1114 |
---|
$threadpages = ''; $morelink = ''; $thread['posts'] = $thread['replies'] + 1;
|
$threadpages = ''; $morelink = ''; $thread['posts'] = $thread['replies'] + 1;
|
if($thread['unapprovedposts'] > 0 && $ismod)
| if(is_moderator($fid, "canviewdeleted") == true || is_moderator($fid, "canviewunapprove") == true) { if(is_moderator($fid, "canviewdeleted") == true) { $thread['posts'] += $thread['deletedposts']; } if(is_moderator($fid, "canviewunapprove") == true) { $thread['posts'] += $thread['unapprovedposts']; } } elseif($fpermissions['canviewdeletionnotice'] != 0)
|
{
|
{
|
$thread['posts'] += $thread['unapprovedposts'] + $thread['deletedposts'];
| $thread['posts'] += $thread['deletedposts'];
|
}
if($thread['posts'] > $mybb->settings['postsperpage'])
| }
if($thread['posts'] > $mybb->settings['postsperpage'])
|
Zeile 1137 | Zeile 1140 |
---|
$pagesstop = $mybb->settings['maxmultipagelinks'] - 1; $page_link = get_thread_link($thread['tid'], $thread['pages']); eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";");
|
$pagesstop = $mybb->settings['maxmultipagelinks'] - 1; $page_link = get_thread_link($thread['tid'], $thread['pages']); eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";");
|
}
| }
|
else
|
else
|
{
| {
|
$pagesstop = $thread['pages'];
|
$pagesstop = $thread['pages'];
|
}
| }
|
for($i = 1; $i <= $pagesstop; ++$i) { $page_link = get_thread_link($thread['tid'], $i);
| for($i = 1; $i <= $pagesstop; ++$i) { $page_link = get_thread_link($thread['tid'], $i);
|
Zeile 1150 | Zeile 1153 |
---|
}
eval("\$thread['multipage'] = \"".$templates->get("forumdisplay_thread_multipage")."\";");
|
}
eval("\$thread['multipage'] = \"".$templates->get("forumdisplay_thread_multipage")."\";");
|
}
| }
|
else
|
else
|
{
| {
|
$threadpages = ''; $morelink = ''; $thread['multipage'] = '';
| $threadpages = ''; $morelink = ''; $thread['multipage'] = '';
|
Zeile 1160 | Zeile 1163 |
---|
if($ismod) {
|
if($ismod) {
|
if(isset($mybb->cookies[$inlinecookie]) && my_strpos($mybb->cookies[$inlinecookie], "|{$thread['tid']}|"))
| if(isset($mybb->cookies[$inlinecookie]) && my_strpos($mybb->cookies[$inlinecookie], "|{$thread['tid']}|") !== false)
|
{ $inlinecheck = "checked=\"checked\""; ++$inlinecount;
|
{ $inlinecheck = "checked=\"checked\""; ++$inlinecount;
|
}
| }
|
else { $inlinecheck = ''; }
|
else { $inlinecheck = ''; }
|
|
|
$multitid = $thread['tid']; eval("\$modbit = \"".$templates->get("forumdisplay_thread_modbit")."\";");
|
$multitid = $thread['tid']; eval("\$modbit = \"".$templates->get("forumdisplay_thread_modbit")."\";");
|
}
| }
|
else { $modbit = '';
|
else { $modbit = '';
|
}
| }
|
if($moved[0] == "moved") { $prefix = $lang->moved_prefix;
| if($moved[0] == "moved") { $prefix = $lang->moved_prefix;
|
Zeile 1202 | Zeile 1205 |
---|
$gotounread = ''; $isnew = 0; $donenew = 0;
|
$gotounread = ''; $isnew = 0; $donenew = 0;
|
|
|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forum_read)
|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forum_read)
|
{
| {
|
if(!empty($thread['lastread']))
|
if(!empty($thread['lastread']))
|
{
| {
|
$last_read = $thread['lastread'];
|
$last_read = $thread['lastread'];
|
}
| }
|
else { $last_read = $read_cutoff; }
|
else { $last_read = $read_cutoff; }
|
} else {
| } else {
|
$last_read = my_get_array_cookie("threadread", $thread['tid']); }
| $last_read = my_get_array_cookie("threadread", $thread['tid']); }
|
Zeile 1240 | Zeile 1243 |
---|
}
if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
|
}
if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
|
{
| {
|
$folder .= "hot"; $folder_label .= $lang->icon_hot; }
|
$folder .= "hot"; $folder_label .= $lang->icon_hot; }
|
if($thread['closed'] == 1) { $folder .= "lock"; $folder_label .= $lang->icon_lock; }
| if($thread['closed'] == 1) { $folder .= "close"; $folder_label .= $lang->icon_close; }
|
if($moved[0] == "moved")
|
if($moved[0] == "moved")
|
{
| {
|
$folder = "move"; $gotounread = '';
|
$folder = "move"; $gotounread = '';
|
}
| }
|
$folder .= "folder";
| $folder .= "folder";
|
Zeile 1268 | Zeile 1271 |
---|
$inline_edit_class = "subject_editable"; }
|
$inline_edit_class = "subject_editable"; }
|
$lastposter = htmlspecialchars_uni($thread['lastposter']);
|
|
$lastposteruid = $thread['lastposteruid'];
|
$lastposteruid = $thread['lastposteruid'];
|
| if(!$lastposteruid && !$thread['lastposter']) { $lastposter = htmlspecialchars_uni($lang->guest); } else { $lastposter = htmlspecialchars_uni($thread['lastposter']); }
|
$lastpostdate = my_date('relative', $thread['lastpost']);
// Don't link to guest's profiles (they have no profile).
| $lastpostdate = my_date('relative', $thread['lastpost']);
// Don't link to guest's profiles (they have no profile).
|
Zeile 1361 | Zeile 1372 |
---|
foreach($gids as $gid) { $gid = (int)$gid;
|
foreach($gids as $gid) { $gid = (int)$gid;
|
$gidswhere .= " OR CONCAT(',',groups,',') LIKE '%,{$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='' OR CONCAT(',',groups,',') LIKE '%,-1,%'{$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; }
while($tool = $db->fetch_array($query)) {
|
break; }
while($tool = $db->fetch_array($query)) {
|
| $tool['name'] = htmlspecialchars_uni($tool['name']);
|
eval("\$customthreadtools .= \"".$templates->get("forumdisplay_inlinemoderation_custom_tool")."\";"); }
| eval("\$customthreadtools .= \"".$templates->get("forumdisplay_inlinemoderation_custom_tool")."\";"); }
|
Zeile 1440 | Zeile 1452 |
---|
// 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;
|
| $addremovesubscription = '';
|
if($mybb->user['uid']) {
| if($mybb->user['uid']) {
|
Zeile 1450 | Zeile 1463 |
---|
$add_remove_subscription = 'remove'; $add_remove_subscription_text = $lang->unsubscribe_forum; }
|
$add_remove_subscription = 'remove'; $add_remove_subscription_text = $lang->unsubscribe_forum; }
|
| eval("\$addremovesubscription = \"".$templates->get("forumdisplay_threadlist_subscription")."\";");
|
}
$inline_edit_js = $clearstoredpass = '';
| }
$inline_edit_js = $clearstoredpass = '';
|