{include file="$admintemplatepath/header.template"}
{include file="$admintemplatepath/navigation.template" showOpt=related title=$locale->tr("related_plugin")}
<form name="relatedPluginSettings" method="post">
 <fieldset class="inputField">
 <legend>{$locale->tr("label_configuration")}</legend>  
  {include file="$admintemplatepath/successmessage.template"}
  {include file="$admintemplatepath/errormessage.template"}   
  <div class="field">
   <label for="pluginEnabled">{$locale->tr("label_enable")}</label>
   <div class="formHelp">   
    <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled} checked="checked" {/if} value="1" />{$locale->tr("related_plugin_enabled")}
   </div>
  </div>
  
   <div class="field">
   <label for="width">{$locale->tr("related_max_articles")}</label>
   <span class="required">*</span>
   <div class="formHelp">{$locale->tr("related_articles")}</div>
   <input class="text" type="text" name="numArticles" id="numArticles"
          {user_cannot_override
              key=plugin_related_num_articles}readonly="readonly"
          {/user_cannot_override}
          value="{$numArticles}" width="10" /> 
  </div>

  <div class="field">
   <label for="width">{$locale->tr("related_min_word_length")}</label>
   <span class="required">*</span>
   <div class="formHelp">{$locale->tr("related_word_length")}</div>
   <input class="text" type="text" name="minWordLength" id="minWordLength"
           {user_cannot_override
               key=plugin_related_min_word_length}readonly="readonly"
           {/user_cannot_override}
          value="{$minWordLength}" width="10" /> 
  </div>

  <div class="field">
   <label for="size">{$locale->tr("related_cache_lifetime")}</label>
   <span class="required">*</span>
   <div class="formHelp">{$locale->tr("related_cache")}</div>
   <span class="required"></span>
   <select name="interval" id="interval" {user_cannot_override key=plugin_related_refresh_interval}disabled="disabled"{/user_cannot_override}>
    <option value="-1" {if $interval==-1}selected="selected"{/if}>never refresh</option>
    <option value="0" {if $interval==0}selected="selected"{/if}>don't cache</option>
    <option value="1" {if $interval==1}selected="selected"{/if}>1 hour</option>
    <option value="24" {if $interval==24}selected="selected"{/if}>1 day</option>
    <option value="168" {if $interval==168}selected="selected"{/if}>1 week</option>
    <option value="720" {if $interval==720}selected="selected"{/if}>1 month</option>
   </select>
 </div>

  
 <div class="field">
   <label for="width">{$locale->tr("related_parse_body")}</label>
   <div class="formHelp">
    <input class="checkbox" type="checkbox" name="parseBody"
    	   id="parseBody" {if $parseBody} checked="checked" {/if}
    	   {user_cannot_override
             key=plugin_related_extract_keywords_from_body}disabled="disabled"
           {/user_cannot_override} 
    	   value="1" />
    	   {$locale->tr("parse_body")}
  </div>
  </div>
  
  <div class="field">
   <label for="width">{$locale->tr("banned_keywords")}</label>
   <span class="required">*</span>
   <div class="formHelp">{$locale->tr("related_banned_keywords")}</div>
   <input class="text" type="text" name="bannedKeywords"
           {user_cannot_override
               key=plugin_related_banned_keywords}readonly="readonly"
           {/user_cannot_override}
          id="bannedKeywords" value="{$bannedKeywords}" width="10" /> 
  </div>

  
 
 </fieldset>  

 <div class="buttons">
  <input type="hidden" name="op" value="updateRelatedConfig" />
  <input type="reset" name="{$locale->tr("reset")}" />    
  <input type="submit" name="{$locale->tr("update_settings")}" value="{$locale->tr("update")}" />
 </div>
</form>
{include file="$admintemplatepath/footernavigation.template"}
{include file="$admintemplatepath/footer.template"}