Options

Redirect to current page after Smugmug Login

FergusonFerguson Registered Users Posts: 1,339 Major grins

On my pages I have some HTML that includes the following:

  <span style="background-color:black"> 
  Smugmug - 
<a class="leflogin" href="https://secure.smugmug.com/login?goTo=https://www.captivephotons.com/">Login</a>
<a class="leflogout" href="https://secure.smugmug.com/logout?goTo=https://www.captivephotons.com/">Logout</a>
  </span>

This provides a link that someone not logged in can login, or logged in can logout. It mostly works fine, the problem is the goTo is absolute, and takes me unconditionally to the home page. The leflogin and leflogout classes are derived similar to:

.leflogout {
  display: none;
}

.sm-user-loggedin .leflogout {
  display: inline; 
}

What I would like to do is have it take me back to the page one was in when it was clicked. That's easy with Javascript but I do not see a way to do it with CSS. Unless there's already some magic in SM's pages that will do it?

Comments

  • Options
    Lille UlvenLille Ulven Registered Users Posts: 567 Major grins

    Well, the easy way would be to include the Login/Logout Link from Smugmug into your Menu, at least for the Logout it does take you back to where you were. For the Login unfortunately not so much, which probably is a bug to start with.

    https://www.lilleulven.smugmug.com - The Photos of my travels
  • Options
    FergusonFerguson Registered Users Posts: 1,339 Major grins

    Thanks, yes in the menu that works, I was hoping for a link, the menu is already pretty busy. And since I rarely log out, it's the login I really want to work. SM logs me out it seems somewhere between every few days, and every few minutes, for reasons I have never understood.

  • Options
    AllenAllen Registered Users Posts: 10,011 Major grins
    edited January 28, 2018

    It's really a pita when I see something like a caption or keywords that need editing and after quickly logging in I lose where that was. I complained about this years ago.

    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins

    Normal browsing, uploading, editing, etc of your site should keep you logged in for ~one month.
    Accessing more secure sections like Account Settings will ask for your login credentials once per day.

    dGrin Afficionado
    Former SmugMug Product Team
    aaron AT aaronmphotography DOT com
    Website: http://www.aaronmphotography.com
    My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
  • Options
    FergusonFerguson Registered Users Posts: 1,339 Major grins

    @leftquark said:
    Normal browsing, uploading, editing, etc of your site should keep you logged in for ~one month.
    Accessing more secure sections like Account Settings will ask for your login credentials once per day.

    Yeah, we've had this conversation before, and I know that's the plan, and that's a fine plan, and I am reasonably sure it never exceeds those time frames, but I definitely get logged out much more frequently than that from just normal organizer/customize stuff. Then I hit my login, then as Allen points out, it's a bit of a pain to navigate back to what you wanted to fix.

    Yet if I try to reproduce it (which I just did for maybe 5 minutes) I cannot.

Sign In or Register to comment.