SmugTight - SmugMug integration with Airtight Photo Viewers

darryldarryl Major grinsRegistered Users Posts: 1,001 Major grins
SmugTight:

<embed> code generator and RSS feed massager to let you use various Airtight Interactive Flash photo viewers (SimpleViewer, PostcardViewer, TiltViewer, AutoViewer) with your SmugMug account.

http://www.rudebadmood.com/smugtight/

Instructions
  • Copy and paste a SmugMug RSS feed for photos (Recent Photos, a particular gallery, keyword).
  • Hit Go!
  • Copy code for the viewer of your choice and paste it into your Bio box (w/o bio photo), empty gallery description, or some other website.

Examples? Sure:

http://gladlee.smugmug.com/Hacks

(By the way, if you have your own PHP host and wanted hack on thisyourself, you might also want to look at Andrew's SmugMugViewer, which uses phpSmug to talk to the SmugMug API (so presumably it could work for password-protected or not externally linkable albums?) and integrates with SimpleViewer. More importantly, he elegantly serves up properly sized thumbnails, unlike my script which just shoves medium-sized images everywhere.)
«1

Comments

  • rla1022rla1022 Big grins Registered Users Posts: 43 Big grins
    edited July 25, 2008
    darryl wrote:
    SmugTight:

    JavaScript generator and RSS feed massager to let you use various Airtight Interactive Flash photo viewers (SimpleViewer, PostcardViewer, TiltViewer, AutoViewer) with your SmugMug account.

    http://www.rudebadmood.com/smugtight/

    Instructions
    • Copy and paste a SmugMug RSS feed for photos (Recent Photos, a particular gallery, keyword).
    • Hit Go!
    • Copy code for the viewer of your choice and paste it into your Bio box (w/o bio photo), gallery description, some other website.
    Examples? Sure:

    http://gladlee.smugmug.com/Hacks
    AWESOME ---- Any way i could get the code and throw it up on my own server. I have unlimited bandwith
  • darryldarryl Major grins Registered Users Posts: 1,001 Major grins
    edited July 25, 2008
    rla1022 wrote:
    AWESOME ---- Any way i could get the code and throw it up on my own server. I have unlimited bandwith

    Sure: http://www.rudebadmood.com/smugtight/src/

    Those are all PHP files renamed to .txt so you can download them as source.

    index.php generates the embed code

    All of the other files take the input of an RSS feed (with & replaced with AMPERSAND because of some goofiness with the way SmugMug parses html in gallery descriptions) and spit out the appropriate XML that each viewer requires.

    I mainly stuck to the default settings for each viewer, so there's plenty of room for tweaking. I did try to write an algorithm to correctly size the number of rows/columns for PostcardViewer.
  • rla1022rla1022 Big grins Registered Users Posts: 43 Big grins
    edited July 25, 2008
    Thank You very very much
    darryl wrote:
    Sure: http://www.rudebadmood.com/smugtight/src/

    Those are all PHP files renamed to .txt so you can download them as source.

    index.php generates the embed code

    All of the other files take the input of an RSS feed (with & replaced with AMPERSAND because of some goofiness with the way SmugMug parses html in gallery descriptions) and spit out the appropriate XML that each viewer requires.

    I mainly stuck to the default settings for each viewer, so there's plenty of room for tweaking. I did try to write an algorithm to correctly size the number of rows/columns for PostcardViewer.

    This really is so awesome. I saw your postings out on the Airtight forums. Im glad you got it working
  • darryldarryl Major grins Registered Users Posts: 1,001 Major grins
    edited July 25, 2008
    Thanks for reminding me to post links back on that forum. Yeah, I mainly took this on as a programming/hacking challenge since I had played with the various *Viewers for my lightweight Phanfare interface, Fan-Phan.
  • birchfieldbirchfield Big grins Registered Users Posts: 67 Big grins
    edited August 13, 2008
    wow this is really great darryl bowdown.gif

    how would i go about changing the default setting for the autoviewer, such as frameWidth or imagePadding?

    thanks
  • darryldarryl Major grins Registered Users Posts: 1,001 Major grins
    edited August 13, 2008
    birchfield wrote:
    wow this is really great darryl bowdown.gif

    how would i go about changing the default setting for the autoviewer, such as frameWidth or imagePadding?

    thanks

    Ok, I've got a super-lame hack to add AutoViewer settings. For any of the gallery variables, you can tack them to the end of the auto.php string like so:
    http://www.rudebadmood.com/smugtight/autohack.php?TypeEQUALSpopularNicknameAMPERSANDDataEQUALSdarrylAMPERSANDformatEQUALSrss200[color=red]EXTRAframeColorEQUALS0xFF0000AMPERSANDdisplayTimeEQUALS1[/color]
    

    If you scroll all the way to the right, you'll see:
    [color=red]EXTRAframeColorEQUALS0xFF0000AMPERSANDdisplayTimeEQUALS1[/color]
    

    So frameColor is set to 0xFF0000, and displayTime is 1.

    Sorry that you have to use the goofy EXTRA, EQUALS and AMPERSAND, but SmugMug insists on trying to convert or munging (I forget exactly) any symbols it sees in a caption or gallery description, so you can't link to an external script in the normal way (blah.php?foo=bar&goo=car)

    Anyways, I've only set this hack up for auto.php, and it works with the following variables (shown with their default values):
    frameColor=0xFFFFFF
    frameWidth=15
    imagePadding=20
    displayTime=6
    enableRightClickOpen=true
    
  • birchfieldbirchfield Big grins Registered Users Posts: 67 Big grins
    edited August 14, 2008
    darryl wrote:
    Ok, I've got a super-lame hack to add AutoViewer settings. For any of the gallery variables, you can tack them to the end of the auto.php string like so:
    http://www.rudebadmood.com/smugtight/autohack.php?TypeEQUALSpopularNicknameAMPERSANDDataEQUALSdarrylAMPERSANDformatEQUALSrss200[COLOR=red]EXTRAframeColorEQUALS0xFF0000AMPERSANDdisplayTimeEQUALS1[/COLOR]
    
    If you scroll all the way to the right, you'll see:
    [COLOR=red]EXTRAframeColorEQUALS0xFF0000AMPERSANDdisplayTimeEQUALS1[/COLOR]
    
    So frameColor is set to 0xFF0000, and displayTime is 1.

    Sorry that you have to use the goofy EXTRA, EQUALS and AMPERSAND, but SmugMug insists on trying to convert or munging (I forget exactly) any symbols it sees in a caption or gallery description, so you can't link to an external script in the normal way (blah.php?foo=bar&goo=car)

    Anyways, I've only set this hack up for auto.php, and it works with the following variables (shown with their default values):
    frameColor=0xFFFFFF
    frameWidth=15
    imagePadding=20
    displayTime=6
    enableRightClickOpen=true
    
    thanks again, that worked perfectly

    one last question
    what would i have to do to get this working with the pro version
    currently the only swf file which i can get to work with these rss feeds is yours hosted on rudebadmood?
  • darryldarryl Major grins Registered Users Posts: 1,001 Major grins
    edited August 14, 2008
    birchfield wrote:
    thanks again, that worked perfectly

    one last question
    what would i have to do to get this working with the pro version
    currently the only swf file which i can get to work with these rss feeds is yours hosted on rudebadmood?

    Try it again -- I've created a crossdomain.xml file that should open up these "feeds" (they're not really RSS) to be used by an SWF hosted anywhere.

    By the way, if you don't mind, I'd love to see the final results.
  • davidweaverdavidweaver Too busy to customize Registered Users Posts: 681 Major grins
    edited August 17, 2008
    *****NEVERMIND*****
    I just had to give it some time. :-P

    I'm leaving the post here so others will be patient.
    ******************



    Any idea what I'm doiing wrong.

    http://images.weaver.net/gallery/5650537_Ezeoz

    I used the generator with this input:
    http://api.smugmug.com/hack/feed.mg?Type=gallery&Data=5628848_TZ4t9&format=rss
    

    Which created this output for Simpleviewer
    <html>
    <embed src="http://www.rudebadmood.com/smugtight/viewer.swf"
    FlashVars="xmlDataPath=http://www.rudebadmood.com/smugtight/simple.php?TypeEQUALSgalleryAMPERSANDDataEQUALS5628848_TZ4t9AMPERSANDformatEQUALSrss"
    bgcolor=#181818 WIDTH=750 HEIGHT=500 TYPE="application/x-shockwave-flash"></embed>
    </html>
    

    I placed it in the description of a new gallery and I don't get any images in the results. The RSS feed does create a page in FF.

    Suggestions?

    Thanks!
    David
  • darryldarryl Major grins Registered Users Posts: 1,001 Major grins
    edited August 17, 2008
    Oh, you mean it took a while to load? Yeah, sorry, the script is not optimized. It loads medium-sized images for everything, instead of thumbs for the thumbs.

    Andrew came up with a clever workaround for this problem with his SmugMugViewer, but I haven't gotten around to hacking my hack to use it.

    --Darryl
  • nervranervra Big grins Registered Users Posts: 16 Big grins
    edited October 12, 2008
    A little guidance please
    For reliability purposes, I would like to have the flash file & coding files stored at my own location but I do not know where to start. Thanks in advance for the help!
  • nervranervra Big grins Registered Users Posts: 16 Big grins
    edited October 14, 2008
    nervra wrote:
    For reliability purposes, I would like to have the flash file & coding files stored at my own location but I do not know where to start. Thanks in advance for the help!

    After a couple of frustrating days, I FINALLY got the files onto my server. And then having server restrictions from GoDaddy, i finally got the PHP files to work. I had to create a .htaccess file as well as a PHP5.ini file. In no way I am a programmer and no idea what those files are, but I did it and it worked! yay!!!!
  • nervranervra Big grins Registered Users Posts: 16 Big grins
    edited October 15, 2008
    Increase Image Size?
    How can I increase the size of my images within the viewer? I've already tried increasing the height & width within the PHP file, but my image sizes still did not increase.
  • darryldarryl Major grins Registered Users Posts: 1,001 Major grins
    edited October 15, 2008
    My PHP script to provide a usable XML file for the *Viewers selects Medium by default.

    I should probably add an option to use whatever size you want. I'll try to get on that soon.

    Hey, so can you give us your website so we can see how things ended up looking?

    --Darryl
  • nervranervra Big grins Registered Users Posts: 16 Big grins
    edited October 16, 2008
    Thanks for the Update darryl!

    visit http://radcaptures.com to see my site. Please keep in mind that it is still WIP.

    Thanks again, and look forward for the option for larger images!!!
  • birchfieldbirchfield Big grins Registered Users Posts: 67 Big grins
    edited October 18, 2008
    Thanks again for this great hack darryl clap.gif

    Here's the final result on my site:
    http://www.singhphotography.co.uk/live


    James
  • nickmccnickmcc Beginner grinner Registered Users Posts: 6 Beginner grinner
    edited January 3, 2009
    darryl wrote:
    Sure: http://www.rudebadmood.com/smugtight/src/

    Those are all PHP files renamed to .txt so you can download them as source.

    index.php generates the embed code

    All of the other files take the input of an RSS feed (with & replaced with AMPERSAND because of some goofiness with the way SmugMug parses html in gallery descriptions) and spit out the appropriate XML that each viewer requires.

    I mainly stuck to the default settings for each viewer, so there's plenty of room for tweaking. I did try to write an algorithm to correctly size the number of rows/columns for PostcardViewer.


    I'm currently using the Autoviewer the hard way, with the XML file manually generated sitting on my own server. I would love to be able to pull in the XML file from my gallery.

    I tried copying your index.php and auto.php to my server, but upon running, it generates an error message:

    http://www.nickmcc.com/autoviewer/smugtight/auto.php?TypeEQUALSgalleryAMPERSANDDataEQUALS6180506_P3BAhAMPERSANDformatEQUALSrss200
    [B]Fatal error[/B]: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/nickmcc/public_html/autoviewer/smugtight/auto.php:45 Stack trace: #0 /home/nickmcc/public_html/autoviewer/smugtight/auto.php(45): SimpleXMLElement->__construct('') #1 {main} thrown in [B]/home/nickmcc/public_html/autoviewer/smugtight/auto.php[/B] on line [B]45[/B]
    

    I'm not a PHP coder, so I'm not sure if I can debug the issue. Perhaps your .txt src version isn't the same as the one running in production? When I run it from auto.php on your server it works fine.
  • darryldarryl Major grins Registered Users Posts: 1,001 Major grins
    edited February 9, 2009
    Hi Nick:

    Do you know what version of PHP you're running?

    You can find this out by creating some PHP page and including the following code:
    <?
    phpinfo()
    ?>
    

    Then load that page up. I'd also be interested in seeing if your build of PHP has the curl module installed, which is what goes and grabs the RSS feed from SmugMug. That might give you the error your getting, which basically says that whatever you're trying to feed the script is *not* an XML file. I probably should add better error handling for this, but I'm a lazy hack. :-}

    BTW, my auto.txt src is directly linked to the auto.php file, so it's not a different version. I just added a tiny bit of error checking to make sure curl is grabbing the feed properly, and if not, to spit out a more useful error. You can try grabbing it again and see what errors you get.
  • angevin1angevin1 Performs as designed Registered Users Posts: 3,403 Major grins
    edited February 16, 2009
    Help; Please/
    I have been using the SMUGTIGHt viewer/SS. I wanted to change galleries and NOW I cannot duplicate my former success. I cannot get the new gallery to SS nor return to previous.

    I have read the Wiki and all and cannot seem to pull myself though this.

    Homepage: www.tomwisephoto.com

    Gallery: http://tomwisephoto.smugmug.com/gallery/7219163_vXu36/1/472353077_CKFbd

    Brain:_____headscratch.gif

    I need help figuring out HOW to get a Smugtight SS back working!

    I do believe I had the instruction written down on my previous computer...that crashed~

    Thanks for any and all aid~

    tom
    tom wise
  • ansel4ansel4 Fort Wayne SMUG Leader Fort Wayne, INRegistered Users Posts: 53 Big grins
    edited February 23, 2009
    I notice the samples have the viewers smaller and on the left. How might I get it to be centered, and larger?

    Thanks.
  • darryldarryl Major grins Registered Users Posts: 1,001 Major grins
    edited February 23, 2009
    ansel4 wrote:
    I notice the samples have the viewers smaller and on the left. How might I get it to be centered, and larger?

    Thanks.

    Put <center></center> around the <embed></embed> and tweak the WIDTH=750 HEIGHT=500 settings.
  • ansel4ansel4 Fort Wayne SMUG Leader Fort Wayne, INRegistered Users Posts: 53 Big grins
    edited March 1, 2009
    darryl wrote:
    Put <center></center> around the <embed></embed> and tweak the WIDTH=750 HEIGHT=500 settings.

    Great. Thank you!
  • nervranervra Big grins Registered Users Posts: 16 Big grins
    edited May 13, 2009
    viewers are not working anymore? Anyone know what has happened???
  • darryldarryl Major grins Registered Users Posts: 1,001 Major grins
    edited May 13, 2009
    Meh, yeah, borked. I'm looking into it.
  • darryldarryl Major grins Registered Users Posts: 1,001 Major grins
    edited May 14, 2009
    FIXED! Would've been nice if the changes to the RSS feeds to remove elements were announced somewhere. (Glare directed at dev.)
  • nervranervra Big grins Registered Users Posts: 16 Big grins
    edited May 14, 2009
    Thanks!
    Thanks for the very prompt fix Darryl!!! All my viewers are working correctly now.

    radCaptures.com
  • nervranervra Big grins Registered Users Posts: 16 Big grins
    edited January 6, 2010
    Larger images?
    Any update on being able to have the autoviewer display Large images?

    Thanks again for all the help Darryl!!!
  • nervranervra Big grins Registered Users Posts: 16 Big grins
    edited July 12, 2011
    Please help...Autoviewer is working, but every new image I add to my gallery shows up as an "X" in the viewer.
  • darryldarryl Major grins Registered Users Posts: 1,001 Major grins
    edited July 12, 2011
    Hi Nervra, which gallery? The home page Autoviewer on http://photo.radcaptures.com/ looks fine to me.
  • nervranervra Big grins Registered Users Posts: 16 Big grins
    edited July 14, 2011
    Hi Darryl,

    My homepage viewer was working fine when you viewed it because I haven't uploaded any new images. But now I just uploaded a new image so you can see the error, http://www.radcaptures.com/. Also, see "X" error here,
    http://www.radcaptures.com/portrait.html
    http://www.radcaptures.com/fashion.html

    Much thanks in advance!
Sign In or Register to comment.