diff --git a/application/config/config.php b/application/config/config.php index 94749e0c..832a1150 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -426,6 +426,7 @@ $config['site'] = array( 'trippest' => array('site_code' => 'trippest', 'site_id' => 145, 'site_lgc' => '1', 'site_image_url' => '', 'site_url' => 'https://www.trippest.com', 'site_authors' => array('cj'), 'site_user' => array(',ycc,zp,')), 'shanghai' => array('site_code' => 'shanghai', 'site_id' => 96, 'site_lgc' => '107', 'site_url' => 'http://www.shanghaihighlights.com/', 'site_image_url' => 'https://images.shanghaihighlights.com', 'site_authors' => array('ll', 'D'), 'site_user' => ',ycc,vz,bhn,J,wj,ll,D,ZP,lyy,'), 'beijing' => array('site_code' => 'beijing', 'site_id' => 98, 'site_lgc' => '106', 'site_url' => 'http://www.mybeijingchina.com/', 'site_image_url' => 'https://images.mybeijingchina.com', 'site_authors' => array('ll', 'D'), 'site_user' => ',ycc,vz,bhn,J,wj,ll,D,ZP,lyy,'), + 'trainspread' => array('site_code' => 'trainspread', 'site_id' => 149, 'site_lgc' => '1', 'site_url' => 'http://www.trainspread.com/', 'site_image_url' => 'https://images.trainspread.com', 'site_authors' => array('ll', 'D'), 'site_user' => ',ycc,vz,bhn,J,wj,ll,D,ZP,lyy,'), ); //静态文件生成路径 @@ -762,6 +763,7 @@ $config['css_source_ct'] = 'https://data.chinatravel.com/css/min.php?f=/css/css3 $config['css_source_chinatravel'] = 'https://data.chinatravel.com/css/newcss3/base.css'; $config['css_source_shanghai'] = 'https://data.shanghaihighlights.com/css/css3/base.css'; $config['css_source_beijing'] = 'https://www.mybeijingchina.com/css/css3/base.css'; +$config['css_source_trainspread'] = 'https://data.trainspread.com/css/css3/base.css'; $config['css_source_ts'] = 'https://www.trainspread.com/css/bootstrap.min.css'; //静态文件生成路径 @@ -778,6 +780,7 @@ $config['cache']['gh']['cache_path'] = 'D:\wwwcache\globalhighlights.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'; +$config['cache']['trainspread']['cache_path'] = 'D:\wwwcache\mobile-first\trainspread.com'; //静态文件更新接口 $config['cache']['jp']['cache_api'] = '/info.php/information/update_cache/'; diff --git a/application/controllers/information.php b/application/controllers/information.php index 2b3dc8af..e9c83523 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -731,6 +731,9 @@ class Information extends CI_Controller } else if (strcasecmp($site_code, "beijing") == 0 && !empty($auto_update_cache)) { $information_new = $this->Information_model->Detail($this->input->post('is_id')); $this->make_www_cache_bj($information_new); + } else if (strcasecmp($site_code, "trainspread") == 0 && !empty($auto_update_cache)) { + $information_new = $this->Information_model->Detail($this->input->post('is_id')); + $this->make_www_cache_ts($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)) { @@ -825,6 +828,8 @@ class Information extends CI_Controller $this->make_www_cache_sh($information); } else if ($this->config->item('site_code') == 'beijing') { $this->make_www_cache_bj($information); + } else if ($this->config->item('site_code') == 'trainspread') { + $this->make_www_cache_ts($information); } else if ($this->config->item('site_code') == 'gh') { $this->make_www_cache_gh('pc', $information, $recommand_information); $this->make_www_cache_gh('mobile', $information, $recommand_information); @@ -3619,6 +3624,13 @@ class Information extends CI_Controller } + /** + * TrainSpread网站静态化 + */ + public function make_www_cache_ts($information){ + + } + //通过内容找到第一张图片 public function set_photo_content($ic_photo, $ic_content) { diff --git a/application/helpers/info_helper.php b/application/helpers/info_helper.php index 67d5d4ec..2d0384e9 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 == 'shanghai' || $sitecode=='beijing') { + if ($sitecode == 'ch' || $sitecode == 'ah' || $sitecode == 'chinatravel' || $sitecode == 'gh' || $sitecode == 'shanghai' || $sitecode=='beijing' || $sitecode == "trainspread") { return true; } else { return false; diff --git a/application/views/bootstrap3/information_edit.php b/application/views/bootstrap3/information_edit.php index 748e459d..8c378fdf 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -842,7 +842,7 @@ if (!empty($setting_website_nav)) { - ic_sitecode == 'chinatravel' || $information->ic_sitecode == 'shanghai' || $information->ic_sitecode == 'beijing') { + ic_sitecode == 'chinatravel' || $information->ic_sitecode == 'shanghai' || $information->ic_sitecode == 'beijing' || $information->ic_sitecode == 'trainspread') { ?>