From 56a95c5cf73ffdc3bb1413d4ee46cf72284f59ac Mon Sep 17 00:00:00 2001 From: Jimmy Liow <18777396951@163.com> Date: Thu, 3 Aug 2023 10:11:43 +0800 Subject: [PATCH] =?UTF-8?q?GH=20=E6=96=B0=E5=A2=9E=E6=A0=87=E7=AD=BE=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 34 +++++++++++++++++++ .../views/mobile_first/gh-tips-right-list.php | 26 ++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 application/views/mobile_first/gh-tips-right-list.php diff --git a/application/controllers/information.php b/application/controllers/information.php index e7008e67..87c9d39f 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1430,6 +1430,40 @@ class Information extends CI_Controller if (!empty($template_recommand['Tips Right'])) { $template = str_replace('', "
" . $template_recommand['Tips Right']->it_content . "
", $template); } + // 右侧列表广告 + $tips_right_a = []; + $tips_right_b = []; + $tips_right_c = []; + for ($i = 1; $i <= 12; $i++) { + $key = 'List Tips Right A_' . $i; + if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { + $tips_right_a[] = $recommand_information[$key]; + } + } + for ($i = 1; $i <= 12; $i++) { + $key = 'List Tips Right B_' . $i; + if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { + $tips_right_b[] = $recommand_information[$key]; + } + } + for ($i = 1; $i <= 12; $i++) { + $key = 'List Tips Right C_' . $i; + if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { + $tips_right_c[] = $recommand_information[$key]; + } + } + + $tips_right_list_content = $this->load->view( + 'mobile_first/gh-tips-right-list', + array( + 'tips_right_a' => $tips_right_a, + 'tips_right_b' => $tips_right_b, + 'tips_right_c' => $tips_right_c + ), + true + ); + + $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/mobile_first/gh-tips-right-list.php b/application/views/mobile_first/gh-tips-right-list.php new file mode 100644 index 00000000..211b7943 --- /dev/null +++ b/application/views/mobile_first/gh-tips-right-list.php @@ -0,0 +1,26 @@ +
+
Popular tours
+
+ +
+
Make the most of your time
+
+ +
+
Choose the best time to visit
+
+ +
+
\ No newline at end of file