織夢怎么批量替換所有文章來源和作者?
織夢DEDECMS批量替換所有文章“來源”和“作者”的方法
第一步:
打開:dede(后臺目錄)templetsarticle_add.htm (發(fā)表普通模板)和article_edit.htm(修改普通模板)
推薦學習:dedecms教程
分別把:
<input name="source" type="text" id="source" style="width:160px" value="<?php echo $source; ?>" size="16"/>
和:
<input name="writer" type="text" id="writer" style="width:120px" value="<?php echo $arcRow["writer"]?>"><input name="selwriter" type="button" id="selwriter" value="選擇" />
分別改為:
<input name="source" type="text" id="source" style="width:160px" value="" size="16"/>
和:
<input name="writer" type="text" id="writer" style="width:120px" value="織夢貓"> <input name="selwriter" type="button" id="selwriter" value="選擇" />
(上面把:“”換成你自己的來源,“織夢吧”換成你自己的作者。)
第二步:登陸后臺–模板–默認模板管理–article_article.htm(文章內(nèi)容頁模板)
把:
<small>時間:</small>{dede:field.pubdate function="MyDate('Y-m-dH:i',@me)"/} <small>來源:</small> {dede:field.source/} <small>作者:</small>{dede:field.writer/} <small>點擊:</small><scriptsrcscriptsrc="{dede:field/}/count.php?view=yes&aid= {dede:fieldname='id'/}&mid={dede:field/}" type='text/javascript'language="javascript"> </script>次</div& gt;<!-- /info -->
改為:
<small>時間:</small>{dede:field.pubdate function="MyDate('Y-m-dH:i',@me)"/} <small>來源:</small> <small>作者:</small>織夢貓<small>點擊:< /small> <script src="{dede:fieldname='phpurl'/}/count.php?view=yes&aid= {dede:field/}&mid={dede:field/}" type='text/javascript'language="javascript"></script>次</div>
(上面把:“”換成你自己的來源,“織夢貓”換成你自己的作者。)
然后:保存
第三步:內(nèi)容維護–全選–審核
第三:生成–一鍵更新網(wǎng)站–更新所有–開始更新
以后發(fā)布新文章時也不用再選“來源”和“作者”了