Vergleich forumdisplay.php - 1.6.5 - 1.6.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: forumdisplay.php 5627 2011-10-06 07:52:01Z Tomm $

 * $Id$

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 84Zeile 84
if($mybb->user['uid'] == 0)
{
// Cookie'd forum read time

if($mybb->user['uid'] == 0)
{
// Cookie'd forum read time

	$forumsread = unserialize($mybb->cookies['mybb']['forumread']);

if(!is_array($forumsread))

	$forumsread = my_unserialize($mybb->cookies['mybb']['forumread']);

if(is_array($forumsread) && empty($forumsread))

 	{
if($mybb->cookies['mybb']['readallforums'])
{

 	{
if($mybb->cookies['mybb']['readallforums'])
{

Zeile 120Zeile 120
	}

$fcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;

	}

$fcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;

}

}


// Get the forum moderators if the setting is enabled.
if($mybb->settings['modlist'] != 0)


// Get the forum moderators if the setting is enabled.
if($mybb->settings['modlist'] != 0)

{

{

	$moderatorcache = $cache->read("moderators");

	$moderatorcache = $cache->read("moderators");

}

}


$bgcolor = "trow1";
if($mybb->settings['subforumsindex'] != 0)


$bgcolor = "trow1";
if($mybb->settings['subforumsindex'] != 0)

{

{

	$showdepth = 3;
}
else
{
$showdepth = 2;

	$showdepth = 3;
}
else
{
$showdepth = 2;

}

}

$child_forums = build_forumbits($fid, 2);
$forums = $child_forums['forum_list'];
if($forums)

$child_forums = build_forumbits($fid, 2);
$forums = $child_forums['forum_list'];
if($forums)

Zeile 170Zeile 170
if($fpermissions['cansearch'] != 0 && $foruminfo['type'] == "f")
{
eval("\$searchforum = \"".$templates->get("forumdisplay_searchforum")."\";");

if($fpermissions['cansearch'] != 0 && $foruminfo['type'] == "f")
{
eval("\$searchforum = \"".$templates->get("forumdisplay_searchforum")."\";");

}





















}

// Gather forum stats
$has_announcements = $has_modtools = false;
$forum_stats = $cache->read("forumsdisplay");

if(is_array($forum_stats))
{
if($forum_stats[-1]['modtools'] || $forum_stats[$fid]['modtools'])
{
// Mod tools are specific to forums, not parents
$has_modtools = true;
}

if($forum_stats[-1]['announcements'] || $forum_stats[$fid]['announcements'])
{
// Global or forum-specific announcements
$has_announcements = true;
}
}


$done_moderators = array(
"users" => array(),
"groups" => array()
);

$done_moderators = array(
"users" => array(),
"groups" => array()
);

 


$moderators = '';
$parentlistexploded = explode(",", $parentlist);

$moderators = '';
$parentlistexploded = explode(",", $parentlist);

 


foreach($parentlistexploded as $mfid)
{
// This forum has moderators

foreach($parentlistexploded as $mfid)
{
// This forum has moderators

Zeile 209Zeile 230
				$comma = $lang->comma;
}
}

				$comma = $lang->comma;
}
}

 
	}

if($forum_stats[$mfid]['announcements'])
{
$has_announcements = true;

	}
}
$comma = '';

	}
}
$comma = '';

