Vergleich forumdisplay.php - 1.6.10 - 1.6.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 12Zeile 12
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_depth1_forum,forumbit_depth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,forumdisplay_moderatedby,forumdisplay_newthread,forumdisplay_searchforum,forumdisplay_orderarrow,forumdisplay_thread_rating,forumdisplay_threadlist_rating,forumdisplay_threadlist_sortrating,forumbit_moderators,forumbit_subforums,forumbit_depth2_forum_lastpost";

$templatelist = "forumdisplay,forumdisplay_thread,forumbit_depth1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,forumdisplay_moderatedby,forumdisplay_newthread,forumdisplay_searchforum,forumdisplay_orderarrow,forumdisplay_thread_rating,forumdisplay_threadlist_rating,forumdisplay_threadlist_sortrating,forumbit_moderators,forumbit_subforums,forumbit_depth2_forum_lastpost";

$templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more";
$templatelist .= ",multipage_prevpage,multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdisplay_password_wrongpass,forumdisplay_password";

$templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more";
$templatelist .= ",multipage_prevpage,multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdisplay_password_wrongpass,forumdisplay_password";

Zeile 298Zeile 298
				{
$invisiblemark = '';
}

				{
$invisiblemark = '';
}

				



				if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])
{
$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);

				if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])
{
$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);

Zeile 308Zeile 308
				}
}
}

				}
}
}

	}


	}


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

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

	}


	}


	$onlinesep = '';
if($guestcount && $onlinemembers)
{
$onlinesep = $lang->comma;

	$onlinesep = '';
if($guestcount && $onlinemembers)
{
$onlinesep = $lang->comma;

	}


	}


	$invisonline = '';
if($inviscount && $mybb->usergroup['canviewwolinvis'] != 1 && ($inviscount != 1 && $mybb->user['invisible'] != 1))
{
$invisonline = $lang->sprintf($lang->users_browsing_forum_invis, $inviscount);

	$invisonline = '';
if($inviscount && $mybb->usergroup['canviewwolinvis'] != 1 && ($inviscount != 1 && $mybb->user['invisible'] != 1))
{
$invisonline = $lang->sprintf($lang->users_browsing_forum_invis, $inviscount);

	}


	}


	$onlinesep2 = '';
if($invisonline != '' && $guestcount)
{
$onlinesep2 = $lang->comma;

	$onlinesep2 = '';
if($invisonline != '' && $guestcount)
{
$onlinesep2 = $lang->comma;

	}

	}

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


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


Zeile 344Zeile 344
	{
$foruminfo['rulestitle'] = $lang->sprintf($lang->forum_rules, $foruminfo['name']);
}

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

	



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

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

Zeile 537Zeile 537
}

// Needs to be initialized in order to speed-up things. Fixes #2031

}

// Needs to be initialized in order to speed-up things. Fixes #2031

$orderarrow = array('rating'=>'', 'subject'=>'', 'starter'=>'', 'replies'=>'', 'views'=>''); 

$orderarrow = array('rating'=>'', 'subject'=>'', 'starter'=>'', 'replies'=>'', 'views'=>'');

eval("\$orderarrow['$sortby'] = \"".$templates->get("forumdisplay_orderarrow")."\";");

$threadcount = 0;

eval("\$orderarrow['$sortby'] = \"".$templates->get("forumdisplay_orderarrow")."\";");

$threadcount = 0;

Zeile 550Zeile 550

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


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

	



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

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

Zeile 566Zeile 566
		{
$threadcount += $forum_threads['unapprovedthreads'];
}

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

		



		// If we have 0 threads double check there aren't any "moved" threads
if($threadcount == 0)
{

		// If we have 0 threads double check there aren't any "moved" threads
if($threadcount == 0)
{

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

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

}

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


}

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


