Vergleich forumdisplay.php - 1.8.17 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 19Zeile 19
$templatelist .= ",forumdisplay_announcements_announcement,forumdisplay_announcements,forumdisplay_threads_sep,forumbit_depth3_statusicon,forumbit_depth3,forumdisplay_sticky_sep,forumdisplay_thread_attachment_count,forumdisplay_rssdiscovery,forumbit_moderators_group";
$templatelist .= ",forumdisplay_inlinemoderation_openclose,forumdisplay_inlinemoderation_stickunstick,forumdisplay_inlinemoderation_softdelete,forumdisplay_inlinemoderation_restore,forumdisplay_inlinemoderation_delete,forumdisplay_inlinemoderation_manage,forumdisplay_nopermission";
$templatelist .= ",forumbit_depth2_forum_unapproved_posts,forumbit_depth2_forum_unapproved_threads,forumbit_moderators_user,forumdisplay_inlinemoderation_standard,forumdisplay_threadlist_prefixes_prefix,forumdisplay_threadlist_prefixes,forumdisplay_thread_icon,forumdisplay_rules";

$templatelist .= ",forumdisplay_announcements_announcement,forumdisplay_announcements,forumdisplay_threads_sep,forumbit_depth3_statusicon,forumbit_depth3,forumdisplay_sticky_sep,forumdisplay_thread_attachment_count,forumdisplay_rssdiscovery,forumbit_moderators_group";
$templatelist .= ",forumdisplay_inlinemoderation_openclose,forumdisplay_inlinemoderation_stickunstick,forumdisplay_inlinemoderation_softdelete,forumdisplay_inlinemoderation_restore,forumdisplay_inlinemoderation_delete,forumdisplay_inlinemoderation_manage,forumdisplay_nopermission";
$templatelist .= ",forumbit_depth2_forum_unapproved_posts,forumbit_depth2_forum_unapproved_threads,forumbit_moderators_user,forumdisplay_inlinemoderation_standard,forumdisplay_threadlist_prefixes_prefix,forumdisplay_threadlist_prefixes,forumdisplay_thread_icon,forumdisplay_rules";

$templatelist .= ",forumdisplay_thread_deleted,forumdisplay_announcements_announcement_modbit,forumbit_depth2_forum_viewers,forumdisplay_threadlist_sortrating,forumdisplay_inlinemoderation_custom,forumdisplay_announcement_rating,forumdisplay_inlinemoderation_approveunapprove";

$templatelist .= ",forumdisplay_thread_deleted,forumdisplay_announcements_announcement_modbit,forumbit_depth2_forum_viewers,forumdisplay_threadlist_sortrating,forumdisplay_inlinemoderation_custom,forumdisplay_announcement_rating,forumdisplay_inlinemoderation_approveunapprove,forumdisplay_threadlist_subscription";


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 282Zeile 282
	$inviscount = 0;
$onlinemembers = '';
$doneusers = array();

	$inviscount = 0;
$onlinemembers = '';
$doneusers = array();

 

$query = $db->simple_select("sessions", "COUNT(DISTINCT ip) AS guestcount", "uid = 0 AND time > $timecut AND location1 = $fid AND nopermission != 1");
$guestcount = $db->fetch_field($query, 'guestcount');


$query = $db->query("


$query = $db->query("

		SELECT s.ip, s.uid, u.username, s.time, u.invisible, u.usergroup, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE s.time > '$timecut' AND location1='$fid' AND nopermission != 1



		SELECT
s.ip, s.uid, u.username, s.time, u.invisible, u.usergroup, u.usergroup, u.displaygroup
FROM
".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE s.uid != 0 AND s.time > $timecut AND location1 = $fid AND nopermission != 1

		ORDER BY u.username ASC, s.time DESC
");

		ORDER BY u.username ASC, s.time DESC
");





	while($user = $db->fetch_array($query))
{

	while($user = $db->fetch_array($query))
{

		if($user['uid'] == 0)
{
++$guestcount;
}
else

		if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])





		{

		{

			if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])



			$doneusers[$user['uid']] = $user['time'];
++$membercount;
if($user['invisible'] == 1)

			{

			{

				$doneusers[$user['uid']] = $user['time'];
++$membercount;
if($user['invisible'] == 1)
{
$invisiblemark = "*";
++$inviscount;
}
else
{
$invisiblemark = '';
}

				$invisiblemark = "*";
++$inviscount;
}
else
{
$invisiblemark = '';
}









				if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])
{
$user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);
$user['profilelink'] = build_profile_link($user['username'], $user['uid']);
eval("\$onlinemembers .= \"".$templates->get("forumdisplay_usersbrowsing_user", 1, 0)."\";");
$comma = $lang->comma;
}

			if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])
{
$user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);
$user['profilelink'] = build_profile_link($user['username'], $user['uid']);
eval("\$onlinemembers .= \"".$templates->get("forumdisplay_usersbrowsing_user", 1, 0)."\";");
$comma = $lang->comma;


			}

			}

		}
}


		}
}


	$guestsonline = '';
