把是否展示广告的0-1判断逻辑改为"yes"-"no"

master
黄文强@HWQ-PC 2 years ago
parent ef523066c5
commit e250747476

@ -1203,10 +1203,10 @@ class Information extends CI_Controller
$template = str_replace('<!--@ARTICLENEXT@-->', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), true), $template);
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
// //广告改叫tips防止被插件屏蔽
if (!empty ($template_recommand['Tips Right TOP']) || !empty ($meta_show_advertise)) {
if (!empty ($template_recommand['Tips Right TOP']) || $meta_show_advertise == 'yes') {
$template = str_replace('<!--@TIPS-RIGHT-TOP@-->', "<div class='right_brand_info'><aside>" . $template_recommand['Tips Right TOP']->it_content . "</aside></div>", $template);
}
if (!empty ($template_recommand['Tips Right'])) {
if (!empty ($template_recommand['Tips Right']) || $meta_show_advertise == 'yes') {
$template = str_replace('<!--@TIPS-RIGHT@-->', "<div class='right_tour'>" . $template_recommand['Tips Right']->it_content . "</div>", $template);
}
@ -1246,7 +1246,7 @@ class Information extends CI_Controller
),
true
);
if(!empty($meta_show_advertise)){
if($meta_show_advertise == 'yes'){
$template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template);
}
}
@ -1807,7 +1807,7 @@ class Information extends CI_Controller
),
true
);
if(!empty($meta_show_advertise)){
if($meta_show_advertise == 'yes'){
$template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template);
}
//文中的信息推荐
@ -2157,7 +2157,7 @@ class Information extends CI_Controller
true
);
if(!empty($meta_show_advertise)){
if($meta_show_advertise == 'yes'){
$template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template);
}

@ -1167,8 +1167,8 @@
</label>
<select name="meta_show_advertise" id="meta_show_advertise" class="form-control">
<option value=1>展示</option>
<option <?php echo get_meta($information->ic_id, 'meta_show_advertise') === 0 ? 'selected' : false; ?> value=0>不展示
<option value="yes">展示</option>
<option <?php echo get_meta($information->ic_id, 'meta_show_advertise') === 'no' ? 'selected' : false; ?> value='no'>不展示
</option>
</select>
</div>

@ -227,7 +227,7 @@
<div class="pc_content">
<!--@CUSTOM-CONENT@-->
</div>
<?php if (!empty($meta_show_advertise)) {?>
<?php if ($meta_show_advertise == 'yes') {?>
<div class="right_brand_info">
<h3>Why Asia Highlights (10,000+ reviews & 98.8% 5-star rating)</h3>

@ -190,7 +190,7 @@
<!--@CUSTOM-CONENT@-->
</section>
</div>
<?php if (!empty($meta_show_advertise)) {?>
<?php if ($meta_show_advertise == 'yes') {?>
<div class="right_brand_info">
<h3>Why Global Highlights (10,000+ reviews & 98.8% 5-star rating)</h3>

Loading…
Cancel
Save