Vergleich forumdisplay.php - 1.4.6 - 1.4.12

  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 4830 2010-03-20 20:54:55Z musicalmidget $

 */

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 291Zeile 294
	else if($foruminfo['rulestype'] == 2)
{
eval("\$rules = \"".$templates->get("forumdisplay_rules_link")."\";");

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

	}

	}

}

$bgcolor = "trow1";

}

$bgcolor = "trow1";

Zeile 309Zeile 312
	$inlinecookie = "inlinemod_forum".$fid;
$visibleonly = " AND (visible='1' OR visible='0')";
$tvisibleonly = " AND (t.visible='1' OR t.visible='0')";

	$inlinecookie = "inlinemod_forum".$fid;
$visibleonly = " AND (visible='1' OR visible='0')";
$tvisibleonly = " AND (t.visible='1' OR t.visible='0')";

}

}

else
{
$inlinemod = '';

else
{
$inlinemod = '';

Zeile 336Zeile 339
	if($mybb->user['daysprune'])
{
$datecut = $mybb->user['daysprune'];

	if($mybb->user['daysprune'])
{
$datecut = $mybb->user['daysprune'];

	}

	}

	else
{
// If the forum has a non-default date cut, use it.

	else
{
// If the forum has a non-default date cut, use it.

Zeile 345Zeile 348
			$datecut = $foruminfo['defaultdatecut'];
}
}

			$datecut = $foruminfo['defaultdatecut'];
}
}

}

}

// If there was a manual date cut override, use it.
else
{

// If there was a manual date cut override, use it.
else
{

Zeile 364Zeile 367
{
$datecutsql = '';
$datecutsql2 = '';

{
$datecutsql = '';
$datecutsql2 = '';

}


}


// Pick the sort order.
if(!isset($mybb->input['order']) && !empty($foruminfo['defaultsortorder']))
{

// Pick the sort order.
if(!isset($mybb->input['order']) && !empty($foruminfo['defaultsortorder']))
{

Zeile 552Zeile 555
	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 577
	$ratingadd = '';
$lpbackground = "trow1";
$colspan = "6";

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

}


}


if($ismod)
{
++$colspan;

if($ismod)
{
++$colspan;

Zeile 609Zeile 590
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 601
	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 622
	$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 668
	");
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