feat: 增加FB分享标题和描述标签

master
Jimmy Liow 2 years ago
parent 9d76daafbc
commit 5448f94158

@ -1380,6 +1380,16 @@ class Information extends CI_Controller
if (!empty($meta_index_set)) {
$template = str_replace('<!--@Meta_Robots@-->', '<meta name="robots" content="' . $meta_index_set . '" />', $template);
}
$meta_note_ogtitle = get_meta($information->ic_id, 'meta_note_ogtitle');
if (!empty($meta_note_ogtitle)) {
$template = str_replace('<!--@meta_og:title@-->', '<meta property="og:title" content="' . $meta_note_ogtitle . '" />', $template);
}
$meta_note = get_meta($information->ic_id, 'meta_note');
if (!empty($meta_note)) {
$template = str_replace('<!--@meta_og:description@-->', '<meta property="og:description" content="' . $meta_note . '" />', $template);
}
//设置内容图片缓加载
$lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.chinahighlights.com/grey.gif');
$template = str_replace('<!--@CUSTOM-CONENT@-->', $lazy_content, $template);
@ -2597,7 +2607,7 @@ class Information extends CI_Controller
// 动态加载反馈标签,按城市出前三条。左侧
// HTLM: <div><!--@FEEDBACK_Shanghai,Beijing@--></div> ,显示全部用<!--@FEEDBACK_All@-->
// 解析结果:<!--@FEEDBACK_Shanghai,Beijing@-->; Shanghai,Beijing
// 解析结果:<!--@FEEDBACK_Shanghai,Beijing@-->; Shanghai,Beijing
$feedback_array = [];
preg_match_all('^<!--@FEEDBACK_(.*)@-->^', $information->ic_content, $feedback_array);
if (!empty($feedback_array)) {
@ -2621,7 +2631,7 @@ class Information extends CI_Controller
// 动态加载反馈标签,按城市出前三条。整页
// HTLM: <div><!--@FEEDBACKCROSS_Shanghai,Beijing@--></div> ,显示全部用<!--@FEEDBACK_All@-->
// 解析结果:<!--@FEEDBACKCROSS_Shanghai,Beijing@-->; Shanghai,Beijing
// 解析结果:<!--@FEEDBACKCROSS_Shanghai,Beijing@-->; Shanghai,Beijing
$feedback_array = [];
preg_match_all('^<!--@FEEDBACKCROSS_(.*)@-->^', $information->ic_content, $feedback_array);
if (!empty($feedback_array)) {
@ -3562,7 +3572,7 @@ class Information extends CI_Controller
}
}
if ($meta_ct_page_type == "tourdetail") { //线路表单,左右结构,用标签来做
$dataform['device'] = $device;
$template_form_tourqi = $this->load->view($template_path . '-form-tourqi-new', $dataform, true);

@ -12,6 +12,8 @@
<meta name="apple-mobile-web-app-title" content="China Highlights - Since 1998!">
<meta name="description" content="<!--@DESCRIPTION@-->">
<!--@Meta_Robots@-->
<!--@meta_og:title@-->
<!--@meta_og:description@-->
<!--@Meta-Ezoic-NoAds@-->
<link rel="canonical" href="<!--@CANONICAL@-->">

@ -8,6 +8,8 @@
</title>
<meta name="description" content="<!--@DESCRIPTION@-->">
<!--@Meta_Robots@-->
<!--@meta_og:title@-->
<!--@meta_og:description@-->
<meta content="width=device-width,minimum-scale=1,initial-scale=1" name="viewport">
<!--@Meta-Ezoic-NoAds@-->
@ -56,7 +58,7 @@
<!--头部导航-->
<header class="headerbar" id="header">
<img src="https://data.chinahighlights.com/image/tour-detail/icon/top-navigation-menu-button.jpg"
class="navimenu topnaviarrowdown action--open" width="26px" height="25px"
style="position: relative; left: 10px; top: 12px; z-index: 9;" alt="menu button" title="navigation button">
@ -68,7 +70,7 @@
<div class="topnavitailor">
<a href="/contactus/?product_code=" class="infocustomize">Contact</a>
</div>
</header>
<!---->

Loading…
Cancel
Save