5.3 テンプレートの作成

1.[テンプレートモジュール]ヘッダー

<?xml version="1.0" encoding="<mt:publishCharset />" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<mt:defaultLanguage />" xml:lang="<mt:defaultLanguage />" id="sixapart-standard">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=<mt:publishCharset />" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta name="generator" content="<mt:productName version="1" />" />
  <title><mt:getVar name="title"></title>
  <link rel="stylesheet" href="<mt:link template="styles" />" type="text/css" />
  <mt:if name="search_results_template">
    <link rel="alternate" type="application/atom+xml" title="<mt:blogName encode_html="1" />: 検索結果" href="<mt:CGIPath /><mt:searchScript />?<mt:getVar name="search_type" />=<mt:searchString encode_url="1" />&amp;Template=feed&amp;IncludeBlogs=<mt:searchIncludeBlogs />" />
  </mt:if>
  <mt:if name="index_template">
    <link rel="alternate" type="application/atom+xml" title="Atom" href="<mt:link template="feed_recent" />" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<mt:link template="rss" />" />
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="<mt:link template="rsd" />" />
    <mt:unless name="main_index">
      <link rel="start" href="<mt:blogURL />" title="Home" />
    </mt:unless>
  </mt:if>
  <mt:if name="datebased_archive">
    <mt:archivePrevious><link rel="prev" href="<mt:archiveLink />" title="<mt:archiveTitle />" /></mt:archivePrevious>
    <mt:archiveNext><link rel="next" href="<mt:archiveLink />" title="<mt:archiveTitle />" /></mt:archiveNext>
  </mt:if>
  <mt:if name="entry_template">
    <mt:entryPrevious><link rel="prev" href="<mt:entryLink archive_type="Individual" />" title="<mt:entryTitle encode_html="1" />" /></mt:entryPrevious>
    <mt:entryNext><link rel="next" href="<mt:entryLink archive_type="Individual" />" title="<mt:entryTitle encode_html="1" />" /></mt:entryNext>
  </mt:if>
  <mt:getVar name="html_head" />
  <script type="text/javascript" src="<mt:link template="javascript" />"></script>
  <mt:if name="feedback_template">
    <mt:entryTrackbackData />
  </mt:if>
  <mt:if name="index_template">
    <mt:CCLicenseRDF />
  </mt:if>
</head>
<body class="<mt:getVar name="page_layout" />"<mt:if name="body_onload"> onload="<mt:getVar name="body_onload" />"</mt:if>>
<div id="header">
<h1 id="blog-name"><a href="<mt:blogURL />" accesskey="1"><mt:blogName encode_html="1" /></a></h1>
<mt:if tag="BlogDescription"><p class="blog-description"><mt:blogDescription encode_html="1" /></p></mt:if>
</div>

2.[テンプレートモジュール]フッター

<p id="footer">Copyright &copy; 2008 <mt:blogName encode_html="1" /> All Rights Reserved.</p>
</body>
</html>

3.[インデックステンプレート]メインページ

<mt:setVars>
title=<mt:blogName encode_html="1" />
main_index=1
index_template=1
page_layout=layout-three-column
</mt:setVars>
<mt:include module="ヘッダー" />
<div id="contents" class="clearfix">
  <div id="main">
  <p class="content-header">最近のブログ記事一覧</p>
  <mt:entries>
    <mt:entryTrackbackData />
    <mt:include module="ブログ記事の概要" />
  </mt:entries>
  <p class="content-nav"><a href="<mt:link template="archive_index" />">アーカイブ</a></p>
  </div>
  <div id="sub1">
    <mt:include module="サイドバー左" />
  </div>
  <div id="sub2">
    <mt:include module="サイドバー右" />
  </div>
</div>
<mt:include module="フッター" />

4.[インデックステンプレート]スタイルシート

* {
    margin: 0;
    padding: 0;
    font-family: Verdana, Arial, sans-serif;
    color: #333;
}
body {
    font-size: 120%;
    background: url(<mt:staticWebPath />plugins/SampleTemplateSet/images/header_back.png) repeat-x;
}
html > body {
    font-size: 14pt;
}
 
/* 見出し */
h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
}
 
/* リンク */
a,
a:link,
a:visited {
    color: #069;
    text-decoration: none;
}
a:hover {
    color: #069;
    text-decoration: underline;
}
a:active {}
 
/* リンク画像 */
a img {
    border: none;
}
 
/* フォーム */
form {
    margin: 0px;
}
fieldset {
    border: none;
}
 
/* ヘッダー */
#header {
    text-align: left;
    height: 100px;
}
 
#header a,
#header a:link,
#header a:visited {
    color: #333;
    font-size: 32px;
    text-decoration: none;
}
#header a:hover {}
#header a:active {}
 
/* ブログ名 */
#header h1 {
    margin-left: 15px;
    line-height: 2.8; /* for IE6 */
}
html > body #header h1 {
    line-height: 2.3;
}
*:first-child+html #header h1 {
    line-height: 2.8; /* for IE7 */
}
 
/* ブログの説明 */
#header p {
    margin: -18px 0 10px 15px;
    color: #333;
    font-size: 75%;
}
 
/* メインエリアタイトル */
#main .content-header {
    margin-bottom: 15px;
    padding-left: 12px;
    font-size: 67%;
    line-height: 2.6;
    background: url(<mt:staticWebPath />plugins/SampleTemplateSet/images/title_back.png) repeat-x;
    letter-spacing: 0.1em;
}
 
/* メインエリア本文 */
#main .content {
    margin-bottom: 25px;
    font-size: 83.3%;
    line-height: 1.5;
    word-break: break-all;
}
 
/* メインエリアのメタデータ */
#main .content ul.content-meta {
    margin-bottom: 10px;
    list-style: none;
    font-size: 83.3%;
    text-align: right;
}
#main .content ul.content-meta li {
    list-style: none;
}
 
/* ブログ記事タイトル */
#main .entry-header {
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 10px solid #999;
    font-size: 150%;
}
 
/* フッター */
#main .entry-footer,
#main .trackback-footer,
#main .comment-footer {
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px solid #333;
    font-size: 83.3%;
    text-align: right;
}
#main .entry-footer a img,
#main .comment-footer img,
#main .comment-footer  a img {
    vertical-align: middle;
}
 
/* 段落 */
#main .content p {
    margin: 15px 0;
}
 
/* 順不同リスト */
#main .content ul,
#main .content ol {
    padding-left: 35px;
}
#main .content ul li {
    list-style-type: circle;
}
#main .entry-content ul,
#main .entry-content ol {
    padding-left: 35px;
}
 
/* 定義リスト */
#main .content dl {}
#main .content dt {}
#main .content dd {
    padding-left: 8px;
}
 
/* テキストエリア */
#main .content textarea {
    width: 97%;
}
 
/* 引用 */
#main .content blockquote {
    width: auto;
    margin: 15px 20px 0;
    padding: 10px;
    border: 1px solid #666;
    background: #f6f6f6;
    font-size: 83.3%;
    line-height: 1.5;
}
 
#main .content pre {
    margin: 15px 20px 0px;
    padding: 10px;
    background: #f6f6f6;
    border: 1px solid #999;
    font-size: 83.3%;
    line-height: 1.5;
    width: 100%;
    overflow: scroll;
}
html > body #main .content pre {
    width: 87%;
}
 
/* コメンタ-画像 */
.commenter-profile img {
    vertical-align: middle;
    border-width: 0;
}
 
/* ナビゲーション */
.content-nav {
    margin-bottom: 15px;
    text-align: center;
    font-size: 83.3%;
}
 
/* カレンダー */
.calendarhead {
    padding-bottom: 5px;
    text-align: center;
    letter-spacing: 0.1em;
}
#calendar table {
    width:90%; /* for IE6 */
    font-size: 100%;
    text-align: center;
    border-collapse: collapse;
}
html > body #calendar table {
    width:100%;
}
#calendar th {
    padding-bottom: 3px;
    font-size: 70%;
    width: 23px;
}
#calendar td {
    padding: 5px 0; /* for IE6 */
    line-height: 1.0;
}
html > body #calendar td {
    padding: 2px 0;
}
span.day {
    text-align: center;
    font-size: 9px;
}
span.saturday {
    color: #0000ff;
}
span.sunday {
    color: #e50003;
}
td.today {
    display: block;
    border: 1px solid #333;
}
 
/* サイドメニュータイトル */
.sidetitle {
    background: url(<mt:staticWebPath />plugins/SampleTemplateSet/images/sidetitle_back.png) repeat-x;
    text-align: center;
    font-size: 67%;
    line-height: 2.4;
}
 
/* サイドメニュー */
.side {
    margin: 5px 0 20px;
    line-height: 1.5;
}
.side ul,
.side ol {
    padding-left: 16px;
}
.side ul li {
    list-style-type: circle;
}
.side ul ul {
    padding-left: 0;
}
.side li li {
    list-style-type: none;
}
 
/* サブカテゴリリスト */
#categories ul {
    padding-left: 16px;
}
#categories ul ul {
    padding-left: 10px;
}
#categories li {
    list-style-type: circle;
}
 
/* タグクラウド */
ul#tags {
    margin-top: 5px;
    padding-left: 0;
    list-style: none;
}
ul#tags li {
    display: inline;
}
ul#tags li.taglevel1 {
    font-size: 125%;
    font-weight: bold;
}
ul#tags li.taglevel2 {
    font-size: 125%;
}
ul#tags li.taglevel3 {
    font-size: 116.6%;
}
ul#tags li.taglevel4 {
    font-size: 108.3%;
}
ul#tags li.taglevel5 {
    font-size: 100%;
}
ul#tags li.taglevel6 {
    font-size: 91.6%;
}
 
/* 検索フォーム */
#search {
    width: 175px;
    height: 20px;
}
html > body #search {
    height: 15px;
}
 
/* 購読 */
.syndicate img {
    margin-right: 8px;
    border: none;
    vertical-align: middle;
}
 
/* クリエイティブ・コモンズ */
.ccl {
    margin: 15px 0 5px;
    line-height: 1.2;
}
 
/* Powered By */
.powered ul {
    margin-top: 30px;
    list-style: none;
}
.powered li {
    padding: 13px 0 10px;
    border: 1px solid #ddd;
    background-color: #f8f8f8;
    text-align: center;
}
 
