添加文中广告

hotfix/paypal-note
尹诚诚 4 years ago
parent 22912b56b4
commit 3545e692bc

@ -420,8 +420,8 @@ class Information extends CI_Controller
//读取模板生成PC和移动优先文件
$recommand_information = $this->recommand_information($information);
$information_new = $this->Information_model->Detail($this->input->post('is_id'));
$this->make_www_cache_ah('mobile', $information_new,$recommand_information);
$this->make_www_cache_ah('pc', $information_new,$recommand_information);
$this->make_www_cache_ah('mobile', $information_new, $recommand_information);
$this->make_www_cache_ah('pc', $information_new, $recommand_information);
} else if (strcasecmp($site_code, "gh") == 0 && !empty($auto_update_cache)) {
$information_new = $this->Information_model->Detail($this->input->post('is_id'));
$this->make_www_cache_gh($information_new);
@ -785,6 +785,10 @@ class Information extends CI_Controller
$template = str_replace('<!--@TIPS-RIGHT@-->', "<div class='right_tour'>" . $template_recommand['Tips Right']->it_content . "</div>", $template);
}
//文中广告
if (!empty($template_recommand['Tips Content']) && strpos($information->ic_content, '<!--@TIPS-CONTENT@-->') !== false) {
$information->ic_content = str_replace('<!--@TIPS-CONTENT@-->', $template_recommand['Tips Content']->it_content, $information->ic_content);
}
//文中的信息推荐
if (strpos($information->ic_content, '<!--@Content-Recommends-Article@-->') !== false) {
@ -987,12 +991,16 @@ class Information extends CI_Controller
//推荐信息或者产品
//信息推荐
$template_recommand =$recommand_information;// $this->recommand_information($information);
$template_recommand = $recommand_information;// $this->recommand_information($information);
$template = str_replace('<!--@ARTICLENEXT@-->', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), TRUE), $template);
//广告改叫tips防止被插件屏蔽
if (!empty($template_recommand['Tips Right'])) {
$template = str_replace('<!--@TIPS-RIGHT@-->', "<div class='right_tour'><div class='ah_inforight'>" . $template_recommand['Tips Right']->it_content . "</div></div>", $template);
}
//文中广告
if (!empty($template_recommand['Tips Content']) && strpos($information->ic_content, '<!--@TIPS-CONTENT@-->') !== false) {
$information->ic_content = str_replace('<!--@TIPS-CONTENT@-->', $template_recommand['Tips Content']->it_content, $information->ic_content);
}
//文中的信息推荐
if (strpos($information->ic_content, '<!--@Content-Recommends-Article@-->') !== false) {
$information->ic_content = str_replace('<!--@Content-Recommends-Article@-->', $this->load->view($template_path . '-recommends-article', array('recommands' => $template_recommand), TRUE), $information->ic_content);
@ -1409,7 +1417,7 @@ class Information extends CI_Controller
$data = $this->Information_model->random(1, $root_information->is_path, $exclude_ids);
break;
case 'rule_this_node_random'://指定节点下随机
$ir_pointer = $this->Information_model->Detail($recommand->ir_pointer_is_id,'is_path');
$ir_pointer = $this->Information_model->Detail($recommand->ir_pointer_is_id, 'is_path');
if (!empty($ir_pointer)) {
$data = $this->Information_model->random(1, $ir_pointer->is_path, $exclude_ids);
}

@ -112,6 +112,25 @@
</div>
<!-- 文中信息推荐 end -->
<hr/>
<p class="text-primary text-center">&lt;!--@TIPS-CONTENT@--&gt;</p>
<div class="row">
<div class="col-md-8"></div>
<div class="col-md-8">
<div class="panel panel-default">
<div class="panel-heading">文中广告<a
href="javascript:void(0);"
onclick="show_bind_info(<?php echo $information->is_id; ?>,'Tips Content')"
> <span
class="pull-right glyphicon glyphicon-cog"></span></a></div>
<div class="panel-body">
<?php echo empty($recommends['Tips Content']) ? '继承上级' : $recommends['Tips Content']->ir_rule . '<br/>' . $recommends['Tips Content']->ir_keyword; ?>
</div>
</div>
</div>
<div class="col-md-8"></div>
</div>
<hr/>
<!-- 文中线路推荐 begin -->
<p class="text-primary text-center">&lt;!--@Content-Recommends-Tour@--&gt;</p>

Loading…
Cancel
Save