建站经验 experience
当前位置:首页 > 网站建设专题 > 建站经验
织梦会员发表文章 采集文章设置默认为动态浏览
发布日期:2010-08-02 阅读次数:759 字体大小:

首先找到需要修改的地方,先从会员发布文章开始,找到 member/article_add.php

找到以下代码

//保存到主表

  1. $inQuery = "INSERT INTO `cz_archives`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,  color,writer,source,litpic,pubdate,senddate,mid,description,keywords,mtype)  
  2. VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank','0','$money','$title','$shorttitle',  
  3. '$color','$writer','$source','$litpic','$pubdate','$senddate','$mid','$description','$keywords','$mtypesid'); ";

更改为

//保存到主表

  1. $inQuery = "INSERT INTO `cz_archives`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,  color,writer,source,litpic,pubdate,senddate,mid,description,keywords,mtype)  
  2. VALUES ('$arcID','$typeid','$sortrank','$flag','-1','$channelid','$arcrank','0','$money','$title','$shorttitle',  
  3. '$color','$writer','$source','$litpic','$pubdate','$senddate','$mid','$description','$keywords','$mtypesid'); ";

保存后上传至空间覆盖即可,以后会员发表的文章只需要审核,不需要再一处一处的修改了。

接下来是采集,同上,找到 你的后台目录/co_export.php

找到以下代码

//基本信息主表

  1. $mainSqlTemplate  = "INSERT INTO `$maintable`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,description,keywords)  
  2.   VALUES ('@aid@','@typeid@','@sortrank@','@flag@','0','$channelid','$arcrank','0','0','@title@','','','@writer@','@source@','@litpic@','@pubdate@','@senddate@','$adminid','@description@','@keywords@'); ";

替换为

//基本信息主表

  1. $mainSqlTemplate  = "INSERT INTO `$maintable`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,description,keywords)  
  2.  VALUES ('@aid@','@typeid@','@sortrank@','@flag@','-1','$channelid','$arcrank','0','0','@title@','','','@writer@','@source@','@litpic@','@pubdate@','@senddate@','$adminid','@description@','@keywords@'); ";

OK,大功告成。以后不用再麻烦的修改了。

感谢大家的支持,本文为原创,转载请申明。原文地址:http://www.iii28.com/view-154-1.html

感谢 晓江 的投稿