How can Dreamweaver replace all article sources and authors in batches?
Dreamweaver DEDECMS method to batch replace the "source" and "author" of all articles
First step:
Open: dede (Backend directory) \templets\article_add.htm (publish ordinary template) and article_edit.htm (modify ordinary template)
Recommended learning: dedecms tutorial
Place:
<input name="source" type="text" id="source" style="width:160px" value="<?php echo $source; ?>" size="16"/>
and:
<input name="writer" type="text" id="writer" style="width:120px" value="<?php echo $arcRow["writer"]?>"><input name="selwriter" type="button" id="selwriter" value="选择" />
were changed to:
<input name="source" type="text" id="source" style="width:160px" value="" size="16"/>
and:
<input name="writer" type="text" id="writer" style="width:120px" value="织梦猫"> <input name="selwriter" type="button" id="selwriter" value="选择" />
(replace: "" above with your own source, " Replace "Dreamweaver" with your own author.)
Step 2: Log in to the backend--template--default template management--article_article.htm (article content page template)
:
<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 -->
Changed to:
<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>
(Replace: "" with your own source and "Dreamweaver Cat" with your own author.)
Then: Save
The third step: Content maintenance--select all--review
The third step: generate--one-click update website--update all--start update
You no longer need to select "source" and "author" when publishing new articles in the future
The above is the detailed content of How to batch replace all article sources and authors in DreamWeaver. For more information, please follow other related articles on the PHP Chinese website!