Vergleich showthread.php - 1.8.15 - 1.8.21

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 13Zeile 13

$templatelist = "showthread,postbit,postbit_author_user,postbit_author_guest,showthread_newthread,showthread_newreply,showthread_newreply_closed,postbit_avatar,postbit_find,postbit_pm,postbit_www,postbit_email,postbit_edit,postbit_quote,postbit_report";
$templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,showthread_inlinemoderation_softdelete,showthread_poll_editpoll";


$templatelist = "showthread,postbit,postbit_author_user,postbit_author_guest,showthread_newthread,showthread_newreply,showthread_newreply_closed,postbit_avatar,postbit_find,postbit_pm,postbit_www,postbit_email,postbit_edit,postbit_quote,postbit_report";
$templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,showthread_inlinemoderation_softdelete,showthread_poll_editpoll";

$templatelist .= ",postbit_editedby,showthread_similarthreads,showthread_similarthreads_bit,postbit_iplogged_show,postbit_iplogged_hiden,postbit_profilefield,showthread_quickreply,showthread_add_poll,showthread_send_thread,showthread_inlinemoderation_restore";

$templatelist .= ",postbit_editedby,showthread_similarthreads,showthread_similarthreads_bit,postbit_iplogged_show,postbit_iplogged_hiden,postbit_profilefield,showthread_quickreply,showthread_printthread,showthread_add_poll,showthread_send_thread,showthread_inlinemoderation_restore";

$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,postbit_attachments,postbit_attachments_attachment,postbit_attachments_thumbnails,postbit_attachments_images_image,postbit_attachments_images,showthread_quickreply_options_stick,postbit_status";
$templatelist .= ",postbit_inlinecheck,showthread_inlinemoderation,postbit_attachments_thumbnails_thumbnail,postbit_ignored,postbit_multiquote,showthread_moderationoptions_custom_tool,showthread_moderationoptions_custom,showthread_inlinemoderation_custom_tool";
$templatelist .= ",showthread_usersbrowsing,showthread_usersbrowsing_user,showthread_poll_option,showthread_poll,showthread_quickreply_options_signature,showthread_threaded_bitactive,showthread_threaded_bit,postbit_attachments_attachment_unapproved";
$templatelist .= ",showthread_moderationoptions_openclose,showthread_moderationoptions_stickunstick,showthread_moderationoptions_delete,showthread_moderationoptions_threadnotes,showthread_moderationoptions_manage,showthread_moderationoptions_deletepoll";
$templatelist .= ",postbit_userstar,postbit_reputation_formatted_link,postbit_warninglevel_formatted,postbit_quickrestore,forumdisplay_password,forumdisplay_password_wrongpass,postbit_purgespammer,showthread_inlinemoderation_approve,forumdisplay_thread_icon";

$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,postbit_attachments,postbit_attachments_attachment,postbit_attachments_thumbnails,postbit_attachments_images_image,postbit_attachments_images,showthread_quickreply_options_stick,postbit_status";
$templatelist .= ",postbit_inlinecheck,showthread_inlinemoderation,postbit_attachments_thumbnails_thumbnail,postbit_ignored,postbit_multiquote,showthread_moderationoptions_custom_tool,showthread_moderationoptions_custom,showthread_inlinemoderation_custom_tool";
$templatelist .= ",showthread_usersbrowsing,showthread_usersbrowsing_user,showthread_poll_option,showthread_poll,showthread_quickreply_options_signature,showthread_threaded_bitactive,showthread_threaded_bit,postbit_attachments_attachment_unapproved";
$templatelist .= ",showthread_moderationoptions_openclose,showthread_moderationoptions_stickunstick,showthread_moderationoptions_delete,showthread_moderationoptions_threadnotes,showthread_moderationoptions_manage,showthread_moderationoptions_deletepoll";
$templatelist .= ",postbit_userstar,postbit_reputation_formatted_link,postbit_warninglevel_formatted,postbit_quickrestore,forumdisplay_password,forumdisplay_password_wrongpass,postbit_purgespammer,showthread_inlinemoderation_approve,forumdisplay_thread_icon";

