**** WARNING **** **** WARNING **** **** WARNING **** **** WARNING ****
THIS ARTICLE HAS BECOME TOO OLD AND OUTDATED. I now use Zenfolio exclusively for my personal portfolio and http://ronmartinsen.com now only points to my Zenfolio site. Click here to read my Zenfolio review and learn why I feel it’s the best service available now.
**** WARNING **** **** WARNING **** **** WARNING **** **** WARNING ****
During the process of doing my Professional Web Hosting Roundup investigation, Markham Bennett of Smugmug put me in touch with Support Hero Barb Gates (shown above). At Smugmug they have a really cool gallery of photos of the Smugmug Superheroes and I totally understand why now – people like Barb rock! She bent over backwards to help me under a compressed schedule to get my smugmug site looking like a cool custom site.
I’m taking this short diversion from the series to show you how it was done before I dive into the review later this week.
First, the Easy Way (by Ron)
At the time I was beginning my review, the easy way didn’t exist. A typical default smugmug site might look like this:Easy Customizer
However, Smugmug was working hard to make things both easier and more powerful. The answer? – Easy Customizer. Here’s a short video demo of the Easy Customizer in action:Pretty cool, huh?
However, for as cool as that is, it still looks like a consumer level template site. The rest of this article is geared for the web programmer who isn’t afraid to roll up their sleeves and get some killer results.
Now for the Power Users in Barb’s own words…
Customizing SmugMug can be as simple or as advanced as you want. All up to you. Pretty much anything goes, and you can completely change the look & feel of your site with some CSS and HTML. Advanced hacks are available via JavaScript to also change some of the default functions, text, etc.Most all of your customization will live in the CSS, Custom Header and Custom Footer boxes inside your customization panel.
CSS stands for “Cascading Style Sheets” and controls the look and formatting of your site. SmugMug uses default CSS for each theme. With customizing, you can override the default CSS and use your own. You are able to change the colors, fonts and layout of your page. All of this goes in the CSS box in your customization panel.
Your HTML lives in the Custom Header and Custom Footer boxes. Here is where you can add a navbar, header banner (logo), and custom footer. You then use CSS to change the color, position, fonts, etc., for each.
Your HTML and CSS live in harmony. The HTML creates the elements, and the CSS styles them.
You can use JavaScript “hacks” to change certain default functionality of the site. There are two sections for JavaScript - top and bottom. You want to use the Bottom JavaScript box most of the time, as scripts placed in the Top JavaScript box will slow down the loading of your pages.
Site-wide customization can be found in the account holder’s control panel, under the Customize tab. Here’s a short video flyover of the site-wide customization for Ron’s test site:
For this example, I customized http://ronmartinsen.smugmug.com/ to look like this:
Let’s start with the basics:
- Banner/Logo
- Navbar
The following has been placed in the Custom Header box for the above site:
<!-- Begin Header and Navbar -->
<div id="RMHeader">
<div id="RMLogo"><a href="/"><img src="/img/spacer.gif" width="300" height="55" border="0" /></a></div>
<div id="RMNav">
<ul>
<li><a href="/">home</a></li>
<li><a href="/galleries">portfolio</a></li>
<li><a href="http://ronmartinsen.blogspot.com" target="_blank">blog</a></li>
<li><a href="/gallery/7973047_UNC2k">contact</a></li>
</ul>
</div>
</div>
<!-- End Header and Navbar -->
/* BANNER */
#RMHeader {position: relative; width: 943px; height: 60px; margin: 0 auto;}
.homepage #RMHeader,
.category #RMHeader,
.subcategory #RMHeader,
.filmstrip #RMHeader,
.journal #RMHeader {margin-top: 50px;}
#RMLogo {
width: 300px;
height: 55px;
background: url(/photos/517708344_ZGVQ5-300x55-1.jpg) no-repeat;
}
/* NAVBAR */
#RMNav {position: relative; float: right; margin-top: -8px;}
#RMNav ul {list-style:none; margin:0; padding:0; font-size:10px; font-family: Verdana, Arial, Helvetica, sans-serif;}
#RMNav li {float:left; padding:0; margin:0;}
#RMNav li a {text-decoration: none;
padding: .1em .4em;
color: #4f4f4f;
background-color: none;}
#RMNav ul li a:hover {
color: #0677a1;
background-color: none;
}
<!-- Begin Footer -->
<div id="RMFooterWrapper">
<div id="RMFooter">copyright (c) 2009 - ron martinsen photography - all rights reserved</div>
</div>
<!-- End Footer -->
/* FOOTER */
#cobrand_footer {display: none !important; width:943px; margin:0 auto;}
#cobrand_footer .nav,
#cobrand_footer .text {font:8pt verdana, arial, sans-serif; color: #404040; margin-top: -5px; }
#cobrand_footer #footer {width:943px; text-align:left; font:8pt verdana, arial, sans-serif; color:#404040;}
#RMFooterWrapper {width:943px; margin:0 auto;}
#RMFooter {font:8pt verdana, arial, sans-serif; color: #aaa; margin-top: -4px; float: right;}
Some CSS is required to accomplish this. This CSS is in the CSS box is the customization:
/* HOMEPAGE */
#homepage {width:943px;}
#homepage #breadcrumb {display:none;}
#homepage p.note {display:none;}
#homepageTools {border: none; text-align: center;}
#feeds {display:none;}
.cartlink_footer {display: none;}
#userName {display: none;}
#userHome {display: none;}
#galleryTitle, #categoryTitle {visibility: hidden;}
.albumTitle .nav {color: #666 !important; font-size: 7pt !important;}
#breadcrumb .nav,
#breadcrumb .title {color: #aaa; font-size: 8pt; font-family: Verdana, Arial, Helvetica, sans-serif;}
/* BIOBOX */
#ssContainer {background: url(/photos/517878808_X2UFX-O.jpg); width: 943px; height: 615px;}
#bioSS {padding-top: 33px;}
#bioBox {width:943px; height: auto; margin:0 auto;}
#bioBox .boxBottom,
#bioBox #userBio {padding:0;}
#bioBox .photo {display:none;}
#bioText {display: none;}
#userBio {text-align: center;}
- Changes the default width of the homepage to 943px, the width of the background image
- Removes the default breadcrumb from the homepage, which includes the account holder’s name
- Removes the feeds from the footer
- Removes the shopping cart link from the footer
- Removes the default gallery box title
- Centers the slideshow in the biobox
- Adds the background image for the slideshow
- Removes any text that has been added into the bio
/* GENERAL */
body {background-color: #fff;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #aaa;}
a:hover img.imgBorder,
.imgBorderOn {
border-color: #0677a1;
}
#photoKeywords {
display: none;
}
.title {
color: #0677a1;
}
.box {background: transparent;}
.boxTop {border: 0;}
On this site, we have created a separate galleries page. The default setup shows your galleries on your homepage. Since I have created a navbar that links to the galleries, I need to hide the galleries on the homepage, and create a separate page for those. This requires both CSS and JavaScript to accomplish this. We will start with the JavaScript. This is placed in the Bottom JavaScript box in customization:
/*============================*/
/*== Virtual Gallery Pages ===*/
/*============================*/
function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}
if (hasPath("galleries"))
YD.addClass(document.body, "galleries");
/* SEPARATE GALLERY PAGE */
.homepage #galleriesBox,
.homepage #categoriesBox,
.homepage #featuredBox {
display: none;
}
.galleries #bioBox {
display: none;
}
.galleries #galleriesBox,
.galleries #categoriesBox,
.galleries #featuredBox {
display: block;
}
.loggedIn .homepage #galleriesBox,
.loggedIn .homepage #categoriesBox {
display: block;
}
This account holder wanted the thumbs on the gallery page centered. This works if you only intend on having a certain number of thumbs. Gallery thumbnails will center themselves as you add more galleries; however, if you intend to only have, like in this case, three galleries, they can be centered on the page. I used the following CSS in the CSS box for this:
/* CENTER GALLERY THUMBS */
.miniBox {
width:125px;
height: 125px !important;
padding:0 0 5em 0;
margin:190px 90px 0;
}
.miniBox .photo {
height:auto;
_height:1px;
}
.miniBox .albumTitle,
.miniBox .private {
width: 100px; text-align: center;}
.albumLarge {
width:160px;
height: 160px !important;
padding:0 0 5em 0;
margin:130px 40px 0;
}
.albumLarge .photoLarge {
height:auto;
_height:1px;
}
.albumLarge .albumTitle,
.albumLarge .private {
text-align:center;
width: 160px; text-align: center;
}
/* REMOVE DESC AND UPDATED TIME */
#categoriesBox .miniBox p.description,
#galleriesBox .miniBox p.description,
#featuredBox .miniBox p.description {display: none;}
#categoriesBox .miniBox p.updated,
#subcategoriesBox .miniBox p.updated,
#galleriesBox .miniBox p.updated,
#featuredBox .miniBox p.updated {display: none;}
/* FILMSTRIP VIEWING STYLE */
.filmstrip #sizePicker {display: none;}
.filmstrip #albumNav_bottom {display: none;}
.filmstrip #albumNav_top .nav {color: #aaa; font-size:10px; font-family: Verdana, Arial, Helvetica, sans-serif;}
.filmstrip #albumNav_top .title {color: #aaa; font-size:10px; font-family: Verdana, Arial, Helvetica, sans-serif;}
.filmstrip .play_slideshow {display: none;}
#filmstrip #leftMove {
background: url(/photos/518609615_ba4nL-O.png) no-repeat;
}
#filmstrip #rightMove {
background: url(/photos/518609616_oPqzH-O.png) no-repeat;
}
/* SMUGMUG VIEWING STYLE */
.smugmug #RMHeader {width:auto; padding-left: 10px; margin-top: 10px; padding-bottom: 10px;}
.pageNav {color:#0677a1;}
#smugmug #displayPhoto {text-align:center;}
#stylebar {visibility: hidden;}
.smugmug #RMFooterWrapper {width: auto;}
.smugmug #RMFooter {margin-right: 15px;}
.smugmug #RMNav {margin-right: 10px;}
.smugmug #cobrand_footer {width: auto;}
.smugmug #cobrand_footer .text {+margin-left: 15px;}
/* LINES */
.top_border {border-top: none;}
.bottom_border {border-bottom: none;}
.right_border {border-right: none;}
.left_border {border-left: none;}
.journal_entry {border-bottom: none;}
/* COMMENTS */
#comment {margin-bottom:10px; border:0;}
#comments .box {border:1px solid #ccc;}
#comments .boxTop {background: #ccc; border-bottom:1px solid #fff;}
#comments .boxBottom {background:#eee;}
/* Buttons */
.buttons, .smbuttons {
color: #aaa;
background-color: #fff;
border: 1px solid #404040;
}
.sm-button {
border-top: none;
border-bottom: none;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9pt;
background: #fff url(/photos/517900816_fPZ7y-O.png) repeat-x;
}
.glyphButton .first-child, .yui-menu-button button {
background-image: url(/photos/517900816_fPZ7y-O.png);
}
.sm-button button, .sm-button a {
color: #aaa; font-family: Verdana, Arial, Helvetica, sans-serif;}
.sm-button {
border-left: none;
border-right: none;
_border-left: none;
_border-right: none;
~border-left: none;
~border-right: none;
}
.sm-button .first-child {
border: none;
_border-left: none;
~border-left: none;
_border-right: none;
~border-right: none;
}
/* CONTACT GALLERY */
.gallery_7973047 .pageNav {display: none;}
.gallery_7973047 .nophotos {display: none;}
.gallery_7973047 #breadcrumb {display: none}
#contactText {color: #666; font-size: 8pt;}
#contactText a {color: #666; font-size: 8pt;}
#contactPic {width: 200px; height: 300px; border: 0;}
#contactContainer {width: 200px; padding-top: 55px; padding-left: 35px;}
I have added several JavaScript “hacks” to accomplish various tasks. The following is in the Top JavaScript box:
1. Remove the pipes (separators) in the footer:
/*============================================*/
/*============= Remove Pipes in Footer =======*/
/*============================================*/
YE.onAvailable("cobrand_footer", function() {this.innerHTML = this.innerHTML.replace(/\||what are feeds\?/gi, '');});
/*============================================*/
/*======= Remove Text Bubble on Hover ========*/
/*============================================*/
function delHover() {
oLst = YD.getElementsBy(function(el) {return (YD.hasClass(el,'imgBorder') || YD.hasClass(el,'imgBorderOn'))},'img');
for (i=0; i < oLst.length ; i++) {
if (oLst[i].title && oLst[i].title != '') oLst[i].title = '';
if (oLst[i].alt && oLst[i].alt != '') oLst[i].alt = '';
}
}
YE.onContentReady('bodyWrapper', function() {if (!YD.hasClass(document.body, 'smugmug_ajax')) delHover()});
onPhotoShow.subscribe(function(){YE.onAvailable('mainImage', delHover)});
/*======================================*/
/*== Stop Auto Scrolling in Filmstrip ==*/
/*======================================*/
filmstripMove = 0;
/*============================*/
/*== Change Breadcrumb ==*/
/*============================*/
var objElement = document.getElementById("breadCrumbTrail")
if (objElement != null) {
var str = new String(objElement.innerHTML);
str = str.replace('>Ron Martinsen<', '>Home</a><');
objElement.innerHTML = str;
}
<script language="javascript">
1: document.title="Ron Martinsen Photography"</script>
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="imagetoolbar" content="false">
<LINK REL="SHORTCUT ICON"
HREF="http://bygates.googlepages.com/rmfavicon.ico">
In your navbar, you can link to any external site, also. For this user, I have added an external link to his blog, which opens in a new tab or window when clicked.
16 comments:
what an awesome tutorial! only one question... instead of hiding the horizontal lines that separate journal entries, is there a way to change the color of those lines? thanks!
Hi, yes, you can change the color of the journal entry separators by adding the following to your CSS in the advanced site-wide customization:
.journal_entry {border-color: #fff !important;}
Of course, use the color you wish in place of the #fff.
Hi Barb, do you know if and how I could change the updated box format (.. just want to see the date, not the time..).
Thanks !
Lou
Hey Lou, you might want to try using help@smugmug.com for support questions - the folks there are very helpful and you'll get a quicker response.
Love the codes!! But is there a way to make the galleries closer together?
www.davidbwalkerphotography.com
David, that's probably a good question for help@smugmug.com. While support for custom programming might be limited, if you are lucky they might just know the answer off the top of their head. In fact, if you are lucky Barb might respond to your mail.
Thanks Ron,
Also how do i make my banner not look small?
what should the width and height be when i make it in photoshop??
david
www.davidbwalkerphotography.com
Hey Barb and Ron,
I noticed in your code - for the slideshow background - you have it coded #ssContainer. Do you have to identify it anywhere else in order for it to read. I was testing out the code and when I checked it out - it's being identified as userbio instead of BioSS. Any idea what I did wrong?
Hi Barb and Ron.
I tested out your code in the tutorial - which is one of the best and easiest to follow. Thanks. My question pertains to the background image behind the slide show. I have one that I tried but could not get it to work. I noticed you have it identified by sscontainer...which I added per the tutorial but I don't see it anywhere - do I have to id it anywhere else? Stuck on that part.
Hi Mark,
For support questions, you'll get the fastest response by visiting the SmugMug support forum at DGrin, or by sending an email to the support desk.
Script typo, should be ';' at the end of the breadCrumbTrail statement below:
/*============================*/
/*== Change Breadcrumb ==*/
/*============================*/
var objElement = document.getElementById("breadCrumbTrail")
Hi,
Thanks for the wonderful tutorial about customizing the smugmug website.
I had a question like is it possible to show randomly the pictures in all the galleries in the homepage slideshow?
thanks for the help
This is great but frustrating, there must be some typos in the code. PLEASE FIX and update this page.
Paul,
This is meant to be an example of what is possible. My site works and this code was pasted from its actual working code.
This isn't for beginners though. It's assumed you are a seasoned web programmer who is fluent in CSS, HTML and JScript. If you aren't then this article is not for you and you should consider hiring a web programmer.
Ron
Hi. I wanted to try out the copyright footer ("RMFooter"). For the life of me, I do not know how to center it. What do I need to edit to center the RMFooter?
#cobrand_footer {display: none !important; width:943px; margin:0 auto;}
#cobrand_footer .nav,
#cobrand_footer .text {font:8pt verdana, arial, sans-serif; color: #404040; margin-top: -5px; }
#cobrand_footer #footer {width:943px; text-align:left; font:8pt verdana, arial, sans-serif; color:#404040;}
#RMFooterWrapper {width:943px; margin:0 auto;}
#RMFooter {font:8pt verdana, arial, sans-serif; color: #aaa; margin-top: -4px; float: right;}
My guess is that you'll need to change:
text-align:left
to
text-align:center
I don't maintain that site anymore so it's only their for illustration purposes. The code and CSS featured here is live still though.
Post a Comment