Vergleich forumdisplay.php - 1.4.5 - 1.4.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: forumdisplay.php 4322 2009-02-21 23:00:49Z Tikitiki $

 * $Id: forumdisplay.php 5379 2011-02-21 11:06:42Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 69Zeile 69
$currentitem = $fid;
build_forum_breadcrumb($fid);
$parentlist = $foruminfo['parentlist'];

$currentitem = $fid;
build_forum_breadcrumb($fid);
$parentlist = $foruminfo['parentlist'];

 

// To validate, turn & to & but keep unicode support
$foruminfo['name'] = preg_replace("#&(?!\#[0-9]+;)#si", "&", $foruminfo['name']);


$forumpermissions = forum_permissions();
$fpermissions = $forumpermissions[$fid];


$forumpermissions = forum_permissions();
$fpermissions = $forumpermissions[$fid];

Zeile 89Zeile 92
	");

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

	");

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

 

if(!is_array($forumsread))
{
$forumsread = array();
}

}
else
{

}
else
{

Zeile 140Zeile 148

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


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





if($foruminfo['linkto'])

if($foruminfo['linkto'])

{

{

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

// Make forum jump...
if($mybb->settings['enableforumjump'] != 0)

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

// Make forum jump...
if($mybb->settings['enableforumjump'] != 0)

{

{

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


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


Zeile 214Zeile 222
	while($user = $db->fetch_array($query))
{
if($user['uid'] == 0)

	while($user = $db->fetch_array($query))
{
if($user['uid'] == 0)

		{

		{

			++$guestcount;
}
else

			++$guestcount;
}
else

Zeile 242Zeile 250
				}
}
}

				}
}
}

	}

	}

		
if($guestcount)
{

		
if($guestcount)
{

Zeile 289Zeile 297
		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 438Zeile 446
else
{
$sorturl = "forumdisplay.php?fid=$fid&datecut=$datecut";

else
{
$sorturl = "forumdisplay.php?fid=$fid&datecut=$datecut";

}

}

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

$threadcount = 0;

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

$threadcount = 0;

Zeile 552Zeile 560
	switch($db->type)
{
case "pgsql":

	switch($db->type)
{
case "pgsql":

			$ratingadd = '';
$query = $db->query("
SELECT t.numratings, t.totalratings, t.tid
FROM ".TABLE_PREFIX."threads t
WHERE t.fid='$fid' $tvisibleonly $datecutsql2
ORDER BY t.sticky DESC, t.$sortfield $sortordernow $sortfield2
LIMIT $start, $perpage
");
while($thread = $db->fetch_array($query))
{
if($thread['totalratings'] == 0)
{
$rating = 0;
}
else
{
$rating = $thread['totalratings'] / $thread['numratings'];
}

$avaragerating[$thread['tid']] = $rating;
}
$t = "t.";
$sortfield = "lastpost";

			$ratingadd = "CASE WHEN t.numratings=0 THEN 0 ELSE t.totalratings/t.numratings::numeric END AS averagerating, ";























			break;
default:
$ratingadd = "(t.totalratings/t.numratings) AS averagerating, ";

			break;
default:
$ratingadd = "(t.totalratings/t.numratings) AS averagerating, ";

Zeile 596Zeile 582
	$ratingadd = '';
$lpbackground = "trow1";
$colspan = "6";

	$ratingadd = '';
$lpbackground = "trow1";
$colspan = "6";

}


}


if($ismod)
{
++$colspan;

if($ismod)
{
++$colspan;

Zeile 609Zeile 595
if($mybb->settings['announcementlimit'])
{
$limit = "LIMIT 0, ".$mybb->settings['announcementlimit'];

if($mybb->settings['announcementlimit'])
{
$limit = "LIMIT 0, ".$mybb->settings['announcementlimit'];

}


}


$sql = build_parent_list($fid, "fid", "OR", $parentlist);
$time = TIME_NOW;
$query = $db->query("

$sql = build_parent_list($fid, "fid", "OR", $parentlist);
$time = TIME_NOW;
$query = $db->query("

Zeile 620Zeile 606
	WHERE a.startdate<='$time' AND (a.enddate>='$time' OR a.enddate='0') AND ($sql OR fid='-1')
ORDER BY a.startdate DESC $limit
");

	WHERE a.startdate<='$time' AND (a.enddate>='$time' OR a.enddate='0') AND ($sql OR fid='-1')
ORDER BY a.startdate DESC $limit
");

 
$bgcolor = alt_trow(true); // Reset the trow colours

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

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

Zeile 640Zeile 627
	$posttime = my_date($mybb->settings['timeformat'], $announcement['startdate']);
$announcement['profilelink'] = build_profile_link($announcement['username'], $announcement['uid']);


	$posttime = my_date($mybb->settings['timeformat'], $announcement['startdate']);
$announcement['profilelink'] = build_profile_link($announcement['username'], $announcement['uid']);


	if($foruminfo['allowtratings'] != 0)

	if($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 686Zeile 673
	");
while($thread = $db->fetch_array($query))
{

	");
while($thread = $db->fetch_array($query))
{

		if($db->type == "pgsql")
{
$thread['averagerating'] = $averagerating[$thread['tid']];
}


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

// If this is a moved thread - set the tid for participation marking and thread read marking to that of the moved thread

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

// If this is a moved thread - set the tid for participation marking and thread read marking to that of the moved thread