|
|
|
@ -1111,10 +1111,13 @@ class Information extends CI_Controller
|
|
|
|
|
$data = $this->Information_model->search_by_words($url, $keywords, $exclude_ids);
|
|
|
|
|
break;
|
|
|
|
|
case 'rule_same_node_random'://同节点随机
|
|
|
|
|
$data = $this->Information_model->random(1, $root_information->is_id, $exclude_ids);
|
|
|
|
|
$data = $this->Information_model->random(1, $root_information->is_path, $exclude_ids);
|
|
|
|
|
break;
|
|
|
|
|
case 'rule_this_node_random'://指定节点下随机
|
|
|
|
|
$data = $this->Information_model->random(1, $recommand->ir_pointer_is_id, $exclude_ids);
|
|
|
|
|
$ir_pointer=$this->Information_model->Detail($recommand->ir_pointer_is_id);
|
|
|
|
|
if(!empty($ir_pointer)){
|
|
|
|
|
$data = $this->Information_model->random(1, $ir_pointer->is_path, $exclude_ids);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'rule_range_random'://范围内随机,同读取备用节点
|
|
|
|
|
break;
|
|
|
|
@ -1185,7 +1188,7 @@ class Information extends CI_Controller
|
|
|
|
|
switch (strtolower($data['type_detail']->ic_url_title)) {
|
|
|
|
|
case 'inspiration':
|
|
|
|
|
//随机获取两个同级节点内容
|
|
|
|
|
$random_array = $this->Information_model->random(2, $data['detail']->is_parent_id, array($data['detail']->is_id));
|
|
|
|
|
$random_array = $this->Information_model->random(2, $data['root_detail']->is_path, array($data['detail']->is_id));
|
|
|
|
|
if (!empty($random_array[0])) {
|
|
|
|
|
$data['info_howtoplan'] = $random_array[0];
|
|
|
|
|
$data['info_howtoplan_root'] = $data['root_detail'];
|
|
|
|
|