Vergleich inc/functions_post.php - 1.8.6 - 1.8.7

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

				}
}
}

		



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

if($usergroup['stars'])
{
$post['stars'] = $usergroup['stars'];

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

if($usergroup['stars'])
{
$post['stars'] = $usergroup['stars'];

		}

		}


if(empty($post['starimage']))
{


if(empty($post['starimage']))
{

Zeile 285Zeile 285

$post['userstars'] = '';
for($i = 0; $i < $post['stars']; ++$i)


$post['userstars'] = '';
for($i = 0; $i < $post['stars']; ++$i)

			{

			{

				eval("\$post['userstars'] .= \"".$templates->get("postbit_userstar", 1, 0)."\";");
}


				eval("\$post['userstars'] .= \"".$templates->get("postbit_userstar", 1, 0)."\";");
}


Zeile 299Zeile 299
		// Determine the status to show for the user (Online/Offline/Away)
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];
if($post['lastactive'] > $timecut && ($post['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1) && $post['lastvisit'] != $post['lastactive'])

		// Determine the status to show for the user (Online/Offline/Away)
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];
if($post['lastactive'] > $timecut && ($post['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1) && $post['lastvisit'] != $post['lastactive'])

		{

		{

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

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

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

			{
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)

		{

		{

			$useravatar = format_avatar($post['avatar'], $post['avatardimensions'], $mybb->settings['postmaxavatarsize']);
eval("\$post['useravatar'] = \"".$templates->get("postbit_avatar")."\";");

			$useravatar = format_avatar($post['avatar'], $post['avatardimensions'], $mybb->settings['postmaxavatarsize']);
eval("\$post['useravatar'] = \"".$templates->get("postbit_avatar")."\";");

		}

		}





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





		$post['button_find'] = '';
if($mybb->usergroup['cansearch'] == 1)
{
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)
{


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

Zeile 329Zeile 333
		}

$post['button_rep'] = '';

		}

$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'])

		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'])
{

		{
if(!$post['pid'])
{

Zeile 405Zeile 409
		if(is_array($profile_fields))
{
foreach($profile_fields as $field)

		if(is_array($profile_fields))
{
foreach($profile_fields as $field)

			{

			{

				$fieldfid = "fid{$field['fid']}";
if(!empty($post[$fieldfid]))
{

				$fieldfid = "fid{$field['fid']}";
if(!empty($post[$fieldfid]))
{

Zeile 447Zeile 451
							$field_parser_options['me_username'] = $post['username'];
}
else

							$field_parser_options['me_username'] = $post['username'];
}
else

						{

						{

							$field_parser_options['nl2br'] = 0;

							$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;
}





						$post['fieldvalue'] = $parser->parse_message($post[$fieldfid], $field_parser_options);
}


						$post['fieldvalue'] = $parser->parse_message($post[$fieldfid], $field_parser_options);
}


Zeile 473Zeile 477
		if($usergroup['usertitle'])
{
$post['usertitle'] = $usergroup['usertitle'];

		if($usergroup['usertitle'])
{
$post['usertitle'] = $usergroup['usertitle'];

		}
else

		}
else

		{
$post['usertitle'] = $lang->guest;
}

		{
$post['usertitle'] = $lang->guest;
}

		



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

$usergroup['title'] = $lang->na;

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

$usergroup['title'] = $lang->na;

Zeile 509Zeile 513

// For private messages, fetch the reply/forward/delete icons
if($post_type == 2 && $post['pmid'])


// For private messages, fetch the reply/forward/delete icons
if($post_type == 2 && $post['pmid'])

	{

	{

		global $replyall;

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

		global $replyall;

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

Zeile 525Zeile 529
	$post['editedmsg'] = '';
if(!$post_type)
{

	$post['editedmsg'] = '';
if(!$post_type)
{

 
		if(!isset($forumpermissions))
{
$forumpermissions = forum_permissions($fid);
}


		// Figure out if we need to show an "edited by" message
if($post['edituid'] != 0 && $post['edittime'] != 0 && $post['editusername'] != "" && (($mybb->settings['showeditedby'] != 0 && $usergroup['cancp'] == 0) || ($mybb->settings['showeditedbyadmin'] != 0 && $usergroup['cancp'] == 1)))
{

		// Figure out if we need to show an "edited by" message
if($post['edituid'] != 0 && $post['edittime'] != 0 && $post['editusername'] != "" && (($mybb->settings['showeditedby'] != 0 && $usergroup['cancp'] == 0) || ($mybb->settings['showeditedbyadmin'] != 0 && $usergroup['cancp'] == 1)))
{

Zeile 543Zeile 552

$time = TIME_NOW;
if((is_moderator($fid, "caneditposts") || ($forumpermissions['caneditposts'] == 1 && $mybb->user['uid'] == $post['uid'] && $thread['closed'] != 1 && ($mybb->usergroup['edittimelimit'] == 0 || $mybb->usergroup['edittimelimit'] != 0 && $post['dateline'] > ($time-($mybb->usergroup['edittimelimit']*60))))) && $mybb->user['uid'] != 0)


$time = TIME_NOW;
if((is_moderator($fid, "caneditposts") || ($forumpermissions['caneditposts'] == 1 && $mybb->user['uid'] == $post['uid'] && $thread['closed'] != 1 && ($mybb->usergroup['edittimelimit'] == 0 || $mybb->usergroup['edittimelimit'] != 0 && $post['dateline'] > ($time-($mybb->usergroup['edittimelimit']*60))))) && $mybb->user['uid'] != 0)

		{

		{

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


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


Zeile 558Zeile 567
			else if($forumpermissions['candeleteposts'] == 1 && $postcounter != 1)
{
$can_delete_post = 1;

			else if($forumpermissions['candeleteposts'] == 1 && $postcounter != 1)
{
$can_delete_post = 1;

			}
}

			}
}


$postbit_qdelete = $postbit_qrestore = '';
if($mybb->user['uid'] != 0)


$postbit_qdelete = $postbit_qrestore = '';
if($mybb->user['uid'] != 0)

Zeile 567Zeile 576
			if((is_moderator($fid, "candeleteposts") || is_moderator($fid, "cansoftdeleteposts") || $can_delete_post == 1) && $postcounter != 1)
{
$postbit_qdelete = $lang->postbit_qdelete_post;

			if((is_moderator($fid, "candeleteposts") || is_moderator($fid, "cansoftdeleteposts") || $can_delete_post == 1) && $postcounter != 1)
{
$postbit_qdelete = $lang->postbit_qdelete_post;

				$display = '';

				$display = '';

				if($post['visible'] == -1)
{
$display = "none";

				if($post['visible'] == -1)
{
$display = "none";

Zeile 575Zeile 584
				eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");
}
else if((is_moderator($fid, "candeletethreads") || is_moderator($fid, "cansoftdeletethreads") || $can_delete_thread == 1) && $postcounter == 1)

				eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");
}
else if((is_moderator($fid, "candeletethreads") || is_moderator($fid, "cansoftdeletethreads") || $can_delete_thread == 1) && $postcounter == 1)

			{

			{

				$postbit_qdelete = $lang->postbit_qdelete_thread;
$display = '';
if($post['visible'] == -1)

				$postbit_qdelete = $lang->postbit_qdelete_thread;
$display = '';
if($post['visible'] == -1)

Zeile 583Zeile 592
					$display = "none";
}
eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");

					$display = "none";
}
eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");

			}

			}


// Restore Post
if(is_moderator($fid, "canrestoreposts") && $postcounter != 1)


// Restore Post
if(is_moderator($fid, "canrestoreposts") && $postcounter != 1)

Zeile 608Zeile 617
				$postbit_qrestore = $lang->postbit_qrestore_thread;
eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";");
}

				$postbit_qrestore = $lang->postbit_qrestore_thread;
eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";");
}

 
		}

if(!isset($ismod))
{
$ismod = is_moderator($fid);

		}

// Inline moderation stuff

		}

// Inline moderation stuff

Zeile 751Zeile 765
	else
{
$post['signature'] = "";

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

	}

	}


$icon_cache = $cache->read("posticons");



$icon_cache = $cache->read("posticons");


Zeile 777Zeile 791
			break;
case 2: // Private message
$post = $plugins->run_hooks("postbit_pm", $post);

			break;
case 2: // Private message
$post = $plugins->run_hooks("postbit_pm", $post);

			break;

			break;

		case 3: // Announcement
$post = $plugins->run_hooks("postbit_announcement", $post);
break;
default: // Regular post
$post = $plugins->run_hooks("postbit", $post);

		case 3: // Announcement
$post = $plugins->run_hooks("postbit_announcement", $post);
break;
default: // Regular post
$post = $plugins->run_hooks("postbit", $post);

 

if(!isset($ignored_users))
{
$ignored_users = array();
if($mybb->user['uid'] > 0 && $mybb->user['ignorelist'] != "")
{
$ignore_list = explode(',', $mybb->user['ignorelist']);
foreach($ignore_list as $uid)
{
$ignored_users[$uid] = 1;
}
}
}


// Is this author on the ignore list of the current user? Hide this post
if(is_array($ignored_users) && $post['uid'] != 0 && isset($ignored_users[$post['uid']]) && $ignored_users[$post['uid']] == 1)


// Is this author on the ignore list of the current user? Hide this post
if(is_array($ignored_users) && $post['uid'] != 0 && isset($ignored_users[$post['uid']]) && $ignored_users[$post['uid']] == 1)

Zeile 795Zeile 822
	}

if($mybb->settings['postlayout'] == "classic")

	}

if($mybb->settings['postlayout'] == "classic")

	{

	{

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

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

	}

	}

	else
{
eval("\$postbit = \"".$templates->get("postbit")."\";");
}
$GLOBALS['post'] = "";

	else
{
eval("\$postbit = \"".$templates->get("postbit")."\";");
}
$GLOBALS['post'] = "";





	return $postbit;
}


	return $postbit;
}


Zeile 821Zeile 848
	$validationcount = 0;
$tcount = 0;
$post['attachmentlist'] = $post['thumblist'] = $post['imagelist'] = '';

	$validationcount = 0;
$tcount = 0;
$post['attachmentlist'] = $post['thumblist'] = $post['imagelist'] = '';

 
	if(!isset($forumpermissions))
{
$forumpermissions = forum_permissions($post['fid']);
}


	if(isset($attachcache[$id]) && is_array($attachcache[$id]))
{ // This post has 1 or more attachments
foreach($attachcache[$id] as $aid => $attachment)

	if(isset($attachcache[$id]) && is_array($attachcache[$id]))
{ // This post has 1 or more attachments
foreach($attachcache[$id] as $aid => $attachment)