/* コメント入力フォーム */
#comments-open-data label {
    display: block;
}
#comments-open-data p {
    margin-bottom: 10px;
}
#comment-post {
    font-weight: bold;
}
#comment-author,
#comment-email,
#comment-url {
    width: 220px;
    height: 20px;
    padding: 2px;
}
html > body #comment-author,
html > body #comment-email,
html > body #comment-url {
    height: 15px;
}
#comment-text {
    width: 400px;
    height: 150px;
    padding: 2px;
}
#comment-form-reply #comment-reply-label {
    display: inline;
}
#comments-open-footer {
    margin-top: 15px;
    text-align: center;
}
 
/* カラムレイアウト */
body {
    text-align: center;
}
#header {
    margin: 0 auto;
    width: 900px;
    text-align: left;
}
#contents {
    margin: 25px 10px;
    width: 900px;
    text-align: left;
}
html > body #contents {
    margin: 0 auto;
    padding: 25px 10px;
}
#main {
    float: left;
    width: 500px;
    overflow: hidden;
}
#sub1,#sub2 {
    float: left;
    width: 200px;
    overflow: hidden;
}
#sub1 dl,
#sub2 dl {
    padding-left: 20px;
}
#sub1 dd,
#sub2 dd {
    font-size: 75%;
}
 
/* フッター */
#footer {
    height: 50px;
    background: url(<mt:staticWebPath />plugins/SampleTemplateSet/images/footer_back.png) repeat-x;
    font-size: 75%;
    text-align: center;
    line-height: 3.7;
}
 
input,textarea {
    font-family : osaka;
}
 
.clearfix:after {
    content: ""; 
    display: block; 
    height: 0; 
    clear: both; 
    visibility: hidden;
}
 
.clearfix {display: inline-table;}
 
/* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */

5.[インデックステンプレート]アーカイブインデックス

<mt:setVars>
title=アーカイブインデックス
archive_index=1
index_template=1
page_layout=layout-three-column
</mt:setVars>
<mt:include module="ヘッダー" />
<div id="contents" class="clearfix">
  <div id="main">
 
<mt:ifArchiveTypeEnabled archive_type="Monthly">
  <mt:archiveList archive_type="Monthly">
    <mt:archiveListHeader>
    <h2 class="content-header">月別アーカイブ</h2>
    <div class="content">
      <ul>
    </mt:archiveListHeader>
        <li><a href="<mt:archiveLink />"><mt:archiveTitle /></a></li>
    <mt:archiveListFooter>
      </ul>
    </div>
    </mt:archiveListFooter>
  </mt:archiveList>
</mt:ifArchiveTypeEnabled>
 
<mt:ifArchiveTypeEnabled archive_type="Category">
  <mt:if tag="blogCategoryCount">
    <h2 class="content-header">カテゴリアーカイブ</h2>
    <div class="content">
  <mt:topLevelCategories>
    <mt:subCatIsFirst>
      <ul>
    </mt:subCatIsFirst>
    <mt:if tag="categoryCount">
        <li><a href="<mt:categoryArchiveLink />" title="<mt:categoryDescription encode_html="1" />"><mt:categoryLabel encode_html="1" /></a>
    <mt:else>
        <li><mt:categoryLabel />
    </mt:if>
    <mt:subCatsRecurse>
        </li>
    <mt:subCatIsLast>
      </ul>
    </mt:subCatIsLast>
  </mt:topLevelCategories>
    </div>
  </mt:if>
</mt:ifArchiveTypeEnabled>
 
<mt:ifArchiveTypeEnabled archive_type="Page">
  <mt:if tag="blogPageCount">
    <h2 class="content-header">ウェブページ</h2>
    <div class="content">
  <mt:pages no_folder="1" sort_by="title" sort_order="ascend">
    <mt:pagesHeader>
      <ul>
    </mt:pagesHeader>
        <li><a href="<mt:pagePermalink />" title="<mt:pageTitle encode_html="1" />"><mt:pageTitle encode_html="1" /></a></li>
    <mt:pagesFooter>
      </ul>
    </mt:pagesFooter>
  </mt:pages>
  <mt:topLevelFolders>
    <mt:folderHeader>
      <ul>
    </mt:folderHeader>
        <li><mt:folderLabel />
    <mt:pages sort_by="title" sort_order="ascend">
      <mt:pagesHeader>
          <ul>
      </mt:pagesHeader>
            <li><a href="<mt:pagePermalink />" title="<mt:pageTitle encode_html="1" />"><mt:pageTitle encode_html="1" /></a></li>
      <mt:pagesFooter>
          </ul>
      </mt:pagesFooter>
    </mt:pages>
    <mt:subFolderRecurse />
        </li>
    <mt:folderFooter>
      </ul>
    </mt:folderFooter>
  </mt:topLevelFolders>
    </div>
  </mt:if>
</mt:ifArchiveTypeEnabled>
 
<mt:ifArchiveTypeEnabled archive_type="Individual">
  <mt:archiveList archive_type="Individual">
    <mt:archiveListHeader>
    <h2 class="content-header">ブログ記事アーカイブ</h2>
    <div class="content">
      <ul>
    </mt:archiveListHeader>
        <li><mt:archiveDate format="%Y.%m.%d" />: <a href="<mt:archiveLink />"><mt:archiveTitle encode_html="1" /></a></li>
    <mt:archiveListFooter>
      </ul>
    </div>
    </mt:archiveListFooter>
  </mt:archiveList>
</mt:ifArchiveTypeEnabled>
 
  </div>
  <div id="sub1">
    <mt:include module="サイドバー左" />
  </div>
  <div id="sub2">
    <mt:include module="サイドバー右" />
  </div>
</div>

6.[アーカイブテンプレート]ブログ記事

<mt:setVars>
title=<mt:entryTitle encode_html="1" />: <mt:blogName encode_html="1" />
body_onload=mtEntryOnLoad()
page_layout=layout-three-column
</mt:setVars>
<mt:include module="ヘッダー" />
<div id="contents" class="clearfix">
  <div id="main">
    <div class="content-nav">
    <mt:entryPrevious>
      <a href="<mt:entryLink archive_type="Individual" />">&laquo; <mt:entryTitle encode_html="1" /></a> |
    </mt:entryPrevious>
      <a href="<mt:link template="main_index" />">メインページ</a> |
      <a href="<mt:link template="archive_index" />">アーカイブ</a>
    <mt:entryNext>
      | <a href="<mt:entryLink archive_type="Individual" />"><mt:entryTitle encode_html="1" /> &raquo;</a>
    </mt:entryNext>
    </div>
    <div class="content">
      <h2 class="entry-header"><mt:entryTitle encode_html="1" /></h2>
      <mt:include module="メタデータ" />
      <div class="entry-content clearfix">
        <mt:if tag="entryBody">
        <div class="entry-body"><mt:entryBody /></div>
        </mt:if>
        <mt:if tag="entryMore">
        <div id="more" class="entry-more"><mt:entryMore /></div>
        </mt:if>
      </div>
      <mt:include module="コミュニケーション" />
    </div>
    <mt:include module="トラックバック" />
    <mt:include module="コメント" />
  </div>
  <div id="sub1">
    <mt:include module="サイドバー左" />
  </div>
  <div id="sub2">
    <mt:include module="サイドバー右" />
  </div>
</div>
<mt:include module="フッター" />

7.[アーカイブテンプレート]ブログ記事リスト

<mt:setVars>
title=<mt:archiveTitle /> - <mt:archiveTypeLabel />アーカイブ
page_layout=layout-three-column
</mt:setVars>
<mt:include module="ヘッダー" />
<div id="contents" class="clearfix">
  <div id="main">
    <div class="content-nav">
    <mt:archivePrevious>
      <a href="<mt:archiveLink />">&laquo; <mt:archiveTitle /></a> |
    </mt:archivePrevious>
      <a href="<mt:link template="main_index" />">メインページ</a> |
      <a href="<mt:link template="archive_index" />">アーカイブ</a>
    <mt:archiveNext>
      | <a href="<mt:archiveLink />"><mt:archiveTitle /> &raquo;</a>
    </mt:archiveNext>
    </div>
    <p class="content-header"><mt:archiveTypeLabel />アーカイブ - <mt:archiveTitle /></p>
    <mt:if name="datebased_archive">
      <mt:entries>
        <mt:entryTrackbackData />
        <mt:include module="ブログ記事の概要" />
      </mt:entries>
    <mt:else>
      <mt:entries limit="auto">
        <mt:entryTrackbackData />
        <mt:include module="ブログ記事の概要" />
      </mt:entries>
    </mt:if>
  </div>
  <div id="sub1">
    <mt:include module="サイドバー左" />
  </div>
  <div id="sub2">
    <mt:include module="サイドバー右" />
  </div>
</div>
<mt:include module="フッター" />

8.[アーカイブテンプレート]ウェブページ

<mt:setVars>
title=<mt:pageTitle encode_html="1" />: <mt:blogName encode_html="1" />
body_onload=mtEntryOnLoad()
page_layout=layout-three-column
</mt:setVars>
<mt:include module="ヘッダー" />
<div id="contents" class="clearfix">
  <div id="main">
    <div class="content">
      <h2 class="entry-header"><mt:pageTitle encode_html="1" /></h2>
      <mt:include module="メタデータ" />
      <div class="entry-content clearfix">
      <mt:if tag="pageBody">
        <div class="entry-body"><mt:pageBody /></div>
      </mtif>
      <mt:if tag="pageMore">
        <div class="entry-more"><mt:pageMore /></div>
      </mt:if>
      </div>
      <mt:include module="コミュニケーション" />
    </div>
  <mt:include module="トラックバック" />
  <mt:include module="コメント" />
  </div>
  <div id="sub1">
    <mt:include module="サイドバー左" />
  </div>
  <div id="sub2">
    <mt:include module="サイドバー右" />
  </div>
</div>
<mt:include module="フッター" />

9.[テンプレートモジュール]ブログ記事の概要

<div class="content">
  <h2 id="a<mt:entryID pad="1" />" class="entry-header"><a href="<mt:entryPermalink valid_html="1" />"><mt:entryTitle encode_html="1" /></a></h2>
