<mt:setvar name="page_title" value="<__trans phrase="General Settings">">
<$mt:setvar name="position_actions_bottom" value="1"$>
<mt:setvar name="general-settings" value="1">

<mt:setvarblock name="system_msg">
<mt:if name="error">
  <mtapp:statusmsg
     id="error"
     class="error"
     can_close="0">
    <mt:var name="error">
  </mtapp:statusmsg>
</mt:if>
<mt:if name="no_writedir">
  <mtapp:statusmsg
     id="no-writedir"
     class="error"
     can_close="0">
    <__trans phrase="Error: Movable Type was not able to create a directory for publishing your [_1]. If you create this directory yourself, grant write permission to the web server." params="<mt:var name="object_label" lower_case="1">">
  </mtapp:statusmsg>
<mt:else>
  <mt:if name="no_cachedir">
  <mtapp:statusmsg
     id="no-cachedir"
     class="error"
     can_close="0">
    <__trans phrase="Error: Movable Type was not able to create a directory to cache your dynamic templates. You should create a directory called <code>[_1]</code> underneath your blog directory." params="templates_c">
  </mtapp:statusmsg>
  <mt:else>
    <mt:if name="no_writecache">
  <mtapp:statusmsg
     id="no-writecache"
     class="error"
     can_close="0">
    <__trans phrase="Error: Movable Type cannot write to the template cache directory. Please check the permissions for the directory called <code>[_1]</code> underneath your blog directory." params="templates_c">
  </mtapp:statusmsg>
    <mt:else>
      <mt:if name="no_cache_path">
  <mtapp:statusmsg
     id="no-cache-path"
     class="error"
     can_close="0">
    <__trans phrase="Error: Movable Type was not able to create a directory to cache your dynamic templates. You should create a directory called <code>[_1]</code> underneath your blog directory." params="cache">
  </mtapp:statusmsg>
      <mt:else>
        <mt:if name="no_write_cache_path">
  <mtapp:statusmsg
     id="no-write-cache-path"
     class="error"
     can_close="0">
    <__trans phrase="Error: Movable Type cannot write to the template cache directory. Please check the permissions for the directory called <code>[_1]</code> underneath your blog directory." params="cache">
  </mtapp:statusmsg>
        <mt:else>
          <mt:if name="saved">
            <mt:if name="can_rebuild">
  <mtapp:statusmsg
     id="saved"
     class="success"
     rebuild="all"
     can_close="0">
    <__trans phrase="Your preferences have been saved.">
  </mtapp:statusmsg>
            <mt:else>
  <mtapp:statusmsg
     id="saved"
     class="success">
    <__trans phrase="Your preferences have been saved.">
  </mtapp:statusmsg>
            </mt:if>
          </mt:if>
        </mt:if>
      </mt:if>
    </mt:if>
  </mt:if>
</mt:if>
</mt:setvarblock>

<mt:include name="include/header.tmpl">

<script type="text/javascript">
/* <![CDATA[ */
function doRemoveLicense () {
    document.cfg_form.cc_license.value = '';
    var e = getByID('has-license');
    if (e) e.style.display = 'none';
    e = getByID('no-license');
    if (e) e.style.display = 'block';
}

function setLicense() {
    var w = window.open('http://creativecommons.org/license/?partner=SixApart&amp;jurisdiction_choose=1&amp;exit_url=<mt:var name="script_full_url">?__mode=cc_return%26license_name=[license_name]%26license_url=[license_url]%26license_button=[license_button]', 'cc', 'width=600,height=650,scrollbars=yes,resizable=no');
    if ( w ) w.focus();
   return false;
}
/* ]]> */
</script>

