<mt:setvar name="page_title" value="<__trans phrase="Feedback Settings">">
<mt:setvar name="position_actions_bottom" value="1">

<mt:setvar name="spam" value="1">
<mt:setvar name="comments" value="1">
<mt:setvar name="trackbacks" value="1">

<mt:setvarblock name="system_msg">
<mt:if name="error">
  <mtapp:statusmsg
     id="generic-error"
     class="error"
     can_close="0">
    <mt:var name="error">
  </mtapp:statusmsg>
</mt:if>
<mt:if name="saved">
  <mt:if name="can_rebuild">
    <mt:if name="need_full_rebuild">
  <mtapp:statusmsg
     id="saved-full-rebuild"
     class="success"
     rebuild="all"
     can_close="0">
    <__trans phrase="Your preferences have been saved.">
  </mtapp:statusmsg>
    <mt:else>
  <mtapp:statusmsg
     id="saved"
     class="success"
     can_close="1">
    <__trans phrase="Your preferences have been saved.">
  </mtapp:statusmsg>
    </mt:if>
  <mt:else>
  <mtapp:statusmsg
     id="saved"
     class="success"
     can_close="1">
    <__trans phrase="Your preferences have been saved.">
  </mtapp:statusmsg>
  </mt:if>
</mt:if>
</mt:setvarblock>

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

