Vergleich portal.php - 1.8.5 - 1.8.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 31Zeile 31
	}
}


	}
}


$templatelist = "portal,portal_welcome_membertext,portal_stats,portal_search,portal_whosonline_memberbit,portal_whosonline,portal_latestthreads_thread,portal_latestthreads,portal_announcement_numcomments_no,portal_announcement,portal_welcome";
$templatelist .= ",portal_welcome_guesttext,postbit_attachments_thumbnails_thumbnail,postbit_attachments_images_image,postbit_attachments_attachment,postbit_attachments_thumbnails,postbit_attachments_images,postbit_attachments,portal_pms";
$templatelist .= ",multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,portal_announcement_send_item,portal_announcement_icon,portal_announcement_avatar,portal_announcement_numcomments";


$templatelist = "portal,portal_welcome_membertext,portal_stats,portal_search,portal_whosonline_memberbit,portal_whosonline,portal_latestthreads_thread,portal_latestthreads,portal_announcement_numcomments_no";
$templatelist .= ",postbit_attachments_thumbnails_thumbnail,postbit_attachments_images_image,postbit_attachments_attachment,postbit_attachments_thumbnails,postbit_attachments_images,postbit_attachments";
$templatelist .= ",multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,portal_announcement_send_item";
$templatelist .= ",portal_stats_nobody,portal_announcement_avatar,portal_announcement_numcomments,portal_announcement_icon,portal_pms,portal_welcome,portal_announcement,portal_welcome_guesttext";


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


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

Zeile 73Zeile 74
	$unviewwhere .= " AND fid NOT IN ($inactive)";
$tunviewwhere .= " AND t.fid NOT IN ($inactive)";
}

	$unviewwhere .= " AND fid NOT IN ($inactive)";
$tunviewwhere .= " AND t.fid NOT IN ($inactive)";
}

 

$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']);


$welcome = '';
// If user is known, welcome them


$welcome = '';
// If user is known, welcome them

Zeile 160Zeile 163
				break;
case 1:
$username = $lang->username1;

				break;
case 1:
$username = $lang->username1;

				break;

				break;

			case 2:
$username = $lang->username2;
break;

			case 2:
$username = $lang->username2;
break;

Zeile 177Zeile 180
$pms = '';
// Private messages box
if($mybb->settings['portal_showpms'] != 0)

$pms = '';
// Private messages box
if($mybb->settings['portal_showpms'] != 0)

{

{

	if($mybb->user['uid'] != 0 && $mybb->user['receivepms'] != 0 && $mybb->usergroup['canusepms'] != 0 && $mybb->settings['enablepms'] != 0)
{
$messages['pms_total'] = $mybb->user['pms_total'];
$messages['pms_unread'] = $mybb->user['pms_unread'];

	if($mybb->user['uid'] != 0 && $mybb->user['receivepms'] != 0 && $mybb->usergroup['canusepms'] != 0 && $mybb->settings['enablepms'] != 0)
{
$messages['pms_total'] = $mybb->user['pms_total'];
$messages['pms_unread'] = $mybb->user['pms_unread'];





		$lang->pms_received_new = $lang->sprintf($lang->pms_received_new, $mybb->user['username'], $messages['pms_unread']);
eval("\$pms = \"".$templates->get("portal_pms")."\";");
}

		$lang->pms_received_new = $lang->sprintf($lang->pms_received_new, $mybb->user['username'], $messages['pms_unread']);
eval("\$pms = \"".$templates->get("portal_pms")."\";");
}

Zeile 198Zeile 201
	$stats['numusers'] = my_number_format($stats['numusers']);
if(!$stats['lastusername'])
{

	$stats['numusers'] = my_number_format($stats['numusers']);
if(!$stats['lastusername'])
{

		$newestmember = "<strong>" . $lang->nobody . "</strong>";

		eval("\$newestmember = \"".$templates->get("portal_stats_nobody")."\";");

	}
else
{
$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
}
eval("\$stats = \"".$templates->get("portal_stats")."\";");

	}
else
{
$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
}
eval("\$stats = \"".$templates->get("portal_stats")."\";");

}

}


$search = '';
// Search box


$search = '';
// Search box

Zeile 222Zeile 225
	{
$order_by = 'u.username ASC';
$order_by2 = 's.time DESC';

	{
$order_by = 'u.username ASC';
$order_by2 = 's.time DESC';

	}

	}

	else
{
$order_by = 's.time DESC';

	else
{
$order_by = 's.time DESC';

Zeile 243Zeile 246
	");
while($user = $db->fetch_array($query))
{

	");
while($user = $db->fetch_array($query))
{





		// Create a key to test if this user is a search bot.
$botkey = my_strtolower(str_replace("bot=", '', $user['sid']));

if($user['uid'] == "0")

		// Create a key to test if this user is a search bot.
$botkey = my_strtolower(str_replace("bot=", '', $user['sid']));

if($user['uid'] == "0")

		{

		{

			++$guestcount;
}
elseif(my_strpos($user['sid'], "bot=") !== false && $session->bots[$botkey])

			++$guestcount;
}
elseif(my_strpos($user['sid'], "bot=") !== false && $session->bots[$botkey])

		{

		{

			// The user is a search bot.
$onlinemembers .= $comma.format_name($session->bots[$botkey], $session->botgroup);
$comma = $lang->comma;
++$botcount;

			// The user is a search bot.
$onlinemembers .= $comma.format_name($session->bots[$botkey], $session->botgroup);
$comma = $lang->comma;
++$botcount;

		}

		}

		else
{
if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])

		else
{
if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])

Zeile 267Zeile 270
				$doneusers[$user['uid']] = $user['time'];

// If the user is logged in anonymously, update the count for that.

				$doneusers[$user['uid']] = $user['time'];

// If the user is logged in anonymously, update the count for that.

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

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

				{
++$anoncount;
}

				{
++$anoncount;
}

Zeile 277Zeile 280
					$invisiblemark = "*";
}
else

					$invisiblemark = "*";
}
else

				{

				{

					$invisiblemark = '';
}

if(($user['invisible'] == 1 && ($mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])) || $user['invisible'] != 1)
{

					$invisiblemark = '';
}

