ZBLOG增加文章里的关键字替换

http://www.itjxue.com  2015-08-14 20:05  来源:未知  点击次数: 

文内关键字替换

 Function AddLink(str)
  Dim Rs
  Set Rs = objConn.Execute("Select [KeyWords],[LinkUrl],[LinkTitle],[LinkWindow] FROM [blog_KeyLink]")
  While Not Rs.eof
   if instr(str,Rs(0))>0 then
    AddLink=Replace(str,Rs(0),"<a href='" & Rs(1) & "' title='" & Rs(2) & "' target='" & Rs(3) & "'>" & Rs(0) & "</a>")
   end if
   Rs.movenext
  Wend
  Set Rs=Nothing
 End Function

 Public Property Get HtmlContent
  HtmlContent=AddLink(TransferHTML(UBBCode(Content,"[face][link][autolink][font][code][image][typeset][media][flash][key]"),"[html-japan][vbCrlf][upload]"))
 End Property

(责任编辑:IT教学网)

更多

推荐CMS技巧文章