增加ch和gh的发布日期功能

master
黄文强@HWQ-PC 1 year ago
parent dcb914b432
commit 471b425861

@ -678,12 +678,6 @@ class Information extends CI_Controller
}
}
}
//AMP更新和生成 end
//为新闻添加默认发布时间
$meta_news_createdate = get_meta($information->ic_id, 'meta_news_createdate');
if (empty ($meta_news_createdate)) {
add_meta($information->ic_id, 'meta_news_createdate', date('m/d/Y', time()));
}
//如果URL有修改也删除静态文件
if ($this->input->post('ic_url') != $information->ic_url) {
@ -1045,6 +1039,7 @@ class Information extends CI_Controller
$data_H1 = array();
$data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容
$data_H1['author'] = ''; //获取作者信息
$data_H1['meta_news_createdate'] = get_meta($information->ic_id, 'meta_news_createdate');
$author = $this->Operator_model->get_author_nikename($information->ic_author);
if (!empty ($author)) {
$data_H1['author'] = $author->OPI_FirstName;
@ -1723,6 +1718,7 @@ class Information extends CI_Controller
$data_H1 = array();
$data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容
$data_H1['author'] = ''; //获取作者信息
$data_H1['meta_news_createdate'] = get_meta($information->ic_id, 'meta_news_createdate');
$author = $this->Operator_model->get_author_nikename($information->ic_author);
if (!empty ($author)) {

@ -10,7 +10,9 @@
</div>
<h1><?php echo !empty($ic_title)?$ic_title:'H1 title Chinahighlights mobile first template'; ?></h1>
<!--<p class="subheadline">to do</p> -->
<div class="authorupdate">Written by <strong><?php echo !empty($author)?$author:''; ?></strong>Updated <?php echo date("M. j, Y",strtotime($ic_datetime)); ?></div>
<?php if (!empty($meta_news_createdate)) {?>
<div class="authorupdate">Written by <strong><?php echo !empty($author)?$author:''; ?></strong>Updated <?php echo date("M. j, Y",strtotime($meta_news_createdate)); ?></div>
<?php } ?>
<?php if ($ads_by_google) { ?>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4231674166786366"
crossorigin="anonymous"></script>

@ -8,9 +8,10 @@
<?php }?>
</div>
<div class="topinfo">
<h1><?php echo !empty($ic_title)?$ic_title:'H1 title Chinahighlights mobile first template'; ?></h1>
<div class="author_info">By <em><?php echo !empty($author)?$author:''; ?></em> | Updated <?php echo date("M. j, Y",time()); ?></div>
<?php if (!empty($meta_news_createdate)) {?>
<div class="author_info">By <em><?php echo !empty($author)?$author:''; ?></em> | Updated <?php echo date("M. j, Y",$meta_news_createdate); ?></div>
<?php } ?>
</div>
</div>
</div>

Loading…
Cancel
Save