Vergleich showthread.php - 1.4.1 - 1.4.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 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: showthread.php 4081 2008-08-08 01:47:02Z Tikitiki $

 * $Id: showthread.php 4276 2008-11-23 03:01:33Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 16Zeile 16
$templatelist .= ",multipage_prevpage,multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage";
$templatelist .= ",postbit_editedby,showthread_similarthreads,showthread_similarthreads_bit,postbit_iplogged_show,postbit_iplogged_hiden,showthread_quickreply";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,showthread_multipage,postbit_reputation,postbit_quickdelete,postbit_attachments,thumbnails_thumbnail,postbit_attachments_attachment,postbit_attachments_thumbnails,postbit_attachments_images_image,postbit_attachments_images,postbit_posturl";

$templatelist .= ",multipage_prevpage,multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage";
$templatelist .= ",postbit_editedby,showthread_similarthreads,showthread_similarthreads_bit,postbit_iplogged_show,postbit_iplogged_hiden,showthread_quickreply";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,showthread_multipage,postbit_reputation,postbit_quickdelete,postbit_attachments,thumbnails_thumbnail,postbit_attachments_attachment,postbit_attachments_thumbnails,postbit_attachments_images_image,postbit_attachments_images,postbit_posturl";

$templatelist .= ",postbit_inlinecheck,showthread_inlinemoderation,postbit_attachments_thumbnails_thumbnail,postbit_quickquote,postbit_qqmessage,postbit_seperator,postbit_groupimage,postbit_multiquote,showthread_search,postbit_warn,postbit_warninglevel,showthread_moderationoptions_custom_tool,showthread_moderationoptions_custom,showthread_inlinemoderation_custom_tool,showthread_inlinemoderation_custom,postbit_classic,showthread_classic_header";

$templatelist .= ",postbit_inlinecheck,showthread_inlinemoderation,postbit_attachments_thumbnails_thumbnail,postbit_quickquote,postbit_qqmessage,postbit_seperator,postbit_groupimage,postbit_multiquote,showthread_search,postbit_warn,postbit_warninglevel,showthread_moderationoptions_custom_tool,showthread_moderationoptions_custom,showthread_inlinemoderation_custom_tool,showthread_inlinemoderation_custom,postbit_classic,showthread_classic_header,showthread_poll_resultbit,showthread_poll_results";


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 118Zeile 118
	$query = $db->simple_select("threadsread", "dateline", "uid='{$mybb->user['uid']}' AND tid='{$thread['tid']}'");
$thread_read = $db->fetch_field($query, "dateline");


	$query = $db->simple_select("threadsread", "dateline", "uid='{$mybb->user['uid']}' AND tid='{$thread['tid']}'");
$thread_read = $db->fetch_field($query, "dateline");


	// Get forum read date
$forumread = my_get_array_cookie("forumread", $fid);

// If last visit is greater than forum read, change forum read date
if($mybb->user['lastvisit'] > $forumread)

	if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'])





	{

	{

		$forumread = $mybb->user['lastvisit'];












		$query = $db->simple_select("forumsread", "dateline", "fid='{$fid}' AND uid='{$mybb->user['uid']}'");
$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)
{
$forum_read = $read_cutoff;
}
}
else
{
$forum_read = my_get_array_cookie("forumread", $fid);

	}

	}

	if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forumread)


	
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forum_read)

	{
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($thread['lastpost'] > $cutoff)

	{
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($thread['lastpost'] > $cutoff)

Zeile 141Zeile 149
			}
}
}

			}
}
}

 
	

	if(!$lastread)

	if(!$lastread)

	{

	{

		$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);

		$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);

		if($readcookie > $forumread)
{

		if($readcookie > $forum_read)
{

			$lastread = $readcookie;

			$lastread = $readcookie;

		}

		}

		else
{

		else
{

			$lastread = $forumread;

			$lastread = $forum_read;

		}
}

		}
}

 
	

	// Next, find the proper pid to link to.
$options = array(
"limit_start" => 0,

	// Next, find the proper pid to link to.
$options = array(
"limit_start" => 0,

Zeile 164Zeile 174
	$newpost = $db->fetch_array($query);
if($newpost['pid'])
{

	$newpost = $db->fetch_array($query);
if($newpost['pid'])
{

		header("Location:".htmlspecialchars_decode(get_post_link($newpost['pid'], $tid))."#pid{$newpost['pid']}");

		header("Location: ".htmlspecialchars_decode(get_post_link($newpost['pid'], $tid))."#pid{$newpost['pid']}");

	}
else
{

	}
else
{

Zeile 199Zeile 209
		$query = $db->simple_select('posts', 'pid', "tid={$tid}", $options);
$pid = $db->fetch_field($query, "pid");
}

		$query = $db->simple_select('posts', 'pid', "tid={$tid}", $options);
$pid = $db->fetch_field($query, "pid");
}

	header("Location:".htmlspecialchars_decode(get_post_link($pid, $tid))."#pid{$pid}");

	header("Location: ".htmlspecialchars_decode(get_post_link($pid, $tid))."#pid{$pid}");

	exit;

	exit;

}

}


