Vergleich forumdisplay.php - 1.8.30 - 1.8.38

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


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


$templatelist = "forumdisplay,forumdisplay_thread,forumbit_depth1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,forumdisplay_moderatedby,forumdisplay_searchforum,forumdisplay_thread_rating,forumdisplay_threadlist_rating";

$templatelist = "forumdisplay,forumdisplay_thread,forumbit_depth1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,forumdisplay_moderatedby,forumdisplay_searchforum,forumdisplay_forumsort,forumdisplay_thread_rating,forumdisplay_threadlist_rating";

$templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_gotounread,forumbit_depth2_forum_lastpost,forumdisplay_rules_link,forumdisplay_orderarrow,forumdisplay_newthread";
$templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,forumdisplay_thread_unapproved_posts,forumdisplay_nothreads";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdisplay_password_wrongpass,forumdisplay_password,forumdisplay_inlinemoderation_custom_tool,forumbit_subforums,forumbit_moderators,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden";

$templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_gotounread,forumbit_depth2_forum_lastpost,forumdisplay_rules_link,forumdisplay_orderarrow,forumdisplay_newthread";
$templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,forumdisplay_thread_unapproved_posts,forumdisplay_nothreads";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdisplay_password_wrongpass,forumdisplay_password,forumdisplay_inlinemoderation_custom_tool,forumbit_subforums,forumbit_moderators,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden";

Zeile 95Zeile 95
	$forumsread = array();
if(isset($mybb->cookies['mybb']['forumread']))
{

	$forumsread = array();
if(isset($mybb->cookies['mybb']['forumread']))
{

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

		$forumsread = my_unserialize($mybb->cookies['mybb']['forumread'], false);

	}

if(is_array($forumsread) && empty($forumsread))

	}

if(is_array($forumsread) && empty($forumsread))

Zeile 172Zeile 172
}

// Make forum jump...

}

// Make forum jump...

 
$forumjump = '';

if($mybb->settings['enableforumjump'] != 0)
{
$forumjump = build_forum_jump("", $fid, 1);

if($mybb->settings['enableforumjump'] != 0)
{
$forumjump = build_forum_jump("", $fid, 1);

Zeile 275Zeile 276
}

// Get the users browsing this forum.

}

// Get the users browsing this forum.

 
$usersbrowsing = '';

if($mybb->settings['browsingthisforum'] != 0)
{
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];

if($mybb->settings['browsingthisforum'] != 0)
{
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];

