Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* $Id: showthread.php 2263 2006-09-26 09:24:25Z chris $
| * $Id: showthread.php 2454 2006-11-28 17:30:16Z CraKteR $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 45 | Zeile 45 |
---|
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject'])); $tid = $thread['tid']; $fid = $thread['fid'];
|
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject'])); $tid = $thread['tid']; $fid = $thread['fid'];
|
| if(!$thread['username']) { $thread['username'] = $lang->guest; }
|
// Is the currently logged in user a moderator of this forum? if(is_moderator($fid) == "yes")
| // Is the currently logged in user a moderator of this forum? if(is_moderator($fid) == "yes")
|
Zeile 79 | Zeile 84 |
---|
$forumpermissions = forum_permissions($forum['fid']);
if($forumpermissions['canview'] != "yes" || $forumpermissions['canviewthreads'] != "yes")
|
$forumpermissions = forum_permissions($forum['fid']);
if($forumpermissions['canview'] != "yes" || $forumpermissions['canviewthreads'] != "yes")
|
{
| {
|
error_no_permission(); }
|
error_no_permission(); }
|
|
|
// Check that this forum is not password protected. check_forum_password($forum['fid'], $forum['password']);
| // Check that this forum is not password protected. check_forum_password($forum['fid'], $forum['password']);
|
Zeile 90 | Zeile 95 |
---|
if(!$mybb->input['action']) { $mybb->input['action'] = "thread";
|
if(!$mybb->input['action']) { $mybb->input['action'] = "thread";
|
}
| }
|
// Jump to the last post. if($mybb->input['action'] == "lastpost")
| // Jump to the last post. if($mybb->input['action'] == "lastpost")
|
Zeile 124 | Zeile 129 |
---|
// Jump to the next newest posts. if($mybb->input['action'] == "nextnewest") {
|
// Jump to the next newest posts. if($mybb->input['action'] == "nextnewest") {
|
$options = array( "limit_start" => 0, "limit" => 1,
| $options = array( "limit_start" => 0, "limit" => 1,
|
"order_by" => "lastpost" ); $query = $db->simple_select(TABLE_PREFIX.'threads', '*', "fid={$thread['fid']} AND lastpost > {$thread['lastpost']} AND visible=1 AND closed NOT LIKE 'moved|%'", $options);
| "order_by" => "lastpost" ); $query = $db->simple_select(TABLE_PREFIX.'threads', '*', "fid={$thread['fid']} AND lastpost > {$thread['lastpost']} AND visible=1 AND closed NOT LIKE 'moved|%'", $options);
|
Zeile 136 | Zeile 141 |
---|
if(!$nextthread['tid']) { error($lang->error_nonextnewest);
|
if(!$nextthread['tid']) { error($lang->error_nonextnewest);
|
} $options = array( "limit_start" => 0, "limit" => 1, "order_by" => "dateline", "order_dir" => "desc"
| } $options = array( "limit_start" => 0, "limit" => 1, "order_by" => "dateline", "order_dir" => "desc"
|
); $query = $db->simple_select(TABLE_PREFIX.'posts', 'pid', "tid={$nextthread['tid']}");
| ); $query = $db->simple_select(TABLE_PREFIX.'posts', 'pid', "tid={$nextthread['tid']}");
|
Zeile 152 | Zeile 157 |
---|
// Jump to the next oldest posts. if($mybb->input['action'] == "nextoldest")
|
// Jump to the next oldest posts. if($mybb->input['action'] == "nextoldest")
|
{ $options = array( "limit" => 1,
| { $options = array( "limit" => 1,
|
"limit_start" => 0, "order_by" => "lastpost", "order_dir" => "desc"
| "limit_start" => 0, "order_by" => "lastpost", "order_dir" => "desc"
|
Zeile 166 | Zeile 171 |
---|
if(!$nextthread['tid']) { error($lang->error_nonextoldest);
|
if(!$nextthread['tid']) { error($lang->error_nonextoldest);
|
}
| }
|
$options = array( "limit_start" => 0, "limit" => 1,
| $options = array( "limit_start" => 0, "limit" => 1,
|
Zeile 203 | Zeile 208 |
---|
if($thread_read) { $lastread = $thread_read;
|
if($thread_read) { $lastread = $thread_read;
|
}
| }
|
else { $lastread = 1;
| else { $lastread = 1;
|
Zeile 229 | Zeile 234 |
---|
"order_by" => "dateline", "order_dir" => "asc" );
|
"order_by" => "dateline", "order_dir" => "asc" );
|
$query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid=".$tid." AND dateline > '{$lastread}'");
| $query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid=".$tid." AND dateline > '{$lastread}'", $options);
|
$newpost = $db->fetch_array($query); if($newpost['pid']) {
| $newpost = $db->fetch_array($query); if($newpost['pid']) {
|
Zeile 238 | Zeile 243 |
---|
else { header("Location:showthread.php?action=lastpost&tid={$tid}");
|
else { header("Location:showthread.php?action=lastpost&tid={$tid}");
|
} }
| } }
|
$plugins->run_hooks("showthread_start");
// Show the entire thread (taking into account pagination).
| $plugins->run_hooks("showthread_start");
// Show the entire thread (taking into account pagination).
|
Zeile 535 | Zeile 540 |
---|
else { $where = " ORDER BY dateline ASC LIMIT 0, 1";
|
else { $where = " ORDER BY dateline ASC LIMIT 0, 1";
|
}
| }
|
$query = $db->query(" SELECT u.*, u.username AS userusername, p.*, f.*, eu.username AS editusername FROM ".TABLE_PREFIX."posts p
| $query = $db->query(" SELECT u.*, u.username AS userusername, p.*, f.*, eu.username AS editusername FROM ".TABLE_PREFIX."posts p
|
Zeile 567 | Zeile 572 |
---|
// Build the threaded post display tree. $query = $db->query("
|
// Build the threaded post display tree. $query = $db->query("
|
SELECT u.username, u.username AS userusername, p.pid, p.replyto, p.subject, p.dateline
| SELECT p.username, p.uid, p.pid, p.replyto, p.subject, p.dateline
|
FROM ".TABLE_PREFIX."posts p
|
FROM ".TABLE_PREFIX."posts p
|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
| |
WHERE p.tid='$tid' $visible ORDER BY p.dateline
| WHERE p.tid='$tid' $visible ORDER BY p.dateline
|
Zeile 596 | Zeile 600 |
---|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['postsperpage']; if($mybb->input['page'] != "last")
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['postsperpage']; if($mybb->input['page'] != "last")
|
{
| {
|
$page = intval($mybb->input['page']); } if($mybb->input['pid'])
| $page = intval($mybb->input['page']); } if($mybb->input['pid'])
|
Zeile 633 | Zeile 637 |
---|
}
if($page > $pages)
|
}
if($page > $pages)
|
{ $page = 1; }
| { $page = 1; }
|
if($page) {
| if($page) {
|
Zeile 813 | Zeile 817 |
---|
function buildtree($replyto="0", $indent="0") { global $tree, $mybb, $theme, $mybb, $pid, $tid, $templates, $parser;
|
function buildtree($replyto="0", $indent="0") { global $tree, $mybb, $theme, $mybb, $pid, $tid, $templates, $parser;
|
|
|
if($indent) { $indentsize = 13 * $indent;
| if($indent) { $indentsize = 13 * $indent;
|
Zeile 821 | Zeile 826 |
---|
{ $indentsize = 0; }
|
{ $indentsize = 0; }
|
|
|
++$indent; if(is_array($tree[$replyto])) {
| ++$indent; if(is_array($tree[$replyto])) {
|
Zeile 829 | Zeile 835 |
---|
$postdate = my_date($mybb->settings['dateformat'], $post['dateline']); $posttime = my_date($mybb->settings['timeformat'], $post['dateline']); $post['subject'] = htmlspecialchars_uni($parser->parse_badwords($post['subject']));
|
$postdate = my_date($mybb->settings['dateformat'], $post['dateline']); $posttime = my_date($mybb->settings['timeformat'], $post['dateline']); $post['subject'] = htmlspecialchars_uni($parser->parse_badwords($post['subject']));
|
|
|
if(!$post['subject']) { $post['subject'] = "[".$lang->no_subject."]"; }
|
if(!$post['subject']) { $post['subject'] = "[".$lang->no_subject."]"; }
|
if($post['userusername']) { $post['profilelink'] = build_profile_link($post['userusername'], $post['uid']); } else { $post['profilelink'] = $post['username']; }
| $post['profilelink'] = build_profile_link($post['username'], $post['uid']);
|
if($mybb->input['pid'] == $post['pid']) { eval("\$posts .= \"".$templates->get("showthread_threaded_bitactive")."\";");
| if($mybb->input['pid'] == $post['pid']) { eval("\$posts .= \"".$templates->get("showthread_threaded_bitactive")."\";");
|
Zeile 849 | Zeile 851 |
---|
{ eval("\$posts .= \"".$templates->get("showthread_threaded_bit")."\";"); }
|
{ eval("\$posts .= \"".$templates->get("showthread_threaded_bit")."\";"); }
|
|
|
if($tree[$post['pid']]) { $posts .= buildtree($post['pid'], $indent);
| if($tree[$post['pid']]) { $posts .= buildtree($post['pid'], $indent);
|