<mtapp:form id="cfg_form" name="cfg_form" mode="save" object_type="blog">
  <input type="hidden" name="cfg_screen" value="cfg_prefs" />

  <mtapp:settinggroup id="blog-settings">
    <h2><__trans phrase="[_1] Settings" params="<mt:var name="object_label" capitalize="1">"></h2>

    <mtapp:setting
       id="name"
       required="1"
       label="<__trans phrase="Name">"
       hint="<__trans phrase="Name your blog. The name can be changed at any time.">"
       help_page="blog_settings_general"
       help_section="blog_name">
      <input type="text" name="name" id="name" class="text required" value="<mt:var name="name" escape="html">" />
    </mtapp:setting>

    <mtapp:setting
       id="description"
       label="<__trans phrase="Description">"
       hint="<__trans phrase="Enter a description for your blog.">"
       help_page="blog_settings_general"
       help_section="blog_description">
      <textarea name="description" id="description" class="text low" cols="" rows=""><mt:var name="description" escape="html"></textarea>
    </mtapp:setting>

    <mt:ignore id="placeholder1"></mt:ignore>

    <mtapp:setting
       id="server_offset"
       required="1"
       label="<__trans phrase="Time Zone">"
       hint="<__trans phrase="Select your time zone from the pulldown menu.">"
       help_page="blog_settings_general"
       help_section="blog_timezone">
      <select name="server_offset" id="server_offset" class="half-width required">
        <option value=""><__trans phrase="Time zone not selected"></option>
        <option value="13"<mt:if name="SERVER_OFFSET_13"> selected="selected"</mt:if>><__trans phrase="UTC+13 (New Zealand Daylight Savings Time)"></option>
        <option value="12"<mt:if name="SERVER_OFFSET_12"> selected="selected"</mt:if>><__trans phrase="UTC+12 (International Date Line East)"></option>
        <option value="11"<mt:if name="SERVER_OFFSET_11"> selected="selected"</mt:if>><__trans phrase="UTC+11"></option>
        <option value="10"<mt:if name="SERVER_OFFSET_10"> selected="selected"</mt:if>><__trans phrase="UTC+10 (East Australian Time)"></option>
        <option value="9.5"<mt:if name="SERVER_OFFSET_9_5"> selected="selected"</mt:if>><__trans phrase="UTC+9.5 (Central Australian Time)"></option>
        <option value="9"<mt:if name="SERVER_OFFSET_9"> selected="selected"</mt:if>><__trans phrase="UTC+9 (Japan Time)"></option>
        <option value="8"<mt:if name="SERVER_OFFSET_8"> selected="selected"</mt:if>><__trans phrase="UTC+8 (China Coast Time)"></option>
        <option value="7"<mt:if name="SERVER_OFFSET_7"> selected="selected"</mt:if>><__trans phrase="UTC+7 (West Australian Time)"></option>
        <option value="6.5"<mt:if name="SERVER_OFFSET_6_5"> selected="selected"</mt:if>><__trans phrase="UTC+6.5 (North Sumatra)"></option>
        <option value="6"<mt:if name="SERVER_OFFSET_6"> selected="selected"</mt:if>><__trans phrase="UTC+6 (Russian Federation Zone 5)"></option>
        <option value="5.5"<mt:if name="SERVER_OFFSET_5_5"> selected="selected"</mt:if>><__trans phrase="UTC+5.5 (Indian)"></option>
        <option value="5"<mt:if name="SERVER_OFFSET_5"> selected="selected"</mt:if>><__trans phrase="UTC+5 (Russian Federation Zone 4)"></option>
        <option value="4"<mt:if name="SERVER_OFFSET_4"> selected="selected"</mt:if>><__trans phrase="UTC+4 (Russian Federation Zone 3)"></option>
        <option value="3.5"<mt:if name="SERVER_OFFSET_3_5"> selected="selected"</mt:if>><__trans phrase="UTC+3.5 (Iran)"></option>
        <option value="3"<mt:if name="SERVER_OFFSET_3"> selected="selected"</mt:if>><__trans phrase="UTC+3 (Baghdad Time/Moscow Time)"></option>
        <option value="2"<mt:if name="SERVER_OFFSET_2"> selected="selected"</mt:if>><__trans phrase="UTC+2 (Eastern Europe Time)"></option>
        <option value="1"<mt:if name="SERVER_OFFSET_1"> selected="selected"</mt:if>><__trans phrase="UTC+1 (Central European Time)"></option>
        <option value="0"<mt:if name="SERVER_OFFSET_0"> selected="selected"</mt:if>><__trans phrase="UTC+0 (Universal Time Coordinated)"></option>
        <option value="-1"<mt:if name="SERVER_OFFSET__1"> selected="selected"</mt:if>><__trans phrase="UTC-1 (West Africa Time)"></option>
        <option value="-2"<mt:if name="SERVER_OFFSET__2"> selected="selected"</mt:if>><__trans phrase="UTC-2 (Azores Time)"></option>
        <option value="-3"<mt:if name="SERVER_OFFSET__3"> selected="selected"</mt:if>><__trans phrase="UTC-3 (Atlantic Time)"></option>
        <option value="-3.5"<mt:if name="SERVER_OFFSET__3_5"> selected="selected"</mt:if>><__trans phrase="UTC-3.5 (Newfoundland)"></option>
        <option value="-4"<mt:if name="SERVER_OFFSET__4"> selected="selected"</mt:if>><__trans phrase="UTC-4 (Atlantic Time)"></option>
        <option value="-5"<mt:if name="SERVER_OFFSET__5"> selected="selected"</mt:if>><__trans phrase="UTC-5 (Eastern Time)"></option>
        <option value="-6"<mt:if name="SERVER_OFFSET__6"> selected="selected"</mt:if>><__trans phrase="UTC-6 (Central Time)"></option>
        <option value="-7"<mt:if name="SERVER_OFFSET__7"> selected="selected"</mt:if>><__trans phrase="UTC-7 (Mountain Time)"></option>
        <option value="-8"<mt:if name="SERVER_OFFSET__8"> selected="selected"</mt:if>><__trans phrase="UTC-8 (Pacific Time)"></option>
        <option value="-9"<mt:if name="SERVER_OFFSET__9"> selected="selected"</mt:if>><__trans phrase="UTC-9 (Alaskan Time)"></option>
        <option value="-10"<mt:if name="SERVER_OFFSET__10"> selected="selected"</mt:if>><__trans phrase="UTC-10 (Aleutians-Hawaii Time)"></option>
        <option value="-11"<mt:if name="SERVER_OFFSET__11"> selected="selected"</mt:if>><__trans phrase="UTC-11 (Nome Time)"></option>
      </select>
    </mtapp:setting>

    <mtapp:setting
       id="has-license"
       label="<__trans phrase="License">"
       help_page="blog_settings_general"
       help_section="creative_commons_license">
      <div id="has-license" style="display: none;">
      <mt:if name="cc_license">
        <a href="<mt:var name="cc_license_url">"><img src="<mt:var name="cc_license_image_url">" /></a>
      </mt:if>
        <p><__trans phrase="Your blog is currently licensed under:"> <strong id="cc-license-name"><mt:var name="cc_license_name"></strong></p>
        <span class="actions-link"><a href="javascript:void(0);" onclick="return setLicense();"><__trans phrase="Change license"></a> | <a href="javascript:void(0);" onclick="return doRemoveLicense();"><__trans phrase="Remove license"></a></span>
      </div>
      <div id="no-license" style="display: none;">
        <p><__trans phrase="Your blog does not have an explicit Creative Commons license."></p>
        <a href="javascript:void(0);" onclick="return setLicense();"><__trans phrase="Select a license"></a>
      </div>
      <script type="text/javascript">
      /* <![CDATA[ */
        var e = getByID(<mt:if name="cc_license">'has-license'<mt:else>'no-license'</mt:if>);
        if (e) e.style.display = 'block';
      /* ]]> */
      </script>
      <input type="hidden" name="cc_license" value="<mt:var name="cc_license" escape="html">" />
    </mtapp:setting>
  </mtapp:settinggroup>

