[img] soll auch dynamische URLs annehmen
Verfasst: 08.10.2006 20:10
Gibt es eine Möglichkeit das der [ img] Tag auch dynamische URLs annimmt?
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
#---[ OPEN ]---
includes/bbcode.php
#---[ FIND ]---
$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
#---[ REPLACE WITH ]---
$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^\[\"\n\r\t]+?)\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);