From 2e1285143994c3dc8f7312a59260a2b927ff5f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=96=87=E5=BC=BA=40HWQ-PC?= Date: Mon, 22 Apr 2024 16:03:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=98=BE=E7=A4=BA=E5=B9=BF=E5=91=8A=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index 4abc0fac..33ddc63b 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1203,10 +1203,10 @@ class Information extends CI_Controller $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']) || $meta_show_advertise == 'yes') { + if (!empty ($template_recommand['Tips Right TOP']) && $meta_show_advertise == 'yes') { $template = str_replace('', "
", $template); } - if (!empty ($template_recommand['Tips Right']) || $meta_show_advertise == 'yes') { + if (!empty ($template_recommand['Tips Right']) && $meta_show_advertise == 'yes') { $template = str_replace('', "
" . $template_recommand['Tips Right']->it_content . "
", $template); } @@ -1772,7 +1772,7 @@ class Information extends CI_Controller if (!empty ($template_recommand['Tips Right TOP'])) { // $template = str_replace('', "
", $template); } - if (!empty ($template_recommand['Tips Right'])) { + if (!empty ($template_recommand['Tips Right']) && $meta_show_advertise == 'yes') { $template = str_replace('', "
" . $template_recommand['Tips Right']->it_content . "
", $template); } // 右侧列表广告 @@ -2027,7 +2027,7 @@ class Information extends CI_Controller //获取移动优先的模板,如果有的话 $template_path = 'mobile_first/' . $this->config->item('site_code'); if (is_file(APPPATH . 'views/' . $template_path . EXT)) { - $template = $this->load->view($template_path, $data, true); + $template = $this->load->view($template_path, '', true); $html_path_ext = '-mobile.htm'; } else { return false; @@ -2038,7 +2038,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; @@ -2120,7 +2120,7 @@ class Information extends CI_Controller $template_recommand = $recommand_information; $template = str_replace('', $this->load->view($recommand_template, array('recommands' => $template_recommand), true), $template); //广告,改叫tips,防止被插件屏蔽 - if (!empty ($template_recommand['Tips Right'])) { + if (!empty ($template_recommand['Tips Right']) && $meta_show_advertise == 'yes') { $template = str_replace('', "
" . $template_recommand['Tips Right']->it_content . "
", $template); } // 右侧列表广告