Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

SPGM (Simple Picture Gallery Manager)

  • 21-09-2006 05:40PM
    #1
    Closed Accounts Posts: 29




    http://spgm.sourceforge.net/

    Has anybody ever incorporated SPGM into their website & then looked and a mod for a admin control panel to upload images from your local drive to the server & also title them, rather than having to use FTP?

    I am trying to ad this mod: http://www.bluepalmtrees.com/spgm/

    However I just can't get it work. I think the problem might lie with my BASE_DIR ..... does this right?

    define("BASE_DIR","http://www.mysite/gallery/gal/");

    Apparently this is the only line one is supposed to edit.

    This is the full PHP code for the admin index page (I think)


    <?php
    $webroot="gal/"; // relative path from admin script to pictures
    define("BASE_DIR","http://www.mysite.com/gallery/gal/"); // absolute path to galleries for spgm
    define("MAX_THUMB_WIDTH",100); // max width for thumbnails
    define("MAX_THUMB_HEIGHT",100); // max height for thumbnails
    define("MAX_IMAGE_WIDTH",640); // max width for displaying image for cropping
    define("MAX_IMAGE_HEIGHT",480); // max height for displaying image for cropping
    define("GAL_FILE","gal-desc.txt"); // where the gallery descriptions are, default to spgm
    define("PIC_FILE","pic-desc.txt"); // where the picture descriptions are, default to spgm
    define("THUMB_PREFIX","thb/"); // thumbnail prefix, _thb_ default to spgm
    define("COLUMNS",4); // the number of thumbs to display per row
    define("JPG_QUALITY",75); // 1-100, typically 75, bigger number = better quality, larger files
    define("LANG",'en'); // defines the language to use, default is english (en)

    // the image types allowed, "type"=>true (1), all lowercase
    $pic_extensions=array("png"=>1,"jpg"=>1,"gif"=>1);
    ?>

    Here are a few comments on this guys page:

    "webroot" - This is the relative path from SPGM Webministration to the base gallery for SPGM. Must end with a "/" and may use the .. directory up notation.
    "BASE_DIR" - This is the absolute path to the gallery on the host filesystem. For example: "C:/wwwroot/photos/gal/" or "/var/html/wwwroot/photos/gal/"


Comments

  • Registered Users, Registered Users 2 Posts: 4,188 ✭✭✭pH


    Looks like BASE_DIR shouldn't be a "http://&quot; type url, rather an absolute path on the server.


  • Closed Accounts Posts: 29 glamourfish


    Yeh I was thinking that might be the case. But not really sure what an absolute path looks like? How do I tell what it is in realtion to the server.
    Sorry I know this must seem like a very stupid question....you live - you learn! :confused:


Advertisement