From de54f8417ccb89e5545f09269d74b6c28e90125d 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 09:13:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=B9=B3=E5=8F=B0=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=98=AF=E5=90=A6=E6=98=BE=E7=A4=BA=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E5=B9=BF=E5=91=8A=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 17 ++++++++++++----- .../views/bootstrap3/information_edit.php | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index b47839f0..1ada4131 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1216,6 +1216,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]) { @@ -1244,8 +1245,9 @@ class Information extends CI_Controller ), true ); - + if(!empty($meta_show_advertise)){ $template = str_replace('', $tips_right_list_content, $template); + } } //文中的信息推荐 @@ -1774,6 +1776,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]) { @@ -1802,8 +1805,9 @@ class Information extends CI_Controller ), true ); - + if(!empty($meta_show_advertise)){ $template = str_replace('', $tips_right_list_content, $template); + } //文中的信息推荐 if (strpos($information->ic_content, '') !== false) { // $information->ic_content = str_replace('', $this->load->view($template_path . '-recommends-article', array('recommands' => $template_recommand), TRUE), $information->ic_content); @@ -2119,6 +2123,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]) { @@ -2143,13 +2148,15 @@ class Information extends CI_Controller array( 'tips_right_a' => $tips_right_a, 'tips_right_b' => $tips_right_b, - 'tips_right_c' => $tips_right_c + 'tips_right_c' => $tips_right_c, ), true ); - $template = str_replace('', $tips_right_list_content, $template); - + if(!empty($meta_show_advertise)){ + $template = str_replace('', $tips_right_list_content, $template); + } + //文中的信息推荐 if (strpos($information->ic_content, '') !== false) { $information->ic_content = str_replace('', $this->load->view($template_path . '-recommends-article', array('recommands' => $template_recommand), true), $information->ic_content); diff --git a/application/views/bootstrap3/information_edit.php b/application/views/bootstrap3/information_edit.php index 8f935525..a96b1442 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -1154,6 +1154,25 @@ placeholder="124343,8784," value="ic_id, 'meta_bread_info'); ?>" /> +
+ + + +
+