Save the Internet: Click here


Kickass Web Design creates Custom Themes and Templates for WordPress, Cubecart, ModX, Movable Type, ZenCart, Joomla, Tolranet Directory Script and other web applications. We can match your current design or create something totally new and different. Interested? Request a Custom Template Quote.


Review of SmugMug Template Customization

One of my favorite clients, whose site launch we’ll be announcing here soon, asked me to customize his SmugMug Pro installation for him. For those not familiar with SmugMug, it’s a hosted gallery application. The Pro version allows people to order prints and photos of your gallery entries, and you can make money with your photography or artwork in a similar fashion to how CafePress works. The printing, shipping and payment collection are done by SmugMug, and you get the profit over their base price. A VERY cool concept.

One of the things the SmugMug team touts is the fact that they use xhtml/css throughout their hosted gallery. This is true. They also tout the fact that it is totally customizable. This is much less true. Why is that? The system is set up in a very convoluted way. Rather than having access to the xhtml and css that runs your site so you can customize it, instead you have to OVERRIDE what’s there, which is vaguely possible in the css, and only in a few places in the xhtml. Now I do understand that this is a hosted situation, and that always imposes some limitations. But what I found was . . . um . . . interesting.

Since this was my first time customizing a smugmug site I wisely decided to start with an existing theme that was very close to what we wanted, and alter it for Scott’s smugmug site. The first thing I found out was that there is a stylesheet that gets loaded into the page that’s around 1300 lines of code and that defines pretty specifically almost every html element that gets fed to you. Now, I don’t know about you, but most of my stylesheets to run sites run around 300-400 lines of code for the entire site. Now, 1300 is HUGE. But it’s worse than that. The theme you use has its own stylesheet that adds another few hundred. Then the customizations you do are OVERRIDES of that 1300 line monster that are done as embedded styles in the head of every smugmug document (those styles aren’t cached.) Add to this fact that these sites are photo and image gallery sites and you’ve got something that it’s almost guaranteed will be a nightmare for someone on dialup, which is still, believe it or not, around 45% of the US population.

It gets worse. Most structural elements in that 1300 line css monster had heights defined. That means if you want to make sure stuff shows up when you alter it, you have to override it on every element for which a height is defined. My feeling is that whoever wrote this had little understanding of how the height attribute really works. Then there’s font sizes. In the majority of structural elements the font sizes are defined in pixel sizes, probably because of the defined heights. This means that in IE the fonts aren’t scalable but in other browsers they are. So you resize the font to be larger in firefox, and you narrow the browser window, and the text is cut off. The developer definitely did not follow best practices or accessibility guidelines when it comes to font sizing! Coupled with the height attributes, this is a nightmare.

If you know css well, and know how inheritance works, then when you look at the css that defines smugmug sites you’ll realize that inheritance was rerely used to shorten this behemoth. Many times when things were defined in that 1300 line monster they just plain didn’t need to be. That’s code bloat, pure and simple, and a very clumsy implementation.

This is just the tip of the iceberg. There are a WHOLE LOT of IE6 hacks that are going to most likely break every smugmug site when IE7 is released as a priority update through MS. The developer who wrote the smugmug xhtml/css code that you have no choice but to use or override did not follow best practices for IE hacking, and all the hacks are directly in the stylesheet that all versions of IE will use, which means every SmugMug site will likely look like a pile of manure in IE7.

I did get the customization more or less the way Scott wanted it. It was extremely counterintuitive to override pre-existing code in order to make things work and took me at least three times longer to do the work than if I had had more control over templating. Find/replace sure got a workout, something I rarely have to use in a well organized 300 line css file. I truly wish the devs for this ap would look at the way the ModX devs have set up templating in their ap. Maybe they could learn how it SHOULD be done, with a master html template and css file, totally editable through the interface, and subtemplates for specific areas, also editable.

Bottom line is that SmugMug is an absolutely wonderful idea. The actual backend works quite well. The galleries are very attractive when viewed “stock”. It’s obvious a whole lot of thought went into the backend. But if you want to really get into the nitty gritty of frontend customization, and you’re a frontend code snob like I am, you will be absolutely horrified.

Technorati Tags: , , ,

Share this post:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blogmarks
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • Spurl
  • YahooMyWeb

4 Responses to “Review of SmugMug Template Customization”

  1. Don MacAskill Says:

    Hey there,

    I’m the CEO & Chief Geek at SmugMug. GREAT writeup, and we’ll definitely take much of this to heart as we continue to re-work and improve the site.

    Alas, I didn’t write any of the CSS, and barely any of the XHTML (I do write almost all of the backend software that does the heavy-lifting for generating it, thanks for your kind words there), so I can’t comment on that. I’ll make sure the guy who does, though, replies here as well.

    I have a couple of quick notes, though - every single CSS and JS include on SmugMug is heavily cached and heavily compressed, so 1300 lines isn’t actually as painful as it sounds - that ~20K (ugh!) file is sent >99.9% of the time as a ~2.3K file. And, also >99.9% of the time, it’s sent one time only and perfectly cached for every single other hit. So even for modem users (you’d better believe we test and profile modem users), it’s negligible on the first hit, and almost nonexistent on subsequent ones.

    Feel free to test that out and make sure I’m not missing something - but we heavily test the speed, compression, cachability, and performance of our pages on both broadband and modem.

    Also, all of our IE6 hacks are JUST for IE6. We’re already testing the site for IE7, and everything (so far) works perfectly. I’m sure we’ll have to adjust something before we’re done, but the IE6 hacks don’t apply to IE7 unless we want them to (or overlook something) - they’re IE6 specific in the code. The are *not* in the stylesheet that all versions of IE will use (there’s no such thing as a static stylesheet at SmugMug - they’re all generated dynamically based on browser & other details).

    One of the reasons things were designed the way they are (again, someone else did the actual design) is that a huge # of our customers just want to change the color of the background or a font. So, to them, they prefer overriding a stylesheet to do just that one thing.

    I’d love to hear some more detail on exactly what you’d like to see (maybe a checkbox for “I brought all my own CSS, don’t use any of yours?” where we provide a very minimal stylesheet instead of the whole thing?), though, to see if we can improve. Drop me an email.

    Thanks,
    Don

  2. bj Says:

    Don, I’m glad to hear from you and will be communicating with you by the end of the week. The next couple days will be nuts, so it won’t be right away. I’d very much like to give you my opinion of how this could be improved.

    Re the css– The best advice I can give you is to run it through the css-discuss mailgroup and let them critique. I will warn you, they’ll be even more brutal than I was. And those pixel defined font sizes are guaranteed to start a holy war.

  3. JT Says:

    Hello BJ,
    I am in fact the designer/developer in charge of the html and css at smugmug. Thanks for taking the time to write such an excellent post. Don covered most of what I would tell you, but in case he missed a few things I would be happy to discuss via email or here. I too have questions about your post that I would love to go over.

    Thanks,
    JT

  4. Jim Says:

    Very nice overview of the complications to Smugmug customization. I tried to look and tinker with my SM site via CSS and was in way over my head. I did notice the 1300 lines of code and had a very difficult time trying to figure out what overrides what. Thanks for taking the time to share this with the folks at SM. Folks at SM, thanks for taking the time to read it and respond.

Random Posts from my Portfolio

Thatcher Heldring Site Launches using WordPress as a CMS
thatchertheauthor250.jpg