WordPress.org

Ready to get started?Download WordPress

Forums

Eazyest Gallery
Eazyest_FolderBase::get_folder_images() (1 post)

  1. n0ll
    Member
    Posted 5 months ago #

    I recently put up a test installation of my blog at photo.mjsb.eu, using eazyest-gallery. After some configuration issues and fixing directory permissions it works quite well.

    WordPress 3.7.1
    Eazyest-Gallery 0.1.3
    http://photo.mjsb.eu/blog/gallery2/

    When browsing thru the full screen pages with previous/next I noticed that the order was somewhat random, not in alphabetical or any other order. Digging thru the code I found that Eazyest_FolderBase::get_folder_images() just returns the files in readdir() order and doesn't sort.

    So in my installation I changed the code as follows:

    --- _ORIG_class-eazyest-folderbase.php	2013-11-01 16:52:53.000000000 +0100
    +++ class-eazyest-folderbase.php	2013-11-01 14:45:40.000000000 +0100
    @@ -1481,8 +1481,11 @@
           @closedir( $dir_content );
     		} else {
     	    return false;
    -		}
    -    return $this->folder_images['images'];
    +		}
    +		/**MJ: sort directory content**/
    +		sort($this->folder_images['images']);
    +		/**MJ**/
    +		return $this->folder_images['images'];
     	}
    
     	/**

    May I suggest to include this in the release?

    http://wordpress.org/plugins/eazyest-gallery/

Reply

You must log in to post.

About this Plugin

About this Topic