|
|
|
@ -1201,8 +1201,9 @@ class Information extends CI_Controller
|
|
|
|
|
//信息推荐
|
|
|
|
|
$template_recommand = $recommand_information; //$this->recommand_information($information); 从外面传进来,pc和移动只需要查一次,减少数据库负担
|
|
|
|
|
$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'])) {
|
|
|
|
|
if (!empty ($template_recommand['Tips Right TOP']) || !empty ($meta_show_advertise)) {
|
|
|
|
|
$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'])) {
|
|
|
|
@ -1216,7 +1217,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]) {
|
|
|
|
@ -1653,6 +1654,8 @@ class Information extends CI_Controller
|
|
|
|
|
public function make_www_cache_gh($device, $information, $recommand_information)
|
|
|
|
|
{
|
|
|
|
|
$data = array();
|
|
|
|
|
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
|
|
|
|
|
$data['meta_show_advertise'] = $meta_show_advertise;
|
|
|
|
|
switch ($device) {
|
|
|
|
|
case 'mobile':
|
|
|
|
|
//获取移动优先的模板,如果有的话
|
|
|
|
@ -1668,7 +1671,7 @@ class Information extends CI_Controller
|
|
|
|
|
//获取PC的模板,如果有的话
|
|
|
|
|
$template_path = 'mobile_first/' . $this->config->item('site_code');
|
|
|
|
|
if (is_file(APPPATH . 'views/' . $template_path . '-pc' . EXT)) {
|
|
|
|
|
$template = $this->load->view($template_path . '-pc', '', true);
|
|
|
|
|
$template = $this->load->view($template_path . '-pc', $data, true);
|
|
|
|
|
$html_path_ext = '-pc.htm';
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
@ -1776,7 +1779,6 @@ 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]) {
|
|
|
|
@ -2018,12 +2020,14 @@ class Information extends CI_Controller
|
|
|
|
|
$data = array();
|
|
|
|
|
$data['information'] = $information;
|
|
|
|
|
$recommand_template = '';
|
|
|
|
|
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
|
|
|
|
|
$data['meta_show_advertise'] = $meta_show_advertise;
|
|
|
|
|
switch ($device) {
|
|
|
|
|
case 'mobile':
|
|
|
|
|
//获取移动优先的模板,如果有的话
|
|
|
|
|
$template_path = 'mobile_first/' . $this->config->item('site_code');
|
|
|
|
|
if (is_file(APPPATH . 'views/' . $template_path . EXT)) {
|
|
|
|
|
$template = $this->load->view($template_path, '', true);
|
|
|
|
|
$template = $this->load->view($template_path, $data, true);
|
|
|
|
|
$html_path_ext = '-mobile.htm';
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
@ -2123,7 +2127,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]) {
|
|
|
|
|