Vergleich forumdisplay.php - 1.8.25 - 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 249Zeile 252
					eval("\$moderators .= \"".$templates->get("forumbit_moderators_user", 1, 0)."\";");
$done_moderators['users'][] = $moderator['id'];
}

					eval("\$moderators .= \"".$templates->get("forumbit_moderators_user", 1, 0)."\";");
$done_moderators['users'][] = $moderator['id'];
}

				$comma = $lang->comma;
}
}
}


				$comma = $lang->comma;
}
}
}


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

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

}

}

$comma = '';

// If we have a moderators list, load the template
if($moderators)

$comma = '';

// If we have a moderators list, load the template
if($moderators)

{

{

	eval("\$moderatedby = \"".$templates->get("forumdisplay_moderatedby")."\";");
}
else

	eval("\$moderatedby = \"".$templates->get("forumdisplay_moderatedby")."\";");
}
else

Zeile 273Zeile 276

// Get the users browsing this forum.
if($mybb->settings['browsingthisforum'] != 0)


// Get the users browsing this forum.
if($mybb->settings['browsingthisforum'] != 0)

{

{

	$timecut = TIME_NOW - $mybb->settings['wolcutoff'];

$comma = '';

	$timecut = TIME_NOW - $mybb->settings['wolcutoff'];

$comma = '';

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 354Zeile 357

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


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





// Do we have any forum rules to show for this forum?
$forumrules = '';
if($foruminfo['rulestype'] != 0 && $foruminfo['rules'])

// Do we have any forum rules to show for this forum?
$forumrules = '';
if($foruminfo['rulestype'] != 0 && $foruminfo['rules'])

Zeile 373Zeile 376

$foruminfo['rules'] = $parser->parse_message($foruminfo['rules'], $rules_parser);
if($foruminfo['rulestype'] == 1 || $foruminfo['rulestype'] == 3)


$foruminfo['rules'] = $parser->parse_message($foruminfo['rules'], $rules_parser);
if($foruminfo['rulestype'] == 1 || $foruminfo['rulestype'] == 3)

	{

	{

		eval("\$rules = \"".$templates->get("forumdisplay_rules")."\";");
}
else if($foruminfo['rulestype'] == 2)

		eval("\$rules = \"".$templates->get("forumdisplay_rules")."\";");
}
else if($foruminfo['rulestype'] == 2)

Zeile 430Zeile 433
if(is_moderator($fid, "caneditposts") || $fpermissions['caneditposts'] == 1)
{
$can_edit_titles = 1;

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

}
else

}
else

{
$can_edit_titles = 0;
}

{
$can_edit_titles = 0;
}

Zeile 469Zeile 472
	$checkdate = TIME_NOW - ($datecut * 86400);
$datecutsql = "AND (lastpost >= '$checkdate' OR sticky = '1')";
$datecutsql2 = "AND (t.lastpost >= '$checkdate' OR t.sticky = '1')";

	$checkdate = TIME_NOW - ($datecut * 86400);
$datecutsql = "AND (lastpost >= '$checkdate' OR sticky = '1')";
$datecutsql2 = "AND (t.lastpost >= '$checkdate' OR t.sticky = '1')";

}
else
{

}
else
{

	$datecutsql = '';
$datecutsql2 = '';
}

	$datecutsql = '';
$datecutsql2 = '';
}

Zeile 530Zeile 533
if(!isset($mybb->input['sortby']) && !empty($foruminfo['defaultsortby']))
{
$mybb->input['sortby'] = $foruminfo['defaultsortby'];

if(!isset($mybb->input['sortby']) && !empty($foruminfo['defaultsortby']))
{
$mybb->input['sortby'] = $foruminfo['defaultsortby'];

}
else

}
else

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

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

Zeile 568Zeile 571
		$sortfield = "lastpost";
$mybb->input['sortby'] = "lastpost";
break;

		$sortfield = "lastpost";
$mybb->input['sortby'] = "lastpost";
break;

}


}


$sortsel['rating'] = ''; // Needs to be initialized in order to speed-up things. Fixes #2031
$sortsel[$mybb->input['sortby']] = ' selected="selected"';


$sortsel['rating'] = ''; // Needs to be initialized in order to speed-up things. Fixes #2031
$sortsel[$mybb->input['sortby']] = ' selected="selected"';


Zeile 577Zeile 580
if($mybb->seo_support == true)
{
$string = "?";

if($mybb->seo_support == true)
{
$string = "?";

}
else

}
else

{
$string = "&";
}

{
$string = "&";
}

Zeile 588Zeile 591
if($mybb->input['page'] > 1)
{
$sorturl = get_forum_link($fid, $mybb->input['page']).$string."datecut=$datecut&prefix=$tprefix";

if($mybb->input['page'] > 1)
{
$sorturl = get_forum_link($fid, $mybb->input['page']).$string."datecut=$datecut&prefix=$tprefix";

}

}

