Changeset 919

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

various updates

Location:
trunk/Vanilla
Files:
7 added
14 modified

Legend:

Unmodified
Added
Removed
  • trunk/Vanilla/config.yaml

    r916 r919  
    1515        notes:  
    1616            - Lastn entries on Homepage 
    17             - Entry Detail for each 
     17            - Entry Detail 
    1818        templates: 
    1919            index: 
     
    100100                wrapper: 
    101101                    label: Wrapper 
    102     vanilla_authentication_userpics: 
     102    vanilla_authentication: 
    103103        label: Vanilla + Authentication & Userpics 
    104         base_path: templates/vanilla+authentication+userpics 
     104        base_path: templates/vanilla+authentication 
    105105        notes:  
    106106            - En/disable userpics in javascript 
     
    120120                wrapper: 
    121121                    label: Wrapper 
    122     vanilla_authentication_comments: 
    123         label: Vanilla + Authentication & Comments 
    124         base_path: templates/vanilla+authentication+comments 
    125         notes: 
    126             - foo 
     122    vanilla_comments: 
     123        label: Vanilla + Comments 
     124        base_path: templates/vanilla+comments 
     125        notes: 
     126            - Authentication 
     127            - Comments 
     128            - Comment reply links 
     129            - Comment Preview 
     130            - Comment Response 
    127131        order: 505 
    128132        templates: 
     
    150154                comment_response: 
    151155                    label: Comment Response 
    152     vanilla_authentication_comments_userpics: 
    153         label: Vanilla + Authentication & Comments w/ Userpics 
     156    vanilla_comments_userpics: 
     157        label: Vanilla + Comments w/ Userpics 
    154158        base_path: templates/vanilla+authentication+comments+userpics 
    155159        notes: 
    156             - foo 
     160            - Authentication w/ userpic 
     161            - Comments w/ userpics 
     162            - Comment reply links 
     163            - Comment Preview 
     164            - Comment Response 
     165            - En/disable userpics in javascript 
     166            - Use of community "edit profile" script is necessary to add userpics. The "edit profile" page assumes that you are using profiles and thus links to "view profile" screen. If using profiles is not desired, the "view profile" link can be removed from the "Profile Edit" Global System Template. 
    157167        order: 506 
    158168        templates: 
     
    180190                comment_response: 
    181191                    label: Comment Response 
     192    vanilla_create_entry: 
     193        label: Vanilla + Create Entry 
     194        base_path: templates/vanilla+create-entry 
     195        notes:  
     196            - Authentication 
     197            - Create Entry 
     198            - Entry Response 
     199        order: 507 
     200        templates: 
     201            index: 
     202                home: 
     203                    label: Homepage 
     204                    outfile: index.html 
     205                    rebuild_me: 1 
     206                create-entry: 
     207                    label: Create Entry 
     208                    outfile: create-entry.html 
     209                    rebuild_me: 1 
     210                javascript: 
     211                    label: JavaScript 
     212                    outfile: mt.js 
     213                    rebuild_me: 1 
     214            individual: 
     215                entry:  
     216                    label: Entry 
     217                    mappings: 
     218                        entry_archive: 
     219                            archive_type: Individual 
     220            module: 
     221                wrapper: 
     222                    label: Wrapper 
     223            system: 
     224                entry_response: 
     225                    label: Entry Response 
    182226 
    183 #  
    184227# - Organization 
    185 #     * Categories 
    186228#     * Tags 
    187 # - Create Entry 
    188 #     * category selector 
    189 #     vanilla: 
    190 #         label: 'Vanilla - Homepage + Entries' 
    191 #         base_path: 'templates/vanilla' 
    192 #         order: 100 
    193 #         templates: 
    194229# - Profiles + Userpics 
    195230#     * Userpics 
     
    216251#         order: 100 
    217252#         templates: 
     253# - Search 
     254# - Custom Fields 
    218255# - YUI Template 
  • trunk/Vanilla/templates/vanilla+archives/wrapper.mtml

    r891 r919  
    55    <title><$mt:BlogName encode_html="1"$></title> 
    66    <meta http-equiv="Content-Type" content="text/html; charset=<$mt:PublishCharset$>" /> 
    7     <meta name="generator" content="<$mt:ProductName version="1"$>" /> 
    87</head> 
    98<body> 
  • trunk/Vanilla/templates/vanilla+authentication/javascript.mtml

    r915 r919  
    181181<mt:Ignore> 
    182182/*** 
    183  * Persists a copy of the current user cookie into the browser cookie stash. 
    184  */ 
    185 </mt:Ignore> 
    186 function mtSaveUser(f) { 
    187     // We can't reliably store the user cookie during a preview. 
    188     if (is_preview) return; 
    189  
    190     var u = mtGetUser(); 
    191  
    192     if (f && (!u || u.is_anonymous)) { 
    193         if ( !u ) { 
    194             u = {}; 
    195             u.is_authenticated = false; 
    196             u.can_comment = true; 
    197             u.is_author = false; 
    198             u.is_banned = false; 
    199             u.is_anonymous = true; 
    200             u.is_trusted = false; 
    201         } 
    202         if (f.author != undefined) u.name = f.author.value; 
    203         if (f.email != undefined) u.email = f.email.value; 
    204         if (f.url != undefined) u.url = f.url.value; 
    205     } 
    206  
    207     if (!u) return; 
    208  
    209     var cache_period = mtCookieTimeout * 1000; 
    210  
    211     // cache anonymous user info for a long period if the 
    212     // user has requested to be remembered 
    213     if (u.is_anonymous && f && f.bakecookie && f.bakecookie.checked) 
    214         cache_period = 365 * 24 * 60 * 60 * 1000; 
    215  
    216     var now = new Date(); 
    217     mtFixDate(now); 
    218     now.setTime(now.getTime() + cache_period); 
    219  
    220     var cmtcookie = mtBakeUserCookie(u); 
    221     mtSetCookie(mtCookieName, cmtcookie, now, mtCookiePath, mtCookieDomain, 
    222         location.protocol == 'https:'); 
    223 } 
    224  
    225 <mt:Ignore> 
    226 /*** 
    227183 * Handles the action of the "Sign in" link. First clears any existing 
    228184 * user cookie, then directs to the MT comment script to sign the user in. 
  • 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 *****************************************************************/ 
  • trunk/Vanilla/templates/vanilla+authentication/wrapper.mtml

    r909 r919  
    55    <title><$mt:BlogName encode_html="1"$></title> 
    66    <meta http-equiv="Content-Type" content="text/html; charset=<$mt:PublishCharset$>" /> 
    7     <meta name="generator" content="<$mt:ProductName version="1"$>" /> 
    87    <script type="text/javascript" src="<$mt:Link template="JavaScript"$>"></script> 
    98</head> 
     
    1615    </div> 
    1716 
    18 <!-- end header --> 
     17<!-- end header --><hr /> 
    1918 
    2019 
     
    2221 
    2322 
    24 <!-- start footer --> 
     23<!-- start footer --><hr /> 
    2524 
    2625    <p><__trans phrase="_POWERED_BY"> and the Vanilla template set</p> 
  • trunk/Vanilla/templates/vanilla+comments+userpics/comment_preview.mtml

    r916 r919  
    11<mt:IncludeBlock module="wrapper"> 
     2     
     3    <mt:setvarblock name="html_head" append="1"> 
     4        <style type="text/css" media="screen"> 
     5            form { 
     6                width: 50%; 
     7            } 
     8        </style> 
     9    </mt:setvarblock> 
    210 
    311    <mt:SetVarBlock name="html_head"> 
     
    4553                    <input type="hidden" name="sid" value="" /> 
    4654                    <div id="comments-open-data"> 
    47                         <label for="comment-author"><__trans phrase="Name"></label> 
    48                         <input id="comment-author" name="author" size="30" value="<mt:If name="comment_preview"><$mt:CommentAuthor encode_html="1"$></mt:If>" onfocus="mtCommentFormOnFocus()" /> 
    49  
    50                         <label for="comment-email"><__trans phrase="Email Address"></label> 
    51                         <input id="comment-email" name="email" size="30" value="<mt:If name="comment_preview"><$mt:CommentEmail encode_html="1"$></mt:If>" onfocus="mtCommentFormOnFocus()" /> 
    52  
    53                         <label for="comment-url"><__trans phrase="URL"></label> 
    54                         <input id="comment-url" name="url" size="30" value="<mt:If name="comment_preview"><$mt:CommentURL encode_html="1"$></mt:If>" onfocus="mtCommentFormOnFocus()" /> 
     55                        <div> 
     56                            <label for="comment-author"><__trans phrase="Name"></label> 
     57                            <input id="comment-author" name="author" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     58                        </div> 
     59                        <div> 
     60                            <label for="comment-email"><__trans phrase="Email Address"></label> 
     61                            <input id="comment-email" name="email" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     62                        </div> 
     63                        <div> 
     64                            <label for="comment-url"><__trans phrase="URL"></label> 
     65                            <input id="comment-url" name="url" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     66                        </div> 
    5567                    </div> 
    5668                    <div id="comment-form-reply"<mt:IfCommentParent><mt:Else> style="display:none"</mt:IfCommentParent>> 
  • trunk/Vanilla/templates/vanilla+comments+userpics/entry.mtml

    r916 r919  
    11<mt:IncludeBlock module="wrapper"> 
     2     
     3    <mt:setvarblock name="html_head" append="1"> 
     4        <style type="text/css" media="screen"> 
     5            form { 
     6                width: 50%; 
     7            } 
     8        </style> 
     9    </mt:setvarblock> 
    210 
    311    <h1><$mt:EntryTitle$></h1> 
     
    6169                    <input type="hidden" name="sid" value="" /> 
    6270                    <div id="comments-open-data"> 
    63                         <label for="comment-author"><__trans phrase="Name"></label> 
    64                         <input id="comment-author" name="author" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
    65  
    66                         <label for="comment-email"><__trans phrase="Email Address"></label> 
    67                         <input id="comment-email" name="email" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
    68  
    69                         <label for="comment-url"><__trans phrase="URL"></label> 
    70                         <input id="comment-url" name="url" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
    71  
    72                         <input type="checkbox" id="comment-bake-cookie" name="bakecookie" onclick="mtRememberMeOnClick(this)" value="1" accesskey="r" /> 
    73                         <label for="comment-bake-cookie"><__trans phrase="Remember personal info?"></label> 
     71                        <div> 
     72                            <label for="comment-author"><__trans phrase="Name"></label> 
     73                            <input id="comment-author" name="author" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     74                        </div> 
     75                        <div> 
     76                            <label for="comment-email"><__trans phrase="Email Address"></label> 
     77                            <input id="comment-email" name="email" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     78                        </div> 
     79                        <div> 
     80                            <label for="comment-url"><__trans phrase="URL"></label> 
     81                            <input id="comment-url" name="url" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     82                        </div> 
     83                        <div> 
     84                            <input type="checkbox" id="comment-bake-cookie" name="bakecookie" onclick="mtRememberMeOnClick(this)" value="1" accesskey="r" /> 
     85                            <label for="comment-bake-cookie"><__trans phrase="Remember personal info?"></label> 
     86                        </div> 
    7487                    </div> 
    7588                    <div id="comment-form-reply" style="display:none"> 
  • trunk/Vanilla/templates/vanilla+comments+userpics/javascript.mtml

    r916 r919  
    181181<mt:Ignore> 
    182182/*** 
    183  * Persists a copy of the current user cookie into the browser cookie stash. 
    184  */ 
    185 </mt:Ignore> 
    186 function mtSaveUser(f) { 
    187     // We can't reliably store the user cookie during a preview. 
    188     if (is_preview) return; 
    189  
    190     var u = mtGetUser(); 
    191  
    192     if (f && (!u || u.is_anonymous)) { 
    193         if ( !u ) { 
    194             u = {}; 
    195             u.is_authenticated = false; 
    196             u.can_comment = true; 
    197             u.is_author = false; 
    198             u.is_banned = false; 
    199             u.is_anonymous = true; 
    200             u.is_trusted = false; 
    201         } 
    202         if (f.author != undefined) u.name = f.author.value; 
    203         if (f.email != undefined) u.email = f.email.value; 
    204         if (f.url != undefined) u.url = f.url.value; 
    205     } 
    206  
    207     if (!u) return; 
    208  
    209     var cache_period = mtCookieTimeout * 1000; 
    210  
    211     // cache anonymous user info for a long period if the 
    212     // user has requested to be remembered 
    213     if (u.is_anonymous && f && f.bakecookie && f.bakecookie.checked) 
    214         cache_period = 365 * 24 * 60 * 60 * 1000; 
    215  
    216     var now = new Date(); 
    217     mtFixDate(now); 
    218     now.setTime(now.getTime() + cache_period); 
    219  
    220     var cmtcookie = mtBakeUserCookie(u); 
    221     mtSetCookie(mtCookieName, cmtcookie, now, mtCookiePath, mtCookieDomain, 
    222         location.protocol == 'https:'); 
    223 } 
    224  
    225 <mt:Ignore> 
    226 /*** 
    227183 * Handles the action of the "Sign in" link. First clears any existing 
    228184 * user cookie, then directs to the MT comment script to sign the user in. 
  • trunk/Vanilla/templates/vanilla+comments+userpics/wrapper.mtml

    r916 r919  
    55    <title><$mt:BlogName encode_html="1"$></title> 
    66    <meta http-equiv="Content-Type" content="text/html; charset=<$mt:PublishCharset$>" /> 
    7     <meta name="generator" content="<$mt:ProductName version="1"$>" /> 
    87    <$mt:Var name="html_head"$> 
    98    <script type="text/javascript" src="<$mt:Link template="JavaScript"$>"></script> 
     
    1514    <div id="signin-content"><a href="javascript:void(0)" onclick="return mtSignInOnClick('signin-content')"><__trans phrase="Sign In"></a></div> 
    1615 
    17 <!-- end header --> 
     16<!-- end header --><hr /> 
    1817 
    1918 
     
    2120 
    2221 
    23 <!-- start footer --> 
     22<!-- start footer --><hr /> 
    2423 
    2524    <p><__trans phrase="_POWERED_BY"> and the Vanilla template set</p> 
  • trunk/Vanilla/templates/vanilla+comments/comment_preview.mtml

    r917 r919  
    11<mt:IncludeBlock module="wrapper"> 
     2     
     3    <mt:setvarblock name="html_head" append="1"> 
     4        <style type="text/css" media="screen"> 
     5            form { 
     6                width: 50%; 
     7            } 
     8        </style> 
     9    </mt:setvarblock> 
    210 
    311    <mt:SetVarBlock name="html_head"> 
     
    4553                    <input type="hidden" name="sid" value="" /> 
    4654                    <div id="comments-open-data"> 
    47                         <label for="comment-author"><__trans phrase="Name"></label> 
    48                         <input id="comment-author" name="author" size="30" value="<mt:If name="comment_preview"><$mt:CommentAuthor encode_html="1"$></mt:If>" onfocus="mtCommentFormOnFocus()" /> 
    49  
    50                         <label for="comment-email"><__trans phrase="Email Address"></label> 
    51                         <input id="comment-email" name="email" size="30" value="<mt:If name="comment_preview"><$mt:CommentEmail encode_html="1"$></mt:If>" onfocus="mtCommentFormOnFocus()" /> 
    52  
    53                         <label for="comment-url"><__trans phrase="URL"></label> 
    54                         <input id="comment-url" name="url" size="30" value="<mt:If name="comment_preview"><$mt:CommentURL encode_html="1"$></mt:If>" onfocus="mtCommentFormOnFocus()" /> 
     55                        <div> 
     56                            <label for="comment-author"><__trans phrase="Name"></label> 
     57                            <input id="comment-author" name="author" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     58                        </div> 
     59                        <div> 
     60                            <label for="comment-email"><__trans phrase="Email Address"></label> 
     61                            <input id="comment-email" name="email" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     62                        </div> 
     63                        <div> 
     64                            <label for="comment-url"><__trans phrase="URL"></label> 
     65                            <input id="comment-url" name="url" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     66                        </div> 
    5567                    </div> 
    5668                    <div id="comment-form-reply"<mt:IfCommentParent><mt:Else> style="display:none"</mt:IfCommentParent>> 
  • trunk/Vanilla/templates/vanilla+comments/entry.mtml

    r917 r919  
    11<mt:IncludeBlock module="wrapper"> 
     2     
     3    <mt:setvarblock name="html_head" append="1"> 
     4        <style type="text/css" media="screen"> 
     5            form { 
     6                width: 50%; 
     7            } 
     8        </style> 
     9    </mt:setvarblock> 
    210 
    311    <h1><$mt:EntryTitle$></h1> 
     
    5765                    <input type="hidden" name="sid" value="" /> 
    5866                    <div id="comments-open-data"> 
    59                         <label for="comment-author"><__trans phrase="Name"></label> 
    60                         <input id="comment-author" name="author" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
    61  
    62                         <label for="comment-email"><__trans phrase="Email Address"></label> 
    63                         <input id="comment-email" name="email" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
    64  
    65                         <label for="comment-url"><__trans phrase="URL"></label> 
    66                         <input id="comment-url" name="url" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
    67  
    68                         <input type="checkbox" id="comment-bake-cookie" name="bakecookie" onclick="mtRememberMeOnClick(this)" value="1" accesskey="r" /> 
    69                         <label for="comment-bake-cookie"><__trans phrase="Remember personal info?"></label> 
     67                        <div> 
     68                            <label for="comment-author"><__trans phrase="Name"></label> 
     69                            <input id="comment-author" name="author" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     70                        </div> 
     71                        <div> 
     72                            <label for="comment-email"><__trans phrase="Email Address"></label> 
     73                            <input id="comment-email" name="email" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     74                        </div> 
     75                        <div> 
     76                            <label for="comment-url"><__trans phrase="URL"></label> 
     77                            <input id="comment-url" name="url" size="30" value="" onfocus="mtCommentFormOnFocus()" /> 
     78                        </div> 
     79                        <div> 
     80                            <input type="checkbox" id="comment-bake-cookie" name="bakecookie" onclick="mtRememberMeOnClick(this)" value="1" accesskey="r" /> 
     81                            <label for="comment-bake-cookie"><__trans phrase="Remember personal info?"></label> 
     82                        </div> 
    7083                    </div> 
    7184                    <div id="comment-form-reply" style="display:none"> 
  • trunk/Vanilla/templates/vanilla+comments/javascript.mtml

    r917 r919  
    181181<mt:Ignore> 
    182182/*** 
    183  * Persists a copy of the current user cookie into the browser cookie stash. 
    184  */ 
    185 </mt:Ignore> 
    186 function mtSaveUser(f) { 
    187     // We can't reliably store the user cookie during a preview. 
    188     if (is_preview) return; 
    189  
    190     var u = mtGetUser(); 
    191  
    192     if (f && (!u || u.is_anonymous)) { 
    193         if ( !u ) { 
    194             u = {}; 
    195             u.is_authenticated = false; 
    196             u.can_comment = true; 
    197             u.is_author = false; 
    198             u.is_banned = false; 
    199             u.is_anonymous = true; 
    200             u.is_trusted = false; 
    201         } 
    202         if (f.author != undefined) u.name = f.author.value; 
    203         if (f.email != undefined) u.email = f.email.value; 
    204         if (f.url != undefined) u.url = f.url.value; 
    205     } 
    206  
    207     if (!u) return; 
    208  
    209     var cache_period = mtCookieTimeout * 1000; 
    210  
    211     // cache anonymous user info for a long period if the 
    212     // user has requested to be remembered 
    213     if (u.is_anonymous && f && f.bakecookie && f.bakecookie.checked) 
    214         cache_period = 365 * 24 * 60 * 60 * 1000; 
    215  
    216     var now = new Date(); 
    217     mtFixDate(now); 
    218     now.setTime(now.getTime() + cache_period); 
    219  
    220     var cmtcookie = mtBakeUserCookie(u); 
    221     mtSetCookie(mtCookieName, cmtcookie, now, mtCookiePath, mtCookieDomain, 
    222         location.protocol == 'https:'); 
    223 } 
    224  
    225 <mt:Ignore> 
    226 /*** 
    227183 * Handles the action of the "Sign in" link. First clears any existing 
    228184 * user cookie, then directs to the MT comment script to sign the user in. 
  • trunk/Vanilla/templates/vanilla+comments/wrapper.mtml

    r917 r919  
    55    <title><$mt:BlogName encode_html="1"$></title> 
    66    <meta http-equiv="Content-Type" content="text/html; charset=<$mt:PublishCharset$>" /> 
    7     <meta name="generator" content="<$mt:ProductName version="1"$>" /> 
    87    <$mt:Var name="html_head"$> 
    98    <script type="text/javascript" src="<$mt:Link template="JavaScript"$>"></script> 
     
    1514    <div id="signin-content"><a href="javascript:void(0)" onclick="return mtSignInOnClick('signin-content')"><__trans phrase="Sign In"></a></div> 
    1615 
    17 <!-- end header --> 
     16<!-- end header --><hr /> 
    1817 
    1918 
     
    2120 
    2221 
    23 <!-- start footer --> 
     22<!-- start footer --><hr /> 
    2423 
    2524    <p><__trans phrase="_POWERED_BY"> and the Vanilla template set</p> 
  • trunk/Vanilla/templates/vanilla+pages/wrapper.mtml

    r891 r919  
    55    <title><$mt:BlogName encode_html="1"$></title> 
    66    <meta http-equiv="Content-Type" content="text/html; charset=<$mt:PublishCharset$>" /> 
    7     <meta name="generator" content="<$mt:ProductName version="1"$>" /> 
    87</head> 
    98<body> 
     
    1918    </ul> 
    2019 
    21 <!-- end header --> 
     20<!-- end header --><hr /> 
    2221 
    2322 
     
    2524 
    2625 
    27 <!-- start footer --> 
     26<!-- start footer --><hr /> 
    2827 
    2928    <p><__trans phrase="_POWERED_BY"> and the Vanilla template set</p>