Zeile 305Zeile 307
		{
$doneusers[$user['uid']] = $user['time'];
++$membercount;

		{
$doneusers[$user['uid']] = $user['time'];
++$membercount;

			if($user['invisible'] == 1 && $mybb->usergroup['canbeinvisible'] == 1)

			if($user['invisible'] == 1)

			{
$invisiblemark = "*";
++$inviscount;

			{
$invisiblemark = "*";
++$inviscount;

Zeile 789Zeile 791
	$cookie = array();
if(isset($mybb->cookies['mybb']['announcements']))
{

	$cookie = array();
if(isset($mybb->cookies['mybb']['announcements']))
{

		$cookie = my_unserialize(stripslashes($mybb->cookies['mybb']['announcements']));

		$cookie = my_unserialize(stripslashes($mybb->cookies['mybb']['announcements']), false);

	}

$announcementlist = '';

	}

$announcementlist = '';

Zeile 1089Zeile 1091
		$thread['subject'] = $parser->parse_badwords($thread['subject']);
$thread['subject'] = htmlspecialchars_uni($thread['subject']);


		$thread['subject'] = $parser->parse_badwords($thread['subject']);
$thread['subject'] = htmlspecialchars_uni($thread['subject']);


		if($thread['icon'] > 0 && $icon_cache[$thread['icon']])

		if($thread['icon'] > 0 && isset($icon_cache[$thread['icon']]))

		{
$icon = $icon_cache[$thread['icon']];
$icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);

		{
$icon = $icon_cache[$thread['icon']];
$icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);

Zeile 1129Zeile 1131
			}
else
{

			}
else
{

				$thread['averagerating'] = (float)round($thread['averagerating'], 2);
$thread['width'] = (int)round($thread['averagerating'])*20;

 
				$thread['numratings'] = (int)$thread['numratings'];

				$thread['numratings'] = (int)$thread['numratings'];

 

if($thread['numratings'] == 0)
{
$thread['averagerating'] = 0;
$thread['width'] = 0;
}
else
{
$thread['averagerating'] = (float)round($thread['averagerating'], 2);
$thread['width'] = (int)round($thread['averagerating']) * 20;
}


$not_rated = '';
if(!isset($thread['rated']) || empty($thread['rated']))


$not_rated = '';
if(!isset($thread['rated']) || empty($thread['rated']))

Zeile 1164Zeile 1175
		{
$thread['posts'] += $thread['deletedposts'];
}

		{
$thread['posts'] += $thread['deletedposts'];
}





		if($thread['posts'] > $mybb->settings['postsperpage'])
{
$thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage'];

		if($thread['posts'] > $mybb->settings['postsperpage'])
{
$thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage'];

Zeile 1182Zeile 1193
			}

for($i = 1; $i <= $pagesstop; ++$i)

			}

for($i = 1; $i <= $pagesstop; ++$i)

			{

			{

				$page_link = get_thread_link($thread['tid'], $i);
eval("\$threadpages .= \"".$templates->get("forumdisplay_thread_multipage_page")."\";");
}

				$page_link = get_thread_link($thread['tid'], $i);
eval("\$threadpages .= \"".$templates->get("forumdisplay_thread_multipage_page")."\";");
}

Zeile 1281Zeile 1292
		{
$folder .= "hot";
$folder_label .= $lang->icon_hot;

		{
$folder .= "hot";
$folder_label .= $lang->icon_hot;

		}

		}


if($thread['closed'] == 1)
{


if($thread['closed'] == 1)
{

Zeile 1298Zeile 1309
		$folder .= "folder";

$inline_edit_tid = $thread['tid'];

		$folder .= "folder";

$inline_edit_tid = $thread['tid'];





		// If this user is the author of the thread and it is not closed or they are a moderator, they can edit
$inline_edit_class = '';
if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $can_edit_titles == 1) || $ismod == true)
{
$inline_edit_class = "subject_editable";

		// If this user is the author of the thread and it is not closed or they are a moderator, they can edit
$inline_edit_class = '';
if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $can_edit_titles == 1) || $ismod == true)
{
$inline_edit_class = "subject_editable";

		}

		}



$lastposteruid = $thread['lastposteruid'];



$lastposteruid = $thread['lastposteruid'];

Zeile 1322Zeile 1333
		if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

		if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

		}

		}

		else
{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}

		else
{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}





		$thread['replies'] = my_number_format($thread['replies']);

		$thread['replies'] = my_number_format($thread['replies']);

		$thread['views'] = my_number_format($thread['views']);


		$thread['views'] = my_number_format($thread['views']);


		// Threads and posts requiring moderation
if($thread['unapprovedposts'] > 0 && is_moderator($fid, "canviewunapprove"))
{
if($thread['unapprovedposts'] > 1)
{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_posts_count, $thread['unapprovedposts']);

		// Threads and posts requiring moderation
if($thread['unapprovedposts'] > 0 && is_moderator($fid, "canviewunapprove"))
{
if($thread['unapprovedposts'] > 1)
{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_posts_count, $thread['unapprovedposts']);

			}

			}

			else
{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_post_count, 1);

			else
{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_post_count, 1);

Zeile 1345Zeile 1356

$thread['unapprovedposts'] = my_number_format($thread['unapprovedposts']);
eval("\$unapproved_posts = \"".$templates->get("forumdisplay_thread_unapproved_posts")."\";");


$thread['unapprovedposts'] = my_number_format($thread['unapprovedposts']);
eval("\$unapproved_posts = \"".$templates->get("forumdisplay_thread_unapproved_posts")."\";");

		}
else
{
$unapproved_posts = '';
}

		}
else
{
$unapproved_posts = '';
}


// If this thread has 1 or more attachments show the papperclip
if($mybb->settings['enableattachments'] == 1 && $thread['attachmentcount'] > 0)
{
if($thread['attachmentcount'] > 1)


// If this thread has 1 or more attachments show the papperclip
if($mybb->settings['enableattachments'] == 1 && $thread['attachmentcount'] > 0)
{
if($thread['attachmentcount'] > 1)

			{

			{

				$attachment_count = $lang->sprintf($lang->attachment_count_multiple, $thread['attachmentcount']);

				$attachment_count = $lang->sprintf($lang->attachment_count_multiple, $thread['attachmentcount']);

			}

			}

			else
{
$attachment_count = $lang->attachment_count;
}

			else
{
$attachment_count = $lang->attachment_count;
}





			eval("\$attachment_count = \"".$templates->get("forumdisplay_thread_attachment_count")."\";");
}
else
{
$attachment_count = '';

			eval("\$attachment_count = \"".$templates->get("forumdisplay_thread_attachment_count")."\";");
}
else
{
$attachment_count = '';

		}

		}


