Autor Zpráva
RepporeLLo
Profil
ako spravim najjednoduchsie aby mi v guestbooku ked niekto napise www.ccc.sk / http://www.ss.sk aby to dalo ako odkaz?
Anonymní
Profil *
zkus[/pre]function Odkaz($link)
{
$link = EregI_Replace("(http://[^ ]+\.[^ ]+\.[^ ]+)", "<a href=\"\\1\" title=\"\\1\" target=\"_blank\"><strong>\\1</strong></a>", $link);
$link = EregI_Replace("[^/](www\.[^ ]+\.[^ ]+)", " <a href=\"http://\\1\" title=\"http://\\1\" target=\"_blank\"><strong>http://\\1</strong></a> ", $link);
$link = EregI_Replace("(mailto:[^ ]+@[^ ]+\.[^ ]+)", " <a href=\"\\1\" title=\"\\1\"><strong>\\1</strong></a> ", $link);
Return $link;
}[pre]
Anonymní
Profil *
zkus
function Odkaz($link) 

{
$link = EregI_Replace("(http://[^ ]+\.[^ ]+\.[^ ]+)", "<a href=\"\\1\" title=\"\\1\" target=\"_blank\"><strong>\\1</strong></a>", $link);
$link = EregI_Replace("[^/](www\.[^ ]+\.[^ ]+)", " <a href=\"http://\\1\" title=\"http://\\1\" target=\"_blank\"><strong>http://\\1</strong></a> ", $link);
$link = EregI_Replace("(mailto:[^ ]+@[^ ]+\.[^ ]+)", " <a href=\"\\1\" title=\"\\1\"><strong>\\1</strong></a> ", $link);
Return $link;
}
RepporeLLo
Profil
co? ... a ako to mam dat potom do kodu .... $text = Odkaz($text); alebo co?
Berny
Profil
RepporeLLo

Třeba, nebo rovnou
echo Odkaz($text); 
Jan Tvrdík
Profil
http://diskuse.jakpsatweb.cz/index.php?action=vthread&forum=9&topic=29 251&page=-1
Toto téma je uzamčeno. Odpověď nelze zaslat.

0