Forums

NextGEN Gallery
Auto Publishing/Thumbs? (7 posts)

  1. cogmios
    Member
    Posted 1 year ago #

    I have a "presales" question about nextgen gallery:

    I am thinking of moving from Zenphoto to NextGen.

    Currently my situation is as follows:

    a) I have directories on my NAS called "2006/2006_05-03_.." etc... lots of them about 20.000 pics.
    b) Changes are automatically synced to my hosting directory via a little lftp script (via lftp mirror) that I crontabbed, so that whenever I place a new photo on the nas or change something it auto gets mirrored to the host
    c) Zen automatically shows me the latest stuff and thumbs so people can see the image and image albums (one album per year)

    Can I set this up with NextGen?

    a) I know I can do a and b so that e.g. /domains/bla/html/wp-content/blogs.dir/18/files/ will be the root dir for all the galleries, since I probably can no longer order them by year I will probably have to make a long list of directories, one per gallery

    b) but... can NextGen auto pick up these directories and create thumbs for them?

    c) and auto create albums and gallery pages from these directories?

    so that --> I have the same situation and I do not have to look at the server anymore but just copy my pics to my NAS.

    see: http://edward.de.leau.net/how-we-manage-and-secure-our-digital-photographs-20080508.html

  2. cogmios
    Member
    Posted 1 year ago #

    It seems that I have to create all galleries manually?

    Hmmm...

    1. query the upload directory as defined in nexgen with fallback on wp upload dir
    2. make list of all directories found, exclude the ones that already exist in ngg_gallery table
    3. let user checkbox the ones that he wants to add (since there may be lots of other directories in this upload dir for safety exclude all shorter than 5 characters
    4. choose mass import from pulldown

    for each of the dirs

    5. calculate a slug
    6. run INSERT INTO PREFIX_BLOGID_ngg_gallery (name, slug, path, title, author) VALUES
    ('SLUG',
    'SLUG',
    'wp-content/blogs.dir/BLOGID/files/DIRECTORY',
    'DIRECTORY',
    LOGGED_IN_USER_ID);
    7. get the ID of the record created in 6
    8. Create a page, fill it with "<!--more-->[nggallery id=THE_RECORD_ID]"
    9. update the PREFIX_BLOGID_ngg_gallery with the ID of the just created page
    10. For now I skip the part of auto creating the thumbs the user can click those one by one

    Let's first see how the relation between Album and Gallery is stored, i hope its not 'sortorder' (have not looked in the code yet).

    Unless this already exists in the code or / someone else did this then i would like to know :)

  3. cogmios
    Member
    Posted 1 year ago #

    hey... under tools there is "allow import" ... (!)

    But... it seems to only import 1 folder if it contain images e.g. not:

    2003/2003_our_holiday/day_1/<images>
    2003/2003_our_holiday/day_2/<images>
    2003/2003_christmas/<images>

  4. cogmios
    Member
    Posted 1 year ago #

    So... I need to call import_gallery with a foreach script that will work i think.

  5. cogmios
    Member
    Posted 1 year ago #

  6. qazboy
    Member
    Posted 1 year ago #

    I'm looking for the same function. Have you made any progress? Any thing you are willing to share? I doesn't mater if its user friendly, I be willing to help with php code.

  7. cogmios
    Member
    Posted 1 year ago #

    I did not have time for it yet, I'm working on another plugin (http://wordpress.org/extend/plugins/wp-favicons/) :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.