From 9261f05f85c9ae77fb2ddced1412b7e37802e66f Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Thu, 8 May 2025 14:17:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=8E=B7=E5=8F=96=E4=BD=9C?= =?UTF-8?q?=E8=80=85=20URL=20=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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index 99953c50..677b4a30 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -2652,10 +2652,11 @@ class Information extends CI_Controller $data['ads_by_google'] = $ads_by_google; $data['author'] = ''; //获取作者信息 $author = $this->Operator_model->get_author_nikename($information->ic_author); + $author_url = ''; if (!empty($author)) { $data['author'] = $author->OPI_FirstName; $data['OPI_Code'] = $author->OPI_Code; - $data['author_url'] = $this->get_author_url('www.japanhighlights.com', $author->OPI_Code); + $author_url = $this->get_author_url('www.japanhighlights.com', $author->OPI_Code); } else { $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 if (!empty($author_web)) { @@ -2668,7 +2669,7 @@ class Information extends CI_Controller // 结构化标签:Article $article_structured_data_content = $this->load->view( $template_path . '-structured-data-article', - array('information' => $information, 'author_name' => $data['author'], 'author_url' => $data['author_url']), + array('information' => $information, 'author_name' => $data['author'], 'author_url' => $author_url), true ); $template = str_replace('', $article_structured_data_content, $template);