Options

Announcing: SmugMugViewer

andrewshillidayandrewshilliday Registered Users Posts: 10 Big grins
Announcing SmugMugViewer

SmugMugViewer is free software that allows you to view SmugMug photo albums using the flash-based image viewer, SimpleViewer, which can be embedded easily in your own webpage. This means that instead of having simpleviewer show images housed on your own webserver, you can have it use a SmugMug album where changes to that album are automatically reflected in simpleviewer. This is very handy for professional photographers who want to maintain their own website but still want to manage their portfolios display on that site in SmugMug.

It's a very simple php file, thanks mostly due to Colin Seymour's phpSmug which makes all things SmugMug and PHP very easy.

Come check it out! http://www.shillidayphotography.com/SmugMugViewer/

Comments

  • Options
    nicoleshillidaynicoleshilliday Registered Users Posts: 549 Major grins
    edited July 12, 2008
    As the Photographer/Wife of Andrew, i feel like i have to share how much i love what he did with the simpleviewer. iloveyou.gif

    He is currently working on his Ph.D and doesn't have time to help me with my website at any moment of the day. (And i have no idea how to do any of it!). This way I can add/change any photo on the website whenever I want by simply changing a gallery in SmugMug. wings.gif

    The action is live now on our website and i was up late last night moving around pictures.... you can check it out at www.shillidayphotography.com

    Yeh for IT guys who are also your husband!
    Nicole
    D3, and other Nikon goodies
    Shilliday Photography
    Blog
    Facebook
  • Options
    HallidayHalliday Registered Users Posts: 149 Major grins
    edited July 12, 2008
    Cool. It looks good but I can't see a way to order prints online. That's one of the best features of SM.
    www.lanceshuey.com

    I won't sell out even if the whole world think's I'm crazy.
  • Options
    nicoleshillidaynicoleshilliday Registered Users Posts: 549 Major grins
    edited July 12, 2008
    Halliday wrote:
    Cool. It looks good but I can't see a way to order prints online. That's one of the best features of SM.

    This is not a program that is substituting SmugMug. We have a regular website which we are now using the program above to add/change the content and a proofs site that we use SmugMug for. We do not use SM as our main website.
    Nicole
    D3, and other Nikon goodies
    Shilliday Photography
    Blog
    Facebook
  • Options
    andrewshillidayandrewshilliday Registered Users Posts: 10 Big grins
    edited July 13, 2008
    Yeah, for our own purposes, this is useful for our portfolios (we would not expect people to be buying prints of the images there; we just need a nice way to show the pictures). When the proofs are offered to our clients, we still use the regular SmugMug pages so prints can be purchased.
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited July 13, 2008
    G'day Andrew,

    Looks very cool... I thought about doing this some time ago, but I never got around to it.

    Nice work.

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    nanoqnanoq Registered Users Posts: 2 Beginner grinner
    edited July 19, 2008
    Having som beginners hurdle
    I've tried to setup my SmugViewerPHP but can't seam to get it right.
    Does anyone have a fully premade setup so that I can se what I'm doing wrong?

    After trying diff. solutions and setups I end up with this message in my browser:

    Fatal error: Call to undefined method HTTP_Request::getMessage() in /home2/ner3w7tu/public_html/webapps/phpsmug/phpSmug.php on line 323

    And all I can se is that it shiuld relate to my paths. But I can't seam to get the right one in place.
  • Options
    andrewshillidayandrewshilliday Registered Users Posts: 10 Big grins
    edited July 20, 2008
    nanoq wrote:
    I've tried to setup my SmugViewerPHP but can't seam to get it right.
    Does anyone have a fully premade setup so that I can se what I'm doing wrong?

    After trying diff. solutions and setups I end up with this message in my browser:

    Fatal error: Call to undefined method HTTP_Request::getMessage() in /home2/ner3w7tu/public_html/webapps/phpsmug/phpSmug.php on line 323

    And all I can se is that it shiuld relate to my paths. But I can't seam to get the right one in place.

    The first thing that comes to mind is that perhaps you have downloaded the wrong version of phpSmug. On their website, there are two versions; be sure to use 1.0.10 (the other version is for the 1.2.1 of the Smug Mug API which is still in beta). If that's not it, let me know and I can help you find what's wrong. I do have a working setup on my server (the demo that you see on the project page uses it) and I can run you through exactly how it's set up. This may simply reflect some bad explanation in my instructions, so I'll be happy to help.

    One final note, sinse the error is in phpSmug, it's less likely that it's a path problem. Clearly the phpSmug code *is* being loaded --- at least in part.


    Update: Actually, I've changed my mind... it probably *is* a path problem. phpSmug requires PEAR, but the way it loads it makes it so that if there is another installation of PEAR already on the server, it will use that instead. This shouldn't really be a problem, but then again I really don't know anything about pear. Open the phpSmug.php file and find the line
    ini_set('include_path', ini_get('include_path') . $path_delimiter . dirname(__FILE__) . '/PEAR');

    Try changing it so that the local copy is earlier on the path (as suggested by the comment above the line). E.g.,
    ini_set('include_path', dirname(__FILE__) . '/PEAR' . $path_delimiter . ini_get('include_path'));


    //Andrew
  • Options
    nanoqnanoq Registered Users Posts: 2 Beginner grinner
    edited July 21, 2008
    The first thing that comes to mind is that perhaps you have downloaded the wrong version of phpSmug. On their website, there are two versions; be sure to use 1.0.10 (the other version is for the 1.2.1 of the Smug Mug API which is still in beta). If that's not it, let me know and I can help you find what's wrong. I do have a working setup on my server (the demo that you see on the project page uses it) and I can run you through exactly how it's set up. This may simply reflect some bad explanation in my instructions, so I'll be happy to help.

    One final note, sinse the error is in phpSmug, it's less likely that it's a path problem. Clearly the phpSmug code *is* being loaded --- at least in part.


    Update: Actually, I've changed my mind... it probably *is* a path problem. phpSmug requires PEAR, but the way it loads it makes it so that if there is another installation of PEAR already on the server, it will use that instead. This shouldn't really be a problem, but then again I really don't know anything about pear. Open the phpSmug.php file and find the line
    ini_set('include_path', ini_get('include_path') . $path_delimiter . dirname(__FILE__) . '/PEAR');

    Try changing it so that the local copy is earlier on the path (as suggested by the comment above the line). E.g.,
    ini_set('include_path', dirname(__FILE__) . '/PEAR' . $path_delimiter . ini_get('include_path'));


    //Andrew

    Thankyou very much for the guidelines. My phpSmug.pgp is version 1.0.10, it's the only version I've ever downloaded. I tried to change the parameters you discribed but now I get the following fail mesage:

    Warning: phpSmug::require_once(HTTP/Request.php) URL="http://klyhnorkild.dk/webapps/function.phpSmug-require-once"]function.phpSmug-require-once[/URL: failed to open stream: No such file or directory in /home2/ner3w7tu/public_html/webapps/phpsmug/phpSmug.php on line 120

    Fatal error: phpSmug::require_once() URL="http://klyhnorkild.dk/webapps/function.require"]function.require[/URL: Failed opening required 'HTTP/Request.php' (include_path='/home2/ner3w7tu/public_html/webapps/phpsmug:.:/usr/lib/php:/usr/local/lib/php/PEAR') in /home2/ner3w7tu/public_html/webapps/phpsmug/phpSmug.php on line 120

    So it hasen't solve my situation.
    I'm open for any more Idea´s to a solution for me?
  • Options
    andrewshillidayandrewshilliday Registered Users Posts: 10 Big grins
    edited July 21, 2008
    nanoq wrote:
    Thankyou very much for the guidelines. My phpSmug.pgp is version 1.0.10, it's the only version I've ever downloaded. I tried to change the parameters you discribed but now I get the following fail mesage:

    Warning: phpSmug::require_once(HTTP/Request.php) URL="http://klyhnorkild.dk/webapps/function.phpSmug-require-once"]function.phpSmug-require-once[/URL: failed to open stream: No such file or directory in /home2/ner3w7tu/public_html/webapps/phpsmug/phpSmug.php on line 120

    Fatal error: phpSmug::require_once() URL="http://klyhnorkild.dk/webapps/function.require"]function.require[/URL: Failed opening required 'HTTP/Request.php' (include_path='/home2/ner3w7tu/public_html/webapps/phpsmug:.:/usr/lib/php:/usr/local/lib/php/PEAR') in /home2/ner3w7tu/public_html/webapps/phpsmug/phpSmug.php on line 120

    So it hasen't solve my situation.
    I'm open for any more Idea´s to a solution for me?

    Still taking stabs in the dark here, but are you sure you correctly changed the line in the phpSmug.php file? I ask because the fatal error suggests that the path is not set correctly. I would expect the path to be
    (include_path='/home2/ner3w7tu/public_html/webapps/phpsmug/PEAR:.:/usr/lib/php:/usr/local/lib/php/PEAR')

    but according to the error, it is only
    (include_path='/home2/ner3w7tu/public_html/webapps/phpsmug:.:/usr/lib/php:/usr/local/lib/php/PEAR')

    Notice that the first entry in the include_path above does not have the trailing "/PEAR" (although it should if the local PEAR is to be loaded).


    If that fails, there is another option: There are only two lines in the phpSmug.php code where PEAR code is loaded. They are:
    require_once 'HTTP/Request.php';
    require_once 'DB.php';

    You could manually change these to
    require_once 'PEAR/HTTP/Request.php';
    require_once 'PEAR/DB.php';
    and then just comment out the line you changed before.

    If that doesn't work, I'd suggest talking to Colin, the guy who wrote phpSmug. He might be more helpful. http://www.colinseymour.co.uk/colophon/
  • Options
    darryldarryl Registered Users Posts: 997 Major grins
    edited July 26, 2008
    Andrew: Thanks for reminding me that I started a similar project a few months ago. I finally got around to finishing it a few days ago:

    SmugTight:
    http://www.dgrin.com/showthread.php?t=100780

    I'm parsing the RSS feeds for an album (or photo RSS feed), and converting them into the gallery.xml format for SimpleViewer (and the other Airtight "Viewers").

    Oooh, nice trick for actually serving up the thumbs instead of my laziness of just serving the Medium sized images for both the images and thumbs. I may have to try incorporating that into my script.
  • Options
    lildudelildude Registered Users Posts: 70 Big grins
    edited August 16, 2008
    nanoq wrote:
    I've tried to setup my SmugViewerPHP but can't seam to get it right.
    Does anyone have a fully premade setup so that I can se what I'm doing wrong?

    After trying diff. solutions and setups I end up with this message in my browser:

    Fatal error: Call to undefined method HTTP_Request::getMessage() in /home2/ner3w7tu/public_html/webapps/phpsmug/phpSmug.php on line 323

    And all I can se is that it shiuld relate to my paths. But I can't seam to get the right one in place.

    Hi guys.

    Sorry I'm so late to the party on this one.

    nanoq: your issue isn't a path issue. It's a network related issue, but you do appear to have spotted a bug in phpSmug.

    Essentially you are getting this error because your server can't contact the web server (SmugMug API endpoint) on the other end for some reason.

    The "getMessage()" should be telling you why and this is where the problem is in phpSmug. (My testing has always had a successful HTTP response mwink.gif )

    I'm actually in the process of rewriting phpSmug so will hopefully iron out this one. All I need to do is find a reliable way of forcing a HTTP request failure so I can test this part of the code.

    In the mean time check that your web server can access remote machines. I suspect you may be behind a firewall or proxy server.

    If behind a proxy, you should be able to modify the Andrews code to include a call to phpSmug's setProxy() method to set your proxy details.

    If you're behind a firewall, then you'll need to open up port 80.

    HTH
    Colin
  • Options
    nervranervra Registered Users Posts: 16 Big grins
    edited October 13, 2008
    Very frustrating...
    Wow...I really love this tool and would like to implement it to my site, but it seems to be a little over my head. I've downloaded Simpleviewer and phpSmug and have stored on in my own storage on a server, but I have no idea what to do next. Please help...
  • Options
    andrewshillidayandrewshilliday Registered Users Posts: 10 Big grins
    edited October 13, 2008
    nervra wrote:
    Wow...I really love this tool and would like to implement it to my site, but it seems to be a little over my head. I've downloaded Simpleviewer and phpSmug and have stored on in my own storage on a server, but I have no idea what to do next. Please help...


    What's the problem you're having?
  • Options
    nervranervra Registered Users Posts: 16 Big grins
    edited October 13, 2008
    Here is what I have done so far:

    1. Stored simpleviewer.swf into my storage
    2. Stored phpSmug (with updated configuration) into my storage
    3.I dont know the coding to embed the viewer into my html page.

    To my understanding, thats all there is to it. I just dont know how to implement the viewer into my html page
  • Options
    nervranervra Registered Users Posts: 16 Big grins
    edited October 14, 2008
    alright...finally embedded the script into my HTML page, but now i get this problem...

    Warning: require_once() URL="http://radcaptures.com/function.require-once"]function.require-once[/URL: URL file-access is disabled in the server configuration in /home/content/r/a/c/racain/html/SmugMugViewer.php on line 164

    Warning: require_once(http://radcaptures.com/phpSmug.php) URL="http://radcaptures.com/function.require-once"]function.require-once[/URL: failed to open stream: no suitable wrapper could be found in /home/content/r/a/c/racain/html/SmugMugViewer.php on line 164

    Fatal error: require_once() URL="http://radcaptures.com/function.require"]function.require[/URL: Failed opening required 'http://radcaptures.com/phpSmug.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/r/a/c/racain/html/SmugMugViewer.php on line 164



    After some researching, my host godaddy does not allow this. Any suggestions on what I can do?
  • Options
    andrewshillidayandrewshilliday Registered Users Posts: 10 Big grins
    edited October 16, 2008
    nervra wrote:
    alright...finally embedded the script into my HTML page, but now i get this problem...

    Warning: require_once() URL="http://radcaptures.com/function.require-once"]function.require-once[/URL: URL file-access is disabled in the server configuration in /home/content/r/a/c/racain/html/SmugMugViewer.php on line 164

    Warning: require_once(http://radcaptures.com/phpSmug.php) URL="http://radcaptures.com/function.require-once"]function.require-once[/URL: failed to open stream: no suitable wrapper could be found in /home/content/r/a/c/racain/html/SmugMugViewer.php on line 164

    Fatal error: require_once() URL="http://radcaptures.com/function.require"]function.require[/URL: Failed opening required 'http://radcaptures.com/phpSmug.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/r/a/c/racain/html/SmugMugViewer.php on line 164



    After some researching, my host godaddy does not allow this. Any suggestions on what I can do?


    It's suggestive that the error says: require_once(http://radcaptures.com/phpSmug.php). To me this indicates that you sending the full URL for the phpSmug.php file instead of just referencing the local file. What did you put in for line 40 of SmugMugViewer.php where it asks for the phpsmug location. If, for example, it looks like this:
    $phpSmugLocation = 'http://radcaptures.com/phpSmug.php';
    then you may be able to fix it by setting it to
    $phpSmugLocation = 'phpSmug.php';
    instead (I'm assuming that the phpSmug.php and SmugMugViewer.php code are in the same directory, which it seems to be after a quick glance at your website).

    Of course, as you suggested, this may be a problem with your server not allowing the php code to exec the response from the SmugMug API, in which case you may be dead in the water. I believe (though I'm not certain of this) that the phpSmug code execs the php-formatted response from SmugMug which is considered a security hole and is disabled for may servers. If there's a way to get around this issue, it would be a question best directed to the phpSmug creator, lildude (see above).
  • Options
    lildudelildude Registered Users Posts: 70 Big grins
    edited November 22, 2008
    It's suggestive that the error says: require_once(http://radcaptures.com/phpSmug.php). To me this indicates that you sending the full URL for the phpSmug.php file instead of just referencing the local file. What did you put in for line 40 of SmugMugViewer.php where it asks for the phpsmug location. If, for example, it looks like this:
    $phpSmugLocation = 'http://radcaptures.com/phpSmug.php';
    then you may be able to fix it by setting it to
    $phpSmugLocation = 'phpSmug.php';
    instead (I'm assuming that the phpSmug.php and SmugMugViewer.php code are in the same directory, which it seems to be after a quick glance at your website).

    Of course, as you suggested, this may be a problem with your server not allowing the php code to exec the response from the SmugMug API, in which case you may be dead in the water. I believe (though I'm not certain of this) that the phpSmug code execs the php-formatted response from SmugMug which is considered a security hole and is disabled for may servers. If there's a way to get around this issue, it would be a question best directed to the phpSmug creator, lildude (see above).

    A little late, but worth a comment just in case someone else encounters problems like these.

    Nervra: these errors are definitely caused by you attempting to "require_once" the phpSmug.php file by using a full URL and not a local file path. Accessing via URL is explicitly disabled on your server as the error states: "URL file-access is disabled in the server configuration". You need to change the "require_once" to use a local file path.

    Andrew: The response from the PHP API endpoint is just a serialize array. phpSmug doesn't (and couldn't) execute this response data. It just unserializes it and returns a useful array.

    Cheers,
    Colin
Sign In or Register to comment.