CT详细页添加火车票

hotfix/paypal-note
赵鹏 3 years ago
parent ba9008b9a7
commit fff2787dfd

@ -1490,6 +1490,7 @@ class Information extends CI_Controller
$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'); //绑定的产品编号
$template_path = 'mobile_first/' . $this->config->item('site_code'); //模板位置
//面包屑
$crumb = "";
@ -1511,9 +1512,17 @@ class Information extends CI_Controller
$str_author = '<div class="authorupdate">Written by <strong>' . $OPI_FirstName . '</strong> Updated <span>' . date("M. j, Y", strtotime($information->ic_datetime)) . '</span></div>';
}
//火车票详细页搜索框添加 -- zp
$meta_ct_page_trainform = get_meta($information->ic_id, 'meta_ct_page_trainform'); //是否插入火车票搜索框
if ($meta_ct_page_trainform == "yes" || $information->is_parent_id == "278014609") {
$template_TrainSearch = $this->load->view($template_path . '-train-detail', null, TRUE);
}
/* 详细内容 */
$ic_content = $information->ic_content;
// /**替换详细内容里面的价格
#region old replace
// /**替换详细内容里面的价格
/* 直接使用fetch来动态获取价格这样不用替换标签直接录标签
// * // 一日游价格标签, "<!--@DayTripPrice:XASIC-41@-->" 或者<!--@DayTripPrice:XASIC-41,2@--> 逗号后面是人数
// * //精华线路标签"<!--@TourPrice:ct-1@-->"
@ -1528,9 +1537,10 @@ class Information extends CI_Controller
// $matchItem = $match[1];
// return '<span class="js_getTourPrice" data="'.$matchItem.'"></span>';;
// },$ic_content);
#enregion
/** 替换H1加面包屑,加作者 */
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>' . "\r\n" . $str_author, $ic_content, 1);
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>' . "\r\n" . $str_author .$template_TrainSearch . "\r\n", $ic_content, 1);
/**替换zodiac标签 */
if (strpos($ic_content, '<!--@ZODIAC-CALC@-->') !== false) {
@ -1549,7 +1559,6 @@ class Information extends CI_Controller
//非产品页面
$data["PRODUCTJS"] = "";
$data["ISPRODUCT"] = "no"; //判断是否是产品页
$template_path = 'mobile_first/' . $this->config->item('site_code');
$data["addthis_widget"] = "";
if (empty(get_meta($information->ic_id, 'meta_product_code'))) {
$data["addthis_widget"] = $this->load->view($template_path . '-add-this', false, true); //社媒代码addthis

Loading…
Cancel
Save