dio Posted May 5, 2004 Report Share Posted May 5, 2004 kāds var pateikt skriptu, lai komentāros ierakstīta adrese kļūtu par saiti? Link to comment Share on other sites More sharing options...
Venom Posted May 5, 2004 Report Share Posted May 5, 2004 Izmanto G2G modeli (go 2 google): reqular expression for matching links in text (comments) Link to comment Share on other sites More sharing options...
zOndE Posted May 6, 2004 Report Share Posted May 6, 2004 $patterns = array ( "/(http\:\/\/[^\s]+)/i", "/(ftp\:\/\/[^\s]+)/i", "/(mailto\:([^\s]+))/i", "/\__(.+)\__/i", ); $replace = array ( "<a href=\"\\1\" target=\"_blank\">\\1</a>", "<a href=\"\\1\" target=\"_blank\">\\1</a>", "<a href=\"\\1\" target=\"_blank\">\\2</a>", "<b>\\1</b>", ); $text = preg_replace($patterns,$replace, $text); shaadi piemeram ... Link to comment Share on other sites More sharing options...
rumpels Posted May 10, 2004 Report Share Posted May 10, 2004 http://hackers.lv/?mid=cat&upcat=40&id=538 Link to comment Share on other sites More sharing options...
rumpels Posted May 14, 2004 Report Share Posted May 14, 2004 atradu vel vienu un negribas kliegt baigi bet liekas bus pilnveidigaks http://php.ogreland.lv/snippets/1.phps Link to comment Share on other sites More sharing options...
Recommended Posts