落伍者站长论坛's Archiver

szqhui 发表于 2008-4-28 09:42

风讯CMS常见修改方法

[b]去掉风讯版权[/b]第一个文件,请打开 FS_InterFace 目录 MF_LoadLabel.asp 这个文件   倒数第3行   去掉下边的代码即可

Get_JS_CopyRight = Get_JS_CopyRight & "<!--Created Page at " & Now() & ",by Foosun.Cn,Foosun Content Management System 4.0.0(FoosunCMS)--> "

第二个文件在Admin\PublicSite\Public_Function.asp   同样的位置

[b]去掉位置导航中的新闻中心[/b]
想去掉"位置导航的新闻中心"的朋友,过来看!!!!!!!!!
打开文件:
/FS_InterFace/MF_Public.asp

找到这段代码,大约在76行:
if trim(ns_domain)<>"" then
    ns_path = fg_str & "<a href=""http://"& ns_domain &""""&linkCss&MF_OpenMode&">"&ns_sitename&"</a>"
else
    ns_path = fg_str & "<a href=""[url=http://]http://"&mf_domain&"/"&ns_dir&"/"&Request.Cookies("FoosunNSCookies")("FoosunNSIndexPage")&""""&linkCss&MF_OpenMode&">"&ns_sitename&"</a[/url]>"
end if

注释掉!或者删掉!!!!!!!!!!!!!OK!!


[b]去掉标签生成的div ul li 方法(解决)[/b]
在标签的生成过程中,标签会自动加上div ul li,如果设置为0会显示id=0 class=0 之类的代码,还可能报错
我修改了一下,可以正常使用
如果你不需要ul的时候 ulclass ulid都要写0,就不会生成ul
如果你不需要li的时候 liclass liid都要写0,就不会生成li
如果你不需要div的时候 divclass divid都要写0,就不会生成div
注意:修改前备份你的Ns_Public.asp文件,以防错误时还原。

修改原理:
其他函数定义了是否有div(nodiv),是否有ul(noul),是否有li(noli),如果想调用函数内的结果,必须设置为全局变量,根据函数的全局变量判断返回的是true还是false,如果函数返回nodiv是true,说明你的标签内的divid和divclass都是0,说明你不想调用div,然后下面控制html显示根据返回值进行判断。


代码修改:
修改FS_InterFace/NS_Public.asp

1.需要定义全局变量,即在 第2行 Class cls_NS 的下面加上三个变量:Private nodiv,noul,noli


[复制到剪贴板]CODE:
<%
Class cls_NS
  Private nodiv,noul,noli


2.修改函数 public Function table_str_list_middle_2(f_tf)


[复制到剪贴板]CODE:
  '得到div,table________
  public Function table_str_list_middle_2(f_tf)
  Dim td__,tr__
  if f_tf=1 and noli=false then
    td__="</li>"
  end if
  if f_tf=1 and noli=true then
    td__=""
  end if
  if f_tf<>1 then
    td__="</td>"
  end if
    table_str_list_middle_2 =  td__&vbNewLine
  End Function


3.修改函数Public Function table_str_list_bottom(f_tf)


[复制到剪贴板]CODE:
Public Function table_str_list_bottom(f_tf)
  Dim table__,tr__
  if f_tf=1 and noul=false then
  
    if nodiv=true then
    table__=""
    else
    table__="</div>"
    end if
    tr__="</ul>"
  End If
  if f_tf=1 and noul=true then
  
    tr__=""
    if nodiv=true then
    table__=""
    else
    table__="</div>"
    end if
  End If
  if f_tf<>1 then
    table__="</table>"
    table_str_list_bottom = ""
  End If
  table_str_list_bottom = table_str_list_bottom &table__&vbNewLine
  End Function

午夜留声机 发表于 2008-4-28 10:39

发错地方了吧

易碎百合 发表于 2008-4-28 19:32

不错不错.

fxcity 发表于 2008-4-28 22:53

学习了,,~!~!~!~!

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.