|
|
Thread Tools | Display Modes |
|
#1
|
|
|
Hurry up and wait
|
Simple way to direct a customer to a gallery that hasn't been created yet
I'm working on setting up a simple way to allow a customer to find the gallery containing the images from their photo session. I thought NiceNames would be perfect for this because I could write down a "session ID" in the form of "SessionNameSessionDate", for example "Smith091201" or "eagle100215" on the back of my card and hand it to them at the end of the photo session.
1) Take photos 2) Give them card with session ID 3) They go to my website (external from Smugmug) 4) Enter the session ID in the form I provide 5) Instantly redirects them to their unlisted gallery on Smugmug The Session ID and NiceName would be identical. The script on my page would do a simple redirect to www.mysmugsite.com/sessioncategory/[Session ID entered in my form] Unfortunately session ID's do not work with unlisted galleries so this very easy to maintain simple just won't work. Instead I will need to manually maintain my own external database or lookup table that maps a session ID to a smugmug gallery unique URL. Can anyone think of an easier (automatic) way to do this (like what the nicenames would give me). P.S. It would be nice if there was just an option in the Smugmug Control Panel / Settings / Site Privacy and Security that would ask "Allow Nicenames for unlisted galleries"
__________________
Bill Gerrard Photography - Facebook - Interview - SmugRoom: Useful Tools for SmugMug |
|
|
|
|
#2
|
|
|
SmugMug Support Hero
|
Hi,
Nicenames do work in unlisted galleries. |
|
|
|
|
#3
|
||
|
Scripting dude-volunteer
|
Quote:
Here's the nicename URL to an unlisted gallery of mine. Try going there (when you are not logged in or when you don't have any Smugmug employee superpowers): http://jfriend.smugmug.com/Other/Color-Calibration-Images-old. You will just end up at the category level, not at the gallery.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#4
|
|||
|
Hurry up and wait
|
Quote:
Quote:
As I said earlier... It would be nice if there was just an option in the Smugmug Control Panel / Settings / Site Privacy and Security that would ask "Allow NiceNames for unlisted galleries? Yes/No" I'm going to look into the API to see if I can build something that can retrieve the albumID_Key based on me giving it a NiceName URL to a gallery, or if I can't do that, maybe I can use the API to pull down *all* gallery names/URLs from my account and grep for the NiceName match then redirect to the matching URL. As I said I want to automate this process and that little option in the control panel would save me a lot of time...
__________________
Bill Gerrard Photography - Facebook - Interview - SmugRoom: Useful Tools for SmugMug |
||
|
|
|||
|
#5
|
||
|
Scripting dude-volunteer
|
Quote:
Customization #14 here gives you the ability to hide things.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#6
|
|
|
Hurry up and wait
|
John, you got me thinking. I don't want to hide via CSS because the categories and galleries would still be visible to anyone viewing the source. Also I don't want the other galleries accessible to people viewing their own gallery within the Sessions category.
However based on your comments I came up with another solution, that also nicely solves another issue I knew I was going to have--what if someone tries viewing a gallery that doesn't exist... I am using a bit of javascript to redirect anyone (not logged in) who tries viewing the category page back to my "enter your session ID" page, this logic also redirects them back to my "enter your session ID" page when they try viewing a gallery that doesn't exist because Smugmug automatically redirects to the category page. If anyone is interested, here is the logic (code is in my Top Javascript and it is executed from the Custom Header. Code:
function redirectCategory() { // called from custom header
// prevent access to a category page; redirecting user to alternate page
if (YD.hasClass(document.body, 'loggedIn')) // don't run when logged in
return;
re = /my.smugmugdomain.com\/CategoryName$/i; // case insensitive
tmp = window.location.href;
if (re.test(tmp)) {
window.location.href = "http://url.to/somepage.html";
}
}
Thanks again John for sparking the idea!
__________________
Bill Gerrard Photography - Facebook - Interview - SmugRoom: Useful Tools for SmugMug |
|
|
|
|
#7
|
|
|
Major grins
|
I'd use Vanity URLs (or whatever they call em). Javascript redirects that give simple names. It's documented in the customization forum somewhere... maybe someone can post a link.
Dave |
|
|
|
|
#8
|
||
|
Scripting dude-volunteer
|
Quote:
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#9
|
|
|
Hurry up and wait
|
Yes, I've got lots of vanity URLs, been using them for a few years now, but they are a manual process (plus they bloat the code that has to be read by a browser every time someone views a page, whether they are using them or not).
The simple system I've set up for these photo sessions is completely automatic. I only have to create a gallery and specify the NiceName that I gave the customer. The customer enters the nicename in the form on my website and their gallery is displayed.
__________________
Bill Gerrard Photography - Facebook - Interview - SmugRoom: Useful Tools for SmugMug |
|
|
|
| Tell The World! | |
| Thread Tools | |
| Display Modes | |
|
|