Changeset 27264 for extensions/UserCollections/include
- Timestamp:
- Feb 8, 2014, 10:38:41 AM (11 years ago)
- Location:
- extensions/UserCollections/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserCollections/include/collections.inc.php
r26854 r27264 23 23 24 24 $template->set_filename('uc_page', realpath(USER_COLLEC_PATH.'template/collections_list.tpl')); 25 26 $self_url = USER_COLLEC_PUBLIC . 'list'; 25 27 26 28 // actions -
extensions/UserCollections/include/display_collections.inc.php
r26854 r27264 29 29 $categories = hash_from_query($query, 'id'); 30 30 31 $template->assign('COLLECTIONS_COUNT', count($categories)); 31 32 // pagination 33 $page['startcat'] = isset($_GET['startcat']) ? $_GET['startcat'] : 0; 34 $page['total_categories'] = count($categories); 35 36 $template->assign('COLLECTIONS_COUNT', $page['total_categories']); 37 38 $categories = array_slice( 39 $categories, 40 $page['startcat'], 41 $conf['nb_categories_page'] 42 ); 32 43 33 44 34 45 // order menu 35 if ( count($categories))46 if ($page['total_categories']) 36 47 { 37 48 $url = add_url_params(USER_COLLEC_PUBLIC, array('uc_collection_order' => '')); … … 55 66 56 67 // collections details 57 if ( count($categories))68 if ($page['total_categories']) 58 69 { 70 $categories_id = array_map(create_function('$c', 'return $c["id"];'), $categories); 71 59 72 $query = ' 60 73 SELECT * FROM ( … … 65 78 INNER JOIN '.COLLECTION_IMAGES_TABLE.' AS ci 66 79 ON i.id = ci.image_id 67 WHERE col_id IN('.implode(',', array_keys($categories)).')80 WHERE col_id IN('.implode(',', $categories_id).') 68 81 ORDER BY ci.add_date DESC 69 82 ) AS t … … 115 128 )); 116 129 130 // navigation bar 131 $page['cats_navigation_bar'] = array(); 132 if ($page['total_categories'] > $conf['nb_categories_page']) 133 { 134 $page['cats_navigation_bar'] = create_navigation_bar( 135 $self_url, 136 $page['total_categories'], 137 $page['startcat'], 138 $conf['nb_categories_page'], 139 false, 'startcat' 140 ); 141 142 $template->assign('cats_navbar', $page['cats_navigation_bar'] ); 143 } 144 117 145 $template->set_filename('index_category_thumbnails', 'mainpage_categories.tpl'); 118 146 $template->assign_var_from_handle('CATEGORIES', 'index_category_thumbnails'); -
extensions/UserCollections/include/display_thumbnails.inc.php
r25678 r27264 74 74 false 75 75 ); 76 $template->assign('navbar', $page['navigation_bar']); 76 77 $template->assign('thumb_navbar', $page['navigation_bar']); 77 78 } 78 79
Note: See TracChangeset
for help on using the changeset viewer.