<mt:if name="can_set_publish_paths">
  <h2><__trans phrase="Publishing Paths"></h2>
  <mtapp:settinggroup id="publushing-path-settings">
    <mtapp:setting
       id="site_url"
       class="url-field"
       label='<__trans phrase="[_1] URL" params="<mt:var name="object_label" capitalize="1">">'
       help_page="blog_settings_publishing"
       help_section="site_url">
    <mt:if name="site_url_subdomain">
      <div class="site-url content-path">
        <mt:var name="website_scheme">://<span class="subdomain"><input type="text" name="site_url_subdomain" id="site_url_subdomain" value="<mt:var name="site_url_subdomain" encode_html="1">" class="blog-subdomain-text path" />.</span><span class="website-url"><mt:var name="website_domain" encode_html="1"></span><span class="extra-path"><input type="text" name="site_url_path" id="site_url_path" value="<mt:var name="site_url_path" encode_html="1">" class="blog-url-text path" /></span>
      </div>
      <div class="use-subdomain option">
        <input type="checkbox" name="use_subdomain" id="use_subdomain" value="1" checked="checked" class="cb" /> <label for="use_subdomain"><__trans phrase="Use subdomain"></label>
      </div>
    <mt:elseif name="site_url_path">
      <div class="site-url content-path">
        <mt:var name="website_scheme">://<span class="subdomain"><input type="text" name="site_url_subdomain" id="site_url_subdomain" value="<mt:var name="site_url_subdomain" encode_html="1">" class="blog-subdomain-text path" />.</span><span class="website-url"><mt:var name="website_domain" encode_html="1"></span><span class="extra-path"><input type="text" name="site_url_path" id="site_url_path" value="<mt:var name="site_url_path" encode_html="1">" class="blog-url-text path" /></span>
      </div>
      <div class="use-subdomain option">
        <input type="checkbox" name="use_subdomain" id="use_subdomain" value="1"<mt:if name="use_subdomain"> checked="checked"</mt:if> class="cb" /> <label for="use_subdomain"><__trans phrase="Use subdomain"></label>
      </div>
    <mt:elseif name="is_blog">
      <div class="site-url content-path">
        <mt:var name="website_scheme">://<span class="subdomain"><input type="text" name="site_url_subdomain" id="site_url_subdomain" value="<mt:var name="site_url_subdomain" encode_html="1">" class="blog-subdomain-text path" />.</span><span class="website-url"><mt:var name="website_domain" encode_html="1"></span><span class="extra-path"><input type="text" name="site_url_path" id="site_url_path" value="<mt:var name="site_url_path" encode_html="1">" class="blog-url-text path" /></span>
      </div>
      <div class="use-subdomain option">
        <input type="checkbox" name="use_subdomain" id="use_subdomain" value="1"<mt:if name="use_subdomain"> checked="checked"</mt:if> class="cb" /> <label for="use_subdomain"><__trans phrase="Use subdomain"></label>
      </div>
    <mt:else>
      <div class="site-url content-path">
        <input type="text" name="site_url" id="site_url" value="<mt:var name="site_url" escape="html" default="$suggested_site_url">" class="text website-url-field mt-edit-field required" />
      </div>
    </mt:if>
      <p class="alert-warning-inline icon-left icon-warning" id="site_url-warning" style="display: none"><__trans phrase="Warning: Changing the [_1] URL can result in breaking all the links in your [_1]." params="<mt:var name="object_label" capitalize="1">%%"></p>
    <mt:if name="is_blog">
      <div class="hint"><__trans phrase="The URL of your blog. Exclude the filename (i.e. index.html). End with '/'. Example: http://www.example.com/blog/"></div>
    <mt:else>
      <div class="hint"><__trans phrase="The URL of your website. Exclude the filename (i.e. index.html).  End with '/'. Example: http://www.example.com/"></div>
    </mt:if>
    </mtapp:setting>

    <mtapp:setting
       id="site_path"
       class="site-path-field"
       label='<__trans phrase="[_1] Root" params="<mt:var name="object_label" capitalize="1">">'
       help_page="blog_settings_publishing"
       help_section="site_root">
      <div class="relative-site_path content-path">
        <span class="website-path"><mt:var name="website_path" encode_html="1"></span><span class="extra-path"><input type="text" name="site_path" id="site_path" value="<mt:if name="is_blog"><mt:unless name="site_path_absolute"><mt:var name="site_path" escape="html" default="$suggested_site_path"></mt:unless><mt:else><mt:var name="site_path" escape="html" default="$suggested_site_path"></mt:if>" class="<mt:if name="is_blog"> blog-path-text path<mt:else> mt-edit-field website-path-field required</mt:if> hide-input" /></span>
      </div>
    <mt:if name="is_blog">
      <div class="absolute-site_path content-path">
        <input type="text" name="site_path_absolute" id="site_path_absolute" value="<mt:if name="site_path_absolute"><mt:var name="site_path" escape="html"><mt:else><mt:var name="website_path" escape="html"></mt:if>" size="50" class="text blog-path-text hide-input" />
      </div>
      <div class="use-absolute option">
        <input type="checkbox" name="use_absolute" id="use_absolute" value="1"<mt:if name="site_path_absolute"> checked="checked"</mt:if> class="cb" /> <label for="use_absolute"><__trans phrase="Use absolute path"></label>
      </div>
    </mt:if>
      <p class="alert-warning-inline icon-left icon-warning" id="site_path-warning" style="display: none"><__trans phrase="Warning: Changing the [_1] root requires a complete publish of your [_1]." params="<mt:var name="object_label" capitalize="1">"></p>

      <div class="hint relative-site_path-hint">
        <__trans phrase="The path where your index files will be published. Do not end with '/' or '\'.  Example: /home/mt/public_html/blog or C:\www\public_html\blog">
      </div>
    <mt:if name="is_blog">
      <div class="hint absolute-site_path-hint">
        <__trans phrase="The path where your index files will be published. An absolute path (starting with '/' for Linux or 'C:\' for Windows) is preferred.  Do not end with '/' or '\'. Example: /home/mt/public_html or C:\www\public_html">
      </div>
    </mt:if>
    </mtapp:setting>

  <mt:if name="is_blog">
    <mtapp:setting
       id="enable_archive_paths"
       label="<__trans phrase="Advanced Archive Publishing">"
       show_label="0"
       hint="<__trans phrase="Select this option only if you need to publish your archives outside of your Blog Root.">"
       help_page="blog_settings_publishing"
       help_section="advanced_archive_publishing">
      <input type="checkbox" name="enable_archive_paths" id="enable_archive_paths" value="1"<mt:if name="enable_archive_paths"> checked="checked"</mt:if> class="cb" />
      <label for="enable_archive_paths"><__trans phrase="Publish archives outside of Blog Root"></label>
    </mtapp:setting>

    <div id="enable_archive_paths_prefs"<mt:unless name="enable_archive_paths"> class="hidden"</mt:unless>>
      <mtapp:setting
         id="archive_url"
         class="url-field"
         required="1"
         label="<__trans phrase="Archive URL">"
         hint="<__trans phrase="The URL of the archives section of your blog. Example: http://www.example.com/blog/archives/">"
         show_hint="1"
         help_page="blog_settings_publishing"
         help_section="archive_url">
      <mt:if name="archive_url_subdomain">
        <div class="archive-url content-path">
          <span class="archive-url-domain"><mt:var name="website_scheme">://<span class="subdomain"><input type="text" name="archive_url_subdomain" id="archive_url_subdomain" value="<mt:var name="archive_url_subdomain" encode_html="1">" class="blog-subdomain-text path" />.</span><span class="website-url"><mt:var name="website_domain" encode_html="1"></span></span><span class="extra-path"><input type="text" name="archive_url_path" id="archive_url_path" value="<mt:var name="archive_url_path" encode_html="1">" class="blog-url-text path" /></span>
        </div>
        <div class="use-subdomain option">
          <input type="checkbox" name="use_archive_subdomain" id="use_archive_subdomain" value="1" checked="checked" class="cb" /> <label for="use_archive_subdomain"><__trans phrase="Use subdomain"></label>
        </div>
      <mt:elseif name="archive_url_path">
        <div class="archive-url content-path">
          <span class="archive-url-domain"><mt:var name="website_scheme">://<span class="subdomain"><input type="text" name="archive_url_subdomain" id="archive_url_subdomain" value="<mt:var name="archive_url_subdomain" encode_html="1">" class="blog-subdomain-text path" />.</span><span class="website-url"><mt:var name="website_domain" encode_html="1"></span></span><span class="extra-path"><input type="text" name="archive_url_path" id="archive_url_path" value="<mt:var name="archive_url_path" encode_html="1">" class="blog-url-text path" /></span>
        </div>
        <div class="use-subdomain option">
          <input type="checkbox" name="use_archive_subdomain" id="use_archive_subdomain" value="1" class="cb" /> <label for="use_archive_subdomain"><__trans phrase="Use subdomain"></label>
        </div>
      <mt:elseif name="archive_url" eq="">
        <div class="archive-url content-path">
          <span class="archive-url-domain"><mt:var name="website_scheme">://<span class="subdomain"><input type="text" name="archive_url_subdomain" id="archive_url_subdomain" value="<mt:var name="archive_url_subdomain" encode_html="1">" class="blog-subdomain-text path" />.</span><span class="website-url"><mt:var name="website_domain" encode_html="1"></span></span><span class="extra-path"><input type="text" name="archive_url_path" id="archive_url_path" value="<mt:var name="archive_url_path encode_html="1"">" class="<mt:unless name="enable_archive_paths">show-input </mt:unless>blog-url-text path" /></span>
        </div>
        <div class="use-subdomain option">
          <input type="checkbox" name="use_archive_subdomain" id="use_archive_subdomain" value="1" class="cb" /> <label for="use_archive_subdomain"><__trans phrase="Use subdomain"></label>
        </div>
      <mt:else>
        <div class="archive-url content-path">
          <span class="archive-url-domain"><mt:var name="website_scheme">://<span class="subdomain"><input type="text" name="archive_url_subdomain" id="archive_url_subdomain" value="<mt:var name="archive_url_subdomain" encode_html="1">" class="blog-subdomain-text path" />.</span><span class="website-url"><mt:var name="website_domain" encode_html="1"></span></span><span class="extra-path"><input type="text" name="archive_url_path" id="archive_url_path" value="<mt:var name="archive_url_path" encode_html="1">" class="blog-url-text path" /></span>
        </div>
        <div class="use-subdomain option">
          <input type="checkbox" name="use_archive_subdomain" id="use_archive_subdomain" value="1" class="cb" /> <label for="use_archive_subdomain"><__trans phrase="Use subdomain"></label>
        </div>
      </mt:if>
        <p class="alert-warning-inline icon-left icon-warning" id="archive_url-warning" style="display: none"><__trans phrase="Warning: Changing the archive URL can result in breaking all the links in your blog."></p>
      </mtapp:setting>

      <mtapp:setting
         id="archive_path"
         class="site-path-field"
         required="1"
         label="<__trans phrase="Archive Root">"
         show_hint="1"
         help_page="blog_settings_publishing"
         help_section="archive_path">
        <div class="relative-site_path content-path">
          <span class="website-path"><mt:var name="website_path" encode_html="1"></span><span class="extra-path"><input type="text" name="archive_path" id="archive_path" value="<mt:unless name="archive_path_absolute"><mt:var name="archive_path" escape="html"></mt:unless>" class="blog-path-text blog-path-text path<mt:unless name="enable_archive_paths"> show-input</mt:unless> required" /></span>
        </div>
        <div class="absolute-site_path content-path">
          <input type="text" name="archive_path_absolute" id="archive_path_absolute" value="<mt:if name="archive_path_absolute"><mt:var name="archive_path" escape="html"><mt:else><mt:var name="website_path" escape="html"></mt:if>" class="blog-path-text<mt:unless name="enable_archive_paths"> show-input</mt:unless>" />
        </div>
        <div class="use-absolute option">
          <input type="checkbox" name="use_absolute_archive" id="use_absolute_archive" value="1"<mt:if name="archive_path_absolute"> checked="checked"</mt:if> class="cb" /> <label for="use_absolute_archive"><__trans phrase="Use absolute path"></label>
        </div>
        <p class="alert-warning-inline icon-left icon-warning" id="archive_path-warning" style="display: none"><__trans phrase="Warning: Changing the archive path can result in breaking all the links in your blog."></p>
        <div class="hint relative-site_path-hint">
          <__trans phrase="The path where your archives section index files will be published. Do not end with '/' or '\'.  Example: /home/mt/public_html/blog or C:\www\public_html\blog">
        </div>
        <div class="hint absolute-site_path-hint">
          <__trans phrase="The path where your archives section index files will be published. An absolute path (starting with '/' for Linux or 'C:\' for Windows) is preferred. Do not end with '/' or '\'. Example: /home/mt/public_html or C:\www\public_html">
        </div>
      </mtapp:setting>
    </div>
  </mt:if>
  </mtapp:settinggroup>