if($guestcount)
{
$guestsonline = $lang->sprintf($lang->users_browsing_forum_guests, $guestcount);

	$guestsonline = '';
if($guestcount)
{
$guestsonline = $lang->sprintf($lang->users_browsing_forum_guests, $guestcount);

	}


	}


	$invisonline = '';
if($mybb->user['invisible'] == 1)

	$invisonline = '';
if($mybb->user['invisible'] == 1)

	{

	{

		// the user was counted as invisible user --> correct the inviscount
$inviscount -= 1;
}
if($inviscount && $mybb->usergroup['canviewwolinvis'] != 1)
{
$invisonline = $lang->sprintf($lang->users_browsing_forum_invis, $inviscount);

		// the user was counted as invisible user --> correct the inviscount
$inviscount -= 1;
}
if($inviscount && $mybb->usergroup['canviewwolinvis'] != 1)
{
$invisonline = $lang->sprintf($lang->users_browsing_forum_invis, $inviscount);

	}


	}



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


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

Zeile 387Zeile 385
$bgcolor = "trow1";

// Set here to fetch only approved/deleted topics (and then below for a moderator we change this).

$bgcolor = "trow1";

// Set here to fetch only approved/deleted topics (and then below for a moderator we change this).

 
$visible_states = array("1");


if($fpermissions['canviewdeletionnotice'] != 0)
{

if($fpermissions['canviewdeletionnotice'] != 0)
{

	$visibleonly = "AND visible IN (-1,1)";
$tvisibleonly = "AND t.visible IN (-1,1)";
}
else
{
$visibleonly = "AND visible='1'";
$tvisibleonly = "AND t.visible='1'";

	$visible_states[] = "-1";







}

// Check if the active user is a moderator and get the inline moderation tools.
if(is_moderator($fid))

}

// Check if the active user is a moderator and get the inline moderation tools.
if(is_moderator($fid))

{

{

	eval("\$inlinemodcol = \"".$templates->get("forumdisplay_inlinemoderation_col")."\";");
$ismod = true;
$inlinecount = "0";
$inlinemod = '';
$inlinecookie = "inlinemod_forum".$fid;


	eval("\$inlinemodcol = \"".$templates->get("forumdisplay_inlinemoderation_col")."\";");
$ismod = true;
$inlinecount = "0";
$inlinemod = '';
$inlinecookie = "inlinemod_forum".$fid;


	if(is_moderator($fid, "canviewdeleted") == true || is_moderator($fid, "canviewunapprove") == true)

	if(is_moderator($fid, "canviewdeleted") == true)

	{

	{

		if(is_moderator($fid, "canviewunapprove") == true && is_moderator($fid, "canviewdeleted") == false)
{
$visibleonly = "AND visible IN (0,1)";
$tvisibleonly = "AND t.visible IN (0,1)";
}
elseif(is_moderator($fid, "canviewdeleted") == true && is_moderator($fid, "canviewunapprove") == false)
{
$visibleonly = "AND visible IN (-1,1)";
$tvisibleonly = "AND t.visible IN (-1,1)";
}
else
{
$visibleonly = " AND visible IN (-1,0,1)";
$tvisibleonly = " AND t.visible IN (-1,0,1)";
}

		$visible_states[] = "-1";
}
if(is_moderator($fid, "canviewunapprove") == true)
{
$visible_states[] = "0";











	}
}
else
{
$inlinemod = $inlinemodcol = '';

	}
}
else
{
$inlinemod = $inlinemodcol = '';

	$ismod = false;










	$ismod = false;
}

$visible_condition = "visible IN (".implode(',', array_unique($visible_states)).")";
$visibleonly = "AND ".$visible_condition;

// Allow viewing own unapproved threads for logged in users
if($mybb->user['uid'] && $mybb->settings['showownunapproved'])
{
$visible_condition .= " OR (t.visible=0 AND t.uid=".(int)$mybb->user['uid'].")";

}

}

 

