From 71cbfa4c39885030def2b7c846e03c1b438a7d50 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Tue, 26 Oct 2021 14:54:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?GH=20=E5=A2=9E=E5=8A=A0=20LOGO=EF=BC=8CLoca?= =?UTF-8?q?lBuzz=20=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/gh-pc.php | 87 ++++++++++++++++++++++++ application/views/mobile_first/gh.php | 87 ++++++++++++++++++++++++ 2 files changed, 174 insertions(+) diff --git a/application/views/mobile_first/gh-pc.php b/application/views/mobile_first/gh-pc.php index 87f244e7..2b6cea4a 100644 --- a/application/views/mobile_first/gh-pc.php +++ b/application/views/mobile_first/gh-pc.php @@ -271,6 +271,93 @@ height="0" width="0" style="display:none;visibility:hidden"> + + \ No newline at end of file diff --git a/application/views/mobile_first/gh.php b/application/views/mobile_first/gh.php index f6f8dc34..bf51f7d1 100644 --- a/application/views/mobile_first/gh.php +++ b/application/views/mobile_first/gh.php @@ -220,5 +220,92 @@ + + \ No newline at end of file From 2a41c674a6bf2f050782b46be18c8d9fc6918078 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Tue, 26 Oct 2021 15:09:30 +0800 Subject: [PATCH 2/3] =?UTF-8?q?AH=20=E5=A2=9E=E5=8A=A0=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E5=8C=96=E6=A0=87=E7=AD=BE=20Logo,=20LocalBiz,=20Search?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/mobile_first/ah-pc.php | 103 +++++++++++++++++++++++ application/views/mobile_first/ah.php | 103 +++++++++++++++++++++++ 2 files changed, 206 insertions(+) diff --git a/application/views/mobile_first/ah-pc.php b/application/views/mobile_first/ah-pc.php index 2beb3855..1bbf31e4 100644 --- a/application/views/mobile_first/ah-pc.php +++ b/application/views/mobile_first/ah-pc.php @@ -298,6 +298,109 @@ + + + + \ No newline at end of file diff --git a/application/views/mobile_first/ah.php b/application/views/mobile_first/ah.php index 8c9dfbe8..47b66194 100644 --- a/application/views/mobile_first/ah.php +++ b/application/views/mobile_first/ah.php @@ -268,5 +268,108 @@ + + + + \ No newline at end of file From adc2aa4cf13682095e52b79eb98136326d67cff7 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Tue, 26 Oct 2021 15:30:18 +0800 Subject: [PATCH 3/3] =?UTF-8?q?AH=20=E5=A2=9E=E5=8A=A0=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E5=8C=96=E6=A0=87=E7=AD=BE=EF=BC=9A=E6=96=87=E7=AB=A0=E3=80=81?= =?UTF-8?q?=E9=9D=A2=E5=8C=85=E5=B1=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 19 +++++++++++-- application/views/mobile_first/ah-pc.php | 3 +- .../ah-structured-data-article.php | 28 +++++++++++++++++++ .../ah-structured-data-breadcrumb.php | 28 +++++++++++++++++++ application/views/mobile_first/ah.php | 2 ++ 5 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 application/views/mobile_first/ah-structured-data-article.php create mode 100644 application/views/mobile_first/ah-structured-data-breadcrumb.php diff --git a/application/controllers/information.php b/application/controllers/information.php index ebfe26d9..83989955 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1148,11 +1148,26 @@ class Information extends CI_Controller $breadcrumb_data = $this->Information_model->get_path_exclude_self($information->is_id, $information->is_path); $ads_by_google = !empty(get_meta($information->ic_id, 'meta_google_ad_article')); $data['ads_by_google'] = $ads_by_google; - $data['author'] = $this->Operator_model->get_author_nikename($information->ic_author); //获取作者信息 + $author = $this->Operator_model->get_author_nikename($information->ic_author); //获取作者信息 + $data['author'] = $author; $data['breadcrumb_data'] = $breadcrumb_data; $template_H1 = $this->load->view($template_path . '-h1', $data, TRUE); $template = str_replace('', $template_H1, $template); - + // 结构化标签:Article + $article_structured_data_content = $this->load->view( + $template_path . '-structured-data-article', + array('information' => $information, 'author' => $author), + true); + $template = str_replace('', $article_structured_data_content, $template); + // 结构化标签:BreadcrumbList + $breadcrumb_structured_data_content = $this->load->view( + $template_path . '-structured-data-breadcrumb', + array('breadcrumb_data' => $breadcrumb_data, 'information' => $information), + true); + $template = str_replace( + '', + $breadcrumb_structured_data_content, + $template); //推荐信息或者产品 //信息推荐 diff --git a/application/views/mobile_first/ah-pc.php b/application/views/mobile_first/ah-pc.php index 1bbf31e4..eed8f2c7 100644 --- a/application/views/mobile_first/ah-pc.php +++ b/application/views/mobile_first/ah-pc.php @@ -401,6 +401,7 @@ } } + + - \ No newline at end of file diff --git a/application/views/mobile_first/ah-structured-data-article.php b/application/views/mobile_first/ah-structured-data-article.php new file mode 100644 index 00000000..2b03ebbe --- /dev/null +++ b/application/views/mobile_first/ah-structured-data-article.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/application/views/mobile_first/ah-structured-data-breadcrumb.php b/application/views/mobile_first/ah-structured-data-breadcrumb.php new file mode 100644 index 00000000..99083f6b --- /dev/null +++ b/application/views/mobile_first/ah-structured-data-breadcrumb.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/application/views/mobile_first/ah.php b/application/views/mobile_first/ah.php index 47b66194..1a41f23f 100644 --- a/application/views/mobile_first/ah.php +++ b/application/views/mobile_first/ah.php @@ -371,5 +371,7 @@ } } + + \ No newline at end of file