</mt:if>

<mt:unless name="hide_build_option">
  <mt:if name="dynamic_enabled">
  <h2><__trans phrase="Dynamic Publishing Options"></h2>
  <mtapp:settinggroup id="dynamic-option-settings">
    <mtapp:setting
       id="dynamic_publishing_options"
       label="<__trans phrase="Dynamic Publishing Options">"
       show_label="0">
      <ul>
        <li>
          <input type="checkbox" id="dynamic_cache" name="dynamic_cache" <mt:if name="dynamic_caching">checked="checked"</mt:if>/>
          <label for="dynamic_cache"><__trans phrase="Enable dynamic cache"></label>
        </li>
        <li>
          <input type="checkbox" id="dynamic_conditional" name="dynamic_conditional" <mt:if name="dynamic_conditional">checked="checked"</mt:if>/>
          <label for="dynamic_conditional"><__trans phrase="Enable conditional retrieval"></label>
        </li>
      </ul>
    </mtapp:setting>
  </mtapp:settinggroup>
  </mt:if>
</mt:unless>

  <h2><__trans phrase="Archive Settings"></h2>
  <mtapp:settinggroup id="archive-option-settings">
    
    <mtapp:setting
       id="file_extension"
       label="<__trans phrase="File Extension">"
       hint="<__trans phrase="Enter the archive file extension. This can take the form of 'html', 'shtml', 'php', etc. Note: Do not enter the leading period ('.').">"
       help_page="blog_setting_publishing"
       help_section="archive_file_extension">
      <input type="text" name="file_extension" id="file_extension" class="text min" value="<mt:var name="file_extension" escape="html">" />
    </mtapp:setting>

  <mt:if name="is_blog">
    <mtapp:setting
       id="preferred_archive_type"
       label="<__trans phrase="Preferred Archive">"
       hint="<__trans phrase="Used to generate URLs (permalinks) for this blog's archived entries. Choose one of the archive type used in this blog's archive templates.">"
       show_hint="1"
       help_page="blog_settings_publishing"
       help_section="preferred_archive_type">
    <mt:loop name="entry_archive_types">
      <mt:if name="__first__">
      <select name="preferred_archive_type" id="preferred_archive_type">
      </mt:if>
        <option value="<mt:var name="archive_type" escape="html">"<mt:if name="archive_type_is_preferred"> selected="selected"</mt:if>><mt:var name="archive_type_translated" escape="html"></option>
      <mt:if name="__last__">
      </select>
      </mt:if>
    </mt:loop>
    <mt:unless name="entry_archive_types">
      <p><span class="alert-warning-inline"><__trans phrase="No archives are active"></span></p>
    </mt:unless>
    </mtapp:setting>
  </mt:if>
  </mtapp:settinggroup>

  <h2><__trans phrase="Module Settings"></h2>
  <mtapp:settinggroup id="module-option-settings">

    <mtapp:setting
       id="include_system"
       label="<__trans phrase="Server Side Includes">"
       help_page="blog_settings_publishing"
       help_section="ssi">
      <select id="include_system" name="include_system">
        <option value=""<mt:unless name="include_system"> selected="selected"</mt:unless>><__trans phrase="None (disabled)"></option>
        <option value="php"<mt:if name="include_system" eq="php"> selected="selected"</mt:if>><__trans phrase="PHP Includes"></option>
        <option value="shtml"<mt:if name="include_system" eq="shtml"> selected="selected"</mt:if>><__trans phrase="Apache Server-Side Includes"></option>
        <option value="asp"<mt:if name="include_system" eq="asp"> selected="selected"</mt:if>><__trans phrase="Active Server Page Includes"></option>
        <option value="jsp"<mt:if name="include_system" eq="jsp"> selected="selected"</mt:if>><__trans phrase="Java Server Page Includes"></option>
      </select>
    </mtapp:setting>

    <mtapp:setting
       id="include_cache"
       label="<__trans phrase="Module Caching">"
       help_page="blog_settings_publishing"
       help_section="include_cache">
      <input id="include_cache" type="checkbox" name="include_cache" value="1"<mt:if name="include_cache"> checked="checked"</mt:if> /> <label for="include_cache"><__trans phrase="Allow properly configured template modules to be cached to enhance publishing performance."></label>
    </mtapp:setting>
  </mtapp:settinggroup>

  <mtapp:settinggroup id="revision-history-settings">
    <h2><__trans phrase="Revision History"></h2>
  <mt:unless name="master_revision_switch">
    <mtapp:statusmsg
       id="master_revision_off"
       class="error"
       can_close="0">
      <__trans phrase="Note: Revision History is currently disabled at the system level.">
    </mtapp:statusmsg>
  </mt:unless>

    <mtapp:setting
       id="use-revision"
       class="has-option"
       label="<__trans phrase="Revision history">">
      <label for="use-revision"><input type="checkbox" value="1" name="use_revision" id="use-revision"<mt:if name="use_revision"> checked="checked"</mt:if><mt:unless name="master_revision_switch"> disabled="disabled"</mt:unless> /> <__trans phrase="Enable revision history"></label>
    </mtapp:setting>
    
    <div id="use-revision-option" class="setting-option">
      <mt:setvarblock name="revisions_entry_label"><mt:if name="is_blog"><__trans phrase="Number of revisions per entry/page"><mt:else><__trans phrase="Number of revisions per page"></mt:if></mt:setvarblock>
      <mtapp:setting
         id="max_revisions_entry"
         label="<mt:var name="revisions_entry_label">">
        <input type="text" name="max_revisions_entry" id="max_revisions_entry" class="text num" value="<mt:var name="max_revisions_entry" escape="html">" />
      </mtapp:setting>
  
      <mtapp:setting
         id="max_revisions_template"
         label="<__trans phrase="Number of revisions per template">">
        <input type="text" name="max_revisions_template" id="max_revisions_template" class="text num" value="<mt:var name="max_revisions_template" escape="html">" />
      </mtapp:setting>
    </div>
  </mtapp:settinggroup>

  <mt:setvarblock name="action_buttons">
    <button
       type="submit"
       accesskey="s"
       title="<__trans phrase="Save changes to these settings (s)">"
       class="save action primary button">
      <__trans phrase="Save Changes">
    </button>
  </mt:setvarblock>
  <mt:include name="include/actions_bar.tmpl" bar_position="bottom" hide_pager="1" settings_bar="1">
