静态化更新设置

master
Ycc 11 months ago
parent c2129c1f9b
commit bf7b0d5cdb

@ -2200,7 +2200,7 @@ class Information extends CI_Controller
} else { } else {
return false; return false;
} }
$recommand_template = 'mobile_first/ah-next-mobile'; $recommand_template = 'mobile_first/htravel-next-mobile';
break; break;
case 'pc': case 'pc':
//获取PC的模板如果有的话 //获取PC的模板如果有的话
@ -2211,7 +2211,7 @@ class Information extends CI_Controller
} else { } else {
return false; return false;
} }
$recommand_template = 'mobile_first/ah-next'; $recommand_template = 'mobile_first/htravel-next';
break; break;
default: default:
} }
@ -2258,8 +2258,8 @@ class Information extends CI_Controller
if (!empty($author)) { if (!empty($author)) {
$data['author'] = $author->OPI_FirstName; $data['author'] = $author->OPI_FirstName;
$data['OPI_Code'] = $author->OPI_Code; $data['OPI_Code'] = $author->OPI_Code;
$data['author_url'] = $this->get_author_url('www.asiahighlights.com', $author->OPI_Code); $data['author_url'] = $this->get_author_url('www.highlightstravel.com', $author->OPI_Code);
$author_url = $this->get_author_url('www.asiahighlights.com', $author->OPI_Code); $author_url = $this->get_author_url('www.highlightstravel.com', $author->OPI_Code);
} else { } else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
@ -2321,7 +2321,7 @@ class Information extends CI_Controller
} }
$tips_right_list_content = $this->load->view( $tips_right_list_content = $this->load->view(
'mobile_first/ah-tips-right-list', 'mobile_first/htravel-tips-right-list',
array( array(
'tips_right_a' => $tips_right_a, 'tips_right_a' => $tips_right_a,
'tips_right_b' => $tips_right_b, 'tips_right_b' => $tips_right_b,
@ -2419,7 +2419,7 @@ class Information extends CI_Controller
// 水灯节表单 // 水灯节表单
$lantern_form_content = $this->load->view( $lantern_form_content = $this->load->view(
'mobile_first/ah-lantern-form', 'mobile_first/htravel-lantern-form',
array('information' => $information), array('information' => $information),
true true
); );
@ -2427,7 +2427,7 @@ class Information extends CI_Controller
// 水灯节2025表单 // 水灯节2025表单
$lantern_form_content_2025 = $this->load->view( $lantern_form_content_2025 = $this->load->view(
'mobile_first/ah-lantern-form-2025', 'mobile_first/htravel-lantern-form-2025',
array('information' => $information), array('information' => $information),
true true
); );
@ -2435,7 +2435,7 @@ class Information extends CI_Controller
// Chiang Mai Authentic Sky Lantern Festival on Nov. 5, 2025 // Chiang Mai Authentic Sky Lantern Festival on Nov. 5, 2025
$lantern_form_content_authentic_sky = $this->load->view( $lantern_form_content_authentic_sky = $this->load->view(
'mobile_first/ah-chiang-mai-lantern-festival', 'mobile_first/htravel-chiang-mai-lantern-festival',
array('information' => $information), array('information' => $information),
true true
); );
@ -2444,7 +2444,7 @@ class Information extends CI_Controller
// CAD 跨年表单 // CAD 跨年表单
$new_year_countdown_form_content = $this->load->view( $new_year_countdown_form_content = $this->load->view(
'mobile_first/ah-new-year-countdown', 'mobile_first/htravel-new-year-countdown',
array('information' => $information), array('information' => $information),
true true
); );
@ -2467,7 +2467,7 @@ class Information extends CI_Controller
// 防止触发 Google 网络垃圾政策只返回前三条 // 防止触发 Google 网络垃圾政策只返回前三条
$top3_feedback_list = array_slice($feedback_list, 0, 3); $top3_feedback_list = array_slice($feedback_list, 0, 3);
$feedback_content = $this->load->view( $feedback_content = $this->load->view(
'mobile_first/ah-feedback-list', 'mobile_first/htravel-feedback-list',
array('feedback_list' => $top3_feedback_list), array('feedback_list' => $top3_feedback_list),
true true
); );
@ -2489,7 +2489,7 @@ class Information extends CI_Controller
$city_name = $feedback30_array[1][$index]; $city_name = $feedback30_array[1][$index];
$feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name); $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name);
$feedback_30_content = $this->load->view( $feedback_30_content = $this->load->view(
'mobile_first/ah-feedback-30-list', 'mobile_first/htravel-feedback-30-list',
array('feedback_list' => $feedback_list), array('feedback_list' => $feedback_list),
true true
); );
@ -2516,7 +2516,7 @@ class Information extends CI_Controller
} }
$feedback_city_content = $this->load->view( $feedback_city_content = $this->load->view(
'mobile_first/ah-feedback-city-list', 'mobile_first/htravel-feedback-city-list',
$feedback_city_list, $feedback_city_list,
true true
); );
@ -2529,10 +2529,10 @@ class Information extends CI_Controller
} }
//主样式表,内联模式 //主样式表,内联模式
if (is_file('D:/wwwroot/origin-www.asiahighlights.com/css/mobile-first.css')) { //主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速 if (is_file('D:/wwwroot/origin-www.highlightstravel.com/css/mobile-first.css')) { //主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速
$main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.asiahighlights.com/css/mobile-first.css')); $main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.highlightstravel.com/css/mobile-first.css'));
} else { } else {
$main_css_string = compress_css(GET_HTTP('https://proxy-data.asiahighlights.com/css/mobile-first.css')); $main_css_string = compress_css(GET_HTTP('https://proxy-data.highlightstravel.com/css/mobile-first.css'));
} }
$template = str_replace('<!--@MAIN-CSS@-->', '<style type="text/css">' . $main_css_string . '</style>', $template); $template = str_replace('<!--@MAIN-CSS@-->', '<style type="text/css">' . $main_css_string . '</style>', $template);
//额外样式 //额外样式
@ -2563,7 +2563,7 @@ class Information extends CI_Controller
$template = str_replace('<!--@Meta_Robots@-->', '<meta name="robots" content="' . $meta_index_set . '" />', $template); $template = str_replace('<!--@Meta_Robots@-->', '<meta name="robots" content="' . $meta_index_set . '" />', $template);
} }
//设置内容图片缓加载 //设置内容图片缓加载
$lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.asiahighlights.com/grey.gif'); $lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.highlightstravel.com/grey.gif');
$template = str_replace('<!--@CUSTOM-CONENT@-->', $lazy_content, $template); $template = str_replace('<!--@CUSTOM-CONENT@-->', $lazy_content, $template);
//Google广告代码 //Google广告代码
@ -2584,7 +2584,7 @@ class Information extends CI_Controller
// 设置图片尺寸 // 设置图片尺寸
// 优化过图片目录D:\wwwroot\origin-images.chinahighlights.com\optimize\ // 优化过图片目录D:\wwwroot\origin-images.chinahighlights.com\optimize\
$www_local_path = 'D:/wwwroot/origin-www.asiahighlights.com'; $www_local_path = 'D:/wwwroot/origin-www.highlightstravel.com';
$image_local_path = 'D:/wwwroot/origin-images.chinahighlights.com/optimize'; $image_local_path = 'D:/wwwroot/origin-images.chinahighlights.com/optimize';
if (is_dir($www_local_path) && is_dir($image_local_path)) { if (is_dir($www_local_path) && is_dir($image_local_path)) {
$template = $this->html_optimize_lib->set_image_size_local($template, $www_local_path, $image_local_path); $template = $this->html_optimize_lib->set_image_size_local($template, $www_local_path, $image_local_path);

Loading…
Cancel
Save