if(($user['invisible'] == 1 && ($mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])) || $user['invisible'] != 1)
{

					$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);

					$user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);

					$user['profilelink'] = get_profile_link($user['uid']);
eval("\$onlinemembers .= \"".$templates->get("portal_whosonline_memberbit", 1, 0)."\";");
$comma = $lang->comma;
}

					$user['profilelink'] = get_profile_link($user['uid']);
eval("\$onlinemembers .= \"".$templates->get("portal_whosonline_memberbit", 1, 0)."\";");
$comma = $lang->comma;
}

			}
}
}

$onlinecount = $membercount + $guestcount + $botcount;

			}
}
}

$onlinecount = $membercount + $guestcount + $botcount;


// If we can see invisible users add them to the count
if($mybb->usergroup['canviewwolinvis'] == 1)
{
$onlinecount += $anoncount;


// If we can see invisible users add them to the count
if($mybb->usergroup['canviewwolinvis'] == 1)
{
$onlinecount += $anoncount;

	}

	}


// If we can't see invisible users but the user is an invisible user incriment the count by one
if($mybb->usergroup['canviewwolinvis'] != 1 && isset($mybb->user['invisible']) && $mybb->user['invisible'] == 1)


// If we can't see invisible users but the user is an invisible user incriment the count by one
if($mybb->usergroup['canviewwolinvis'] != 1 && isset($mybb->user['invisible']) && $mybb->user['invisible'] == 1)

Zeile 309Zeile 312
	// Most users online
$mostonline = $cache->read("mostonline");
if($onlinecount > $mostonline['numusers'])

	// Most users online
$mostonline = $cache->read("mostonline");
if($onlinecount > $mostonline['numusers'])

	{

	{

		$time = TIME_NOW;
$mostonline['numusers'] = $onlinecount;
$mostonline['time'] = $time;
$cache->update("mostonline", $mostonline);

		$time = TIME_NOW;
$mostonline['numusers'] = $onlinecount;
$mostonline['time'] = $time;
$cache->update("mostonline", $mostonline);

	}

	}

	$recordcount = $mostonline['numusers'];
$recorddate = my_date('relative', $mostonline['time']);


	$recordcount = $mostonline['numusers'];
$recorddate = my_date('relative', $mostonline['time']);


Zeile 336Zeile 339
{
$altbg = alt_trow();
$threadlist = '';

{
$altbg = alt_trow();
$threadlist = '';





	$excludeforums = '';
if(!empty($mybb->settings['portal_excludediscussion']))
{

	$excludeforums = '';
if(!empty($mybb->settings['portal_excludediscussion']))
{

Zeile 362Zeile 365
		}

$lastpostdate = my_date('relative', $thread['lastpost']);

		}

$lastpostdate = my_date('relative', $thread['lastpost']);

 
		$lastposter = htmlspecialchars_uni($thread['lastposter']);

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

// Don't link to guest's profiles (they have no profile).
if($thread['lastposteruid'] == 0)
{

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

// Don't link to guest's profiles (they have no profile).
if($thread['lastposteruid'] == 0)
{

			$lastposterlink = $thread['lastposter'];

			$lastposterlink = $lastposter;

		}
else

		}
else

		{
$lastposterlink = build_profile_link($thread['lastposter'], $thread['lastposteruid']);
}



		{
$lastposterlink = build_profile_link($lastposter, $thread['lastposteruid']);
}

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

		if(my_strlen($thread['subject']) > 25)
{
$thread['subject'] = my_substr($thread['subject'], 0, 25) . "...";
}

		if(my_strlen($thread['subject']) > 25)
{
$thread['subject'] = my_substr($thread['subject'], 0, 25) . "...";
}

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



		$thread['subject'] = htmlspecialchars_uni($thread['subject']);
$thread['fullsubject'] = htmlspecialchars_uni($thread['fullsubject']);


		$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
$thread['forumlink'] = get_forum_link($thread['fid']);

		$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
$thread['forumlink'] = get_forum_link($thread['fid']);

Zeile 426Zeile 434
			$forum[$fid] = $f;
}
}

			$forum[$fid] = $f;
}
}

	



	$query = $db->simple_select("threads t", "COUNT(t.tid) AS threads", "t.visible='1'{$annfidswhere}{$tunviewwhere} AND t.closed NOT LIKE 'moved|%'", array('limit' => 1));
$announcementcount = $db->fetch_field($query, "threads");


	$query = $db->simple_select("threads t", "COUNT(t.tid) AS threads", "t.visible='1'{$annfidswhere}{$tunviewwhere} AND t.closed NOT LIKE 'moved|%'", array('limit' => 1));
$announcementcount = $db->fetch_field($query, "threads");