账号通
    

账号  

密码  

2563

查看

4

回复
主题:[求助]V8可以嵌套标签了么? [收藏主题] 转到:  
visil 当前离线

18

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:27 分
登录次数:27 次
注册时间:2011/10/14
最后登录:2014/11/14
visil 发表于:2011/11/5 7:59:21   | 显示全部帖子 查看该作者主题 楼主 

{SQL_栏目列表({$GetParentID})}

看到很多文章介绍嵌套的,为什么我的系统标签不行??

不知道要修改哪里,请高手指教一下

Function ReplaceUserFunctionLabel(Content)

   Dim regEx, Matches, SqlLabel,Match

   Dim Matchn,n

   Set regEx = New RegExp

   regEx.Pattern = "{SQL_[^{]*\)}"

   regEx.IgnoreCase = True

   regEx.Global = True

   Set Matches = regEx.Execute(Content)

   Dim Str:Str=Content

   For Each Match In Matches

     SqlLabel=Match.value

     Str=Replace(Str,SqlLabel,ReplaceDIYFunctionLabel(SqlLabel,"label"))

   Next

   '判断嵌套,Instr(Str,",'{SQL_")=0当含有ajax输出时,不递归

   If Instr(Str,"{SQL_")<>0 and Instr(Str,",'{SQL_")=0 Then Str=ReplaceUserFunctionLabel(Str)

   ReplaceUserFunctionLabel=replace(Str,"^!^","$")

  End Function

 
  支持(24) | 反对(24) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.18750秒 powered by KesionCMS 9.0