<form name="cfg_form" method="post" action="<mt:var name="script_url">">
  <input type="hidden" name="id" value="<mt:var name="id" escape="html">" />
  <input type="hidden" name="__mode" value="save" />
  <input type="hidden" name="_type" value="blog" />
  <input type="hidden" name="cfg_screen" value="cfg_feedback" />
  <input type="hidden" name="blog_id" value="<mt:var name="blog_id" escape="html">" />
  <input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" />
  <input type="hidden" name="magic_token" value="<mt:var name="magic_token" escape="html">" />

  <h2><__trans phrase="Spam Settings"></h2>
  <mtapp:settinggroup id="cfg-spam">
    <script type="text/javascript">
    /* <![CDATA[ */
    function scoreNudge(amount) {
        var fld = getByID('junk_score_threshold');
        score = fld.value;
        score.replace(/\+/, '');
        score = parseFloat(score) + amount;
        if (isNaN(score)) score = amount;
        if (score > 10) score = 10;
        if (score < -10) score = -10;
        if (score > 0) score = '+' + score;
        fld.value = score;
        return false;
    }
    /* ]]> */
    </script>

    <mtapp:setting
       id="auto_delete_junk"
       label="<__trans phrase="Automatic Deletion">"
       help_page="blog_settings_feedback"
       help_section="autodelete_junk">
      <input id="auto_delete_junk" name="auto_delete_junk" type="checkbox" value="1"<mt:if name="auto_delete_junk"> checked="checked"</mt:if> /> <label for="auto_delete_junk"><__trans phrase="Automatically delete spam feedback after the time period shown below."></label>
    </mtapp:setting>

    <div id="auto_delete_junk_prefs"<mt:unless name="auto_delete_junk">class=" hidden"</mt:unless>>
      <mtapp:setting
         id="junk_folder_expiry"
         label="<__trans phrase="Delete Spam After">"
         hint="<__trans phrase="When an item has been reported as spam for this many days, it is automatically deleted.">"
         help_page="blog_settings_feedback"
         help_section="delete_junk_after">
        <input type="text" name="junk_folder_expiry" id="junk_folder_expiry" class="text days" value="<mt:var name="junk_folder_expiry" escape="html">" /> <__trans phrase="days">
      </mtapp:setting>
    </div>

    <mtapp:setting
       id="junk_score_threshold"
       label="<__trans phrase="Spam Score Threshold">"
       hint="<__trans phrase="Comments and TrackBacks receive a spam score between -10 (complete spam) and +10 (not spam). Feedback with a score which is lower than the threshold shown above will be reported as spam.">"
       help_page="blog_settings_feedback"
       help_section="junk_score_threshold">
      <a href="javascript:void(0)" id="decrease-threshold" onclick="return scoreNudge(-1)"><__trans phrase="Less Aggressive"> <img alt="<__trans phrase="Decrease">" src="<mt:var name="static_uri">images/decrease.gif" /></a>
      <input type="text" name="junk_score_threshold" id="junk_score_threshold" class="text num" value="<mt:var name="junk_score_threshold" escape="html">" />
      <a href="javascript:void(0)" id="increase-threshold" onclick="return scoreNudge(1)"><img alt="<__trans phrase="Increase">" src="<mt:var name="static_uri">images/increase.gif" /> <__trans phrase="More Aggressive"></a>
    </mtapp:setting>

    <mtapp:setting
       id="nofollow_urls"
       class="has-option"
       label="<__trans phrase="Apply 'nofollow' to URLs">"
       help_page="blog_settings_feedback"
       help_section="nofollow_urls">
      <input type="checkbox" value="1" name="nofollow_urls" id="nofollow_urls"<mt:if name="nofollow_urls"> checked="checked"</mt:if> class="cb" onclick="toggleSubPrefs(this)" /> <label for="nofollow_urls"><__trans phrase="If enabled, all URLs in comments and TrackBacks will be assigned a 'nofollow' link relation."></label>
    </mtapp:setting>

    <div id="nofollow_urls-option">
      <mtapp:setting
         id="follow_auth_links"
         label="<__trans phrase="'nofollow' exception for trusted commenters">"
         help_page="blog_settings_feedback"
         help_section="follow_auth_links">
        <input type="checkbox" value="1" name="follow_auth_links" id="follow_auth_links"<mt:if name="follow_auth_links"> checked="checked"</mt:if> class="cb" /> <label for="follow_auth_links"><__trans phrase="Do not add the 'nofollow' attribute when a comment is submitted by a trusted commenter."></label>
      </mtapp:setting>
    </div>
  </mtapp:settinggroup>

  <h2><__trans phrase="Comment Settings"></h2>
  <mtapp:settinggroup id="cfg-comment">

  <mt:if name="allow_comments">
    <mt:unless name="system_allow_comments">
    <mtapp:statusmsg
       id="system-allow-comments"
       class="info"
       can_close="0">
      <__trans phrase="Note: Commenting is currently disabled at the system level.">
    </mtapp:statusmsg>
    </mt:unless>
  </mt:if>

  <mt:unless name="tk_available">
    <p><__trans phrase="Comment authentication is not available because at least one of the required Perl modules, MIME::Base64 and LWP::UserAgent, are not installed. Install the missing modules and reload this page to configure comment authentication."></p>
  </mt:unless>

    <mtapp:setting
       id="allow_comments"
       class="has-option"
       label="<__trans phrase="Accept Comments">"
       help_page="blog_settings_feedback"
       help_section="accept_comments_from">
      <input type="checkbox" name="allow_comments" id="allow_comments"<mt:if name="allow_comments"> checked="checked"</mt:if> value="1" /> <label for="allow_comments"><__trans phrase="Accept comments according to the policies shown below."></label>
      <p><a href="<mt:var name="script_url">?__mode=cfg_registration&amp;blog_id=<mt:var name="blog_id" escape="url">"><__trans phrase="Setup Registration"></a></p>
    </mtapp:setting>

    <div id="allow_comments-option">
      <h3><__trans phrase="Commenting Policy"></h3>
      <mtapp:settinggroup id="comment-policy-setting">
        <mtapp:setting
           id="moderate_comments"
           label="<__trans phrase="Immediately approve comments from">"
           hint="<__trans phrase="Specify what should happen to comments after submission. Unapproved comments are held for moderation.">"
           help_page="blog_settings_feedback"
           help_section="immediately_publish_comments_from">
          <ul>
            <li><label><input type="radio" name="moderate_comments" value="1"<mt:if name="moderate_comments_1"> checked="checked"</mt:if> class="rb" /> <__trans phrase="No one"></label></li>
            <li><label><input type="radio" name="moderate_comments" value="2"<mt:if name="moderate_comments_2"> checked="checked"</mt:if> class="rb" /> <__trans phrase="Trusted commenters only"></label></li>
            <li><label><input type="radio" name="moderate_comments" value="3"<mt:if name="moderate_comments_3"> checked="checked"</mt:if> class="rb" /> <__trans phrase="Any authenticated commenters"></label></li>
            <li><label><input type="radio" name="moderate_comments" value="0"<mt:if name="moderate_comments_0"> checked="checked"</mt:if> class="rb" /> <__trans phrase="Anyone"></label></li>
          </ul>
        </mtapp:setting>

        <mtapp:setting
           id="allow_comment_html"
           class="has-option"
           label="<__trans phrase="Allow HTML">"
           help_page="blog_settings_feedback"
           help_section="allow_html">
          <input type="checkbox" name="allow_comment_html" id="allow_comment_html" onclick="toggleSubPrefs(this);" value="1"<mt:if name="allow_comment_html"> checked="checked"</mt:if> class="cb" /> <label for="allow_comment_html"><__trans phrase="Allow commenters to include a limited set of HTML tags in their comments. Otherwise all HTML will be stripped out."></label>
        </mtapp:setting>

        <div id="allow_comment_html-option">
          <mtapp:setting
             id="sanitize_spec"
             label="<__trans phrase="Limit HTML Tags">"
             hint="<__trans phrase="Specify the list of HTML tags to allow when accepting a comment.">"
             help_page="blog_settings_general"
             help_section="limit_html_tags">
            <ul>
              <li><label><input type="radio" name="sanitize_spec" id="sanitize_spec_0" value="0"<mt:if name="sanitize_spec_0"> checked="checked"</mt:if> class="rb" /> <__trans phrase="Use defaults">:</label> <span class="hint"><__trans phrase="([_1])" params="<mt:var name="global_sanitize_spec" escape="html">"></span></li>
              <li><label><input type="radio" name="sanitize_spec" id="sanitize_spec_1" value="1"<mt:if name="sanitize_spec_1"> checked="checked"</mt:if> class="rb" /> <__trans phrase="Use my settings">:</label> <input type="text" name="sanitize_spec_manual" id="sanitize_spec_manual" class="text med" value="<mt:if name="sanitize_spec_1"><mt:var name="sanitize_spec" escape="html"></mt:if>" /></li>
            </ul>
          </mtapp:setting>
        </div>
        
        <mtapp:setting
           id="email_new_comments"
           label="<__trans phrase="E-mail Notification">"
           hint="<__trans phrase="Specify when Movable Type should notify you of new comments.">"
           help_page="blog_settings_feedback"
           help_section="email_notification">
          <ul>
            <li><label><input type="radio" name="email_new_comments" value="1"<mt:if name="email_new_comments_1"> checked="checked"</mt:if> class="rb" /> <__trans phrase="On"></label></li>
            <li><label><input type="radio" name="email_new_comments" value="2"<mt:if name="email_new_comments_2"> checked="checked"</mt:if> class="rb"  /> <__trans phrase="Only when attention is required"></label></li>
            <li><label><input type="radio" name="email_new_comments" value="0"<mt:unless name="email_new_comments"> checked="checked"</mt:unless> class="rb" /> <__trans phrase="Off"></label></li>
          </ul>
        </mtapp:setting>
      </mtapp:settinggroup>

      <h3><__trans phrase="Comment Display Settings"></h3>
      <mtapp:settinggroup id="comment-display-setting">    
        <mtapp:setting
           id="sort_order_comments"
           label="<__trans phrase="Comment Order">"
           hint="<__trans phrase="Select whether you want comments displayed in ascending (oldest at top) or descending (newest at top) order.">"
           help_page="blog_settings_general"
           help_section="comment_order">
          <select name="sort_order_comments" id="sort_order_comments">
            <option value="ascend"<mt:if name="sort_order_comments_ascend"> selected="selected"</mt:if>><__trans phrase="Ascending"></option>
            <option value="descend"<mt:if name="sort_order_comments_descend"> selected="selected"</mt:if>><__trans phrase="Descending"></option>
          </select>
        </mtapp:setting>

        <mtapp:setting
           id="autolink_urls"
           label="<__trans phrase="Auto-Link URLs">"
           help_page="blog_settings_feedback"
           help_section="autolink_urls">
          <input type="checkbox" value="1" name="autolink_urls" id="autolink_urls"<mt:if name="autolink_urls"> checked="checked"</mt:if> class="cb" /> <label for="autolink_urls"><__trans phrase="Transform URLs in comment text into HTML links."></label>
        </mtapp:setting>

        <mtapp:setting
           id="convert_paras_comments"
           label="<__trans phrase="Text Formatting">"
           hint="<__trans phrase="Specifies the Text Formatting option to use for formatting visitor comments.">"
           help_page="blog_settings_feedback"
           help_section="comment_text_formatting">
          <select name="convert_paras_comments" id="convert_paras_comments">
          <mt:loop name="text_filters_comments">
            <option value="<mt:var name="key" escape="html">"<mt:if name="selected"> selected="selected"</mt:if>><mt:var name="label" escape="html"></option>
          </mt:loop>
          </select>
        </mtapp:setting>

        <mtapp:setting
           id="captcha_provider"
           label="<__trans phrase="CAPTCHA Provider">">
        <mt:if name="captcha_loop">
          <select name="captcha_provider" id="captcha_provider">
            <option value="none"><__trans phrase="none"></option>
          <mt:loop name="captcha_loop">
            <option value="<mt:var name="key" escape="html">"<mt:if name="selected"> selected="selected"</mt:if>><mt:var name="label" escape="html"></option>
          </mt:loop>
          </select>
          <mt:else>
            <p>
              <img src="<mt:var name="static_uri">images/status_icons/warning.gif" alt="<__trans phrase="No CAPTCHA provider available">" width="9" height="9" />
              <span class="alert-warning-inline"><__trans phrase="No CAPTCHA provider is available in this system.  Please check to see if Image::Magick is installed and if the CaptchaSourceImageBase configuration directive points to a valid captcha-source directory within the 'mt-static/images' directory."></span>
            </p>
        </mt:if>
        </mtapp:setting>

        <mtapp:setting
           id="use_comment_confirmation"
           label="<__trans phrase="Use Comment Confirmation Page">"
           hint="<__trans phrase="Use comment confirmation page">">
          <input type="checkbox" name="use_comment_confirmation" id="use_comment_confirmation"<mt:if name="use_comment_confirmation"> checked="checked"</mt:if> value="1" />
          <label for="use_comment_confirmation"><__trans phrase="Each commenter's browser will be redirected to a comment confirmation page after their comment is accepted."></label>
        </mtapp:setting>
      </mtapp:settinggroup>
    </div>
  </mtapp:settinggroup>


  <h2><__trans phrase="Trackback Settings"></h2>
  <mtapp:settinggroup id="cfg_trackback">

  <mt:unless name="system_allow_pings">
    <mtapp:statusmsg
       id="system-allow-pings"
       class="info"
       can_close="0">
      <__trans phrase="Note: TrackBacks are currently disabled at the system level.">
    </mtapp:statusmsg>
  </mt:unless>

    <mtapp:setting
       id="allow_pings"
       class="has-option"
       label="<__trans phrase="Accept TrackBacks">"
       help_page="blog_settings_feedback"
       help_section="accept_trackbacks">
      <input type="checkbox" name="allow_pings" id="allow_pings"<mt:if name="allow_pings"> checked="checked"</mt:if> value="1" /> <label for="allow_pings"><__trans phrase="Accept TrackBacks from any source."></label>
    </mtapp:setting>

    <div id="allow_pings-option">
      <h3><__trans phrase="TrackBack Policy"></h3>
      <mtapp:settinggroup id="trackback-policy-setting">
        <mtapp:setting
           id="moderate_pings"
           label="<__trans phrase="Moderation">"
           help_page="blog_settings_feedback"
           help_section="trackback_moderation">
          <input type="checkbox" name="moderate_pings" id="moderate_pings"<mt:if name="MODERATE_PINGS_1"> checked="checked"</mt:if> value="1" /> <label for="moderate_pings"><__trans phrase="Hold all TrackBacks for approval before they are published."></label>
        </mtapp:setting>

        <mtapp:setting
           id="email-new_pings"
           label="<__trans phrase="E-mail Notification">"
           hint="<__trans phrase="Specify when Movable Type should notify you of new TrackBacks.">"
           help_page="blog_settings_feedback"
           help_section="email_notification">
          <ul>
            <li><label><input type="radio" name="email_new_pings" value="1"<mt:if name="EMAIL_NEW_PINGS_1"> checked="checked"</mt:if> /> <__trans phrase="On"></label></li>
            <li><label><input type="radio" name="email_new_pings" value="2"<mt:if name="EMAIL_NEW_PINGS_2"> checked="checked"</mt:if> /> <__trans phrase="Only when attention is required"></label></li>
            <li><label><input type="radio" name="email_new_pings" value="0"<mt:unless name="email_new_pings"> checked="checked"</mt:unless> /> <__trans phrase="Off"></label></li>
          </ul>
        </mtapp:setting>
      </mtapp:settinggroup>          

      <mtapp:settinggroup id="trackback-option-setting">
        <legend><__trans phrase="TrackBack Options"></legend>
        <mtapp:setting
           id="autodiscover_links"
           label="<__trans phrase="TrackBack Auto-Discovery">"
           hint="<__trans phrase="When auto-discovery is turned on, any external HTML links in new entries will be extracted and the appropriate sites will automatically be sent a TrackBack ping.">"
           help_page="blog_settings_entry_defaults"
           help_section="trackback_autodiscovery">
          <ul>
            <li>
              <input type="checkbox" value="1" name="autodiscover_links" id="autodiscover_links"<mt:if name="autodiscover_links"> checked="checked"</mt:if> /> <label for="autodiscover_links"><__trans phrase="Enable External TrackBack Auto-Discovery"></label>
            <mt:if name="system_allow_selected_pings">
              <p><img src="<mt:var name="static_uri">images/status_icons/warning.gif" alt="<__trans phrase="Setting Notice">" width="9" height="9" /> <span class="alert-warning-inline"><__trans phrase="Note: This option may be affected since outbound pings are constrained system-wide."></span></p>
            <mt:else>
              <mt:unless name="system_allow_outbound_pings">
              <p><img src="<mt:var name="static_uri">images/status_icons/warning.gif" alt="<__trans phrase="Setting Ignored">" width="9" height="9" /> <span class="alert-warning-inline"><__trans phrase="Note: This option is currently ignored since outbound pings are disabled system-wide."></span></p>
              </mt:unless>
            </mt:if>
            </li>
            <li>
              <input type="checkbox" value="1" name="internal_autodiscovery" id="internal_autodiscovery"<mt:if name="internal_autodiscovery"> checked="checked"</mt:if> class="cb" /> <label for="internal_autodiscovery"><__trans phrase="Enable Internal TrackBack Auto-Discovery"></label>
            <mt:if name="system_allow_selected_pings">
              <p><img src="<mt:var name="static_uri">images/status_icons/warning.gif" alt="<__trans phrase="Setting Notice">" width="9" height="9" /> <span class="alert-warning-inline"><__trans phrase="Note: This option may be affected since outbound pings are constrained system-wide."></span></p>
            <mt:else>
              <mt:unless name="system_allow_local_pings">
              <p><img src="<mt:var name="static_uri">images/status_icons/warning.gif" alt="<__trans phrase="Setting Ignored">" width="9" height="9" /> <span class="alert-warning-inline"><__trans phrase="Note: This option is currently ignored since outbound pings are disabled system-wide."></span></p>
              </mt:unless>
            </mt:if>
            </li>
          </ul>
        </mtapp:setting>
      </mtapp:settinggroup>
    </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">
</form>

<script type="text/javascript">
/* <![CDATA[ */
jQuery(function() {
    jQuery('input#auto_delete_junk').click(function() {
        jQuery('div#auto_delete_junk_prefs').toggleClass('hidden');
    });
});
/* ]]> */
</script>

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