[Plugin: NextGEN Gallery ver.1.8.3] Album sort order – new code
-
Hello everybody,
I need sort albums in my page with this code:
[album=1,extended]
I was try apply suggestions from
this posts
but in version 1.8.3 is other code that is described in forum posts.New code in manage-galleries.php show that:
<?php if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); } // *** show main gallery list function nggallery_manage_gallery_main() { global $ngg, $nggdb, $wp_query; //Build the pagination for more than 25 galleries if ( ! isset( $_GET['paged'] ) || $_GET['paged'] < 1 ) $_GET['paged'] = 1; $items_per_page = 25; $start = ( $_GET['paged'] - 1 ) * $items_per_page; $order = ( isset ( $_GET['order'] ) && $_GET['order'] == 'desc' ) ? 'DESC' : 'ASC'; $orderby = ( isset ( $_GET['orderby'] ) && ( in_array( $_GET['orderby'], array('gid', 'title', 'author') )) ) ? $_GET['orderby'] : 'gid'; $gallerylist = $nggdb->find_all_galleries( $orderby, $order , TRUE, $items_per_page, $start, false); $wp_list_table = new _NGG_Galleries_List_Table('nggallery-manage-gallery'); ?>
In this code we can set up number of galleries showed on the page, but … is there a possibility set simple a sort order ?
Or only one possibility is edit nextgen-gallery\lib\ngg-db.php ?
thanks for reply
- The topic ‘[Plugin: NextGEN Gallery ver.1.8.3] Album sort order – new code’ is closed to new replies.