kingcms 修改生成路径

文章系统:

打开admin/article/index.asp

搜索:data(11,0)=art.lang("common/pinyin")

改为(默认为ID.htm):data(11,0)=king.neworder("kingart","artid")&"."&split(king_ext,".")(1)

改为(默认为yyyyMM/ID.htm):data(11,0)=formatdate(now,"yyyyMM")&"/"&king.neworder("kingart","artid")&"."&split(king_ext,".")(1)

大家还可以根据自己需要去修改成其它各种格式。

实现修改文章的时候也能选择新闻id、日期等作为文件名:

搜索:Il king.form_eval("artpath","MD5")

在下面增加:
if len(artid)<>0 then
Il king.form_eval("artpath",artid&"."&split(king_ext,".")(1))
Il king.form_eval("artpath",formatdate(data(14,0),"yyyyMM")&"/"&artid&"."&split(king_ext,".")(1))
Il king.form_eval("artpath",formatdate(data(14,0),2)&"/"&artid)
end if
还有其他格式等可以按需求自己修改。

搜索:sql="arttitle,artcontent,artfrom,artauthor,artup,artshow,artcommend,arthead,artgrade,artkeywords,artdescription,artpath,artimg,listids"

替换为:sql="arttitle,artcontent,artfrom,artauthor,artup,artshow,artcommend,arthead,artgrade,artkeywords,artdescription,artpath,artimg,listids,artdate"

搜索:
conn.execute "insert into kingart ("&sql&",artdate,artorder,listid) values ('"&safe(data(0,0))&"','"&safe(data(1,0))&"','"&safe(data(2,0))&"','"&safe(data(3,0))&"',"&safe(data(4,0))&","&safe(data(5,0))&","&safe(data(6,0))&","&safe(data(7,0))&","&safe(data(8,0))&",'"&safe(artkeywords)&"','"&safe(artdescription)&"','"&safe(data(11,0))&"','"&safe(data(12,0))&"','"&safe(data(13,0))&"','"&tnow&"',"&king.neworder("kingart","artorder")&","&listid&")"

在上面增加一行:
sql="arttitle,artcontent,artfrom,artauthor,artup,artshow,artcommend,arthead,artgrade,artkeywords,artdescription,artpath,artimg,listids"

下载系统:

打开admin/download/index.asp

搜索:data(8,0)=kc.lang("common/pinyin")

改为(默认为ID.htm):data(8,0)=king.neworder("king__download_page","kid")&"."&split(king_ext,".")(1)

改为(默认为yyyyMM/ID.htm):data(8,0)=formatdate(now,"yyyyMM")&"/"&king.neworder("king__download_page","kid")&"."&split(king_ext,".")(1)

大家还可以根据自己需要去修改成其它各种格式。

实现修改下载的文章时候也能选择新闻id、日期等作为文件名:

搜索:Il king.form_eval("kpath","MD5")

在下面增加:
if len(kid)<>0 then
Il king.form_eval("kpath",kid&"."&split(king_ext,".")(1))
Il king.form_eval("kpath",formatdate(data(17,0),"yyyyMM")&"/"&kid&"."&split(king_ext,".")(1))
Il king.form_eval("kpath",formatdate(data(17,0),2)&"/"&kid)
end if
还有其他格式等可以按需求自己修改。

搜索:sql="ktitle,kshow,kcommend,kup,khead,kgrade,kkeywords,kdescription,kpath,listids"
在下面增加:
dim sql_fieldkdate
sql_fieldkdate="kdate"
再在if len(sql_field)>0 then sql=sql&","&sql_field后面加上&","&sql_fieldkdate

posted @ 2010-08-31 14:40  那年那月  阅读(603)  评论(0编辑  收藏  举报