Vergleich forumdisplay.php - 1.8.22 - 1.8.30

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

$subforums = '';
$child_forums = build_forumbits($fid, 2);


$subforums = '';
$child_forums = build_forumbits($fid, 2);

$forums = $child_forums['forum_list'];

 




if($forums)

if(!empty($child_forums) && !empty($child_forums['forum_list']))

{

{

 
	$forums = $child_forums['forum_list'];

	$lang->sub_forums_in = $lang->sprintf($lang->sub_forums_in, $foruminfo['name']);
eval("\$subforums = \"".$templates->get("forumdisplay_subforums")."\";");
}

	$lang->sub_forums_in = $lang->sprintf($lang->sub_forums_in, $foruminfo['name']);
eval("\$subforums = \"".$templates->get("forumdisplay_subforums")."\";");
}

Zeile 177Zeile 177
	$forumjump = build_forum_jump("", $fid, 1);
}


	$forumjump = build_forum_jump("", $fid, 1);
}


 
$newthread = '';

if($foruminfo['type'] == "f" && $foruminfo['open'] != 0 && $fpermissions['canpostthreads'] != 0 && $mybb->user['suspendposting'] == 0)
{
eval("\$newthread = \"".$templates->get("forumdisplay_newthread")."\";");
}


if($foruminfo['type'] == "f" && $foruminfo['open'] != 0 && $fpermissions['canpostthreads'] != 0 && $mybb->user['suspendposting'] == 0)
{
eval("\$newthread = \"".$templates->get("forumdisplay_newthread")."\";");
}


 
$searchforum = '';

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")."\";");

Zeile 213Zeile 215

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


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

 
$comma = '';


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


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

	if(is_array($moderatorcache[$mfid]))

	if(isset($moderatorcache[$mfid]) && is_array($moderatorcache[$mfid]))

	{
// Fetch each moderator from the cache and format it, appending it to the list
foreach($moderatorcache[$mfid] as $modtype)

	{
// Fetch each moderator from the cache and format it, appending it to the list
foreach($moderatorcache[$mfid] as $modtype)

Zeile 302Zeile 305
		{
$doneusers[$user['uid']] = $user['time'];
++$membercount;

		{
$doneusers[$user['uid']] = $user['time'];
++$membercount;

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

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

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

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

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

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

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
































	if ($useronly === "" && $datecutsql === "" && $prefixsql === "")
{
$threadcount = 0;

$query = $db->simple_select("forums", "threads, unapprovedthreads, deletedthreads", "fid=".(int)$fid);
$forum_threads = $db->fetch_array($query);

if(in_array(1, $visible_states))
{
$threadcount += $forum_threads['threads'];
}

if(in_array(-1, $visible_states))
{
$threadcount += $forum_threads['deletedthreads'];
}

if(in_array(0, $visible_states))
{
$threadcount += $forum_threads['unapprovedthreads'];
}
elseif($mybb->user['uid'] && $mybb->settings['showownunapproved'])
{
$query = $db->simple_select("threads t", "COUNT(tid) AS threads", "fid = '$fid' AND t.visible=0 AND t.uid=".(int)$mybb->user['uid']);
$threadcount += $db->fetch_field($query, "threads");
}
}
else
{
$query = $db->simple_select("threads t", "COUNT(tid) AS threads", "fid = '$fid' $tuseronly $tvisibleonly $datecutsql2 $prefixsql2");

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

}

// How many pages are there?

}

// How many pages are there?

Zeile 629Zeile 663
	{
$start = 0;
$page = 1;

	{
$start = 0;
$page = 1;

	}

	}

}
else
{

}
else
{

Zeile 657Zeile 691
		$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 686Zeile 720
	if($tprefix != 0)
{
$page_url .= "{$q}{$and}prefix={$tprefix}";

	if($tprefix != 0)
{
$page_url .= "{$q}{$and}prefix={$tprefix}";

	}
}
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);


 
$ratingcol = $ratingsort = '';

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 881Zeile 916
			}
}
}

			}
}
}

 

$args = array(
'threadcache' => &$threadcache,
'tids' => &$tids
);

