http://clip2net.com/s/5i8Llp
http://sol.siteproje...rjanedvijimosti
Действительно в консоли ошибки http://clip2net.com/s/5i8N2o
Исправил ошибки, теперь работает!
Но у меня еще один вопрос.
Я импортирую записи из com_mtree в jbzoo, items для JSON формирую вот так:
if(count($_rows)>0){
for($i=0;$i<count($_rows);$i++){
$comments[$i] = array(
"parent_id"=> "0",
"user_id"=> "",
"user_type"=> "",
"author"=> $_rows[$i]['guest_name'],
"email"=> $_rows[$i]['email_message'],
"url"=> "",
"ip"=> "37.56.17.196",
"created"=> $_rows[$i]['rev_date'],
"content"=> '<strong>'.$_rows[$i]['rev_title'].'</strong> '.$_rows[$i]['rev_text'],
"state"=> "1"
);
}
}
//Описание
$elements["3ce3fddc-51f7-455b-bedd-9ad12a9174c2"] = array(
"type"=> "textarea",
"name"=> "Описание",
"data"=> array(
"0"=> array(
"value"=> strip_tags($row->link_desc)
)
)
);
$elements["09aba07d-42c3-473c-b2d4-622e2bae144c"] = array(
"type"=> "image",
"name"=> "Изображение",
"data"=> array(
"file"=> $image,
"title"=> "",
"link"=> "",
"target"=> "0",
"rel"=> "",
"width"=> 150,
"height"=> 50
)
);
//Вид услуги
$elements["5e584081-3c9c-47c5-9003-226352bb2df8"] = array(
"type"=> "select",
"name"=> "Вид услуги",
"data"=> array(
"option"=> $option,
"select"=> "1"
)
);
$elements["894f846d-82a2-47fd-b831-1d2f57898d59"] = array(
"type"=> "textarea",
"name"=> "Адрес",
"data"=> array(
"0"=> array(
"value"=> $row->address
)
)
);
$elements["49350ee6-5faf-4624-bae4-4a2d38526dc6"] = array(
"type"=> "text",
"name"=> "Индекс",
"data"=> array(
"0"=> array(
"value"=> $row->postcode
)
)
);
$elements["a00665fb-0dcb-493b-86f2-0b8d1eaaeece"] = array(
"type"=> "text",
"name"=> "Телефон",
"data"=> array(
"0"=> array(
"value"=> $row->telephone
)
)
);
$elements["d0df15a1-6de6-4a1e-97d9-1d30ae06f501"]= array(
"type"=> "text",
"name"=> "Факс",
"data"=> array(
"0"=> array(
"value"=> $row->fax
)
)
);
$elements["3ab7733c-cafc-4bb3-acb6-c7abeeaadc77"]= array(
"type"=> "email",
"name"=> "E-mail",
"data"=> array(
"0"=> array(
"value"=> $row->email,
"text"=> "",
"subject"=> "",
"body"=> ""
)
)
);
$elements["29a6c287-86a0-4c5a-95d0-12056a21e8d8"]= array(
"type"=> "text",
"name"=> "Вебсайт",
"data"=> array(
"0"=> array(
"value"=> $row->website
)
)
);
/*$elements["d54468ec-da26-40b5-b3b6-5f644350a588"]= array(
"type"=> "text",
"name"=> "Link Rating",
"data"=> array(
"0"=> array(
"value"=> $row->link_rating
)
)
);*/
$elements["dc083da4-080e-43c3-a180-3947b3a36e50"]= array(
"type"=> "rating",
"name"=> "Рейтинг",
"data"=> array(
"votes"=> $row->link_votes,
"value"=> round($row->link_rating, 2)
)
);
$items["items"]["".$alias.""] = array(
"searchable"=> "1",
"state"=> "1",
"created"=> $row->link_created,
"modified"=> $row->link_modified,
"hits"=> "0",
"access"=> "1",
"priority"=> "0",
"publish_up"=> $row->publish_up,
"publish_down"=> "0000-00-00 00:00:00",
"tags"=> array(),
"content"=> null,
"metadata"=> array(
"title"=> "",
"description"=> "",
"keywords"=> "",
"robots"=> "",
"author"=> ""
),
"config"=> array(
"enable_comments"=> "1",
"primary_category"=> $catZoo
),
"categories"=> array($catZoo),
"elements"=> $elements,
"comments"=> $comments,
"group" => "Агенство",
"name" => $row->link_name
);
}
Но почему то не импортируется значение рейтинга, из за чего это может быть если я все верно делаю:
$elements["dc083da4-080e-43c3-a180-3947b3a36e50"]= array(
"type"=> "rating",
"name"=> "Рейтинг",
"data"=> array(
"votes"=> $row->link_votes,
"value"=> round($row->link_rating, 2)
)
);