$templatelist .= ",showthread_moderationoptions_softdelete,showthread_moderationoptions_restore,post_captcha,post_captcha_recaptcha,post_captcha_recaptcha_invisible,post_captcha_nocaptcha,showthread_moderationoptions,showthread_inlinemoderation_standard,showthread_inlinemoderation_manage";

$templatelist .= ",showthread_moderationoptions_softdelete,showthread_moderationoptions_restore,post_captcha,post_captcha_recaptcha_invisible,post_captcha_nocaptcha,showthread_moderationoptions,showthread_inlinemoderation_standard,showthread_inlinemoderation_manage";

$templatelist .= ",showthread_ratethread,postbit_posturl,postbit_icon,postbit_editedby_editreason,attachment_icon,global_moderation_notice,showthread_poll_option_multiple,postbit_gotopost,postbit_rep_button,postbit_warninglevel,showthread_threadnoteslink";
$templatelist .= ",showthread_moderationoptions_approve,showthread_moderationoptions_unapprove,showthread_inlinemoderation_delete,showthread_moderationoptions_standard,showthread_quickreply_options_close,showthread_inlinemoderation_custom,showthread_search";
$templatelist .= ",postbit_profilefield_multiselect_value,postbit_profilefield_multiselect,showthread_subscription,postbit_deleted_member,postbit_away,postbit_warn,postbit_classic,postbit_reputation,postbit_deleted,postbit_offline,postbit_online,postbit_signature";

$templatelist .= ",showthread_ratethread,postbit_posturl,postbit_icon,postbit_editedby_editreason,attachment_icon,global_moderation_notice,showthread_poll_option_multiple,postbit_gotopost,postbit_rep_button,postbit_warninglevel,showthread_threadnoteslink";
$templatelist .= ",showthread_moderationoptions_approve,showthread_moderationoptions_unapprove,showthread_inlinemoderation_delete,showthread_moderationoptions_standard,showthread_quickreply_options_close,showthread_inlinemoderation_custom,showthread_search";
$templatelist .= ",postbit_profilefield_multiselect_value,postbit_profilefield_multiselect,showthread_subscription,postbit_deleted_member,postbit_away,postbit_warn,postbit_classic,postbit_reputation,postbit_deleted,postbit_offline,postbit_online,postbit_signature";

Zeile 145Zeile 145
// Make sure we are looking at a real thread here.
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] == 0 && !is_moderator($fid, "canviewunapprove")) || ($thread['visible'] == -1 && !is_moderator($fid, "canviewdeleted")))
{

// Make sure we are looking at a real thread here.
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] == 0 && !is_moderator($fid, "canviewunapprove")) || ($thread['visible'] == -1 && !is_moderator($fid, "canviewdeleted")))
{

	error($lang->error_invalidthread);
}





	// Allow viewing own unapproved thread
if (!($mybb->user['uid'] && $mybb->settings['showownunapproved'] && $thread['visible'] == 0 && ($thread['uid'] == $mybb->user['uid'])))
{
error($lang->error_invalidthread);
}
}


// Does the user have permission to view this thread?
if($forumpermissions['canview'] != 1 || $forumpermissions['canviewthreads'] != 1)


// Does the user have permission to view this thread?
if($forumpermissions['canview'] != 1 || $forumpermissions['canviewthreads'] != 1)

{
error_no_permission();
}

{
error_no_permission();
}


if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] == 1 && $thread['uid'] != $mybb->user['uid'])
{
error_no_permission();


if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] == 1 && $thread['uid'] != $mybb->user['uid'])
{
error_no_permission();

}

}


$archive_url = build_archive_link("thread", $tid);



$archive_url = build_archive_link("thread", $tid);


Zeile 166Zeile 170
if(!$forum || $forum['type'] != "f")
{
error($lang->error_invalidforum);

if(!$forum || $forum['type'] != "f")
{
error($lang->error_invalidforum);

}


}


$threadnoteslink = '';
if(is_moderator($fid, "canmanagethreads") && !empty($thread['notes']))

$threadnoteslink = '';
if(is_moderator($fid, "canmanagethreads") && !empty($thread['notes']))

{

{

	eval('$threadnoteslink = "'.$templates->get('showthread_threadnoteslink').'";');

	eval('$threadnoteslink = "'.$templates->get('showthread_threadnoteslink').'";');

}


}


