GH 增加两个标签

hotfix/paypal-note
LiaoYijun 3 years ago
parent 622d0d397e
commit 2364db00de

@ -1042,6 +1042,13 @@ class Information extends CI_Controller
}
}
}
$why_us_covid_list_pc = $this->load->view(
$template_path . '-why-us-covid-list-pc', array(), true);
$information->ic_content = str_replace('<!--@WHY-US-COVID-LIST-PC@-->', $why_us_covid_list_pc, $information->ic_content);
$why_us_covid_list_mobile = $this->load->view(
$template_path . '-why-us-covid-list-mobile', array(), true);
$information->ic_content = str_replace('<!--@WHY-US-COVID-LIST-MOBILE@-->', $why_us_covid_list_mobile, $information->ic_content);
if (is_file('D:/wwwroot/origin-www.globalhighlights.com/css/gh-global.css')) {//主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速
@ -1068,15 +1075,7 @@ class Information extends CI_Controller
//设置内容图片缓加载
$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);
//替换内容中各种标签
//$tag_why_us = $this->load->view($template_path . '-why-us', false, true);
// $template = str_replace('<!--@TAG-WHY-US@-->', $tag_why_us, $template);
//Google广告代码
//if (!empty(get_meta($information->ic_id, 'meta_google_ad_content'))) {
//$template = str_replace('<!--@Match-Content-GOOGLE@-->', '<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-4231674166786366" data-ad-slot="1447610161" data-matched-content-rows-num="2,2" data-matched-content-columns-num="1,3" data-matched-content-ui-type="image_stacked,image_stacked"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script>', $template);
//}
//社媒分享图片
$full_ic_photo = '';
if (!empty($information->ic_photo)) {
@ -1236,6 +1235,26 @@ class Information extends CI_Controller
$breadcrumb_content = $this->load->view($template_path . '-breadcrumb', array('breadcrumb_data' => $breadcrumb_data), true);
$information->ic_content = str_replace('<!--@BREADCRUMB-BLOCK@-->', $breadcrumb_content, $information->ic_content);
// 动态加载反馈标签,第一个城市不足八条,使用第二城市数据。
// HTLM: <div><!--@FEEDBACK_Siem Reap,Bangkok@--></div>
// 解析结果:<!--@FEEDBACK_Siem Reap,Bangkok@-->; Siem Reap,Bangkok
$feedback_array = [];
preg_match_all('^<!--@FEEDBACK_(.*)@-->^', $information->ic_content, $feedback_array);
if (!empty($feedback_array)) {
foreach ($feedback_array[0] as $index => $tag_name) {
$city_name = $feedback_array[1][$index];
$feedback_data = $this->Feedback_model->get_feedback_by_city($city_name);
// $feedback_content = $this->load->view(
// $template_path . '-feedback',
// array('feedback_data' => $feedback_data),
// true);
// $information->ic_content = str_replace(
// $tag_name,
// $feedback_content,
// $information->ic_content);
}
}
//主样式表,内联模式
if (is_file('D:/wwwroot/origin-www.asiahighlights.com/css/mobile-first.css')) {//主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速
$main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.asiahighlights.com/css/mobile-first.css'));

@ -0,0 +1,4 @@
<div class="why_us_covid hidden-xs">
<div class="infoimage">
<img src="https://data.globalhighlights.com/image/aboutus/gh-covid-why-us-pc.jpg" class="img-responsive" alt="travel with confidence despite covid">
</div></div>

@ -0,0 +1,4 @@
<div class="infoimage visible-xs">
<img src="https://data.globalhighlights.com/image/aboutus/gh-covid-why-us-mobile.jpg" class="img-responsive" alt="travel with confidence despite covid">
</div>
Loading…
Cancel
Save