Vergleich forumdisplay.php - 1.2.2 - 1.2.7

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: forumdisplay.php 2179 2006-09-01 04:44:17Z chris $

 * $Id: forumdisplay.php 3055 2007-05-13 15:01:15Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 94Zeile 94
	// Build a moderator cache.
while($moderator = $db->fetch_array($query))
{

	// Build a moderator cache.
while($moderator = $db->fetch_array($query))
{

		$moderatorcache[$moderator['fid']][] = $moderator;

		$moderatorcache[$moderator['fid']][$moderator['uid']] = $moderator;

	}
}


	}
}


Zeile 121Zeile 121
{
error_no_permission();
}

{
error_no_permission();
}

 

// Password protected forums
check_forum_password($fid, $foruminfo['password']);


if($foruminfo['linkto'])
{
header("Location: $foruminfo[linkto]");
exit;
}

if($foruminfo['linkto'])
{
header("Location: $foruminfo[linkto]");
exit;
}

// Password protected forums
check_forum_password($fid, $foruminfo['password']);

 

// Make forum jump...
$forumjump = build_forum_jump("", $fid, 1);


// Make forum jump...
$forumjump = build_forum_jump("", $fid, 1);

Zeile 137Zeile 139
	eval("\$newthread = \"".$templates->get("forumdisplay_newthread")."\";");
}
if($fpermissions['cansearch'] != "no" && $foruminfo['type'] == "f")

	eval("\$newthread = \"".$templates->get("forumdisplay_newthread")."\";");
}
if($fpermissions['cansearch'] != "no" && $foruminfo['type'] == "f")

{

{

	eval("\$searchforum = \"".$templates->get("forumdisplay_searchforum")."\";");
}


	eval("\$searchforum = \"".$templates->get("forumdisplay_searchforum")."\";");
}


Zeile 145Zeile 147
$modlist = '';
$parentlistexploded = explode(",", $parentlist);
foreach($parentlistexploded as $mfid)

$modlist = '';
$parentlistexploded = explode(",", $parentlist);
foreach($parentlistexploded as $mfid)

