Vergleich forumdisplay.php - 1.8.27 - 1.8.36

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 11Zeile 11
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'forumdisplay.php');


define("IN_MYBB", 1);
define('THIS_SCRIPT', 'forumdisplay.php');


$templatelist = "forumdisplay,forumdisplay_thread,forumbit_depth1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,forumdisplay_moderatedby,forumdisplay_searchforum,forumdisplay_thread_rating,forumdisplay_threadlist_rating";

$templatelist = "forumdisplay,forumdisplay_thread,forumbit_depth1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,forumdisplay_moderatedby,forumdisplay_searchforum,forumdisplay_forumsort,forumdisplay_thread_rating,forumdisplay_threadlist_rating";

$templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_gotounread,forumbit_depth2_forum_lastpost,forumdisplay_rules_link,forumdisplay_orderarrow,forumdisplay_newthread";
$templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,forumdisplay_thread_unapproved_posts,forumdisplay_nothreads";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdisplay_password_wrongpass,forumdisplay_password,forumdisplay_inlinemoderation_custom_tool,forumbit_subforums,forumbit_moderators,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden";

$templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_gotounread,forumbit_depth2_forum_lastpost,forumdisplay_rules_link,forumdisplay_orderarrow,forumdisplay_newthread";
$templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,forumdisplay_thread_unapproved_posts,forumdisplay_nothreads";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdisplay_password_wrongpass,forumdisplay_password,forumdisplay_inlinemoderation_custom_tool,forumbit_subforums,forumbit_moderators,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden";

Zeile 95Zeile 95
	$forumsread = array();
if(isset($mybb->cookies['mybb']['forumread']))
{

	$forumsread = array();
if(isset($mybb->cookies['mybb']['forumread']))
{

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

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

	}

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

	}

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

Zeile 172Zeile 172
}

// Make forum jump...

}

// Make forum jump...

 
$forumjump = '';

if($mybb->settings['enableforumjump'] != 0)
{
$forumjump = build_forum_jump("", $fid, 1);

if($mybb->settings['enableforumjump'] != 0)
{
$forumjump = build_forum_jump("", $fid, 1);

Zeile 215Zeile 216

$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 274Zeile 276
}

// Get the users browsing this forum.

}

// Get the users browsing this forum.

 
$usersbrowsing = '';

if($mybb->settings['browsingthisforum'] != 0)
{
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];

if($mybb->settings['browsingthisforum'] != 0)
{
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];





	$comma = '';
$guestcount = 0;
$membercount = 0;

	$comma = '';
$guestcount = 0;
$membercount = 0;

Zeile 297Zeile 300
		WHERE s.uid != 0 AND s.time > $timecut AND location1 = $fid AND nopermission != 1
ORDER BY u.username ASC, s.time DESC
");

		WHERE s.uid != 0 AND s.time > $timecut AND location1 = $fid AND nopermission != 1
ORDER BY u.username ASC, s.time DESC
");





	while($user = $db->fetch_array($query))
{
if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])

	while($user = $db->fetch_array($query))
{
if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])

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

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

	{

	{

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

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

Zeile 705Zeile 708
	if($sortordernow != "desc")
{
$page_url .= "{$q}{$and}order={$sortordernow}";

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

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

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


if($datecut > 0 && $datecut != 9999)
{


if($datecut > 0 && $datecut != 9999)
{

Zeile 787Zeile 790
	// 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']), false);
}


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

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

Zeile 810Zeile 813
		if(isset($cookie[$announcement['aid']]) && $cookie[$announcement['aid']] < $mybb->user['lastvisit'])
{
unset($cookie[$announcement['aid']]);

		if(isset($cookie[$announcement['aid']]) && $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['announcementlink'] = get_announcement_link($announcement['aid']);
$announcement['subject'] = $parser->parse_badwords($announcement['subject']);

Zeile 822Zeile 825
		$announcement['profilelink'] = build_profile_link($announcement['username'], $announcement['uid']);

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

		$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";
}

			eval("\$rating = \"".$templates->get("forumdisplay_announcement_rating")."\";");
$lpbackground = "trow2";
}

Zeile 830Zeile 833
		{
$rating = '';
$lpbackground = "trow1";

		{
$rating = '';
$lpbackground = "trow1";

		}


		}


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

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

Zeile 850Zeile 853
	{
eval("\$announcementlist = \"".$templates->get("forumdisplay_announcements")."\";");
$shownormalsep = true;

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

	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(my_serialize($cookie)), -1);
}

	else if(!empty($cookie))
{
my_setcookie("mybb[announcements]", addslashes(my_serialize($cookie)), -1);
}

}

}

else
{
$announcementlist = '';
}

else
{
$announcementlist = '';
}





$tids = $threadcache = array();
$icon_cache = $cache->read("posticons");

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

$tids = $threadcache = array();
$icon_cache = $cache->read("posticons");

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

{

{

	$plugins->run_hooks("forumdisplay_get_threads");

// Start Getting Threads

	$plugins->run_hooks("forumdisplay_get_threads");

// Start Getting Threads

Zeile 1128Zeile 1131
			}
else
{

			}
else
{

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

 
				$thread['numratings'] = (int)$thread['numratings'];

				$thread['numratings'] = (int)$thread['numratings'];

 

if($thread['numratings'] == 0)
{
$thread['averagerating'] = 0;
$thread['width'] = 0;
}
else
{
$thread['averagerating'] = (float)round($thread['averagerating'], 2);
$thread['width'] = (int)round($thread['averagerating']) * 20;
}


$not_rated = '';
if(!isset($thread['rated']) || empty($thread['rated']))


$not_rated = '';
if(!isset($thread['rated']) || empty($thread['rated']))

Zeile 1140Zeile 1152

$ratingvotesav = $lang->sprintf($lang->rating_votes_average, $thread['numratings'], $thread['averagerating']);
eval("\$rating = \"".$templates->get("forumdisplay_thread_rating")."\";");


$ratingvotesav = $lang->sprintf($lang->rating_votes_average, $thread['numratings'], $thread['averagerating']);
eval("\$rating = \"".$templates->get("forumdisplay_thread_rating")."\";");

			}

			}

		}