$plugins->run_hooks("forumdisplay_thread_end");



$plugins->run_hooks("forumdisplay_thread_end");


Zeile 1380Zeile 1391
		{
$thread['start_datetime'] = my_date('relative', $thread['dateline']);
eval("\$threads .= \"".$templates->get("forumdisplay_thread")."\";");

		{
$thread['start_datetime'] = my_date('relative', $thread['dateline']);
eval("\$threads .= \"".$templates->get("forumdisplay_thread")."\";");

		}

		}

	}

$customthreadtools = $standardthreadtools = '';

	}

$customthreadtools = $standardthreadtools = '';

Zeile 1397Zeile 1408
			{
case "pgsql":
case "sqlite":

			{
case "pgsql":
case "sqlite":

					foreach($gids as $gid)
{
$gid = (int)$gid;

					foreach($gids as $gid)
{
$gid = (int)$gid;

						$gidswhere .= " OR ','||groups||',' LIKE '%,{$gid},%'";
}
$query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND (groups='' OR ','||groups||',' LIKE '%,-1,%'{$gidswhere}) AND type = 't'");

						$gidswhere .= " OR ','||groups||',' LIKE '%,{$gid},%'";
}
$query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND (groups='' OR ','||groups||',' LIKE '%,-1,%'{$gidswhere}) AND type = 't'");

Zeile 1429Zeile 1440
		$inlinemodopenclose = $inlinemodstickunstick = $inlinemodsoftdelete = $inlinemodrestore = $inlinemoddelete = $inlinemodmanage = $inlinemodapproveunapprove = '';

if(is_moderator($fid, "canopenclosethreads"))

		$inlinemodopenclose = $inlinemodstickunstick = $inlinemodsoftdelete = $inlinemodrestore = $inlinemoddelete = $inlinemodmanage = $inlinemodapproveunapprove = '';

if(is_moderator($fid, "canopenclosethreads"))

		{

		{

			eval("\$inlinemodopenclose = \"".$templates->get("forumdisplay_inlinemoderation_openclose")."\";");
}


			eval("\$inlinemodopenclose = \"".$templates->get("forumdisplay_inlinemoderation_openclose")."\";");
}


Zeile 1502Zeile 1513

eval("\$addremovesubscription = \"".$templates->get("forumdisplay_threadlist_subscription")."\";");
}


eval("\$addremovesubscription = \"".$templates->get("forumdisplay_threadlist_subscription")."\";");
}


$inline_edit_js = $clearstoredpass = '';

 

// Is this a real forum with threads?
if($foruminfo['type'] != "c")


// Is this a real forum with threads?
if($foruminfo['type'] != "c")

Zeile 1516Zeile 1525
	if(!$threadcount && $fpermissions['canviewthreads'] == 1)
{
eval("\$threads = \"".$templates->get("forumdisplay_nothreads")."\";");

	if(!$threadcount && $fpermissions['canviewthreads'] == 1)
{
eval("\$threads = \"".$templates->get("forumdisplay_nothreads")."\";");

	}

	}


$clearstoredpass = '';
if($foruminfo['password'] != '')
{
eval("\$clearstoredpass = \"".$templates->get("forumdisplay_threadlist_clearpass")."\";");


$clearstoredpass = '';
if($foruminfo['password'] != '')
{
eval("\$clearstoredpass = \"".$templates->get("forumdisplay_threadlist_clearpass")."\";");

	}

	}


$prefixselect = build_forum_prefix_select($fid, $tprefix);

// Populate Forumsort
$forumsort = '';


$prefixselect = build_forum_prefix_select($fid, $tprefix);

// Populate Forumsort
$forumsort = '';

	
if($threadcount > 0)
{
eval("\$forumsort = \"".$templates->get("forumdisplay_forumsort")."\";");
}


	eval("\$forumsort = \"".$templates->get("forumdisplay_forumsort")."\";");






	$plugins->run_hooks("forumdisplay_threadlist");

$lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));

	$plugins->run_hooks("forumdisplay_threadlist");

$lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));