$tvisibleonly = "AND (t.".$visible_condition.")";


if(is_moderator($fid, "caneditposts") || $fpermissions['caneditposts'] == 1)
{


if(is_moderator($fid, "caneditposts") || $fpermissions['caneditposts'] == 1)
{

Zeile 463Zeile 458
	}
}
// If there was a manual date cut override, use it.

	}
}
// If there was a manual date cut override, use it.

else

else

{
$datecut = $mybb->get_input('datecut', MyBB::INPUT_INT);

{
$datecut = $mybb->get_input('datecut', MyBB::INPUT_INT);

}


}


$datecutsel[(int)$datecut] = ' selected="selected"';
if($datecut > 0 && $datecut != 9999)
{

$datecutsel[(int)$datecut] = ' selected="selected"';
if($datecut > 0 && $datecut != 9999)
{

Zeile 479Zeile 474
{
$datecutsql = '';
$datecutsql2 = '';

{
$datecutsql = '';
$datecutsql2 = '';

}


}


// Sort by thread prefix
$tprefix = $mybb->get_input('prefix', MyBB::INPUT_INT);
if($tprefix > 0)
{
$prefixsql = "AND prefix = {$tprefix}";
$prefixsql2 = "AND t.prefix = {$tprefix}";

// Sort by thread prefix
$tprefix = $mybb->get_input('prefix', MyBB::INPUT_INT);
if($tprefix > 0)
{
$prefixsql = "AND prefix = {$tprefix}";
$prefixsql2 = "AND t.prefix = {$tprefix}";

}

}

else if($tprefix == -1)

else if($tprefix == -1)

{

{

	$prefixsql = "AND prefix = 0";
$prefixsql2 = "AND t.prefix = 0";
}

	$prefixsql = "AND prefix = 0";
$prefixsql2 = "AND t.prefix = 0";
}

Zeile 497Zeile 492
{
$prefixsql = "AND prefix != 0";
$prefixsql2 = "AND t.prefix != 0";

{
$prefixsql = "AND prefix != 0";
$prefixsql2 = "AND t.prefix != 0";

}
else

}
else

{
$prefixsql = $prefixsql2 = '';

{
$prefixsql = $prefixsql2 = '';

}

}


// Pick the sort order.
if(!isset($mybb->input['order']) && !empty($foruminfo['defaultsortorder']))


// Pick the sort order.
if(!isset($mybb->input['order']) && !empty($foruminfo['defaultsortorder']))

{

{

	$mybb->input['order'] = $foruminfo['defaultsortorder'];

	$mybb->input['order'] = $foruminfo['defaultsortorder'];

}

}

else
{
$mybb->input['order'] = $mybb->get_input('order');
}

else
{
$mybb->input['order'] = $mybb->get_input('order');
}





$mybb->input['order'] = htmlspecialchars_uni($mybb->get_input('order'));

switch(my_strtolower($mybb->input['order']))

$mybb->input['order'] = htmlspecialchars_uni($mybb->get_input('order'));

switch(my_strtolower($mybb->input['order']))

{

{

	case "asc":
$sortordernow = "asc";
$ordersel['asc'] = ' selected="selected"';

	case "asc":
$sortordernow = "asc";
$ordersel['asc'] = ' selected="selected"';

Zeile 607Zeile 602
{
$useronly = "AND uid={$mybb->user['uid']}";
$tuseronly = "AND t.uid={$mybb->user['uid']}";

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

}


}


if($fpermissions['canviewthreads'] != 0)
{
// How many threads are there?

if($fpermissions['canviewthreads'] != 0)
{
// How many threads are there?

	$query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $useronly $visibleonly $datecutsql $prefixsql");

	$query = $db->simple_select("threads t", "COUNT(tid) AS threads", "fid = '$fid' $tuseronly $tvisibleonly $datecutsql2 $prefixsql2");

	$threadcount = $db->fetch_field($query, "threads");
}


	$threadcount = $db->fetch_field($query, "threads");
}


Zeile 662Zeile 657
		$and = '';
}
else

		$and = '';
}
else

	{
$q = '';
$and = "&";
}

	{
$q = '';
$and = "&";
}


if((!empty($foruminfo['defaultsortby']) && $sortby != $foruminfo['defaultsortby']) || (empty($foruminfo['defaultsortby']) && $sortby != "lastpost"))
{


if((!empty($foruminfo['defaultsortby']) && $sortby != $foruminfo['defaultsortby']) || (empty($foruminfo['defaultsortby']) && $sortby != "lastpost"))
{

Zeile 674Zeile 669
		$and = "&";
}


		$and = "&";
}


	if($sortordernow != "desc")
{
$page_url .= "{$q}{$and}order={$sortordernow}";
$q = '';
$and = "&";
}


	if($sortordernow != "desc")
{
$page_url .= "{$q}{$and}order={$sortordernow}";
$q = '';
$and = "&";
}


	if($datecut > 0 && $datecut != 9999)
{
$page_url .= "{$q}{$and}datecut={$datecut}";

	if($datecut > 0 && $datecut != 9999)
{
$page_url .= "{$q}{$and}datecut={$datecut}";

Zeile 692Zeile 687
	{
$page_url .= "{$q}{$and}prefix={$tprefix}";
}

	{
$page_url .= "{$q}{$and}prefix={$tprefix}";
}

}

}

else
{
$page_url = str_replace("{fid}", $fid, FORUM_URL_PAGED);
}
$multipage = multipage($threadcount, $perpage, $page, $page_url);

else
{
$page_url = str_replace("{fid}", $fid, FORUM_URL_PAGED);
}
$multipage = multipage($threadcount, $perpage, $page, $page_url);





if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $fpermissions['canviewthreads'] != 0)
{
$lang->load("ratethread");

if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $fpermissions['canviewthreads'] != 0)
{
$lang->load("ratethread");

Zeile 716Zeile 711
	eval("\$ratingcol = \"".$templates->get("forumdisplay_threadlist_rating")."\";");
eval("\$ratingsort = \"".$templates->get("forumdisplay_threadlist_sortrating")."\";");
$colspan = "7";

	eval("\$ratingcol = \"".$templates->get("forumdisplay_threadlist_rating")."\";");
eval("\$ratingsort = \"".$templates->get("forumdisplay_threadlist_sortrating")."\";");
$colspan = "7";

}

}

