[2023-01-23] 4images 1.10 released
0 Members and 1 Guest are viewing this topic.
ok it should be cat_page, like it is.is it correct like thatdomain/categories.php?cat_id=0&cat_page=2cat_id is everytime 0 is this correct?
$total = count($visible_cat_cache);
$total = sizeof($visible_cat_cache);
global $site_template, $site_db, $site_sess, $config, $lang, $HTTP_GET_VARS;
foreach ($visible_cat_cache as $key => $category_id) {
foreach ($cache as $category_id){
i can't see the categories
Correct. It has to stay with the $visible_cat_cache.
Find:Code:foreach ($visible_cat_cache as $key => $category_id) {Replace with:Code:foreach ($cache as $category_id){
$total = sizeof($visible_cat_cache);//Begin configuration:$perpage = 3; //how many categories per page$cat_text = "Found {total_cat_images} categories on {total_pages} page(s). Displayed category {first_page} to {last_page}";//u can use those tags://{total_cat_images} - total categories//{total_pages} - total pages//{first_page} - displayed from (number first category displayed)//{last_page} - displayed to (number last category displayed)//End configuration$page = (isset($HTTP_GET_VARS['cat_page'])) ? $HTTP_GET_VARS['cat_page'] : 0;if (!class_exists(Paging)) {include(ROOT_PATH.'includes/paging.php');}$link_arg = $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id);$getpaging = new Paging($page, $perpage, $total, $link_arg, $cat_text, "", "cat_page");$offset = $getpaging->get_offset();$limit = ($offset + $perpage > $total) ? $total : $offset + $perpage - 1;$total = $limit - $offset;$site_template->register_vars(array( "cat_paging" => $getpaging->get_paging(), "cat_paging_stats" => $getpaging->get_paging_stats()));$cache = array();$i = 0;foreach ($visible_cat_cache as $key => $category_id) {if ($i >= $offset && $i <= $limit) {$cache[] = $category_id; $cache_sql .= (($cache_sql != "") ? ", " : "").$category_id;}$i++;}$total = count($cache);//END MOD category for each page
foreach ($visible_cat_cache as $category_id){