欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

ubb函数,解释一下这三个函数分别实现的是什么功能,怎样用,详细点,答完给分,不甚感激。

更新时间: 2014-01-05 01:52:25 责任编辑: Author_N1

 

uBB函数,求助。解释一下这三个函数分别实现的是什么功能,怎样用,详细点,答完给分,在线等。。。急,不甚感激。。。
function ubb(content) ubb=content
  nowtime=now()
  UBB=Convert(ubb,"code")
  UBB=Convert(ubb,"html")
  UBB=Convert(ubb,"url")
  UBB=Convert(ubb,"color")
  UBB=Convert(ubb,"font")
  UBB=Convert(ubb,"size")
  UBB=Convert(ubb,"quote")
  UBB=Convert(ubb,"email")
  UBB=Convert(ubb,"img")
  UBB=Convert(ubb,"swf")
  ubb=convert(ubb,"cen")
  ubb=convert(ubb,"rig")
  ubb=convert(ubb,"lef")
  ubb=convert(ubb,"center")
  UBB=AutoURL(ubb)
  ubb=replace(ubb,"","<b>",1,-1,1)
ubb=replace(ubb,"
","</b>",1,-1,1)
  ubb=replace(ubb,"","<i>",1,-1,1)
ubb=replace(ubb,"
","</i>",1,-1,1)
  ubb=replace(ubb,"","<u>",1,-1,1)
ubb=replace(ubb,"","</u>",1,-1,1)
  ubb=replace(ubb,"[blue]","<font color='#000099'>",1,-1,1)
  ubb=replace(ubb,"[/blue]","</font>",1,-1,1)
  ubb=replace(ubb,"[red]","<font color='#990000'>",1,-1,1)
  ubb=replace(ubb,"[/red]","</font>",1,-1,1)
  for i=1 to 28
  ubb=replace(ubb,"{:em"&i&"}","<IMG SRC=emot/emotface/em"&i&".gif ></img>",1,6,1)
  ubb=replace(ubb,"{:em"&i&"}","",1,-1,1)
  next
  ubb=replace(ubb,"["&chr(176),"[",1,-1,1)
  ubb=replace(ubb,chr(176)&"]","]",1,-1,1)
  ubb=replace(ubb,"/"&chr(176),"/",1,-1,1)
  'ubb=replace(ubb,"{;em","{:em",1,-1,1)
  end function
  function Convert(ubb,CovT) cText=ubb
  startubb=1
  do while Covt="url" or Covt="color" or Covt="font" or Covt="size"
  startubb=instr(startubb,cText,"["&CovT&"=",1)
  if startubb=0 then exit do
  endubb=instr(startubb,cText,"]",1)
  if endubb=0 then exit do
  Lcovt=Covt
  startubb=startubb+len(lCovT)+2
  text=mid(cText,startubb,endubb-startubb)
  codetext=replace(text,"[","["&chr(176),1,-1,1)
  codetext=replace(codetext,"]",chr(176)&"]",1,-1,1)
  'codetext=replace(codetext,"{:em","{;em",1,-1,1)
  codetext=replace(codetext,"/","/"&chr(176),1,-1,1)
  select case CovT
  case "color"
cText=replace(cText,"[color="&text&"]","<font color='"&text&"'>",1,1,1)
cText=replace(cText,"[/color]","</font>",1,1,1)
  case "font"
cText=replace(cText,"[font="&text&"]","<font face='"&text&"'>",1,1,1)
cText=replace(cText,"[/font]","</font>",1,1,1)
  case "size"
if IsNumeric(text) then
if text>6 then text=6
if text<1 then text=1
cText=replace(cText,"[size="&text&"]","<font size='"&text&"'>",1,1,1)
cText=replace(cText,"[/size]","</font>",1,1,1)
上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-01-05 01:52:25
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/2330/
本文WWW.DOC100.NET DOC100.NET版权所有。