else
{
if($sortfield == "averagerating")

else
{
if($sortfield == "averagerating")

Zeile 753Zeile 748
		LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid)
WHERE a.startdate<='$time' AND (a.enddate>='$time' OR a.enddate='0') AND ($sql OR fid='-1')
ORDER BY a.startdate DESC $limit

		LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid)
WHERE a.startdate<='$time' AND (a.enddate>='$time' OR a.enddate='0') AND ($sql OR fid='-1')
ORDER BY a.startdate DESC $limit

	");


	");


	// See if this announcement has been read in our announcement array
$cookie = array();
if(isset($mybb->cookies['mybb']['announcements']))

	// See if this announcement has been read in our announcement array
$cookie = array();
if(isset($mybb->cookies['mybb']['announcements']))

	{

	{

		$cookie = my_unserialize(stripslashes($mybb->cookies['mybb']['announcements']));
}


		$cookie = my_unserialize(stripslashes($mybb->cookies['mybb']['announcements']));
}


Zeile 770Zeile 765
		{
$new_class = ' class="subject_new"';
$folder = "newfolder";

		{
$new_class = ' class="subject_new"';
$folder = "newfolder";

		}

		}

		else
{
$new_class = ' class="subject_old"';

		else
{
$new_class = ' class="subject_old"';

Zeile 806Zeile 801
		if($ismod)
{
eval("\$modann = \"".$templates->get("forumdisplay_announcements_announcement_modbit")."\";");

		if($ismod)
{
eval("\$modann = \"".$templates->get("forumdisplay_announcements_announcement_modbit")."\";");

		}

		}

		else
{
$modann = '';
}

		else
{
$modann = '';
}





		$plugins->run_hooks("forumdisplay_announcement");
eval("\$announcements .= \"".$templates->get("forumdisplay_announcements_announcement")."\";");
$bgcolor = alt_trow();

		$plugins->run_hooks("forumdisplay_announcement");
eval("\$announcements .= \"".$templates->get("forumdisplay_announcements_announcement")."\";");
$bgcolor = alt_trow();

	}

	}


if($announcements)
{


if($announcements)
{

Zeile 824Zeile 819
	}

if(empty($cookie))

	}

if(empty($cookie))

	{

	{

		// Clean up cookie crumbs
my_setcookie('mybb[announcements]', 0, (TIME_NOW - (60*60*24*365)));
}

		// Clean up cookie crumbs
my_setcookie('mybb[announcements]', 0, (TIME_NOW - (60*60*24*365)));
}

Zeile 860Zeile 855
	while($thread = $db->fetch_array($query))
{
$threadcache[$thread['tid']] = $thread;

	while($thread = $db->fetch_array($query))
{
$threadcache[$thread['tid']] = $thread;





		if($thread['numratings'] > 0 && $ratings == false)
{
$ratings = true; // Looks for ratings in the forum

		if($thread['numratings'] > 0 && $ratings == false)
{
$ratings = true; // Looks for ratings in the forum

Zeile 878Zeile 873
		}
// Otherwise - set it to the plain thread ID
else

		}
// Otherwise - set it to the plain thread ID
else

		{

		{

			$tids[$thread['tid']] = $thread['tid'];
if(isset($moved_threads[$thread['tid']]))
{
unset($moved_threads[$thread['tid']]);
}

			$tids[$thread['tid']] = $thread['tid'];
if(isset($moved_threads[$thread['tid']]))
{
unset($moved_threads[$thread['tid']]);
}

		}
}

		}
}


if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $mybb->user['uid'] && !empty($threadcache) && $ratings == true)
{


if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $mybb->user['uid'] && !empty($threadcache) && $ratings == true)
{

Zeile 897Zeile 892
		while($rating = $db->fetch_array($query))
{
$threadcache[$rating['tid']]['rated'] = 1;

		while($rating = $db->fetch_array($query))
{
$threadcache[$rating['tid']]['rated'] = 1;

		}
}
}

		}
}
}


// If user has moderation tools available, prepare the Select All feature
$selectall = '';


// If user has moderation tools available, prepare the Select All feature
$selectall = '';

Zeile 909Zeile 904
	$lang->select_all = $lang->sprintf($lang->select_all, (int)$threadcount);
$lang->all_selected = $lang->sprintf($lang->all_selected, (int)$threadcount);
eval("\$selectall = \"".$templates->get("forumdisplay_inlinemoderation_selectall")."\";");

	$lang->select_all = $lang->sprintf($lang->select_all, (int)$threadcount);
$lang->all_selected = $lang->sprintf($lang->all_selected, (int)$threadcount);
eval("\$selectall = \"".$templates->get("forumdisplay_inlinemoderation_selectall")."\";");

}


}


if(!empty($tids))
{
$tids = implode(",", $tids);

if(!empty($tids))
{
$tids = implode(",", $tids);

}


}


// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && !empty($threadcache))
{

// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && !empty($threadcache))
{

Zeile 951Zeile 946
}

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

}

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

{

{

	$query = $db->simple_select("forumsread", "dateline", "fid='{$fid}' AND uid='{$mybb->user['uid']}'");
$forum_read = $db->fetch_field($query, "dateline");


	$query = $db->simple_select("forumsread", "dateline", "fid='{$fid}' AND uid='{$mybb->user['uid']}'");
$forum_read = $db->fetch_field($query, "dateline");


Zeile 1005Zeile 1000
		}

if($thread['sticky'] == 1)

		}

if($thread['sticky'] == 1)

		{

		{

			$thread_type_class = " forumdisplay_sticky";
}
else

			$thread_type_class = " forumdisplay_sticky";
}
else

Zeile 1042Zeile 1037
			if(!empty($threadprefix))
{
$thread['threadprefix'] = $threadprefix['displaystyle'].'&nbsp;';

			if(!empty($threadprefix))
{
$thread['threadprefix'] = $threadprefix['displaystyle'].'&nbsp;';

			}
}


			}
}


		$thread['subject'] = $parser->parse_badwords($thread['subject']);
$thread['subject'] = htmlspecialchars_uni($thread['subject']);

		$thread['subject'] = $parser->parse_badwords($thread['subject']);