<mt:include module="メタデータ" />
  <div class="entry-content clearfix">
  <mt:if tag="entryBody">
    <mt:entryBody />
  </mt:if>
  <mt:if tag="entryMore">
    <p class="entry-more"><a href="<mt:entryLink archive_type="Individual" />#more">続きを読む "<mt:entryTitle encode_html="1" />"</a></p>
  </mt:if>
  </div>
<mt:include module="コミュニケーション" />
</div>

10.[テンプレートモジュール]メタデータ

<ul class="content-meta">
  <mt:if tag="entryClassLabel" eq="ブログ記事">
  <li>投稿日:<mt:entryDate format="%x" /></li>
    <mt:if tag="entryCategory">
  <li>カテゴリ:<mt:entryCategories glue=", "><a href="<mt:categoryArchiveLink />" title="<mt:categoryDescription encode_html="1" />"><mt:categoryLabel encode_html="1" /></a></mt:entryCategories></li>
    </mt:if>
    <mt:entryIfTagged>
    <li>タグ:<mt:entryTags glue=", "><a href="<mt:tagSearchLink />&amp;IncludeBlogs=<mt:blogID />" rel="tag"><mt:tagName /></a></mt:entryTags></li>
    </mt:entryIfTagged>
  <mt:else>
    <mt:pageIfTagged>
    <li>タグ:<mt:pageTags glue=", "><a href="<mt:tagSearchLink />&amp;IncludeBlogs=<mt:blogID />" rel="tag"><mt:tagName /></a></mt:pageTags></li>
    </mt:pageIfTagged>
  </mt:if>
</ul>

11.[テンプレートモジュール]コミュニケーション

<p class="entry-footer">
<mt:if tag="entryClassLabel" eq="ブログ記事">
  <a href="<mt:entryPermalink valid_html="1" />"><img src="<mt:staticWebPath />images/nav_icons/color/entry.gif" alt="ブログ記事" /> パーマリンク</a>
</mt:if>
<mt:ifCommentsActive>
  <a href="<mt:entryLink archive_type="Individual" />#comments" title="comment-<mt:entryID />"><img src="<mt:staticWebPath />images/nav_icons/color/commenters.gif" alt="コメント" /> コメント</a> [<mt:entryCommentCount />]
</mt:ifCommentsActive>
<mt:ifPingsActive>
  <a href="<mt:entryLink archive_type="Individual" />#trackbacks" title="trackback-<mt:entryID />"><img src="<mt:staticWebPath />images/nav_icons/color/trackbacks.gif" alt="トラックバック" /> トラックバック</a> [<mt:entryTrackbackCount />]
</mt:ifPingsActive>
</p>

12.[テンプレートモジュール]コメント

<mt:ifCommentsActive>
<div id="comments">
<mt:if name="body_class" like="mt-comment-preview|mt-comment-error">
  <mt:include module="コメント入力フォーム" />
</mt:if>
<mt:comments>
  <mt:commentsHeader><h3 class="content-header">これまでのコメント<mt:entryCommentCount singular="[1]" plural="[#]" none="[0]" /></h3></mt:commentsHeader>
  <div class="content" id="comment-<mt:commentID />">
    <mt:ifCommentParent>
    <p class="comment-header"><a href="<mt:commentParent>#comment-<mt:commentID /></mt:commentParent>"><mt:commentParent>No.<mt:commentID />の<mt:commentAuthor /></mt:CommentParent></a>さんのコメントへの返信</p>
    </mt:ifCommentParent>
    <div class="comment-content"><mt:commentBody /></div>
    <p class="comment-footer">
    No.<mt:commentID /> Posted by <mt:commentAuthorLink default_name="Anonymous" show_email="0" /> <mt:if tag="commentAuthorIdentity"><mt:commentAuthorIdentity /></mt:if> at <mt:commentDate /><mt:ifCommentsAccepted> | <mt:commentReplyToLink /></mt:ifCommentsAccepted>
    </p>
  </div>
  <mt:commentsFooter></mt:commentsFooter>
</mt:comments>
<mt:unless name="body_class" like="mt-comment-preview|mt-comment-error">
  <mt:include module="コメント入力フォーム" />
</mt:unless>
</div>
</mt:ifCommentsActive>

13.[テンプレートモジュール]コメント入力フォーム

<mt:entryIfCommentsOpen>
<div id="comments-open">
  <h3 class="content-header comments-open-header">コメントする</h3>
  <div class="content">
    <div id="comment-greeting"></div>
    <form method="post" action="<mt:CGIPath /><mt:commentScript />" name="comments_form" id="comments-form" onsubmit="return mtCommentOnSubmit(this)">
    <fieldset>
      <input type="hidden" name="static" value="1" />
      <input type="hidden" name="entry_id" value="<mt:entryID />" />
      <input type="hidden" name="__lang" value="<mt:blogLanguage />" />
      <mt:if name="body_class" like="mt-comment-preview|mt-comment-error">
        <mt:ifCommentParent><input type="hidden" name="parent_id" value="<mt:commentParentID />" id="comment-parent-id" /></mt:ifCommentParent>
      <mt:else>
        <input type="hidden" name="parent_id" value="" id="comment-parent-id" />
      </mt:if>
      <input type="hidden" name="armor" value="1" />
      <input type="hidden" name="preview" value="" />
      <input type="hidden" name="sid" value="" />
      <div id="comments-open-data">
        <p id="comment-form-name">
          <label for="comment-author">名前:</label>
          <input id="comment-author" name="author" tabindex="1" accesskey="n" size="30" value="<mt:if name="body_class" like="mt-comment-preview|mt-comment-error"><mt:commentAuthor /></mt:if>" onfocus="<mt:if name="body_class" like="mt-comment-preview|mt-comment-error">mtShowCaptcha()<mt:else>mtCommentFormOnFocus()</mt:if>" />
        </p>
        <p id="comment-form-email">
          <label for="comment-email">メールアドレス:</label>
          <input id="comment-email" name="email" tabindex="2" accesskey="m" size="30" value="<mt:if name="body_class" like="mt-comment-preview|mt-comment-error"><mt:commentEmail /></mt:if>" onfocus="<mt:if name="body_class" like="mt-comment-preview|mt-comment-error">mtShowCaptcha()<mt:else>mtCommentFormOnFocus()</mt:if>" />
        </p>
        <p id="comment-form-url">
          <label for="comment-url">URL:</label>
          <input id="comment-url" name="url" tabindex="3" accesskey="u" size="30" value="<mt:if name="body_class" like="mt-comment-preview|mt-comment-error"><mt:commentURL /></mt:if>" onfocus="<mt:if name="body_class" like="mt-comment-preview|mt-comment-error">mtShowCaptcha()<mt:else>mtCommentFormOnFocus()</mt:if>" />
        </p>
        <p id="comment-form-remember-me">
          <label for="comment-bake-cookie"><input type="checkbox" id="comment-bake-cookie" name="bakecookie" tabindex="4" accesskey="r" value="1" onclick="mtRememberMeOnClick(this)" onkeypress="mtRememberMeOnClick(this)" />
          ログイン情報を記憶</label>
        </p>
      </div>
      <p id="comment-form-reply" style="display:none">
        <input type="checkbox" id="comment-reply" name="comment_reply" tabindex="5" accesskey="c" value="" onclick="mtSetCommentParentID();" onkeypress="mtSetCommentParentID();" />
        <label for="comment-reply" id="comment-reply-label"></label>
      </p>
      <p id="comments-open-text">
        <label for="comment-text">コメント:<mt:ifAllowCommentHTML>(スタイル用のHTMLタグが使えます)</mt:ifAllowCommentHTML></label>
        <textarea id="comment-text" name="text" tabindex="6" accesskey="t" rows="10" cols="30" onfocus="if (this.value == 'Please comment') this.value = '';" onblur="if (this.value == '') this.value = 'Please comment';" onfocus="<mt:if name="body_class" like="mt-comment-preview|mt-comment-error">mtShowCaptcha()<mt:else>mtCommentFormOnFocus()</mt:if>"><mt:if name="body_class" like="mt-comment-preview|mt-comment-error"><mt:commentBody autolink="0" sanitize="0" convert_breaks="0" encode_html="1" /><mt:else>Please comment</mt:if></textarea>
      </p>
      <div id="comments-open-captcha"></div>
      <div id="comments-open-footer" class="comments-open-footer">
        <input type="submit" tabindex="7" accesskey="v" name="preview_button" id="comment-preview" value="確認"  onclick="this.form.preview.value='1';" onkeypress="this.form.preview.value='1';" />
        <input type="submit" tabindex="8" accesskey="s" name="post" id="comment-submit" value="投稿" />
      </div>
    </fieldset>
    </form>
  </div>
</div>
<mt:if name="entry_template">
<script type="text/javascript">
<!--
mtAttachEvent("load", mtEntryOnLoad);
mtAttachEvent("unload", mtEntryOnUnload);
//-->
</script>
</mt:if>
</mt:entryIfCommentsOpen>

14.[テンプレートモジュール]トラックバック

<mt:ifPingsActive>
<div id="trackbacks">
  <mt:ifPingsAccepted>
  <h3 class="content-header">トラックバックURL</h3>
  <div class="content" id="trackbacks-info">
    <p>このエントリーのトラックバックURL:<br /><mt:entryTrackbackLink /></p>
  </div>
  </mt:ifPingsAccepted>
  <mt:pings>
    <mt:pingsHeader><h3 class="content-header">トラックバック</h3></mt:pingsHeader>
  <div class="content" id="trackback-<mt:pingID />">
    <div class="trackback-content">
      <p>
        &raquo; <a href="<mt:pingURL />"><mt:pingTitle /></a> from <mt:pingBlogName /><br />
        <mt:pingExcerpt /> <a href="<mt:pingURL />">続きを読む</a>
      </p>
    </div>
    <p class="trackback-footer">
      Tracked on <mt:pingDate />
    </p>
  </div>
  </mt:pings>
</div>
</mt:ifPingsActive>

17.[テンプレートモジュール]サイドバー左

<dl>
<mt:widgetSet name="3カラムのサイドバー(サブ)" />
</dl>

18.[テンプレートモジュール]サイドバー右

