Emlog自动修改文章草稿最新发布时间,自动改为当前的发布时间

风起兮

前言:


emlog的文章发布时间是确定的,如果是新文章,那么就是新建文章的时间。如果再次编辑,还是会以发布时候的时间为准,包括草稿箱的也是,发布也是按保存的时间为准。

每次手动去改都很麻烦,而且对搜索引擎不是怎么友好,无论新老发布的时间都会变成管理员打开文章的当前时间,这样对于搜索引擎识别文章更新时间也有帮助,认为文章是实时更新的

优化:


以Emlog6.0版本为例:

找到到文件"/admin/views/write.php" 第88行:

<input maxlength="200" name="postdate" id="postdate" value="<?php echo $postDate; ?>" class="form-control" />


把88行的代码修改为:

<input maxlength="200" name="postdate" id="postdate" value="<?php echo date('Y-m-d H:i:s');; ?>" class="form-control" />


这样优化便完成了,每次编辑文章和草稿发布文章都会以最新的时间为准,免去手动的麻烦。



版权声明:《 Emlog自动修改文章草稿最新发布时间,自动改为当前的发布时间 》为作者风起兮原创文章,转载请注明原文地址!
最后编辑:2020-7-1 16:07:49
分享到:
赞(1)
发表评论 / Comment

用心评论~

金玉良言 / Appraise
Calsarrex本站最强王者游客
2022-09-17 07:59
<a href=https://buydoxycyclineon.com/>doxycycline monohydrate vs hyclate</a> The committee discusses research considerations or approaches that can be implemented to improve the quality of data collected as well as the overall evidence base.
Usetriept本站最强王者游客
2022-09-13 20:12
Mourning is individual, but my first m c was the worst, and I had an insensitive Doc. <a href=https://tamoxifenolvadex.com/>tamoxifen gynecomastia before and after</a>
Oresola本站最强王者游客
2022-09-10 15:55
<a href=http://clomida.com/>clomid 100mg</a> I can definitely see why people love or hate this place.
wheevipse本站最强王者游客
2022-09-07 17:30
<a href=http://cheapcialiss.com/>where to buy cialis</a> Couples in their 50s, 60s and 70s are more sexual than they ve ever been, says Kavaler
Spourse本站最强王者游客
2022-09-05 15:37
This maintains the levels of the medication in your blood so you should be able to get an erection when you want to engage in sexual activity <a href=http://vtopcial.com/>cialis 5 mg best price usa</a> In case you experience these side effects, immediately seek emergency care
adviste本站最强王者游客
2022-09-03 16:36
Sildenafil Generic Viagra works differently than many other prescription medications <a href=https://buypriligyo.com/>best site to buy priligy canada</a>
excinty本站最强王者游客
2022-09-01 12:18
<a href=https://cialisfstdelvri.com/>cialis online no prescription</a> Share this Event