Witam mam skrypcik shoutboxsa oraz funkcje emotek i auto linku jak oddzielić link od emotki bo to wygląda straszliwie
podam przykłąd wpisze http:// - to z - :/ robi sie jeszcze emotka
function auto_link_text($text) { $pattern = '#\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))#'; } function auto_link_text_callback($matches) { $max_url_length = 50; $max_depth_if_over_length = 2; $ellipsis = '…'; $url_full = $matches[0]; $url_short = ''; foreach ($path_components as $dir) { $url_string_components[] = $dir . '/'; } $url_string_components[] = '?' . $parts['query']; } $url_string_components[] = '#' . $parts['fragment']; } $curr_component = $url_string_components[$k]; // Always show a portion of first directory } $url_short .= $ellipsis; break; } $url_short .= $curr_component; } } else { $url_short = $url_full; } return "<a rel=\"nofollow\" href=\"$url_full\" target=\"_blank\">$url_short</a>"; } function emoty($content) { $content = str_replace("<wesoly>", "<img src=\"emoty/usmiech.gif\" style=\"border:0px;\" />",$content); $content = str_replace(":-))", "<img src=\"emoty/usmiech2.gif\" style=\"border:0px;\" />",$content); return $content; }