Vergleich inc/functions_post.php - 1.8.7 - 1.8.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 126Zeile 126
			}
break;
}

			}
break;
}

 

$post['username'] = htmlspecialchars_uni($post['username']);
$post['userusername'] = htmlspecialchars_uni($post['userusername']);


if(!$postcounter)
{ // Used to show the # of the post


if(!$postcounter)
{ // Used to show the # of the post

Zeile 137Zeile 140
			}

$postcounter = $mybb->settings['postsperpage']*($page-1);

			}

$postcounter = $mybb->settings['postsperpage']*($page-1);

		}

		}

		else
{
$postcounter = 0;
}

		else
{
$postcounter = 0;
}

		$post_extra_style = "border-top-width: 0;";
}

		$post_extra_style = "border-top-width: 0;";
}

	elseif($mybb->input['mode'] == "threaded")
{
$post_extra_style = "border-top-width: 0;";

	elseif($mybb->input['mode'] == "threaded")
{
$post_extra_style = "border-top-width: 0;";

	}
else

	}
else

	{
$post_extra_style = "margin-top: 5px;";
}

	{
$post_extra_style = "margin-top: 5px;";
}

Zeile 169Zeile 172
	if($post_type != 2)
{
$post['subject'] = htmlspecialchars_uni($post['subject']);

	if($post_type != 2)
{
$post['subject'] = htmlspecialchars_uni($post['subject']);

	}


	}


	if(empty($post['subject']))
{
$post['subject'] = ' ';
}

	if(empty($post['subject']))
{
$post['subject'] = ' ';
}





	$post['author'] = $post['uid'];
$post['subject_title'] = $post['subject'];

// Get the usergroup
if($post['userusername'])

	$post['author'] = $post['uid'];
$post['subject_title'] = $post['subject'];

