diff --git a/system/admin/admin.php b/system/admin/admin.php index 2543fed..dabc20a 100644 --- a/system/admin/admin.php +++ b/system/admin/admin.php @@ -1009,9 +1009,9 @@ function find_draft_page($static = null) $posts = get_draft_pages(); $tmp = array(); - + $counter = config('views.counter'); - + if ($counter == 'true') { $viewsFile = "content/data/views.json"; if (file_exists($viewsFile)) { @@ -1079,9 +1079,9 @@ function find_draft_subpage($static = null, $sub_static = null) $posts = get_draft_subpages($static); $tmp = array(); - + $counter = config('views.counter'); - + if ($counter == 'true') { $viewsFile = "content/data/views.json"; if (file_exists($viewsFile)) { @@ -1626,3 +1626,27 @@ function reorder_subpages($subpages = null) rebuilt_cache(); } + +// Return image gallery in pager. +function image_gallery($images, $page = 1, $perpage = 0) +{ + if (empty($images)) { + $images = get_gallery(); + } + $pagination = has_pagination(count($images), $perpage, $page); + $tmp = ''; + $images = array_slice($images, ($page - 1) * $perpage, $perpage); + $tmp .= '