Vergleich inc/functions_forumlist.php - 1.6.12 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 20Zeile 20
{
global $db, $fcache, $moderatorcache, $forumpermissions, $theme, $mybb, $templates, $bgcolor, $collapsed, $lang, $showdepth, $plugins, $parser, $forum_viewers;
static $private_forums;

{
global $db, $fcache, $moderatorcache, $forumpermissions, $theme, $mybb, $templates, $bgcolor, $collapsed, $lang, $showdepth, $plugins, $parser, $forum_viewers;
static $private_forums;

	



	$forum_listing = '';

// If no forums exist with this parent, do nothing

	$forum_listing = '';

// If no forums exist with this parent, do nothing

Zeile 50Zeile 50

// Get the permissions for this forum
$permissions = $forumpermissions[$forum['fid']];


// Get the permissions for this forum
$permissions = $forumpermissions[$forum['fid']];





			// If this user doesnt have permission to view this forum and we're hiding private forums, skip this forum
if($permissions['canview'] != 1 && $mybb->settings['hideprivateforums'] == 1)
{
continue;
}

			// If this user doesnt have permission to view this forum and we're hiding private forums, skip this forum
if($permissions['canview'] != 1 && $mybb->settings['hideprivateforums'] == 1)
{
continue;
}

			



			$forum = $plugins->run_hooks("build_forumbits_forum", $forum);

// Build the link to this forum

			$forum = $plugins->run_hooks("build_forumbits_forum", $forum);

// Build the link to this forum

Zeile 70Zeile 70
			{
$hideinfo = true;
}

			{
$hideinfo = true;
}

			



			if(isset($permissions['canonlyviewownthreads']) && $permissions['canonlyviewownthreads'] == 1)
{
$hidecounters = true;

			if(isset($permissions['canonlyviewownthreads']) && $permissions['canonlyviewownthreads'] == 1)
{
$hidecounters = true;

Zeile 96Zeile 96
					if(!empty($fids))
{
$fids = implode(',', $fids);

					if(!empty($fids))
{
$fids = implode(',', $fids);

						$query = $db->simple_select("threads", "tid, fid, subject, lastpost, lastposter, lastposteruid", "uid = '{$mybb->user['uid']}' AND fid IN ({$fids})", array("order_by" => "lastpost", "order_dir" => "desc"));

						$query = $db->simple_select("threads", "tid, fid, subject, lastpost, lastposter, lastposteruid", "uid = '{$mybb->user['uid']}' AND fid IN ({$fids}) AND visible != '-2'", array("order_by" => "lastpost", "order_dir" => "desc"));


while($thread = $db->fetch_array($query))
{


while($thread = $db->fetch_array($query))
{

Zeile 111Zeile 111
				if($private_forums[$forum['fid']]['lastpost'])
{
$forum['lastpost'] = $private_forums[$forum['fid']]['lastpost'];

				if($private_forums[$forum['fid']]['lastpost'])
{
$forum['lastpost'] = $private_forums[$forum['fid']]['lastpost'];

					



					$lastpost_data = array(
"lastpost" => $private_forums[$forum['fid']]['lastpost'],
"lastpostsubject" => $private_forums[$forum['fid']]['subject'],

					$lastpost_data = array(
"lastpost" => $private_forums[$forum['fid']]['lastpost'],
"lastpostsubject" => $private_forums[$forum['fid']]['subject'],

Zeile 158Zeile 158
				if($forum_info['lastpost']['lastpost'] > $lastpost_data['lastpost'])
{
$lastpost_data = $forum_info['lastpost'];

				if($forum_info['lastpost']['lastpost'] > $lastpost_data['lastpost'])
{
$lastpost_data = $forum_info['lastpost'];

					



					/*
// If our subforum is unread, then so must be our parents. Force our parents to unread as well
if(strstr($forum_info['lightbulb']['folder'], "on") !== false)

					/*
// If our subforum is unread, then so must be our parents. Force our parents to unread as well
if(strstr($forum_info['lightbulb']['folder'], "on") !== false)

Zeile 173Zeile 173
				}

$sub_forums = $forum_info['forum_list'];

				}

$sub_forums = $forum_info['forum_list'];

			}

			}


// If we are hiding information (lastpost) because we aren't authenticated against the password for this forum, remove them
if($hidelastpostinfo == true)


// If we are hiding information (lastpost) because we aren't authenticated against the password for this forum, remove them
if($hidelastpostinfo == true)

Zeile 182Zeile 182
					'lastpost' => 0
);
}

					'lastpost' => 0
);
}

			



			// If the current forums lastpost is greater than other child forums of the current parent, overwrite it
if(!isset($parent_lastpost) || $lastpost_data['lastpost'] > $parent_lastpost['lastpost'])
{

			// If the current forums lastpost is greater than other child forums of the current parent, overwrite it
if(!isset($parent_lastpost) || $lastpost_data['lastpost'] > $parent_lastpost['lastpost'])
{

Zeile 213Zeile 213
			{
continue;
}

			{
continue;
}

			



			// Get the lightbulb status indicator for this forum based on the lastpost
$lightbulb = get_forum_lightbulb($forum, $lastpost_data, $showlockicon);

			// Get the lightbulb status indicator for this forum based on the lastpost
$lightbulb = get_forum_lightbulb($forum, $lastpost_data, $showlockicon);





			// Fetch the number of unapproved threads and posts for this forum
$unapproved = get_forum_unapproved($forum);

			// Fetch the number of unapproved threads and posts for this forum
$unapproved = get_forum_unapproved($forum);

			



			if($hideinfo == true)
{
unset($unapproved);

			if($hideinfo == true)
{
unset($unapproved);

Zeile 302Zeile 302
					}
$lastpost_subject = htmlspecialchars_uni($lastpost_subject);
$full_lastpost_subject = htmlspecialchars_uni($full_lastpost_subject);

					}
$lastpost_subject = htmlspecialchars_uni($lastpost_subject);
$full_lastpost_subject = htmlspecialchars_uni($full_lastpost_subject);

					



					// Call lastpost template
if($depth != 1)

					// Call lastpost template
if($depth != 1)

					{						

					{

						eval("\$lastpost = \"".$templates->get("forumbit_depth{$depth}_forum_lastpost")."\";");
}
}

						eval("\$lastpost = \"".$templates->get("forumbit_depth{$depth}_forum_lastpost")."\";");
}
}

Zeile 315Zeile 315
					if($forum['viewers'] == 1)
{
$forum_viewers_text = $lang->viewing_one;

					if($forum['viewers'] == 1)
{
$forum_viewers_text = $lang->viewing_one;

					}

					}

					else
{
$forum_viewers_text = $lang->sprintf($lang->viewing_multiple, $forum['viewers']);

					else
{
$forum_viewers_text = $lang->sprintf($lang->viewing_multiple, $forum['viewers']);

Zeile 323Zeile 323
					$forum_viewers_text_plain = $forum_viewers_text;
$forum_viewers_text = "<span class=\"smalltext\">{$forum_viewers_text}</span>";
}

					$forum_viewers_text_plain = $forum_viewers_text;
$forum_viewers_text = "<span class=\"smalltext\">{$forum_viewers_text}</span>";
}

			}

			}

			// If this forum is a link or is password protected and the user isn't authenticated, set counters to "-"
if($forum['linkto'] != '' || $hideinfo == true || $hidecounters == true)
{

			// If this forum is a link or is password protected and the user isn't authenticated, set counters to "-"
if($forum['linkto'] != '' || $hideinfo == true || $hidecounters == true)
{

Zeile 336Zeile 336
				$posts = my_number_format($forum['posts']);
$threads = my_number_format($forum['threads']);
}

				$posts = my_number_format($forum['posts']);
$threads = my_number_format($forum['threads']);
}

			



			// If this forum is a link or is password protected and the user isn't authenticated, set lastpost to "-"
if($forum['linkto'] != '' || $hideinfo == true || $hidelastpostinfo == true)
{

			// If this forum is a link or is password protected and the user isn't authenticated, set lastpost to "-"
if($forum['linkto'] != '' || $hideinfo == true || $hidelastpostinfo == true)
{

Zeile 488Zeile 488
		//{
//$forum_read = $mybb->user['lastvisit'];
//}

		//{
//$forum_read = $mybb->user['lastvisit'];
//}

		
// If the lastpost is greater than the last visit and is greater than the forum read date, we have a new post
if($lastpost['lastpost'] > $forum_read && $lastpost['lastpost'] != 0)


// If the lastpost is greater than the last visit and is greater than the forum read date, we have a new post
if($lastpost['lastpost'] > $forum_read && $lastpost['lastpost'] != 0)

		{
$unread_forums++;
$folder = "on";

		{
$unread_forums++;
$folder = "on";