diff --git a/application/controllers/information.php b/application/controllers/information.php index ed2d7570..5db69137 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -2718,7 +2718,11 @@ class Information extends CI_Controller { // AH Home 下层节点名称和链接映射 $group_map = [ - 278011836 => [ + 278002667 => [ + 'ic_url' => '/destinations', + 'ic_url_title' => 'Destinations', + ], + 278008885 => [ 'ic_url' => '/about-us', 'ic_url_title' => 'About Us', ], @@ -2734,8 +2738,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.highlightstravel.com', $author->OPI_Code); - $author_url = $this->get_author_url('www.highlightstravel.com', $author->OPI_Code); + $data['author_url'] = $this->get_author_url('www.thailandhighlights.com', $author->OPI_Code); + $author_url = $this->get_author_url('www.thailandhighlights.com', $author->OPI_Code); } else { $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 @@ -2834,15 +2838,41 @@ class Information extends CI_Controller { $meta_product_code = get_meta($information->ic_id, 'meta_product_code'); // 非产品页面 if (empty($meta_product_code)) { - + $addthis_widget = $this->load->view($template_path . '-add-this', false, true); + $template = str_replace('', $addthis_widget, $template); + $template = str_replace('?product_code=', '', $template); } else { $template = str_replace('?product_code=', '?product_code=' . $meta_product_code, $template); $inquiry_form_template = $this->load->view( - 'mobile_first/thailand-inquiry-form', + $template_path . '-inquiry-form', ['meta_product_code' => $meta_product_code, 'information' => $information], true ); $information->ic_content = str_replace('', $inquiry_form_template, $information->ic_content); + + // GP 表单 + $gp_form_content = $this->load->view( + $template_path . '-gp-form', + ['meta_product_code' => $meta_product_code, 'information' => $information], + true + ); + $information->ic_content = str_replace('', $gp_form_content, $information->ic_content); + + // tour-list 表单 + $tour_list_form_content = $this->load->view( + $template_path . '-tour-list-form', + ['meta_product_code' => $meta_product_code, 'information' => $information], + true + ); + $information->ic_content = str_replace('', $tour_list_form_content, $information->ic_content); + + // 水灯节 GP 线路表单 + $gp_form_content = $this->load->view( + $template_path . '-lantern-festival-gp-form', + ['meta_product_code' => $meta_product_code, 'information' => $information], + true + ); + $information->ic_content = str_replace('', $gp_form_content, $information->ic_content); } $price_tag_list = $this->parse_price_tag($information->ic_content); @@ -2854,6 +2884,62 @@ class Information extends CI_Controller { $information->ic_content ); } + // why-us 相关的标签 + $why_us_mobile = $this->load->view($template_path . '-why-us-mobile', false, true); + $information->ic_content = str_replace('', $why_us_mobile, $information->ic_content); + + $why_us_tour_detail_pc = $this->load->view($template_path . '-why-us-tour-detail-pc', false, true); + $information->ic_content = str_replace('', $why_us_tour_detail_pc, $information->ic_content); + + $why_us_tour_list_pc = $this->load->view($template_path . '-why-us-tour-list-pc', false, true); + $information->ic_content = str_replace('', $why_us_tour_list_pc, $information->ic_content); + + $info_page_form_content = $this->load->view($template_path . '-info-page-form', false, true); + $information->ic_content = str_replace('', $info_page_form_content, $information->ic_content); + + // 水灯节表单 + $lantern_form_content = $this->load->view( + 'mobile_first/thailand-lantern-form', + ['information' => $information], + true + ); + $information->ic_content = str_replace('', $lantern_form_content, $information->ic_content); + + // 水灯节2025表单 + $lantern_form_content_2025 = $this->load->view( + 'mobile_first/thailand-lantern-form-2025', + ['information' => $information], + true + ); + $information->ic_content = str_replace('', $lantern_form_content_2025, $information->ic_content); + + // 水灯节2026表单 + $lantern_form_content_2026 = $this->load->view( + 'mobile_first/thailand-lantern-form-2026', + ['information' => $information], + true + ); + $information->ic_content = str_replace('', $lantern_form_content_2026, $information->ic_content); + + // Chiang Mai Authentic Sky Lantern Festival on Nov. 5, 2025 + $lantern_form_content_authentic_sky = $this->load->view( + 'mobile_first/thailand-chiang-mai-lantern-festival', + ['information' => $information], + true + ); + $information->ic_content = str_replace('', $lantern_form_content_authentic_sky, $information->ic_content); + + // CAD 跨年表单 + $new_year_countdown_form_content = $this->load->view( + 'mobile_first/thailand-new-year-countdown', + ['information' => $information], + true + ); + $information->ic_content = str_replace( + '', + $new_year_countdown_form_content, + $information->ic_content + ); // 动态加载反馈标签,第一个城市不足八条,使用第二城市数据。 // HTLM:
@@ -2865,8 +2951,8 @@ 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, FALSE); - // 防止触发 Google 网络垃圾政策只返回前三条,但市场要求显示五条 - $top3_feedback_list = array_slice($feedback_list, 0, 5); + // 防止触发 Google 网络垃圾政策只返回前三条 + $top3_feedback_list = array_slice($feedback_list, 0, 3); $feedback_content = $this->load->view( 'mobile_first/thailand-feedback-list', ['feedback_list' => $top3_feedback_list], @@ -2929,7 +3015,31 @@ class Information extends CI_Controller { } } - //主样式表,内联模式 + // 顾问英文名反馈标签 + $feedback_advisor_array = []; + preg_match_all('^^', $information->ic_content, $feedback_advisor_array); + + if (! empty($feedback_advisor_array)) { + foreach ($feedback_advisor_array[0] as $index => $tag_name) { + $advisor_name = $feedback_advisor_array[1][$index]; + $feedback_list = $this->Feedback_model->get_feedback_by_advisor_name($advisor_name); + $feedback_content = $this->load->view( + 'mobile_first/thailand-feedback-advisor-list', + [ + 'feedback_list' => $feedback_list, + 'advisor_name' => $advisor_name, + ], + true + ); + $information->ic_content = str_replace( + $tag_name, + $feedback_content, + $information->ic_content + ); + } + } + + //主样式表,内联模式 if (is_file('D:/wwwroot/origin-www.thailandhighlights.com/css/mobile-first.css')) { //主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速 $main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.thailandhighlights.com/css/mobile-first.css')); } else { @@ -2986,7 +3096,7 @@ class Information extends CI_Controller { // 设置图片尺寸 // 优化过图片目录:D:\wwwroot\origin-images.chinahighlights.com\optimize\ $www_local_path = 'D:/wwwroot/origin-www.thailandhighlights.com'; - $image_local_path = 'D:/wwwroot/origin-images.thailandhighlights.com/optimize'; + $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); } else {