• I’m trying to use the autogallery image plugin by Kyrre Baker. I’m having problems following the supplied setup instructions which I have included below:
    ==============================================
    Installation:

    1. Upload to foo.bar/wp-content/plugins/
    2. Activate in WordPress

    Usage:

    1. Drop Your images into
    /[images-root]/[article-id]/
    2. Insert “gallery” with <!–gallery–> in Your article.

    Files with “prefix” (-) is thumbnails and files widhout “prefix” is linked.

    Example:

    /[images-root]/[article-id]/
    150-picture_one.jpg
    picture_one.jpg
    ==============================================
    Settings in lines 16 – 19 Read and change before use!(extracted from autogallery.php)
    ==============================================
    // Settings start

    $usehostname = “yes”; // If You want to use the hostname in image-URLs set to yes.
    $image_root = “/files/”; // Set this to Your image-root.
    $thumbnail_prefix = “^(150|thumbs|thumb)\-“; // Your thumbnail-prefixes as “regexp”
    $allowed_files = “(jpg|png|gif)”; // Allowed files as “regexp”.

    // Settings end
    ==============================================

    Could someone help me figure out how to configure this plugin to work? What does the author mean by “Drop Your images into
    /[images-root]/[article-id]/”?

    Also, how should “$image_root = “/files/”; // Set this to Your image-root.” be setup?

    My WP installation is on the root directory. Any and all feedback is much appreciated!

    Thanks,
    -SS

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve made some comments on the author’s site. Basically, $image_root is the web path to the images (i.e. for https://www.example.com/images/, $image_root is /images/) The article-id is just that, the article id (it is the first column in the list of posts on the post management page from wp-admin).
    The script tries to guess the real filesystem path where the images are by appending $image_root to the document root. Depending on your configuration, this may fail (/~username setup, mod_rewrite, etc.). To fix it, all you need to do is comment out or remove the line that says
    $searchdir = $_SERVER["DOCUMENT_ROOT"].$filedir;
    and replace it with
    $searchdir = "$searchdir/$id/";
    where $searchdir is the real filesystem path where your pictures are located (like /var/www/hosts/www.example.com/pictures or /home/user/public_html/pictures).

    Thread Starter seldomstatic

    (@seldomstatic)

    Thanks for the feedback. Unfortunately, I still haven’t been able to successfully configure this plugin. Here is what I have so far:

    // Settings start

    $usehostname = “yes”; // If You want to use the hostname in image-URLs set to yes.
    $image_root = “/images/”; // Set this to Your image-root.
    $thumbnail_prefix = “^(150|thumbs|thumb)\-“; // Your thumbnail-prefixes as “regexp”
    $allowed_files = “(jpg|png|gif)”; // Allowed files as “regexp”.

    // Settings end

    if ($usehostname == “yes”) {
    $usehost = “https://&#8221;.$_SERVER[“HTTP_HOST”];
    }

    $filedir = $image_root.$id.”/”;
    $searchdir = “/public_html/images/$id/”;
    ====================================================

    For demonstration purposes only, I will be using post #41. With that said, I created a directory within the images directory such as “/public_html/images/41”. I FTP’d the jpeg into this directory such as “/public_html/images/41/example.jpg

    Should it work?

    Thanks again,
    -SS

    Almost. If You upload the thumbnail to it should.

    “/public_html/images/41/150_example.jpg
    “/public_html/images/41/example.jpg

    someone please help us understand.
    what does the author mean by:
    1. Drop Your images into
    /[images-root]/[article-id]/

    For example, if my image directory is ‘images’ and I’m posting what wordpress gave ID number: 19
    does that mean we should open a new browser window, and type the URL to domain.com/images/19 (19 doesnt exist anyhow)??
    or does he means we should create a subdirectory and name it 19, under ‘images’ directory?
    is it that complicated?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘autogallery image plugin help’ is closed to new replies.