Zeile 1045 | Zeile 1045 |
---|
{ $url = $this->parse_html($url); }
|
{ $url = $this->parse_html($url); }
|
$fullurl = $url;
| |
if(!$name)
|
if(!$name)
|
{
| {
|
$name = $url;
|
$name = $url;
|
}
if($name == $url && !empty($this->options['shorten_urls']))
| }
if($name == $url && (!isset($this->options['shorten_urls']) || !empty($this->options['shorten_urls'])))
|
{
|
{
|
if(my_strlen($url) > 55)
| $name = htmlspecialchars_decode($name); if(my_strlen($name) > 55)
|
{
|
{
|
$name = htmlspecialchars_decode($name); $name = my_substr($url, 0, 40)."...".my_substr($url, -10); $name = htmlspecialchars_uni($name);
| $name = my_substr($name , 0, 40).'...'.my_substr($name , -10);
|
}
|
}
|
}
| $name = htmlspecialchars_uni($name); }
|
$nofollow = ''; if(!empty($this->options['nofollow_on'])) {
| $nofollow = ''; if(!empty($this->options['nofollow_on'])) {
|
Zeile 1071 | Zeile 1069 |
---|
// Fix some entities in URLs $entities = array('$' => '%24', '$' => '%24', '^' => '%5E', '`' => '%60', '[' => '%5B', ']' => '%5D', '{' => '%7B', '}' => '%7D', '"' => '%22', '<' => '%3C', '>' => '%3E', ' ' => '%20');
|
// Fix some entities in URLs $entities = array('$' => '%24', '$' => '%24', '^' => '%5E', '`' => '%60', '[' => '%5B', ']' => '%5D', '{' => '%7B', '}' => '%7D', '"' => '%22', '<' => '%3C', '>' => '%3E', ' ' => '%20');
|
$fullurl = str_replace(array_keys($entities), array_values($entities), $fullurl);
| $url = str_replace(array_keys($entities), array_values($entities), $url);
|
$name = preg_replace("#&\#([0-9]+);#si", "&#$1;", $name); // Fix & but allow unicode
|
$name = preg_replace("#&\#([0-9]+);#si", "&#$1;", $name); // Fix & but allow unicode
|
$link = "<a href=\"$fullurl\" target=\"_blank\"{$nofollow}>$name</a>";
| $link = "<a href=\"$url\" target=\"_blank\"{$nofollow}>$name</a>";
|
return $link; }
| return $link; }
|
Zeile 1085 | Zeile 1083 |
---|
* @return string The built-up link. */ function mycode_parse_url_callback1($matches)
|
* @return string The built-up link. */ function mycode_parse_url_callback1($matches)
|
{
| {
|
if(!isset($matches[3])) { $matches[3] = '';
| if(!isset($matches[3])) { $matches[3] = '';
|
Zeile 1126 | Zeile 1124 |
---|
$url = $this->parse_html($url); }
|
$url = $this->parse_html($url); }
|
| $css_align = '';
|
if($align == "right")
|
if($align == "right")
|
{
| {
|
$css_align = " style=\"float: right;\"";
|
$css_align = " style=\"float: right;\"";
|
}
| }
|
else if($align == "left")
|
else if($align == "left")
|
{
| {
|
$css_align = " style=\"float: left;\""; } $alt = basename($url);
|
$css_align = " style=\"float: left;\""; } $alt = basename($url);
|
| $alt = htmlspecialchars_decode($alt);
|
if(my_strlen($alt) > 55) {
|
if(my_strlen($alt) > 55) {
|
$alt = htmlspecialchars_decode($alt); $alt = my_substr($alt, 0, 40)."...".my_substr($alt, -10); $alt = htmlspecialchars_uni($alt);
| $alt = my_substr($alt, 0, 40).'...'.my_substr($alt, -10);
|
}
|
}
|
| $alt = htmlspecialchars_uni($alt);
|
$alt = $lang->sprintf($lang->posted_image, $alt);
|
$alt = $lang->sprintf($lang->posted_image, $alt);
|
if($dimensions[0] > 0 && $dimensions[1] > 0)
| if(isset($dimensions[0]) && $dimensions[0] > 0 && isset($dimensions[1]) && $dimensions[1] > 0)
|
{ return "<img src=\"{$url}\" width=\"{$dimensions[0]}\" height=\"{$dimensions[1]}\" border=\"0\" alt=\"{$alt}\"{$css_align} />"; }
| { return "<img src=\"{$url}\" width=\"{$dimensions[0]}\" height=\"{$dimensions[1]}\" border=\"0\" alt=\"{$alt}\"{$css_align} />"; }
|
Zeile 1342 | Zeile 1343 |
---|
switch($video) { case "dailymotion":
|
switch($video) { case "dailymotion":
|
list($id, ) = split("_", $path[2], 1); // http://www.dailymotion.com/video/fds123_title-goes-here
| list($id) = explode('_', $path[2], 2); // http://www.dailymotion.com/video/fds123_title-goes-here
|
break; case "metacafe": $id = $path[2]; // http://www.metacafe.com/watch/fds123/title_goes_here/
| break; case "metacafe": $id = $path[2]; // http://www.metacafe.com/watch/fds123/title_goes_here/
|