<dl>
<mt:widgetSet name="3カラムのサイドバー(メイン)" />
</dl>

19.[ウィジェットテンプレート]カレンダー

<mt:ifArchiveTypeEnabled archive_type="Daily">
<dd class="side" id="calendar">
<table summary="投稿した日にリンクする月別のカレンダー">
<caption class="calendarhead"><mt:date format="%B %Y" /></caption>
<thead>
<tr>
<th abbr="Sunday"><span class="sunday">Sun</span></th>
<th abbr="Monday"><span class="weekday">Mon</span></th>
<th abbr="Tuesday"><span class="weekday">Tue</span></th>
<th abbr="Wednesday"><span class="weekday">Wed</span></th>
<th abbr="Thursday"><span class="weekday">Thu</span></th>
<th abbr="Friday"><span class="weekday">Fri</span></th>
<th abbr="Saturday"><span class="saturday">Sat</span></th>
</tr>
</thead>
<tbody>
<mt:calendar>
<mt:calendarWeekHeader><tr></mt:calendarWeekHeader>
<td<mt:calendarIfToday> class="today"</mt:calendarIfToday>><mt:calendarIfBlank><mt:else><span class="day"></mt:else></mt:calendarIfBlank>
<mt:calendarIfEntries>
<mt:entries lastn="1"><a href="<mt:entryLink archive_type="Daily" />"><mt:calendarDay /></a></mt:entries>
</mt:calendarIfEntries><mt:calendarIfNoEntries><mt:calendarDay /></mt:calendarIfNoEntries><mt:calendarIfBlank> 
<mt:else></span></mt:else></mt:calendarIfBlank></td><mt:calendarWeekFooter></tr></mt:calendarWeekFooter></mt:calendar>
</tbody>
</table>
</dd>
</mt:ifArchiveTypeEnabled>

20.[ウィジェットテンプレート]最近のブログ記事

<mt:if tag="blogEntryCount">
<dt class="sidetitle">最近のブログ記事一覧</dt>
<dd class="side">
  <mt:entries lastn="10">
    <mt:entriesHeader>
  <ul>
    </mt:entriesHeader>
    <li><a href="<mt:entryPermalink valid_html="1" />" title="<mt:entryTitle encode_html="1" />"><mt:entryTitle encode_html="1" /></a></li>
    <mt:entriesFooter>
  </ul>
    </mt:entriesFooter>
  </mt:entries>
</dd>
</mt:if>

21.[ウィジェットテンプレート]最近のコメント

<mt:if tag="blogCommentCount">
<dt class="sidetitle">最近のコメント一覧</dt>
<dd class="side">
<ul>
<mt:entries recently_commented_on="3">
  <li><a href="<mt:entryPermalink valid_html="1" />"><mt:entryTitle encode_html="1"></a>
    <ul>
    <mt:comments lastn="3">
      <li>
        └ <a href="<mt:entryLink archive_type="Individual" />#c<mt:commentID />" title="comment-<mt:commentID />">
          <mt:commentAuthor default="Anonymous">
        </a> <mt:commentDate format="%m/%d" />
      </li>
    </mt:comments>
    </ul>
  </li>
</mt:entries>
</ul>
</dd>
</mt:if>

22.[ウィジェットテンプレート]最近のトラックバック

<mt:if tag="blogPingCount">
<dt class="sidetitle">最近のトラックバック一覧</dt>
<dd class="side">
<ul>
<mt:pings lastn="10">
  <li><mt:pingEntry><a href="<mt:entryPermalink valid_html="1" />"><mt:entryTitle encode_html="1" /></a></mt:pingEntry>
    <ul>
      <li>
        └ <a href="<mt:pingURL />" title="trackback-<mt:pingID />">
          <mt:pingBlogName />
        </a> <mt:pingDate format="%m/%d" />
      </li>
    </ul>
  </li>
</mt:pings>
</ul>
</dd>
</mt:if>

23.[ウィジェットテンプレート]検索

<dt class="sidetitle">このサイトを検索</dt>
<dd class="side">
  <form method="get" action="<mt:CGIPath /><mt:searchScript />">
    <fieldset>
      <input type="hidden" name="IncludeBlogs" value="<mt:blogID />" />
      <input type="hidden" name="limit" value="<mt:searchMaxResults />" />
      <input id="search" name="search" tabindex="9"  accesskey="t" size="20" value="" />
      <input type="submit" tabindex="10" accesskey="s" value="Search" />
    </fieldset>
  </form>
</dd>

24.[ウィジェットテンプレート]タグクラウド

<mt:if name="main_index">
<dt class="sidetitle">タグクラウド</dt>
<dd class="side">
  <ul id="tags">
  <mt:tags>
    <li class="taglevel<mt:tagRank />"><a href="<mt:tagSearchLink />"><mt:tagName /></a></li>
  </mt:tags>
  </ul>
</dd>
</mt:if>

25.[ウィジェットテンプレート]カテゴリアーカイブ

<mt:ifArchiveTypeEnabled archive_type="Category">
<mt:if tag="blogCategoryCount">
<dt class="sidetitle">カテゴリ一覧</dt>
<dd class="side" id="categories">
  <mt:topLevelCategories>
    <mt:subCatIsFirst>
  <ul>
    </mt:subCatIsFirst>
    <mt:if tag="categoryCount">
    <li><a href="<mt:categoryArchiveLink />" title="<mt:categoryDescription />"><mt:categoryLabel /></a> [<mt:categoryCount />]
    <mt:else>
    <li><mt:categoryLabel />
    </mt:if>
    <mt:subCatsRecurse />
    </li>
    <mt:subCatIsLast>
  </ul>
    </mt:subCatIsLast>
  </mt:topLevelCategories>
</dd>
</mt:if>
</mt:ifArchiveTypeEnabled>

26.[ウィジェットテンプレート]月別カテゴリアーカイブ

<mt:if name="archive_class" like="category-archive|category-monthly-archive">
<mt:ifArchiveTypeEnabled archive_type="Category-Monthly">
<dt class="sidetitle">月別カテゴリ一覧</dt>
<dd class="side">
  <mt:archiveList archive_type="Category-Monthly">
    <mt:archiveListHeader>
  <ul>
    </mt:archiveListHeader>
    <li><a href="<mt:archiveLink />"><mt:archiveTitle /></a> [<mt:archiveCount />]</li>
  </mt:archiveList>
    <mt:archiveListFooter>
  </ul>
    </mt:archiveListFooter>
</dd>
</mt:ifArchiveTypeEnabled>
</mt:if>

27.[ウィジェットテンプレート]月別アーカイブ

<mt:ifArchiveTypeEnabled archive_type="Monthly">
<dt class="sidetitle">月別アーカイブ一覧</dt>
<dd class="side">
  <mt:archiveList archive_type="Monthly">
    <mt:archiveListHeader>
  <ul>
    </mt:archiveListHeader>
    <li><a href="<mt:archiveLink />"><mt:archiveTitle /></a> [<mt:archiveCount />]</li>
    <mt:archiveListFooter>
  </ul>
    </mt:archiveListFooter>
  </mt:archiveList>
</dd>
</mt:ifArchiveTypeEnabled>

28.[ウィジェットテンプレート]ウェブページ一覧

<mt:ifArchiveTypeEnabled archive_type="Page">
<mt:if tag="blogPageCount">
<dt class="sidetitle">ウェブページ一覧</dt>
<dd class="side">
<mt:pages no_folder="1" sort_by="title" sort_order="ascend">
  <mt:pagesHeader>
  <ul>
  </mt:pagesHeader>
    <li><a href="<mt:pagePermalink />" title="<mt:pageTitle />"><mt:pageTitle /></a></li>
  <mt:pagesFooter>
  </ul>
  </mt:pagesFooter>
</mt:pages>
<mt:topLevelFolders>
  <mt:folderHeader>
  <ul>
  </mt:folderHeader>
    <li><mt:folderLabel />
  <mt:pages sort_by="title" sort_order="ascend">
    <mt:pagesHeader>
      <ul>
    </mt:pagesHeader>
        <li><a href="<mt:pagePermalink />" title="<mt:pageTitle />"><mt:pageTitle /></a></li>
    <mt:pagesFooter>
      </ul>
    </mt:pagesFooter>
  </mt:pages>
  <mt:subFolderRecurse />
    </li>
  <mt:folderFooter>
  </ul>
  </mt:folderFooter>
</mt:topLevelFolders>
</dd>
</mt:if>
</mt:ifArchiveTypeEnabled>

29.[ウィジェットテンプレート]購読

<dd class="syndicate">
<a href="<mt:link template="feed_recent" />"><img src="<mt:staticWebPath />plugins/SampleTemplateSet/images/feed-icon-32x32.jpg" width="32" height="32" alt="Feed アイコン" title="このブログを購読" /></a><a href="<mt:link template="feed_recent" />">このブログを購読</a>
</dd>

30.[ウィジェットテンプレート]クリエイティブ・コモンズ

<mt:blogIfCCLicense>
<dd class="ccl">
<a href="<mt:blogCCLicenseURL />"><img alt="Creative Commons License" style="border:none" src="<mt:blogCCLicenseImage />" /></a><br />
このブログのライセンスは <a href="<mt:BlogCCLicenseURL />">クリエイティブ・コモンズライセンス</a>.
</dd>
</mt:blogIfCCLicense>

31.[ウィジェットテンプレート]Powered By

<dd class="powered">
<ul>
<li class="module-powered"><a href="http://www.movabletype.jp/"><img src="<mt:staticWebPath />images/mt4-bug-pbmt-white.png" alt="Powered by Movable Type <mt:version />" width="120" height="75" /></a></li>
</ul>
</dd>

32.[システムテンプレート]コメントプレビュー

