?? char.inc
字號(hào):
<%
rem ------------ubb代碼
function ChkBadWords(fString)
bwords = split(BadWords, "|")
for i = 0 to ubound(bwords)
fString = Replace(fString, bwords(i), string(len(bwords(i)),"*"), 1,-1,1)
next
ChkBadWords = fString
end function
function doCode(fString, fOTag, fCTag, fROTag, fRCTag)
fOTagPos = Instr(1, fString, fOTag, 1)
fCTagPos = Instr(1, fString, fCTag, 1)
while (fCTagPos > 0 and fOTagPos > 0)
fString = replace(fString, fOTag, fROTag, 1, 1, 1)
fString = replace(fString, fCTag, fRCTag, 1, 1, 1)
fOTagPos = Instr(1, fString, fOTag, 1)
fCTagPos = Instr(1, fString, fCTag, 1)
wend
doCode = fString
end function
function UBBCode(strContent)
dim re
set re = New RegExp
re.Global = True
re.IgnoreCase = True
' re.MultiLine = True
re.Pattern = "\[url=(.[^\]]*)\](.[^\[]*)\[\/url]"
strContent = re.Replace(strContent,"<a target=_blank href=$1>$2</a>")
re.Pattern = "\[url](.[^\[]*)\[\/url]"
strContent = re.Replace(strContent,"<a target=_blank href=$1>$1</a>")
re.Pattern ="\[url=(.[^\]]*)\]\[IMG](.[^\[]*)\[\/IMG]\[\/url]"
strContent = re.Replace(strContent,"<a target=_blank href=$1><IMG SRC=""$2"" border=0></a>")
re.Pattern = "\[email=(.[^\]]*)\](.[^\[]*)\[\/email]"
strContent = re.Replace(strContent,"<a href=$1>$2</a>")
re.Pattern = "\[email](.[^\[]*)\[\/email]"
strContent = re.Replace(strContent,"<a href=mailto:$1>$1</a>")
re.Pattern = "\[FLASH](.[^\[]*)\[\/FLASH]"
strContent = re.Replace(strContent,"<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=500 height=400><PARAM NAME=movie VALUE=""$1""><PARAM NAME=quality VALUE=high><embed src=""$1"" quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width=500 height=400>$1</embed></OBJECT>")
if strIcons = "1" then
re.Pattern="\[em(.[^\[]*)\]"
strContent= re.Replace(strContent,"<img src=pic/em$1.gif border=0 align=middle>")
end if
if strIMGInPosts = "1" then
re.Pattern="\[IMG](.[^\[]*)\[\/IMG]"
strContent=re.Replace(strContent,"<IMG SRC=""$1"" border=0>")
end if
re.Pattern="\[HTML](.[^\[]*)\[\/HTML]"
strContent=re.Replace(strContent,"<SPAN><IMG src=pic/code.gif align=absBottom> HTML 代碼片段如下:<BR><TEXTAREA style=""WIDTH: 94%; BACKGROUND-COLOR: #f7f7f7"" name=textfield rows=10>$1</TEXTAREA><BR><INPUT onclick=runEx() type=button value=運(yùn)行此代碼 name=Button> [Ctrl+A 全部選擇 提示:你可先修改部分代碼,再按運(yùn)行]</SPAN><BR>")
re.Pattern="\[COLOR=(.[^\]]*)\](.[^\[]*)\[\/COLOR]"
strContent=re.Replace(strContent,"<font color=$1>$2</font>")
re.Pattern="\[FACE=(.[^\]]*)\](.[^\[]*)\[\/FACE]"
strContent=re.Replace(strContent,"<font face=$1>$2</font>")
re.Pattern="\[ALIGN=(.[^\]]*)\](.[^\[]*)\[\/ALIGN]"
strContent=re.Replace(strContent,"<div align=$1>$2</div>")
re.Pattern="\[QUOTE](.[^\[]*)\[\/QUOTE]"
strContent=re.Replace(strContent,"<BLOCKQUOTE><b>引用</b>:<HR>$1<HR></BLOCKQUOTE>")
re.Pattern="\[FLY](.[^\[]*)\[\/FLY]"
strContent=re.Replace(strContent,"<marquee width=90% behavior=alternate scrollamount=3>$1</marquee>")
re.Pattern="\[MOVE](.[^\[]*)\[\/MOVE]"
strContent=re.Replace(strContent,"<MARQUEE scrollamount=3>$1</marquee>")
re.Pattern="\[GLOW=(.[^\]]*),(.[^\]]*),(.[^\]]*)\](.[^\[]*)\[\/GLOW]"
strContent=re.Replace(strContent,"<table width=$1 style=""filter:glow(color=$2, strength=$3)"">$4</table>")
re.Pattern="\[SHADOW=(.[^\]]*),(.[^\]]*),(.[^\]]*)\](.[^\[]*)\[\/SHADOW]"
strContent=re.Replace(strContent,"<table width=$1 style=""filter:shadow(color=$2, strength=$3)"">$4</table>")
re.Pattern = "\[b](.[^\[]*)\[\/b]"
strContent = re.Replace(strContent,"<b>$1</b>")
re.Pattern = "\[I](.[^\[]*)\[\/I]"
strContent = re.Replace(strContent,"<I>$1</I>")
re.Pattern = "\[u](.[^\[]*)\[\/u]"
strContent = re.Replace(strContent,"<U>$1</U>")
re.Pattern ="\[size=1](.[^\[]*)\[\/size]"
strContent = re.Replace(strContent,"<font size=1>$1</font>")
re.Pattern ="\[size=2](.[^\[]*)\[\/size]"
strContent = re.Replace(strContent,"<font size=2>$1</font>")
re.Pattern ="\[size=3](.[^\[]*)\[\/size]"
strContent = re.Replace(strContent,"<font size=3>$1</font>")
re.Pattern ="\[size=4](.[^\[]*)\[\/size]"
strContent = re.Replace(strContent,"<font size=4>$1</font>")
strContent = doCode(strContent, "[list]", "[/list]", "<ul>", "</ul>")
strContent = doCode(strContent, "[list=1]", "[/list]", "<ol type=1>", "</ol id=1>")
strContent = doCode(strContent, "[list=a]", "[/list]", "<ol type=a>", "</ol id=a>")
strContent = doCode(strContent, "[*]", "[/*]", "<li>", "</li>")
strContent = doCode(strContent, "[code]", "[/code]", "<pre id=code><font size=1 face=""Verdana, Arial"" id=code>", "</font id=code></pre id=code>")
strContent=ChkBadWords(strContent)
UBBCode = strContent
end function
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -