Vergleich printthread.php - 1.8.6 - 1.8.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 11Zeile 11
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'printthread.php');


define("IN_MYBB", 1);
define('THIS_SCRIPT', 'printthread.php');


$templatelist = "printthread,printthread_post,forumdisplay_password_wrongpass,forumdisplay_password,printthread_multipage,printthread_multipage_page,printthread_multipage_page_current";

$templatelist = "printthread,printthread_post,printthread_nav,forumdisplay_password_wrongpass,forumdisplay_password,printthread_multipage,printthread_multipage_page,printthread_multipage_page_current";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";

Zeile 49Zeile 49
$tid = $thread['tid'];

// Is the currently logged in user a moderator of this forum?

$tid = $thread['tid'];

// Is the currently logged in user a moderator of this forum?

if(is_moderator($fid))
{
$ismod = true;
}
else
{
$ismod = false;
}


$ismod = is_moderator($fid);









// Make sure we are looking at a real thread here.
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))
{
error($lang->error_invalidthread);

// Make sure we are looking at a real thread here.
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))
{
error($lang->error_invalidthread);

}


}


// Get forum info
$forum = get_forum($fid);
if(!$forum)

// Get forum info
$forum = get_forum($fid);
if(!$forum)

{
error($lang->error_invalidforum);
}

$breadcrumb = makeprintablenav();

{
error($lang->error_invalidforum);
}

$breadcrumb = makeprintablenav();


$parentsexp = explode(",", $forum['parentlist']);
$numparents = count($parentsexp);


$parentsexp = explode(",", $forum['parentlist']);
$numparents = count($parentsexp);

Zeile 100Zeile 93
if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
{
$mybb->settings['postsperpage'] = 20;

if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
{
$mybb->settings['postsperpage'] = 20;

}

}

$perpage = $mybb->settings['postsperpage'];
$postcount = (int)$thread['replies']+1;
$pages = ceil($postcount/$perpage);

$perpage = $mybb->settings['postsperpage'];
$postcount = (int)$thread['replies']+1;
$pages = ceil($postcount/$perpage);

Zeile 133Zeile 126
$postrows = '';
if(is_moderator($forum['fid'], "canviewunapprove"))
{

$postrows = '';
if(is_moderator($forum['fid'], "canviewunapprove"))
{

    $visible = "AND (p.visible='0' OR p.visible='1')";

	$visible = "AND (p.visible='0' OR p.visible='1')";

}
else
{

}
else
{

    $visible = "AND p.visible='1'";

	$visible = "AND p.visible='1'";

}
$query = $db->query("

}
$query = $db->query("

    SELECT u.*, u.username AS userusername, p.*
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
WHERE p.tid='$tid' {$visible}
ORDER BY p.dateline

	SELECT u.*, u.username AS userusername, p.*
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
WHERE p.tid='$tid' {$visible}
ORDER BY p.dateline

	LIMIT {$start}, {$perpage}
");
while($postrow = $db->fetch_array($query))
{

	LIMIT {$start}, {$perpage}
");
while($postrow = $db->fetch_array($query))
{

	if($postrow['userusername'])
{
$postrow['username'] = $postrow['userusername'];
}
$postrow['subject'] = htmlspecialchars_uni($parser->parse_badwords($postrow['subject']));
$postrow['date'] = my_date($mybb->settings['dateformat'], $postrow['dateline'], null, 0);
$postrow['profilelink'] = build_profile_link($postrow['username'], $postrow['uid']);

 
	$parser_options = array(
"allow_html" => $forum['allowhtml'],
"allow_mycode" => $forum['allowmycode'],

	$parser_options = array(
"allow_html" => $forum['allowhtml'],
"allow_mycode" => $forum['allowmycode'],

Zeile 180Zeile 166
	{
$parser_options['allow_videocode'] = 0;
}

	{
$parser_options['allow_videocode'] = 0;
}

 

if($postrow['userusername'])
{
$postrow['username'] = $postrow['userusername'];
}
$postrow['username'] = htmlspecialchars_uni($postrow['username']);
$postrow['subject'] = htmlspecialchars_uni($parser->parse_badwords($postrow['subject']));
$postrow['date'] = my_date($mybb->settings['dateformat'], $postrow['dateline'], null, 0);
$postrow['profilelink'] = build_profile_link($postrow['username'], $postrow['uid']);


$postrow['message'] = $parser->parse_message($postrow['message'], $parser_options);
$plugins->run_hooks("printthread_post");


$postrow['message'] = $parser->parse_message($postrow['message'], $parser_options);
$plugins->run_hooks("printthread_post");

Zeile 199Zeile 194
 */
function makeprintablenav($pid=0, $depth="--")
{

 */
function makeprintablenav($pid=0, $depth="--")
{

	global $mybb, $db, $pforumcache, $fid, $forum, $lang;

	global $mybb, $db, $pforumcache, $fid, $forum, $lang, $templates;

	if(!is_array($pforumcache))
{
$parlist = build_parent_list($fid, "fid", "OR", $forum['parentlist']);

	if(!is_array($pforumcache))
{
$parlist = build_parent_list($fid, "fid", "OR", $forum['parentlist']);

Zeile 215Zeile 210
	{
foreach($pforumcache[$pid] as $key => $forumnav)
{

	{
foreach($pforumcache[$pid] as $key => $forumnav)
{

			$forums .= "+".$depth." $lang->forum {$forumnav['name']} (<i>".$mybb->settings['bburl']."/".get_forum_link($forumnav['fid'])."</i>)<br />\n";


			$forumnav['link'] = get_forum_link($forumnav['fid']);
eval("\$forums .= \"".$templates->get("printthread_nav")."\";");

			if(!empty($pforumcache[$forumnav['fid']]))
{
$newdepth = $depth."-";

			if(!empty($pforumcache[$forumnav['fid']]))
{
$newdepth = $depth."-";