{

{

	if($moderatorcache[$mfid])
{
reset($moderatorcache[$mfid]);

	if($moderatorcache[$mfid])
{
reset($moderatorcache[$mfid]);

Zeile 184Zeile 186
		if($user['uid'] == 0)
{
++$guestcount;

		if($user['uid'] == 0)
{
++$guestcount;

		}
else

		}
else

		{
if($doneusers[$user['uid']] < $user['time'] || !$doneusers[$user['uid']])
{

		{
if($doneusers[$user['uid']] < $user['time'] || !$doneusers[$user['uid']])
{

Zeile 210Zeile 212
		}
}
if($guestcount)

		}
}
if($guestcount)

	{

	{

		$guestsonline = sprintf($lang->users_browsing_forum_guests, $guestcount);
}
if($guestcount && $onlinemembers)

		$guestsonline = sprintf($lang->users_browsing_forum_guests, $guestcount);
}
if($guestcount && $onlinemembers)

Zeile 234Zeile 236
if($foruminfo['rulestype'] != 0 && $foruminfo['rules'])
{
if(!$foruminfo['rulestitle'])

if($foruminfo['rulestype'] != 0 && $foruminfo['rules'])
{
if(!$foruminfo['rulestitle'])

	{

	{

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

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

Zeile 250Zeile 252
		eval("\$rules = \"".$templates->get("forumdisplay_rules")."\";");
}
elseif($foruminfo['rulestype'] == 2)

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

	{

	{

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

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

Zeile 275Zeile 277
	$ismod = false;
}


	$ismod = false;
}


if(is_moderator($fid, "caneditposts") || $fpermissions['caneditposts'] == "yes")

if(is_moderator($fid, "caneditposts") == "yes" || $fpermissions['caneditposts'] == "yes")

{
$can_edit_titles = 1;
}

{
$can_edit_titles = 1;
}

Zeile 319Zeile 321
if($datecut != 9999)
{
$checkdate = time() - ($datecut * 86400);

if($datecut != 9999)
{
$checkdate = time() - ($datecut * 86400);

	$datecutsql = "AND t.lastpost >= '$checkdate'";

	$datecutsql = "AND (t.lastpost >= '$checkdate' OR t.sticky = '1')";

}
else
{

}
else
{

Zeile 331Zeile 333
{
$mybb->input['order'] = $foruminfo['defaultsortorder'];
}

{
$mybb->input['order'] = $foruminfo['defaultsortorder'];
}

 

$mybb->input['order'] = htmlspecialchars($mybb->input['order']);


switch(strtolower($mybb->input['order']))
{
case "asc":

switch(strtolower($mybb->input['order']))
{
case "asc":

Zeile 352Zeile 357
{
$mybb->input['sortby'] = $foruminfo['defaultsortby'];
}

{
$mybb->input['sortby'] = $foruminfo['defaultsortby'];
}

switch($mybb->input['sortby'])





$sortby = htmlspecialchars($mybb->input['sortby']);

switch($sortby)

{
case "subject":
$sortfield = "t.subject";

{
case "subject":
$sortfield = "t.subject";

Zeile 368Zeile 376
		break;
case "rating":
$sortfield = "averagerating";

		break;
case "rating":
$sortfield = "averagerating";

 
		$sortfield2 = ", t.totalratings DESC";

		break;
case "started":
$sortfield = "t.dateline";

		break;
case "started":
$sortfield = "t.dateline";

Zeile 378Zeile 387
		break;
}


		break;
}


$sortby = $mybb->input['sortby'];

 
$sortsel[$mybb->input['sortby']] = "selected=\"selected\"";

// Are we viewing a specific page?
if(isset($mybb->input['page']) && is_numeric($mybb->input['page']))

$sortsel[$mybb->input['sortby']] = "selected=\"selected\"";

// Are we viewing a specific page?
if(isset($mybb->input['page']) && is_numeric($mybb->input['page']))

{

{

	$sorturl = "forumdisplay.php?fid=$fid&amp;datecut=$datecut&amp;page=".$mybb->input['page'];
}
else

	$sorturl = "forumdisplay.php?fid=$fid&amp;datecut=$datecut&amp;page=".$mybb->input['page'];
}
else

Zeile 448Zeile 456
$limit = '';
$announcements = '';
if($mybb->settings['announcementlimit'])

$limit = '';
$announcements = '';
if($mybb->settings['announcementlimit'])

{

{

	$limit = "LIMIT 0, ".$mybb->settings['announcementlimit'];
}
$sql = build_parent_list($fid, "fid", "OR", $parentlist);

	$limit = "LIMIT 0, ".$mybb->settings['announcementlimit'];
}
$sql = build_parent_list($fid, "fid", "OR", $parentlist);

Zeile 463Zeile 471
while($announcement = $db->fetch_array($query))
{
if($announcement['startdate'] > $mybb->user['lastvisit'])

while($announcement = $db->fetch_array($query))
{
if($announcement['startdate'] > $mybb->user['lastvisit'])

	{

	{

		$folder = "newfolder.gif";
}
else

		$folder = "newfolder.gif";
}
else

Zeile 505Zeile 513

// Start Getting Threads
$query = $db->query("


// Start Getting Threads
$query = $db->query("

	SELECT t.*, $ratingadd t.username AS threadusername, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
WHERE t.fid='$fid' $visibleonly $datecutsql
ORDER BY t.sticky DESC, $sortfield $sortordernow
LIMIT $start, $perpage
");

    SELECT t.*, $ratingadd t.username AS threadusername, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
WHERE t.fid='$fid' $visibleonly $datecutsql
ORDER BY t.sticky DESC, $sortfield $sortordernow $sortfield2
LIMIT $start, $perpage
");

while($thread = $db->fetch_array($query))
{
$threadcache[$thread['tid']] = $thread;

while($thread = $db->fetch_array($query))
{
$threadcache[$thread['tid']] = $thread;

Zeile 584Zeile 592
		else
{
$bgcolor = alt_trow();

		else
{
$bgcolor = alt_trow();

		}

		}

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


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


Zeile 616Zeile 624
			$prefix = $lang->poll_prefix;
}
if($thread['sticky'] == "1" && !$donestickysep)

			$prefix = $lang->poll_prefix;
}
if($thread['sticky'] == "1" && !$donestickysep)

		{

		{

			eval("\$threads .= \"".$templates->get("forumdisplay_sticky_sep")."\";");
$shownormalsep = true;
$donestickysep = true;
}
elseif($thread['sticky'] == 0 && $shownormalsep)
{

			eval("\$threads .= \"".$templates->get("forumdisplay_sticky_sep")."\";");
$shownormalsep = true;
$donestickysep = true;
}
elseif($thread['sticky'] == 0 && $shownormalsep)
{

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

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

			$shownormalsep = false;

			$shownormalsep = false;

		}

		}


if($foruminfo['allowtratings'] != "no")
{


if($foruminfo['allowtratings'] != "no")
{

Zeile 641Zeile 649
			eval("\$rating = \"".$templates->get("forumdisplay_thread_rating")."\";");
}
else

			eval("\$rating = \"".$templates->get("forumdisplay_thread_rating")."\";");
}
else

		{

		{

			$rating = '';

			$rating = '';

		}

		}


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


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

 
		if($thread['unapprovedposts'] > 0 && $ismod)
{
$thread['posts'] += $thread['unapprovedposts'];
}

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

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

Zeile 887Zeile 899
	{
eval("\$inline_edit_js = \"".$templates->get("forumdisplay_threadlist_inlineedit_js")."\";");
}

	{
eval("\$inline_edit_js = \"".$templates->get("forumdisplay_threadlist_inlineedit_js")."\";");
}

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

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

	eval("\$rssdiscovery = \"".$templates->get("forumdisplay_rssdiscovery")."\";");
eval("\$threadslist = \"".$templates->get("forumdisplay_threadlist")."\";");
}

	eval("\$rssdiscovery = \"".$templates->get("forumdisplay_rssdiscovery")."\";");
eval("\$threadslist = \"".$templates->get("forumdisplay_threadlist")."\";");
}