• Resolved cellobella

    (@cellobella)


    I’ve just installed lazy gallery and my folders and images seem to be displaying in a somewhat random fashion. I named the files/folders using dates so (I hoped) the files would appear in order on the webpage.

    Has anyone come across this problem and worked out a way of forcing LG to publish the folders in a logical way?

Viewing 2 replies - 1 through 2 (of 2 total)
  • What version did you install as there are several variations?

    Thread Starter cellobella

    (@cellobella)

    Version 0.4

    But, I did “phone a friend” who made me this little fix!

    Insert into the lazy-gallery.php page…

    New code in bold.

    function showDirs() {

    global $gallery_root, $currentdir, $file, $excluded_folders;
    $runonce = false;
    if ($dir_content = opendir($gallery_root.$currentdir)) {

    while ( false !== ($dir = readdir($dir_content)) ) {
    if (is_dir($gallery_root.$currentdir.$dir) && !in_array($dir, $excluded_folders) && $dir!=’.’ && $dir!=’..’ ) {
    $dirs[] = $dir;
    }
    }
    }
    if(isset($dirs))
    {
    sort($dirs);
    foreach($dirs as $dir)
    {

    if ( !$runonce ){
    echo ‘<div class=”folders”><br/>Folders<br/>’;
    $runonce = true;

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Lazy Gallery – help required to get gallery to publish in date order’ is closed to new replies.