• Resolved kamtard

    (@kamtard)


    Hello,
    Do you know how it’s possible to automatically publish pictures in an online nextgen gallery, ONLY with importing pictures in FTP.

    (I do not want to click on “browse the directory and refresh…” in my dashboard)

    It’s very important for me, i need your professional help !
    I am ready to buy a pro version if it’s necessary
    Thank You

    https://www.ads-software.com/plugins/nextgen-gallery/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Benjamin

    (@benjaminowens)

    We don’t currently a method of doing this automatically, but with a little work and the WordPress cron api this could be arranged. The following code will import new images for all of your existing galleries:

    $mapper = C_Gallery_Mapper::get_instance();
    $storage  = C_Gallery_Storage::get_instance();
    foreach ($mapper->find_all() as $gallery) {
        $id = $gallery->{$gallery->id_field};
        $path = $storage->get_gallery_abspath($id);
        nggAdmin::import_gallery($path, $id);
    }
    Thread Starter kamtard

    (@kamtard)

    Thank you for this first aid,

    I hope i’m not abusing if i ask you a little more…
    Need I to just copy this code in a php file ?

    Could you explain me how i could chose the refresh timing (for exemple all hours)

    Benjamin

    (@benjaminowens)

    That’s a little outside of the scope of NextGen, but there’s a few ways to do it. Here is a decent introduction to the WordPress cron layer and how to use it; it should get you started.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘automatic publication by FTP’ is closed to new replies.