今天要修改一个网站的栏目命名方法,因为网站的文章数目太多了,为了方便管理和优化把栏目尽量的扁平化简单化,就要修改dedecms生成页面的命名方法,100多个栏目一个一个改要改多久啊,TC就从网上找了一个sql批量修改命名的方法,随便也把其他dedecms sql命名方法也发上来:
select namerule from wmd_arctype
select namerule2 from wmd_arctype
update wmd_arctype set namerule='{typedir}/{aid}.html'
update wmd_arctype set namerule2='{typedir}/list_{page}.html'
利用SQL命令批量修改内容,路径和超链接等信息。
语句 DEDECMS SQL命令批量替换
1.更改文章中的内容
update wmd_addonarticle set body=replace(body,'原来的字符','替换后的字符')
例子解释:update wmd_addonarticle set body=replace(body,’软件下载’,'插件下载’)
2.更改缩略图目录
update wmd_archives set litpic=replace(litpic,'原来的字符','替换后的字符')
例子解释:update wmd_archives set litpic=replace(litpic,’uplimg,’tupian’)
3.批量替换文章模型中内容部分图片链接路径.
update wmd_addonarticle set body=replace(body,'src="http://20tc.com/img/','src="http://20tc.com/images/');
例子解释:把图片路径由原来的http://www.20tc.com/img/替换成http://20tc.com/images/
4.批量替换文章模型中内容部分超链接
update wmd_addonarticle set body=replace(body,'href="http://www.meiowpet.com','href="http://meiowpet.com');
例子解释:把文章模型中的超链接由原来的http://www.20tc.com替换成http://20tc.com
5.批量替换文章模型中内容部分图片锚文本文字
update wmd_addonarticle set body=replace(body,'alt="http://www.20tc.com/','alt="http://20tc.com/');
例子解释:把文章模型中的图片锚文本信息由原来的http://www.20tc.com替换成http://20tc.com
6.批量替换软件模型内容部分超链接
update wmd_addonsoft set introduce=replace(introduce,'href="http://www.meowpetcom/images/js/test.html','href="http:/20tc.com/index.html');
例子解释:把软件模型内容中超链接由原来的http://www.20tc.com/images/js/test.html替换成http:/20tc.com/index.htm
7.批量替换文章模型中作者字段
update wmd_archives set writer=replace(writer,'http://www.20tc.com','http://20tc.com');
例子解释:把文章模型中的作者由原来的http://www.20tc.com替换成http://20tc.com
8.批量替换文章模型中来源字段
update wmd_archives set source=replace(source,'似水星辰www.20tc.com','星辰似水20tc.com');
例子解释:把文章模型中的帖子来源由原来的似水星辰www.20tc.com替换成星辰似水20tc.com
9.批量替换文章命名规则
update `wmd_arctype` set namerule='{typedir}/{aid}.html';
例子解释:把站内所有文章模型命名规则全部替换成{typedir}/{aid}.html这样一种形式
10.批量替换软件模型演示地址超链接
update wmd_addonsoft set writer=replace(officialUrl,'http:/www.20tc.com','http://20tc.com');
例子解释:把软件模型原始地址超链接由原来的http:/www.20tc.com替换成http://20tc.com
11.批量审核文章
update wmd_archives set arcrank=0;
update wmd_arctiny set arcrank=0;
update wmd_taglist set arcrank=0;
例子解释:arcrank=0 仅动态


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)