怎样开启Dedecms的小说模块

2017年4月26日 由 Amon

1. 介绍

演示:http://v57.demo.dedecms.com/book

2. 启用

演示:http://v57.demo.dedecms.com/book

修改权限为777:

/templets/plus

3. 添加数据表

DROP TABLE IF EXISTS `cto_story_books`;
CREATE TABLE IF NOT EXISTS `cto_story_books` (
  `bid` int(11) unsigned NOT NULL auto_increment,
  `catid` smallint(6) default '0',
  `bcatid` smallint(6) NOT NULL default '0',
  `ischeck` smallint(6) NOT NULL default '1',
  `status` tinyint(1) NOT NULL default '0',
  `booktype` smallint(6) NOT NULL default '0',
  `iscommend` smallint(6) NOT NULL default '0',
  `click` int(11) unsigned NOT NULL default '0',
  `freenum` smallint(6) NOT NULL default '0',
  `bookname` varchar(40) NOT NULL default '',
  `author` varchar(30) NOT NULL default '',
  `mid` int(11) unsigned NOT NULL default '0',
  `adminid` int(11) NOT NULL default '0',
  `litpic` varchar(100) NOT NULL default '',
  `pubdate` int(11) NOT NULL default '0',
  `lastpost` int(11) NOT NULL default '0',
  `postnum` int(11) NOT NULL default '0',
  `lastfeedback` int(11) NOT NULL default '0',
  `feedbacknum` int(11) NOT NULL default '0',
  `weekcc` int(11) NOT NULL default '0',
  `monthcc` int(11) NOT NULL default '0',
  `weekup` int(11) NOT NULL default '0',
  `monthup` int(11) NOT NULL default '0',
  `description` varchar(250) NOT NULL default '',
  `body` mediumtext,
  `keywords` varchar(60) NOT NULL default '',
  `userip` varchar(20) NOT NULL default '',
  `senddate` int(11) NOT NULL default '0',
  `arcrank` smallint(6) default '0',
  `goodpost` varchar(60) NOT NULL default '',
  `badpost` mediumint(8) unsigned NOT NULL default '0',
  `notpost` tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`bid`),
  KEY `catid` (`catid`,`bcatid`,`ischeck`),
  KEY `click` (`click`,`weekcc`,`monthcc`,`weekup`,`monthup`),
  KEY `booktype` (`booktype`,`iscommend`,`freenum`,`bookname`,`mid`,`litpic`,`pubdate`,`lastpost`,`postnum`,`senddate`,`adminid`,`author`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `cto_story_catalog`;
CREATE TABLE IF NOT EXISTS `cto_story_catalog` (
  `id` int(11) NOT NULL auto_increment,
  `classname` varchar(30) NOT NULL default '',
  `pid` int(11) NOT NULL default '0',
  `rank` smallint(6) NOT NULL default '0',
  `listrule` varchar(30) NOT NULL default '',
  `viewrule` varchar(30) NOT NULL default '',
  `booktype` smallint(6) NOT NULL default '0',
  `keywords` varchar(50) NOT NULL default '',
  `description` varchar(200) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `classname` (`classname`,`pid`,`rank`,`booktype`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `cto_story_chapter`;
CREATE TABLE IF NOT EXISTS `cto_story_chapter` (
  `id` int(11) NOT NULL auto_increment,
  `bookid` int(11) NOT NULL default '0',
  `catid` int(11) NOT NULL default '0',
  `chapnum` smallint(6) NOT NULL default '1',
  `postnum` smallint(6) NOT NULL default '0',
  `mid` int(11) NOT NULL default '0',
  `chaptername` varchar(40) NOT NULL default '',
  `bookname` varchar(40) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `cto_story_content`;
CREATE TABLE IF NOT EXISTS `cto_story_content` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(40) NOT NULL default '0',
  `bookname` varchar(40) NOT NULL default '',
  `chapterid` int(11) NOT NULL default '0',
  `bookid` int(11) NOT NULL default '0',
  `catid` smallint(6) NOT NULL default '0',
  `bcatid` smallint(6) NOT NULL default '0',
  `booktype` int(11) NOT NULL default '0',
  `mid` int(11) NOT NULL default '0',
  `adminid` smallint(6) NOT NULL default '0',
  `addtime` int(11) NOT NULL default '0',
  `sortid` smallint(6) NOT NULL default '0',
  `sortbook` smallint(6) NOT NULL default '0',
  `ischeck` smallint(6) NOT NULL default '1',
  `bigpic` varchar(80) NOT NULL default '',
  `body` mediumtext NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `title` (`sortbook`,`chapterid`,`bookid`,`catid`,`bcatid`,`mid`,`adminid`,`addtime`,`ischeck`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `cto_story_viphistory`;
CREATE TABLE IF NOT EXISTS `cto_story_viphistory` (
  `cid` int(11) NOT NULL default '0',
  `mid` int(11) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `cto_story_bookstars`;
CREATE TABLE `cto_story_bookstars` (
  `bid` varchar(11) NOT NULL,
  `totalvotes` int(11) NOT NULL DEFAULT '0',
  `totalvalue` int(11) NOT NULL DEFAULT '0',
  `voteinfo` longtext,
  `usedids` longtext,
  PRIMARY KEY (`bid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `cto_bookfeedback`;
CREATE TABLE IF NOT EXISTS `cto_bookfeedback` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `aid` mediumint(8) unsigned NOT NULL default '0',
  `catid` smallint(5) unsigned NOT NULL default '0',
  `username` char(20) NOT NULL default '',
  `arctitle` varchar(60) NOT NULL default '',
  `ip` char(15) NOT NULL default '',
  `ischeck` smallint(6) NOT NULL default '0',
  `dtime` int(10) unsigned NOT NULL default '0',
  `mid` mediumint(8) unsigned NOT NULL default '0',
  `bad` mediumint(8) unsigned NOT NULL default '0',
  `good` mediumint(8) unsigned NOT NULL default '0',
  `ftype` set('feedback','good','bad') NOT NULL default 'feedback',
  `face` smallint(5) unsigned NOT NULL default '0',
  `msg` text,
  PRIMARY KEY  (`id`),
  KEY `aid` (`aid`,`ischeck`,`mid`)
) ENGINE=MyISAM;

REPLACE INTO `cto_sysconfig` (`aid` ,`varname` ,`info` ,`value` ,`type` ,`groupid`)
VALUES(701, 'cfg_book_freenum', '连载内容默认免费章节(-1为全开放)', '6', 'string', 8),
(702, 'cfg_book_pay', '收费图书计费形式(1按图书,2按章节)', '1', 'string', 8),
(703, 'cfg_book_money', '收费图书花费金币数', '1', 'string', 8),
(705, 'cfg_book_ifcheck', '会员发布图书是否需要审核', 'Y', 'bool', 8);

Insert into `cto_arctype`(reid,topid,sortrank,typename,typedir,isdefault,defaultname,issend,channeltype,
tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`)
Values('0','0','990','小说','_ROOTURL_/book','1','index.php','0','1',
'','','','default','','','2','0','','','0','','','0','0','0','');

4. 火车头发布模块

参考:http://bbs.locoy.com/spider-64404-1-1.html

先采集并发布小说书名,再往书名以发布小说章节。

火车采集器DEDE小说采集模块使用方法

一,先采集小说标题,作者,简介等内容发布到数据库
二,获取已发布的小说ID,采集小说章节内容按标题所在的ID发布到数据库。

可能存在的问题和使用建议

一,不适合太多数据,如果小说标题存在重名,章节内容可能会发布错误
二,发布出的章节要么发布到同一章节下,要么只能一个章节内容发布到此章节栏目下。

广告位
美团云

评论已关闭.