• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support Legacy SmugMug Customization Pros can insert their own Contact Links

Need some help with your New SmugMug Site?

Dgrin Challenges

Our Challenges moderator has lined up an new set of challenges for you. The Weekly Word Challenge. Get all the details and participate in the conversation Weekly Word Challenge.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Looking for a little challenge? The Dgrin Mini-Challenges are a great way to challenge yourself. Take a moment to look through past winners and find the current Mini Challenge here.

From Around the Net

Enjoy a few of our favorite articles from around the 'net. If you have something you think we should see, post it here and we'll have a look.

Journeys

Landscapes

Sports

 
Thread Tools Display Modes
Page 1  of  33
1 2 3 4 5 11 Last »
Old Oct-08-2010, 06:31 PM
#1
jfriend is offline jfriend OP
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>
If it goes in your custom navbar, then make sure it has <li> and </li> around it like your other navbar items. You can change the part in red to say anything you want it to say, but the other parts must remain as they are shown here.




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 11:11 AM.
Old Oct-08-2010, 06:35 PM
#2
Andy is offline Andy
Bicameral
Andy's Avatar
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.
Old Oct-08-2010, 06:38 PM
#3
jfriend is offline jfriend OP
Scripting dude-volunteer
Quote:
Originally Posted by Andy View Post
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.
Apparently, Smugmug only inserts a thumbnail version of your bio photo (the Th size). This thread shows how you can replace it with any image (of most any size that you want) and you don't even have to use the bio photo (which is used for some other 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
Old Oct-08-2010, 09:12 PM
#4
Allen is online now Allen
"tweak 'til it squeaks"
Allen's Avatar
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 - Just a volunteer here having fun :D
My Website my Blog
Mozilla Firefox Web Developer Firebug
Customization FAQ Banner/Navbar/Slideshow Tutor
Old Oct-08-2010, 09:33 PM
#5
jfriend is offline jfriend OP
Scripting dude-volunteer
Quote:
Originally Posted by Allen View Post
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.
When a viewer is logged out, Smugmug has no way of knowing your sender's email address so you, as the sender of the email have to specify what your email address is. When you are logged in to Smugmug, it knows your email so it prefills it. Unless I'm not understanding what you're asking about, I think it's working how Smugmug designed it.
__________________
--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
Old Oct-08-2010, 09:46 PM
#6
Allen is online now Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by jfriend View Post
When a viewer is logged out, Smugmug has no way of knowing your sender's email address so you, as the sender of the email have to specify what your email address is. When you are logged in to Smugmug, it knows your email so it prefills it. Unless I'm not understanding what you're asking about, I think it's working how Smugmug designed it.
Duh, I first looked logged in and saw my email filled in. Logged out I saw
none. Brain f..t, sender has to fill in their email. False alarm.
__________________
Al - Just a volunteer here having fun :D
My Website my Blog
Mozilla Firefox Web Developer Firebug
Customization FAQ Banner/Navbar/Slideshow Tutor
Old Oct-12-2010, 05:05 PM
#7
ImissFilm is offline ImissFilm
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
Old Oct-12-2010, 07:07 PM
#8
jfriend is offline jfriend OP
Scripting dude-volunteer
Quote:
Originally Posted by ImissFilm View Post
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
As it's currently written, it will only work with a custom navbar because it requires you set some parameters that aren't settable in EZC. I could write version of the script that would work with a navbar made in Easy Customizer if you want.
__________________
--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
Old Oct-12-2010, 07:41 PM
#9
lavenderphoto is offline lavenderphoto
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.
Old Oct-12-2010, 07:47 PM
#10
jfriend is offline jfriend OP
Scripting dude-volunteer
Quote:
Originally Posted by lavenderphoto View Post

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.
First, make sure you're logged out. Then, try your own contact link. Then, try the contact link in the Smugmug footer on your homepage and send a unique message from both such that you can tell which message is which.

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
Old Oct-12-2010, 08:37 PM
#11
ImissFilm is offline ImissFilm
Big grins
Quote:
Originally Posted by jfriend View Post
As it's currently written, it will only work with a custom navbar because it requires you set some parameters that aren't settable in EZC. I could write version of the script that would work with a navbar made in Easy Customizer if you want.
That would be great and much appreciated!
Old Oct-12-2010, 08:46 PM
#12
jfriend is offline jfriend OP
Scripting dude-volunteer
Quote:
Originally Posted by ImissFilm View Post
That would be great and much appreciated!
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
Old Oct-12-2010, 10:24 PM
#13
ImissFilm is offline ImissFilm
Big grins
Quote:
Originally Posted by jfriend View Post
Please provide a link to your site.
http://www.michaelsheehanphotography.com/
Old Oct-13-2010, 07:21 AM
#14
lavenderphoto is offline lavenderphoto
Beginner grinner
Quote:
Originally Posted by jfriend View Post
First, make sure you're logged out. Then, try your own contact link. Then, try the contact link in the Smugmug footer on your homepage and send a unique message from both such that you can tell which message is which.

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.

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
Old Oct-13-2010, 07:31 AM
#15
jfriend is offline jfriend OP
Scripting dude-volunteer
Quote:
Originally Posted by lavenderphoto View Post
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
If you are not getting either email, then the issue has nothing to do with this customization and something to do with either the contact email configuration at Smugmug or your own email account so that's where we need to look.

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
Old Oct-13-2010, 08:22 AM
#16
jfriend is offline jfriend OP
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
Old Oct-13-2010, 08:23 AM
#17
jfriend is offline jfriend OP
Scripting dude-volunteer
Quote:
Originally Posted by ImissFilm View Post
I've updated the script so you can now use it with a navbar created in Easy Customizer. Let me know if you have any questions doing so.
__________________
--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
Old Oct-13-2010, 08:24 AM
#18
lavenderphoto is offline lavenderphoto
Beginner grinner
Quote:
Originally Posted by jfriend View Post
If you are not getting either email, then the issue has nothing to do with this customization and something to do with either the contact email configuration at Smugmug or your own email account so that's where we need to look.

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).
Fixed! Turns out I was assuming the email used for contact was the one setup in the control panel under "Settings". I guess I never properly set up the one on in the control Panel "Pros" setting. Everything is working now.

THANKS
Old Oct-13-2010, 09:14 AM
#19
natemess is offline natemess
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
Old Oct-13-2010, 09:28 AM
#20
jfriend is offline jfriend OP
Scripting dude-volunteer
Quote:
Originally Posted by natemess View Post
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
OK, it took you moments to find the one configuration that I purposely chose not to support which is someone who uses both an EZC navbar and custom HTML links (you have them in your biobox). I didn't think that would be very likely. Anyway, I've updated the code in post #1 so that that configuration is now supported. If you just update your copy of the code, it should start working for you. Let me know if the new version makes it work for you.
__________________
--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
Page 1  of  33
1 2 3 4 5 11 Last »
Tell The World!  
Similar Threads Thread Starter Forum Replies Last Post
Contact Information stinky Feet Legacy SmugMug Customization 4 Aug-04-2010 06:52 AM
Contact page question Jamesbjenkins Legacy SmugMug Customization 1 Jul-10-2010 03:26 AM
navbar - logon and links don't align properly ChancyRat Legacy SmugMug Customization 4 Jun-20-2009 08:45 AM
Customizing 'Links' other on Navbars... Amos Legacy SmugMug Customization 6 Jun-18-2009 07:25 PM
Links of Use to Photographers pathfinder Technique 3 Mar-13-2005 02:08 PM


Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump