Vergleich showthread.php - 1.4.3 - 1.4.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
<?php
/**
* MyBB 1.4

<?php
/**
* MyBB 1.4

 * Copyright � 2008 MyBB Group, All Rights Reserved

 * Copyright © 2008 MyBB Group, All Rights Reserved

 *
* 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: showthread.php 4178 2008-09-06 16:39:10Z Tikitiki $

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

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 16Zeile 16
$templatelist .= ",multipage_prevpage,multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage";
$templatelist .= ",postbit_editedby,showthread_similarthreads,showthread_similarthreads_bit,postbit_iplogged_show,postbit_iplogged_hiden,showthread_quickreply";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,showthread_multipage,postbit_reputation,postbit_quickdelete,postbit_attachments,thumbnails_thumbnail,postbit_attachments_attachment,postbit_attachments_thumbnails,postbit_attachments_images_image,postbit_attachments_images,postbit_posturl";

$templatelist .= ",multipage_prevpage,multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage";
$templatelist .= ",postbit_editedby,showthread_similarthreads,showthread_similarthreads_bit,postbit_iplogged_show,postbit_iplogged_hiden,showthread_quickreply";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,showthread_multipage,postbit_reputation,postbit_quickdelete,postbit_attachments,thumbnails_thumbnail,postbit_attachments_attachment,postbit_attachments_thumbnails,postbit_attachments_images_image,postbit_attachments_images,postbit_posturl";

$templatelist .= ",postbit_inlinecheck,showthread_inlinemoderation,postbit_attachments_thumbnails_thumbnail,postbit_quickquote,postbit_qqmessage,postbit_seperator,postbit_groupimage,postbit_multiquote,showthread_search,postbit_warn,postbit_warninglevel,showthread_moderationoptions_custom_tool,showthread_moderationoptions_custom,showthread_inlinemoderation_custom_tool,showthread_inlinemoderation_custom,postbit_classic,showthread_classic_header";

$templatelist .= ",postbit_inlinecheck,showthread_inlinemoderation,postbit_attachments_thumbnails_thumbnail,postbit_quickquote,postbit_qqmessage,postbit_seperator,postbit_groupimage,postbit_multiquote,showthread_search,postbit_warn,postbit_warninglevel,showthread_moderationoptions_custom_tool,showthread_moderationoptions_custom,showthread_inlinemoderation_custom_tool,showthread_inlinemoderation_custom,postbit_classic,showthread_classic_header,showthread_poll_resultbit,showthread_poll_results";


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 131Zeile 131
	}
else
{

	}
else
{

		$forum_read = my_get_array_cookie("forumread", $fid);

		$forum_read = intval(my_get_array_cookie("forumread", $fid));

	}

if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forum_read)

	}

if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forum_read)

Zeile 152Zeile 152
	
if(!$lastread)
{

	
if(!$lastread)
{

		$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);

		$readcookie = $threadread = intval(my_get_array_cookie("threadread", $thread['tid']));

		if($readcookie > $forum_read)
{
$lastread = $readcookie;

		if($readcookie > $forum_read)
{
$lastread = $readcookie;

Zeile 170Zeile 170
		"order_by" => "dateline",
"order_dir" => "asc"
);

		"order_by" => "dateline",
"order_dir" => "asc"
);

 

$lastread = intval($lastread);

	$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND dateline > '{$lastread}'", $options);
$newpost = $db->fetch_array($query);
if($newpost['pid'])

	$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND dateline > '{$lastread}'", $options);
$newpost = $db->fetch_array($query);
if($newpost['pid'])

	{

	{

		header("Location: ".htmlspecialchars_decode(get_post_link($newpost['pid'], $tid))."#pid{$newpost['pid']}");

		header("Location: ".htmlspecialchars_decode(get_post_link($newpost['pid'], $tid))."#pid{$newpost['pid']}");

	}
else
{

	}
else
{

		// show them to the last post
$mybb->input['action'] = "lastpost";
}

		// show them to the last post
$mybb->input['action'] = "lastpost";
}

Zeile 185Zeile 187

// Jump to the last post.
if($mybb->input['action'] == "lastpost")


// Jump to the last post.
if($mybb->input['action'] == "lastpost")

{

{

	if(my_strpos($thread['closed'], "moved|"))
{
$query = $db->query("

	if(my_strpos($thread['closed'], "moved|"))
{
$query = $db->query("

Zeile 236Zeile 238
		"order_dir" => "desc"
);
$query = $db->simple_select('posts', 'pid', "tid='{$nextthread['tid']}'", $options);

		"order_dir" => "desc"
);
$query = $db->simple_select('posts', 'pid', "tid='{$nextthread['tid']}'", $options);


// Redirect to the proper page.
$pid = $db->fetch_field($query, "pid");
header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");


// Redirect to the proper page.
$pid = $db->fetch_field($query, "pid");
header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");

}

// Jump to the next oldest posts.

}

// Jump to the next oldest posts.

Zeile 376Zeile 378
				$imagewidth = round(($percent/3) * 5);
$imagerowwidth = $imagewidth + 10;
eval("\$polloptions .= \"".$templates->get("showthread_poll_resultbit")."\";");

				$imagewidth = round(($percent/3) * 5);
$imagerowwidth = $imagewidth + 10;
eval("\$polloptions .= \"".$templates->get("showthread_poll_resultbit")."\";");

			}
else
{

			}
else
{

				if($poll['multiple'] == 1)
{
eval("\$polloptions .= \"".$templates->get("showthread_poll_option_multiple")."\";");

				if($poll['multiple'] == 1)
{
eval("\$polloptions .= \"".$templates->get("showthread_poll_option_multiple")."\";");

Zeile 407Zeile 409
		}
else
{

		}
else
{

			$edit_poll = "| <a href=\"polls.php?action=editpoll&amp;pid={$poll['pid']}\">{$lang->edit_poll}</a>";

			$edit_poll = " | <a href=\"polls.php?action=editpoll&amp;pid={$poll['pid']}\">{$lang->edit_poll}</a>";

		}

// Decide what poll status to show depending on the status of the poll and whether or not the user voted already.

		}

// Decide what poll status to show depending on the status of the poll and whether or not the user voted already.

Zeile 530Zeile 532
		}
else
{

		}
else
{

			$thread['averagerating'] = intval(round($thread['totalratings']/$thread['numratings'], 2));
$thread['width'] = $thread['averagerating']*20;

			$thread['averagerating'] = floatval(round($thread['totalratings']/$thread['numratings'], 2));
$thread['width'] = intval(round($thread['averagerating']))*20;

			$thread['numratings'] = intval($thread['numratings']);
}


			$thread['numratings'] = intval($thread['numratings']);
}


Zeile 575Zeile 577
		}
}


		}
}


	// Which thread mode is our user using?
if(!isset($mybb->input['mode']))

	// Which thread mode is our user using by default?
if(!empty($mybb->user['threadmode']))

	{

	{

		if(!empty($mybb->user['threadmode'])) // Take user's default preference first (if there is one) and run with it
{
$mybb->input['mode'] = $mybb->user['threadmode'];
}
else if($mybb->settings['threadusenetstyle'] == 1)
{
$mybb->input['mode'] = 'threaded';
}
else
{
$mybb->input['mode'] = 'linear';
}




		$defaultmode = $mybb->user['threadmode'];
}
else if($mybb->settings['threadusenetstyle'] == 1)
{
$defaultmode = 'threaded';
}
else
{
$defaultmode = 'linear';
}

// If mode is unset, set the default mode
if(!isset($mybb->input['mode']))
{
$mybb->input['mode'] = $defaultmode;

	}

// Threaded or linear display?
if($mybb->input['mode'] == 'threaded')
{
$isfirst = 1;

	}

// Threaded or linear display?
if($mybb->input['mode'] == 'threaded')
{
$isfirst = 1;





		// Are we linked to a specific pid?
if($mybb->input['pid'])
{

		// Are we linked to a specific pid?
if($mybb->input['pid'])
{

Zeile 729Zeile 734
		$upper = $start+$perpage;

// Work out if we have terms to highlight

		$upper = $start+$perpage;

// Work out if we have terms to highlight

		$highlight = "";
if($mybb->input['highlight'])
{
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && $_SERVER['SEO_SUPPORT'] == 1))







        $highlight = "";
$threadmode = "";
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && $_SERVER['SEO_SUPPORT'] == 1))
{
if($mybb->input['highlight'])
{
$highlight = "?highlight=".urlencode($mybb->input['highlight']);
}

if($defaultmode != "linear")

			{

			{

				$highlight = "?highlight=".urlencode($mybb->input['highlight']);








	            if($mybb->input['highlight'])
{
$threadmode = "&amp;mode=linear";
}
else
{
$threadmode = "?mode=linear";
}

			}

			}

			else
{
$highlight = "&amp;highlight=".urlencode($mybb->input['highlight']);
}
}









        }
else
{
if($mybb->input['highlight'])
{
$highlight = "&amp;highlight=".urlencode($mybb->input['highlight']);
}

if($defaultmode != "linear")
{
$threadmode = "&amp;mode=linear";
}
}





		$multipage = multipage($postcount, $perpage, $page, str_replace("{tid}", $tid, THREAD_URL_PAGED.$highlight));

        $multipage = multipage($postcount, $perpage, $page, str_replace("{tid}", $tid, THREAD_URL_PAGED.$highlight.$threadmode)); 

		if($postcount > $perpage)
{
eval("\$threadpages = \"".$templates->get("showthread_multipage")."\";");

		if($postcount > $perpage)
{
eval("\$threadpages = \"".$templates->get("showthread_multipage")."\";");

Zeile 912Zeile 938
		{
$postoptionschecked['emailnotify'] = 'checked="checked"';
}

		{
$postoptionschecked['emailnotify'] = 'checked="checked"';
}

	    mt_srand((double) microtime() * 1000000);
$posthash = md5($mybb->user['uid'].mt_rand());

	    $posthash = md5($mybb->user['uid'].random_str());


		
eval("\$quickreply = \"".$templates->get("showthread_quickreply")."\";");
}

		
eval("\$quickreply = \"".$templates->get("showthread_quickreply")."\";");
}