// Check if this forum is password protected and we have a valid password
check_forum_password($forum['fid']);

// Check if this forum is password protected and we have a valid password
check_forum_password($forum['fid']);





// If there is no specific action, we must be looking at the thread.
if(!$mybb->get_input('action'))
{

// If there is no specific action, we must be looking at the thread.
if(!$mybb->get_input('action'))
{

Zeile 189Zeile 193
	// First, figure out what time the thread or forum were last read
$query = $db->simple_select("threadsread", "dateline", "uid='{$mybb->user['uid']}' AND tid='{$thread['tid']}'");
$thread_read = $db->fetch_field($query, "dateline");

	// First, figure out what time the thread or forum were last read
$query = $db->simple_select("threadsread", "dateline", "uid='{$mybb->user['uid']}' AND tid='{$thread['tid']}'");
$thread_read = $db->fetch_field($query, "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 233Zeile 237
		else
{
$lastread = $forum_read;

		else
{
$lastread = $forum_read;

		}

		}

	}

if($cutoff && $lastread < $cutoff)

	}

if($cutoff && $lastread < $cutoff)

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

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

	}
$options = array(
"limit_start" => 0,

	}
$options = array(
"limit_start" => 0,

		"limit" => 1,
"order_by" => "dateline",

		"limit" => 1,
"order_by" => "dateline",

		"order_dir" => "desc"

		"order_dir" => "desc"

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

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





	// Redirect to the proper page.
$pid = $db->fetch_field($query, "pid");
header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");

	// Redirect to the proper page.
$pid = $db->fetch_field($query, "pid");
header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");

Zeile 343Zeile 347
		"limit" => 1,
"limit_start" => 0,
"order_by" => "lastpost",

		"limit" => 1,
"limit_start" => 0,
"order_by" => "lastpost",

		"order_dir" => "desc"
);

		"order_dir" => "desc"
);

	$query = $db->simple_select("threads", "*", "fid=".$thread['fid']." AND lastpost < ".$thread['lastpost']." {$visibleonly} AND closed NOT LIKE 'moved|%'", $options);
$nextthread = $db->fetch_array($query);

	$query = $db->simple_select("threads", "*", "fid=".$thread['fid']." AND lastpost < ".$thread['lastpost']." {$visibleonly} AND closed NOT LIKE 'moved|%'", $options);
$nextthread = $db->fetch_array($query);





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

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

Zeile 365Zeile 369
	$pid = $db->fetch_field($query, "pid");
header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");
exit;

	$pid = $db->fetch_field($query, "pid");
header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");
exit;

}


}


$pid = $mybb->input['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);

// Forumdisplay cache

$pid = $mybb->input['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);

// Forumdisplay cache

Zeile 408Zeile 412
	{
$uid_only = " AND uid = '".$mybb->user['uid']."'";


	{
$uid_only = " AND uid = '".$mybb->user['uid']."'";


		$query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $visibleonly $uid_only", array('limit' => 1));
$threadcount = $db->fetch_field($query, "threads");
}


		$query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $visibleonly $uid_only", array('limit' => 1));
$threadcount = $db->fetch_field($query, "threads");
}


	// If we have 0 threads double check there aren't any "moved" threads
if($threadcount == 0)
{

	// If we have 0 threads double check there aren't any "moved" threads
if($threadcount == 0)
{

Zeile 459Zeile 463
// Show the entire thread (taking into account pagination).
if($mybb->input['action'] == "thread")
{

// Show the entire thread (taking into account pagination).
if($mybb->input['action'] == "thread")
{

	if($thread['firstpost'] == 0)


	// This is a workaround to fix threads which data may get "corrupted" due to lag or other still unknown reasons
if($thread['firstpost'] == 0 || $thread['dateline'] == 0)

	{
update_first_post($tid);
}

	{
update_first_post($tid);
}

Zeile 499Zeile 504

$query = $db->simple_select("pollvotes", "*", "{$user_check} AND pid='".$poll['pid']."'");
while($votecheck = $db->fetch_array($query))


$query = $db->simple_select("pollvotes", "*", "{$user_check} AND pid='".$poll['pid']."'");
while($votecheck = $db->fetch_array($query))

		{

		{

			$alreadyvoted = 1;
$votedfor[$votecheck['voteoption']] = 1;
}

			$alreadyvoted = 1;
$votedfor[$votecheck['voteoption']] = 1;
}

Zeile 566Zeile 571
				else
{
$percent = number_format($votes / $poll['totvotes'] * 100, 2);

				else
{
$percent = number_format($votes / $poll['totvotes'] * 100, 2);

				}

				}

				$imagewidth = round($percent);
eval("\$polloptions .= \"".$templates->get("showthread_poll_resultbit")."\";");
}
else
{
if($poll['multiple'] == 1)

				$imagewidth = round($percent);
eval("\$polloptions .= \"".$templates->get("showthread_poll_resultbit")."\";");
}
else
{
if($poll['multiple'] == 1)

				{

				{

					eval("\$polloptions .= \"".$templates->get("showthread_poll_option_multiple")."\";");
}
else

					eval("\$polloptions .= \"".$templates->get("showthread_poll_option_multiple")."\";");
}
else

Zeile 581Zeile 586
					eval("\$polloptions .= \"".$templates->get("showthread_poll_option")."\";");
}
}

					eval("\$polloptions .= \"".$templates->get("showthread_poll_option")."\";");
}
}

		}

		}


