Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: forumdisplay.php 4081 2008-08-08 01:47:02Z Tikitiki $
| * $Id: forumdisplay.php 4276 2008-11-23 03:01:33Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 78 | Zeile 78 |
---|
error_no_permission(); }
|
error_no_permission(); }
|
// Build a forum cache. $query = $db->query(" SELECT f.*, fr.dateline AS lastread FROM ".TABLE_PREFIX."forums f LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}') WHERE f.active != 0 ORDER BY pid, disporder ");
| if($mybb->user['uid'] == 0) { // Build a forum cache. $query = $db->query(" SELECT * FROM ".TABLE_PREFIX."forums WHERE active != 0 ORDER BY pid, disporder "); $forumsread = unserialize($mybb->cookies['mybb']['forumread']); } else { // Build a forum cache. $query = $db->query(" SELECT f.*, fr.dateline AS lastread FROM ".TABLE_PREFIX."forums f LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}') WHERE f.active != 0 ORDER BY pid, disporder "); }
|
while($forum = $db->fetch_array($query)) {
|
while($forum = $db->fetch_array($query)) {
|
| if($mybb->user['uid'] == 0) { if($forumsread[$forum['fid']]) { $forum['lastread'] = $forumsread[$forum['fid']]; } }
|
$fcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum; }
| $fcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum; }
|
Zeile 202 | Zeile 224 |
---|
$doneusers[$user['uid']] = $user['time']; ++$membercount; if($user['invisible'] == 1)
|
$doneusers[$user['uid']] = $user['time']; ++$membercount; if($user['invisible'] == 1)
|
{
| {
|
$invisiblemark = "*"; ++$inviscount; }
| $invisiblemark = "*"; ++$inviscount; }
|
Zeile 238 | Zeile 260 |
---|
$invisonline = $lang->sprintf($lang->users_browsing_forum_invis, $inviscount); }
|
$invisonline = $lang->sprintf($lang->users_browsing_forum_invis, $inviscount); }
|
if($invisonline != '' && $guestcount)
| if($invisonline != '' && ($guestcount || $onlinemembers))
|
{ $onlinesep2 = ", "; }
| { $onlinesep2 = ", "; }
|
Zeile 381 | Zeile 403 |
---|
{ case "subject": $sortfield = "subject";
|
{ case "subject": $sortfield = "subject";
|
break;
| break;
|
case "replies": $sortfield = "replies"; break;
| case "replies": $sortfield = "replies"; break;
|
Zeile 404 | Zeile 426 |
---|
$sortfield = "lastpost"; $mybb->input['sortby'] = "lastpost"; break;
|
$sortfield = "lastpost"; $mybb->input['sortby'] = "lastpost"; break;
|
}
| }
|
$sortsel[$mybb->input['sortby']] = "selected=\"selected\"";
| $sortsel[$mybb->input['sortby']] = "selected=\"selected\"";
|
Zeile 440 | Zeile 462 |
---|
{ $query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $visibleonly", array('limit' => 1)); $threadcount = $db->fetch_field($query, "threads");
|
{ $query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $visibleonly", array('limit' => 1)); $threadcount = $db->fetch_field($query, "threads");
|
} }
| } }
|
// How many pages are there? if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20;
|
// How many pages are there? if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20;
|
}
| }
|
$perpage = $mybb->settings['threadsperpage'];
| $perpage = $mybb->settings['threadsperpage'];
|
Zeile 461 | Zeile 483 |
---|
{ $start = 0; $page = 1;
|
{ $start = 0; $page = 1;
|
} }
| } }
|
else { $start = 0; $page = 1;
|
else { $start = 0; $page = 1;
|
}
| }
|
$end = $start + $perpage; $lower = $start + 1; $upper = $end;
| $end = $start + $perpage; $lower = $start + 1; $upper = $end;
|
Zeile 482 | Zeile 504 |
---|
if($mybb->input['sortby'] || $mybb->input['order'] || $mybb->input['datecut']) // Ugly URL { $page_url = str_replace("{fid}", $fid, FORUM_URL_PAGED);
|
if($mybb->input['sortby'] || $mybb->input['order'] || $mybb->input['datecut']) // Ugly URL { $page_url = str_replace("{fid}", $fid, FORUM_URL_PAGED);
|
|
|
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && $_SERVER['SEO_SUPPORT'] == 1))
|
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && $_SERVER['SEO_SUPPORT'] == 1))
|
{
| {
|
$q = "?"; $and = ''; } else
|
$q = "?"; $and = ''; } else
|
{ $q = ''; $and = "&"; }
| { $q = ''; $and = "&"; }
|
if($sortby != "lastpost") { $page_url .= "{$q}{$and}sortby={$sortby}";
|
if($sortby != "lastpost") { $page_url .= "{$q}{$and}sortby={$sortby}";
|
$q = ''; $and = "&"; }
| $q = ''; $and = "&"; }
|
if($sortordernow != "desc") {
| if($sortordernow != "desc") {
|
Zeile 511 | Zeile 533 |
---|
if($datecut > 0 && $datecut != 9999) { $page_url .= "{$q}{$and}datecut={$datecut}";
|
if($datecut > 0 && $datecut != 9999) { $page_url .= "{$q}{$and}datecut={$datecut}";
|
} } 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);
|
Zeile 536 | Zeile 558 |
---|
while($thread = $db->fetch_array($query)) { if($thread['totalratings'] == 0)
|
while($thread = $db->fetch_array($query)) { if($thread['totalratings'] == 0)
|
{
| {
|
$rating = 0; } else
| $rating = 0; } else
|
Zeile 546 | Zeile 568 |
---|
$avaragerating[$thread['tid']] = $rating; }
|
$avaragerating[$thread['tid']] = $rating; }
|
| $t = "t."; $sortfield = "lastpost";
|
break; default: $ratingadd = "(t.totalratings/t.numratings) AS averagerating, ";
| break; default: $ratingadd = "(t.totalratings/t.numratings) AS averagerating, ";
|
Zeile 559 | Zeile 583 |
---|
} else {
|
} else {
|
| if($sortfield == "averagerating") { $t = "t."; $sortfield = "lastpost"; }
|
$ratingadd = ''; $lpbackground = "trow1"; $colspan = "6";
| $ratingadd = ''; $lpbackground = "trow1"; $colspan = "6";
|
Zeile 807 | Zeile 836 |
---|
} else {
|
} else {
|
$thread['averagerating'] = intval(round($thread['averagerating'], 2)); $thread['width'] = $thread['averagerating']*20;
| $thread['averagerating'] = floatval(round($thread['averagerating'], 2)); $thread['width'] = intval($thread['averagerating'])*20;
|
$thread['numratings'] = intval($thread['numratings']);
$not_rated = '';
| $thread['numratings'] = intval($thread['numratings']);
$not_rated = '';
|