📄 ubbcode.asp
字号:
ubb_temp_=ubb_temp
do while ubb_temp_ <> ""
text=SearchUBB(ubb_temp_,"[w]","[/w]")
if text<>"" then
ltext=furl(msubb(text))
ltext="<iframe src='"<ext
ubb_temp_=replace(ubb_temp_,"[w]"&text,ltext,1,1,1)
ubb_temp_=replace(ubb_temp_,ltext&"[/w]",ltext&"' frameborder='0' width='100%' height='300' style='border:1 dotted #999999;margin-top:4px;margin-bottom:4px'></iframe><br><img src='images/newwin.gif' align='absmiddle'> <a href='"&furl(msubb(text))&"' target='_blank'>点击这里打开新窗口浏览此网页</a> ",1,1,1)
else
exit do
end if
loop
ubb_iframe=ubb_temp_
end function
//poorfish修改,加入down标记
function UBB_down(ubb_temp)
ubb_temp_=ubb_temp
do while ubb_temp_ <> ""
text=SearchUBB(ubb_temp_,"[down=","]")
if text<>"" then
ltext=furl(msubb(text))
ltext="<img src='images/download.gif' align='absmiddle'> <a href='"<ext&"' target=_blank class=ubblink>"
text2=SearchUBB(ubb_temp_,"[down="&text&"]","[/down]")
if text2<>"" then
ubb_temp_=replace(ubb_temp_,"[down="&text&"]",ltext,1,1,1)
ubb_temp_=replace(ubb_temp_,ltext&text2&"[/down]",ltext&text2&"</a>",1,1,1)
else
exit do
end if
else
exit do
end if
loop
UBB_down=ubb_temp_
end function
//poorfish修改,加入list标记
function ubb_list(ubb_temp)
ubb_temp_=ubb_temp
do while ubb_temp_ <> ""
text=SearchUBB(ubb_temp_,"[list]","[/list]")
if text<>"" then
ltext=furl(msubb(text))
ltext="<ol><li>"<ext
ltext=replace(ltext,"<br>","</li><li>",1,-1,1)
ubb_temp_=replace(ubb_temp_,"[list]"&text,ltext,1,1,1)
ubb_temp_=replace(ubb_temp_,ltext&"[/list]",ltext&"</li></ol>",1,1,1)
else
exit do
end if
loop
ubb_list=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 class=ubblink>"
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 class=ubblink>"
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><param name=wmode value=transparent><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 class=ubblink>"<ext&"</a> "
urllink="<a href='"<ext&"' target=_blank class=ubblink>"<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=\"smile/01.gif\">");
re=/\:\(/ig;
content=content.replace(re,"<IMG SRC=\"smile/02.gif\">");
re=/\:o/ig;
content=content.replace(re,"<IMG SRC=\"smile/03.gif\">");
re=/:D/ig;
content=content.replace(re,"<IMG SRC=\"smile/04.gif\">");
re=/;\)/ig;
content=content.replace(re,"<IMG SRC=\"smile/05.gif\">");
re=/:a/ig;
content=content.replace(re,"<IMG SRC=\"smile/06.gif\">");
re=/:b/ig;
content=content.replace(re,"<IMG SRC=\"smile/07.gif\">");
re=/:c/ig;
content=content.replace(re,"<IMG SRC=\"smile/08.gif\">");
re=/:d/ig;
content=content.replace(re,"<IMG SRC=\"smile/09.gif\">");
re=/:e/ig;
content=content.replace(re,"<IMG SRC=\"smile/10.gif\">");
re=/:f/ig;
content=content.replace(re,"<IMG SRC=\"smile/11.gif\">");
re=/:g/ig;
content=content.replace(re,"<IMG SRC=\"smile/12.gif\">");
re=/!blueidea/ig;
content=content.replace(re,"<a href=\"###\" onclick=\"var url='http:'+'//'+'www.blueidea.com';window.open(url)\"><IMG SRC=\"smile/blueidea.gif\" align=\"absmiddle\" border=\"0\" alt=\"蓝色理想\"></a>");
re=/!google/ig;
content=content.replace(re,"<a href=\"###\" onclick=\"var url='http:'+'//'+'www.google.com';window.open(url)\"><IMG SRC=\"smile/google.gif\" align=\"absmiddle\" border=\"0\" alt=\"GOOGLE\"></a>");
re=/!macromedia/ig;
content=content.replace(re,"<a href=\"###\" onclick=\"var url='http:'+'//'+'www.macromedia.com';window.open(url)\"><IMG SRC=\"smile/macromedia.gif\" align=\"absmiddle\" border=\"0\" alt=\"Macromedia\"></a>");
return(content);
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -