Vergleich inc/functions_post.php - 1.03 - 1.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 97Zeile 97
		$message = preg_replace("#\[list=(a|A|i|I|1)\](.*?)\[/list\]#esi", "dolist('$2', '$1')", $message);
}


		$message = preg_replace("#\[list=(a|A|i|I|1)\](.*?)\[/list\]#esi", "dolist('$2', '$1')", $message);
}


	if($allowimgcode)

	if($allowimgcode != "no")

	{

	{

		$message = preg_replace("#\[img\]([a-z]+?://){1}(.+?)\[/img\]#i", "<img src=\"$1$2\" border=\"0\" alt=\"\" />", $message);
$message = preg_replace("#\[img=([0-9]{1,3})x([0-9]{1,3})\]([a-z]+?://){1}(.+?)\[/img\]#i", "<img src=\"$3$4\" style=\"border: 0; width: $1; height: $2;\" alt=\"\" />", $message);

		$message = preg_replace("#\[img\](https?://([^<>\"']+?))\[/img\]#i", "<img src=\"$1\" border=\"0\" alt=\"\" />", $message);
$message = preg_replace("#\[img=([0-9]{1,3})x([0-9]{1,3})\](https?://([^<>\"']+?))\[/img\]#i", "<img src=\"$3\" style=\"border: 0; width: $1px; height: $2px;\" alt=\"\" />", $message);

	}
$message = doautourl($message);
/* Used to be <hr size="1"> but users should get the chance to set the size in their CSS */

	}
$message = doautourl($message);
/* Used to be <hr size="1"> but users should get the chance to set the size in their CSS */

Zeile 186Zeile 186
		reset($smiliecache);
foreach($smiliecache as $sid => $smilie)
{

		reset($smiliecache);
foreach($smiliecache as $sid => $smilie)
{

			$message = str_replace($smilie['find'], "<img src=\"".$url.$smilie['image']."\" align=\"middle\" border=\"0\" alt=\"".$smilie['name']."\" />", $message);

			$message = str_replace($smilie['find'], "<img src=\"".$url.$smilie['image']."\" style=\"vertical-align: middle;\" border=\"0\" alt=\"".$smilie['name']."\" />", $message);

		}
}
return $message;

		}
}
return $message;

Zeile 240Zeile 240
	{
$name = $email;
}

	{
$name = $email;
}

	if(preg_match("/^(.+)@[a-zA-Z0-9-]+\.[a-zA-Z0-9.-]+$/si", $email))

	if(preg_match("/^([a-zA-Z0-9-_\+\.]+?)@[a-zA-Z0-9-]+\.[a-zA-Z0-9\.-]+$/si", $email))

	{
return "<a href=\"mailto:$email\">".$name."</a>";

	{
return "<a href=\"mailto:$email\">".$name."</a>";

 
	}
else
{
return $name;

	}
}


	}
}


Zeile 264Zeile 268
	}
$message = str_replace("<div class=\"quote_body\"><br />", "<div class=\"quote_body\">", $message);
$message = str_replace("<br /></div>", "</div>", $message);

	}
$message = str_replace("<div class=\"quote_body\"><br />", "<div class=\"quote_body\">", $message);
$message = str_replace("<br /></div>", "</div>", $message);

 
	// Remove [attachment=x] from quoted posts.
//$message = preg_replace("#\[attachment=([0-9]+?)\]#i", "", $message);

	return $message;
}

function docode($message)

	return $message;
}

function docode($message)

{

{

	global $lang;

// user sanity check

	global $lang;

// user sanity check

Zeile 280Zeile 286
	if($opencount > $closedcount)
{
$limit = $closedcount;

	if($opencount > $closedcount)
{
$limit = $closedcount;

	}

	}

	elseif($closedcount > $opencount)
{
$limit = $opencount;

	elseif($closedcount > $opencount)
{
$limit = $opencount;

Zeile 339Zeile 345
	}

if(preg_match("/\A[\s]*\<\?/", $original) === 0)

	}

if(preg_match("/\A[\s]*\<\?/", $original) === 0)

	{
$code = substr_replace($code, "", strpos($code, "&lt;?php"), strlen("&lt;?php"));
$code = strrev(substr_replace(strrev($code), "", strpos(strrev($code), strrev("?&gt;")), strlen("?&gt;")));
$code = str_replace('<br />', '', $code);
}





    {
$code = substr_replace($code, "", strpos($code, "&lt;?php"), strlen("&lt;?php"));
$code = str_replace('<br />', '', $code);
}

if(preg_match("/\A[\s]*\>\?/", strrev($original)) === 0)
{
$code = strrev(substr_replace(strrev($code), "", strpos(strrev($code), strrev("?&gt;")), strlen("?&gt;")));
}

	
// Get rid of other useless code and linebreaks
$code = str_replace("<code><font color=\"#000000\">\n", '', $code);

	
// Get rid of other useless code and linebreaks
$code = str_replace("<code><font color=\"#000000\">\n", '', $code);

Zeile 351Zeile 361
	$code = str_replace("</font>\n</code>", '', $code);

// Send back the code all nice and pretty

	$code = str_replace("</font>\n</code>", '', $code);

// Send back the code all nice and pretty

	return "</p><div class=\"code_header\">$lang->php_code</div><div class=\"code_body\">".$code."</div><p>";

	return "<p><div class=\"code_header\">$lang->php_code</div><div class=\"code_body\">".$code."</div></p>";

}

function makepostbit($post, $pmprevann=0)

}

function makepostbit($post, $pmprevann=0)