CT页面加作者

hotfix/paypal-note
赵鹏 3 years ago
parent f6eefa5379
commit 7dbc9ba859

@ -1368,7 +1368,9 @@ class Information extends CI_Controller
$data["DESCRIPTION"] = $information->ic_seo_description;
$data["KEYWORDS"] = $information->ic_seo_keywords;
$data["CANONICAL"] = $this->config->item('site_url') . $information->ic_url;
$meta_ct_page_type = "";
$meta_ct_page_type = get_meta($information->ic_id, 'meta_ct_page_type'); //页面类型
$meta_product_code = get_meta($information->ic_id, 'meta_product_code'); //绑定的产品编号
//面包屑
$crumb = "";
@ -1381,6 +1383,15 @@ class Information extends CI_Controller
$crumb .= "</div>";
}
$data["crumb"] = $crumb;
//作者字符串,信息页或者城市天气页加载 2022-7-26
$str_author="";
$author = $this->Operator_model->get_author_nikename($information->ic_author);
if ((empty($meta_product_code) && !($meta_ct_page_type !== false && $meta_ct_page_type != "")) || $meta_ct_page_type=="weatherpage"){
$OPI_FirstName = !empty($author)?$author->OPI_FirstName:'author nickname';
$str_author = '<div class="authorupdate">Written by <strong>'.$OPI_FirstName.'</strong> Updated <span>' . date("M. j, Y",strtotime($information->ic_datetime)) . '</span></div>' ;
}
/* 详细内容 */
$ic_content = $information->ic_content;
// /**替换详细内容里面的价格
@ -1399,8 +1410,8 @@ class Information extends CI_Controller
// return '<span class="js_getTourPrice" data="'.$matchItem.'"></span>';;
// },$ic_content);
/** 替换H1加面包屑 */
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>', $ic_content, 1);
/** 替换H1加面包屑,加作者 */
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>' . "\r\n" .$str_author, $ic_content, 1);
/**替换zodiac标签 */
if (strpos($ic_content, '<!--@ZODIAC-CALC@-->') !== false){
@ -1476,9 +1487,8 @@ class Information extends CI_Controller
//总JS为了方便以后js好维护必须的把一些公用的JS统计到一个文件。但是又不是所有页面都需要调用这个基础js所以必须在这里进行判断
$addBaseJs = false;
$addonJs = "";
$meta_ct_page_type = "";
$meta_ct_page_price = get_meta($information->ic_id, 'meta_ct_page_price'); //是否包含价格
$meta_ct_page_type = get_meta($information->ic_id, 'meta_ct_page_type'); //页面类型
if ($meta_ct_page_price == "yes") {
$addBaseJs = true;
} else if ($meta_ct_page_type !== false && $meta_ct_page_type != "") {

@ -430,7 +430,7 @@ class innerTrainSearch extends CI_Controller{
}
}
//App项目组的接口
//App项目组的接口 暂时不用
public function appGroupApi($train_date=null,$fromStation=null,$toStation=null,$return=false){
set_time_limit(0);

Loading…
Cancel
Save