</mtapp:form>

<mt:setvarblock name="jq_js_include" append="1">
    jQuery('input#enable_archive_paths').click(function() {
        jQuery('div#enable_archive_paths_prefs').toggleClass('hidden');
    });

    function is_valid_url(url_){
        if (url_.indexOf(' ') != -1) {
            return false;
        }
        return url_.match( /^https?:\/\/[A-Za-z0-9!$%()=_.:,;@~-]+/ ) ? true : false;
    }
    function is_valid_path(path_){
        var str = path_.replace(/[ "%<>\[\\\]\^`{\|}~]/g, ""); //"
        str = encodeURI(str);
        if (str.indexOf('%') != -1) {
            return false;
        }
        if (str.match(/\.\./)) {
            return false;
        }
        <mt:if name="is_blog">
        if ( path_.match(/^\//) || path_.match(/^[a-zA-Z]:\\/)  || path_.match(/^\\\\[a-zA-Z0-9\.]+/ ) ) {
            return false;
        }
        </mt:if>
        return true;
    }
    function is_valid_absolute_path(path_) {
        if ( path_.match(/^\//) || path_.match(/^[a-zA-Z]:\\/)  || path_.match(/^\\\\[a-zA-Z0-9\.]+/ ) ) {
            return true;
        }
        return false;
    }

    jQuery.mtValidateAddRules({
<mt:if name="is_blog">
        "#site_url_path": function($e) {
            var base = '<mt:var name="website_scheme">://<mt:var name="website_domain" encode_html="1">';
            var chk = jQuery($e).parents().find('.url-field:first').find(':checkbox:checked');
            var subdomain = jQuery($e).parents().find('.url-field:first').find('.blog-subdomain-text');
            if ( chk.length && subdomain.val().length) {
                base = '<mt:var name="website_scheme">://'+subdomain.val()+'.<mt:var name="website_domain" encode_html="1">';
            }
            return is_valid_url(base + $e.val());
        },
        "#site_path_absolute": function($e) {
            return is_valid_absolute_path($e.val());
        },
</mt:if>
        "#archive_url_path": function($e) {
            var base = '<mt:var name="website_scheme">://<mt:var name="website_domain" encode_html="1">';
            var chk = jQuery($e).parents().find('.url-field:first').find(':checkbox:checked');
            var subdomain = jQuery($e).parents().find('.url-field:first').find('.blog-subdomain-text');
            if ( chk.length && subdomain.val().length) {
                base = '<mt:var name="website_scheme">://'+subdomain.val()+'.<mt:var name="website_domain" encode_html="1">';
            }
            return is_valid_url(base + $e.val());
        },
        "#site_url": function($e) {
            return is_valid_url('<mt:var name="website_url" escape="js">' + $e.val());
        },
        "#site_path": function($e) {
            return is_valid_path($e.val());
        },
        "#archive_path": function ($e) {
            if ( jQuery('#enable_archive_paths:checked').length && !jQuery('#use_absolute_archive:checked').length ) {
                if ( !$e.val().length ) return false;
                if ( !is_valid_path($e.val()) ) return false;
            }
            return true;
        },
        "#archive_path_absolute": function ($e) {
            if ( jQuery('#enable_archive_paths:checked').length && jQuery('#use_absolute_archive:checked').length ) {
                if ( !is_valid_absolute_path($e.val()) ) return false;
            }
            return true;
        }
    });

    jQuery.mtValidateAddMessages({
        "#name.required": '<__trans phrase="You must set your Blog Name." escape="singlequotes">',
        "#server_offset.required": '<__trans phrase="You did not select a time zone." escape="singlequotes">',
        "#site_url": '<__trans phrase="You must set a valid URL." escape="singlequotes">',
        "#site_url_path": '<__trans phrase="You must set a valid URL." escape="singlequotes">',
        "#site_path.required": '<__trans phrase="You must set your Local file Path." escape="singlequotes">',
        "#site_path.path": '<__trans phrase="You must set a valid Local file Path." escape="singlequotes">',
        "#site_path_absolute.required": '<__trans phrase="You must set your Local file Path." escape="singlequotes">',
        "#site_path_absolute": '<__trans phrase="You must set a valid Local file Path." escape="singlequotes">',
        "#archive_url_path.required": '<__trans phrase="You must set a valid Archive URL." escape="singlequotes">',
        "#archive_url_path": '<__trans phrase="You must set a valid Archive URL." escape="singlequotes">',
        "#archive_path.required": '<__trans phrase="You must set your Local Archive Path." escape="singlequotes">',
        "#archive_path": '<__trans phrase="You must set a valid Local Archive Path." escape="singlequotes">',
        "#archive_path_absolute.required": '<__trans phrase="You must set your Local Archive Path." escape="singlequotes">',
        "#archive_path_absolute": '<__trans phrase="You must set a valid Local Archive Path." escape="singlequotes">'
    });

    jQuery('#cfg_form').submit( function () {
        if ( !jQuery(this).find('input:visible, select:visible').mtValidate('simple') ) return false;
    });

    jQuery.mtEditSiteUrl({
        edit: '<__trans phrase="Edit">'
    });

<mt:if name="is_blog">
    jQuery.mtUseSubdomain();
    jQuery.mtEditSitePath({
        edit: '<__trans phrase="Edit">'
    });
    jQuery.mtUseAbsolute();
</mt:if>
</mt:setvarblock>
<mt:include name="include/footer.tmpl">