// If there are any votes at all, all votes together will be 100%; if there are no votes, all votes together will be 0%.
if($poll['totvotes'])
{
$totpercent = "100%";


// If there are any votes at all, all votes together will be 100%; if there are no votes, all votes together will be 0%.
if($poll['totvotes'])
{
$totpercent = "100%";

		}
else

		}
else

		{
$totpercent = "0%";
}

		{
$totpercent = "0%";
}

Zeile 632Zeile 637
			if($poll['timeout'] != 0)
{
$closeon = $lang->sprintf($lang->poll_closes, my_date($mybb->settings['dateformat'], $expiretime));

			if($poll['timeout'] != 0)
{
$closeon = $lang->sprintf($lang->poll_closes, my_date($mybb->settings['dateformat'], $expiretime));

			}

			}


$publicnote = '&nbsp;';
if($poll['public'] == 1)


$publicnote = '&nbsp;';
if($poll['public'] == 1)

Zeile 676Zeile 681
		if($forumpermissions['canpostreplys'] != 0 && $mybb->user['suspendposting'] != 1 && ($thread['closed'] != 1 || is_moderator($fid, "canpostclosedthreads")) && ($thread['uid'] == $mybb->user['uid'] || $forumpermissions['canonlyreplyownthreads'] != 1))
{
eval("\$newreply = \"".$templates->get("showthread_newreply")."\";");

		if($forumpermissions['canpostreplys'] != 0 && $mybb->user['suspendposting'] != 1 && ($thread['closed'] != 1 || is_moderator($fid, "canpostclosedthreads")) && ($thread['uid'] == $mybb->user['uid'] || $forumpermissions['canonlyreplyownthreads'] != 1))
{
eval("\$newreply = \"".$templates->get("showthread_newreply")."\";");

		}

		}

		elseif($thread['closed'] == 1)
{
eval("\$newreply = \"".$templates->get("showthread_newreply_closed")."\";");

		elseif($thread['closed'] == 1)
{
eval("\$newreply = \"".$templates->get("showthread_newreply_closed")."\";");

Zeile 691Zeile 696
		if($thread['closed'] == 1)
{
$closelinkch = ' checked="checked"';

		if($thread['closed'] == 1)
{
$closelinkch = ' checked="checked"';

		}

		}


if($thread['sticky'])
{
$stickch = ' checked="checked"';


if($thread['sticky'])
{
$stickch = ' checked="checked"';

		}


		}


		if(is_moderator($thread['fid'], "canopenclosethreads"))
{
eval("\$closeoption .= \"".$templates->get("showthread_quickreply_options_close")."\";");

		if(is_moderator($thread['fid'], "canopenclosethreads"))
{
eval("\$closeoption .= \"".$templates->get("showthread_quickreply_options_close")."\";");

Zeile 741Zeile 746
			$thread['width'] = 0;
$thread['averagerating'] = 0;
$thread['numratings'] = 0;

			$thread['width'] = 0;
$thread['averagerating'] = 0;
$thread['numratings'] = 0;

		}

		}

		else
{
$thread['averagerating'] = (float)round($thread['totalratings']/$thread['numratings'], 2);

		else
{
$thread['averagerating'] = (float)round($thread['totalratings']/$thread['numratings'], 2);

Zeile 807Zeile 812

// Fetch profile fields to display on postbit
$pfcache = $cache->read('profilefields');


// Fetch profile fields to display on postbit
$pfcache = $cache->read('profilefields');





	if(is_array($pfcache))

	if(is_array($pfcache))

	{

	{

		foreach($pfcache as $profilefield)
{
if($profilefield['postbit'] != 1)

		foreach($pfcache as $profilefield)
{
if($profilefield['postbit'] != 1)

Zeile 823Zeile 828

// Which thread mode is our user using by default?
if(!empty($mybb->user['threadmode']))


// Which thread mode is our user using by default?
if(!empty($mybb->user['threadmode']))

	{

	{

		$defaultmode = $mybb->user['threadmode'];
}
else if($mybb->settings['threadusenetstyle'] == 1)
{
$defaultmode = 'threaded';

		$defaultmode = $mybb->user['threadmode'];
}
else if($mybb->settings['threadusenetstyle'] == 1)
{
$defaultmode = 'threaded';

	}

	}

	else
{
$defaultmode = 'linear';

	else
{
$defaultmode = 'linear';

Zeile 837Zeile 842

// If mode is unset, set the default mode
if(!isset($mybb->input['mode']))


// If mode is unset, set the default mode
if(!isset($mybb->input['mode']))

	{

	{

		$mybb->input['mode'] = $defaultmode;
}

		$mybb->input['mode'] = $defaultmode;
}





	// Threaded or linear display?
$threadexbox = '';
if($mybb->get_input('mode') == 'threaded')

	// Threaded or linear display?
$threadexbox = '';
if($mybb->get_input('mode') == 'threaded')

Zeile 851Zeile 856
		if($mybb->input['pid'])
{
$where = "AND p.pid='".$mybb->input['pid']."'";

		if($mybb->input['pid'])
{
$where = "AND p.pid='".$mybb->input['pid']."'";

		}
else
{

		}
else
{

			$where = " ORDER BY dateline LIMIT 0, 1";
}
$query = $db->query("

			$where = " ORDER BY dateline LIMIT 0, 1";
}
$query = $db->query("

Zeile 874Zeile 879

// Is there actually a pid to display?
if(!$showpost['pid'])


// Is there actually a pid to display?
if(!$showpost['pid'])

		{

		{

			error($lang->error_invalidpost);
}


			error($lang->error_invalidpost);
}


Zeile 889Zeile 894
			}
}


			}
}


		// Build the threaded post display tree.
$query = $db->query("

        // Build the threaded post display tree.
$query = $db->query("

            SELECT p.username, p.uid, p.pid, p.replyto, p.subject, p.dateline
FROM ".TABLE_PREFIX."posts p
WHERE p.tid='$tid'
$visible
ORDER BY p.dateline
");

            SELECT p.username, p.uid, p.pid, p.replyto, p.subject, p.dateline
FROM ".TABLE_PREFIX."posts p
WHERE p.tid='$tid'
$visible
ORDER BY p.dateline
");

 
        if(!is_array($postsdone))
{
$postsdone = array();
}

        while($post = $db->fetch_array($query))
{
if(!$postsdone[$post['pid']])

        while($post = $db->fetch_array($query))
{
if(!$postsdone[$post['pid']])

Zeile 937Zeile 946
			$post = get_post($mybb->input['pid']);
if(empty($post) || ($post['visible'] == 0 && !is_moderator($post['fid'], 'canviewunapprove')) || ($post['visible'] == -1 && !is_moderator($post['fid'], 'canviewdeleted') && $forumpermissions['canviewdeletionnotice'] == 0))
{

			$post = get_post($mybb->input['pid']);
if(empty($post) || ($post['visible'] == 0 && !is_moderator($post['fid'], 'canviewunapprove')) || ($post['visible'] == -1 && !is_moderator($post['fid'], 'canviewdeleted') && $forumpermissions['canviewdeletionnotice'] == 0))
{

				$footer .= '<script type="text/javascript">$(document).ready(function() { $.jGrowl(\''.$lang->error_invalidpost.'\', {theme: \'jgrowl_error\'}); });</script>';

				$footer .= '<script type="text/javascript">$(function() { $.jGrowl(\''.$lang->error_invalidpost.'\', {theme: \'jgrowl_error\'}); });</script>';

			}
else
{

			}
else
{

Zeile 1050Zeile 1059
        }

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

        }

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

 
		
// Allow originator to see own unapproved posts
if($mybb->user['uid'] && $mybb->settings['showownunapproved'])
{
$visible .= " OR (p.tid='$tid' AND p.visible='0' AND p.uid=".$mybb->user['uid'].")";
}


// Lets get the pids of the posts on this page.
$pids = "";


// Lets get the pids of the posts on this page.
$pids = "";

Zeile 1069Zeile 1084
			$comma = ",";
}
if($pids)

			$comma = ",";
}
if($pids)

		{

		{

			$pids = "pid IN($pids)";

$attachcache = array();

			$pids = "pid IN($pids)";

$attachcache = array();

Zeile 1149Zeile 1164
		$similarthreadbits = '';
$icon_cache = $cache->read("posticons");
while($similar_thread = $db->fetch_array($query))

		$similarthreadbits = '';
$icon_cache = $cache->read("posticons");
while($similar_thread = $db->fetch_array($query))

		{

		{

			++$count;
$trow = alt_trow();
if($similar_thread['icon'] > 0 && $icon_cache[$similar_thread['icon']])

			++$count;
$trow = alt_trow();
if($similar_thread['icon'] > 0 && $icon_cache[$similar_thread['icon']])

			{

			{

				$icon = $icon_cache[$similar_thread['icon']];
$icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
$icon['path'] = htmlspecialchars_uni($icon['path']);
$icon['name'] = htmlspecialchars_uni($icon['name']);
eval("\$icon = \"".$templates->get("forumdisplay_thread_icon")."\";");

				$icon = $icon_cache[$similar_thread['icon']];
$icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
$icon['path'] = htmlspecialchars_uni($icon['path']);
$icon['name'] = htmlspecialchars_uni($icon['name']);
eval("\$icon = \"".$templates->get("forumdisplay_thread_icon")."\";");

			}
else

			}
else

			{
$icon = "&nbsp;";

			{
$icon = "&nbsp;";

			}
if(!$similar_thread['username'])
{

			}
if(!$similar_thread['username'])
{

				$similar_thread['username'] = $similar_thread['profilelink'] = htmlspecialchars_uni($similar_thread['threadusername']);

				$similar_thread['username'] = $similar_thread['profilelink'] = htmlspecialchars_uni($similar_thread['threadusername']);

			}
else
{

			}
else
{

				$similar_thread['username'] = htmlspecialchars_uni($similar_thread['username']);
$similar_thread['profilelink'] = build_profile_link($similar_thread['username'], $similar_thread['uid']);
}

				$similar_thread['username'] = htmlspecialchars_uni($similar_thread['username']);
$similar_thread['profilelink'] = build_profile_link($similar_thread['username'], $similar_thread['uid']);
}

Zeile 1209Zeile 1224
		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 1272Zeile 1287
			}
}


			}
}


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


	    	$posthash = md5($mybb->user['uid'].random_str());
$expaltext = (in_array("quickreply", $collapse)) ? "[+]" : "[-]";

		eval("\$quickreply = \"".$templates->get("showthread_quickreply")."\";");
}


		eval("\$quickreply = \"".$templates->get("showthread_quickreply")."\";");
}


Zeile 1294Zeile 1310
				$thread['notes'] = my_substr($thread['notes'], 0, 200)."... {$viewnotes}";
}


				$thread['notes'] = my_substr($thread['notes'], 0, 200)."... {$viewnotes}";
}


 
			$expaltext = (in_array("threadnotes", $collapse)) ? "[+]" : "[-]";

			eval("\$threadnotesbox = \"".$templates->get("showthread_threadnotes")."\";");
}


			eval("\$threadnotesbox = \"".$templates->get("showthread_threadnotes")."\";");
}


Zeile 1317Zeile 1334
					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, type', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND (groups='' OR CONCAT(',',groups,',') LIKE '%,-1,%'{$gidswhere})");

					$query = $db->simple_select("modtools", 'tid, name, type', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND (`groups`='' OR CONCAT(',',`groups`,',') LIKE '%,-1,%'{$gidswhere})");

					break;
}


					break;
}


Zeile 1447Zeile 1464
			eval("\$moderationoptions = \"".$templates->get("showthread_moderationoptions")."\";");
}
}

			eval("\$moderationoptions = \"".$templates->get("showthread_moderationoptions")."\";");
}
}

 

