From 02be4434e3b630c8e123ef95feb7165ed6da8df5 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Mon, 26 Jul 2021 15:37:39 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=E7=9A=84=E7=BB=93=E6=9E=84=E5=8C=96=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/mobile_first/ch-pc.php | 15 +++++++++++++++ application/views/mobile_first/ch.php | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/application/views/mobile_first/ch-pc.php b/application/views/mobile_first/ch-pc.php index 9018f155..b75f42c3 100644 --- a/application/views/mobile_first/ch-pc.php +++ b/application/views/mobile_first/ch-pc.php @@ -498,6 +498,21 @@ ] } + \ No newline at end of file diff --git a/application/views/mobile_first/ch.php b/application/views/mobile_first/ch.php index 9253a0fe..4d00113c 100644 --- a/application/views/mobile_first/ch.php +++ b/application/views/mobile_first/ch.php @@ -360,6 +360,21 @@ ] } + \ No newline at end of file From d87a6cdbcaebe0a457cd4cb7649876098238ccc1 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Tue, 27 Jul 2021 10:56:11 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=BB=93=E6=9E=84=E5=8C=96=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 11 +++++++- application/views/mobile_first/ch-pc.php | 1 + .../ch-structured-data-article.php | 28 +++++++++++++++++++ application/views/mobile_first/ch.php | 1 + 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 application/views/mobile_first/ch-structured-data-article.php diff --git a/application/controllers/information.php b/application/controllers/information.php index 32adc849..d76e253f 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -618,7 +618,8 @@ class Information extends CI_Controller //H1模板替换 $data_H1 = array(); $data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容 - $data_H1['author'] = $this->Operator_model->get_author_nikename($information->ic_author); //获取作者信息 + $author_nickname = $this->Operator_model->get_author_nikename($information->ic_author); + $data_H1['author'] = $author_nickname; //获取作者信息 $data_H1['ic_title'] = $information->ic_title; $data_H1['ic_photo'] = $information->ic_photo; $data_H1['breadcrumb_data'] = $breadcrumb_data; @@ -627,6 +628,14 @@ class Information extends CI_Controller $addthis_widget = $this->load->view($template_path . '-add-this', false, true); $template = str_replace('', $addthis_widget, $template); + + if ($information->is_id == '278006460') { + $article_structured_data_content = $this->load->view( + $template_path . '-structured-data-article', + array('information' => $information, 'author_nickname' => $author_nickname), + true); + $template = str_replace('', $article_structured_data_content, $template); + } } else { $template = str_replace('', '', $template); $inquiry_form_template = $this->load->view($template_path . '-inquiry-form', array('meta_product_code' => $meta_product_code), true); diff --git a/application/views/mobile_first/ch-pc.php b/application/views/mobile_first/ch-pc.php index b75f42c3..a9fbb4d3 100644 --- a/application/views/mobile_first/ch-pc.php +++ b/application/views/mobile_first/ch-pc.php @@ -514,5 +514,6 @@ } + \ No newline at end of file diff --git a/application/views/mobile_first/ch-structured-data-article.php b/application/views/mobile_first/ch-structured-data-article.php new file mode 100644 index 00000000..cd812a81 --- /dev/null +++ b/application/views/mobile_first/ch-structured-data-article.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/application/views/mobile_first/ch.php b/application/views/mobile_first/ch.php index 4d00113c..b87380ff 100644 --- a/application/views/mobile_first/ch.php +++ b/application/views/mobile_first/ch.php @@ -376,5 +376,6 @@ } + \ No newline at end of file From 0e095098c2d8b8bff7e3c4ed8d60f71b4c35dc3a Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Tue, 27 Jul 2021 11:01:37 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BD=9C=E8=80=85?= =?UTF-8?q?=E5=90=8D=E5=AD=97=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 | 6 +++--- .../views/mobile_first/ch-structured-data-article.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index d76e253f..8112bdce 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -618,8 +618,8 @@ class Information extends CI_Controller //H1模板替换 $data_H1 = array(); $data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容 - $author_nickname = $this->Operator_model->get_author_nikename($information->ic_author); - $data_H1['author'] = $author_nickname; //获取作者信息 + $author = $this->Operator_model->get_author_nikename($information->ic_author); + $data_H1['author'] = $author; //获取作者信息 $data_H1['ic_title'] = $information->ic_title; $data_H1['ic_photo'] = $information->ic_photo; $data_H1['breadcrumb_data'] = $breadcrumb_data; @@ -632,7 +632,7 @@ class Information extends CI_Controller if ($information->is_id == '278006460') { $article_structured_data_content = $this->load->view( $template_path . '-structured-data-article', - array('information' => $information, 'author_nickname' => $author_nickname), + array('information' => $information, 'author' => $author), true); $template = str_replace('', $article_structured_data_content, $template); } diff --git a/application/views/mobile_first/ch-structured-data-article.php b/application/views/mobile_first/ch-structured-data-article.php index cd812a81..af03f39e 100644 --- a/application/views/mobile_first/ch-structured-data-article.php +++ b/application/views/mobile_first/ch-structured-data-article.php @@ -14,7 +14,7 @@ "dateModified": "", "author": { "@type": "Person", - "name": "" + "name": "OPI_FirstName; ?>" }, "publisher": { "@type": "Organization",