|
|
|
@ -423,7 +423,7 @@ class Information extends CI_Controller
|
|
|
|
|
} 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)) {
|
|
|
|
|
$update_info_log = $this->update_cache($ic_url);
|
|
|
|
|
//$update_info_log = $this->update_cache($ic_url);
|
|
|
|
|
} else if (strcasecmp($site_code, "cht") != 0 && strcasecmp($site_code, "gm") != 0 && strcasecmp($site_code, "ah") != 0) { //非cht站点并且非GM并且非AH
|
|
|
|
|
$update_info_log = $this->update_cache($ic_url);
|
|
|
|
|
} else if (strcasecmp($site_code, "ct") == 0 && !empty($auto_update_cache)) {
|
|
|
|
@ -649,7 +649,10 @@ class Information extends CI_Controller
|
|
|
|
|
if (!empty($meta_addon_js)) {
|
|
|
|
|
$template = str_replace('<!--@ADDON-JS@-->', '<script src="' . $meta_addon_js . '"></script>', $template);
|
|
|
|
|
}
|
|
|
|
|
$template = str_replace('<!--@CUSTOM-CONENT@-->', $information->ic_content, $template);
|
|
|
|
|
//设置内容图片缓加载
|
|
|
|
|
$lazy_content=$this->html_optimize_lib->set_lazy_loader($information->ic_content,'https://data.chinahighlights.com/grey.gif');
|
|
|
|
|
$template = str_replace('<!--@CUSTOM-CONENT@-->', $lazy_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" data-matched-content-rows-num="2,2" data-matched-content-columns-num="1,3" data-matched-content-ui-type="image_stacked,image_stacked"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script>', $template);
|
|
|
|
@ -755,7 +758,10 @@ class Information extends CI_Controller
|
|
|
|
|
if (!empty($meta_addon_js)) {
|
|
|
|
|
$template = str_replace('<!--@ADDON-JS@-->', '<script src="' . $meta_addon_js . '"></script>', $template);
|
|
|
|
|
}
|
|
|
|
|
$template = str_replace('<!--@CUSTOM-CONENT@-->', $information->ic_content, $template);
|
|
|
|
|
//设置内容图片缓加载
|
|
|
|
|
$lazy_content=$this->html_optimize_lib->set_lazy_loader($information->ic_content,'https://data.asiahighlights.com/grey.gif');
|
|
|
|
|
$template = str_replace('<!--@CUSTOM-CONENT@-->', $lazy_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="2509031466" data-matched-content-rows-num="2,2" data-matched-content-columns-num="1,3" data-matched-content-ui-type="image_stacked,image_stacked"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script>', $template);
|
|
|
|
|