Add new image folder

You can modify the storeadmin code a bit to allow clients to load images to a directory beyond the catalog image directories. Open the images.php page in the /storeadmin/ folder and change the lines as follows. For this example, we're adding the ability to load images into a /gallery/ folder in the site. Updated for 2.93

  1. Make sure you've loaded the image directory to the site via ftp. For instance, you'll create a /gallery/ folder in the main public folder of the site.

  2. Change the lines:

    ";
    else
    {
    echo "";
    }
    ?>

    to:

    ";
    echo "";
    if ($thumbdir != $imgdir)
    echo "";
    if ($lgimgdir != $imgdir AND $lgimgdir != $thumbdir)
    echo "";
    if ($catimgdir != $imgdir AND $catimgdir != $thumbdir AND $catimgdir != $lgimgdir)
    echo "";
    echo "";
    echo "";
    ?>

    Note: when looking for the above code, previous versions do not have the class="shortinput" part. You can still use the changed code that contains the class.

  3. Add the code:

    if ($imagedir == "gallery")
    {
    echo "Gallery Directory";
    $dirname = "gallery";
    }

    after the lines:

    if ($imagedir == "imgdir")
    {
    echo "General Image Directory";
    $dirname = $imgdir;
    }
  4. Add the code:

    if ($imagedir == "gallery")
    $absdir = "gallery";

    after the lines:

    if ($imagedir == "imgdir")
    $absdir = $imgdir;

    You can change the entries above to match your own directory.

Keep in mind that this will *only* add a new directory to the drop down box in the 'Images' area of the storeadmin section. It does not allow clients to upload images to that directory through the HTML editor.