$thread['pages'] = 0;

		}

$thread['pages'] = 0;

Zeile 1149Zeile 1161
		$morelink = '';
$thread['posts'] = $thread['replies'] + 1;
if(is_moderator($fid, "canviewdeleted") == true || is_moderator($fid, "canviewunapprove") == true)

		$morelink = '';
$thread['posts'] = $thread['replies'] + 1;
if(is_moderator($fid, "canviewdeleted") == true || is_moderator($fid, "canviewunapprove") == true)

		{

		{

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

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

			{

			{

				$thread['posts'] += $thread['deletedposts'];

				$thread['posts'] += $thread['deletedposts'];

			}

			}

			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'];

Zeile 1201Zeile 1213
			{
$inlinecheck = "checked=\"checked\"";
++$inlinecount;

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

			}

			}

			else
{
$inlinecheck = '';
}

			else
{
$inlinecheck = '';
}





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

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

		}

		}

		else

		else

		{

		{

			$modbit = '';

			$modbit = '';

		}

		}


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


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

Zeile 1221Zeile 1233
			$thread['tid'] = $moved[1];
$thread['replies'] = "-";
$thread['views'] = "-";

			$thread['tid'] = $moved[1];
$thread['replies'] = "-";
$thread['views'] = "-";

		}

		}


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


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





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

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

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

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





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

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

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

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

		{

		{

			if(!empty($thread['lastread']))
{
$last_read = $thread['lastread'];

			if(!empty($thread['lastread']))
{
$last_read = $thread['lastread'];

Zeile 1280Zeile 1292
		{
$folder .= "hot";
$folder_label .= $lang->icon_hot;

		{
$folder .= "hot";
$folder_label .= $lang->icon_hot;

		}


		}


		if($thread['closed'] == 1)
{
$folder .= "close";

		if($thread['closed'] == 1)
{
$folder .= "close";

Zeile 1321Zeile 1333
		if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

		if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

		}
else

		}
else

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

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

Zeile 1364Zeile 1376

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 1386Zeile 1398
	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 1488Zeile 1500
$add_remove_subscription = 'add';
$add_remove_subscription_text = $lang->subscribe_forum;
$addremovesubscription = '';

$add_remove_subscription = 'add';
$add_remove_subscription_text = $lang->subscribe_forum;
$addremovesubscription = '';





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

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

Zeile 1498Zeile 1510
		$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")."\";");
}

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





$inline_edit_js = $clearstoredpass = '';

// Is this a real forum with threads?
if($foruminfo['type'] != "c")
{
if($fpermissions['canviewthreads'] != 1)

$inline_edit_js = $clearstoredpass = '';

// Is this a real forum with threads?
if($foruminfo['type'] != "c")
{
if($fpermissions['canviewthreads'] != 1)

	{

	{

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

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

	}


	}


	if(!$threadcount && $fpermissions['canviewthreads'] == 1)

	if(!$threadcount && $fpermissions['canviewthreads'] == 1)

	{

	{

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

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

	}


	}


	$clearstoredpass = '';
if($foruminfo['password'] != '')
{

	$clearstoredpass = '';
if($foruminfo['password'] != '')
{

Zeile 1527Zeile 1539

// Populate Forumsort
$forumsort = '';


// Populate Forumsort
$forumsort = '';

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


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