Zeile 217Zeile 243
if($moderators)
{
eval("\$moderatedby = \"".$templates->get("forumdisplay_moderatedby")."\";");

if($moderators)
{
eval("\$moderatedby = \"".$templates->get("forumdisplay_moderatedby")."\";");

}
else
{

}
else
{

	$moderatedby = '';
}


	$moderatedby = '';
}


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

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

				{

				{

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

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

Zeile 303Zeile 329
	if(!$foruminfo['rulestitle'])
{
$foruminfo['rulestitle'] = $lang->sprintf($lang->forum_rules, $foruminfo['name']);

	if(!$foruminfo['rulestitle'])
{
$foruminfo['rulestitle'] = $lang->sprintf($lang->forum_rules, $foruminfo['name']);

	}

	}

	
$rules_parser = array(
"allow_html" => 1,

	
$rules_parser = array(
"allow_html" => 1,

Zeile 313Zeile 339
	);

$foruminfo['rules'] = $parser->parse_message($foruminfo['rules'], $rules_parser);

	);

$foruminfo['rules'] = $parser->parse_message($foruminfo['rules'], $rules_parser);

	if($foruminfo['rulestype'] == 1)

	if($foruminfo['rulestype'] == 1 || $foruminfo['rulestype'] == 3)

	{
eval("\$rules = \"".$templates->get("forumdisplay_rules")."\";");
}

	{
eval("\$rules = \"".$templates->get("forumdisplay_rules")."\";");
}

Zeile 352Zeile 378
else
{
$can_edit_titles = 0;

else
{
$can_edit_titles = 0;

}


}


unset($rating);

// Pick out some sorting options.

unset($rating);

// Pick out some sorting options.

Zeile 486Zeile 512
{
$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 posts are there?
if($datecut > 0 || $fpermissions['canonlyviewownthreads'] == 1)


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

// How many posts are there?
if($datecut > 0 || $fpermissions['canonlyviewownthreads'] == 1)

	{

	{

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

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

Zeile 503Zeile 529
		$forum_threads = $db->fetch_array($query);
$threadcount = $forum_threads['threads'];
if($ismod == true)

		$forum_threads = $db->fetch_array($query);
$threadcount = $forum_threads['threads'];
if($ismod == true)

		{

		{

			$threadcount += $forum_threads['unapprovedthreads'];
}


			$threadcount += $forum_threads['unapprovedthreads'];
}


Zeile 520Zeile 546
if(!$mybb->settings['threadsperpage'])
{
$mybb->settings['threadsperpage'] = 20;

if(!$mybb->settings['threadsperpage'])
{
$mybb->settings['threadsperpage'] = 20;

}


}


$perpage = $mybb->settings['threadsperpage'];

if(intval($mybb->input['page']) > 0)

$perpage = $mybb->settings['threadsperpage'];

if(intval($mybb->input['page']) > 0)

Zeile 534Zeile 560
	{
$start = 0;
$page = 1;

	{
$start = 0;
$page = 1;

	}
}
else

	}
}
else

{
$start = 0;
$page = 1;

{
$start = 0;
$page = 1;

Zeile 570Zeile 596
	if($sortby != "lastpost")
{
$page_url .= "{$q}{$and}sortby={$sortby}";

	if($sortby != "lastpost")
{
$page_url .= "{$q}{$and}sortby={$sortby}";

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


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


	if($sortordernow != "desc")

	if($sortordernow != "desc")

	{

	{

		$page_url .= "{$q}{$and}order={$sortordernow}";
$q = '';
$and = "&";

		$page_url .= "{$q}{$and}order={$sortordernow}";
$q = '';
$and = "&";

Zeile 584Zeile 610
	if($datecut > 0)
{
$page_url .= "{$q}{$and}datecut={$datecut}";

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

	}
}
else

	}
}
else

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


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


if($foruminfo['allowtratings'] != 0 && $fpermissions['canviewthreads'] != 0)

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

{
$lang->load("ratethread");


{
$lang->load("ratethread");


Zeile 620Zeile 646
	$ratingadd = '';
$lpbackground = "trow1";
$colspan = "6";

	$ratingadd = '';
$lpbackground = "trow1";
$colspan = "6";

}


}


if($ismod)

if($ismod)

{

{

	++$colspan;
}

	++$colspan;
}





// Get Announcements

// Get Announcements

$forum_stats = $cache->read("forumsdisplay");

if(!is_array($forum_stats))
{
$forum_stats = $cache->read("forumdisplay", true);

if(is_array($forum_stats) && ($forum_stats[-1]['announcements'] || $forum_stats[$fid]['announcements']))






















if($has_announcements == true)
{
$limit = '';
$announcements = '';
if($mybb->settings['announcementlimit'])
{
$limit = "LIMIT 0, ".$mybb->settings['announcementlimit'];
}

$sql = build_parent_list($fid, "fid", "OR", $parentlist);
$time = TIME_NOW;
$query = $db->query("
SELECT a.*, u.username
FROM ".TABLE_PREFIX."announcements a
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']))
{
$cookie = my_unserialize(stripslashes($mybb->cookies['mybb']['announcements']));
}

$bgcolor = alt_trow(true); // Reset the trow colors
while($announcement = $db->fetch_array($query))

	{

	{

		$limit = '';
$announcements = '';
if($mybb->settings['announcementlimit'])
{
$limit = "LIMIT 0, ".$mybb->settings['announcementlimit'];
}

$sql = build_parent_list($fid, "fid", "OR", $parentlist);
$time = TIME_NOW;
$query = $db->query("
SELECT a.*, u.username
FROM ".TABLE_PREFIX."announcements a
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']))
{
$cookie = unserialize(stripslashes($mybb->cookies['mybb']['announcements']));
}

$bgcolor = alt_trow(true); // Reset the trow colors
while($announcement = $db->fetch_array($query))
{
if($announcement['startdate'] > $mybb->user['lastvisit'] && !$cookie[$announcement['aid']])
{
$new_class = ' class="subject_new"';
$folder = "newfolder";
}
else
{
$new_class = ' class="subject_old"';
$folder = "folder";
}

// Mmm, eat those announcement cookies if they're older than our last visit
if($cookie[$announcement['aid']] < $mybb->user['lastvisit'])
{
unset($cookie[$announcement['aid']]);
}

$announcement['announcementlink'] = get_announcement_link($announcement['aid']);
$announcement['subject'] = $parser->parse_badwords($announcement['subject']);
$announcement['subject'] = htmlspecialchars_uni($announcement['subject']);
$postdate = my_date($mybb->settings['dateformat'], $announcement['startdate']);
$posttime = my_date($mybb->settings['timeformat'], $announcement['startdate']);
$announcement['profilelink'] = build_profile_link($announcement['username'], $announcement['uid']);

if($foruminfo['allowtratings'] != 0 && $fpermissions['canviewthreads'] != 0)
{
eval("\$rating = \"".$templates->get("forumdisplay_announcement_rating")."\";");
$lpbackground = "trow2";
}
else
{
$rating = '';
$lpbackground = "trow1";
}

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

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

if($announcements)
{
eval("\$announcementlist = \"".$templates->get("forumdisplay_announcements")."\";");
$shownormalsep = true;
}

if(empty($cookie))
{
// Clean up cookie crumbs
my_setcookie('mybb[announcements]', 0, (TIME_NOW - (60*60*24*365)));
}
else if(!empty($cookie))
{
my_setcookie("mybb[announcements]", addslashes(serialize($cookie)), -1);
}

		if($announcement['startdate'] > $mybb->user['lastvisit'] && !$cookie[$announcement['aid']])
{
$new_class = ' class="subject_new"';
$folder = "newfolder";
}
else
{
$new_class = ' class="subject_old"';
$folder = "folder";
}

// Mmm, eat those announcement cookies if they're older than our last visit
if($cookie[$announcement['aid']] < $mybb->user['lastvisit'])
{
unset($cookie[$announcement['aid']]);
}

$announcement['announcementlink'] = get_announcement_link($announcement['aid']);
$announcement['subject'] = $parser->parse_badwords($announcement['subject']);
$announcement['subject'] = htmlspecialchars_uni($announcement['subject']);
$postdate = my_date($mybb->settings['dateformat'], $announcement['startdate']);
$posttime = my_date($mybb->settings['timeformat'], $announcement['startdate']);
$announcement['profilelink'] = build_profile_link($announcement['username'], $announcement['uid']);

if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $fpermissions['canviewthreads'] != 0)
{
eval("\$rating = \"".$templates->get("forumdisplay_announcement_rating")."\";");
$lpbackground = "trow2";
}
else
{
$rating = '';
$lpbackground = "trow1";
}

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

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

if($announcements)
{
eval("\$announcementlist = \"".$templates->get("forumdisplay_announcements")."\";");
$shownormalsep = true;
}

if(empty($cookie))
{
// Clean up cookie crumbs
my_setcookie('mybb[announcements]', 0, (TIME_NOW - (60*60*24*365)));
}
else if(!empty($cookie))
{
my_setcookie("mybb[announcements]", addslashes(serialize($cookie)), -1);





























	}
}


	}
}


Zeile 756Zeile 775

// If this is a moved thread - set the tid for participation marking and thread read marking to that of the moved thread
if(substr($thread['closed'], 0, 5) == "moved")


// If this is a moved thread - set the tid for participation marking and thread read marking to that of the moved thread
if(substr($thread['closed'], 0, 5) == "moved")

		{

		{

			$tid = substr($thread['closed'], 6);
if(!$tids[$tid])

			$tid = substr($thread['closed'], 6);
if(!$tids[$tid])

			{

			{

				$moved_threads[$tid] = $thread['tid'];
$tids[$thread['tid']] = $tid;

				$moved_threads[$tid] = $thread['tid'];
$tids[$thread['tid']] = $tid;

			}
}

			}
}

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

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

Zeile 772Zeile 791
			{
unset($moved_threads[$tid]);
}

			{
unset($moved_threads[$tid]);
}

		}
}

		}
}





	if($foruminfo['allowtratings'] != 0 && $mybb->user['uid'] && $tids && $ratings == true)

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

	{
// Check if we've rated threads on this page
// Guests get the pleasure of not being ID'd, but will be checked when they try and rate

	{
// Check if we've rated threads on this page
// Guests get the pleasure of not being ID'd, but will be checked when they try and rate

Zeile 789Zeile 808
	}
}
else

	}
}
else

{

{

	$threadcache = $tids = null;

	$threadcache = $tids = null;

}

}


// If user has moderation tools available, prepare the Select All feature
$num_results = $db->num_rows($query);


// If user has moderation tools available, prepare the Select All feature
$num_results = $db->num_rows($query);

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

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

}

}


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


if($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'] && $threadcache)
{

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

Zeile 815Zeile 834
	while($post = $db->fetch_array($query))
{
if($moved_threads[$post['tid']])

	while($post = $db->fetch_array($query))
{
if($moved_threads[$post['tid']])

		{

		{

			$post['tid'] = $moved_threads[$post['tid']];

			$post['tid'] = $moved_threads[$post['tid']];

		}

		}

		if($threadcache[$post['tid']])
{
$threadcache[$post['tid']]['doticon'] = 1;

		if($threadcache[$post['tid']])
{
$threadcache[$post['tid']]['doticon'] = 1;

		}
}
}


		}
}
}


// Read threads
if($mybb->user['uid'] && $mybb->settings['threadreadcut'] > 0 && $threadcache)
{

// Read threads
if($mybb->user['uid'] && $mybb->settings['threadreadcut'] > 0 && $threadcache)
{

Zeile 838Zeile 857
		if($threadcache[$readthread['tid']])
{
$threadcache[$readthread['tid']]['lastread'] = $readthread['dateline'];

		if($threadcache[$readthread['tid']])
{
$threadcache[$readthread['tid']]['lastread'] = $readthread['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 868Zeile 887
$load_inline_edit_js = 0;
if(is_array($threadcache))
{

$load_inline_edit_js = 0;
if(is_array($threadcache))
{

 
	if(!$mybb->settings['maxmultipagelinks'])
{
$mybb->settings['maxmultipagelinks'] = 5;
}

if(!$mybb->settings['postsperpage'])
{
$mybb->settings['postperpage'] = 20;
}


	foreach($threadcache as $thread)
{
$plugins->run_hooks("forumdisplay_thread");

	foreach($threadcache as $thread)
{
$plugins->run_hooks("forumdisplay_thread");

Zeile 890Zeile 919
		else
{
$thread_type_class = " forumdisplay_regular";

		else
{
$thread_type_class = " forumdisplay_regular";

		}


		}


		$folder = '';
$prefix = '';


		$folder = '';
$prefix = '';


Zeile 940Zeile 969
			$donestickysep = true;
}
else if($thread['sticky'] == 0 && $shownormalsep)

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

		{

		{

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

$rating = '';

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

$rating = '';

		if($foruminfo['allowtratings'] != 0)

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

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

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

Zeile 974Zeile 1003
		$threadpages = '';
$morelink = '';
$thread['posts'] = $thread['replies'] + 1;

		$threadpages = '';
$morelink = '';
$thread['posts'] = $thread['replies'] + 1;


if(!$mybb->settings['postsperpage'])
{
$mybb->settings['postperpage'] = 20;
}

 

if($thread['unapprovedposts'] > 0 && $ismod)
{


if($thread['unapprovedposts'] > 0 && $ismod)
{

Zeile 990Zeile 1014
			$thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage'];
$thread['pages'] = ceil($thread['pages']);


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


			if($thread['pages'] > 5)

			if($thread['pages'] > $mybb->settings['maxmultipagelinks'])

			{

			{

				$pagesstop = 4;

				$pagesstop = $mybb->settings['maxmultipagelinks'] - 1;

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

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

Zeile 1008Zeile 1032
			}

eval("\$thread['multipage'] = \"".$templates->get("forumdisplay_thread_multipage")."\";");

			}

eval("\$thread['multipage'] = \"".$templates->get("forumdisplay_thread_multipage")."\";");

		}

		}

		else
{
$threadpages = '';

		else
{
$threadpages = '';

Zeile 1022Zeile 1046
			{
$inlinecheck = "checked=\"checked\"";
++$inlinecount;

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

			}
else
{

			}
else
{

				$inlinecheck = '';
}


				$inlinecheck = '';
}


Zeile 1070Zeile 1094
			else
{
$last_read = $read_cutoff;

			else
{
$last_read = $read_cutoff;

			}
}
else
{
$last_read = my_get_array_cookie("threadread", $thread['tid']);
}

if($forum_read > $last_read)
{

			}
}
else
{
$last_read = my_get_array_cookie("threadread", $thread['tid']);
}

if($forum_read > $last_read)
{

			$last_read = $forum_read;
}

if($thread['lastpost'] > $last_read && $moved[0] != "moved")

			$last_read = $forum_read;
}

if($thread['lastpost'] > $last_read && $moved[0] != "moved")

		{

		{

			$folder .= "new";
$folder_label .= $lang->icon_new;
$new_class = "subject_new";

			$folder .= "new";
$folder_label .= $lang->icon_new;
$new_class = "subject_new";

Zeile 1095Zeile 1119
		{
$folder_label .= $lang->icon_no_new;
$new_class = "subject_old";

		{
$folder_label .= $lang->icon_no_new;
$new_class = "subject_old";

		}

		}


if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
{


if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
{

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

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

		}


		}


		$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);

		$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);





		// Threads and posts requiring moderation
if($thread['unapprovedposts'] > 0 && $ismod)
{

		// Threads and posts requiring moderation
if($thread['unapprovedposts'] > 0 && $ismod)
{

Zeile 1161Zeile 1185
			}

$unapproved_posts = " <span title=\"{$unapproved_posts_count}\">(".my_number_format($thread['unapprovedposts']).")</span>";

			}

$unapproved_posts = " <span title=\"{$unapproved_posts_count}\">(".my_number_format($thread['unapprovedposts']).")</span>";

		}

		}

		else

		else

		{

		{

			$unapproved_posts = '';
}


			$unapproved_posts = '';
}


Zeile 1171Zeile 1195
		if($thread['attachmentcount'] > 0)
{
if($thread['attachmentcount'] > 1)

		if($thread['attachmentcount'] > 0)
{
if($thread['attachmentcount'] > 1)

			{

			{

				$attachment_count = $lang->sprintf($lang->attachment_count_multiple, $thread['attachmentcount']);
}
else
{
$attachment_count = $lang->attachment_count;

				$attachment_count = $lang->sprintf($lang->attachment_count_multiple, $thread['attachmentcount']);
}
else
{
$attachment_count = $lang->attachment_count;

			}

			}


eval("\$attachment_count = \"".$templates->get("forumdisplay_thread_attachment_count")."\";");


eval("\$attachment_count = \"".$templates->get("forumdisplay_thread_attachment_count")."\";");

		}

		}

		else

		else

		{

		{

			$attachment_count = '';
}


			$attachment_count = '';
}


Zeile 1192Zeile 1216
	$customthreadtools = '';
if($ismod)
{

	$customthreadtools = '';
if($ismod)
{

		if($forum_stats[-1]['modtools'] || $forum_stats[$fid]['modtools'])

		if(is_moderator($fid, "canusecustomtools") && $has_modtools == true)

		{
switch($db->type)

		{
switch($db->type)

			{

			{

				case "pgsql":
case "sqlite":
$query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
break;
default:
$query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'");

				case "pgsql":
case "sqlite":
$query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
break;
default:
$query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'");

			}


			}


			while($tool = $db->fetch_array($query))

			while($tool = $db->fetch_array($query))

			{

			{

				eval("\$customthreadtools .= \"".$templates->get("forumdisplay_inlinemoderation_custom_tool")."\";");

				eval("\$customthreadtools .= \"".$templates->get("forumdisplay_inlinemoderation_custom_tool")."\";");

 
			}

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

			}
}

			}
}

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






		eval("\$inlinemod = \"".$templates->get("forumdisplay_inlinemoderation")."\";");
}
}

		eval("\$inlinemod = \"".$templates->get("forumdisplay_inlinemoderation")."\";");
}
}