diff --git a/application/controllers/information.php b/application/controllers/information.php
index f1a0f8c4..af54c85d 100644
--- a/application/controllers/information.php
+++ b/application/controllers/information.php
@@ -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'];
diff --git a/application/models/information_model.php b/application/models/information_model.php
index 159054dc..32d59ffb 100644
--- a/application/models/information_model.php
+++ b/application/models/information_model.php
@@ -94,10 +94,11 @@ class Information_model extends CI_Model {
}
//在同级别下,随机获取N条数据,并且排除某些id
- function random($topnum,$is_parent_id,array $exclude_ids){
+ function random($topnum,$is_path,array $exclude_ids){
$this->init();
$this->topNum = $topnum;
- $this->search = " AND is_parent_id =". $this->HT->escape($is_parent_id);
+ $this->search = " AND is1.is_path LIKE '$is_path%' ";
+ //$this->search = " AND is_parent_id =". $this->HT->escape($is_parent_id);
$exclude_ids_string=implode(',',$exclude_ids);
$this->search .= " AND ic_status=1 AND is_id NOT in ($exclude_ids_string,0)";
$this->orderBy = " ORDER BY NewID() ";
diff --git a/application/third_party/recommend/views/bind.php b/application/third_party/recommend/views/bind.php
index 3a1cf2ef..d0788a99 100644
--- a/application/third_party/recommend/views/bind.php
+++ b/application/third_party/recommend/views/bind.php
@@ -8,8 +8,216 @@
-
文章内容
+
文章内容 <!--@Content-Recommends-Tips@-->
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Article A']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Article B']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Article C']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Article D']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Article E']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Article F']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Article G']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Article H']->ir_keyword; ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Tour A']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Tour B']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Tour C']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Tour D']->ir_keyword; ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Tour E']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Tour F']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Tour G']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Content Tour H']->ir_keyword; ?>
+
+
+
+
+
+
+
@@ -22,12 +230,13 @@
>
- ir_rule; ?>
+ ir_rule; ?>
+
@@ -37,7 +246,7 @@
>
- ir_rule.'
'.$recommends['Article A']->ir_keyword; ?>
+ ir_rule . '
' . $recommends['Article A']->ir_keyword; ?>
@@ -49,7 +258,7 @@
>
- ir_rule.'
'.$recommends['Article B']->ir_keyword; ?>
+ ir_rule . '
' . $recommends['Article B']->ir_keyword; ?>
@@ -61,7 +270,7 @@
>
- ir_rule.'
'.$recommends['Article C']->ir_keyword; ?>
+ ir_rule . '
' . $recommends['Article C']->ir_keyword; ?>
@@ -73,14 +282,66 @@
>
- ir_rule.'
'.$recommends['Article D']->ir_keyword; ?>
+ ir_rule . '
' . $recommends['Article D']->ir_keyword; ?>
-
+
+
+
+
+
+ ir_rule . '
' . $recommends['Article E']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Article F']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Article G']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Article H']->ir_keyword; ?>
+
+
+
+
+
+
+
@@ -91,7 +352,7 @@
>
- ir_rule.'
'.$recommends['Tour A']->ir_keyword; ?>
+ ir_rule . '
' . $recommends['Tour A']->ir_keyword; ?>
@@ -103,7 +364,7 @@
>
- ir_rule.'
'.$recommends['Tour B']->ir_keyword; ?>
+ ir_rule . '
' . $recommends['Tour B']->ir_keyword; ?>
@@ -115,7 +376,7 @@
>
- ir_rule.'
'.$recommends['Tour C']->ir_keyword; ?>
+ ir_rule . '
' . $recommends['Tour C']->ir_keyword; ?>
@@ -126,12 +387,65 @@
onclick="show_bind_info(is_id; ?>,'Tour D')">
- ir_rule.'
'.$recommends['Tour D']->ir_keyword; ?>
+ ir_rule . '
' . $recommends['Tour D']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Tour E']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Tour F']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Tour G']->ir_keyword; ?>
+
+
+
+
+
+
+
+ ir_rule . '
' . $recommends['Tour H']->ir_keyword; ?>
+
+
+
+
+
+
@@ -154,8 +468,6 @@