diff --git a/application/controllers/information.php b/application/controllers/information.php index 1ada4131..ba7b3639 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1201,8 +1201,9 @@ class Information extends CI_Controller //信息推荐 $template_recommand = $recommand_information; //$this->recommand_information($information); 从外面传进来,pc和移动只需要查一次,减少数据库负担 $template = str_replace('', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), true), $template); + $meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise'); // //广告,改叫tips,防止被插件屏蔽 - if (!empty ($template_recommand['Tips Right TOP'])) { + if (!empty ($template_recommand['Tips Right TOP']) || !empty ($meta_show_advertise)) { $template = str_replace('', "
", $template); } if (!empty ($template_recommand['Tips Right'])) { @@ -1216,7 +1217,7 @@ class Information extends CI_Controller $tips_right_a = []; $tips_right_b = []; $tips_right_c = []; - $meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise'); + for ($i = 1; $i <= 12; $i++) { $key = 'List Tips Right A_' . $i; if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { @@ -1653,6 +1654,8 @@ class Information extends CI_Controller public function make_www_cache_gh($device, $information, $recommand_information) { $data = array(); + $meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise'); + $data['meta_show_advertise'] = $meta_show_advertise; switch ($device) { case 'mobile': //获取移动优先的模板,如果有的话 @@ -1668,7 +1671,7 @@ class Information extends CI_Controller //获取PC的模板,如果有的话 $template_path = 'mobile_first/' . $this->config->item('site_code'); if (is_file(APPPATH . 'views/' . $template_path . '-pc' . EXT)) { - $template = $this->load->view($template_path . '-pc', '', true); + $template = $this->load->view($template_path . '-pc', $data, true); $html_path_ext = '-pc.htm'; } else { return false; @@ -1776,7 +1779,6 @@ class Information extends CI_Controller $tips_right_a = []; $tips_right_b = []; $tips_right_c = []; - $meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise'); for ($i = 1; $i <= 12; $i++) { $key = 'List Tips Right A_' . $i; if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { @@ -2018,12 +2020,14 @@ class Information extends CI_Controller $data = array(); $data['information'] = $information; $recommand_template = ''; + $meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise'); + $data['meta_show_advertise'] = $meta_show_advertise; switch ($device) { case 'mobile': //获取移动优先的模板,如果有的话 $template_path = 'mobile_first/' . $this->config->item('site_code'); if (is_file(APPPATH . 'views/' . $template_path . EXT)) { - $template = $this->load->view($template_path, '', true); + $template = $this->load->view($template_path, $data, true); $html_path_ext = '-mobile.htm'; } else { return false; @@ -2123,7 +2127,7 @@ class Information extends CI_Controller $tips_right_a = []; $tips_right_b = []; $tips_right_c = []; - $meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise'); + for ($i = 1; $i <= 12; $i++) { $key = 'List Tips Right A_' . $i; if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { diff --git a/application/views/mobile_first/ah-pc.php b/application/views/mobile_first/ah-pc.php index af6a6066..b1e5c231 100644 --- a/application/views/mobile_first/ah-pc.php +++ b/application/views/mobile_first/ah-pc.php @@ -227,6 +227,7 @@
+

Why Asia Highlights (10,000+ reviews & 98.8% 5-star rating)

@@ -242,6 +243,7 @@
  • Celebrate milestones with style!
  • +
    Create diff --git a/application/views/mobile_first/gh-pc.php b/application/views/mobile_first/gh-pc.php index e77a9870..76457d74 100644 --- a/application/views/mobile_first/gh-pc.php +++ b/application/views/mobile_first/gh-pc.php @@ -191,6 +191,7 @@
    +

    Why Global Highlights (10,000+ reviews & 98.8% 5-star rating)

    @@ -206,6 +207,7 @@
  • Celebrate milestones with style!
  • +
    Create