Discuz批量替换/修改门户文章标题内容

overme9个月前 (10-17)网页设计1491
我们运营论坛网站时,如果网站中已经发了很多文章内容了,需要修改替换固定的内容。手动修改耗时,是不可取的。批量替换标题或内容就需要使用SQL批量操作。在此分享,Discuz 如何批量修改门户文章标题及内容。

Discuz 批量替换/修改门户文章标题、内容 SQL命令:

批量替换门户文章标题:
UPDATE pre_portal_article_content SET content=REPLACE(subject,’替换前’,’替换后’);

批量替换门户文章内容:
UPDATE pre_portal_article_content SET content=REPLACE(content,’替换前’,’替换后’);

批量替换论坛贴子标题:
UPDATE pre_forum_thread SET subject=REPLACE(subject,’替换前,’替换后’);

批量替换论坛贴子内容:
UPDATE pre_forum_post SET message=REPLACE(message,’替换前’,’替换后’);

举例:
UPDATE pre_portal_article_content SET content=REPLACE(content,'<div><embed’,'<div><embed tt’);
UPDATE pre_portal_article_content SET content=REPLACE(content,’height=”500″>’,’height=”tt500″>’);

UPDATE pre_portal_article_content SET content=REPLACE(content,'<embed src=’,'<div><embed src=’);
UPDATE pre_portal_article_content SET content=REPLACE(content,’height=”500″>’,’height=”500″></div><div>我爱自学https://www.5izixue.com/</div>’);

UPDATE pre_portal_article_content SET content=REPLACE(content,'<div><embed tt’,'<div><embed’);
UPDATE pre_portal_article_content SET content=REPLACE(content,’height=”tt500″>’,’height=”500″>’);

提醒:在进行SQL批量操作前,不要忘记进行网站数据库备份。

相关文章

如何去掉Discuz标题中的Powered by Discuz

使用Discuz系统的网站,默认每个页面标题后面会出现”Powered by Discuz!“字样的信息,使得页面标题比较冗长。 为优化标题结构,在此分享Discuz标题结构优化方法。 操作方法如...


		Discuz 手动安装bshare分享按钮

Discuz 手动安装bshare分享按钮

replyreload += ',' + 330;之前百度网页分享按钮未停用前,很多站都使用的百度网页分享,本站也是。 现在百度网页分享功能停用了,小编就转而使用bshare网页分享工具。 在此分...

Discuz建站系统default目录结构说明

/template/default/common/  公共模板目录全局加载 /template/default/common/block_forumtree.htm  DIY论坛树形列表模块 /t...

如何使Discuz [attachimg]代码正确解析

在一些较复杂的自定义Discuz!代码中,我们可能需要内嵌Discuz!自有的[attachimg]aid[/attachimg]代码。 案例:某视频播放器支持给每个视频设置一个图片封面,如果每次...

discuz帖子列表页 帖子预览 相关模板

帖子列表页的帖子预览展示用的模板是/template/default/forum/viewthread_preview.htm,展示出来的楼层模板是同目录的viewthread_preview_n...

Discuz Header meta代码解析

Discuz系统统一的头部文件所在位置:/template/default/common/header_common.htm 部分代码解析如下: <meta http-equiv=”Cont...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。