|
|
|
|
@ -3351,6 +3351,55 @@ class Information extends CI_Controller
|
|
|
|
|
/** 替换H1加面包屑,加作者 */
|
|
|
|
|
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>' . "\r\n" . $str_author . "\r\n", $ic_content, 1);
|
|
|
|
|
|
|
|
|
|
// 动态加载反馈标签,按城市出前三条。左侧
|
|
|
|
|
// HTLM: <div><!--@FEEDBACK_Shanghai,Beijing@--></div> ,显示全部用<!--@FEEDBACK_All@-->
|
|
|
|
|
// 解析结果:<!--@FEEDBACK_Shanghai,Beijing@-->; Shanghai,Beijing
|
|
|
|
|
$feedback_array = [];
|
|
|
|
|
preg_match_all('^<!--@FEEDBACK_(.*)@-->^', $information->ic_content, $feedback_array);
|
|
|
|
|
if (!empty($feedback_array)) {
|
|
|
|
|
foreach ($feedback_array[0] as $index => $tag_name) {
|
|
|
|
|
$city_name_string = $feedback_array[1][$index];
|
|
|
|
|
$feedback_list = $this->Feedback_model->get_CT_feedback_by_cityname($city_name_string,30);
|
|
|
|
|
// 防止触发 Google 网络垃圾政策只返回前三条
|
|
|
|
|
$top3_feedback_list = array_slice($feedback_list, 0, 3);
|
|
|
|
|
$feedback_content = $this->load->view(
|
|
|
|
|
'mobile_first/chinatravel-feedback-list',
|
|
|
|
|
array('feedback_list' => $top3_feedback_list),
|
|
|
|
|
true
|
|
|
|
|
);
|
|
|
|
|
$ic_content = str_replace(
|
|
|
|
|
$tag_name,
|
|
|
|
|
$feedback_content,
|
|
|
|
|
$ic_content
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 动态加载反馈标签,按城市出前三条。整页
|
|
|
|
|
// HTLM: <div><!--@FEEDBACKCROSS_Shanghai,Beijing@--></div> ,显示全部用<!--@FEEDBACK_All@-->
|
|
|
|
|
// 解析结果:<!--@FEEDBACKCROSS_Shanghai,Beijing@-->; Shanghai,Beijing
|
|
|
|
|
$feedback_array = [];
|
|
|
|
|
preg_match_all('^<!--@FEEDBACKCROSS_(.*)@-->^', $information->ic_content, $feedback_array);
|
|
|
|
|
if (!empty($feedback_array)) {
|
|
|
|
|
foreach ($feedback_array[0] as $index => $tag_name) {
|
|
|
|
|
$city_name_string = $feedback_array[1][$index];
|
|
|
|
|
$feedback_list = $this->Feedback_model->get_CT_feedback_by_cityname($city_name_string,30);
|
|
|
|
|
// 防止触发 Google 网络垃圾政策只返回前三条
|
|
|
|
|
$top3_feedback_list = array_slice($feedback_list, 0, 3);
|
|
|
|
|
$feedback_content = $this->load->view(
|
|
|
|
|
'mobile_first/chinatravel-feedback-cross',
|
|
|
|
|
array('feedback_list' => $top3_feedback_list),
|
|
|
|
|
true
|
|
|
|
|
);
|
|
|
|
|
$ic_content = str_replace(
|
|
|
|
|
$tag_name,
|
|
|
|
|
$feedback_content,
|
|
|
|
|
$ic_content
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//图片加延迟
|
|
|
|
|
$ic_content = $this->html_optimize_lib->set_lazy_loader($ic_content, 'https://www.mybeijingchina.com/images/grey.gif');
|
|
|
|
|
|
|
|
|
|
|