| @@ 26-52 (lines=27) @@ | ||
| 23 | * @param array $options [0] = Nombre maximum de listes à voir, [1] = Type de listes (0 = les 2, 1 = liste cadeaux, 2 = produits recommandés) |
|
| 24 | * @return array |
|
| 25 | */ |
|
| 26 | function b_oledrion_mostviewed_lists_show($options) |
|
| 27 | { |
|
| 28 | require XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php'; |
|
| 29 | Oledrion_utils::loadLanguageFile('main.php'); |
|
| 30 | $start = 0; |
|
| 31 | $limit = (int)$options[0]; |
|
| 32 | $listType = (int)$options[1]; |
|
| 33 | $block = array(); |
|
| 34 | $handlers = OledrionHandler::getInstance(); |
|
| 35 | $items = array(); |
|
| 36 | //$items = $handlers->h_oledrion_lists->getRecentLists(new Oledrion_parameters(array('start' => $start, 'limit' => $limit, 'sort' => 'list_views', 'order' => 'DESC', 'idAsKey' => true, 'listType' => $listType))); |
|
| 37 | $items = $handlers->h_oledrion_lists->getRecentLists(new Oledrion_parameters(array( |
|
| 38 | 'start' => $start, |
|
| 39 | 'limit' => $limit, |
|
| 40 | 'sort' => 'list_views', |
|
| 41 | 'order' => 'DESC', |
|
| 42 | 'idAsKey' => true, |
|
| 43 | 'listType' => OLEDRION_LISTS_ALL_PUBLIC |
|
| 44 | ))); |
|
| 45 | if (count($items) > 0) { |
|
| 46 | foreach ($items as $item) { |
|
| 47 | $block['mostviewd_lists'][] = $item->toArray(); |
|
| 48 | } |
|
| 49 | } |
|
| 50 | ||
| 51 | return $block; |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * Edition des paramètres du bloc |
|
| @@ 26-52 (lines=27) @@ | ||
| 23 | * @param array $options [0] = Nombre maximum de listes à voir, [1] = Type de listes (0 = les 2, 1 = liste cadeaux, 2 = produits recommandés) |
|
| 24 | * @return array |
|
| 25 | */ |
|
| 26 | function b_oledrion_random_lists_show($options) |
|
| 27 | { |
|
| 28 | require XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php'; |
|
| 29 | Oledrion_utils::loadLanguageFile('main.php'); |
|
| 30 | $start = 0; |
|
| 31 | $limit = (int)$options[0]; |
|
| 32 | $listType = (int)$options[1]; |
|
| 33 | $block = array(); |
|
| 34 | $handlers = OledrionHandler::getInstance(); |
|
| 35 | $items = array(); |
|
| 36 | //$items = $handlers->h_oledrion_lists->getRecentLists(new Oledrion_parameters(array('start' => $start, 'limit' => $limit, 'sort' => 'RAND()', 'order' => 'DESC', 'idAsKey' => true, 'listType' => $listType))); |
|
| 37 | $items = $handlers->h_oledrion_lists->getRecentLists(new Oledrion_parameters(array( |
|
| 38 | 'start' => $start, |
|
| 39 | 'limit' => $limit, |
|
| 40 | 'sort' => 'RAND()', |
|
| 41 | 'order' => 'DESC', |
|
| 42 | 'idAsKey' => true, |
|
| 43 | 'listType' => OLEDRION_LISTS_ALL_PUBLIC |
|
| 44 | ))); |
|
| 45 | if (count($items) > 0) { |
|
| 46 | foreach ($items as $item) { |
|
| 47 | $block['random_lists'][] = $item->toArray(); |
|
| 48 | } |
|
| 49 | } |
|
| 50 | ||
| 51 | return $block; |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * Edition des paramètres du bloc |
|
| @@ 25-51 (lines=27) @@ | ||
| 22 | * @param array $options [0] = Nombre maximum de listes à voir, [1] = Type de listes (0 = les 2, 1 = liste cadeaux, 2 = produits recommandés) |
|
| 23 | * @return array |
|
| 24 | */ |
|
| 25 | function b_oledrion_recent_lists_show($options) |
|
| 26 | { |
|
| 27 | require XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php'; |
|
| 28 | Oledrion_utils::loadLanguageFile('main.php'); |
|
| 29 | $start = 0; |
|
| 30 | $limit = (int)$options[0]; |
|
| 31 | $listType = (int)$options[1]; |
|
| 32 | $block = array(); |
|
| 33 | $handlers = OledrionHandler::getInstance(); |
|
| 34 | $items = array(); |
|
| 35 | //$items = $handlers->h_oledrion_lists->getRecentLists(new Oledrion_parameters(array('start' => $start, 'limit' => $limit, 'sort' => 'list_date', 'order' => 'DESC', 'idAsKey' => true, 'listType' => $listType))); |
|
| 36 | $items = $handlers->h_oledrion_lists->getRecentLists(new Oledrion_parameters(array( |
|
| 37 | 'start' => $start, |
|
| 38 | 'limit' => $limit, |
|
| 39 | 'sort' => 'list_date', |
|
| 40 | 'order' => 'DESC', |
|
| 41 | 'idAsKey' => true, |
|
| 42 | 'listType' => OLEDRION_LISTS_ALL_PUBLIC |
|
| 43 | ))); |
|
| 44 | if (count($items) > 0) { |
|
| 45 | foreach ($items as $item) { |
|
| 46 | $block['recent_lists'][] = $item->toArray(); |
|
| 47 | } |
|
| 48 | } |
|
| 49 | ||
| 50 | return $block; |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Edition des paramètres du bloc |
|