3.1-超简单实现公用标签 - 风讯CMS - 爱建站

,,,,CMS教程,模板无忧,建站教程,CMS教程,风讯Cms教程,

SEO SEO

首页  >   风讯CMS > 3.1-超简单实现公用标签  >  正文

3.1-超简单实现公用标签

2018-09-27 07:33:00 向站长提问 编辑: admin 阅读:

 

适用系统:3 1实现思想:一个标签应用于所有模版,自动读取所生成类别下(包含子类)的内容修改文件:Admin Refresh RefreshFunction asp实现方法(较3 0SP2版本多了第二步):第一步、打开Admin Refresh RefreshFunction asp文件查找 Function ChirldClassID(ClassEnameStr) 下面约4、5行处,将 Set RsChirldFunObj = Conn Execute( "Select ClassID from FS_NewsClass where ParentID=(Select ClassID from FS_NewsClass where ClassEName= "&ClassEnameStr& " ) order by AddTime,id desc ")Set ChirldClassObj = Conn Execute( "Select ClassID from FS_NewsClass where ClassEName= "&ClassEnameStr& " order by ID desc ") 替换为: If ClassEnameStr= "Thisclass " thenSet RsChirldFunObj = Conn Execute( "Select ClassID from FS_NewsClass where ParentID= "&RefreshID& " order by AddTime,id desc ")Set ChirldClassObj = Conn Execute( "Select ClassID from FS_NewsClass where ClassID= "&RefreshID& " order by ID desc ")ElseSet RsChirldFunObj = Conn Execute( "Select ClassID from FS_NewsClass where ParentID=(Select ClassID from NewsClass where ClassEName= "&ClassEnameStr& " ) order by AddTime,id desc ")Set ChirldClassObj = Conn Execute( "Select ClassID from FS_NewsClass where ClassEName= "&ClassEnameStr& " order by ID desc ")End if第二步:最新新闻、热点新闻、推荐新闻处另外修改(假如还有其它项目请回帖)查找 dim TemppID,TemppSql,EndClassIDListIf ClassEName<> " " then If SoonClassStr= "1 " then TemppSql= "select ClassID from FS_NewsClass where ClassEName= " & ClassEName & " " Set TemppID=conn execute(TemppSql) EndClassIDList= " " & TemppID(0) & " " & AllChildClassIDStrList(TemppID(0)) Else TemppSql= "select ClassID from FS_NewsClass where ClassEName= " & ClassEName & " " Set TemppID=conn execute(TemppSql) EndClassIDList= " " & TemppID(0) & " " End ifElse EndClassIDList= " "end if 替换为: kimli修改_公用标签dim TemppID,TemppSql,EndClassIDListIf ClassEName= " " then EndClassIDList= " " Elseif ClassEName= "Thisclass " then EndClassIDList= " " &RefreshID& " " & AllChildClassIDStrList(RefreshID)Else If SoonClassStr= "1 " then TemppSql= "select ClassID from FS_NewsClass where ClassEName= " & ClassEName & " " Set TemppID=conn execute(TemppSql) EndClassIDList= " " & TemppID(0) & " " & AllChildClassIDStrList(TemppID(0)) Else TemppSql= "select ClassID from FS_NewsClass where ClassEName= " & ClassEName & " " Set TemppID=conn execute(TemppSql) EndClassIDList= " " & TemppID(0) & " " End ifEnd if kimli修改_公用标签结束 第三步、制作标签方法实例、制作一个公用_分类页_推荐图片新闻 查看更多 风讯cms教程  风讯cms模板 共2页上一页12下一页 来源:模板无忧 所属分类:风讯Cms教程 更新时间:2006-06-16 [收藏][报错][返回列表] 相关风讯Cms教程: 最简单的栏目切换方法(样式系列之栏目切换篇2) 我也放个栏目切换代码,简简单单的


