09.03.2008, 19:28
Wenn ich das wieder da oben einsetze, dann kommt genau die selbe meldung *komisch....*
PHP-Code:
// Check if this post contains more images than the forum allows
if($post['savedraft'] != 1 && $mybb->settings['maxpostimages']+=$mybb->user['maxpostimages'] != 0 && $permissions['cancp'] != "yes")
{
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;
// Parse the message.
$parser_options = array(
"allow_html" => $forum['allowhtml'],
"allow_mycode" => $forum['allowmycode'],
"allow_imgcode" => $forum['allowimgcode']
);
if($post['options']['disablesmilies'] != "yes")
{
$parser_options['allow_smilies'] = $forum['allowsmilies'];
}
else
{
$parser_options['allow_smilies'] = "no";
}
$image_check = $parser->parse_message($post['message'], $parser_options);
// And count the number of image tags in the message.
$image_count = substr_count($image_check, "<img");
$tmaxpostimages = $mybb->user['maxpostimages']+=$mybb->settings['maxpostimages'];
$mmaxpostimages = $image_count-$tmaxpostimages;
if($image_count > $tmaxpostimages)
// Throw back a message if over the count with the number of images as well as the maximum number of images per post.
$this->set_error("too_many_images", array(1 => $image_count));
if ($mmaxpostimages < 2)
{
$z = "";
}
else
{
$z = "en";
}
if ($tmaxpostimages > $mybb->settings['maxpostimages'])
{
$col = "red";
}
else
{
$col = "green";
}
$this->set_error("too_many_images2", array(1 => $col, 2 => $tmaxpostimages, 3 => $mmaxpostimages, 4 =>$z));
return false;
}
}