Support » Plugin: Add From Server » Change sort order of files to newest on top

  • Super excellent plugin. I just escaped nggallery and wordtube with it. 1000’s of files.

    Is there a way to change the default sort order from “filename” to “date modified or created” to be on top.

    Reason is I have a default folder for video. As I dump new ones in it would be easier/faster if those new files showed on the top(or bottom even, just so they are grouped) of the list and i could just check those off.

    Hope you understand


Viewing 1 replies (of 1 total)
  • Just a P.S..

    I can kinda cowboy code.

    I figure its something around line #572 in class-add-from-server


    This is what I used to grab the caption from nggallery:
    start @ line #370

    $basefilen = basename($file);
    		$capsion = "";
    		global $wpdb;
    		$capsion = $wpdb->get_results( "SELECT * FROM wp_ngg_pictures WHERE filename LIKE '$basefilen'") ;
    		foreach ( $capsion as $capp ) {
    		$capttion = esc_attr( stripslashes($capp->description) );
    		// Construct the attachment array
    		$attachment = array(
    			'post_mime_type' => $type,
    			'guid' => $url,
    			'post_parent' => $post_id,
    			'post_title' => $title,
    			'post_name' => $title,
    			'post_content' => $capttion,
    			'post_excerpt' => $capttion,
    			'post_date' => $post_date,
    			'post_date_gmt' => $post_date_gmt


Viewing 1 replies (of 1 total)
  • The topic ‘Change sort order of files to newest on top’ is closed to new replies.