Merge branch 'master' of github.com:hainatravel/information-system

hotfix/paypal-note
赵鹏 4 years ago
commit 058781c896

@ -420,8 +420,8 @@ class Information extends CI_Controller
//读取模板生成PC和移动优先文件 //读取模板生成PC和移动优先文件
$recommand_information = $this->recommand_information($information); $recommand_information = $this->recommand_information($information);
$information_new = $this->Information_model->Detail($this->input->post('is_id')); $information_new = $this->Information_model->Detail($this->input->post('is_id'));
$this->make_www_cache_ah('mobile', $information_new,$recommand_information); $this->make_www_cache_ah('mobile', $information_new, $recommand_information);
$this->make_www_cache_ah('pc', $information_new,$recommand_information); $this->make_www_cache_ah('pc', $information_new, $recommand_information);
} else if (strcasecmp($site_code, "gh") == 0 && !empty($auto_update_cache)) { } else if (strcasecmp($site_code, "gh") == 0 && !empty($auto_update_cache)) {
$information_new = $this->Information_model->Detail($this->input->post('is_id')); $information_new = $this->Information_model->Detail($this->input->post('is_id'));
$this->make_www_cache_gh($information_new); $this->make_www_cache_gh($information_new);
@ -784,8 +784,6 @@ class Information extends CI_Controller
if (!empty($template_recommand['Tips Right'])) { if (!empty($template_recommand['Tips Right'])) {
$template = str_replace('<!--@TIPS-RIGHT@-->', "<div class='right_tour'>" . $template_recommand['Tips Right']->it_content . "</div>", $template); $template = str_replace('<!--@TIPS-RIGHT@-->', "<div class='right_tour'>" . $template_recommand['Tips Right']->it_content . "</div>", $template);
} }
//文中的信息推荐 //文中的信息推荐
if (strpos($information->ic_content, '<!--@Content-Recommends-Article@-->') !== false) { if (strpos($information->ic_content, '<!--@Content-Recommends-Article@-->') !== false) {
$information->ic_content = str_replace('<!--@Content-Recommends-Article@-->', $this->load->view($template_path . '-recommends-article', array('recommands' => $template_recommand), TRUE), $information->ic_content); $information->ic_content = str_replace('<!--@Content-Recommends-Article@-->', $this->load->view($template_path . '-recommends-article', array('recommands' => $template_recommand), TRUE), $information->ic_content);
@ -795,6 +793,18 @@ 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);
} }
//替换内容中广告
$temp_array = array();
preg_match_all('^<!--@TIPS-[A-Z]+-([0-9]+)@-->^', $information->ic_content, $temp_array);
if (!empty($temp_array[1])) {
foreach ($temp_array[1] as $key => $item) {
$tips_detail = $this->recommends_and_tips_model->tips_detail($item);
if ($tips_detail) {
$information->ic_content = str_replace($temp_array[0][$key], $tips_detail->it_content, $information->ic_content);
}
}
}
//顶部全屏大图 //顶部全屏大图
if ($device == 'mobile') { //移动端读取移动大图 if ($device == 'mobile') { //移动端读取移动大图
$meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture_mobile'); $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture_mobile');
@ -987,7 +997,7 @@ class Information extends CI_Controller
//推荐信息或者产品 //推荐信息或者产品
//信息推荐 //信息推荐
$template_recommand =$recommand_information;// $this->recommand_information($information); $template_recommand = $recommand_information;// $this->recommand_information($information);
$template = str_replace('<!--@ARTICLENEXT@-->', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), TRUE), $template); $template = str_replace('<!--@ARTICLENEXT@-->', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), TRUE), $template);
//广告改叫tips防止被插件屏蔽 //广告改叫tips防止被插件屏蔽
if (!empty($template_recommand['Tips Right'])) { if (!empty($template_recommand['Tips Right'])) {
@ -1002,6 +1012,18 @@ 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);
} }
//替换内容中广告
$temp_array = array();
preg_match_all('^<!--@TIPS-[A-Z]+-([0-9]+)@-->^', $information->ic_content, $temp_array);
if (!empty($temp_array[1])) {
foreach ($temp_array[1] as $key => $item) {
$tips_detail = $this->recommends_and_tips_model->tips_detail($item);
if ($tips_detail) {
$information->ic_content = str_replace($temp_array[0][$key], $tips_detail->it_content, $information->ic_content);
}
}
}
//非产品页面 //非产品页面
if (empty(get_meta($information->ic_id, 'meta_product_code'))) { if (empty(get_meta($information->ic_id, 'meta_product_code'))) {
$addthis_widget = $this->load->view($template_path . '-add-this', false, true); $addthis_widget = $this->load->view($template_path . '-add-this', false, true);
@ -1033,17 +1055,6 @@ class Information extends CI_Controller
$lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.asiahighlights.com/grey.gif'); $lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.asiahighlights.com/grey.gif');
$template = str_replace('<!--@CUSTOM-CONENT@-->', $lazy_content, $template); $template = str_replace('<!--@CUSTOM-CONENT@-->', $lazy_content, $template);
//替换内容中广告
$temp_array = array();
preg_match_all('^<!--@TIPS-[A-Z]+-([0-9]+)@-->^', $template, $temp_array);
if (!empty($temp_array[1])) {
foreach ($temp_array[1] as $key => $item) {
$tips_detail = $this->recommends_and_tips_model->tips_detail($item);
if ($tips_detail) {
$template = str_replace($temp_array[0][$key], $tips_detail->it_content, $template);
}
}
}
//Google广告代码 //Google广告代码
//if (!empty(get_meta($information->ic_id, 'meta_google_ad_content'))) { //if (!empty(get_meta($information->ic_id, 'meta_google_ad_content'))) {
@ -1423,7 +1434,7 @@ class Information extends CI_Controller
$data = $this->Information_model->random(1, $root_information->is_path, $exclude_ids); $data = $this->Information_model->random(1, $root_information->is_path, $exclude_ids);
break; break;
case 'rule_this_node_random'://指定节点下随机 case 'rule_this_node_random'://指定节点下随机
$ir_pointer = $this->Information_model->Detail($recommand->ir_pointer_is_id,'is_path'); $ir_pointer = $this->Information_model->Detail($recommand->ir_pointer_is_id, 'is_path');
if (!empty($ir_pointer)) { if (!empty($ir_pointer)) {
$data = $this->Information_model->random(1, $ir_pointer->is_path, $exclude_ids); $data = $this->Information_model->random(1, $ir_pointer->is_path, $exclude_ids);
} }

Loading…
Cancel
Save