Show
Ignore:
Timestamp:
07/31/08 01:18:09 (16 months ago)
Author:
bsmith
Message:

adding vanilla+search+tags

Files:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Vanilla/readme_javascript.txt

    r922 r924  
    66</mt:Ignore> 
    77<$mt:var name="show_userpic" value="1"$> 
     8 
     9/* MOVABLE TYPE CORE JAVASCRIPT *****************************************************************/ 
     10 
     11/* Legacy Function Mappings *****************************************************************/ 
     12/* The following functions are here to support legacy MT templates. If you have refreshed your JavaScript template but still use olderMT comment templates, you may need to uncomment this block in orderfor those templates to work properly. Simply remove the wrapping'mt:Ignore' tag to do so. */ 
     13function hideDocumentElement(id) { return mtHide(id) } 
     14function showDocumentElement(id) { return mtShow(id) } 
     15function individualArchivesOnLoad() { return mtEntryOnLoad() } 
     16function writeCommenterGreeting() { return mtShowGreeting() } 
     17function rememberMe(f) { return mtRememberMe(f) } 
     18function forgetMe(f) { return mtForgetMe(f) } 
     19function getXmlHttp() { return mtGetXmlHttp() } 
    820 
    921/* Blog Variables *****************************************************************/ 
     
    2133function mtGetXmlHttp() // Returns a XMLHttpRequest object (for Ajax operations). 
    2234 
    23 /* Cookie *****************************************************************/ 
     35/* Authentication Functions *****************************************************************/ 
    2436var mtCookieName = "<$mt:UserSessionCookieName$>"; // The cookie name to use for storing the blog-side comment session cookie. 
    2537var mtCookieDomain = "<$mt:UserSessionCookieDomain$>"; 
     
    3143function mtBakeUserCookie(u) // Serializes a user object into a string, suitable for storing as a cookie. 
    3244function mtUnbakeUserCookie(s) // Unserializes a user cookie and returns a user object with the restored state. 
    33  
    34 /* Login Functions *****************************************************************/ 
    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. 
     45#_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 
     46function mtSaveUser(f) // Persists a copy of the current user cookie into the browser cookie stash. 
    3647function mtClearUser() // Clears the blog-side user cookie. 
    3748profile operation. 
     
    4859    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. 
    4960    function mtEntryOnUnload() // ** 
     61    mtAttachEvent('usersignin', mtUserOnLoad); // ** 
     62 
    5063    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 
    5264    function mtRememberMeOnClick(b) // Called when the 'Remember me' checkbox is changed. If the checkbox is cleared, the cached user cookie is immediately cleared. 
    5365    function mtReplyCommentOnClick(parent_id, author) // Handles the action of the 'Reply' links. 
    5466    function mtSetCommentParentID() // Sets the parent comment ID when replying to a comment. 
     67 
    5568    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. 
    5669    function mtCommentSessionVerify(app_user) // ** 
     70    function mtUserOnLoad() // **Function to hide/show/prepopulate fields based upon type of user that has authenticated 
     71 
    5772    function mtCommentFormOnFocus() // Called when an input field on the comment form receives focus. 
    5873    function mtShowCaptcha() // Displays a captcha field for anonymous commenters. 
     74 
     75    <mt:Ignore> 
     76    /* user object 
     77        -- saved in user cookie -- 
     78        u.name (display name) 
     79        u.url (link to home page) 
     80        u.email (for anonymous only) 
     81        u.userpic (url for commenter/author) 
     82        u.profile (link to profile) 
     83        u.is_trusted (boolean) 
     84        u.is_author (user has posting rights) 
     85        u.is_banned (banned status; neither post/comment perms) 
     86        u.can_post (has permission to post) 
     87        u.can_comment (has permission to comment) 
     88 
     89        -- status fields -- 
     90        u.is_authenticated (boolean) 
     91        u.is_anonymous (user is anonymous) 
     92    */ 
     93    </mt:Ignore> 
    5994 
    6095/* Initialize *****************************************************************/ 
     
    66101/* Date Formatting *****************************************************************/ 
    67102function mtRelativeDate(ts, fds) // Displays a relative date. 'ts' is a Date object, 'fds' is a string of the date which will be displayed if the given date is older than 1 week. 
     103    // ** extra closing "}" after this function 
    68104 
    69 /* END Movable Type Javascript *****************************************************************/ 
     105/* END Movable Type Core Javascript *****************************************************************/ 
     106 
     107 
     108 
     109/* MOVABLE TYPE COMMUNITY SOLUTION FUNCTIONS *****************************************************************/ 
     110 
     111function conditional_block(cond, id) // ** 
     112 
     113function mtScore(entry_id) // Functions for scoring entries. Scoring requires blog context, it is thus conditioned. 
     114function mtUpdateScores() // ** 
     115function mtScore_cb(s_hash) // ** 
     116 
     117function insert_score(s_hash, id, div_id, span, span_else) // Legacy functions for favoriting entries 
     118var favorite_cb_callbacks = []; 
     119function favorite_cb(s_hash) // ** 
     120function anchor(id, eid, cl, score) // ** 
     121function attachEvent(element, eventName, func) // ** 
     122function favorite(evt, entry_id, score_span) // ** 
     123 
     124function script_follow(id) // Functions to follow/leave feature 
     125function script_leave(id) // ** 
     126function follow(user_info) // ** 
     127function leave(user_info) // ** 
     128 
     129// Utility functions 
     130req = null; // ** Not used anywhere? 
     131function getCommenterName() // ** 
     132function trimString (str) // ** 
     133DOM // ** review 
     134function switchTabs( id, el ) // ** 
     135function defaultInputFocus( event ) // ** 
     136function defaultInputBlur( event ) // ** 
     137function setupInputDefault() // ** 
     138function mtSetUser(u) // Assigns a user object as the actively logged in user; also saves the user information in a browser cookie.