<mt:setvars>
title=「<mt:entryTitle encode_html="1" />」への投稿コメント確認
page_layout=layout-three-column
body_onload=mtEntryOnLoad()
</mt:setvars>
<mt:setVarBlock name="html_head" append="1">
<script type="text/javascript">
/* <![CDATA[ */
var user = <mt:userSessionState />;
var is_preview = true;
/* ]]> */
</script>
</mt:setVarBlock>
<mt:include module="ヘッダー" />
<div id="contents" class="clearfix">
  <div id="main">
  <div class="content-header comments-header">コメントの確認</div>
  <div class="content">
    <div class="comment-content"><mt:commentBody /></div>
    <p class="comment-footer">
      Posted by <mt:commentAuthorLink default_name="Anonymous" show_email="0" /> <mt:if tag="commentAuthorIdentity"><mt:commentAuthorIdentity /></mt:if> at <mt:commentDate />
    </p>
  </div>
    <mt:include module="コメント" />
  </div>
  <div id="sub1">
    <mt:include module="サイドバー左" />
  </div>
  <div id="sub2">
    <mt:include module="サイドバー右" />
  </div>
</div>
<mt:include module="フッター" />

33.[システムテンプレート]コメント完了

<mt:setvars>
page_layout=layout-three-column
</mt:setvars>
<mt:if name="body_class" eq="mt-comment-confirmation">
<mt:setvars>
title=「<mt:entryTitle encode_html="1" />」へのコメント投稿完了
heading=コメントありがとうございます
message=<p>コメントを受け付けました。<a href="<mt:entryLink archive_type="Individual" />">元のエントリーに戻る</a></p></mt:setvars>
</mt:if>
<mt:if name="body_class" eq="mt-comment-pending">
<mt:setvars>
title=「<mt:entryTitle encode_html="1" />」へのコメント投稿受け付け
heading=コメントありがとうございます
message=<p>コメントを受け付けました。受け付けたコメントは、ブログの管理者の承認のため保留されています。</p><p><a href="<mt:entryLink archive_type="Individual" />">元のエントリーに戻る</a></p></mt:setvars>
</mt:if>
<mt:if name="body_class" eq="mt-comment-error">
<mt:setvars>
body_onload=mtEntryOnLoad()
title=「<mt:entryTitle encode_html="1" />」へのコメント投稿エラー
heading=コメントの登録エラー
message=<p>コメントの投稿に失敗しました:</p><blockquote><strong><mt:errorMessage /></strong></blockquote>
</mt:setvars>
<mt:setVarBlock name="html_head" append="1">
<script type="text/javascript">
/* <![CDATA[ */
var user = <mt:userSessionState />;
var is_preview = true;
/* ]]> */
</script>
</mt:setVarBlock>
</mt:if>
<mt:include module="ヘッダー" />
<div id="contents" class="clearfix">
  <div id="main">
    <div class="content-header comments-header"><mt:getVar name="heading" /></div>
    <div class="content">
       <div class="comment-content"><mt:getVar name="message" /></div>
    </div>
  <mt:if name="body_class" eq="mt-comment-error">
    <mt:include module="コメント" />
  </mt:if>
  </div>
  <div id="sub1">
    <mt:include module="サイドバー左" />
  </div>
  <div id="sub2">
    <mt:include module="サイドバー右" />
  </div>
</div>
<mt:include module="フッター" />

34.[システムテンプレート]検索結果

<mt:setvars>
search_results_template=1
title=&ldquo;<mt:searchString />&rdquo;の検索結果
page_layout=layout-three-column
</mt:setvars>
<mt:setVarBlock name="html_head" append="1">
<script type="text/javascript">
/* <![CDATA[ */
var user = <$MTUserSessionState$>;
<mt:ifMoreResults>
function getResults(page) {
    page = parseInt(page);
    if (timer) window.clearTimeout(timer);
    var xh = mtGetXmlHttp();
    if (!xh) return false;
    var res = results[page];
    if (!res) return;
    var url = res['next_url'];
    if (!url) return;
 
    xh.open('GET', url + '&format=js', true);
    xh.onreadystatechange = function() {
        if ( xh.readyState == 4 ) {
            if ( xh.status && ( xh.status != 200 ) ) {
                // error - ignore
            } else {
                try {
                    var page_results = eval("(" + xh.responseText + ")");
                    if ( page_results['error'] == null )
                        results[page + 1] = page_results['result'];
                } catch (e) {
                }
            }
        }
    };
    xh.send(null);
}
function swapContent(direction) {
    if ( direction == undefined ) direction = 1;
    var page_span = document.getElementById('current-page');
    if (!page_span) return true;
    var next_page = direction + parseInt(page_span.innerHTML);
    var res = results[next_page];
    if (!res) return true;
    var content = res['content'];
    if (!content) return true;
    var div = document.getElementById('search-results');
    if (!div) return true;
    div.innerHTML = content;
    timer = window.setTimeout("getResults(" + next_page + ")", 1*1000);
    window.scroll(0, 0);
    return false;
}
<mt:else><mt:ifPreviousResults>
function swapContent(direction) {
	return true;
}</mt:ifPreviousResults>
</mt:ifMoreResults>
/* ]]> */
</script>
</mt:setVarBlock>
<mt:include module="ヘッダー" />
<div id="contents" class="clearfix">
  <div id="main">
<mt:setVarTemplate id="search_results" name="search_results">  
  <mt:searchResults>
    <mt:searchResultsHeader>
  <div id="search-results">
    <span id="current-page" style="display:none;"><mt:currentPage /></span>
    <h2 class="content-header">
      <mt:ifStraightSearch>
        &ldquo;<mt:searchString />&rdquo;と一致するもの
      </mt:ifStraightSearch>
      <mt:ifTagSearch>
        &ldquo;<mt:searchString />&rdquo;が付けられているもの
      </mt:ifTagSearch>
    </h2>
    </mt:searchResultsHeader>
    <mt:include module="ブログ記事の概要" />
    <mt:searchResultsFooter>
    <div class="content-nav">
      <mt:ifPreviousResults>
      <a href="<mt:previousLink>" rel="prev" onclick="return swapContent(-1);" onkeypress="return swapContent(-1);">&lt; 前</a>&nbsp;&nbsp;
      </mt:ifPreviousResults>
      <mt:pagerBlock>
        <mt:ifCurrentPage>
          <mt:getVar name="__value__">
        <mt:else>
          <a href="<mt:pagerLink>"><mt:getVar name="__value__"></a>
        </mt:ifCurrentPage>
        <mt:unless name="__last__">&nbsp;</mt:unless>
      </mt:pagerBlock>
      <mt:ifMoreResults>
      &nbsp;&nbsp;<a href="<mt:nextLink>" rel="next" onclick="return swapContent();" onkeypress="return swapContent();">次 &gt;</a>
      </mt:ifMoreResults>
    </div>
  </div>
    </mt:searchResultsFooter>
  </mt:searchResults>
</mt:setVarTemplate>
<mt:getVar name="search_results">
<mt:noSearchResults>
<h2 class="content-header">
  <mt:ifStraightSearch>
  &ldquo;<mt:searchString />&rdquo;と一致するもの
  </mt:ifStraightSearch>
  <mt:ifTagSearch>
  &ldquo;<mt:searchString />&rdquo;が付けられているもの
  </mt:ifTagSearch>
</h2>
<div class="content">
<p>&ldquo;<mt:searchString />&rdquo;を含むコンテンツが見つかりませんでした。</p>
</div>
</mt:noSearchResults>
<mt:noSearch>
<h2 class="content-header">例</h3>
<div class="entry">
<p>すべての単語が順序に関係なく検索されます。フレーズで検索したいときは引用符で囲んでください。</p>
<blockquote>
    <p><code>"movable type"</code></p>
</blockquote>
<p>AND、OR、NOTを入れることで論理検索を行うこともできます。</p>
<blockquote>
    <p><code>personal OR publishing</code></p>
    <p><code>publishing NOT personal</code></p>
</blockquote>
</div>
</mt:noSearch>
  </div>
  <div id="sub1">
    <mt:include module="サイドバー左" />
  </div>
  <div id="sub2">
    <mt:include module="サイドバー右" />
  </div>
</div>
<mt:ifMoreResults>
<script type="text/javascript">
<!--
var div = document.getElementById('search-results');
var results = {
  '<mt:currentPage>': {
    'content': div.innerHTML,
    'next_url': '<mt:nextLink>'
  }
};
var timer = window.setTimeout("getResults(" + <MTCurrentPage> + ")", 1*1000);
//-->
</script>
</mt:ifMoreResults>
<mt:include module="フッター" />

35.[システムテンプレート]ポップアップ画像

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
<body id="uploaded-image-popup" class="popup" style="margin: 0;padding: 0;">
<div id="popup-container">
  <div id="popup-container">
    <img src="<mt:imageURL />" width="<mt:imageWidth />" height="<mt:imageHeight />" style="margin: 0;padding: 0;border: 0;" />
  </div>
</div>
</body>
</html>

36.[システムテンプレート]ダイナミックパブリッシングエラー

<mt:setVars>
title=<mt:blogName encode_html="1" />: ページが見つかりません
</mt:setVars>
<mt:include module="ヘッダー" />
<div id="contents" class="clearfix">
  <div id="main">
  <h2 class="content-header comments-header">ページが見つかりません</h2>
  <div class="content comment">
    <blockquote>
      <strong><mt:errorMessage /></strong>
    </blockquote>
  </div>
  </div>
  <div id="sub1">
    <mt:include module="サイドバー左" />
  </div>
  <div id="sub2">
    <mt:include module="サイドバー右" />
  </div>
</div>
<mt:include module="フッター" />

37.[インデックステンプレート]Atom

<mt:HTTPContentType type="application/atom+xml" /><?xml version="1.0" encoding="<mt:publishCharset />"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title><mt:blogName remove_html="1" encode_xml="1" /></title>
  <link rel="alternate" type="text/html" href="<mt:blogURL encode_xml="1" />" />
  <link rel="self" type="application/atom+xml" href="<mt:link template="atom" />" />
  <id>tag:<mt:blogHost exclude_port="1" encode_xml="1" />,<mt:templateCreatedOn format="%Y-%m-%d" />:<mt:blogRelativeURL encode_xml="1" />/<mt:blogID /></id>
  <updated><mt:entries lastn="1"><mt:entryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ" /></mt:entries></updated>
  <mt:if tag="blogDescription"><subtitle><mt:blogDescription remove_html="1" encode_xml="1" /></subtitle></mt:if>
  <generator uri="http://www.sixapart.com/movabletype/"><mt:productName version="1" /></generator>