$thread['subject'] = htmlspecialchars_uni($thread['subject']);





		if($thread['icon'] > 0 && $icon_cache[$thread['icon']])

		if($thread['icon'] > 0 && $icon_cache[$thread['icon']])

		{

		{

			$icon = $icon_cache[$thread['icon']];
$icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
$icon['path'] = htmlspecialchars_uni($icon['path']);

			$icon = $icon_cache[$thread['icon']];
$icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
$icon['path'] = htmlspecialchars_uni($icon['path']);

Zeile 1063Zeile 1058

$prefix = '';
if($thread['poll'])


$prefix = '';
if($thread['poll'])

		{

		{

			$prefix = $lang->poll_prefix;

			$prefix = $lang->poll_prefix;

		}

		}


if($thread['sticky'] == "1" && !isset($donestickysep))
{


if($thread['sticky'] == "1" && !isset($donestickysep))
{

Zeile 1074Zeile 1069
			$donestickysep = true;
}
else if($thread['sticky'] == 0 && !empty($shownormalsep))

			$donestickysep = true;
}
else if($thread['sticky'] == 0 && !empty($shownormalsep))

		{

		{

			eval("\$threads .= \"".$templates->get("forumdisplay_threads_sep")."\";");
$shownormalsep = false;
}

$rating = '';
if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0)

			eval("\$threads .= \"".$templates->get("forumdisplay_threads_sep")."\";");
$shownormalsep = false;
}

$rating = '';
if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0)

		{

		{

			if($moved[0] == "moved" || ($fpermissions['canviewdeletionnotice'] != 0 && $thread['visible'] == -1))
{
eval("\$rating = \"".$templates->get("forumdisplay_thread_rating_moved")."\";");

			if($moved[0] == "moved" || ($fpermissions['canviewdeletionnotice'] != 0 && $thread['visible'] == -1))
{
eval("\$rating = \"".$templates->get("forumdisplay_thread_rating_moved")."\";");

Zeile 1117Zeile 1112
			if(is_moderator($fid, "canviewunapprove") == true)
{
$thread['posts'] += $thread['unapprovedposts'];

			if(is_moderator($fid, "canviewunapprove") == true)
{
$thread['posts'] += $thread['unapprovedposts'];

			}

			}

		}
elseif($fpermissions['canviewdeletionnotice'] != 0)
{
$thread['posts'] += $thread['deletedposts'];
}

		}
elseif($fpermissions['canviewdeletionnotice'] != 0)
{
$thread['posts'] += $thread['deletedposts'];
}





		if($thread['posts'] > $mybb->settings['postsperpage'])
{
$thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage'];

		if($thread['posts'] > $mybb->settings['postsperpage'])
{
$thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage'];

Zeile 1134Zeile 1129
				$pagesstop = $mybb->settings['maxmultipagelinks'] - 1;
$page_link = get_thread_link($thread['tid'], $thread['pages']);
eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";");

				$pagesstop = $mybb->settings['maxmultipagelinks'] - 1;
$page_link = get_thread_link($thread['tid'], $thread['pages']);
eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";");

			}
else

			}
else

			{
$pagesstop = $thread['pages'];

			{
$pagesstop = $thread['pages'];

			}

			}


for($i = 1; $i <= $pagesstop; ++$i)
{


for($i = 1; $i <= $pagesstop; ++$i)
{

Zeile 1153Zeile 1148
			$threadpages = '';
$morelink = '';
$thread['multipage'] = '';

			$threadpages = '';
$morelink = '';
$thread['multipage'] = '';

		}

		}


if($ismod)
{


if($ismod)
{

Zeile 1161Zeile 1156
			{
$inlinecheck = "checked=\"checked\"";
++$inlinecount;

			{
$inlinecheck = "checked=\"checked\"";
++$inlinecount;

			}

			}

			else
{
$inlinecheck = '';

			else
{
$inlinecheck = '';

Zeile 1171Zeile 1166
			eval("\$modbit = \"".$templates->get("forumdisplay_thread_modbit")."\";");
}
else

			eval("\$modbit = \"".$templates->get("forumdisplay_thread_modbit")."\";");
}
else

		{

		{

			$modbit = '';

			$modbit = '';

		}

		}


if($moved[0] == "moved")
{


if($moved[0] == "moved")
{

Zeile 1182Zeile 1177
			$thread['replies'] = "-";
$thread['views'] = "-";
}

			$thread['replies'] = "-";
$thread['views'] = "-";
}





		$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");

// Determine the folder
$folder = '';
$folder_label = '';

		$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");

// Determine the folder
$folder = '';
$folder_label = '';





		if(isset($thread['doticon']))

		if(isset($thread['doticon']))

		{

		{

			$folder = "dot_";
$folder_label .= $lang->icon_dot;
}

			$folder = "dot_";
$folder_label .= $lang->icon_dot;
}





		$gotounread = '';
$isnew = 0;
$donenew = 0;

		$gotounread = '';
$isnew = 0;
$donenew = 0;

Zeile 1203Zeile 1198
		if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forum_read)
{
if(!empty($thread['lastread']))

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

			{

			{

				$last_read = $thread['lastread'];

				$last_read = $thread['lastread'];

			}
else
{

			}
else
{

				$last_read = $read_cutoff;
}
}

				$last_read = $read_cutoff;
}
}

