| 1 | /*** |
|---|
| 2 | * This file defines blog variables and phrases which are used by javascript functions. |
|---|
| 3 | * This file should be published as mt-blog.js and included before mt.js |
|---|
| 4 | */ |
|---|
| 5 | |
|---|
| 6 | var mt; |
|---|
| 7 | mt = { |
|---|
| 8 | blog: { |
|---|
| 9 | id: <$mt:BlogID _default="0"$>, |
|---|
| 10 | url: '<$mt:BlogURL encode_url="1"$>', |
|---|
| 11 | staticWebPath: '<$mt:StaticWebPath$>', |
|---|
| 12 | adminScript: '<$mt:AdminScript$>', |
|---|
| 13 | signInLink: '<$mt:SignInLink$>', |
|---|
| 14 | signOutLink: '<$mt:SignOutLink$>', |
|---|
| 15 | signInElementId: 'signin-module', |
|---|
| 16 | comments: { |
|---|
| 17 | script: '<$mt:CGIPath$><$mt:CommentScript$>', |
|---|
| 18 | armor: '<$mt:BlogSitePath encode_sha1="1"$>', |
|---|
| 19 | accepted: <mt:IfCommentsAccepted>1<mt:Else>0</mt:IfCommentsAccepted>, |
|---|
| 20 | captchaFields: '<$mt:CaptchaFields$>' |
|---|
| 21 | }, |
|---|
| 22 | community: { |
|---|
| 23 | script: '<$mt:CGIPath$><$mt:CommunityScript$>', |
|---|
| 24 | ifAnonymousRecommendAllowed: <mt:IfAnonymousRecommendAllowed>1<mt:Else>0</mt:IfAnonymousRecommendAllowed> |
|---|
| 25 | }, |
|---|
| 26 | pings: { |
|---|
| 27 | accepted: <mt:IfPingsAccepted>1<mt:Else>0</mt:IfPingsAccepted> |
|---|
| 28 | }, |
|---|
| 29 | registration: { |
|---|
| 30 | required: <mt:IfRegistrationRequired>1<mt:Else>0</mt:IfRegistrationRequired>, |
|---|
| 31 | allowed: <mt:IfRegistrationAllowed>1<mt:Else>0</mt:IfRegistrationAllowed> |
|---|
| 32 | }, |
|---|
| 33 | cookie: { |
|---|
| 34 | name: '<$mt:UserSessionCookieName$>', |
|---|
| 35 | domain: '<$mt:UserSessionCookieDomain$>', |
|---|
| 36 | path: '<$mt:UserSessionCookiePath$>', |
|---|
| 37 | timeout: <$mt:UserSessionCookieTimeout$> |
|---|
| 38 | } |
|---|
| 39 | }, |
|---|
| 40 | config: { |
|---|
| 41 | SingleCommunity: <mt:If name="config.SingleCommunity">1<mt:Else>0</mt:If> |
|---|
| 42 | } |
|---|
| 43 | }; |
|---|
| 44 | |
|---|
| 45 | /*** |
|---|
| 46 | * Phrases used by javascript functions. |
|---|
| 47 | * The phrases can be placed into the mt.js file if all the phrases for the site will be in the same language. |
|---|
| 48 | */ |
|---|
| 49 | |
|---|
| 50 | mt.blog.phrase = { |
|---|
| 51 | fileRequired: '<__trans phrase="Please select a file to post." escape="js">', |
|---|
| 52 | invalidFileType: '<__trans phrase="You selected an unsupported file type." escape="js">', |
|---|
| 53 | relativeDate: { |
|---|
| 54 | momentsAgo: '<__trans phrase="moments ago" escape="js">', |
|---|
| 55 | minutesAgo: '<__trans phrase="[quant,_1,minute,minutes] ago" params="1" escape="js">', |
|---|
| 56 | minutesAgoPlural: '<__trans phrase="[quant,_1,minute,minutes] ago" params="2" escape="js">', |
|---|
| 57 | hoursAgo: '<__trans phrase="[quant,_1,hour,hours] ago" params="1" escape="js">', |
|---|
| 58 | hoursAgoPlural: '<__trans phrase="[quant,_1,hour,hours] ago" params="2" escape="js">', |
|---|
| 59 | daysAgo: '<__trans phrase="[quant,_1,day,days] ago" params="1" escape="js">', |
|---|
| 60 | daysAgoPlural: '<__trans phrase="[quant,_1,day,days] ago" params="2" escape="js">' |
|---|
| 61 | }, |
|---|
| 62 | edit: '<__trans phrase="Edit">', |
|---|
| 63 | signingIn: '<__trans phrase="Signing in..." escape="js">', |
|---|
| 64 | commenter: { |
|---|
| 65 | auth: '<__trans phrase="[_1]Sign in[_2] to comment." params="<a href="javascript:void(0)" onclick="return mtSignInOnClick('comment-greeting')">%%</a>" escape="js">', |
|---|
| 66 | authAnonyous: '<__trans phrase="[_1]Sign in[_2] to comment, or comment anonymously." params="<a href="javascript:void(0)" onclick="return mtSignInOnClick('comment-greeting')">%%</a>" escape="js">', |
|---|
| 67 | authBanned: '<__trans phrase="You do not have permission to comment on this blog. ([_1]sign out[_2])" params="<a href="javascript:void(0);" onclick="return mtSignOutOnClick();">%%</a>" escape="js">', |
|---|
| 68 | authSuccess: '<__trans phrase="Thanks for signing in, __NAME__. ([_1]sign out[_2])" params="<a href="javascript:void(0)" onclick="return mtSignOutOnClick();">%%</a>" escape="js">', |
|---|
| 69 | sessionExpired: '<__trans phrase="Your session has expired. Please sign in again to comment." escape="js">', |
|---|
| 70 | replyingTo: '<__trans phrase="Replying to <a href="[_1]" onclick="[_2]">comment from [_3]</a>" params="#comment-__PARENT__%%location.href=this.href; return false%%__AUTHOR__" escape="js">' |
|---|
| 71 | } |
|---|
| 72 | }; |
|---|