<mt:entries lastn="15">
<entry>
  <title><mt:entryTitle remove_html="1" encode_xml="1" /></title>
  <link rel="alternate" type="text/html" href="<mt:entryPermalink encode_xml="1" />" />
  <id><mt:entryAtomID /></id>
  <published><mt:entryDate utc="1" format="%Y-%m-%dT%H:%M:%SZ" /></published>
  <updated><mt:entryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ" /></updated>
  <summary><mt:entryExcerpt remove_html="1" encode_xml="1" /></summary>
  <author>
    <name><mt:entryAuthorDisplayName encode_xml="1" /></name>
    <mt:if tag="entryAuthorURL"><uri><mt:entryAuthorURL encode_xml="1" /></uri></mt:if>
  </author>
  <mt:entryCategories>
    <category term="<mt:categoryLabel encode_xml="1" />" scheme="http://www.sixapart.com/ns/types#category" />
  </mt:entryCategories>
  <mt:entryIfTagged><mt:entryTags><category term="<mt:tagName normalize="1" encode_xml="1" />" label="<mt:tagName encode_xml="1" />" scheme="http://www.sixapart.com/ns/types#tag" />
  </mt:entryTags></mt:entryIfTagged>
  <content type="html" xml:lang="<mt:blogLanguage ietf="1" />" xml:base="<mt:blogURL encode_xml="1" />">
    <mt:entryBody encode_xml="1" />
    <mt:entryMore encode_xml="1" />
  </content>
</entry>
</mt:entries>
</feed>

38.[インデックステンプレート]RSS

<mt:HTTPContentType type="application/rss+xml" /><?xml version="1.0" encoding="<mt:publishCharset />"?>
<rss version="2.0">
  <channel>
    <title><mt:blogName remove_html="1" encode_xml="1" /></title>
    <link><mt:blogURL /></link>
    <description><mt:blogDescription remove_html="1" encode_xml="1" /></description>
    <language><mt:blogLanguage ietf="1" /></language>
    <copyright>Copyright <mt:date format="%Y" /></copyright>
    <lastBuildDate><mt:entries lastn="1"><mt:entryDate format_name="rfc822" /></mt:entries></lastBuildDate>
    <generator>http://www.sixapart.com/movabletype/</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <mt:entries lastn="15">
    <item>
      <title><mt:entryTitle remove_html="1" encode_xml="1" /></title>
      <description><mt:entryBody encode_xml="1" /></description>
      <link><mt:entryPermalink encode_xml="1" /></link>
      <guid><mt:entryPermalink encode_xml="1" /></guid>
      <mt:entryCategories>
        <category domain="http://www.sixapart.com/ns/types#category"><mt:categoryLabel remove_html="1" encode_xml="1" /></category>
      </mt:entryCategories>
      <mt:entryIfTagged><mt:entryTags>
        <category domain="http://www.sixapart.com/ns/types#tag"><mt:tagName remove_html="1" encode_xml="1" /></category>
      </mt:entryTags></mt:entryIfTagged>
      <pubDate><mt:entryDate format_name="rfc822" /></pubDate>
    </item>
    </mt:entries>
  </channel>
</rss>

39.[インデックステンプレート]RSD

<mt:HTTPContentType type="application/rsd+xml" /><?xml version="1.0"?>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
<service>
<engineName><mt:productName version="1" /></engineName>
<engineLink>http://www.sixapart.com/movabletype/</engineLink>
<homePageLink><mt:blogURL /></homePageLink>
<apis>
<api name="MetaWeblog" preferred="true" apiLink="<mt:CGIPath /><mt:XMLRPCScript />" blogID="<mt:blogID />" />
<api name="MovableType" preferred="false" apiLink="<mt:CGIPath /><mt:XMLRPCScript />" blogID="<mt:blogID />" />
<api name="Blogger" preferred="false" apiLink="<mt:CGIPath /><mt:XMLRPCScript />" blogID="<mt:blogID />" />
<api name="Atom" preferred="false" apiLink="<mt:CGIPath /><mt:AtomScript />/weblog" blogID="<mt:blogID />" />
</apis>
</service>
</rsd>

40.[インデックステンプレート]JavaScript

<mt:Ignore>
/*  The following functions and variables are here to support legacy MT templates.
    If you have refreshed your JavaScript template but still use older MT comment
    templates, you may need to uncomment this block in order for those templates 
    to work properly. To use, simply remove the 'mt:Ignore' tags wrapping this
    block of code.
*/
    function hideDocumentElement(id) { return mtHide(id) }
    function showDocumentElement(id) { return mtShow(id) }
    function individualArchivesOnLoad() { return mtEntryOnLoad() }
    function writeCommenterGreeting() { return mtShowGreeting() }
    function rememberMe(f) { return mtRememberMe(f) }
    function forgetMe(f) { return mtForgetMe(f) }
    var commenter_name;
    var commenter_id;
    var commenter_url;
    var commenter_blog_ids;
    var mtcmtmail;
    var mtcmtauth;
    var mtcmthome;
    var captcha_timer;
</mt:Ignore>
 
// The cookie name to use for storing the blog-side comment session cookie.
var mtCookieName = "<$mt:UserSessionCookieName$>";
var mtCookieDomain = "<$mt:UserSessionCookieDomain$>";
var mtCookiePath = "<$mt:UserSessionCookiePath$>";
var mtCookieTimeout = <$mt:UserSessionCookieTimeout$>;
 
<mt:Ignore>
/***
 * Simple routine for showing a DOM element (applying a CSS display
 * attribute of 'none').
 */
</mt:Ignore>
function mtHide(id) {
    var el = (typeof id == "string") ? document.getElementById(id) : id;
    if (el) el.style.display = 'none';
}
 
<mt:Ignore>
/***
 * Simple routine for showing a DOM element (applying a CSS display
 * attribute of 'block').
 */
</mt:Ignore>
function mtShow(id) {
    var el = (typeof id == "string") ? document.getElementById(id) : id;
    if (el) el.style.display = 'block';
}
 
<mt:Ignore>
/***
 * A utility function for assigning/adding handlers to window events.
 */
</mt:Ignore>
function mtAttachEvent(eventName,func) {
    var onEventName = 'on' + eventName;
    var old = window[onEventName];
    if( typeof old != 'function' )
        window[onEventName] = func;
    else {
        window[onEventName] = function( evt ) {
            old( evt );
            return func( evt );
        };
    }
}
 
<mt:Ignore>
/***
 * Calls the event named, if there are handlers for it.
 */
</mt:Ignore>
function mtFireEvent(eventName,param) {
    var fn = window['on' + eventName];
    if (typeof fn == 'function') return fn(param);
    return;
}
 
<mt:Ignore>
/***
 * 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.
 */
</mt:Ignore>
function mtRelativeDate(ts, fds) {
    var now = new Date();
    var ref = ts;
    var delta = Math.floor((now.getTime() - ref.getTime()) / 1000);
 
    var str;
    if (delta < 60) {
        str = '<__trans phrase="moments ago" escape="js">';
    } else if (delta <= 86400) {
        // less than 1 day
        var hours = Math.floor(delta / 3600);
        var min = Math.floor((delta % 3600) / 60);
        if (hours == 1)
            str = '<__trans phrase="[quant,_1,hour,hours] ago" params="1" escape="js">';
        else if (hours > 1)
            str = '<__trans phrase="[quant,_1,hour,hours] ago" params="2" escape="js">'.replace(/2/, hours);
        else if (min == 1)
            str = '<__trans phrase="[quant,_1,minute,minutes] ago" params="1" escape="js">';
        else
            str = '<__trans phrase="[quant,_1,minute,minutes] ago" params="2" escape="js">'.replace(/2/, min);
    } else if (delta <= 604800) {
        // less than 1 week
        var days = Math.floor(delta / 86400);
        var hours = Math.floor((delta % 86400) / 3600);
        if (days == 1)
            str = '<__trans phrase="[quant,_1,day,days] ago" params="1" escape="js">';
        else if (days > 1)
            str = '<__trans phrase="[quant,_1,day,days] ago" params="2" escape="js">'.replace(/2/, days);
        else if (hours == 1)
            str = '<__trans phrase="[quant,_1,hour,hours] ago" params="1" escape="js">';
        else
            str = '<__trans phrase="[quant,_1,hour,hours] ago" params="2" escape="js">'.replace(/2/, hours);
    }
    return str ? str : fds;
}
 
<mt:Ignore>
/***
 * Used to display an edit link for the given entry.
 */
</mt:Ignore>
function mtEditLink(entry_id, author_id) {
    var u = mtGetUser();
    if (! u) return;
    if (! entry_id) return;
    if (! author_id) return;
    if (u.id != author_id) return;
    var link = '<a href="<$mt:AdminScript$>?__mode=view&amp;_type=entry&amp;id=' + entry_id + '"><__trans phrase="Edit" escape="js"></a>';
    document.write(link);
}
 
<mt:Ignore>
/***
 * Called when an input field on the comment form receives focus.
 */
</mt:Ignore>
function mtCommentFormOnFocus() {
    // if CAPTCHA is enabled, this causes the captcha image to be
    // displayed if it hasn't been already.
    mtShowCaptcha();
}
 
<mt:Ignore>
/***
 * Displays a captcha field for anonymous commenters.
 */
</mt:Ignore>
var mtCaptchaVisible = false;
function mtShowCaptcha() {
    var u = mtGetUser();
    if ( u && u.is_authenticated ) return;
    if (mtCaptchaVisible) return;
    var div = document.getElementById('comments-open-captcha');
    if (div) {
        div.innerHTML = '<$mt:CaptchaFields$>';
        mtCaptchaVisible = true;
    }
}
 
<mt:Ignore>
/* user object
    -- saved in user cookie --
    u.name (display name)
    u.url (link to home page)
    u.email (for anonymous only)
    u.userpic (url for commenter/author)
    u.profile (link to profile)
    u.is_trusted (boolean)
    u.is_author (user has posting rights)
    u.is_banned (banned status; neither post/comment perms)
    u.can_post (has permission to post)
    u.can_comment (has permission to comment)
 
    -- status fields --
    u.is_authenticated (boolean)
    u.is_anonymous (user is anonymous)
*/
</mt:Ignore>
 
var is_preview;
var user;
<mt:Ignore>
/***
 * Assigns a user object as the actively logged in user; also saves the
 * user information in a browser cookie.
 */
