|
|
Thread Tools | Display Modes |
|
#1
|
|
|
Scripting dude-volunteer
|
Pros can insert their own Contact Links
Since January 2010, for pro account users, Smugmug has had a Contact link in the default footer that would allow your customers to contact you directly by email (if you filled out the email contact information in the control panel).
Without doing anything other than configuring the proper email address in the control panel, that link works for you (if you have a pro account). But, many pros have their own site customization and want to have a "Contact Me" link somewhere else in their site customization (like in their navbar or in their About page). Here's what I've done on my site: ![]() Here's how you can make one of those: Step 1: Install the Code Copy this code into your Bottom Javascript in the Advanced Customization. Make sure you get everything and don't miss any of the beginning or end of the code: Code:
//--------------------------------------------------------------------------------------------------
// Install Email Contact Link (for pro accounts only)
//
// Version 1.1
//--------------------------------------------------------------------------------------------------
YE.onDOMReady(InitMyContactButton);
function InitMyContactButton()
{
InitMyContactButton.extraContactUsButtons = new Array;
var contacts = Sizzle(".customContactButton");
// look in Easy Customizer navbar too
var navEntries = Sizzle("#customNav li a");
for (var j = 0; j < navEntries.length; j++)
{
var str = navEntries[j].href;
if (str.search(/\/customcontact/i) != -1)
{
navEntries[j].onclick = function () {return false;};
contacts.push(navEntries[j]);
break;
}
}
var nick, o, matches;
// see if the nickname is already defined in the page
try {
nick = NickName || SM.hostConfig.nickname ; // get standard nickname
} catch (e) {}
// see if the nickname is in the URL
if (!nick)
{
try {
matches = window.location.host.match(/^(www.)?(.*)\.smugmug\.com$/i);
nick = matches[2];
} catch (e) {}
}
// see if we can get the nickname from one of the built-in contact links on the page
if (!nick)
{
// hack - NickName doesn't exist on some pages so we try to pull it from the password prompt or the standard footer
o = YD.get("contactUsButtonWrapper") || YD.get("contactUsButtonWrapperFooter");
matches = o.onmouseover.toString().match(/ownerNickName:\s*'([^']+)'/)
if (matches && matches.length > 1)
{
nick = matches[1];
}
}
for (var i = 0; i < contacts.length; i++)
{
InitMyContactButton.extraContactUsButtons.push(new SM.buttons.contactUs
(
contacts[i].parentNode,
contacts[i],
{
buttonText: 'Contact',
panelTitle: 'Contact the gallery owner',
currentPage: window.location.toString(),
currentPageOverride: '',
referringPage: '',
pro: '',
modal: 'true',
popupName: 'contactOwner',
uniqueID: 'myContactPanel' + InitMyContactButton.extraContactUsButtons.length,
ownerNickName: nick,
width: '755px',
albumID: '',
additionalParams: 'FooterContact'
}
));
}
}
Step 2: Insert Contact Link into your page For Easy Customizer created Navbars: If the place you want to put the conact link is in your navbar and you've created your navbar in the Easy Customizer, then create a navbar entry for your contact link. Enter whatever text you want it to say in the normal place (like "Contact Me"). Then, in place of the URL for the link, put "/customcontact". The script will look in the Easy Customizer navbar for an entry with that specify URL and automatically hook that up to the contact form. For custom navbars or anywhere else in your site: Insert an HTML link anywhere in your customization where you want the Contact link to be. For example, put it in your custom navbar or put it in the text of your about page or in your own custom footer. The HTML should look like this: Code:
<a href="/" onclick="return false;" class="customContactButton">Contact Me</a> Step 3: Modify the title of the Contact panel to your liking (optional) In the code (from step 1), the part shown in red can be modified to any text you want. Just make sure there's a leading quote and a trailing quote with a comma at the end and no quotes in the text itself. For example, instead of: panelTitle: 'Contact the gallery owner', you could change it to: panelTitle: 'Contact ShutterClick Photography', Step 4: Make sure your Customer Contact Email setting is set Go to Control Panel, Pros tab and find "Customer Contact Email". For this feature to work, you must set an email address for this setting. You can use the same email address as your smugmug account or you can use a different email address, but something must be configured or the contact email feature will not work. Notes: If you want your own photo to show up instead of the man in the image above, then set your bio photo and it will appear there. This single piece of code supports multiple contact links so you can have as many as you want. If you want one in your custom navbar, one in your about page and one in your custom footer, just implement step 1 and 3 once and then repeat step 2 as many places as you like. The code will find all your links in a given page and make them all work.
__________________
--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 Last edited by jfriend; Mar-05-2012 at 10:11 AM. |
|
|
|
|
#2
|
|
|
panasonikon
|
I'll add that you'll get YOUR photo on the form if you have a Bio photo chosen. No bio photo chosen? You get the cool moustache man with the TLR.
|
|
|
|
|
#3
|
||
|
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 |
|
|
|
||
|
#4
|
|
|
"tweak 'til it squeaks"
|
Shouldn't it be picking up the email address here? Mine's not.
Customer contact email > See middle of description. http://www.photosbyat.com/gallery/1790648_4zf2H Logged in I get my site email, not contact, which is correct. Logged out no email loads.
__________________
Al My Website my Blog Mozilla Firefox Web Developer Firebug Customization FAQ Banner/Navbar/Slideshow Tutor |
|
|
|
|
#5
|
||
|
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 |
|
|
|
||
|
#6
|
||
|
"tweak 'til it squeaks"
|
Quote:
none. Brain f..t, sender has to fill in their email. False alarm.
__________________
Al My Website my Blog Mozilla Firefox Web Developer Firebug Customization FAQ Banner/Navbar/Slideshow Tutor |
|
|
|
||
|
#7
|
|
|
Big grins
|
Thanks for this thread. Exactly what I was looking for. However, how do I put the link in my Nav bar? I used easy customize to make a nav bar. Do I have to create my own nav bar in the advanced custom mode to do this and put the code in there? Sorry, this is only my second day of trying to do anything like this.... thanks a lot
|
|
|
|
|
#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
|
|
|
Beginner grinner
|
trouble with pro contact link
![]() Have entered this contact link at the bottom of my page. However when I test it I do not get anything sent to my contact email. http://www.lavenderphotography.com/ Thanks for any help you can provide. |
|
|
|
|
#10
|
||
|
Scripting dude-volunteer
|
Quote:
If you get neither message, then your Smugmug account must not be set up with an appropriate contact email address or you're having trouble getting email right now (check your spam settings/folder). See the contact email setting in your control panel. If you get both, then things must be working now. If you get the one from the Smugmug link, but not the one from your custom link, then please let me know and I'll look into it further.
__________________
--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 |
|
|
|
||
|
#11
|
|
|
Big grins
|
That would be great and much appreciated!
|
|
|
|
|
#12
|
|
|
Scripting dude-volunteer
|
Please provide a link to your site.
__________________
--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 |
|
|
|
|
#13
|
|
|
Big grins
|
|
|
|
|
|
#14
|
||
|
Beginner grinner
|
Quote:
Still no luck I logged out and yet I do not get either email from the contact link at the bottom or my custom contact link. I even changed my contact email to my gmail account in case it is a problem with my hotmail. Is there a specific sender I should mark as safe so it is not viewed as spam in hotmail or gmail. Thanks |
|
|
|
||
|
#15
|
||
|
Scripting dude-volunteer
|
Quote:
First, go to the control panel, click on the Pros tab and look at what the customer contact email is set to. Verify that this is a proper email address and is where you are looking for the emails. The email comes from a Sender of "email@smugmug.com", but is marked "From" whoever sent it to you (so that when you reply, it goes to them not to Smugmug).
__________________
--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 |
|
|
|
||
|
#16
|
|
|
Scripting dude-volunteer
|
The script in post #1 and the relevant installation instructions have now been updated so you can have a custom contact link in a navbar created with Easy Customizer too.
__________________
--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 |
|
|
|
|
#17
|
||
|
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 |
|
|
|
||
|
#18
|
||
|
Beginner grinner
|
Quote:
THANKS |
|
|
|
||
|
#19
|
|
|
Beginner grinner
|
contact me navbar link isn't working on my homepage and galleries page
Hi,
I've followed all of the directions but the navbar link is only working partially. If you head to my site (natemessarra.com) you'll see that the "contact nate" navbar link works if you are happen to click on the link while viewing one of my gallery pages however if you are on the homepage or my alternate homepage (/galleries) and you click on the "contact nate" link it simply ends up redirecting the viewer back to my homepage... Any idea on why this is or how to fix it? Thanks, Nate |
|
|
|
|
#20
|
||
|
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 |
|
|
|
||
| Tell The World! | |
| Similar Threads | Thread Starter | Forum | Replies | Last Post | ![]() |
| Contact Information | stinky Feet | SmugMug Customization | 4 | Aug-04-2010 05:52 AM | |
| Contact page question | Jamesbjenkins | SmugMug Customization | 1 | Jul-10-2010 02:26 AM | |
| navbar - logon and links don't align properly | ChancyRat | SmugMug Customization | 4 | Jun-20-2009 07:45 AM | |
| Customizing 'Links' other on Navbars... | Amos | SmugMug Customization | 6 | Jun-18-2009 06:25 PM | |
| Links of Use to Photographers | pathfinder | Technique | 3 | Mar-13-2005 01:08 PM | |
| Thread Tools | |
| Display Modes | |
|
|