eval("\$printthread = \"".$templates->get("showthread_printthread")."\";");


// Display 'send thread' link if permissions allow
$sendthread = '';
if($mybb->usergroup['cansendemail'] == 1)
{
eval("\$sendthread = \"".$templates->get("showthread_send_thread")."\";");


// Display 'send thread' link if permissions allow
$sendthread = '';
if($mybb->usergroup['cansendemail'] == 1)
{
eval("\$sendthread = \"".$templates->get("showthread_send_thread")."\";");

	}

	}


// Display 'add poll' link to thread creator (or mods) if thread doesn't have a poll already
$addpoll = '';


// Display 'add poll' link to thread creator (or mods) if thread doesn't have a poll already
$addpoll = '';

Zeile 1461Zeile 1480
	if(!$thread['poll'] && ($thread['uid'] == $mybb->user['uid'] || $ismod == true) && $forumpermissions['canpostpolls'] == 1 && $forum['open'] != 0 && $thread['closed'] != 1 && ($ismod == true || $thread['dateline'] > ($time-($mybb->settings['polltimelimit']*60*60)) || $mybb->settings['polltimelimit'] == 0))
{
eval("\$addpoll = \"".$templates->get("showthread_add_poll")."\";");

	if(!$thread['poll'] && ($thread['uid'] == $mybb->user['uid'] || $ismod == true) && $forumpermissions['canpostpolls'] == 1 && $forum['open'] != 0 && $thread['closed'] != 1 && ($ismod == true || $thread['dateline'] > ($time-($mybb->settings['polltimelimit']*60*60)) || $mybb->settings['polltimelimit'] == 0))
{
eval("\$addpoll = \"".$templates->get("showthread_add_poll")."\";");

	}


	}


	// Subscription status
