主题:  谁能把动网的ubb代码提取出来并利用到自己的主页里阿?

wbg3721

职务:普通成员
等级:2
金币:1.0
发贴:207
注册:2002/2/3 19:44:59
#12002/5/12 15:50:38
谁能把动网的ubb代码提取出来并利用到自己的主页里阿?
ubb我以提取出来但是不会调用谁会阿?说一下好吗?还有以前面包的ubb代码我可以用先在不只怎么不能用了,说什么类型不匹配。
<%
function UBBCode(strContent)
if strAllowHTML <> 1 then
strContent = HTMLEncode(strContent)
else
strContent = HTMLcode(strContent)
end if
dim re
Set re=new RegExp
re.IgnoreCase =true
re.Global=True

re.Pattern="(script)"
strContent=re.Replace(strContent,"s cript")

if strIMGInPosts = "1" then
re.Pattern="(\[IMG\])(.[^\[]*)(\[\/IMG\])"
strContent=re.Replace(strContent,"按此在新窗口浏览图片screen.width-333)this.width=screen.width-333"">")
end if

re.Pattern="\[DIR=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/DIR]"
strContent=re.Replace(strContent,"")
re.Pattern="\[QT=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/QT]"
strContent=re.Replace(strContent,"")
re.Pattern="\[MP=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/MP]"
strContent=re.Replace(strContent,"")
re.Pattern="\[RM=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/RM]"
strContent=re.Replace(strContent,"
")

if strflash= "1" then
re.Pattern="(\[FLASH\])(.[^\[]*)(\[\/FLASH\])"
strContent= re.Replace(strContent,"$2")
end if

re.Pattern="(\[UPLOAD=gif\])(.[^\[]*)(\[\/UPLOAD\])"
strContent= re.Replace(strContent,"
此主题相关图片如下:
按此在新窗口浏览图片screen.width-333)this.width=screen.width-333"">")
re.Pattern="(\[UPLOAD=jpg\])(.[^\[]*)(\[\/UPLOAD\])"
strContent= re.Replace(strContent,"
此主题相关图片如下:
按此在新窗口浏览图片screen.width-333)this.width=screen.width-333"">")
re.Pattern="(\[UPLOAD=bmp\])(.[^\[]*)(\[\/UPLOAD\])"
strContent= re.Replace(strContent,"
此主题相关图片如下:
按此在新窗口浏览图片screen.width-333)this.width=screen.width-333"">")

re.Pattern="(\[UPLOAD=(.[^\[]*)\])(.[^\[]*)(\[\/UPLOAD\])"
strContent= re.Replace(strContent,"
点击浏览该文件")

re.Pattern="(\[URL\])(.[^\[]*)(\[\/URL\])"
strContent= re.Replace(strContent,"$2")
re.Pattern="(\[URL=(.[^\[]*)\])(.[^\[]*)(\[\/URL\])"
strContent= re.Replace(strContent,"$3")

re.Pattern="(\[EMAIL\])(.[^\[]*)(\[\/EMAIL\])"
strContent= re.Replace(strContent,"$2")
re.Pattern="(\[EMAIL=(.[^\[]*)\])(.[^\[]*)(\[\/EMAIL\])"
strContent= re.Replace(strContent,"$3")

re.Pattern = "^(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strContent = re.Replace(strContent,"$1")
re.Pattern = "(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
strContent = re.Replace(strContent,"$1")
re.Pattern = "[^>=""](http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strContent = re.Replace(strContent,"$1")
re.Pattern = "^(ftp://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strContent = re.Replace(strContent,"$1")
re.Pattern = "(ftp://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
strContent = re.Replace(strContent,"$1")
re.Pattern = "[^>=""](ftp://[A-Za-z0-9\.\/=\?%\-&_~`@':+!]+)"
strContent = re.Replace(strContent,"$1")
re.Pattern = "^(rtsp://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strContent = re.Replace(strContent,"$1")
re.Pattern = "(rtsp://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
strContent = re.Replace(strContent,"$1")
re.Pattern = "[^>=""](rtsp://[A-Za-z0-9\.\/=\?%\-&_~`@':+!]+)"
strContent = re.Replace(strContent,"$1")
re.Pattern = "^(mms://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strContent = re.Replace(strContent,"$1")
re.Pattern = "(mms://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
strContent = re.Replace(strContent,"$1")
re.Pattern = "[^>=""](mms://[A-Za-z0-9\.\/=\?%\-&_~`@':+!]+)"
strContent = re.Replace(strContent,"$1")

if strIcons = "1" then
re.Pattern="(\["&ImgName&"(.[^\[]*)\])"
strContent=re.Replace(strContent,"")
end if

re.Pattern="(\[HTML\])(.[^\[]*)(\[\/HTML\])"
strContent=re.Replace(strContent,"
以下内容为程序代码:
$2
")
re.Pattern="(\[code\])(.[^\[]*)(\[\/code\])"
strContent=re.Replace(strContent,"
以下内容为程序代码:
$2
")

re.Pattern="(\[color=(.[^\[]*)\])(.[^\[]*)(\[\/color\])"
strContent=re.Replace(strContent,"$3")
re.Pattern="(\[face=(.[^\[]*)\])(.[^\[]*)(\[\/face\])"
strContent=re.Replace(strContent,"$3")
re.Pattern="(\[align=(.[^\[]*)\])(.[^\[]*)(\[\/align\])"
strContent=re.Replace(strContent,"
$3
")

re.Pattern="(\[QUOTE\])(.*)(\[\/QUOTE\])"
strContent=re.Replace(strContent,"
$2

")
re.Pattern="(\[move\])(.*)(\[\/move\])"
strContent=re.Replace(strContent,"$2")
re.Pattern="\[GLOW=*([0-9]*),*(#*[a-z0-9]*),*([0-9]*)\](.[^\[]*)\[\/GLOW]"
strContent=re.Replace(strContent,"$4
")
re.Pattern="\[SHADOW=*([0-9]*),*(#*[a-z0-9]*),*([0-9]*)\](.[^\[]*)\[\/SHADOW]"
strContent=re.Replace(strContent,"$4
")

re.Pattern="(\[i\])(.[^\[]*)(\[\/i\])"
strContent=re.Replace(strContent,"$2")
re.Pattern="(\[u\])(.[^\[]*)(\[\/u\])"
strContent=re.Replace(strContent,"$2")
re.Pattern="(\[b\])(.[^\[]*)(\[\/b\])"
strContent=re.Replace(strContent,"$2")
re.Pattern="(\[fly\])(.*)(\[\/fly\])"
strContent=re.Replace(strContent,"$2")

re.Pattern="(\[size=1\])(.[^\[]*)(\[\/size\])"
strContent=re.Replace(strContent,"$2")
re.Pattern="(\[size=2\])(.[^\[]*)(\[\/size\])"
strContent=re.Replace(strContent,"$2")
re.Pattern="(\[size=3\])(.[^\[]*)(\[\/size\])"
strContent=re.Replace(strContent,"$2")
re.Pattern="(\[size=4\])(.[^\[]*)(\[\/size\])"
strContent=re.Replace(strContent,"$2")

re.Pattern="(\[center\])(.[^\[]*)(\[\/center\])"
strContent=re.Replace(strContent,"
$2
")

set re=Nothing
UBBCode=strContent
end function


function reUBBCode(strContent)
strContent = htmlencode(strContent)
dim re
Set re=new RegExp
re.IgnoreCase =true
re.Global=True

re.Pattern="(\[QUOTE\])(.*)(\[\/QUOTE\])"
strContent=re.Replace(strContent,"")

set re=Nothing
reUBBCode=strContent
end function
%>

编辑历史:[这消息被wbg3721编辑过(编辑时间2002-05-12 15:52:26)]