if(isset($mybb->input['page']) && intval($mybb->input['page']) > 0)
{
$page = intval($mybb->input['page']);

if(isset($mybb->input['page']) && intval($mybb->input['page']) > 0)
{
$page = intval($mybb->input['page']);

Zeile 613Zeile 613

// Assemble page URL
if($mybb->input['sortby'] || $mybb->input['order'] || $mybb->input['datecut']) // Ugly URL


// Assemble page URL
if($mybb->input['sortby'] || $mybb->input['order'] || $mybb->input['datecut']) // Ugly URL

{	

{

	$page_url = str_replace("{fid}", $fid, FORUM_URL_PAGED);

	$page_url = str_replace("{fid}", $fid, FORUM_URL_PAGED);

	



	if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && isset($_SERVER['SEO_SUPPORT']) && $_SERVER['SEO_SUPPORT'] == 1))
{
$q = "?";

	if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && isset($_SERVER['SEO_SUPPORT']) && $_SERVER['SEO_SUPPORT'] == 1))
{
$q = "?";

Zeile 626Zeile 626
		$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"))

	{

	{

		$page_url .= "{$q}{$and}sortby={$sortby}";

		$page_url .= "{$q}{$and}sortby={$sortby}";

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


		$q = '';
$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)
{
$page_url .= "{$q}{$and}datecut={$datecut}";

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

Zeile 806Zeile 806
	$ratings = false;
$moved_threads = array();
while($thread = $db->fetch_array($query))

	$ratings = false;
$moved_threads = array();
while($thread = $db->fetch_array($query))

	{		

	{

		$threadcache[$thread['tid']] = $thread;

if($thread['numratings'] > 0 && $ratings == false)

		$threadcache[$thread['tid']] = $thread;

if($thread['numratings'] > 0 && $ratings == false)

Zeile 822Zeile 822
			{
$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 832Zeile 832
			{
unset($moved_threads[$thread['tid']]);
}

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

		}
}

if($mybb->settings['allowthreadratings'] != 0 && $foruminfo['allowtratings'] != 0 && $mybb->user['uid'] && !empty($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
$imp = implode(",", $tids);
$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;

 
		}
}
}

		}
}
}

Zeile 852Zeile 839
// If user has moderation tools available, prepare the Select All feature
$num_results = $db->num_rows($query);
if(is_moderator($fid) && $num_results > 0)

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

{

{

	$lang->page_selected = $lang->sprintf($lang->page_selected, intval($num_results));
$lang->select_all = $lang->sprintf($lang->select_all, intval($threadcount));
$lang->all_selected = $lang->sprintf($lang->all_selected, intval($threadcount));

	$lang->page_selected = $lang->sprintf($lang->page_selected, intval($num_results));
$lang->select_all = $lang->sprintf($lang->select_all, intval($threadcount));
$lang->all_selected = $lang->sprintf($lang->all_selected, intval($threadcount));

Zeile 869Zeile 856
{
$query = $db->simple_select("posts", "tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids}) {$visibleonly}");
while($post = $db->fetch_array($query))

{
$query = $db->simple_select("posts", "tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids}) {$visibleonly}");
while($post = $db->fetch_array($query))

	{

	{

		if(!empty($moved_threads[$post['tid']]))
{
$post['tid'] = $moved_threads[$post['tid']];

		if(!empty($moved_threads[$post['tid']]))
{
$post['tid'] = $moved_threads[$post['tid']];

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

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

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

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

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

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

		if(!empty($moved_threads[$readthread['tid']])) 
{
$readthread['tid'] = $moved_threads[$readthread['tid']];

		if(!empty($moved_threads[$readthread['tid']]))
{
$readthread['tid'] = $moved_threads[$readthread['tid']];

	 	}
if($threadcache[$readthread['tid']])
{

	 	}
if($threadcache[$readthread['tid']])
{

	 		$threadcache[$readthread['tid']]['lastread'] = $readthread['dateline']; 

	 		$threadcache[$readthread['tid']]['lastread'] = $readthread['dateline'];

		}
}
}

		}
}
}

Zeile 926Zeile 913
{
if(!$mybb->settings['maxmultipagelinks'])
{

{
if(!$mybb->settings['maxmultipagelinks'])
{

		$mybb->settings['maxmultipagelinks'] = 5;		

		$mybb->settings['maxmultipagelinks'] = 5;

	}

if(!$mybb->settings['postsperpage'])

	}

if(!$mybb->settings['postsperpage'])

Zeile 948Zeile 935
		{
$bgcolor = alt_trow();
}

		{
$bgcolor = alt_trow();
}

		



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

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

		{

		{

			$thread_type_class = " forumdisplay_sticky";
}
else

			$thread_type_class = " forumdisplay_sticky";
}
else

Zeile 959Zeile 946
		}

$folder = '';

		}

$folder = '';

		$prefix = '';

		$prefix = '';


$thread['author'] = $thread['uid'];
if(!$thread['username'])


$thread['author'] = $thread['uid'];
if(!$thread['username'])

Zeile 971Zeile 958
		{
$thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);
}

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

		



		// If this thread has a prefix, insert a space between prefix and subject
$thread['threadprefix'] = $threadprefix = '';
if($thread['prefix'] != 0)

		// If this thread has a prefix, insert a space between prefix and subject
$thread['threadprefix'] = $threadprefix = '';
if($thread['prefix'] != 0)

Zeile 991Zeile 978
		else
{
$icon = " ";

		else
{
$icon = " ";

		}

		}


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


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

Zeile 1032Zeile 1019

$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 1269Zeile 1256
			{
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")."\";");

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