Vergleich showthread.php - 1.8.31 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 204Zeile 204
if($mybb->input['action'] == "newpost")
{
// First, figure out what time the thread or forum were last read

if($mybb->input['action'] == "newpost")
{
// First, figure out what time the thread or forum were last read

 
	$lastread = $cutoff = 0;

	$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");


Zeile 269Zeile 270
	$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND dateline > '{$lastread}' {$visibleonly}", $options);
$newpost = $db->fetch_array($query);


	$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND dateline > '{$lastread}' {$visibleonly}", $options);
$newpost = $db->fetch_array($query);


	if($newpost['pid'] && $lastread)

	if($newpost && $lastread)

	{
$highlight = '';
if($mybb->get_input('highlight'))

	{
$highlight = '';
if($mybb->get_input('highlight'))

Zeile 333Zeile 334
	$nextthread = $db->fetch_array($query);

// Are there actually next newest posts?

	$nextthread = $db->fetch_array($query);

// Are there actually next newest posts?

	if(!$nextthread['tid'])

	if(!$nextthread)

	{
error($lang->error_nonextnewest);
}

	{
error($lang->error_nonextnewest);
}

Zeile 363Zeile 364
	$nextthread = $db->fetch_array($query);

// Are there actually next oldest posts?

	$nextthread = $db->fetch_array($query);

// Are there actually next oldest posts?

	if(!$nextthread['tid'])

	if(!$nextthread)

	{
error($lang->error_nonextoldest);
}

	{
error($lang->error_nonextoldest);
}

Zeile 666Zeile 667
	}

// Create the forum jump dropdown box.

	}

// Create the forum jump dropdown box.

 
	$forumjump = '';

	if($mybb->settings['enableforumjump'] != 0)
{
$forumjump = build_forum_jump("", $fid, 1);

	if($mybb->settings['enableforumjump'] != 0)
{
$forumjump = build_forum_jump("", $fid, 1);

Zeile 798Zeile 800
	}

// Can this user perform searches? If so, we can show them the "Search thread" form

	}

// Can this user perform searches? If so, we can show them the "Search thread" form

 
	$search_thread='';

	if($forumpermissions['cansearch'] != 0)
{
eval("\$search_thread = \"".$templates->get("showthread_search")."\";");

	if($forumpermissions['cansearch'] != 0)
{
eval("\$search_thread = \"".$templates->get("showthread_search")."\";");

Zeile 860Zeile 863
			WHERE p.tid='$tid' $visibleonly_p $where
");
$showpost = $db->fetch_array($query);

			WHERE p.tid='$tid' $visibleonly_p $where
");
$showpost = $db->fetch_array($query);

 

// Is there actually a pid to display?
if(!$showpost)
{
error($lang->error_invalidpost);
}


// Choose what pid to display.
if(!$mybb->input['pid'])
{
$mybb->input['pid'] = $showpost['pid'];


// Choose what pid to display.
if(!$mybb->input['pid'])
{
$mybb->input['pid'] = $showpost['pid'];

		}

// Is there actually a pid to display?
if(!$showpost['pid'])
{
error($lang->error_invalidpost);

 
		}

$attachcache = array();

		}

$attachcache = array();

Zeile 879Zeile 882
			// Get the attachments for this post.
$query = $db->simple_select("attachments", "*", "pid=".$mybb->input['pid']);
while($attachment = $db->fetch_array($query))

			// Get the attachments for this post.
$query = $db->simple_select("attachments", "*", "pid=".$mybb->input['pid']);
while($attachment = $db->fetch_array($query))

			{

			{

				$attachcache[$attachment['pid']][$attachment['aid']] = $attachment;
}
}

				$attachcache[$attachment['pid']][$attachment['aid']] = $attachment;
}
}

Zeile 896Zeile 899
		");
$postsdone = array();
while($post = $db->fetch_array($query))

		");
$postsdone = array();
while($post = $db->fetch_array($query))

		{

		{

			if(empty($postsdone[$post['pid']]))
{
if($post['pid'] == $mybb->input['pid'] || ($isfirst && !$mybb->input['pid']))

			if(empty($postsdone[$post['pid']]))
{
if($post['pid'] == $mybb->input['pid'] || ($isfirst && !$mybb->input['pid']))

Zeile 932Zeile 935
		}

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

		}

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

		{

		{

			$post = get_post($mybb->input['pid']);
if(
empty($post) ||

			$post = get_post($mybb->input['pid']);
if(
empty($post) ||

Zeile 959Zeile 962
				if(($result % $perpage) == 0)
{
$page = $result / $perpage;

				if(($result % $perpage) == 0)
{
$page = $result / $perpage;

				}

				}

				else
{
$page = (int)($result / $perpage) + 1;

				else
{
$page = (int)($result / $perpage) + 1;

Zeile 985Zeile 988
					rebuild_thread_counters($thread['tid']);
}
}

					rebuild_thread_counters($thread['tid']);
}
}

		}

		}


$postcount = (int)$thread['replies']+1;
$pages = $postcount / $perpage;


$postcount = (int)$thread['replies']+1;
$pages = $postcount / $perpage;

Zeile 994Zeile 997
		if($mybb->get_input('page') == "last")
{
$page = $pages;

		if($mybb->get_input('page') == "last")
{
$page = $pages;

		}


		}


		if($page > $pages || $page <= 0)
{
$page = 1;
}

if($page)

		if($page > $pages || $page <= 0)
{
$page = 1;
}

if($page)

		{

		{

			$start = ($page-1) * $perpage;
}
else

			$start = ($page-1) * $perpage;
}
else

Zeile 1127Zeile 1130
	if($mybb->settings['showsimilarthreads'] != 0)
{
$own_perm = '';

	if($mybb->settings['showsimilarthreads'] != 0)
{
$own_perm = '';

		if($forumpermissions['canonlyviewownthreads'] == 1)

		if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] == 1)

		{
$own_perm = " AND t.uid={$mybb->user['uid']}";
}

		{
$own_perm = " AND t.uid={$mybb->user['uid']}";
}

Zeile 1215Zeile 1218
			else
{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);

			else
{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);

			}

			}

			$similar_thread['replies'] = my_number_format($similar_thread['replies']);
$similar_thread['views'] = my_number_format($similar_thread['views']);
eval("\$similarthreadbits .= \"".$templates->get("showthread_similarthreads_bit")."\";");

			$similar_thread['replies'] = my_number_format($similar_thread['replies']);
$similar_thread['views'] = my_number_format($similar_thread['views']);
eval("\$similarthreadbits .= \"".$templates->get("showthread_similarthreads_bit")."\";");

		}

		}

		if($count)
{
eval("\$similarthreads = \"".$templates->get("showthread_similarthreads")."\";");

		if($count)
{
eval("\$similarthreads = \"".$templates->get("showthread_similarthreads")."\";");

		}

		}

	}

