UBB 转换函数演示(4)_Dreamweaver教程
re =/^(http:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re =/(http:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )$/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re =/[^>=""](http:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re =/^(ftp:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re =/(ftp:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )$/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re =/[^>=""](ftp:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re =/^(rtsp:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re =/(rtsp:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )$/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re =/[^>=""](rtsp:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re =/^(mms:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re =/(mms:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )$/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re =/[^>=""](mms:\/\/[A-Za-z0-9\.\/=\?%\-&_~`@': !] )/ig
strContent = strContent.replace(re,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
if(strIcons == "1"){ //笑脸转换
re=/(\[em(.*?)\])/ig
strContent=strContent.replace(re,"<img src=" picurl ImgName "$2.gif border=0 align=middle>")
}
if(strSmile == "1"){ //笑脸转换
re=/(\[s(\d{1,2})\])/ig
strContent=strContent.replace(re,"<img src=smile/face$2.gif border=0 align=middle>")
}
re=/(\[color=(.[^\*)\])(.*?)(\[\/color\])/ig
strContent=strContent.replace(re,"<font color=$2>$3</font>")
re=/(\[face=(.[^\*)\])(.*?)(\[\/face\])/ig
strContent=strContent.replace(re,"<font face=$2>$3</font>")
re=/(\[align=(.[^\*)\])(.*?)(\[\/align\])/ig
strContent=strContent.replace(re,"<div align=$2>$3</div>")
- 相关链接:
- 教程说明:
Dreamweaver教程-UBB 转换函数演示(4)。