Smugmug & Drupal?

TazzyTazzyTazzyTazzy Big grinsPosts: 32Registered Users Big grins
Has anyone worked on a module for Drupal? I would really like to use smugmug vs Flickr since Flickr doesn't allow subcategories like smugmug does.

Would anyone be interested in such a module? I'm not an expert programmer, but I can do some stuff. Perhaps a few of us could get something together?

-Mitch

Comments

  • TazzyTazzyTazzyTazzy Big grins Posts: 32Registered Users Big grins
    edited June 20, 2006
    Working..>Mostly
    Okay, so I finally got my SmugMug API key whipped out a quick Drupal (4.7.x) module. The module does two things:

    1) Acts like a text filter for nodes/pages/etc. Simply put in {{smugmug:ImageID}} (where, imageID is the ID of the image you want. This will create a link to the proper album where the image is in, and use the thumbnail version of the image as the link where you click on. You can also use {{smugmugX:imageID}} where X = t (tiny), s (small), m (medium), l (large) and o (original). This will display a dffierent size image in your node. This is much like the flickr.module.

    2) Acts like a remote gallery browser. Allows to you browse the categories, and subcategories within your drupal site, as if you were hosting the images. However, at the bottom of the page i put "Photos powered by smugmug". You can check out what I have so far at: http://www.warmy.com/smugmug (which has been aliased to /gallery in my alias module).

    I still have a little bit of work to do on this module. Would be nice to be able to view your gallery within your drupal site. Since i've whipped this together in a few days, i haven't finished this portion yet.

    A bit on the backend. I've implemented a caching system so as not to clobber smugmug and to speed things up. Basicially, every call to smugmug gets saved in a local table. When making an API call, the module first checks to see if a local cache is available, if not, fetch it, then save it in the cache for later use. Right now, i've set the cache timeout to 60 minutes. I think this is more than enough to handle most photo albums since I only upload a few pictures a week right now.

    The cache system works on EVERY API call. Image urls, albums, categories, etc. :-) It's a very simple, but slick system.

    Let me know what you think. Please keep in mind, I just put this together in a couple days, and as such, doesn't have a solid look/feel. But, it should be functional. If you find a bug, please let me know here.

    -Mitch (Warmy)
  • rainforest1155rainforest1155 SmugMug Support Hero Posts: 4,441Registered Users Major grins
    edited June 20, 2006
    Looks very cool and works without a problem! Great job! thumb.gif
    Even though I've not really looked into what this Drupal really is. This is something you put on your webserver and which provides your site with blogging features? Do you still need MySQL databases to run a blog? Or am I completely wrong?

    Whatever - I saw that you were complaining that there's no real image size for blogging pictures. Are you aware that you can request any image size you want from smugmug and they serve it to you on the fly? Just add the image size instead of the S, M or L like this:
    123456789-800x800.jpg
    This would give you a picture with 800px at the longest side no matter what aspect ratio it has and works for both landscape and portrait orientation. Here's the thread about that.

    Sebastian
    Sebastian
    SmugMug Support Hero

    look on the bright side
    http://www.SebastianHosche.com
  • TazzyTazzyTazzyTazzy Big grins Posts: 32Registered Users Big grins
    edited June 20, 2006
    Thanks for the great tip!
    This is something you put on your webserver and which provides your site with blogging features? Do you still need MySQL databases to run a blog? Or am I completely wrong?
    Yes, you need MySQL (or some sort of SQL). Check out drupal.org. Yahoo.Com runs on a modified version of drupal. :-)

    Drupal can be used for blogging, or store fronts, or whatever. It's very powerful system with easy to write/add modules.
    instead of the S, M or L like this:
    123456789-800x800.jpg

    Thanks really helpful. I combined this with a CSS hack that allows mouse over. So, now not only can you see a bigger version simply by putting the mouse over the image, you can click on it to go to the album! Spiffy!

    It's very rough right now, I need to polish this some more.

    -Mitch
  • TazzyTazzyTazzyTazzy Big grins Posts: 32Registered Users Big grins
    edited June 21, 2006
    Havin' fun
    So, the double picture from the filter was messin' me up. I'll come back to that later.

    I've implemented a Random Image block. At first, i was pulling records for all images. Tooo many hits against API if you had LOTS of albums. TOOO much. Instead, i'm randomly selecting 5 albums, then getting all image ID's for the 5 albums. Then, from those, I randomly select XX images that I want to see.

    The module is comming along nicely. I think after I do a code clean up, I'll release it it the public. Soo, if you have a Drupal site, and interested, let me know here. Also, test out warmy.com and let me know of any bugs or where things could look better. I'm not going to implement an album viewer at this time - maybe next week. rolleyes1.gif

    Also, I've bumped the API cache timeout from 30 minutes to 60 minutes. I may even bump it up to 2 hours. Eventually i'll make this an administrative setting, but still have a minimum of around 30 minutes. I don't want to kill smugmug API.

    -Mitch

    BTW, If you found this post and you are running Drupal and don't have smugmug yet, please use my coupon. :): This will push me along to continue developing this module.. That, and you get $5 off. mwink.gif Here's the coupon code to enter when joining: qgSctxuKhAiAE
  • TazzyTazzyTazzyTazzy Big grins Posts: 32Registered Users Big grins
    edited June 29, 2006
    Update
    Just a status update on the drupal module.


    I now have full album viewing from within the drupal module. You can view albums, or images. You can also select the image size.


    Changes since last update:
    * Improved API cache system. Should lower the load on the API system even more. You set a base cache timeframe, say 24 hrs. Then, you have the following cache times:
    List of albums = base cache / 2 (12 hrs)
    ImageURLs = base cache * 10 (240 hrs - 10 days)
    ImageInfo = base cache
    Subcategories = base cache * 2
    Categegories = base cache
    * Fixed cache reads - some reason wasn't always reading the cache. Changed cache lookup algorithm.
    * Display albums within module
    * Display images within module
    * API errors are handle more gracefully - if API error, users are sent to smugmug.com album.
    * URL for albums, images, gallery, category, and subcategory is set from module settings menu. For example: Can set the album url to warmy.com/smugmug/album/AlbumTitle or warmy.com/album/AlbumTitle
    * Number of images displayed in random block setable in block control panel.


    Yet todo:
    * Perform full security analysis of code - mainly user variables passed in from web browser - only minimal checking
    * Code clean up
    * More in-code doco
    * Debating how to implement "most recent" images in a block. No good API exists, most likely have to parse an RSS/Atom feed of some sort (not prefered method).


    Please check out the website, open to suggestions/modifications before publishing code. http://www.warmy.com/gallery/


    I'm moving this topic over to Drupal since I'll eventually publish the module there. I'm assuming I'll also be using their bug tracking features if needed.

    Link to Drupal.org thread: http://drupal.org/node/70166


    -Mitch
  • TazzyTazzyTazzyTazzy Big grins Posts: 32Registered Users Big grins
    edited July 26, 2007
    Module updated for Drupal 5.1
    I've updated the Drupal module to access Smugmug images easily from with blog posts, or placing your gallery within your one website.

    The new module works with Drupal 5.1, won't be maintaining older versions.

    More details at:
    http://www.warmy.com/2007/drupal_smugmug_module_105b

    Enjoy.
  • TazzyTazzyTazzyTazzy Big grins Posts: 32Registered Users Big grins
    edited September 28, 2007
    Slideshows added to drupal module for smugmug
    After a lot of work and tinkering, I _finally_ have slideshows available for the drupal module for smugmug. It uses javascript, with a <noscript> tag to display a single static image for browsers that don't have javascript enabled/support.

    Change log: http://www.warmy.com/sm-changelog.txt
    Download: http://www.warmy.com/smugmug_nightly.tgz

    Also: This has been test with Drupal 5.2 at http://dev.warmy.com

    Cheers!

    - Mitch Schwenk
  • FestivalstreetFestivalstreet Fun Festival Photos Posts: 6Registered Users Beginner grinner
    edited June 27, 2008
    Drupal Slideshow API
    Hey Tazzi,

    Anything new with the Drupal API since the Smug SS release? I am just setting up my drupal site, wanted to check before I attempted the module you discussed here.

    I noticed on your site that your app has different target URLs, a feature request I submitted to SM.

    I'm running with drupal 5.7, but am a newbie and want to stick w/ SM. Should I go ahead and try your module?

    Thanks,
  • technocrafttechnocraft Vexed and Glorious Posts: 108Registered Users Major grins
    edited September 14, 2008
    Dude, thanks for working on this. The gallery "browsing" is exactly something I wanted for the site I'm starting to work on.

    I can't seem to find a current download for your module. Do you have a 6.x version or plans for one?
    -Tony
    http://images.tonyschreiber.com
    (technocraft.smugmug.com)
  • wooacwooac Beginner grinner Posts: 8Registered Users Beginner grinner
    edited October 29, 2008
    Has anyone gotten version 1.06b to work?
    As best as I can tell, the SQL database is inconsistent with the PHP code. The tables for drupalxx.smugmug_image_urls are missing.
    Would have been nice if it worked...headscratch.gif
  • stubblestubble Big grins Posts: 17Registered Users Big grins
    edited October 30, 2008
    I run drupal and would love to collaborate with someone who was interested in smugmug integration. Warmy's module wasn't quite what I've been after.

    Is anyone working on SM support via the Embedded Media Field module? It would seem like a good place to start.
  • jpdwjpdw Beginner grinner Posts: 3Registered Users Beginner grinner
    edited November 6, 2008
    stubble wrote:
    I run drupal and would love to collaborate with someone who was interested in smugmug integration. Warmy's module wasn't quite what I've been after.

    Is anyone working on SM support via the Embedded Media Field module? It would seem like a good place to start.
    I'd be interested in collaborating -- though I've only done a tiny weeny bit of drupal module dev in the past. I only just found Warmy's module tonight and am trying to get it working under 6.x but whilst it's good, I'd also be interested in some further integration.

    Smugmug is top-dog for gallery display so I'd mainly like to be able to highlight smugmug gallery content in drupal.

    Specifically I'd like to be able to integrate images in my smugmug gallery into drupal (presumably with click-through to the gallery). Okay, so this can already be done manually by getting the link to an image and putting it into a drupel content field as an href, but it'd be nicer to select the image 'natively' in drupal by selecting the gallery then the image....

    I'd also love to be able to configre the Dynamic Display block module to use images from specific smugmug galleries.

    I'm not sure if that's what you have in mind, but as I say, I'd be interested in some collaboration.

    As an aside.. does anyone else have Warmy's module working under drupal 6.x?
  • afarberafarber Major grins Posts: 267Registered Users Major grins
    edited November 9, 2008
    I don't know anything about Drupal or coding, but I've *heard* of both. Just want to say thanks for everyone pitching in and working on this. It's not going to affect me directly, I don't think, but anything that extends SM is good for all of us.

    Keep up the good work.
  • anderivanderiv Big grins Posts: 80Registered Users Big grins
    edited November 9, 2008
    Hey guys - I've been using Drupal for several years, but have never written a module. I was able to find some ambition in myself tonight and started work on a simple Drupal/Smugmug integration. When this first module is complete, it'll just be able to display a random photo from a smugmug gallery in a block. Yes, that's pretty simple, but I figured it would make for a good starting project for myself. If all goes well with this module, hopefully I'll be able to contribute (or possibly lead) an effort to develop a more complex, comprehensive integration module.

    In a few hours this afternoon, I was able to write the core functions that retrieve a random image from a gallery. Now all I have to do is wrap that code into a proper Drupal module and then test. I'll be targeting Drupal 6 with this module. Also, I'm using lildude's awesome phpSmug libraries for this.

    -Erik
    Erik Anderson
    http://andersonfam.org
    http://andersonfam.smugmug.com
    D70 | SB-600 | Nifty Fifty | Tamron 17-50 f/2.8 | Nikon 70-300 f/4-5.6G
  • jpdwjpdw Beginner grinner Posts: 3Registered Users Beginner grinner
    edited November 10, 2008
    anderiv wrote:
    Hey guys - I've been using Drupal for several years, but have never written a module. I was able to find some ambition in myself tonight and started work on a simple Drupal/Smugmug integration. When this first module is complete, it'll just be able to display a random photo from a smugmug gallery in a block. Yes, that's pretty simple, but I figured it would make for a good starting project for myself. If all goes well with this module, hopefully I'll be able to contribute (or possibly lead) an effort to develop a more complex, comprehensive integration module.

    In a few hours this afternoon, I was able to write the core functions that retrieve a random image from a gallery. Now all I have to do is wrap that code into a proper Drupal module and then test. I'll be targeting Drupal 6 with this module. Also, I'm using lildude's awesome phpSmug libraries for this.

    -Erik
    Hey.. .this is a majorly good thing... Let us know what you want some beta testers or any assistance !!!!!

    I didn't know about phpSmug - I'd never thought to try to integrate smugmug to my website till last week. So thanks for the link.

    -jon
  • wooacwooac Beginner grinner Posts: 8Registered Users Beginner grinner
    edited November 13, 2008
    Hacking at tazzy's code
    I've been hacking at tazzy's code and got to the point where it logins and displays categories of albums. When I display an actual album, I get the navigation icons but not the images. I'm using drupal 5.7.

    The first time you look at a smugmug gallery it fills your drupal database with your gallery and category information. This can take a long time.

    Alex
  • FuzzytekFuzzytek One Love in Detroit Posts: 39Registered Users Big grins
    edited November 17, 2008
    Erik I just was out searching today and saw phpSmug as well. There are a couple other Wordpress oriented tools Smugmug Photo Sidebar and Photoxhibit. I'm using Drupal 6.x and have a couple sites with Drupal 5.x still (eventually bringing them up in version).

    I saw Warmy's information, but the delivered file I'm not exactly sure what to make of since it combines html, php, and more.

    I'm also a neopyhte when it comes to writing Drupal modules and the process for getting them brought into the Drupal community. That doesn't mean I'm new to coding or software development practices. Just have been out of it a few years.

    I do have a significant investment of photos hosted here at Smugmug so any Drupal module that brings them together is worth some time assisting.
    Stephen Boyle - Fuzzytek Photography, LLC
    Capturing and creating fashion, film, festivals around Detroit
    Wordpress-ed Fuzzytek
  • chabrownchabrown Beginner grinner Posts: 1Registered Users Beginner grinner
    edited April 18, 2009
    Drupal Update
    Does anyone know if there have been any modules released for integrating SmugMug into Drupal 6.x?

    Many thanks,
    Charles
  • winstonwinston Big grins Posts: 19Registered Users Big grins
    edited May 2, 2009
    Hi,

    I've just contributed the following patch for the Drupal emfield module (embedded media field).

    http://drupal.org/node/451842

    For those interested in using smugmug photos on your Drupal based sites please try my patch and submit a response to my issue that you tried it and it works.

    It is a single file that you need to put in your emfield folder specifically at

    /sites/all/modules/emfield/contrib/emimage/providers

    Unzip it there so that there is a smugmug.inc file there.

    You can then go to your emfield configuration page at yoursite/admin/content/emfield to enable it (you'll need to get yourself an api key).

    If you don't use emfield yet, then you'll need to install that on your site first (use the 6.x dev version).

    I just switched from flickr to smugmug and I was shocked that smugmug wasn't already there! headscratch.gif

    - Peter
  • iharleyiharley Photo Padawan Posts: 11Registered Users Big grins
    edited May 7, 2010
    So here's what I'm trying to do. I want to pull images from a specific smugmug feed (in this case a specific gallery of my favorite shots), have each photo be its own node so I can then pull them up to become a Views slideshow. The modules I am using are: FeedAPI, Feed Element Mapper, and the embedded media, with the Smugmug option. I'm able to pull the feed, but I'm unable to map, meaning the nodes are created but they aren't populated with the photo. I've set the content type to have the smugmug emimage widget but the mapper isn't populating a URL to the field. Any ideas?
  • winstonwinston Big grins Posts: 19Registered Users Big grins
    edited May 7, 2010
    Hi are you using media_smugmug module (to go along with emfield). You post implies it. If so I maintain at least that piece.

    What do you mean "they aren't populated with the photo". What exactly isn't populated with the photo? With emfield the photo itself doesn't come down to your site.

    I don't use feedapi and feed element mapper myself at the moment (will have to give this a shot over the weekend).

    I was researching this last week and I got the feeling that the code for feedapi/feed element mapper may not be working with emfield at the moment, but I could be wrong.

    - Peter
    iharley wrote: »
    So here's what I'm trying to do. I want to pull images from a specific smugmug feed (in this case a specific gallery of my favorite shots), have each photo be its own node so I can then pull them up to become a Views slideshow. The modules I am using are: FeedAPI, Feed Element Mapper, and the embedded media, with the Smugmug option. I'm able to pull the feed, but I'm unable to map, meaning the nodes are created but they aren't populated with the photo. I've set the content type to have the smugmug emimage widget but the mapper isn't populating a URL to the field. Any ideas?
Sign In or Register to comment.