// Decide whether or not to show quick reply.

	}

// Decide whether or not to show quick reply.

Zeile 1248Zeile 1251

$postoptionschecked = array('signature' => '', 'emailnotify' => '');
if($mybb->user['signature'])


$postoptionschecked = array('signature' => '', 'emailnotify' => '');
if($mybb->user['signature'])

		{

		{

			$postoptionschecked['signature'] = 'checked="checked"';

			$postoptionschecked['signature'] = 'checked="checked"';

		}

		}


// Hide signature option if no permission
$option_signature = '';
if($mybb->usergroup['canusesig'] && !$mybb->user['suspendsignature'])
{
eval("\$option_signature = \"".$templates->get('showthread_quickreply_options_signature')."\";");


// Hide signature option if no permission
$option_signature = '';
if($mybb->usergroup['canusesig'] && !$mybb->user['suspendsignature'])
{
eval("\$option_signature = \"".$templates->get('showthread_quickreply_options_signature')."\";");

		}

		}


if(isset($mybb->user['emailnotify']) && $mybb->user['emailnotify'] == 1)
{


if(isset($mybb->user['emailnotify']) && $mybb->user['emailnotify'] == 1)
{

Zeile 1274Zeile 1277
		if(!is_moderator($forum['fid'], "canapproveunapproveposts"))
{
if($forumpermissions['modposts'] == 1)

		if(!is_moderator($forum['fid'], "canapproveunapproveposts"))
{
if($forumpermissions['modposts'] == 1)

			{

			{

				$moderation_text = $lang->moderation_forum_posts;

				$moderation_text = $lang->moderation_forum_posts;

				eval('$moderation_notice = "'.$templates->get('global_moderation_notice').'";');
}


				eval('$moderation_notice = "'.$templates->get('global_moderation_notice').'";');
}


			if($mybb->user['moderateposts'] == 1)
{
$moderation_text = $lang->moderation_user_posts;
eval('$moderation_notice = "'.$templates->get('global_moderation_notice').'";');

			if($mybb->user['moderateposts'] == 1)
{
$moderation_text = $lang->moderation_user_posts;
eval('$moderation_notice = "'.$templates->get('global_moderation_notice').'";');

			}
}


			}
}


			$posthash = md5($mybb->user['uid'].random_str());

if(!isset($collapsedthead['quickreply']))

			$posthash = md5($mybb->user['uid'].random_str());

if(!isset($collapsedthead['quickreply']))

Zeile 1307Zeile 1310

$moderationoptions = '';
$threadnotesbox = $viewnotes = '';


$moderationoptions = '';
$threadnotesbox = $viewnotes = '';





	// If the user is a moderator, show the moderation tools.
if($ismod)
{
$customthreadtools = $customposttools = $standardthreadtools = $standardposttools = '';

	// If the user is a moderator, show the moderation tools.
if($ismod)
{
$customthreadtools = $customposttools = $standardthreadtools = $standardposttools = '';





		if(!empty($thread['notes']))
{
$thread['notes'] = nl2br(htmlspecialchars_uni($thread['notes']));

		if(!empty($thread['notes']))
{
$thread['notes'] = nl2br(htmlspecialchars_uni($thread['notes']));





			if(strlen($thread['notes']) > 200)

			if(strlen($thread['notes']) > 200)

			{

			{

				eval("\$viewnotes = \"".$templates->get("showthread_threadnotes_viewnotes")."\";");
$thread['notes'] = my_substr($thread['notes'], 0, 200)."... {$viewnotes}";

				eval("\$viewnotes = \"".$templates->get("showthread_threadnotes_viewnotes")."\";");
$thread['notes'] = my_substr($thread['notes'], 0, 200)."... {$viewnotes}";

 
			}

if(!isset($collapsedthead['threadnotes']))
{
$collapsedthead['threadnotes'] = '';
}
if(!isset($collapsedimg['threadnotes']))
{
$collapsedimg['threadnotes'] = '';
}
if(!isset($collapsed['threadnotes_e']))
{
$collapsed['threadnotes_e'] = '';

			}

$expaltext = (in_array("threadnotes", $collapse)) ? $lang->expcol_expand : $lang->expcol_collapse;

			}

$expaltext = (in_array("threadnotes", $collapse)) ? $lang->expcol_expand : $lang->expcol_collapse;

Zeile 1422Zeile 1438

if(is_moderator($forum['fid'], "canopenclosethreads"))
{


if(is_moderator($forum['fid'], "canopenclosethreads"))
{

 
			if($thread['closed'])
{
$lang->open_close_thread = $lang->open_thread;
}
else
{
$lang->open_close_thread = $lang->close_thread;
}

			eval("\$openclosethread = \"".$templates->get("showthread_moderationoptions_openclose")."\";");
}

if(is_moderator($forum['fid'], "canstickunstickthreads"))
{

			eval("\$openclosethread = \"".$templates->get("showthread_moderationoptions_openclose")."\";");
}

if(is_moderator($forum['fid'], "canstickunstickthreads"))
{

 
			if($thread['sticky'])
{
$lang->stick_unstick_thread = $lang->unstick_thread;
}
else
{
$lang->stick_unstick_thread = $lang->stick_thread;
}

			eval("\$stickunstickthread = \"".$templates->get("showthread_moderationoptions_stickunstick")."\";");
}


			eval("\$stickunstickthread = \"".$templates->get("showthread_moderationoptions_stickunstick")."\";");
}


Zeile 1524Zeile 1556
	}

// Get users viewing this thread

	}

// Get users viewing this thread

 
	$usersbrowsing='';

	if($mybb->settings['browsingthisthread'] != 0)
{
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];

	if($mybb->settings['browsingthisthread'] != 0)
{
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];

Zeile 1556Zeile 1589
				$doneusers[$user['uid']] = $user['time'];

$invisiblemark = '';

				$doneusers[$user['uid']] = $user['time'];

$invisiblemark = '';

				if($user['invisible'] == 1 && $mybb->usergroup['canbeinvisible'] == 1)

				if($user['invisible'] == 1)

				{
$invisiblemark = "*";
++$inviscount;

				{
$invisiblemark = "*";
++$inviscount;