Vergleich forumdisplay.php - 1.2.0 - 1.2.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

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

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

 * $Id: forumdisplay.php 2708 2007-02-04 16:14:25Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

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 216Zeile 218
	if($guestcount && $onlinemembers)
{
$onlinesep = ", ";

	if($guestcount && $onlinemembers)
{
$onlinesep = ", ";

	}

	}

	$invisonline = '';
if($inviscount && $mybb->usergroup['canviewwolinvis'] != "yes" && ($inviscount != 1 && $mybb->user['invisible'] != "yes"))
{

	$invisonline = '';
if($inviscount && $mybb->usergroup['canviewwolinvis'] != "yes" && ($inviscount != 1 && $mybb->user['invisible'] != "yes"))
{

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 313Zeile 315
else
{
$datecut = intval($mybb->input['datecut']);

else
{
$datecut = intval($mybb->input['datecut']);

}

}

$datecut = intval($datecut);
$datecutsel[$datecut] = "selected=\"selected\"";
if($datecut != 9999)
{
$checkdate = time() - ($datecut * 86400);

$datecut = intval($datecut);
$datecutsel[$datecut] = "selected=\"selected\"";
if($datecut != 9999)
{
$checkdate = time() - ($datecut * 86400);

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

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

else
{
$datecutsql = '';

else
{
$datecutsql = '';

Zeile 332Zeile 334
	$mybb->input['order'] = $foruminfo['defaultsortorder'];
}
switch(strtolower($mybb->input['order']))

	$mybb->input['order'] = $foruminfo['defaultsortorder'];
}
switch(strtolower($mybb->input['order']))

{

{

	case "asc":
$sortordernow = "ASC";
$ordersel['asc'] = "selected=\"selected\"";
$oppsort = $lang->desc;
$oppsortnext = "desc";

	case "asc":
$sortordernow = "ASC";
$ordersel['asc'] = "selected=\"selected\"";
$oppsort = $lang->desc;
$oppsortnext = "desc";

		break;

		break;

	default:
$sortordernow = "DESC";
$ordersel['desc'] = "selected=\"selected\"";
$oppsort = $lang->asc;
$oppsortnext = "asc";

	default:
$sortordernow = "DESC";
$ordersel['desc'] = "selected=\"selected\"";
$oppsort = $lang->asc;
$oppsortnext = "asc";

		break;

		break;

}

// Sort by which field?

}

// Sort by which field?

Zeile 356Zeile 358
{
case "subject":
$sortfield = "t.subject";

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

		break;

		break;

	case "replies":
$sortfield = "t.replies";
break;
case "views":
$sortfield = "t.views";

	case "replies":
$sortfield = "t.replies";
break;
case "views":
$sortfield = "t.views";

		break;

		break;

	case "starter":
$sortfield = "t.username";
break;
case "rating":
$sortfield = "averagerating";

	case "starter":
$sortfield = "t.username";
break;
case "rating":
$sortfield = "averagerating";

 
		$sortfield2 = ", t.totalratings DESC";

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

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

Zeile 408Zeile 411
	{
$start = 0;
$page = 1;

	{
$start = 0;
$page = 1;

	}
}
else

	}
}
else

{
$start = 0;
$page = 1;

{
$start = 0;
$page = 1;

Zeile 505Zeile 508

// 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 887Zeile 890
	{
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")."\";");
}