适用系统:3.1
实现思想:一个标签应用于所有模版,自动读取所生成类别下(包含子类)的内容
修改文件:Admin/Refresh/RefreshFunction.asp
实现方法(较3.0SP2版本多了第二步):
第一步、打开Admin/Refresh/RefreshFunction.asp文件
查找
Function ChirldClassID(ClassEnameStr)

下面约4、5行处,将

Set RsChirldFunObj = Conn.Execute("Select ClassID from FS_NewsClass where ParentID=(Select ClassID from FS_NewsClass where ClassEName=""&ClassEnameStr&"") order by AddTime,id desc")
Set ChirldClassObj = Conn.Execute("Select ClassID from FS_NewsClass where ClassEName=""&ClassEnameStr&"" order by ID desc")

替换为:

If ClassEnameStr="Thisclass" then
Set RsChirldFunObj = Conn.Execute("Select ClassID from FS_NewsClass where ParentID=""&RefreshID&"" order by AddTime,id desc")
Set ChirldClassObj = Conn.Execute("Select ClassID from FS_NewsClass where ClassID=""&RefreshID&"" order by ID desc")
Else
Set RsChirldFunObj = Conn.Execute("Select ClassID from FS_NewsClass where ParentID=(Select ClassID from NewsClass where ClassEName=""&ClassEnameStr&"") order by AddTime,id desc")
Set ChirldClassObj = Conn.Execute("Select ClassID from FS_NewsClass where ClassEName=""&ClassEnameStr&"" order by ID desc")
End if


第二步:最新新闻、热点新闻、推荐新闻处另外修改(假如还有其它项目请回帖)
查找

dim TemppID,TemppSql,EndClassIDList
If ClassEName<>"" then
If SoonClassStr="1" then
TemppSql="select ClassID from FS_NewsClass where ClassEName="" & ClassEName & """
Set TemppID=conn.execute(TemppSql)
EndClassIDList= """ & TemppID(0) & """ & AllChildClassIDStrList(TemppID(0))
Else
TemppSql="select ClassID from FS_NewsClass where ClassEName="" & ClassEName & """
Set TemppID=conn.execute(TemppSql)
EndClassIDList=""" & TemppID(0) & """
End if
Else
EndClassIDList=""
end if 替换为:
"kimli修改_公用标签
dim TemppID,TemppSql,EndClassIDList
If ClassEName="" then
EndClassIDList=""
Elseif ClassEName="Thisclass" then
EndClassIDList= """ &RefreshID& """ & AllChildClassIDStrList(RefreshID)
Else
If SoonClassStr="1" then
TemppSql="select ClassID from FS_NewsClass where ClassEName="" & ClassEName & """
Set TemppID=conn.execute(TemppSql)
EndClassIDList= """ & TemppID(0) & """ & AllChildClassIDStrList(TemppID(0))
Else
TemppSql="select ClassID from FS_NewsClass where ClassEName="" & ClassEName & """
Set TemppID=conn.execute(TemppSql)
EndClassIDList=""" & TemppID(0) & """
End if
End if
"kimli修改_公用标签结束


第三步、制作标签方法
实例、制作一个公用_分类页_推荐图片新闻

查看更多 风讯cms教程  风讯cms模板

共2页上一页12下一页

3.1-超简单实现公用标签
http://www.yuedudg.cn/article/15105541.html

 

友情链接
phpcms之家 ecshop经验网 帝国cms常识
cms综合网 wp之家 zblog之家
discuz经验网 织梦之家


Tags: CMS教程 模板无忧 建站教程 CMS教程 风讯Cms教程


手机浏览本文
3.1-超简单实现公用标签

3.1-超简单实现公用标签

站内推荐

网站分类

标签列表

关于我们
文章内容来源互联网仅供参考,如果还有疑问请联系我们!我们将竭力帮您解决您的问题
联系我们:

QQ: 397423577 

email:397423577@qq.com

微信:ganenboy