UBB 转换函数演示(8)_Dreamweaver教程
end if
re.Pattern="(\[FLASH\])(.*?)(\[\/FLASH\])"
strContent= re.Replace(strContent,"<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=500 height=400><PARAM NAME=movie VALUE=""$2""><PARAM NAME=quality VALUE=high><embed src=""$2"" quality=high pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width=500 height=400>$2</embed></OBJECT>")
re.Pattern="(\[FLASH=*([0-9]*),*([0-9]*)\])(.*?)(\[\/FLASH\])"
strContent= re.Replace(strContent,"<a href=""$4"" TARGET=_blank><IMG SRC=pic/swf.gif border=0 alt=点击开新窗口欣赏该FLASH动画!> [全屏欣赏]</a><br><br><OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=$2 height=$3><PARAM NAME=movie VALUE=""$4""><PARAM NAME=quality VALUE=high><param name=menu value=false><embed src=""$4"" quality=high menu=false pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width=$2 height=$3>$4</embed></OBJECT>")
re.Pattern="(\[UPLOAD=gif\])(.*?)(\[\/UPLOAD\])"
strContent= re.Replace(strContent,"<br><IMG SRC="""&picurl&"gif.gif"" border=0>此主题相关图片如下:<br><A HREF=""$2"" TARGET=_blank><IMG SRC=""$2"" border=0 alt=按此在新窗口浏览图片 onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></A>")
re.Pattern="(\[UPLOAD=jpg\])(.*?)(\[\/UPLOAD\])"
strContent= re.Replace(strContent,"<br><IMG SRC="""&picurl&"jpg.gif"" border=0>此主题相关图片如下:<br><A HREF=""$2"" TARGET=_blank><IMG SRC=""$2"" border=0 alt=按此在新窗口浏览图片 onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></A>")
re.Pattern="(\[UPLOAD=bmp\])(.*?)(\[\/UPLOAD\])"
strContent= re.Replace(strContent,"<br><IMG SRC="""&picurl&"bmp.gif"" border=0>此主题相关图片如下:<br><A HREF=""$2"" TARGET=_blank><IMG SRC=""$2"" border=0 alt=按此在新窗口浏览图片 onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></A>")
re.Pattern="(\[UPLOAD=(.[^\*)\])(.*?)(\[\/UPLOAD\])"
strContent= re.Replace(strContent,"<br><IMG SRC="""&picurl&"$2.gif"" border=0> <a href=""$3"">点击浏览该文件</a>")
re.Pattern="(\[URL\])(.*?)(\[\/URL\])"
strContent= re.Replace(strContent,"<A HREF=""$2"" TARGET=_blank>$2</A>")
re.Pattern="(\[URL=(.[^\*)\])(.*?)(\[\/URL\])"
strContent= re.Replace(strContent,"<A HREF=""$2"" TARGET=_blank>$3</A>")
re.Pattern="(\[EMAIL\])(.*?)(\[\/EMAIL\])"
strContent= re.Replace(strContent,"<img align=absmiddle src=pic/email1.gif><A HREF=""共11页上一页123456789下一页