Zeile 1243Zeile 1238
		}

if($thread['closed'] == 1)

		}

if($thread['closed'] == 1)

		{

		{

			$folder .= "close";
$folder_label .= $lang->icon_close;

			$folder .= "close";
$folder_label .= $lang->icon_close;

		}

		}


if($moved[0] == "moved")
{


if($moved[0] == "moved")
{

Zeile 1255Zeile 1250
		}

$folder .= "folder";

		}

$folder .= "folder";





		$inline_edit_tid = $thread['tid'];

// If this user is the author of the thread and it is not closed or they are a moderator, they can edit
$inline_edit_class = '';
if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $can_edit_titles == 1) || $ismod == true)

		$inline_edit_tid = $thread['tid'];

// If this user is the author of the thread and it is not closed or they are a moderator, they can edit
$inline_edit_class = '';
if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $can_edit_titles == 1) || $ismod == true)

		{

		{

			$inline_edit_class = "subject_editable";

			$inline_edit_class = "subject_editable";

		}


		}



$lastposteruid = $thread['lastposteruid'];
if(!$lastposteruid && !$thread['lastposter'])


$lastposteruid = $thread['lastposteruid'];
if(!$lastposteruid && !$thread['lastposter'])

		{

		{

			$lastposter = htmlspecialchars_uni($lang->guest);

			$lastposter = htmlspecialchars_uni($lang->guest);

		}

		}

		else
{
$lastposter = htmlspecialchars_uni($thread['lastposter']);

		else
{
$lastposter = htmlspecialchars_uni($thread['lastposter']);

Zeile 1279Zeile 1274

// Don't link to guest's profiles (they have no profile).
if($lastposteruid == 0)


// Don't link to guest's profiles (they have no profile).
if($lastposteruid == 0)

		{

		{

			$lastposterlink = $lastposter;

			$lastposterlink = $lastposter;

		}

		}

		else

		else

		{

		{

			$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}


			$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}


Zeile 1296Zeile 1291
			if($thread['unapprovedposts'] > 1)
{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_posts_count, $thread['unapprovedposts']);

			if($thread['unapprovedposts'] > 1)
{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_posts_count, $thread['unapprovedposts']);

			}
else

			}
else

			{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_post_count, 1);
}

			{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_post_count, 1);
}

Zeile 1334Zeile 1329
		if($fpermissions['canviewdeletionnotice'] != 0 && $thread['visible'] == -1 && !is_moderator($fid, "canviewdeleted"))
{
eval("\$threads .= \"".$templates->get("forumdisplay_thread_deleted")."\";");

		if($fpermissions['canviewdeletionnotice'] != 0 && $thread['visible'] == -1 && !is_moderator($fid, "canviewdeleted"))
{
eval("\$threads .= \"".$templates->get("forumdisplay_thread_deleted")."\";");

		}

		}

		else
{
eval("\$threads .= \"".$templates->get("forumdisplay_thread")."\";");

		else
{
eval("\$threads .= \"".$templates->get("forumdisplay_thread")."\";");

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

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

					break;

					break;

			}


			}


			while($tool = $db->fetch_array($query))
{
$tool['name'] = htmlspecialchars_uni($tool['name']);
eval("\$customthreadtools .= \"".$templates->get("forumdisplay_inlinemoderation_custom_tool")."\";");

			while($tool = $db->fetch_array($query))
{
$tool['name'] = htmlspecialchars_uni($tool['name']);
eval("\$customthreadtools .= \"".$templates->get("forumdisplay_inlinemoderation_custom_tool")."\";");

			}

			}


if($customthreadtools)
{
eval("\$customthreadtools = \"".$templates->get("forumdisplay_inlinemoderation_custom")."\";");
}
}


if($customthreadtools)
{
eval("\$customthreadtools = \"".$templates->get("forumdisplay_inlinemoderation_custom")."\";");
}
}





		$inlinemodopenclose = $inlinemodstickunstick = $inlinemodsoftdelete = $inlinemodrestore = $inlinemoddelete = $inlinemodmanage = $inlinemodapproveunapprove = '';

