Vergleich inc/class_parser.php - 1.6.11 - 1.6.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1038Zeile 1038
	 */
function mycode_parse_img_callback1($matches)
{

	 */
function mycode_parse_img_callback1($matches)
{

		return $this->mycode_parse_img($matches[2])."\n";

		return $this->mycode_parse_img($matches[2]);

	}

/**

	}

/**

Zeile 1172Zeile 1172
				$domain = explode('.', $parsed_url['host']);
if($domain[0] != 'screen')
{

				$domain = explode('.', $parsed_url['host']);
if($domain[0] != 'screen')
{

					$local = $domain[0].'.';

					$local = htmlspecialchars_uni($domain[0]).'.';

				}
else
{

				}
else
{

Zeile 1232Zeile 1232
	function mycode_auto_url($message)
{
$message = " ".$message;

	function mycode_auto_url($message)
{
$message = " ".$message;

		$message = preg_replace("#([\>\s\(\)])(http|https|ftp|news){1}://([^\/\"\s\<\[\.]+\.([^\/\"\s\<\[\.]+\.)*[\w]+(:[0-9]+)?(/[^\"\s<\[]*)?)#i", "$1[url]$2://$3[/url]", $message);
$message = preg_replace("#([\>\s\(\)])(www|ftp)\.(([^\/\"\s\<\[\.]+\.)*[\w]+(:[0-9]+)?(/[^\"\s<\[]*)?)#i", "$1[url]$2.$3[/url]", $message);


		// Links should end with slashes, numbers, characters and braces but not with dots, commas or question marks
$message = preg_replace_callback("#([\>\s\(\)])(http|https|ftp|news){1}://([^\/\"\s\<\[\.]+\.([^\/\"\s\<\[\.]+\.)*[\w]+(:[0-9]+)?(/[^\"\s<]*)?([\w\/\)]))#iu", array($this, 'mycode_auto_url_callback'), $message);
$message = preg_replace_callback("#([\>\s\(\)])(www|ftp)\.(([^\/\"\s\<\[\.]+\.)*[\w]+(:[0-9]+)?(/[^\"\s<]*)?([\w\/\)]))#iu", array($this, 'mycode_auto_url_callback'), $message);

		$message = my_substr($message, 1);

return $message;

		$message = my_substr($message, 1);

return $message;

 
	}

/**
* Parses URLs automatically.
*
* @param array Matches
* @return string The parsed message.
*/
function mycode_auto_url_callback($matches)
{
$external = '';
// Allow links like http://en.wikipedia.org/wiki/PHP_(disambiguation) but detect mismatching braces
while(my_substr($matches[3], -1) == ')')
{
if(substr_count($matches[3], ')') > substr_count($matches[3], '('))
{
$matches[3] = my_substr($matches[3], 0, -1);
$external = ')'.$external;
}
else
{
break;
}

// Example: ([...] http://en.wikipedia.org/Example_(disambiguation).)
$last_char = my_substr($matches[3], -1);
while($last_char == '.' || $last_char == ',' || $last_char == '?' || $last_char == '!')
{
$matches[3] = my_substr($matches[3], 0, -1);
$external = $last_char.$external;
$last_char = my_substr($matches[3], -1);
}
}
if($matches[2] == 'www' || $matches[2] == 'ftp')
{
return "{$matches[1]}[url]{$matches[2]}.{$matches[3]}[/url]{$external}";
}
else
{
return "{$matches[1]}[url]{$matches[2]}://{$matches[3]}[/url]{$external}";
}

	}

/**

	}

/**

Zeile 1272Zeile 1314
	*/
function mycode_parse_list_callback($matches)
{

	*/
function mycode_parse_list_callback($matches)
{

		return $this->mycode_parse_list($matches[1])."\n";

		return $this->mycode_parse_list($matches[1]);

	}

/**

	}

/**

Zeile 1283Zeile 1325
	*/
function mycode_parse_list_callback_type($matches)
{

	*/
function mycode_parse_list_callback_type($matches)
{

		return $this->mycode_parse_list($matches[2], $matches[1])."\n";

		return $this->mycode_parse_list($matches[2], $matches[1]);

	}

/**

	}

/**