|
|
|
@ -664,11 +664,12 @@ class Information extends CI_Controller
|
|
|
|
$template = str_replace('<!--@TRAIN-SEARCH@-->', $template_TrainSearch, $template);
|
|
|
|
$template = str_replace('<!--@TRAIN-SEARCH@-->', $template_TrainSearch, $template);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//非产品页面
|
|
|
|
|
|
|
|
$meta_product_code = get_meta($information->ic_id, 'meta_product_code');
|
|
|
|
$meta_product_code = get_meta($information->ic_id, 'meta_product_code');
|
|
|
|
|
|
|
|
$meta_google_ad_article = get_meta($information->ic_id, 'meta_google_ad_article');
|
|
|
|
|
|
|
|
//非产品页面
|
|
|
|
if (empty($meta_product_code)) {
|
|
|
|
if (empty($meta_product_code)) {
|
|
|
|
|
|
|
|
|
|
|
|
$ads_by_google = !empty(get_meta($information->ic_id, 'meta_google_ad_article'));
|
|
|
|
$ads_by_google = !empty($meta_google_ad_article);
|
|
|
|
//H1模板替换
|
|
|
|
//H1模板替换
|
|
|
|
$data_H1 = array();
|
|
|
|
$data_H1 = array();
|
|
|
|
$data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容
|
|
|
|
$data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容
|
|
|
|
@ -835,6 +836,19 @@ class Information extends CI_Controller
|
|
|
|
$information->ic_content = str_replace('<!--@Content-Recommends-Tour@-->', $this->load->view($template_path . '-recommends-tour', array('recommands' => $template_recommand), TRUE), $information->ic_content);
|
|
|
|
$information->ic_content = str_replace('<!--@Content-Recommends-Tour@-->', $this->load->view($template_path . '-recommends-tour', array('recommands' => $template_recommand), TRUE), $information->ic_content);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 未勾选In Article 广告时,加入标签 <meta name="ezoic" content="noads"/>,让 ezoic 识别出该页面不展示广告。
|
|
|
|
|
|
|
|
if (empty($meta_google_ad_article)) {
|
|
|
|
|
|
|
|
$information->ic_content = str_replace(
|
|
|
|
|
|
|
|
'<!--@Meta-Ezoic-NoAds@-->',
|
|
|
|
|
|
|
|
'<meta name="ezoic" content="noads"/>',
|
|
|
|
|
|
|
|
$information->ic_content);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$information->ic_content = str_replace(
|
|
|
|
|
|
|
|
'<!--@Meta-Ezoic-NoAds@-->',
|
|
|
|
|
|
|
|
'',
|
|
|
|
|
|
|
|
$information->ic_content);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//替换内容中广告
|
|
|
|
//替换内容中广告
|
|
|
|
$temp_array = array();
|
|
|
|
$temp_array = array();
|
|
|
|
preg_match_all('^<!--@TIPS-[A-Z]+-([0-9]+)@-->^', $information->ic_content, $temp_array);
|
|
|
|
preg_match_all('^<!--@TIPS-[A-Z]+-([0-9]+)@-->^', $information->ic_content, $temp_array);
|
|
|
|
|