Show
Ignore:
Timestamp:
07/30/08 00:08:49 (16 months ago)
Author:
bsmith
Message:

various updates

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Vanilla/templates/vanilla+authentication/readme_javascript.txt

    r916 r919  
    2626var mtCookiePath = "<$mt:UserSessionCookiePath$>"; 
    2727var mtCookieTimeout = <$mt:UserSessionCookieTimeout$>; 
    28 function mtSaveUser(f) // Persists a copy of the current user cookie into the browser cookie stash. 
    29 function mtClearUser() // Clears the blog-side user cookie. 
    3028function mtSetCookie(name, value, expires, path, domain, secure) // Sets a browser cookie. 
    3129function mtGetCookie(name) // Retrieves a browser cookie. 
     
    3533 
    3634/* Login Functions *****************************************************************/ 
    37 #_login/#_logout // If request contains a '#_login' or '#_logout' hash, use this to also delete the blog-side user cookie, since we're coming back from a login, logout or edit profile operation. 
     35#_login/#_logout // If request contains a '#_login' or '#_logout' hash, use this to also delete the blog-side user cookie, since we're coming back from a login, logout or edit function mtSaveUser(f) // Persists a copy of the current user cookie into the browser cookie stash. 
     36function mtClearUser() // Clears the blog-side user cookie. 
     37profile operation. 
    3838function mtFetchUser(cb) // Issues a request to the MT comment script to retrieve the currently logged-in user (if any). 
    3939function mtUpdateSignInWidget(u) // A routine that displays various phrases based upon users authenticated status 
    4040function mtGetUser() // Retrieves an object of the currently logged in user's state. If no user is logged in or cookied, this will return null. 
    41 function mtSaveUser(f) // Persists a copy of the current user cookie into the browser cookie stash. 
    4241function mtSignIn() // Handles the action of the "Sign in" link. First clears any existing user cookie, then directs to the MT comment script to sign the user in. 
    4342function mtSignInOnClick(sign_in_element) // **Handles the action of the "Sign in" link. 
    4443function mtSetUserOrLogin(u) // **Handles branching between users cookied in app vs not logged in 
    45 function mtSignOut(entry_id) // Handles sign out from the web site. First clears any existing user cookie, then direts to the MT comment script to sign the user out. 
     44function mtSignOut(entry_id) // Handles sign out from the web site. First clears any existing user cookie, then directs to the MT comment script to sign the user out. 
    4645function mtSignOutOnClick() // Handles the action of the "Sign out" link. 
    4746 
    48 /* Commenting *****************************************************************/ 
    49 function mtEntryOnLoad() // Called when an entry archive page is loaded. This routine controls which elements of the comment form are shown or hidden, depending on commenter type and blog configuration. 
    50 function mtEntryOnUnload() // ** 
    51 function mtShowGreeting() // Handles the display of the greeting message, depending on what kind of user is logged in and blog comment policy. 
    52 function mtUserOnLoad() // Function to hide/show/prepopulate fields based upon type of user that has authenticated 
    53 function mtRememberMeOnClick(b) // Called when the 'Remember me' checkbox is changed. If the checkbox is cleared, the cached user cookie is immediately cleared. 
    54 function mtReplyCommentOnClick(parent_id, author) // Handles the action of the 'Reply' links. 
    55 function mtSetCommentParentID() // Sets the parent comment ID when replying to a comment. 
    56 function mtCommentOnSubmit(f) // Called when comment form is sent. Required parameter: Form DOM object of comment form. If form has a 'bakecookie' member, it will be used to signal storing the anonymous commenter information to a cookie. If form has a 'armor' member, it will be used to store a token that is checked by the comment script. 
    57 function mtCommentSessionVerify(app_user) // ** 
    58 function mtCommentFormOnFocus() // Called when an input field on the comment form receives focus. 
    59 function mtShowCaptcha() // Displays a captcha field for anonymous commenters. 
     47    /* Commenting *****************************************************************/ 
     48    function mtEntryOnLoad() // Called when an entry archive page is loaded. This routine controls which elements of the comment form are shown or hidden, depending on commenter type and blog configuration. 
     49    function mtEntryOnUnload() // ** 
     50    function mtShowGreeting() // Handles the display of the greeting message, depending on what kind of user is logged in and blog comment policy. 
     51    function mtUserOnLoad() // Function to hide/show/prepopulate fields based upon type of user that has authenticated 
     52    function mtRememberMeOnClick(b) // Called when the 'Remember me' checkbox is changed. If the checkbox is cleared, the cached user cookie is immediately cleared. 
     53    function mtReplyCommentOnClick(parent_id, author) // Handles the action of the 'Reply' links. 
     54    function mtSetCommentParentID() // Sets the parent comment ID when replying to a comment. 
     55    function mtCommentOnSubmit(f) // Called when comment form is sent. Required parameter: Form DOM object of comment form. If form has a 'bakecookie' member, it will be used to signal storing the anonymous commenter information to a cookie. If form has a 'armor' member, it will be used to store a token that is checked by the comment script. 
     56    function mtCommentSessionVerify(app_user) // ** 
     57    function mtCommentFormOnFocus() // Called when an input field on the comment form receives focus. 
     58    function mtShowCaptcha() // Displays a captcha field for anonymous commenters. 
    6059 
    6160/* Initialize *****************************************************************/