// Jump to the next newest posts.
if($mybb->input['action'] == "nextnewest")


// Jump to the next newest posts.
if($mybb->input['action'] == "nextnewest")

Zeile 218Zeile 228
	if(!$nextthread['tid'])
{
error($lang->error_nonextnewest);

	if(!$nextthread['tid'])
{
error($lang->error_nonextnewest);

	}

	}

	$options = array(
"limit_start" => 0,
"limit" => 1,

	$options = array(
"limit_start" => 0,
"limit" => 1,

Zeile 226Zeile 236
		"order_dir" => "desc"
);
$query = $db->simple_select('posts', 'pid', "tid='{$nextthread['tid']}'", $options);

		"order_dir" => "desc"
);
$query = $db->simple_select('posts', 'pid', "tid='{$nextthread['tid']}'", $options);


// Redirect to the proper page.


// Redirect to the proper page.

	$pid = $db->fetch_field($query, "pid");

	$pid = $db->fetch_field($query, "pid");

	header("Location:".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");

	header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");

}

// 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,
"limit_start" => 0,

{
$options = array(
"limit" => 1,
"limit_start" => 0,

		"order_by" => "lastpost",
"order_dir" => "desc"
);

		"order_by" => "lastpost",
"order_dir" => "desc"
);

Zeile 246Zeile 256

// Are there actually next oldest posts?
if(!$nextthread['tid'])


// Are there actually next oldest posts?
if(!$nextthread['tid'])

	{

	{

		error($lang->error_nonextoldest);
}
$options = array(

		error($lang->error_nonextoldest);
}
$options = array(

Zeile 259Zeile 269

// Redirect to the proper page.
$pid = $db->fetch_field($query, "pid");


// Redirect to the proper page.
$pid = $db->fetch_field($query, "pid");

	header("Location:".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");

	header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");

}

if($mybb->input['pid'])

}

if($mybb->input['pid'])

Zeile 275Zeile 285
	if($thread['firstpost'] == 0)
{
update_first_post($tid);

	if($thread['firstpost'] == 0)
{
update_first_post($tid);

	}


	}


	// Does this thread have a poll?
if($thread['poll'])
{

	// Does this thread have a poll?
if($thread['poll'])
{

Zeile 494Zeile 504
	{
$modoptions = "&nbsp;";
$inlinemod = "";

	{
$modoptions = "&nbsp;";
$inlinemod = "";

	}


	}


	// Increment the thread view.
if($mybb->settings['delayedthreadviews'] == 1)
{

	// Increment the thread view.
if($mybb->settings['delayedthreadviews'] == 1)
{

Zeile 520Zeile 530
		}
else
{

		}
else
{

			$thread['averagerating'] = intval(round($thread['totalratings']/$thread['numratings'], 2));
$thread['width'] = $thread['averagerating']*20;

			$thread['averagerating'] = floatval(round($thread['totalratings']/$thread['numratings'], 2));
$thread['width'] = intval($thread['averagerating'])*20;

			$thread['numratings'] = intval($thread['numratings']);
}


			$thread['numratings'] = intval($thread['numratings']);
}


Zeile 717Zeile 727
			$page = 1;
}
$upper = $start+$perpage;

			$page = 1;
}
$upper = $start+$perpage;

 
		
// Work out if we have terms to highlight
$highlight = "";
if($mybb->input['highlight'])
{
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && $_SERVER['SEO_SUPPORT'] == 1))
{
$highlight = "?highlight=".urlencode($mybb->input['highlight']);
}
else
{
$highlight = "&amp;highlight=".urlencode($mybb->input['highlight']);
}
}





		$multipage = multipage($postcount, $perpage, $page, str_replace("{tid}", $tid, THREAD_URL_PAGED));

		$multipage = multipage($postcount, $perpage, $page, str_replace("{tid}", $tid, THREAD_URL_PAGED.$highlight));

		if($postcount > $perpage)
{
eval("\$threadpages = \"".$templates->get("showthread_multipage")."\";");

		if($postcount > $perpage)
{
eval("\$threadpages = \"".$templates->get("showthread_multipage")."\";");