// Get the usergroup
if($post['userusername'])

	{

	{

		if(!$post['displaygroup'])
{
$post['displaygroup'] = $post['usergroup'];
}
$usergroup = $groupscache[$post['displaygroup']];

		if(!$post['displaygroup'])
{
$post['displaygroup'] = $post['usergroup'];
}
$usergroup = $groupscache[$post['displaygroup']];

	}

	}

	else
{
$usergroup = $groupscache[1];

	else
{
$usergroup = $groupscache[1];

	}


	}


	if(!is_array($titlescache))
{
$cached_titles = $cache->read("usertitles");

	if(!is_array($titlescache))
{
$cached_titles = $cache->read("usertitles");

Zeile 202Zeile 205
			{
$titlescache[$usertitle['posts']] = $usertitle;
}

			{
$titlescache[$usertitle['posts']] = $usertitle;
}

		}


		}


		if(is_array($titlescache))
{
krsort($titlescache);

		if(is_array($titlescache))
{
krsort($titlescache);

Zeile 214Zeile 217
	// Work out the usergroup/title stuff
$post['groupimage'] = '';
if(!empty($usergroup['image']))

	// Work out the usergroup/title stuff
$post['groupimage'] = '';
if(!empty($usergroup['image']))

	{

	{

		$language = $mybb->settings['bblanguage'];
if(!empty($mybb->user['language']))
{

		$language = $mybb->settings['bblanguage'];
if(!empty($mybb->user['language']))
{

Zeile 247Zeile 250
		if($usergroup['usertitle'] != "" && !$hascustomtitle)
{
$post['usertitle'] = $usergroup['usertitle'];

		if($usergroup['usertitle'] != "" && !$hascustomtitle)
{
$post['usertitle'] = $usergroup['usertitle'];

		}

		}

		elseif(is_array($titlescache) && !$usergroup['usertitle'])
{
reset($titlescache);

		elseif(is_array($titlescache) && !$usergroup['usertitle'])
{
reset($titlescache);

Zeile 269Zeile 272
		$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);

if($usergroup['stars'])

		$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);

if($usergroup['stars'])

		{

		{

			$post['stars'] = $usergroup['stars'];
}


			$post['stars'] = $usergroup['stars'];
}


Zeile 291Zeile 294

$post['userstars'] .= "<br />";
}


$post['userstars'] .= "<br />";
}





		$postnum = $post['postnum'];
$post['postnum'] = my_number_format($post['postnum']);
$post['threadnum'] = my_number_format($post['threadnum']);

		$postnum = $post['postnum'];
$post['postnum'] = my_number_format($post['postnum']);
$post['threadnum'] = my_number_format($post['threadnum']);

Zeile 301Zeile 304
		if($post['lastactive'] > $timecut && ($post['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1) && $post['lastvisit'] != $post['lastactive'])
{
eval("\$post['onlinestatus'] = \"".$templates->get("postbit_online")."\";");

		if($post['lastactive'] > $timecut && ($post['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1) && $post['lastvisit'] != $post['lastactive'])
{
eval("\$post['onlinestatus'] = \"".$templates->get("postbit_online")."\";");

		}

		}

		else
{
if($post['away'] == 1 && $mybb->settings['allowaway'] != 0)

		else
{
if($post['away'] == 1 && $mybb->settings['allowaway'] != 0)

			{

			{

				eval("\$post['onlinestatus'] = \"".$templates->get("postbit_away")."\";");

				eval("\$post['onlinestatus'] = \"".$templates->get("postbit_away")."\";");

			}

			}

			else
{
eval("\$post['onlinestatus'] = \"".$templates->get("postbit_offline")."\";");

			else
{
eval("\$post['onlinestatus'] = \"".$templates->get("postbit_offline")."\";");

			}
}

			}
}


$post['useravatar'] = '';
if(isset($mybb->user['showavatars']) && $mybb->user['showavatars'] != 0 || $mybb->user['uid'] == 0)


$post['useravatar'] = '';
if(isset($mybb->user['showavatars']) && $mybb->user['showavatars'] != 0 || $mybb->user['uid'] == 0)

Zeile 323Zeile 326

$post['button_find'] = '';
if($mybb->usergroup['cansearch'] == 1)


$post['button_find'] = '';
if($mybb->usergroup['cansearch'] == 1)

		{

		{

			eval("\$post['button_find'] = \"".$templates->get("postbit_find")."\";");

			eval("\$post['button_find'] = \"".$templates->get("postbit_find")."\";");

		}


		}


		if($mybb->settings['enablepms'] == 1 && $post['receivepms'] != 0 && $mybb->usergroup['cansendpms'] == 1 && my_strpos(",".$post['ignorelist'].",", ",".$mybb->user['uid'].",") === false)
{
eval("\$post['button_pm'] = \"".$templates->get("postbit_pm")."\";");

		if($mybb->settings['enablepms'] == 1 && $post['receivepms'] != 0 && $mybb->usergroup['cansendpms'] == 1 && my_strpos(",".$post['ignorelist'].",", ",".$mybb->user['uid'].",") === false)
{
eval("\$post['button_pm'] = \"".$templates->get("postbit_pm")."\";");

Zeile 334Zeile 337

$post['button_rep'] = '';
if($post_type != 3 && $mybb->settings['enablereputation'] == 1 && $mybb->settings['postrep'] == 1 && $mybb->usergroup['cangivereputations'] == 1 && $usergroup['usereputationsystem'] == 1 && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']) && $post['uid'] != $mybb->user['uid'] && (!isset($post['visible']) || $post['visible'] == 1) && (!isset($thread['visible']) || $thread['visible'] == 1))


$post['button_rep'] = '';
if($post_type != 3 && $mybb->settings['enablereputation'] == 1 && $mybb->settings['postrep'] == 1 && $mybb->usergroup['cangivereputations'] == 1 && $usergroup['usereputationsystem'] == 1 && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']) && $post['uid'] != $mybb->user['uid'] && (!isset($post['visible']) || $post['visible'] == 1) && (!isset($thread['visible']) || $thread['visible'] == 1))

		{

		{

			if(!$post['pid'])
{
$post['pid'] = 0;

			if(!$post['pid'])
{
$post['pid'] = 0;

Zeile 356Zeile 359
		if($post['hideemail'] != 1 && $mybb->usergroup['cansendemail'] == 1)
{
eval("\$post['button_email'] = \"".$templates->get("postbit_email")."\";");

		if($post['hideemail'] != 1 && $mybb->usergroup['cansendemail'] == 1)
{
eval("\$post['button_email'] = \"".$templates->get("postbit_email")."\";");

		}

		}

		else
{
$post['button_email'] = "";

		else
{
$post['button_email'] = "";

Zeile 377Zeile 380
			if($mybb->settings['maxwarningpoints'] < 1)
{
$mybb->settings['maxwarningpoints'] = 10;

			if($mybb->settings['maxwarningpoints'] < 1)
{
$mybb->settings['maxwarningpoints'] = 10;

			}


			}


			$warning_level = round($post['warningpoints']/$mybb->settings['maxwarningpoints']*100);
if($warning_level > 100)
{

			$warning_level = round($post['warningpoints']/$mybb->settings['maxwarningpoints']*100);
if($warning_level > 100)
{

Zeile 388Zeile 391

// If we can warn them, it's not the same person, and we're in a PM or a post.
if($mybb->usergroup['canwarnusers'] != 0 && $post['uid'] != $mybb->user['uid'] && ($post_type == 0 || $post_type == 2))


// If we can warn them, it's not the same person, and we're in a PM or a post.
if($mybb->usergroup['canwarnusers'] != 0 && $post['uid'] != $mybb->user['uid'] && ($post_type == 0 || $post_type == 2))

			{

			{

				eval("\$post['button_warn'] = \"".$templates->get("postbit_warn")."\";");
$warning_link = "warnings.php?uid={$post['uid']}";

				eval("\$post['button_warn'] = \"".$templates->get("postbit_warn")."\";");
$warning_link = "warnings.php?uid={$post['uid']}";

			}

			}

			else
{
$post['button_warn'] = '';
$warning_link = "usercp.php";
}
eval("\$post['warninglevel'] = \"".$templates->get("postbit_warninglevel")."\";");

			else
{
$post['button_warn'] = '';
$warning_link = "usercp.php";
}
eval("\$post['warninglevel'] = \"".$templates->get("postbit_warninglevel")."\";");

		}


		}


		if($post_type != 3 && $post_type != 1 && purgespammer_show($post['postnum'], $post['usergroup'], $post['uid']))
{
eval("\$post['button_purgespammer'] = \"".$templates->get('postbit_purgespammer')."\";");

		if($post_type != 3 && $post_type != 1 && purgespammer_show($post['postnum'], $post['usergroup'], $post['uid']))
{
eval("\$post['button_purgespammer'] = \"".$templates->get('postbit_purgespammer')."\";");

Zeile 421Zeile 424
					$useropts = explode("\n", $post[$fieldfid]);

if(is_array($useropts) && ($type == "multiselect" || $type == "checkbox"))

					$useropts = explode("\n", $post[$fieldfid]);

if(is_array($useropts) && ($type == "multiselect" || $type == "checkbox"))

					{

					{

						foreach($useropts as $val)

						foreach($useropts as $val)

						{

						{

							if($val != '')
{
eval("\$post['fieldvalue_option'] .= \"".$templates->get("postbit_profilefield_multiselect_value")."\";");

							if($val != '')
{
eval("\$post['fieldvalue_option'] .= \"".$templates->get("postbit_profilefield_multiselect_value")."\";");

Zeile 432Zeile 435
						if($post['fieldvalue_option'] != '')
{
eval("\$post['fieldvalue'] .= \"".$templates->get("postbit_profilefield_multiselect")."\";");

						if($post['fieldvalue_option'] != '')
{
eval("\$post['fieldvalue'] .= \"".$templates->get("postbit_profilefield_multiselect")."\";");

						}

						}

					}
else
{

					}
else
{

Zeile 453Zeile 456
						else
{
$field_parser_options['nl2br'] = 0;

						else
{
$field_parser_options['nl2br'] = 0;

						}


						}


						if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
{
$field_parser_options['allow_imgcode'] = 0;

						if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
{
$field_parser_options['allow_imgcode'] = 0;

Zeile 475Zeile 478
		$post['profilelink'] = format_name($post['username'], 1);

if($usergroup['usertitle'])

		$post['profilelink'] = format_name($post['username'], 1);

if($usergroup['usertitle'])

		{

		{

			$post['usertitle'] = $usergroup['usertitle'];
}
else

			$post['usertitle'] = $usergroup['usertitle'];
}
else

Zeile 539Zeile 542
		{
$post['editdate'] = my_date('relative', $post['edittime']);
$post['editnote'] = $lang->sprintf($lang->postbit_edited, $post['editdate']);

		{
$post['editdate'] = my_date('relative', $post['edittime']);
$post['editnote'] = $lang->sprintf($lang->postbit_edited, $post['editdate']);

 
			$post['editusername'] = htmlspecialchars_uni($post['editusername']);

			$post['editedprofilelink'] = build_profile_link($post['editusername'], $post['edituid']);
$editreason = "";
if($post['editreason'] != "")

			$post['editedprofilelink'] = build_profile_link($post['editusername'], $post['edituid']);
$editreason = "";
if($post['editreason'] != "")

Zeile 704Zeile 708
				eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_hiden")."\";");
}
}

				eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_hiden")."\";");
}
}

 
	}

$post['poststatus'] = '';
if(!$post_type && $post['visible'] != 1)
{
if(is_moderator($fid, "canviewdeleted") && $postcounter != 1 && $post['visible'] == -1)
{
$status_type = $lang->postbit_post_deleted;
}
else if(is_moderator($fid, "canviewunapprove") && $postcounter != 1 && $post['visible'] == 0)
{
$status_type = $lang->postbit_post_unapproved;
}
else if(is_moderator($fid, "canviewdeleted") && $postcounter == 1 && $post['visible'] == -1)
{
$status_type = $lang->postbit_thread_deleted;
}
else if(is_moderator($fid, "canviewunapprove") && $postcounter == 1 && $post['visible'] == 0)
{
$status_type = $lang->postbit_thread_unapproved;
}

eval("\$post['poststatus'] = \"".$templates->get("postbit_status")."\";");

	}

if(isset($post['smilieoff']) && $post['smilieoff'] == 1)

	}

if(isset($post['smilieoff']) && $post['smilieoff'] == 1)

Zeile 745Zeile 772
			"allow_mycode" => $mybb->settings['sigmycode'],
"allow_smilies" => $mybb->settings['sigsmilies'],
"allow_imgcode" => $mybb->settings['sigimgcode'],

			"allow_mycode" => $mybb->settings['sigmycode'],
"allow_smilies" => $mybb->settings['sigsmilies'],
"allow_imgcode" => $mybb->settings['sigimgcode'],

			"me_username" => $post['username'],

			"me_username" => $parser_options['me_username'],

			"filter_badwords" => 1
);


			"filter_badwords" => 1
);


Zeile 783Zeile 810
		$post['icon'] = "";
}


		$post['icon'] = "";
}


	$post_visibility = $ignore_bit = '';

	$post_visibility = $ignore_bit = $deleted_bit = '';

	switch($post_type)
{
case 1: // Message preview

	switch($post_type)
{
case 1: // Message preview

Zeile 816Zeile 843
			{
$ignored_message = $lang->sprintf($lang->postbit_currently_ignoring_user, $post['username']);
eval("\$ignore_bit = \"".$templates->get("postbit_ignored")."\";");

			{
$ignored_message = $lang->sprintf($lang->postbit_currently_ignoring_user, $post['username']);
eval("\$ignore_bit = \"".$templates->get("postbit_ignored")."\";");

 
				$post_visibility = "display: none;";
}

// Has this post been deleted but can be viewed? Hide this post
if($post['visible'] == -1 && is_moderator($fid, "canviewdeleted"))
{
$deleted_message = $lang->sprintf($lang->postbit_deleted_post_user, $post['username']);
eval("\$deleted_bit = \"".$templates->get("postbit_deleted")."\";");

				$post_visibility = "display: none;";
}
break;

				$post_visibility = "display: none;";
}
break;

	}

if($mybb->settings['postlayout'] == "classic")
{
eval("\$postbit = \"".$templates->get("postbit_classic")."\";");
}

	}

if($forumpermissions['canviewdeletionnotice'] == 1 && $post['visible'] == -1 && $post_type == 0 && !is_moderator($fid, "canviewdeleted"))
{
eval("\$postbit = \"".$templates->get("postbit_deleted_member")."\";");
}

	else
{

	else
{

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








		if($mybb->settings['postlayout'] == "classic")
{
eval("\$postbit = \"".$templates->get("postbit_classic")."\";");
}
else
{
eval("\$postbit = \"".$templates->get("postbit")."\";");
}

	}

	}

 


	$GLOBALS['post'] = "";

return $postbit;

	$GLOBALS['post'] = "";

return $postbit;