|
|
@ -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_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('<!--@HEAD_1@-->', $mobile_template_H1, $mobile_template);
|
|
|
|
$mobile_template = str_replace('<!--@HEAD_1@-->', $mobile_template_H1, $mobile_template);
|
|
|
|
$mobile_template = str_replace('<!--@CUSTOM-CONENT@-->', $this->input->post('ic_content'), $mobile_template);
|
|
|
|
$mobile_template = str_replace('<!--@CUSTOM-CONENT@-->', $this->input->post('ic_content'), $mobile_template);
|
|
|
|
|
|
|
|
//Google广告代码
|
|
|
|
|
|
|
|
if(!empty(get_meta($information->ic_id, 'meta_google_ad_content'))){
|
|
|
|
|
|
|
|
$mobile_template = str_replace('<!--@Match-Content-GOOGLE@-->', '<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-4231674166786366" data-ad-slot="1447610161"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script>', $mobile_template);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!empty(get_meta($information->ic_id, 'meta_google_ad_article'))) {
|
|
|
|
|
|
|
|
$mobile_template = str_replace('<!--@IN-ARTICLE-GOOGLE@-->', '<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4231674166786366" data-ad-slot="5442695494"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script>', $mobile_template);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//信息推荐
|
|
|
|
$template_NEXT = $this->call_mobile_template_NEXT($mobile_first_template_path, $this->input->post('is_id'));
|
|
|
|
$template_NEXT = $this->call_mobile_template_NEXT($mobile_first_template_path, $this->input->post('is_id'));
|
|
|
|
$mobile_template = str_replace('<!--@ARTICLENEXT@-->', $template_NEXT, $mobile_template);
|
|
|
|
$mobile_template = str_replace('<!--@ARTICLENEXT@-->', $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_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('<!--@HEAD_1@-->', $template_H1, $template);
|
|
|
|
$template = str_replace('<!--@HEAD_1@-->', $template_H1, $template);
|
|
|
|
$template = str_replace('<!--@CUSTOM-CONENT@-->', $this->input->post('ic_content'), $template);
|
|
|
|
$template = str_replace('<!--@CUSTOM-CONENT@-->', $this->input->post('ic_content'), $template);
|
|
|
|
|
|
|
|
//Google广告代码
|
|
|
|
|
|
|
|
if(!empty(get_meta($information->ic_id, 'meta_google_ad_content'))){
|
|
|
|
|
|
|
|
$template = str_replace('<!--@Match-Content-GOOGLE@-->', '<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-4231674166786366" data-ad-slot="1447610161"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script>', $template);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!empty(get_meta($information->ic_id, 'meta_google_ad_article'))) {
|
|
|
|
|
|
|
|
$template = str_replace('<!--@IN-ARTICLE-GOOGLE@-->', '<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4231674166786366" data-ad-slot="5442695494"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script>', $template);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//信息推荐
|
|
|
|
$template_NEXT = $this->call_mobile_template_NEXT($template_path, $this->input->post('is_id'));
|
|
|
|
$template_NEXT = $this->call_mobile_template_NEXT($template_path, $this->input->post('is_id'));
|
|
|
|
$template = str_replace('<!--@ARTICLENEXT@-->', $template_NEXT, $template);
|
|
|
|
$template = str_replace('<!--@ARTICLENEXT@-->', $template_NEXT, $template);
|
|
|
|
//社媒分享图片
|
|
|
|
//社媒分享图片
|
|
|
@ -642,7 +658,7 @@ class Information extends CI_Controller
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (empty($ic_photo)) {
|
|
|
|
if (empty($ic_photo)) {
|
|
|
|
$images = get_image_url_by_source($ic_content);
|
|
|
|
$images = get_image_url_by_source($ic_content);
|
|
|
|
if (!empty($images)) {
|
|
|
|
if (!empty($images) and !empty($images[1])) {
|
|
|
|
return $images[1][0];
|
|
|
|
return $images[1][0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|