|
|
|
@ -2745,6 +2745,18 @@ class Information extends CI_Controller {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture');
|
|
|
|
|
|
|
|
$meta_addon_picture_mobile = get_meta($information->ic_id, 'meta_addon_picture_mobile');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$article_image_list = [$meta_addon_picture, $meta_addon_picture_mobile];
|
|
|
|
|
|
|
|
$article_image_list = array_values(array_filter($article_image_list, function($value) {
|
|
|
|
|
|
|
|
return !empty($value);
|
|
|
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
$article_image_json = json_encode($article_image_list, JSON_UNESCAPED_SLASHES);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$article_published_date = new DateTime($information->is_datetime, new DateTimeZone('UTC'));
|
|
|
|
|
|
|
|
$article_modified_date = new DateTime('now', new DateTimeZone('UTC'));
|
|
|
|
|
|
|
|
|
|
|
|
$breadcrumb_data = $this->Information_model->get_breadcrumb_data($information->is_id, $information->is_path, $group_map);
|
|
|
|
$breadcrumb_data = $this->Information_model->get_breadcrumb_data($information->is_id, $information->is_path, $group_map);
|
|
|
|
$ads_by_google = ! empty(get_meta($information->ic_id, 'meta_google_ad_article'));
|
|
|
|
$ads_by_google = ! empty(get_meta($information->ic_id, 'meta_google_ad_article'));
|
|
|
|
$data['meta_news_createdate'] = $this->get_publish_date_in_6_month($information);
|
|
|
|
$data['meta_news_createdate'] = $this->get_publish_date_in_6_month($information);
|
|
|
|
@ -2769,10 +2781,16 @@ class Information extends CI_Controller {
|
|
|
|
$data['breadcrumb_data'] = $breadcrumb_data;
|
|
|
|
$data['breadcrumb_data'] = $breadcrumb_data;
|
|
|
|
$template_H1 = $this->load->view($template_path . '-h1', $data, true);
|
|
|
|
$template_H1 = $this->load->view($template_path . '-h1', $data, true);
|
|
|
|
$template = str_replace('<!--@HEAD_1@-->', $template_H1, $template);
|
|
|
|
$template = str_replace('<!--@HEAD_1@-->', $template_H1, $template);
|
|
|
|
|
|
|
|
|
|
|
|
// 结构化标签:Article
|
|
|
|
// 结构化标签:Article
|
|
|
|
$article_structured_data_content = $this->load->view(
|
|
|
|
$article_structured_data_content = $this->load->view(
|
|
|
|
$template_path . '-structured-data-article',
|
|
|
|
$template_path . '-structured-data-article', [
|
|
|
|
['information' => $information, 'author_name' => $data['author_name'], 'author_url' => $author_info['url']],
|
|
|
|
'information' => $information,
|
|
|
|
|
|
|
|
'article_published_date' => $article_published_date,
|
|
|
|
|
|
|
|
'article_modified_date' => $article_modified_date,
|
|
|
|
|
|
|
|
'author_name' => $data['author_name'], 'author_url' => $author_url,
|
|
|
|
|
|
|
|
'article_image_urls' => $article_image_json
|
|
|
|
|
|
|
|
],
|
|
|
|
true
|
|
|
|
true
|
|
|
|
);
|
|
|
|
);
|
|
|
|
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);
|
|
|
|
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);
|
|
|
|
|