</mt:Ignore>
function mtSetUser(u) {
    if (u) {
        // persist this
        user = u;
        mtSaveUser();
        // sync up user greeting
        mtFireEvent('usersignin');
    }
}
 
<mt:Ignore>
/***
 * Simple function that escapes single quote characters for storing
 * in a cookie.
 */
</mt:Ignore>
function mtEscapeJS(s) {
    s = s.replace(/'/g, "&apos;");
    return s;
}
 
<mt:Ignore>
/***
 * Simple function that unescapes single quote characters that were
 * stored in a cookie.
 */
</mt:Ignore>
function mtUnescapeJS(s) {
    s = s.replace(/&apos;/g, "'");
    return s;
}
 
<mt:Ignore>
/***
 * Serializes a user object into a string, suitable for storing as a cookie.
 */
</mt:Ignore>
function mtBakeUserCookie(u) {
    var str = "";
    if (u.name) str += "name:'" + mtEscapeJS(u.name) + "';";
    if (u.url) str += "url:'" + mtEscapeJS(u.url) + "';";
    if (u.email) str += "email:'" + mtEscapeJS(u.email) + "';";
    if (u.auth_type) str += "auth_type:'" + u.auth_type + "';";
    if (u.is_authenticated) str += "is_authenticated:'1';";
    if (u.profile) str += "profile:'" + mtEscapeJS(u.profile) + "';";
    if (u.userpic) str += "userpic:'" + mtEscapeJS(u.userpic) + "';";
    if (u.sid) str += "sid:'" + mtEscapeJS(u.sid) + "';";
    str += "is_trusted:'" + (u.is_trusted ? "1" : "0") + "';";
    str += "is_author:'" + (u.is_author ? "1" : "0") + "';";
    str += "is_banned:'" + (u.is_banned ? "1" : "0") + "';";
    str += "can_post:'" + (u.can_post ? "1" : "0") + "';";
    str += "can_comment:'" + (u.can_comment ? "1" : "0") + "';";
    str = str.replace(/;$/, '');
    return str;
}
 
<mt:Ignore>
/***
 * Unserializes a user cookie and returns a user object with the restored
 * state.
 */
</mt:Ignore>
function mtUnbakeUserCookie(s) {
    if (!s) return;
 
    var u = {};
    var m;
    while (m = s.match(/^((name|url|email|auth_type|is_authenticated|profile|userpic|sid|is_trusted|is_author|is_banned|can_post|can_comment):'([^']+?)';?)/)) {
        s = s.substring(m[1].length);
        if (m[2].match(/^(is|can)_/)) // boolean fields
            u[m[2]] = m[3] == '1' ? true : false;
        else
            u[m[2]] = mtUnescapeJS(m[3]);
    }
    if (u.is_authenticated) {
        u.is_anonymous = false;
    } else {
        u.is_anonymous = true;
        u.can_post = false;
        u.is_author = false;
        u.is_banned = false;
        u.is_trusted = false;
    }
    return u;
}
 
<mt:Ignore>
/***
 * Retrieves an object of the currently logged in user's state.
 * If no user is logged in or cookied, this will return null.
 */
</mt:Ignore>
function mtGetUser() {
    if (!user) {
        var cookie = mtGetCookie(mtCookieName);
        if (!cookie) return;
        user = mtUnbakeUserCookie(cookie);
        if (! user) {
            user = {};
            user.is_anonymous = true;
            user.can_post = false;
            user.is_author = false;
            user.is_banned = false;
            user.is_trusted = false;
        }
    }
    return user;
}
 
<mt:Ignore>
/***
 * Issues a request to the MT comment script to retrieve the currently
 * logged-in user (if any).
 */
</mt:Ignore>
var mtFetchedUser = false;
<mt:IfBlog>
function mtFetchUser(cb) {
    if (!cb) cb = 'mtSetUser';
    if ( ( cb == 'mtSetUser' ) && mtGetUser() ) {
        var url = document.URL;
        url = url.replace(/#.+$/, '');
        url += '#comments-open';
        location.href = url;
    } else {
        // we aren't using AJAX for this, since we may have to request
        // from a different domain. JSONP to the rescue.
        mtFetchedUser = true;
        var script = document.createElement('script');
        var ts = new Date().getTime();
        script.src = '<$mt:CGIPath$><$mt:CommentScript$>?__mode=session_js&blog_id=<$mt:BlogID$>&jsonp=' + cb + '&ts=' + ts;
        (document.getElementsByTagName('head'))[0].appendChild(script);
    }
}
</mt:IfBlog>
 
<mt:Ignore>
/***
 * Called when the 'Remember me' checkbox is changed. If the checkbox
 * is cleared, the cached user cookie is immediately cleared.
 */
</mt:Ignore>
function mtRememberMeOnClick(b) {
    if (!b.checked)
        mtClearUser(b.form);
    return true;
}
 
<mt:Ignore>
/***
 * 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.
 */
</mt:Ignore>
<mt:IfBlog>
var mtRequestSubmitted = false;
function mtCommentOnSubmit(f) {
    if (!mtRequestSubmitted) {
        mtRequestSubmitted = true;
 
        if (f.armor)
            f.armor.value = '<$mt:BlogSitePath encode_sha1="1"$>';
        if (f.bakecookie && f.bakecookie.checked)
            mtSaveUser(f);
 
        // disable submit buttons
        if (f.preview_button) f.preview_button.disabled = true;
        if (f.post) f.post.disabled = true;
 
        var u = mtGetUser();
        if ( !is_preview && ( u && u.is_authenticated ) ) {
            // validate session; then submit
            mtFetchedUser = false;
            mtFetchUser('mtCommentSessionVerify');
            return false;
        }
 
        return true;
    }
    return false;
}
 
function mtCommentSessionVerify(app_user) {
    var u = mtGetUser();
    var f = document['comments_form'];
    if ( u && app_user && app_user.sid && ( u.sid == app_user.sid ) ) {
        f.submit();
    } else {
        alert('<__trans phrase="Your session has expired. Please sign in again to comment." escape="js">');
        mtClearUser();
        mtFireEvent('usersignin');
<mt:IfRegistrationRequired>
        mtShow('comments-form');
        mtHide('comments-open-footer');
</mt:IfRegistrationRequired>
    }
}
 
function mtUserOnLoad() {
    var u = mtGetUser();
 
    // if the user is authenticated, hide the 'anonymous' fields
    // and any captcha input if already shown
    if ( document.getElementById('comments-form')) {
        if ( u && u.is_authenticated ) {
            mtShow('comments-form');
            mtHide('comments-open-data');
            if (mtCaptchaVisible)
                mtHide('comments-open-captcha');
        } else {
<mt:IfRegistrationRequired>
            mtHide('comments-form');
</mt:IfRegistrationRequired>
        }
        if ( u && u.is_banned )
            mtHide('comments-form');
 
        // if we're previewing a comment, make sure the captcha
        // field is visible
        if (is_preview)
            mtShowCaptcha();
        else
            mtShowGreeting();
 
        // populate anonymous comment fields if user is cookied as anonymous
        var cf = document['comments_form'];
        if (cf) {
            if (u && u.is_anonymous) {
                if (u.email) cf.email.value = u.email;
                if (u.name) cf.author.value = u.name;
                if (u.url) cf.url.value = u.url;
                if (cf.bakecookie)
                    cf.bakecookie.checked = u.name || u.email;
            } else {
                if (u && u.sid && cf.sid)
                    cf.sid.value = u.sid;
            }
            if (cf.post.disabled)
                cf.post.disabled = false;
            if (cf.preview_button.disabled)
                cf.preview_button.disabled = false;
            mtRequestSubmitted = false;
        }
    }
}
</mt:IfBlog>
 
<mt:Ignore>
/***
 * 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.
 */
</mt:Ignore>
<mt:IfBlog>
function mtEntryOnLoad() {
    <mt:Unless tag="IfPingsAccepted">mtHide('trackbacks-info');</mt:Unless>
    <mt:Unless tag="IfCommentsAccepted">mtHide('comments-open');</mt:Unless>
    mtFireEvent('usersignin');
}
 
function mtEntryOnUnload() {
    if (mtRequestSubmitted) {
        var cf = document['comments_form'];
        if (cf) {
            if (cf.post && cf.post.disabled)
                cf.post.disabled = false;
            if (cf.preview_button && cf.preview_button.disabled)
                cf.preview_button.disabled = false;
        }
        mtRequestSubmitted = false;
    }
    return true;
}
 
mtAttachEvent('usersignin', mtUserOnLoad);
</mt:IfBlog>
 
<mt:Ignore>
/***
 * 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.
 */
</mt:Ignore>
function mtSignIn() {
    var doc_url = document.URL;
    doc_url = doc_url.replace(/#.+/, '');
    var url = '<$mt:SignInLink$>';
    if (is_preview) {
        if ( document['comments_form'] ) {
            var entry_id = document['comments_form'].entry_id.value;
            url += '&entry_id=' + entry_id;
        } else {
            url += '&return_url=<$mt:BlogURL encode_url="1"$>';
        }
    } else {
        url += '&return_url=' + encodeURIComponent(doc_url);
    }
    mtClearUser();
    location.href = url;
}
 
function mtSignInOnClick(sign_in_element) {
    var el;
    if (sign_in_element) {
        // display throbber
        el = document.getElementById(sign_in_element);
        if (!el)  // legacy MT 4.x element id
            el = document.getElementById('comment-form-external-auth');
    }
    if (el)
        el.innerHTML = '<__trans phrase="Signing in..." escape="js"> <img src="<mt:staticWebPath />images/indicator-login.gif" />';
 
    mtClearUser(); // clear any 'anonymous' user cookie to allow sign in
    mtFetchUser('mtSetUserOrLogin');
    return false;
}
 
function mtSetUserOrLogin(u) {
    if (u && u.is_authenticated) {
        mtSetUser(u);
    } else {
        // user really isn't logged in; so let's do this!
        mtSignIn();
    }
}
 
<mt:Ignore>
/***
 * 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.
 */
</mt:Ignore>
function mtSignOut(entry_id) {
    mtClearUser();
    var doc_url = document.URL;
    doc_url = doc_url.replace(/#.+/, '');
    var url = '<$mt:SignOutLink$>';
    if (is_preview) {
        if ( document['comments_form'] ) {
            var entry_id = document['comments_form'].entry_id.value;
            url += '&entry_id=' + entry_id;
        } else {
            url += '&return_url=<$mt:BlogURL encode_url="1"$>';
        }
    } else {
        url += '&return_url=' + encodeURIComponent(doc_url);
    }
    location.href = url;
}
 
<mt:Ignore>
/***
 * Handles the action of the "Sign out" link.
 */
</mt:Ignore>
function mtSignOutOnClick() {
    mtSignOut();
    return false;
}
 
<mt:Ignore>
/***
 * Handles the display of the greeting message, depending on what kind of
 * user is logged in and blog comment policy.
 */
</mt:Ignore>
<mt:IfBlog>
function mtShowGreeting() {
<mt:IfRegistrationAllowed>
    var reg_reqd = <mt:IfRegistrationRequired>true<mt:Else>false</mt:IfRegistrationRequired>;
 
    var cf = document['comments_form'];
    if (!cf) return;
 
    var el = document.getElementById('comment-greeting');
    if (!el)  // legacy MT 4.x element id
        el = document.getElementById('comment-form-external-auth');
    if (!el) return;
 
    var eid = cf.entry_id;
    var entry_id;
    if (eid) entry_id = eid.value;
 
    var phrase;
    var u = mtGetUser();
 
    if ( u && u.is_authenticated ) {
        if ( u.is_banned ) {
            phrase = '<__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">';
        } else {
            var user_link;
            if ( u.is_author ) {
                user_link = '<a href="<$mt:CGIPath$><$mt:CommentScript$>?__mode=edit_profile&return_url=' + encodeURIComponent( location.href );
                user_link += '">' + u.name + '</a>';
            } else {
                // registered user, but not a user with posting rights
                if (u.url)
                    user_link = '<a href="' + u.url + '">' + u.name + '</a>';
                else
                    user_link = u.name;
            }
            // TBD: supplement phrase with userpic if one is available.
            phrase = '<__trans phrase="Thanks for signing in, __NAME__. ([_1]sign out[_2])" params="<a href="javascript:void(0)" onclick="return mtSignOutOnClick();">%%</a>" escape="js">';
            phrase = phrase.replace(/__NAME__/, user_link);
        }
    } else {
        if (reg_reqd) {
            phrase = '<__trans phrase="[_1]Sign in[_2] to comment." params="<a href="javascript:void(0)" onclick="return mtSignInOnClick('comment-greeting')">%%</a>" escape="js">';
        } else {
            phrase = '<__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">';
        }
    }
    el.innerHTML = phrase;
<mt:Else>
    mtShowCaptcha();
</mt:IfRegistrationAllowed>
}
</mt:IfBlog>
 
<mt:Ignore>
/***
 * Handles the action of the 'Reply' links.
 */
</mt:Ignore>
function mtReplyCommentOnClick(parent_id, author) {
    mtShow('comment-form-reply');
 
    var checkbox = document.getElementById('comment-reply');
    var label = document.getElementById('comment-reply-label');
    var text = document.getElementById('comment-text');
 
    // Populate label with new values
    var reply_text = '<__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">';
    reply_text = reply_text.replace(/__PARENT__/, parent_id);
    reply_text = reply_text.replace(/__AUTHOR__/, author);
    label.innerHTML = reply_text;
 
    checkbox.value = parent_id; 
    checkbox.checked = true;
    try {
        // text field may be hidden
        text.focus();
    } catch(e) {
    }
 
    mtSetCommentParentID();
}
 
<mt:Ignore>
/***
 * Sets the parent comment ID when replying to a comment.
 */
</mt:Ignore>
function mtSetCommentParentID() {
    var checkbox = document.getElementById('comment-reply');
    var parent_id_field = document.getElementById('comment-parent-id');
    if (!checkbox || !parent_id_field) return;
 
    var pid = 0;
    if (checkbox.checked == true)
        pid = checkbox.value;
    parent_id_field.value = pid;
}
 
<mt:Ignore>
/***
 * Persists a copy of the current user cookie into the browser cookie stash.
 */
</mt:Ignore>
function mtSaveUser(f) {
    // We can't reliably store the user cookie during a preview.
    if (is_preview) return;
 
    var u = mtGetUser();
 
    if (f && (!u || u.is_anonymous)) {
        if ( !u ) {
            u = {};
            u.is_authenticated = false;
            u.can_comment = true;
            u.is_author = false;
            u.is_banned = false;
            u.is_anonymous = true;
            u.is_trusted = false;
        }
        if (f.author != undefined) u.name = f.author.value;
        if (f.email != undefined) u.email = f.email.value;
        if (f.url != undefined) u.url = f.url.value;
    }
 
    if (!u) return;
 
    var cache_period = mtCookieTimeout * 1000;
 
    // cache anonymous user info for a long period if the
    // user has requested to be remembered
    if (u.is_anonymous && f && f.bakecookie && f.bakecookie.checked)
        cache_period = 365 * 24 * 60 * 60 * 1000;
 
    var now = new Date();
    mtFixDate(now);
    now.setTime(now.getTime() + cache_period);
 
    var cmtcookie = mtBakeUserCookie(u);
    mtSetCookie(mtCookieName, cmtcookie, now, mtCookiePath, mtCookieDomain,
        location.protocol == 'https:');
}
 
<mt:Ignore>
/***
 * Clears the blog-side user cookie.
 */
</mt:Ignore>
function mtClearUser() {
    user = null;
    mtDeleteCookie(mtCookieName, mtCookiePath, mtCookieDomain,
        location.protocol == 'https:');
}
 
<mt:Ignore>
/***
 * Sets a browser cookie.
 */
</mt:Ignore>
function mtSetCookie(name, value, expires, path, domain, secure) {
    if (domain && domain.match(/^\.?localhost$/))
        domain = null;
    var curCookie = name + "=" + escape(value) +
        (expires ? "; expires=" + expires.toGMTString() : "") +
        (path ? "; path=" + path : "") +
        (domain ? "; domain=" + domain : "") +
        (secure ? "; secure" : "");
    document.cookie = curCookie;
}
 
<mt:Ignore>
/***
 * Retrieves a browser cookie.
 */
</mt:Ignore>
function mtGetCookie(name) {
    var prefix = name + '=';
    var c = document.cookie;
    var cookieStartIndex = c.indexOf(prefix);
    if (cookieStartIndex == -1)
        return '';
    var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
        cookieEndIndex = c.length;
    return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}
 
<mt:Ignore>
/***
 * Deletes a browser cookie.
 */
</mt:Ignore>
function mtDeleteCookie(name, path, domain, secure) {
    if (mtGetCookie(name)) {
        if (domain && domain.match(/^\.?localhost$/))
            domain = null;
        document.cookie = name + "=" +
            (path ? "; path=" + path : "") +
            (domain ? "; domain=" + domain : "") +
            (secure ? "; secure" : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}
 
function mtFixDate(date) {
    var skew = (new Date(0)).getTime();
    if (skew > 0)
        date.setTime(date.getTime() - skew);
}
 
<mt:Ignore>
/***
 * Returns a XMLHttpRequest object (for Ajax operations).
 */
</mt:Ignore>
function mtGetXmlHttp() {
    if ( !window.XMLHttpRequest ) {
        window.XMLHttpRequest = function() {
            var types = [
                "Microsoft.XMLHTTP",
                "MSXML2.XMLHTTP.5.0",
                "MSXML2.XMLHTTP.4.0",
                "MSXML2.XMLHTTP.3.0",
                "MSXML2.XMLHTTP"
            ];
 
            for ( var i = 0; i < types.length; i++ ) {
                try {
                    return new ActiveXObject( types[ i ] );
                } catch( e ) {}
            }
 
            return undefined;
        };
    }
    if ( window.XMLHttpRequest )
        return new XMLHttpRequest();
}
 
// BEGIN: fast browser onload init
// Modifications by David Davis, DWD
// Dean Edwards/Matthias Miller/John Resig
// http://dean.edwards.name/weblog/2006/06/again/?full#comment5338
 
function mtInit() {
    // quit if this function has already been called
    if (arguments.callee.done) return;
 
    // flag this function so we don't do the same thing twice
    arguments.callee.done = true;
 
    // kill the timer
    // DWD - check against window
    if ( window._timer ) clearInterval(window._timer);
 
    // DWD - fire the window onload now, and replace it
    if ( window.onload && ( window.onload !== window.mtInit ) ) {
        window.onload();
        window.onload = function() {};
    }
}
 
/* for Mozilla/Opera9 */
if (document.addEventListener) {
    document.addEventListener("DOMContentLoaded", mtInit, false);
}
 
/* for Internet Explorer */
/*@cc_on @*/
/*@if (@_win32)
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
var script = document.getElementById("__ie_onload");
script.onreadystatechange = function() {
    if (this.readyState == "complete") {
        mtInit(); // call the onload handler
    }
};
/*@end @*/
 
/* for Safari */
if (/WebKit/i.test(navigator.userAgent)) { // sniff
    _timer = setInterval(function() {
        if (/loaded|complete/.test(document.readyState)) {
            mtInit(); // call the onload handler
        }
    }, 10);
}
 
/* for other browsers */
window.onload = mtInit;
 
// END: fast browser onload init
 
<mt:IfBlog>
<mt:IfRegistrationAllowed>
/***
 * 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.
 */
var clearCookie = ( window.location.hash && window.location.hash.match( /^#_log(in|out)/ ) ) ? true : false;
if (clearCookie) {
    // clear any logged in state
    mtClearUser();
    if (RegExp.$1 == 'in')
        mtFetchUser();
} else {
    <mt:Ignore>
    /***
     * Uncondition this call to fetch the current user state (if available)
     * from MT upon page load if no user cookie is already present.
     * This is okay if you have a private install, such as an Intranet;
     * not recommended for public web sites!
     */
    </mt:Ignore>
    if ( is_preview && !user )
        mtFetchUser();
}
</mt:IfRegistrationAllowed>
</mt:IfBlog>

ウェブページ

Powered by Movable Type 4.261

このアーカイブについて

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。