$add_remove_subscription = 'add';
$add_remove_subscription_text = $lang->subscribe_thread;

	// Subscription status
$add_remove_subscription = 'add';
$add_remove_subscription_text = $lang->subscribe_thread;

Zeile 1551Zeile 1570
		if($inviscount && $mybb->usergroup['canviewwolinvis'] != 1)
{
$invisonline = $lang->sprintf($lang->users_browsing_forum_invis, $inviscount);

		if($inviscount && $mybb->usergroup['canviewwolinvis'] != 1)
{
$invisonline = $lang->sprintf($lang->users_browsing_forum_invis, $inviscount);

		}

		}


$onlinesep = '';
if($invisonline != '' && $onlinemembers)


$onlinesep = '';
if($invisonline != '' && $onlinemembers)

		{

		{

			$onlinesep = $lang->comma;

			$onlinesep = $lang->comma;

		}


		}


		$onlinesep2 = '';
if($invisonline != '' && $guestcount || $onlinemembers && $guestcount)
{
$onlinesep2 = $lang->comma;
}

		$onlinesep2 = '';
if($invisonline != '' && $guestcount || $onlinemembers && $guestcount)
{
$onlinesep2 = $lang->comma;
}





		eval("\$usersbrowsing = \"".$templates->get("showthread_usersbrowsing")."\";");

		eval("\$usersbrowsing = \"".$templates->get("showthread_usersbrowsing")."\";");

 
	}

if($thread['visible'] == -1 )
{
$thread_deleted = 1;

	}

$plugins->run_hooks("showthread_end");

	}

$plugins->run_hooks("showthread_end");