$plugins->run_hooks("forumdisplay_before_thread", $args);


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 890Zeile 932
		$query = $db->simple_select("threadratings", "tid, uid", "tid IN ({$imp}) AND uid = '{$mybb->user['uid']}'");

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

		$query = $db->simple_select("threadratings", "tid, uid", "tid IN ({$imp}) AND uid = '{$mybb->user['uid']}'");

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

		{

		{

			$threadcache[$rating['tid']]['rated'] = 1;
}
}

			$threadcache[$rating['tid']]['rated'] = 1;
}
}

Zeile 947Zeile 989

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


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

 
	$forum_read = 0;

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

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

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




	if($db->num_rows($query) > 0)
{
$forum_read = $db->fetch_field($query, "dateline");
}


$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($forum_read == 0 || $forum_read < $read_cutoff)


$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($forum_read == 0 || $forum_read < $read_cutoff)

Zeile 1319Zeile 1365

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


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

		else
{
$attachment_count = '';
}


		else
{
$attachment_count = '';
}


		$plugins->run_hooks("forumdisplay_thread_end");

if($fpermissions['canviewdeletionnotice'] != 0 && $thread['visible'] == -1 && !is_moderator($fid, "canviewdeleted"))

		$plugins->run_hooks("forumdisplay_thread_end");

if($fpermissions['canviewdeletionnotice'] != 0 && $thread['visible'] == -1 && !is_moderator($fid, "canviewdeleted"))

Zeile 1332Zeile 1378
		}
else
{

		}
else
{

 
			$thread['start_datetime'] = my_date('relative', $thread['dateline']);

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

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

Zeile 1340Zeile 1387
	if($ismod)
{
if(is_moderator($fid, "canusecustomtools") && $has_modtools == true)

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

		{

		{

			$gids = explode(',', $mybb->user['additionalgroups']);
$gids[] = $mybb->user['usergroup'];
$gids = array_filter(array_unique($gids));

			$gids = explode(',', $mybb->user['additionalgroups']);
$gids[] = $mybb->user['usergroup'];
$gids = array_filter(array_unique($gids));

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

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

		}

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

		}

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


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


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

		{

		{

			eval("\$inlinemodopenclose = \"".$templates->get("forumdisplay_inlinemoderation_openclose")."\";");

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

		{

		{

			eval("\$inlinemodsoftdelete = \"".$templates->get("forumdisplay_inlinemoderation_softdelete")."\";");
}

if(is_moderator($fid, "canrestorethreads"))
{
eval("\$inlinemodrestore = \"".$templates->get("forumdisplay_inlinemoderation_restore")."\";");

			eval("\$inlinemodsoftdelete = \"".$templates->get("forumdisplay_inlinemoderation_softdelete")."\";");
}

if(is_moderator($fid, "canrestorethreads"))
{
eval("\$inlinemodrestore = \"".$templates->get("forumdisplay_inlinemoderation_restore")."\";");

		}

		}


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


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

		{

		{

			eval("\$inlinemodmanage = \"".$templates->get("forumdisplay_inlinemoderation_manage")."\";");

			eval("\$inlinemodmanage = \"".$templates->get("forumdisplay_inlinemoderation_manage")."\";");

		}

		}


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


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

		{

		{

			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")."\";");

			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")."\";");

		}

		}


// 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 1447Zeile 1494
{
$query = $db->simple_select("forumsubscriptions", "fid", "fid='".$fid."' AND uid='{$mybb->user['uid']}'", array('limit' => 1));


{
$query = $db->simple_select("forumsubscriptions", "fid", "fid='".$fid."' AND uid='{$mybb->user['uid']}'", array('limit' => 1));


	if($db->fetch_field($query, 'fid'))

	if($db->num_rows($query) > 0)

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

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

Zeile 1479Zeile 1526

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



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


 
	// Populate Forumsort
$forumsort = '';

if($threadcount > 0)
{
eval("\$forumsort = \"".$templates->get("forumdisplay_forumsort")."\";");
}


	$plugins->run_hooks("forumdisplay_threadlist");

$lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));

	$plugins->run_hooks("forumdisplay_threadlist");

$lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));