else
{
$sorturl = get_forum_link($fid).$string."datecut=$datecut&prefix=$tprefix";

else
{
$sorturl = get_forum_link($fid).$string."datecut=$datecut&prefix=$tprefix";

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 694Zeile 728
}
$multipage = multipage($threadcount, $perpage, $page, $page_url);


}
$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 954Zeile 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)
{
$forum_read = $read_cutoff;


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

	}
}

	}
}

else
{
$forum_read = my_get_array_cookie("forumread", $fid);

else
{
$forum_read = my_get_array_cookie("forumread", $fid);

Zeile 983Zeile 1022
	}

if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)

	}

if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)

	{

	{

		$mybb->settings['postsperpage'] = 20;
}

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

		$mybb->settings['postsperpage'] = 20;
}

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





		$moved = explode("|", $thread['closed']);

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

		$moved = explode("|", $thread['closed']);

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

Zeile 1009Zeile 1048
		if($thread['sticky'] == 1)
{
$thread_type_class = " forumdisplay_sticky";

		if($thread['sticky'] == 1)
{
$thread_type_class = " forumdisplay_sticky";

		}
else
{

		}
else
{

			$thread_type_class = " forumdisplay_regular";

			$thread_type_class = " forumdisplay_regular";

		}

		}


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


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

Zeile 1028Zeile 1067
			else
{
$thread['username'] = $thread['profilelink'] = htmlspecialchars_uni($thread['threadusername']);

			else
{
$thread['username'] = $thread['profilelink'] = htmlspecialchars_uni($thread['threadusername']);

			}
}
else

			}
}
else

		{
$thread['username'] = htmlspecialchars_uni($thread['username']);
$thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);

		{
$thread['username'] = htmlspecialchars_uni($thread['username']);
$thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);

Zeile 1070Zeile 1109
		}

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

		}

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

		{

		{

			eval("\$threads .= \"".$templates->get("forumdisplay_sticky_sep")."\";");
$shownormalsep = true;
$donestickysep = true;

			eval("\$threads .= \"".$templates->get("forumdisplay_sticky_sep")."\";");
$shownormalsep = true;
$donestickysep = true;

		}

		}

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

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

		{

		{

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

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

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

			}
else
{

			}
else
{

				$thread['averagerating'] = (float)round($thread['averagerating'], 2);
$thread['width'] = (int)round($thread['averagerating'])*20;
$thread['numratings'] = (int)$thread['numratings'];

				$thread['averagerating'] = (float)round($thread['averagerating'], 2);
$thread['width'] = (int)round($thread['averagerating'])*20;
$thread['numratings'] = (int)$thread['numratings'];

Zeile 1149Zeile 1188
			}

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

			}

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

		}

		}

		else

		else

		{

		{

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

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

Zeile 1160Zeile 1199
		if($ismod)
{
if(isset($mybb->cookies[$inlinecookie]) && my_strpos($mybb->cookies[$inlinecookie], "|{$thread['tid']}|") !== false)

		if($ismod)
{
if(isset($mybb->cookies[$inlinecookie]) && my_strpos($mybb->cookies[$inlinecookie], "|{$thread['tid']}|") !== false)

			{

			{

				$inlinecheck = "checked=\"checked\"";
++$inlinecount;
}
else
{
$inlinecheck = '';

				$inlinecheck = "checked=\"checked\"";
++$inlinecount;
}
else
{
$inlinecheck = '';

			}


			}


			$multitid = $thread['tid'];
eval("\$modbit = \"".$templates->get("forumdisplay_thread_modbit")."\";");
}

			$multitid = $thread['tid'];
eval("\$modbit = \"".$templates->get("forumdisplay_thread_modbit")."\";");
}

Zeile 1245Zeile 1284
		}

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")
{
$folder = "move";
$gotounread = '';

		if($moved[0] == "moved")
{
$folder = "move";
$gotounread = '';

		}

		}


$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_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

Zeile 1265Zeile 1304
		if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $can_edit_titles == 1) || $ismod == true)
{
$inline_edit_class = "subject_editable";

		if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $can_edit_titles == 1) || $ismod == true)
{
$inline_edit_class = "subject_editable";

		}

		}



$lastposteruid = $thread['lastposteruid'];
if(!$lastposteruid && !$thread['lastposter'])
{
$lastposter = htmlspecialchars_uni($lang->guest);



$lastposteruid = $thread['lastposteruid'];
if(!$lastposteruid && !$thread['lastposter'])
{
$lastposter = htmlspecialchars_uni($lang->guest);

		}
else

		}
else

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

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

		}

		}

		$lastpostdate = my_date('relative', $thread['lastpost']);

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

		$lastpostdate = my_date('relative', $thread['lastpost']);

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

		}
else
{

		}
else
{

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


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


Zeile 1325Zeile 1364
			}

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 1385Zeile 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"))
{

Zeile 1455Zeile 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 1487Zeile 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'])));