📄 ubbcode.asp
字号:
ubb_temp_=replace(ubb_temp_,ltext&"[/img]",ltext&"' vspace=2 hspace=2 border=0 alt=如图片显示不完整请点击查看 onclick=""window.open('"&furl(msubb(text))&"','_blank');"">",1,1,1)
else
exit do
end if
loop
ubb_img=ubb_temp_
end function
function UBB_url1(ubb_temp)
ubb_temp_=ubb_temp
do while ubb_temp_ <> ""
text=SearchUBB(ubb_temp_,"[url=","]")
if text<>"" then
ltext=furl(msubb(text))
ltext="<a href='"<ext&"' target=_blank>"
text2=SearchUBB(ubb_temp_,"[url="&text&"]","[/url]")
if text2<>"" then
ubb_temp_=replace(ubb_temp_,"[url="&text&"]",ltext,1,1,1)
ubb_temp_=replace(ubb_temp_,ltext&text2&"[/url]",ltext&text2&"</a>",1,1,1)
else
exit do
end if
else
exit do
end if
loop
UBB_url1=ubb_temp_
end function
function UBB_email1(ubb_temp)
ubb_temp_=ubb_temp
do while ubb_temp_ <> ""
text=SearchUBB(ubb_temp_,"[email=","]")
if text<>"" then
ltext=furl(msubb(text))
ltext="<a href='mailto:"<ext&"' target=_blank>"
text2=SearchUBB(ubb_temp_,"[email="&text&"]","[/email]")
if text2<>"" then
ubb_temp_=replace(ubb_temp_,"[email="&text&"]",ltext,1,1,1)
ubb_temp_=replace(ubb_temp_,ltext&text2&"[/email]",ltext&text2&"</a>",1,1,1)
else
exit do
end if
else
exit do
end if
loop
UBB_email1=ubb_temp_
end function
function UBB_mp(ubb_temp)
ubb_temp_=ubb_temp
do while ubb_temp_ <> ""
text=SearchUBB(ubb_temp_,"[mp=","]")
if text<>"" then
wh=split(text,",")
if ubound(wh)=1 then
if IsNumeric(wh(0)) and IsNumeric(wh(1)) then
Randomize
rid="tempurl"&Int(100000 * Rnd)
ltext="<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width="&wh(0)&" height="&wh(1)&" ><param name=ShowStatusBar value=-1><param name=Filename value='"&rid&"'><embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src='"&rid&"' width="&wh(0)&" height="&wh(1)&"></embed></object>"
ltext=msubb(ltext)
text2=SearchUBB(ubb_temp_,"[mp="&text&"]","[/mp]")
if text2<>"" then
ubb_temp_=replace(ubb_temp_,"[mp="&text&"]"&text2&"[/mp]",ltext,1,1,1)
ubb_temp_=replace(ubb_temp_,rid,msubb(text2),1,-1,1)
else
exit do
end if
end if
end if
else
exit do
end if
loop
UBB_mp=ubb_temp_
end function
function UBB_rm(ubb_temp)
ubb_temp_=ubb_temp
do while ubb_temp_ <> ""
text=SearchUBB(ubb_temp_,"[rm=","]")
if text<>"" then
wh=split(text,",")
if ubound(wh)=1 then
if IsNumeric(wh(0)) and IsNumeric(wh(1)) then
Randomize
rid="tempurl"&Int(100000 * Rnd)
ltext="<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RAOCX width="&wh(0)&" height="&wh(1)&"><PARAM NAME=SRC VALUE='"&rid&"'><PARAM NAME=CONSOLE VALUE=Clip1><PARAM NAME=CONTROLS VALUE=imagewindow><PARAM NAME=AUTOSTART VALUE=true></OBJECT><br><OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width="&wh(0)&"><PARAM NAME=SRC VALUE='"&rid&"'><PARAM NAME=AUTOSTART VALUE=-1><PARAM NAME=CONTROLS VALUE=controlpanel><PARAM NAME=CONSOLE VALUE=Clip1></OBJECT>"
ltext=msubb(ltext)
text2=SearchUBB(ubb_temp_,"[rm="&text&"]","[/rm]")
if text2<>"" then
ubb_temp_=replace(ubb_temp_,"[rm="&text&"]"&text2&"[/rm]",ltext,1,1,1)
ubb_temp_=replace(ubb_temp_,rid,msubb(text2),1,-1,1)
else
exit do
end if
end if
end if
else
exit do
end if
loop
UBB_rm=ubb_temp_
end function
function UBB_qt(ubb_temp)
ubb_temp_=ubb_temp
do while ubb_temp_ <> ""
text=SearchUBB(ubb_temp_,"[qt=","]")
if text<>"" then
wh=split(text,",")
if ubound(wh)=1 then
if IsNumeric(wh(0)) and IsNumeric(wh(1)) then
Randomize
rid="tempurl"&Int(100000 * Rnd)
ltext="<embed src='"&rid&"' width="&wh(0)&" height="&wh(1)&" autoplay=true loop=false controller=true playeveryframe=false cache=false scale=TOFIT bgcolor=#000000 kioskmode=false targetcache=false pluginspage=http://www.apple.com/quicktime/>"
ltext=msubb(ltext)
text2=SearchUBB(ubb_temp_,"[qt="&text&"]","[/qt]")
if text2<>"" then
ubb_temp_=replace(ubb_temp_,"[qt="&text&"]"&text2&"[/qt]",ltext,1,1,1)
ubb_temp_=replace(ubb_temp_,rid,msubb(text2),1,-1,1)
else
exit do
end if
end if
end if
else
exit do
end if
loop
UBB_qt=ubb_temp_
end function
function UBB_dir(ubb_temp)
ubb_temp_=ubb_temp
do while ubb_temp_ <> ""
text=SearchUBB(ubb_temp_,"[dir=","]")
if text<>"" then
wh=split(text,",")
if ubound(wh)=1 then
if IsNumeric(wh(0)) and IsNumeric(wh(1)) then
Randomize
rid="tempurl"&Int(100000 * Rnd)
ltext="<object classid=clsid:166B1BCA-3F9C-11CF-8075-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=7,0,2,0 width="&wh(0)&" height="&wh(1)&"><param name=src value='"&rid&"'><embed src='"&rid&"' pluginspage=http://www.macromedia.com/shockwave/download/ width="&wh(0)&" height="&wh(1)&"></embed></object>"
ltext=msubb(ltext)
text2=SearchUBB(ubb_temp_,"[dir="&text&"]","[/dir]")
if text2<>"" then
ubb_temp_=replace(ubb_temp_,"[dir="&text&"]"&text2&"[/dir]",ltext,1,1,1)
ubb_temp_=replace(ubb_temp_,rid,msubb(text2),1,-1,1)
else
exit do
end if
end if
end if
else
exit do
end if
loop
UBB_dir=ubb_temp_
end function
function UBB_swf(ubb_temp)
ubb_temp_=ubb_temp
do while ubb_temp_ <> ""
text=SearchUBB(ubb_temp_,"[swf=","]")
if text<>"" then
wh=split(text,",")
if ubound(wh)=1 then
if IsNumeric(wh(0)) and IsNumeric(wh(1)) then
Randomize
rid="tempurl"&Int(100000 * Rnd)
ltext="<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 width="&wh(0)&" height="&wh(1)&"><param name=movie value='"&rid&"'><param name=quality value=high><embed src='"&rid&"' quality=high pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash width="&wh(0)&" height="&wh(1)&"></embed></object>"
ltext=msubb(ltext)
text2=SearchUBB(ubb_temp_,"[swf="&text&"]","[/swf]")
if text2<>"" then
ubb_temp_=replace(ubb_temp_,"[swf="&text&"]"&text2&"[/swf]",ltext,1,1,1)
ubb_temp_=replace(ubb_temp_,rid,msubb(text2),1,-1,1)
else
exit do
end if
end if
end if
else
exit do
end if
loop
UBB_swf=ubb_temp_
end function
function SearchUBB(Txt,StartTxt,EndTxt)
dim cText,startubb,endubb
cText=Txt
startubb=1
do while SearchUBB=""
SearchUBB=""
startubb=instr(startubb,cText,StartTxt,1)
if startubb=0 then exit do
endubb=instr(startubb,cText,EndTxt,1)
if endubb=0 then exit do
startubb=startubb+len(StartTxt)
SearchUBB=mid(cText,startubb,endubb-startubb)
loop
end function
function MsUBB(text)
MsUBB=replace(text,"[","["&chr(176),1,-1,1)
MsUBB=replace(MsUBB,"]",chr(176)&"]",1,-1,1)
MsUBB=replace(MsUBB,"/","/"&chr(176),1,-1,1)
end function
function UnMsUBB(text)
UnMsUBB=replace(text,"["&chr(176),"[",1,-1,1)
UnMsUBB=replace(UnMsUBB,chr(176)&"]","]",1,-1,1)
UnMsUBB=replace(UnMsUBB,"/"&chr(176),"/",1,-1,1)
end function
function AutoURL(ubb_temp,cmode)
dim ubb_temp_,startubb,endubb_a,endubb_b,endubb_c,endubb_d,endubb_e,endubb,urllink
ubb_temp_=ubb_temp
startubb=1
do
startubb=instr(startubb,ubb_temp_,cmode,1)
if startubb=0 then exit do
endubb_e=instr(startubb,ubb_temp_,"]",1)
endubb_d=instr(startubb,ubb_temp_,"[",1)
endubb_c=instr(startubb,ubb_temp_,">",1)
endubb_b=instr(startubb,ubb_temp_,"<",1)
endubb_a=instr(startubb,ubb_temp_," ",1)
ubb_temp_l=ubb_temp_
endubb=len(ubb_temp_l)+1
if endubb_a<endubb and endubb_a>startubb then endubb=endubb_a
if endubb_b<endubb and endubb_b>startubb then endubb=endubb_b
if endubb_c<endubb and endubb_c>startubb then endubb=endubb_c
if endubb_d<endubb and endubb_d>startubb then endubb=endubb_d
if endubb_e<endubb and endubb_e>startubb then endubb=endubb_e
if endubb=0 or endubb<startubb then exit do
text=mid(ubb_temp_,startubb,endubb-startubb)
ltext=msubb(text)
'urllink="<img src=images/aurl.gif align=absbottom hspace=2 alt='::URL::' border=0><a href='"<ext&"' target=_blank>"<ext&"</a> "
urllink="<a href='"<ext&"' target=_blank>"<ext&"</a> "
ubb_temp_=replace(ubb_temp_,text,urllink,1,-1,1)
loop
AutoURL=ubb_temp_
end function
%>
<SCRIPT LANGUAGE=javascript RUNAT=Server>
function Smilies(content) {
var re;
re=/\:\)/ig;
content=content.replace(re,"<IMG SRC=\"images/smile.gif\">");
re=/\:\(/ig;
content=content.replace(re,"<IMG SRC=\"images/frown.gif\">");
re=/\:o/ig;
content=content.replace(re,"<IMG SRC=\"images/redface.gif\">");
re=/:D/ig;
content=content.replace(re,"<IMG SRC=\"images/biggrin.gif\">");
re=/;\)/ig;
content=content.replace(re,"<IMG SRC=\"images/wink.gif\">");
re=/:a/ig;
content=content.replace(re,"<IMG SRC=\"images/blue.gif\">");
re=/:b/ig;
content=content.replace(re,"<IMG SRC=\"images/shy.gif\">");
re=/:c/ig;
content=content.replace(re,"<IMG SRC=\"images/sleepy.gif\">");
re=/:d/ig;
content=content.replace(re,"<IMG SRC=\"images/sunglasses.gif\">");
re=/:e/ig;
content=content.replace(re,"<IMG SRC=\"images/supergrin.gif\">");
re=/:f/ig;
content=content.replace(re,"<IMG SRC=\"images/embarass.gif\">");
re=/:g/ig;
content=content.replace(re,"<IMG SRC=\"images/dead.gif\">");
re=/:h/ig;
content=content.replace(re,"<IMG SRC=\"images/cool.gif\">");
re=/:i/ig;
content=content.replace(re,"<IMG SRC=\"images/pukey.gif\">");
re=/:j/ig;
content=content.replace(re,"<IMG SRC=\"images/surprised.gif\">");
re=/:k/ig;
content=content.replace(re,"<IMG SRC=\"images/clown.gif\">");
re=/:q/ig;
content=content.replace(re,"<IMG SRC=\"images/idea11.gif\">");
return(content);
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -