Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter manupape

    (@manupape)

    please please help me!!!!

    Thread Starter manupape

    (@manupape)

    sorry for third post… but can nobody help me?

    please!!

    For what exact do you need help ? As far as I understand your post ,this is a feature request and not a urgent bug report.

    You will find the media screen in the file admin/media-upload.php inside the plugin folder. There you need to add the button.

    Thread Starter manupape

    (@manupape)

    Hey thx for the responses! I thought that this is the right forum… Now I made it to create the button to the right place, but there isn’t any function. When I click on it, something is loading, but then nothing changed and nothing has been updated!

    I added this code from the manage-images.php file to the media-upload.php next to the “Save changes”-button:

    <input type="submit" class="button-secondary" name="scanfolder" value="<?php _e("Scan Folder for new images",'nggallery')?> " />

    This is how it looks:

    https://www.manupape.de/manu/nextgen3.png

    Has someone an idea how I could do this?

    Greets, Manu!

    ps to alexrabe:
    This feature would make creating a post much easier, if you use ftp-upload for your images.
    It would be great if this function is contained in the next update of NextGEN Gallery!

    I think this is a great idea and would serve to streamline everyones workflow who uploads via ftp (for example directly out of lightroom).

    Thus I made a little hack to accomplish this. I hope, alex will incorporate it in one of the upcoming versions – surely in a neater way.

    So here we go:

    In media-upload.php find the function media_upload_nextgen_form

    Near line 96 insert the code embraced by the comment-block:

    // Get number of images in gallery
    if ($_REQUEST['select_gal']){
        $galleryID = (int) $_REQUEST['select_gal'];
    
        // ---Hack by gwegner.de ----------------------
        // rescans the selected folder for new Images before showing it
        include_once (dirname (__FILE__) . '/functions.php');
        $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID'");
        nggAdmin::import_gallery($gallerypath);
        // --------------------------------------------	
    
        $total = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures WHERE galleryid = '$galleryID'");
    }

    This one will rescan and refresh the gallery every time it is chosen in the WordPress mediauploader.

    Have Fun!

    I currently don’t know why, but unfortunately the hack above is not generating Thumbnails for new images, although the method is being called. Sorry, I’m going to look into it a bit further if time.

    Thread Starter manupape

    (@manupape)

    would be nice… =)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: NextGEN Gallery] idea: Button to refresh picture folder’ is closed to new replies.