diff --git a/application/controllers/information.php b/application/controllers/information.php index c8185c5b..ebfe26d9 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -961,6 +961,12 @@ class Information extends CI_Controller } } + //顶部全屏大图 + if ($device == 'mobile') { //移动端读取移动大图 + $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture_mobile'); + } else { + $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture'); + } //非产品页面 $meta_product_code = get_meta($information->ic_id, 'meta_product_code'); @@ -973,7 +979,7 @@ class Information extends CI_Controller $author = $this->Operator_model->get_author_nikename($information->ic_author); $data_H1['author'] = $author; //获取作者信息 $data_H1['ic_title'] = $information->ic_title; - $data_H1['ic_photo'] = $information->ic_photo; + $data_H1['ic_photo'] = $meta_addon_picture;//$information->ic_photo; 用额外设置的图片替代 $data_H1['breadcrumb_data'] = $breadcrumb_data; $data_H1['ads_by_google'] = $ads_by_google; $template_H1 = $this->load->view($template_path . '-h1', $data_H1, TRUE); @@ -998,7 +1004,7 @@ class Information extends CI_Controller //信息推荐 $template_recommand = $recommand_information; //$this->recommand_information($information); 从外面传进来,pc和移动只需要查一次,减少数据库负担 - // $template = str_replace('', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), TRUE), $template); + $template = str_replace('', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), TRUE), $template); // //广告,改叫tips,防止被插件屏蔽 if (!empty($template_recommand['Tips Right TOP'])) { // $template = str_replace('', "
", $template); @@ -1027,33 +1033,12 @@ class Information extends CI_Controller } } - //顶部全屏大图 - if ($device == 'mobile') { //移动端读取移动大图 - $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture_mobile'); - } else { - $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture'); - } - - $meta_addon_picture_url = get_meta($information->ic_id, 'meta_addon_picture_url'); - if (!empty($meta_addon_picture)) { - if (!empty($meta_addon_picture_url)) { - // $template = str_replace('', '
' . $information->ic_title . '
', $template); - } else { - // $template = str_replace('', '
' . $information->ic_title . '' . $template_TrainSearch . '
', $template); - } - } - //顶部视频 -// $meta_news_video = get_meta($information->ic_id, 'meta_news_video'); -// $meta_video_picture = get_meta($information->ic_id, 'meta_video_picture'); -// if (!empty($meta_news_video) && !empty($meta_video_picture)) { -// $template = str_replace('', '
', $template); -// } 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')); } else { - $main_css_string = compress_css(GET_HTTP('https://origin-www.globalhighlights.com/css/gh-global.css')); + $main_css_string = compress_css(GET_HTTP('https://www.globalhighlights.com/css/gh-global.css')); } $template = str_replace('', '', $template); //额外样式 diff --git a/application/libraries/html_optimize_lib.php b/application/libraries/html_optimize_lib.php index d241bd6e..41c77dad 100644 --- a/application/libraries/html_optimize_lib.php +++ b/application/libraries/html_optimize_lib.php @@ -125,8 +125,8 @@ class html_optimize_lib $file_path = $imagesPath . $img_src_urls['path']; } if (is_file($file_path)) { - $properties = getimagesize($file_path);//获取图片属性 - if (!empty($properties[0]) && !empty($properties[1])) { + $properties = getimagesize($file_path);//获取图片属性,读取失败返回false + if ($properties && !empty($properties[0]) && !empty($properties[1])) { $image->width = $properties[0]; $image->height = $properties[1]; } diff --git a/application/third_party/recommend/views/templates.php b/application/third_party/recommend/views/templates.php index 3dbe77aa..f574ed67 100644 --- a/application/third_party/recommend/views/templates.php +++ b/application/third_party/recommend/views/templates.php @@ -1,10 +1,11 @@ -

完整的文中广告代码:

+

CH完整的文中广告代码:

+
Beijing trip -
Recommended Tour
-
Jiuzhaigou
-

Time-Smart Jiuzhaigou Discovery

- 3-Day Jiuzhaigou and Huanglong Highlights Tour View more
+ + All things you need to know Read more

diff --git a/application/views/bootstrap/header.php b/application/views/bootstrap/header.php index d0540637..21256c13 100644 --- a/application/views/bootstrap/header.php +++ b/application/views/bootstrap/header.php @@ -53,7 +53,17 @@ window.location.href = window.location.href; }); } - + + + diff --git a/application/views/bootstrap/login.php b/application/views/bootstrap/login.php index 2b2c391b..96102caf 100644 --- a/application/views/bootstrap/login.php +++ b/application/views/bootstrap/login.php @@ -22,6 +22,15 @@ --> + diff --git a/application/views/bootstrap3/header.php b/application/views/bootstrap3/header.php index 44aee7cc..cbfa2c05 100644 --- a/application/views/bootstrap3/header.php +++ b/application/views/bootstrap3/header.php @@ -103,6 +103,16 @@ } + + diff --git a/application/views/header.php b/application/views/header.php index eb1c5302..bea2a638 100644 --- a/application/views/header.php +++ b/application/views/header.php @@ -35,8 +35,17 @@ } } - - + + +
diff --git a/application/views/login.php b/application/views/login.php index b157ad70..7d14e47a 100644 --- a/application/views/login.php +++ b/application/views/login.php @@ -13,6 +13,15 @@ + diff --git a/application/views/mobile_first/ah-pc.php b/application/views/mobile_first/ah-pc.php index 25f936a4..2beb3855 100644 --- a/application/views/mobile_first/ah-pc.php +++ b/application/views/mobile_first/ah-pc.php @@ -45,7 +45,7 @@ alt="Asiahighlights logo" class="asiahighlightslogo img-responsive">