diff --git a/application/controllers/information.php b/application/controllers/information.php index 3d3e9d99..9ce34e6a 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -574,6 +574,14 @@ class Information extends CI_Controller $mobile_template_H1 = $this->call_mobile_template_H1($mobile_first_template_path, $this->input->post('is_path'), $this->input->post('ic_author'), $this->input->post('ic_title'), $this->input->post('ic_photo'));//H1模板替换 $mobile_template = str_replace('', $mobile_template_H1, $mobile_template); $mobile_template = str_replace('', $this->input->post('ic_content'), $mobile_template); + //Google广告代码 + if(!empty(get_meta($information->ic_id, 'meta_google_ad_content'))){ + $mobile_template = str_replace('', '', $mobile_template); + } + if(!empty(get_meta($information->ic_id, 'meta_google_ad_article'))) { + $mobile_template = str_replace('', '', $mobile_template); + } + //信息推荐 $template_NEXT = $this->call_mobile_template_NEXT($mobile_first_template_path, $this->input->post('is_id')); $mobile_template = str_replace('', $template_NEXT, $mobile_template); //社媒分享图片 @@ -610,6 +618,14 @@ class Information extends CI_Controller $template_H1 = $this->call_mobile_template_H1($template_path, $this->input->post('is_path'), $this->input->post('ic_author'), $this->input->post('ic_title'), $this->input->post('ic_photo'));//H1模板替换 $template = str_replace('', $template_H1, $template); $template = str_replace('', $this->input->post('ic_content'), $template); + //Google广告代码 + if(!empty(get_meta($information->ic_id, 'meta_google_ad_content'))){ + $template = str_replace('', '', $template); + } + if(!empty(get_meta($information->ic_id, 'meta_google_ad_article'))) { + $template = str_replace('', '', $template); + } + //信息推荐 $template_NEXT = $this->call_mobile_template_NEXT($template_path, $this->input->post('is_id')); $template = str_replace('', $template_NEXT, $template); //社媒分享图片 @@ -642,7 +658,7 @@ class Information extends CI_Controller { if (empty($ic_photo)) { $images = get_image_url_by_source($ic_content); - if (!empty($images)) { + if (!empty($images) and !empty($images[1])) { return $images[1][0]; } } else { diff --git a/application/views/bootstrap3/information_edit.php b/application/views/bootstrap3/information_edit.php index 8a0d71cd..39a85b6a 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -1463,6 +1463,45 @@ $meta_subnavi_arr = array(
+
+
+
+ + 绑定 + +
+
+ + config->item('site_code')=='ch'){ ?> + +
+
+
+ +
+
+ +
+
+ +
+
+ + + config->item('site_code')!=='ch'){ ?> -
-
-
- - 绑定 - -
-
- +