修改步骤
打开 ks_cls/Kesion.Label.FunctionCls.asp
找到 Echo Mid(sTemplate, iPosLast) 此处是唯一的,不是唯一的哥伤不起啊!
在Echo Mid(sTemplate, iPosLast) 下面加一行Templates=ParseIF(Templates) 如下图 红线部分为添加代码
搜索Function Parse(sTemplate, iPosBegin) 在这段上面插入以下代码 Function DoIf(byval condition,byval yes,byval no) if(Eval(condition)) then DoIf=yes else DoIf=no end function Function ParseIF(sTemplate) dim condition,yes,no regEx.Pattern = “\{\$IF([^\}]*)\}[^\{]*\{([^\}]*)\}[^\{]*\{([^\}]*)\}[^\{]*{/\$IF\}” Set Matches = regEx.Execute(sTemplate) On Error Resume Next while(Matches.Count<>0) set Match=Matches(0) condition=Match.SubMatches.Item(0) yes=Match.SubMatches.Item(1) no=Match.SubMatches.Item(2) sTemplate=replace(sTemplate,Match.Value,DoIf(condition,yes,no)) set Matches=regEx.Execute(sTemplate) wend set Matches=nothing ParseIF=sTemplate end Function 如图:
保存并覆盖 这样就可以用if标签了