作者:狐灵科技 | 2019-06-30 12:42 |点击:
1
|
update `dede_arctype` set namerule='{typedir}/{aid}.html';
|
注:把站内所有文章模型命名规则全部替换成{typedir}/{aid}.html这样一种形式
织梦文章可以通过系统设置》其他选项》文档默认点击数,修改文章初始的点击数,如果不修改会默认随机显示文章点击数
1
|
update `dede_archives` set click=598
|
注:更新所有文章的点击数为598
1
|
update `dede_archives` set click=598 WHERE id=131
|
注:表示更新ID131的文档点击为598
1
|
update `dede_archives` set click=598 WHERE typeid=131
|
注:表示更新栏目ID为131的文档点击为598
1
|
update dede_archives set writer=replace(writer,'admin','站长天下');
|
1
|
update dede_archives set source=replace(source,'未知','站长天下');
|
1
|
update dede_archives set title=replace(title,'改之前','改之后');
|
例如:我想把标题中“站长天下”改“seo博客”:
1
|
update dede_archives set title=replace(title,'站长天下','seo博客');
|
1
|
update dede_archives set description=replace(description,'原来的关键词','替换后的关键词');
|
1
|
update dede_addonarticle set body=replace(body,'原来的关键词','替换后的关键词');
|
注:文章模型也可以变更为图片模型和软件模型
修改dedecms系统》系统基本参数》其他选项》文档标题最大长度为200,改此参数后需要手工修改数据表:
1
|
alter table dede_archives modify column title varchar(200)
|
1
|
update dede_addonarticle set body=replace(body,'href="https://www.hulingweb.cn','href="https://hulingweb.cn');
|
例如:把文章模型中的超链接由原来的https://www.hulingweb.cn替换成https://hulingweb.cn
1
|
update dede_archives set arcrank=0
|
注:arcrank=0 仅动态
1
|
update dede_archives set litpic=replace(litpic,'原来的字符','替换后的字符')
|
例如:
1
|
update dede_archives set litpic=replace(litpic,'uplimg,'tupian')
|
将所有文档设置为“仅动态”:
1
|
update dede_archives set ismake=-1
|
将所有文档设置为“仅静态”:
1
|
update dede_archives set ismake=1
|
将所有栏目设置为“使用动态页”:
1
|
update dede_arctype set isdefault=-1
|
将所有栏目设置为“使用静态页”:
1
|
update dede_arctype set isdefault=1
|
如何去掉url中/a/目录呢?
1、首先在系统设置》系统基本参数,文档html默认保存路径,把a去掉。
2、在dedecms后台中sql命令中执行下面sql命令,然后重新生成页面。
代码如下:
1
|
update dede_arctype set typedir=replace(typedir,'a/','')
|
1
2 3 |
delete from dede_addonarticle where aid>0;
delete from dede_arctiny where id>0; delete from dede_archives where id>0; |
1
2 3 |
delete from dede_addonarticle where aid >= 100 and aid< =5000;
delete from dede_arctiny where id >= 100 and id< =5000; delete from dede_archives where id >= 100 and id<=5000; |
这段sql命令就是把文章id从100到5000的全部删除掉
1
2 3 |
delete from dede_addonimages where typeid = 7;
delete from dede_arctiny where typeid = 7; delete from dede_archives where typeid = 7; |
1
|
delete from dede_arctype where id in (93,94,95,96,97)
|
注:这段sql命令就是把栏目id为93、94、95、96、97的栏目删除掉了
1
|
update dede_archives set typeid='70' where typeid in (93,94,95,96,97)
|
注:这段sql命令就是把栏目栏目id为93,94,95,96,97里面的文章归为栏目id为70的栏目下面
1
|
Update `dede_arctype` set reid='目标父栏目ID' where id in(2,3,4,5)
|
1
2 3 4 5 6 7 8 9 10 |
delete from dede_addonarticle;
delete from dede_addonimages; delete from dede_archives; delete from dede_arctiny; delete from dede_co_htmls; delete from dede_co_urls; delete from dede_co_mediaurls; delete from dede_tagindex ; delete from dede_taglist; delete from dede_keywords; |
注:这段sql命令意思是清空文章和原来采集过的记录
1
2 3 |
alter table `dede_archives` auto_increment =1;
alter table `dede_arctiny` auto_increment =1; alter table `dede_addonarticle` auto_increment =1; |
1
|
alter table `dede_arctype` auto_increment =1;
|
注:表示新发布的文章或者栏目id从1开始,数字1也可以改为指定从任意id开始