From 9f9aba02f57b847007d5a2b52045147054bdc4a0 Mon Sep 17 00:00:00 2001
From: Jimmy Liow <18777396951@163.com>
Date: Mon, 12 Jun 2023 09:59:21 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=20AH=20=E5=8F=B3=E4=BE=A7?=
=?UTF-8?q?=E6=8E=A8=E8=8D=90=E5=B9=BF=E5=91=8A=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/controllers/information.php | 20 +++++++++++++++++++
application/views/mobile_first/ah-pc.php | 1 +
...-tips-right.php => ah-tips-right-list.php} | 0
3 files changed, 21 insertions(+)
rename application/views/mobile_first/{ah-list-tips-right.php => ah-tips-right-list.php} (100%)
diff --git a/application/controllers/information.php b/application/controllers/information.php
index f4e9c065..6ec879a5 100644
--- a/application/controllers/information.php
+++ b/application/controllers/information.php
@@ -1509,6 +1509,26 @@ class Information extends CI_Controller
if (!empty($template_recommand['Tips Right'])) {
$template = str_replace('', "
" . $template_recommand['Tips Right']->it_content . "
", $template);
}
+ // 右侧列表广告
+ $tipsRightList = [];
+ for ($i=1; $i <= 36; $i++) {
+ $key = 'List Tips Right '.$i;
+ if (array_key_exists($key, $recommand_information)) {
+ $tipsRightList[] = $recommand_information[$key];
+ }
+ }
+
+ $tips_right_list_content = $this->load->view(
+ 'mobile_first/ah-tips-right-list',
+ array(
+ 'tips_right_first' => array_slice($tipsRightList, 0, 12),
+ 'tips_right_second' => array_slice($tipsRightList, 12, 12),
+ 'tips_right_third' => array_slice($tipsRightList, 24, 12)),
+ 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/ah-pc.php b/application/views/mobile_first/ah-pc.php
index 988653c1..49ff2ca2 100644
--- a/application/views/mobile_first/ah-pc.php
+++ b/application/views/mobile_first/ah-pc.php
@@ -286,6 +286,7 @@
+
diff --git a/application/views/mobile_first/ah-list-tips-right.php b/application/views/mobile_first/ah-tips-right-list.php
similarity index 100%
rename from application/views/mobile_first/ah-list-tips-right.php
rename to application/views/mobile_first/ah-tips-right-list.php