diff --git a/.gitignore b/.gitignore index 6f1c4033..72a5dd56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .idea -.phpintel -.*.json.bak +.phpintel +/info.php +.*.json.bak .ftp-deploy-sync-state.json .svn/* */logs/log* @@ -17,4 +18,4 @@ /application/config/database.php - + diff --git a/application/controllers/information.php b/application/controllers/information.php index f69e48f2..5754cf89 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -931,9 +931,11 @@ class Information extends CI_Controller $city_name_string = $feedback_array[1][$index]; $city_name_list = explode(',', $city_name_string); $feedback_list = $this->Feedback_model->get_feedback_by_city_list($city_name_list); + // 防止触发 Google 网络垃圾政策只返回前三条 + $top3_feedback_list = array_slice($feedback_list, 0, 3); $feedback_content = $this->load->view( - $template_path . '-feedback-list', - array('feedback_list' => $feedback_list), + 'mobile_first/ch-feedback-list', + array('feedback_list' => $top3_feedback_list), true ); $information->ic_content = str_replace( @@ -993,18 +995,6 @@ class Information extends CI_Controller } } - $feedback_newest = $this->Feedback_model->get_feedback_newest(); - $feedback_newest_content = $this->load->view( - $template_path . '-feedback-newest', - array('feedback_list' => $feedback_newest), - true - ); - $information->ic_content = str_replace( - '', - $feedback_newest_content, - $information->ic_content - ); - // 天气预报模板 $weather_forecast_content = $this->load->view( $template_path . '-weather-forecast', @@ -1017,7 +1007,6 @@ class Information extends CI_Controller $information->ic_content ); - // 火车票首页搜索框 --zp $template_TrainSearch = ""; if ($information->ic_url == "/china-trains/hometest.htm" || $information->ic_url == "/china-trains/") { @@ -1050,43 +1039,41 @@ class Information extends CI_Controller $meta_product_code = get_meta($information->ic_id, 'meta_product_code'); $meta_google_ad_article = get_meta($information->ic_id, 'meta_google_ad_article'); - //非产品页面 - if (empty ($meta_product_code)) { - $ads_by_google = !empty ($meta_google_ad_article); - //H1模板替换 - $data_H1 = array(); - $data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容 - $data_H1['author'] = ''; //获取作者信息 - $author = $this->Operator_model->get_author_nikename($information->ic_author); - if (!empty ($author)) { - $data_H1['author'] = $author->OPI_FirstName; - } else { - $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 - if (!empty ($author_web)) { - $data_H1['author'] = $author_web->a_name; - } - } - - // 检查图片地址格式 - $parsed_photo = $information->ic_photo; - $parsed_photo_url = parse_url($information->ic_photo); - if ( - (!isset ($parsed_photo_url['host']) || !isset ($parsed_photo_url['scheme'])) && isset ($parsed_photo_url['path']) - ) { - $parsed_photo = 'https://images.chinahighlights.com' . $parsed_photo_url['path']; + $ads_by_google = !empty($meta_google_ad_article); + //H1模板替换 + $data_H1 = array(); + $data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容 + $data_H1['author'] = ''; //获取作者信息 + $author = $this->Operator_model->get_author_nikename($information->ic_author); + if (!empty ($author)) { + $data_H1['author'] = $author->OPI_FirstName; + } else { + $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 + if (!empty ($author_web)) { + $data_H1['author'] = $author_web->a_name; } + } - $data_H1['ic_title'] = $information->ic_title; - $data_H1['ic_photo'] = $parsed_photo; - $data_H1['breadcrumb_data'] = $breadcrumb_data; - $data_H1['ads_by_google'] = $ads_by_google; - $data_H1['ic_datetime'] = $information->ic_datetime; - $template_H1 = $this->load->view($template_path . '-h1', $data_H1, true); - $template = str_replace('', $template_H1, $template); + // 检查图片地址格式 + $parsed_photo = $information->ic_photo; + $parsed_photo_url = parse_url($information->ic_photo); + if ( + (!isset ($parsed_photo_url['host']) || !isset ($parsed_photo_url['scheme'])) && isset ($parsed_photo_url['path']) + ) { + $parsed_photo = 'https://images.chinahighlights.com' . $parsed_photo_url['path']; + } - $addthis_widget = $this->load->view($template_path . '-add-this', false, true); - $template = str_replace('', $addthis_widget, $template); + $data_H1['ic_title'] = $information->ic_title; + $data_H1['ic_photo'] = $parsed_photo; + $data_H1['breadcrumb_data'] = $breadcrumb_data; + $data_H1['ads_by_google'] = $ads_by_google; + $data_H1['ic_datetime'] = $information->ic_datetime; + $template_H1 = $this->load->view($template_path . '-h1', $data_H1, true); + $template = str_replace('', $template_H1, $template); + + //非产品页面 + if (empty ($meta_product_code)) { $template = str_replace('?product_code=', '', $template); $article_structured_data_content = $this->load->view( @@ -1105,38 +1092,6 @@ class Information extends CI_Controller $inquiry_form_template = $this->load->view($template_path . '-inquiry-form', array('meta_product_code' => $meta_product_code), true); $template = str_replace('?product_code=', '?product_code=' . $meta_product_code, $template); $information->ic_content = str_replace('', $inquiry_form_template, $information->ic_content); - - $ads_by_google = !empty ($meta_google_ad_article); - //H1模板替换 - $data_H1 = array(); - $data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容 - $data_H1['author'] = ''; //获取作者信息 - $author = $this->Operator_model->get_author_nikename($information->ic_author); - if (!empty ($author)) { - $data_H1['author'] = $author->OPI_FirstName; - } else { - $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 - if (!empty ($author_web)) { - $data_H1['author'] = $author_web->a_name; - } - } - - // 检查图片地址格式 - $parsed_photo = $information->ic_photo; - $parsed_photo_url = parse_url($information->ic_photo); - if ( - (!isset ($parsed_photo_url['host']) || !isset ($parsed_photo_url['scheme'])) && isset ($parsed_photo_url['path']) - ) { - $parsed_photo = 'https://images.chinahighlights.com' . $parsed_photo_url['path']; - } - - $data_H1['ic_title'] = $information->ic_title; - $data_H1['ic_photo'] = $parsed_photo; - $data_H1['breadcrumb_data'] = $breadcrumb_data; - $data_H1['ads_by_google'] = $ads_by_google; - $data_H1['ic_datetime'] = $information->ic_datetime; - $template_H1 = $this->load->view($template_path . '-h1', $data_H1, true); - $template = str_replace('', $template_H1, $template); } // CH: 1; AH: 28; GH : 33 @@ -1341,7 +1296,6 @@ class Information extends CI_Controller $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture'); } - //顶部视频 $meta_news_video = get_meta($information->ic_id, 'meta_news_video'); $meta_video_picture = get_meta($information->ic_id, 'meta_video_picture'); @@ -1380,6 +1334,11 @@ class Information extends CI_Controller if (!empty ($meta_addon_js)) { $template = str_replace('', '', $template); } + + $meta_index_set = get_meta($information->ic_id, 'meta_index_set'); + if (!empty ($meta_index_set)) { + $template = str_replace('', '', $template); + } //设置内容图片缓加载 $lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.chinahighlights.com/grey.gif'); $template = str_replace('', $lazy_content, $template); @@ -1971,17 +1930,30 @@ class Information extends CI_Controller } } - $feedback_newest = $this->Feedback_model->get_feedback_newest(); - $feedback_newest_content = $this->load->view( - $template_path . '-feedback-newest', - array('feedback_list' => $feedback_newest), - true - ); - $information->ic_content = str_replace( - '', - $feedback_newest_content, - $information->ic_content - ); + // 动态加载反馈标签,第一个城市不足八条,使用第二城市数据。 + // HTLM:
+ // 解析结果:; Siem Reap,Bangkok + $feedback_array = []; + preg_match_all('^^', $information->ic_content, $feedback_array); + if (!empty ($feedback_array)) { + foreach ($feedback_array[0] as $index => $tag_name) { + $city_name_string = $feedback_array[1][$index]; + $city_name_list = explode(',', $city_name_string); + $feedback_list = $this->Feedback_model->get_feedback_by_city_list($city_name_list); + // 防止触发 Google 网络垃圾政策只返回前三条 + $top3_feedback_list = array_slice($feedback_list, 0, 3); + $feedback_content = $this->load->view( + 'mobile_first/gh-feedback-list', + array('feedback_list' => $top3_feedback_list), + true + ); + $information->ic_content = str_replace( + $tag_name, + $feedback_content, + $information->ic_content + ); + } + } if (is_file('D:/wwwroot/origin-www.globalhighlights.com/css/gh-global.css')) { //主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速 $main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.globalhighlights.com/css/gh-global.css')); @@ -2004,6 +1976,11 @@ class Information extends CI_Controller if (!empty ($meta_addon_js)) { $template = str_replace('', '', $template); } + + $meta_index_set = get_meta($information->ic_id, 'meta_index_set'); + if (!empty ($meta_index_set)) { + $template = str_replace('', '', $template); + } //设置内容图片缓加载 $lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.chinahighlights.com/grey.gif'); $template = str_replace('', $lazy_content, $template); @@ -2176,19 +2153,6 @@ class Information extends CI_Controller $template = str_replace('', $tips_right_list_content, $template); - // - $feedback_newest_10 = $this->Feedback_model->get_feedback_newest(10); - $feedback_newest_10_content = $this->load->view( - 'mobile_first/ah-feedback-newest-10', - array('feedback_list' => $feedback_newest_10), - true - ); - $template = str_replace( - '', - $feedback_newest_10_content, - $template - ); - //文中的信息推荐 if (strpos($information->ic_content, '') !== false) { $information->ic_content = str_replace('', $this->load->view($template_path . '-recommends-article', array('recommands' => $template_recommand), true), $information->ic_content); @@ -2297,9 +2261,11 @@ class Information extends CI_Controller $city_name_string = $feedback_array[1][$index]; $city_name_list = explode(',', $city_name_string); $feedback_list = $this->Feedback_model->get_feedback_by_city_list($city_name_list); + // 防止触发 Google 网络垃圾政策只返回前三条 + $top3_feedback_list = array_slice($feedback_list, 0, 3); $feedback_content = $this->load->view( - $template_path . '-feedback-list', - array('feedback_list' => $feedback_list), + 'mobile_first/ah-feedback-list', + array('feedback_list' => $top3_feedback_list), true ); $information->ic_content = str_replace( @@ -2359,19 +2325,6 @@ class Information extends CI_Controller } } - // - $feedback_newest = $this->Feedback_model->get_feedback_newest(); - $feedback_newest_content = $this->load->view( - 'mobile_first/ah-feedback-newest', - array('feedback_list' => $feedback_newest), - true - ); - $information->ic_content = str_replace( - '', - $feedback_newest_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')); @@ -2391,6 +2344,11 @@ class Information extends CI_Controller if (!empty ($meta_addon_js)) { $template = str_replace('', '', $template); } + + $meta_index_set = get_meta($information->ic_id, 'meta_index_set'); + if (!empty ($meta_index_set)) { + $template = str_replace('', '', $template); + } //设置内容图片缓加载 $lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.asiahighlights.com/grey.gif'); $template = str_replace('', $lazy_content, $template); diff --git a/application/views/mobile_first/ah-next-mobile.php b/application/views/mobile_first/ah-next-mobile.php index 351c79a5..5023f40a 100644 --- a/application/views/mobile_first/ah-next-mobile.php +++ b/application/views/mobile_first/ah-next-mobile.php @@ -49,65 +49,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -174,73 +116,6 @@ ic_title; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/views/mobile_first/ah-next.php b/application/views/mobile_first/ah-next.php index 72201719..1a75bff0 100644 --- a/application/views/mobile_first/ah-next.php +++ b/application/views/mobile_first/ah-next.php @@ -54,64 +54,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -185,76 +127,10 @@ ic_title; ?> - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/views/mobile_first/ah-pc.php b/application/views/mobile_first/ah-pc.php index 7b4e79ba..b7542883 100644 --- a/application/views/mobile_first/ah-pc.php +++ b/application/views/mobile_first/ah-pc.php @@ -12,6 +12,7 @@ + @@ -150,7 +151,7 @@ @@ -256,7 +257,6 @@ -
Create my trip
@@ -370,11 +370,11 @@ @@ -393,7 +393,7 @@
- Rated 5 out of 5 | 98.8% Excellence
+ Rated 4.9 out of 5 | 98.8% Excellence
China Highlights International
Travel Service Co., LTD
@@ -402,13 +402,13 @@
Company
@@ -416,13 +416,13 @@
Language
diff --git a/application/views/mobile_first/ah.php b/application/views/mobile_first/ah.php index cfdf1c98..902a61a6 100644 --- a/application/views/mobile_first/ah.php +++ b/application/views/mobile_first/ah.php @@ -9,6 +9,7 @@ + @@ -96,7 +97,7 @@ - + @@ -254,15 +255,15 @@
@@ -276,7 +277,7 @@ - Rated 5 out of 5 | 98.8% Excellence
+ Rated 4.9 out of 5 | 98.8% Excellence
China Highlights International
Travel Service Co., LTD
@@ -312,15 +313,15 @@ @@ -329,17 +330,17 @@
diff --git a/application/views/mobile_first/ch-next.php b/application/views/mobile_first/ch-next.php index dadf6f69..9a9dc092 100644 --- a/application/views/mobile_first/ch-next.php +++ b/application/views/mobile_first/ch-next.php @@ -66,68 +66,7 @@ - - -
- - <?php echo $recommands['Tour E']->ic_title; ?> - - ic_title; ?> - -
- - - - - - -
- - <?php echo $recommands['Tour F']->ic_title; ?> - - ic_title; ?> - -
- - - - - - -
- - <?php echo $recommands['Tour G']->ic_title; ?> - - ic_title; ?> - -
- - - - - - -
- - <?php echo $recommands['Tour H']->ic_title; ?> - ic_title; ?> - -
- - - + @@ -212,73 +151,7 @@
- ic_url)) { ?> - -
- <?php echo $recommands['Article E']->ic_title; ?> - - ic_title; ?> -
- - -
- - - ic_url)) { ?> - -
- <?php echo $recommands['Article F']->ic_title; ?> - - - ic_title; ?> - -
- - -
- - - ic_url)) { ?> - -
- <?php echo $recommands['Article G']->ic_title; ?> - - ic_title; ?> - -
- - -
- - - ic_url)) { ?> - -
- <?php echo $recommands['Article H']->ic_title; ?> - - ic_title; ?> - -
- - -
- + diff --git a/application/views/mobile_first/ch-pc.php b/application/views/mobile_first/ch-pc.php index 5f5aef6d..b560d460 100644 --- a/application/views/mobile_first/ch-pc.php +++ b/application/views/mobile_first/ch-pc.php @@ -12,6 +12,7 @@ + @@ -131,7 +132,7 @@
  • Hong Kong
  • Asia Tours
  • + id="asia_tours_2021" target="blank" rel="nofollow">Asia Tours @@ -176,7 +177,7 @@
    @@ -316,16 +317,17 @@ +
    +
    + + +
    +
    -
    -
    - - -
    -
    +
    Start planning your tailor-made tour with 1-1 @@ -417,13 +419,13 @@ @@ -447,14 +449,14 @@ @@ -462,12 +464,12 @@
    Language
    diff --git a/application/views/mobile_first/ch.php b/application/views/mobile_first/ch.php index 035cf21e..2896d402 100644 --- a/application/views/mobile_first/ch.php +++ b/application/views/mobile_first/ch.php @@ -8,6 +8,7 @@ + @@ -314,18 +315,18 @@ @@ -440,18 +441,18 @@ @@ -471,7 +472,7 @@ Travel Service Co., LTD Follow Us
    @@ -221,14 +222,13 @@
    Create my trip -
    +
    - + - + -
    We are here to help you...
    start planning your tailor-made trip with 1-1 help from our travel advisors.
    Create Your Trip
    @@ -325,13 +325,13 @@ @@ -357,26 +357,26 @@
    Company
    Language
    @@ -395,7 +395,7 @@
  • + style="fill: #fff;"> diff --git a/application/views/mobile_first/gh.php b/application/views/mobile_first/gh.php index 0226dc0d..ffa3fe0c 100644 --- a/application/views/mobile_first/gh.php +++ b/application/views/mobile_first/gh.php @@ -8,6 +8,7 @@ + @@ -124,39 +125,39 @@ @@ -284,11 +285,11 @@
  • @@ -305,18 +306,18 @@
    Follow Us