Problema Al Interpretar Las Intrucciones En El FLASH MOD
Publicado: 04 Jul 2007, 22:39
Código: Seleccionar todo
#-----[ FIND ]------------------------------------------
#
# Note, the find is much longer:
# $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);
$text = preg_replace("#\[img\]((
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin Flash MOD
//[flashicy width= heigth= loop=] and[ /flash ]
$text = preg_replace("#\[flashicy width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-5]?[0-9]) loop=(true|false)\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flashicy width=\\1 height=\\2 loop=\\3:$uid\]\\4[/flash:$uid]", $text);
$text = preg_replace("#\[flashicy width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-5]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flashicy width=\\1 height=\\2 loop=false:$uid\]\\3[/flash:$uid]", $text);
$text = preg_replace("#\[flashicy\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flashicy:$uid\]\\1[/flash:$uid]", $text);
// End Flash MOD
#
con lo que obtengo esto que a mi entender esta lleno de errores. ¿no?
Código: Seleccionar todo
$text = preg_replace("#\[img\]((
// Begin Flash MOD
//[flashicy width= heigth= loop=] and[ /flash ]
$text = preg_replace("#\[flashicy width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-5]?[0-9]) loop=(true|false)\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flashicy width=\\1 height=\\2 loop=\\3:$uid\]\\4[/flash:$uid]", $text);
$text = preg_replace("#\[flashicy width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-5]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flashicy width=\\1 height=\\2 loop=false:$uid\]\\3[/flash:$uid]", $text);
$text = preg_replace("#\[flashicy\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flashicy:$uid\]\\1[/flash:$uid]", $text);
// End Flash MOD
http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
saludos y gracias.