if(is_moderator($fid, "canopenclosethreads"))
{
eval("\$inlinemodopenclose = \"".$templates->get("forumdisplay_inlinemoderation_openclose")."\";");

		$inlinemodopenclose = $inlinemodstickunstick = $inlinemodsoftdelete = $inlinemodrestore = $inlinemoddelete = $inlinemodmanage = $inlinemodapproveunapprove = '';

if(is_moderator($fid, "canopenclosethreads"))
{
eval("\$inlinemodopenclose = \"".$templates->get("forumdisplay_inlinemoderation_openclose")."\";");

		}

		}


if(is_moderator($fid, "canstickunstickthreads"))


if(is_moderator($fid, "canstickunstickthreads"))

		{

		{

			eval("\$inlinemodstickunstick = \"".$templates->get("forumdisplay_inlinemoderation_stickunstick")."\";");

			eval("\$inlinemodstickunstick = \"".$templates->get("forumdisplay_inlinemoderation_stickunstick")."\";");

		}

		}


if(is_moderator($fid, "cansoftdeletethreads"))
{


if(is_moderator($fid, "cansoftdeletethreads"))
{

Zeile 1407Zeile 1402
		}

if(is_moderator($fid, "candeletethreads"))

		}

if(is_moderator($fid, "candeletethreads"))

		{

		{

			eval("\$inlinemoddelete = \"".$templates->get("forumdisplay_inlinemoderation_delete")."\";");

			eval("\$inlinemoddelete = \"".$templates->get("forumdisplay_inlinemoderation_delete")."\";");

		}

		}


if(is_moderator($fid, "canmanagethreads"))
{
eval("\$inlinemodmanage = \"".$templates->get("forumdisplay_inlinemoderation_manage")."\";");


if(is_moderator($fid, "canmanagethreads"))
{
eval("\$inlinemodmanage = \"".$templates->get("forumdisplay_inlinemoderation_manage")."\";");

		}


		}


		if(is_moderator($fid, "canapproveunapprovethreads"))

		if(is_moderator($fid, "canapproveunapprovethreads"))

		{

		{

			eval("\$inlinemodapproveunapprove = \"".$templates->get("forumdisplay_inlinemoderation_approveunapprove")."\";");

			eval("\$inlinemodapproveunapprove = \"".$templates->get("forumdisplay_inlinemoderation_approveunapprove")."\";");

		}

		}


if(!empty($inlinemodopenclose) || !empty($inlinemodstickunstick) || !empty($inlinemodsoftdelete) || !empty($inlinemodrestore) || !empty($inlinemoddelete) || !empty($inlinemodmanage) || !empty($inlinemodapproveunapprove))
{
eval("\$standardthreadtools = \"".$templates->get("forumdisplay_inlinemoderation_standard")."\";");


if(!empty($inlinemodopenclose) || !empty($inlinemodstickunstick) || !empty($inlinemodsoftdelete) || !empty($inlinemodrestore) || !empty($inlinemoddelete) || !empty($inlinemodmanage) || !empty($inlinemodapproveunapprove))
{
eval("\$standardthreadtools = \"".$templates->get("forumdisplay_inlinemoderation_standard")."\";");

		}


		}


		// Only show inline mod menu if there's options to show
if(!empty($standardthreadtools) || !empty($customthreadtools))
{

		// Only show inline mod menu if there's options to show
if(!empty($standardthreadtools) || !empty($customthreadtools))
{

Zeile 1446Zeile 1441
// Subscription status
$add_remove_subscription = 'add';
$add_remove_subscription_text = $lang->subscribe_forum;

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

 
$addremovesubscription = '';


if($mybb->user['uid'])
{


if($mybb->user['uid'])
{

Zeile 1456Zeile 1452
		$add_remove_subscription = 'remove';
$add_remove_subscription_text = $lang->unsubscribe_forum;
}

		$add_remove_subscription = 'remove';
$add_remove_subscription_text = $lang->unsubscribe_forum;
}

 

eval("\$addremovesubscription = \"".$templates->get("forumdisplay_threadlist_subscription")."\";");

}

$inline_edit_js = $clearstoredpass = '';

}

$inline_edit_js = $clearstoredpass = '';

Zeile 1480Zeile 1478
	}

$prefixselect = build_forum_prefix_select($fid, $tprefix);

	}

$prefixselect = build_forum_prefix_select($fid, $tprefix);

 

$plugins->run_hooks("forumdisplay_threadlist");


$lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));
eval("\$rssdiscovery = \"".$templates->get("forumdisplay_rssdiscovery")."\";");


$lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));
eval("\$rssdiscovery = \"".$templates->get("forumdisplay_rssdiscovery")."\";");