信息平台增加是否显示右侧广告按钮

master
黄文强@HWQ-PC 1 year ago
parent 10397e5c65
commit de54f8417c

@ -1216,6 +1216,7 @@ class Information extends CI_Controller
$tips_right_a = [];
$tips_right_b = [];
$tips_right_c = [];
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right A_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
@ -1244,8 +1245,9 @@ class Information extends CI_Controller
),
true
);
if(!empty($meta_show_advertise)){
$template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template);
}
}
//文中的信息推荐
@ -1774,6 +1776,7 @@ class Information extends CI_Controller
$tips_right_a = [];
$tips_right_b = [];
$tips_right_c = [];
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right A_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
@ -1802,8 +1805,9 @@ class Information extends CI_Controller
),
true
);
if(!empty($meta_show_advertise)){
$template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template);
}
//文中的信息推荐
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);
@ -2119,6 +2123,7 @@ class Information extends CI_Controller
$tips_right_a = [];
$tips_right_b = [];
$tips_right_c = [];
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right A_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
@ -2143,13 +2148,15 @@ class Information extends CI_Controller
array(
'tips_right_a' => $tips_right_a,
'tips_right_b' => $tips_right_b,
'tips_right_c' => $tips_right_c
'tips_right_c' => $tips_right_c,
),
true
);
$template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template);
if(!empty($meta_show_advertise)){
$template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template);
}
//文中的信息推荐
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);

@ -1154,6 +1154,25 @@
placeholder="124343,8784," value="<?php echo get_meta($information->ic_id, 'meta_bread_info'); ?>" />
</div>
<div class="col-sm-4 meta_bread_info_box">
<label>是否展示广告
<a href="javascript:void(0);"
onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_show_advertise', $('#meta_show_advertise').val())"><i
class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-remove"></i></a>
<a href="javascript:void(0);"
onclick="meta('save', '<?php echo $information->ic_id; ?>', 'meta_show_advertise', $('#meta_show_advertise').val())"><i
class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-hdd"></i></a>
<a href="javascript:void(0);" title="是否显示广告内容"><i
class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-question-sign"></i></a>
</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>
</select>
</div>
</div>

Loading…
Cancel
Save