This customisation gives you the ability to add a login box on your webpage that asks your visitor to enter their name, they will then be sent to the gallery you've chosen for them. If the gallery has a password set on it, your visitor will be asked to enter their password before their photos will be shown.
This allows customers to browse to your website to collect their photos, without everybody being able to see a complete list of your customers' names.
Using this service requires me to create an account for you first, so please get in touch with me at n.sherlock@gmail.com and include a link to your SmugMug site. I'll then assign you a username and password to use :).

Installation

Site organisation

I'm going to assume that you have a "Clients" folder, with a bunch of Unlisted client galleries inside that you would like to control with a login page. Please mark the galleries as "Unlisted" before you add them to this system, because when you mark them as unlisted, their link changes (to add some random numbers and letters on the end.)

Create a login page

We'll start by turning your Clients folder into a client login page. Go to your Clients folder and enter the customiser. If "All Folders" is selected in the top right of the customiser, hit the "make this folder custom" link so that you can edit this folder separately from your regular folders:
Untitled photo
Add an HTML block to the top of the page, then add this HTML code to it:
On the second line of code, there's a section "FILL YOUR USERNAME IN HERE", which you need to replace with the username that I've emailed to you, so if your username is Nick, this is what that line should be changed to:
Once you've saved that, here's what the login form will look like on your page:
For example, "Bob Saget"
Underneath the login form should be the default SmugMug list of galleries inside your Clients folder, but because these galleries are set to Unlisted, they won't be visible to your visitors.

Add a new client

Okay, so let's say that you've just finished post-processing a shoot for a client called "Kousaka Kirino", and you're ready to publish it to SmugMug.
Upload your photos to a new gallery inside your Clients folder, and set that gallery to "Unlisted" so that nobody else can see it. Make a note of the URL in your browser's address bar when you visit the new gallery. For example, Kirino's gallery is at:
Next, you need to add an entry for this client on the login system. For that, go to the Client Redirector Control Panel. You can log in to that page using the username and password I have sent you.
After adding an entry using the client's name (Kousaka Kirino) and the address of their photo gallery, here's what the list of redirects looks like:
Untitled photo
You can see that there was already an entry I had created earlier for a customer called "Gokou Ruri", and two special pages. Those special pages are displayed when the name the customer entered wasn't found, or when they didn't enter a name at all. I've created pages for both of those messages on my SmugMug site, and customised them to remove everything on the page except for a text block that explains what went wrong.
Give it a try! Scroll back up the page to the example login box, and see what happens when you enter "Kousaka Kirino". See what happens when you enter a name that doesn't exist. See what happens when you enter "Gokou Ruri" (the password I've set on that gallery in SmugMug is "password").

Host this on your own server

If you've got your own website which supports PHP pages, you can host a version of the login system on there instead. Use Notepad, TextEdit or some other plain text editor (not Microsoft Word) to create a file called "redirect.php", with this content:
You add new clients to this code by editing the list of links at the top of the file (you'll see that I've created several example links already, just copy the layout of those lines and edit them for your own clients.)
Upload this edited file somewhere on your website, for example, at http://www.mywebsite.com/redirect.php . On the code for your login form on your SmugMug site, change the "action" on the first line of code to the location of redirect.php on your website (i.e. http://www.mywebsite.com/redirect.php). That's it, you're done! You will need to edit and reupload redirect.php when you want to add more clients.
Powered by SmugMug Owner Log In