|
|
|
@ -762,6 +762,18 @@ class Information extends CI_Controller
|
|
|
|
|
$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);
|
|
|
|
|
|
|
|
|
|
//替换内容中广告
|
|
|
|
|
$temp_array=array();
|
|
|
|
|
preg_match_all('^<!--@TIPS-[A-Z]+-([0-9]+)@-->^', $template, $temp_array);
|
|
|
|
|
if(!empty($temp_array[1])){
|
|
|
|
|
foreach ($temp_array[1] as $key=>$item){
|
|
|
|
|
$tips_detail= $this->recommends_and_tips_model->tips_detail($item);
|
|
|
|
|
if($tips_detail){
|
|
|
|
|
$template = str_replace($temp_array[0][$key], $tips_detail->it_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);
|
|
|
|
|