diff --git a/application/config/config.php b/application/config/config.php index e3b658eb..054f1cfa 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -395,6 +395,7 @@ $config['site'] = [ 'ch' => ['site_code' => 'ch', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => 'https://images.chinahighlights.com', 'site_authors' => ['TDJ', 'ycc'], 'site_user' => ',ycc,'], 'ah' => ['site_code' => 'ah', 'site_id' => 141, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => 'https://images.asiahighlights.com', 'site_url' => 'https://www.asiahighlights.com', 'site_sitemap' => '', 'site_authors' => ['X', 'sfx'], 'site_user' => [',ycc,sfx,X,']], 'jh' => ['site_code' => 'jh', 'site_id' => 186, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => 'https://images.japanhighlights.com', 'site_url' => 'https://www.japanhighlights.com', 'site_sitemap' => '', 'site_authors' => ['X', 'sfx'], 'site_user' => [',ycc,sfx,X,']], + 'htravel' => ['site_code' => 'htravel', 'site_id' => 187, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => 'https://images.highlightstravel.com', 'site_url' => 'https://www.highlightstravel.com', 'site_sitemap' => '', 'site_authors' => ['X', 'sfx'], 'site_user' => [',ycc,sfx,X,']], 'gh' => ['site_code' => 'gh', 'site_id' => 163, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => 'https://images.globalhighlights.com', 'site_url' => 'https://www.globalhighlights.com', 'site_sitemap' => '', 'site_authors' => ['X', 'sfx'], 'site_user' => [',ycc,sfx,X,']], 'gm' => ['site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'https://www.chinarundreisen.com', 'site_image_url' => '//bilder.chinarundreisen.com', 'site_authors' => ['DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'], 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'], 'gh_gm' => ['site_code' => 'gh_gm', 'site_id' => 178, 'site_lgc' => '4', 'site_url' => 'https://www.globalhighlights.de', 'site_image_url' => '//www.globalhighlights.de', 'site_authors' => ['DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'], 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'], @@ -548,6 +549,7 @@ $config['css_source_mbj'] = 'https://www.mybeijingchina.com/css/layout.c $config['css_source_yz'] = 'https://www.yangtzeriver.org/css/css3/bootstrap/bootstrap.css'; $config['css_source_ah'] = 'https://data.asiahighlights.com/css/mobile-first.css'; $config['css_source_jh'] = 'https://data.japanhighlights.com/css/mobile-first.css'; +$config['css_source_htravel'] = 'https://data.highlightstravel.com/css/mobile-first.css'; $config['css_source_gh'] = 'https://data.globalhighlights.com/css/gh-global.css'; $config['css_source_ct'] = 'https://data.chinatravel.com/css/min.php?f=/css/css3/bootstrap/bootstrap.css,/css/css3/style.css,/css/css3/destination-details.css'; $config['css_source_chinatravel'] = 'https://data.chinatravel.com/css/newcss3/base.css'; @@ -563,6 +565,7 @@ $config['cache']['ch']['cache_path'] = 'D:\wwwcache\chinahighlights.com $config['cache']['ah']['cache_path'] = 'D:\wwwcache\asiahighlights.com'; $config['cache']['jh']['cache_path'] = 'D:\wwwcache\japanhighlights.com'; $config['cache']['gh']['cache_path'] = 'D:\wwwcache\globalhighlights.com'; +$config['cache']['htravel']['cache_path'] = 'D:\wwwcache\highlightstravel.com'; $config['cache']['chinatravel']['cache_path'] = 'D:\wwwcache\mobile-first\chinatravel.com'; $config['cache']['shanghai']['cache_path'] = 'D:\wwwcache\mobile-first\shanghaihighlights.com'; $config['cache']['beijing']['cache_path'] = 'D:\wwwcache\mobile-first\mybeijingchina.com'; @@ -790,7 +793,7 @@ $config['InfoType_ct'] = [ ]; //AH站点用到了 -$config['InfoType_ah'] = [ +$config['InfoType_htravel'] = [ '国家信息' => 'country_info', '区域信息' => 'area_info', '国家信息列表页' => 'country_info_list', diff --git a/application/controllers/information.php b/application/controllers/information.php index 44badc07..630bc30f 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -484,6 +484,9 @@ class Information extends CI_Controller if (in_array($this->config->item('site_code'), array('ah'))) { $this->config->set_item('templates', $this->config->item('templates_ah')); } + if (in_array($this->config->item('site_code'), array('htravel'))) { + $this->config->set_item('templates', $this->config->item('templates_htravel')); + } if (in_array($this->config->item('site_code'), array('pgr'))) { $this->config->set_item('templates', $this->config->item('templates_pgr')); } @@ -499,8 +502,8 @@ class Information extends CI_Controller if ($Structure->is_sitecode == 'ct') { $data['infoTypeList'] = $this->config->item('InfoType_ct'); - } elseif ($Structure->is_sitecode == 'ah') { - $data['infoTypeList'] = $this->config->item('InfoType_ah'); + } elseif ($Structure->is_sitecode == 'htravel') { + $data['infoTypeList'] = $this->config->item('InfoType_htravel'); } else { switch ($data['rootInformation']->ic_ht_area_type) { case 'c': //城市 @@ -710,12 +713,12 @@ class Information extends CI_Controller $this->make_www_cache('mobile', $information_new, $recommand_information); $this->make_www_cache('pc', $information_new, $recommand_information); //echo ' |000~111: '.$this->benchmark->elapsed_time('000', '111'); - } else if (strcasecmp($site_code, "ah") == 0 && !empty($auto_update_cache)) { + } else if (strcasecmp($site_code, "htravel") == 0 && !empty($auto_update_cache)) { //读取模板生成PC和移动优先文件 $recommand_information = $this->recommand_information($information); $information_new = $this->Information_model->Detail($this->input->post('is_id')); - $this->make_www_cache_ah('mobile', $information_new, $recommand_information); - $this->make_www_cache_ah('pc', $information_new, $recommand_information); + $this->make_www_cache_htravel('mobile', $information_new, $recommand_information); + $this->make_www_cache_htravel('pc', $information_new, $recommand_information); } else if (strcasecmp($site_code, "gh") == 0 && !empty($auto_update_cache)) { $recommand_information = $this->recommand_information($information); $information_new = $this->Information_model->Detail($this->input->post('is_id')); @@ -748,9 +751,9 @@ class Information extends CI_Controller $this->make_www_cache_hly($information_new); } else if (strcasecmp($site_code, "cht") == 0 && !empty($auto_update_cache)) { $update_info_log = $this->update_cache($ic_url); - } else if (strcasecmp($site_code, "ah") == 0 && !empty($auto_update_cache)) { + } else if (strcasecmp($site_code, "htravel") == 0 && !empty($auto_update_cache)) { //$update_info_log = $this->update_cache($ic_url); - } else if (strcasecmp($site_code, "cht") != 0 && strcasecmp($site_code, "gm") != 0 && strcasecmp($site_code, "ah") != 0) { //非cht站点并且非GM并且非AH + } else if (strcasecmp($site_code, "cht") != 0 && strcasecmp($site_code, "gm") != 0 && strcasecmp($site_code, "htravel") != 0) { //非cht站点并且非GM并且非AH $update_info_log = $this->update_cache($ic_url); } else if (strcasecmp($site_code, "ct") == 0 && !empty($auto_update_cache)) { $update_info_log = $this->update_cache($ic_url); @@ -830,9 +833,9 @@ class Information extends CI_Controller if ($this->config->item('site_code') == 'ch') { $this->make_www_cache('pc', $information, $recommand_information); $this->make_www_cache('mobile', $information, $recommand_information); - } else if ($this->config->item('site_code') == 'ah') { - $this->make_www_cache_ah('pc', $information, $recommand_information); - $this->make_www_cache_ah('mobile', $information, $recommand_information); + } else if ($this->config->item('site_code') == 'htravel') { + $this->make_www_cache_htravel('pc', $information, $recommand_information); + $this->make_www_cache_htravel('mobile', $information, $recommand_information); }else if ($this->config->item('site_code') == 'jh') { $this->make_www_cache_jh('pc', $information, $recommand_information); $this->make_www_cache_jh('mobile', $information, $recommand_information); @@ -2179,7 +2182,7 @@ class Information extends CI_Controller file_put_contents($html_path, $template, LOCK_EX); } - public function make_www_cache_ah($device, $information, $recommand_information) + public function make_www_cache_htravel($device, $information, $recommand_information) { $data = array(); @@ -2197,7 +2200,7 @@ class Information extends CI_Controller } else { return false; } - $recommand_template = 'mobile_first/ah-next-mobile'; + $recommand_template = 'mobile_first/htravel-next-mobile'; break; case 'pc': //获取PC的模板,如果有的话 @@ -2208,7 +2211,7 @@ class Information extends CI_Controller } else { return false; } - $recommand_template = 'mobile_first/ah-next'; + $recommand_template = 'mobile_first/htravel-next'; break; default: } @@ -2255,8 +2258,8 @@ class Information extends CI_Controller if (!empty($author)) { $data['author'] = $author->OPI_FirstName; $data['OPI_Code'] = $author->OPI_Code; - $data['author_url'] = $this->get_author_url('www.asiahighlights.com', $author->OPI_Code); - $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.highlightstravel.com', $author->OPI_Code); } else { $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 @@ -2318,7 +2321,7 @@ class Information extends CI_Controller } $tips_right_list_content = $this->load->view( - 'mobile_first/ah-tips-right-list', + 'mobile_first/htravel-tips-right-list', array( 'tips_right_a' => $tips_right_a, 'tips_right_b' => $tips_right_b, @@ -2416,7 +2419,7 @@ class Information extends CI_Controller // 水灯节表单 $lantern_form_content = $this->load->view( - 'mobile_first/ah-lantern-form', + 'mobile_first/htravel-lantern-form', array('information' => $information), true ); @@ -2424,7 +2427,7 @@ class Information extends CI_Controller // 水灯节2025表单 $lantern_form_content_2025 = $this->load->view( - 'mobile_first/ah-lantern-form-2025', + 'mobile_first/htravel-lantern-form-2025', array('information' => $information), true ); @@ -2432,7 +2435,7 @@ class Information extends CI_Controller // Chiang Mai Authentic Sky Lantern Festival on Nov. 5, 2025 $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), true ); @@ -2441,7 +2444,7 @@ class Information extends CI_Controller // CAD 跨年表单 $new_year_countdown_form_content = $this->load->view( - 'mobile_first/ah-new-year-countdown', + 'mobile_first/htravel-new-year-countdown', array('information' => $information), true ); @@ -2464,7 +2467,7 @@ class Information extends CI_Controller // 防止触发 Google 网络垃圾政策只返回前三条 $top3_feedback_list = array_slice($feedback_list, 0, 3); $feedback_content = $this->load->view( - 'mobile_first/ah-feedback-list', + 'mobile_first/htravel-feedback-list', array('feedback_list' => $top3_feedback_list), true ); @@ -2486,7 +2489,7 @@ class Information extends CI_Controller $city_name = $feedback30_array[1][$index]; $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name); $feedback_30_content = $this->load->view( - 'mobile_first/ah-feedback-30-list', + 'mobile_first/htravel-feedback-30-list', array('feedback_list' => $feedback_list), true ); @@ -2513,7 +2516,7 @@ class Information extends CI_Controller } $feedback_city_content = $this->load->view( - 'mobile_first/ah-feedback-city-list', + 'mobile_first/htravel-feedback-city-list', $feedback_city_list, true ); @@ -2526,10 +2529,10 @@ class Information extends CI_Controller } //主样式表,内联模式 - 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')); + 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.highlightstravel.com/css/mobile-first.css')); } 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('', '', $template); //额外样式 @@ -2560,7 +2563,7 @@ class Information extends CI_Controller $template = str_replace('', '', $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('', $lazy_content, $template); //Google广告代码 @@ -2581,7 +2584,7 @@ class Information extends CI_Controller // 设置图片尺寸 // 优化过图片目录: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'; 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); @@ -5638,7 +5641,7 @@ class Information extends CI_Controller $exclude_ids = array($information->is_id); //需要排除的is_id,防止通过页面显示相同内容,默认排除本身,每个推荐内容都需要排除已经推荐过的 foreach ($root_recommands as $item) { - if ($this->config->item('site_code') == 'ah' or $this->config->item('site_code') == 'ch' or $this->config->item('site_code') == 'gh' or $this->config->item('site_code') == 'jh') { //如果是AH CH GH的页面,取消重复检测 + if ($this->config->item('site_code') == 'ah' or $this->config->item('site_code') == 'ch' or $this->config->item('site_code') == 'gh' or $this->config->item('site_code') == 'jh' or $this->config->item('site_code') == 'htravel') { //如果是AH CH GH的页面,取消重复检测 $exclude_ids = array(0); } $result = $this->recommand_information_rule($information, $root_detail, $item, $exclude_ids); @@ -5648,7 +5651,7 @@ class Information extends CI_Controller } foreach ($group_recommands as $item) { - if ($this->config->item('site_code') == 'ah' or $this->config->item('site_code') == 'ch' or $this->config->item('site_code') == 'gh' or $this->config->item('site_code') == 'jh') { //如果是AH CH GH JH的页面,取消重复检测 + if ($this->config->item('site_code') == 'ah' or $this->config->item('site_code') == 'ch' or $this->config->item('site_code') == 'gh' or $this->config->item('site_code') == 'jh' or $this->config->item('site_code') == 'htravel') { //如果是AH CH GH JH的页面,取消重复检测 $exclude_ids = array(0); } if (empty($data[$item->ir_name])) { @@ -5805,7 +5808,13 @@ class Information extends CI_Controller $url = 'https://www.asiahighlights.com/index.php/information/detail/?static_html_url=' . $url . '&static_html_optimize=comeon'; } break; - + case 'htravel': + if ($delete_only === true) { + $url = 'https://www.highlightstravel.com/index.php/information/delete_cache_8X913mksJ/?static_html_url=' . $url; + } else { // static_html_optimize=comeon 启用静态化压缩和js、css延迟加载 + $url = 'https://www.highlightstravel.com/index.php/information/detail/?static_html_url=' . $url . '&static_html_optimize=comeon'; + } + break; case 'gm': //GET_HTTP("http://148.251.35.42:3300/create-cache/?url=" . urlencode($url)); //请求nodejs静态化更新页面,删除缓存,因为部分页面没有进入信息平台 //if ($delete_only) { diff --git a/application/helpers/info_helper.php b/application/helpers/info_helper.php index cc87ec76..b165469f 100644 --- a/application/helpers/info_helper.php +++ b/application/helpers/info_helper.php @@ -103,7 +103,7 @@ function is_mobile_first() { $CI = &get_instance(); $sitecode = $CI->config->item('site_code'); - if ($sitecode == 'ch' || $sitecode == 'ah' || $sitecode == 'chinatravel' || $sitecode == 'gh' || $sitecode == 'jh' || $sitecode == 'shanghai' || $sitecode=='beijing' || $sitecode == "trainspread" || $sitecode=="guilin" || $sitecode=="hly") { + if ($sitecode == 'ch' || $sitecode == 'ah' || $sitecode == 'htravel' || $sitecode == 'chinatravel' || $sitecode == 'gh' || $sitecode == 'jh' || $sitecode == 'shanghai' || $sitecode=='beijing' || $sitecode == "trainspread" || $sitecode=="guilin" || $sitecode=="hly") { return true; } else { return false; diff --git a/application/views/bootstrap3/information_edit.php b/application/views/bootstrap3/information_edit.php index aeb29732..981d7e3d 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -349,7 +349,7 @@ //ah跳转测试页面 function goto_ahtest_page() { - var site_url = 'https://proxy-www.asiahighlights.com'; + var site_url = 'https://proxy-www.highlightstravel.com'; $('#goto_test_page_button').attr("href", site_url + $('#ic_url').val()); return true; } @@ -759,7 +759,7 @@ function goto_ghtest_page() { name="goto_test_page_button" target="_blank" title="查看测试页面"> -ic_sitecode == 'ah') {?> +ic_sitecode == 'htravel') {?> @@ -2696,7 +2696,7 @@ function goto_ghtest_page() { 忽略URL重复
- config->item('site_code'), ['ch', 'cht', 'gm', 'ah', 'jh', 'gh', 'ct', 'chinatravel', 'shanghai', 'beijing', 'trainspread', 'guilin', 'hly'])) {?> + config->item('site_code'), ['ch', 'cht', 'gm', 'htravel', 'jh', 'gh', 'ct', 'chinatravel', 'shanghai', 'beijing', 'trainspread', 'guilin', 'hly'])) {?>