Creating a Sign-In Link on Your Blog
mtSignInOnClick function is provided by Movable Type and takes as a single parameter the ID of the HTML element whose contents will be replaced with HTML indicating the user’s current logged in state.
In the above example, if a user clicks the Sign In link on the blog, Movable Type will take them to the login screen. After they have logged in, Movable Type will direct the user back to the page they originated from. It will then replace the contents of the
<div> element with the id of “signin-content” with a very simple welcome message and a link for the user to click to sign out.
The first line,
mtAttachEvent intercepts requests to login and then invokes the
mtUpdateSignInWidget function. The
The second link forces this
mtUpdateSignInWidget function to be run when the page is loaded and ensures that the page properly reflects the visitors current logged in state.