<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%Links::Config::load_vars%>
<html>

<head>
  <title>Gossamer Links Setup: Build Options</title>
  <%include include_style.html%>
</head>

<body>

<form method="post" action="setup.cgi">
<input type="hidden" name="do" value="setup_build" />

<%set header_title = 'Build Settings'%>
<%set header_details = 'These options control how Gossamer Links builds its <acronym>HTML</acronym> pages.'%>
<%include include_header.html%>

<table>
  <tr>
    <th colspan="2" class="heading">General Build Settings:</th>
  </tr>
  <tr>
    <td colspan="2">
      Default template set to use. This affects which template set is used
      when building <acronym>HTML</acronym> pages, or when calling the cgi
      scripts without arguments.  If you have different themes set up, then
      they will show up as "<i>&lt;template set&gt;.&lt;theme&gt;</i>".
    </td>
  </tr>
  <tr>
    <td class="option">build_default_tpl</td>
    <td class="value">
      <%Links::Tools::tpl_dir_select($cfg_build_default_tpl, '(?:browser|admin)', '', 1)%>
      <select name="build_default_tpl"><%loop template_set_loop%><option<%if dir_selected%> selected<%endif%>><%directory%></option><%endloop%></select>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Number of days old for a link to be considered new.
    </td>
  </tr>
  <tr>
    <td class="option">build_new_cutoff</td>
    <td class="value"><input type="text" name="build_new_cutoff" value="<%cfg_build_new_cutoff%>" size="5" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      This determines what links are placed in the What's Cool area. If &gt; 1,
      the top n links will be considered popular. If &lt; 1, the top n% links
      will be considered popular.
    </td>
  </tr>
  <tr>
    <td class="option">build_pop_cutoff</td>
    <td class="value"><input type="text" name="build_pop_cutoff" value="<%cfg_build_pop_cutoff%>" size="5" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Have Gossamer Links automatically create a backup of the data every time you
      build pages?
    </td>
  </tr>
  <tr>
    <td class="option">build_use_backup</td>
    <td class="value">
      <input type="radio" value="1" name="build_use_backup" id="bub1" <%if cfg_build_use_backup%>checked="checked" <%endif%>/><label for="bub1">Yes</label>
      <input type="radio" value="0" name="build_use_backup" id="bub0" <%ifnot cfg_build_use_backup%>checked="checked" <%endif%>/><label for="bub0">No</label>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Whether or not Gossamer Links should generate a category list when a
      category needs to be selected.  If 'No' is selected, the user will have
      to view the category they wish to add the link to before clicking on
      'Add a Link'.  If you choose to display the category list, then you have
      two choices: an AJAX category selector (recommended if you have a lot of
      categories), or a simple select list dropdown.  Note that users must have
      javascript enabled and have a browser that supports XMLHttpRequest before
      they can use the AJAX category browser.  If you choose to use the AJAX
      category selector, then it will also be used on the admin side.  For it
      to function correctly, your default template set must have the
      treecats.xml file.
    </td>
  </tr>
  <tr>
    <td class="option">db_gen_category_list</td>
    <td class="value">
      <input type="radio" value="2" name="db_gen_category_list" id="dgcl2" <%if cfg_db_gen_category_list == 2%>checked="checked" <%endif%>/><label for="dgcl2">Yes (AJAX)</label>
      <input type="radio" value="1" name="db_gen_category_list" id="dgcl1" <%if cfg_db_gen_category_list == 1%>checked="checked" <%endif%>/><label for="dgcl1">Yes (Basic)</label>
      <input type="radio" value="0" name="db_gen_category_list" id="dgcl0" <%ifnot cfg_db_gen_category_list%>checked="checked" <%endif%>/><label for="dgcl0">No</label>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      A list of fields that will be set when a user adds a record. It will
      override anything the user puts in.
    </td>
  </tr>
  <tr>
    <td class="option">add_system_fields</td>
    <td class="value">
      <textarea rows="8" name="add_system_fields" cols="39"><%Links::Config::textarea('add_system_fields')%></textarea>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      A comma separated list of template variables that are protected.  These
      variables will not accept input from CGI (ie. arguments passed in through
      the web) and will default to an empty string if they aren't directly
      passed in as variables to the templates.
    </td>
  </tr>
  <tr>
    <td class="option">protected_vars</td>
    <td class="value"><input type="text" name="protected_vars" value="<%cfg_protected_vars%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Validation policy. The default and recommend setting is that all links
      must be validated before being entered into the directory.  However, you
      can change this so user contributed links are auto-validated, or links
      contributed by anonymous users are auto-validated. Note: no
      validation email will be sent to the user for auto-validated links.
    </td>
  </tr>
  <tr>
    <td class="option">build_auto_validate</td>
    <td class="value">
        <input type="radio" name="build_auto_validate" id="bav0" value="0" <%if cfg_build_auto_validate == 0%>checked="checked" <%endif%>/>
        <label for="bav0">All links require admin/editor approval (recommended).</label><br />
        <input type="radio" name="build_auto_validate" id="bav1" value="1" <%if cfg_build_auto_validate == 1%>checked="checked" <%endif%>/>
        <label for="bav1">Links submitted by authenticated users are auto-validated.</label><br />
        <input type="radio" name="build_auto_validate" id="bav2" value="2" <%if cfg_build_auto_validate == 2%>checked="checked" <%endif%>/>
        <label for="bav2">All links are auto-validated (not recommended).</label>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Only allow additions from the following sites:
    </td>
  </tr>
  <tr>
    <td class="option">db_referers</td>
    <td class="value"><input type="text" name="db_referers" value="<%cfg_db_referers%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      A comma separated list of Links columns which, if updated, will update the
      Timestmp of the categories the link is in.  You should only need to add a
      column to this list if you use the column in link.html, the column data
      changes often, and are using "Build Changed".  For example, if you use
      &lt;%Hits%&gt; in link.html and don't add it to this list, then the
      category page won't be built on "Build Changed" when the Hits is updated.
    </td>
  </tr>
  <tr>
    <td class="option">links_cols_update_category</td>
    <td class="value"><input type="text" name="links_cols_update_category" value="<%cfg_links_cols_update_category%>" size="40" /></td>
  </tr>
  <tr>
    <th colspan="2" class="heading">Page Display and Sorting Options:</th>
  </tr>
  <tr>
    <td colspan="2" class="description">
      The default sort order to use for sorting links on the Category page.
    </td>
  </tr>
  <tr>
    <td class="option">build_sort_order_category</td>
    <td class="value"><input type="text" name="build_sort_order_category" value="<%cfg_build_sort_order_category%>" size="40" /></td>
  </tr>
<%if config.payment.enabled%>
  <tr>
    <td colspan="2" class="description">
      Whether or not to show paid links first, above free links, on the Category page.
    </td>
  </tr>
  <tr>
    <td class="option">build_sort_paid_first</td>
    <td class="value">
      <input type="radio" value="1" name="build_sort_paid_first" id="bsp1" <%if cfg_build_sort_paid_first%>checked="checked" <%endif%>/><label for="bspf1">Yes</label>
      <input type="radio" value="0" name="build_sort_paid_first" id="bsp0" <%ifnot cfg_build_sort_paid_first%>checked="checked" <%endif%>/><label for="bspf0">No</label>
    </td>
  </tr>
<%endif%>
  <tr>
    <td colspan="2" class="description">
      The default sort order to use for sorting links on the new page.
    </td>
  </tr>
  <tr>
    <td class="option">build_sort_order_new</td>
    <td class="value"><input type="text" name="build_sort_order_new" value="<%cfg_build_sort_order_new%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      The default sort order to use for sorting links on the cool page.
    </td>
  </tr>
  <tr>
    <td class="option">build_sort_order_cool</td>
    <td class="value"><input type="text" name="build_sort_order_cool" value="<%cfg_build_sort_order_cool%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      The default sort order to use for sorting links on the editor page.
    </td>
  </tr>
  <tr>
    <td class="option">build_sort_order_editor</td>
    <td class="value"><input type="text" name="build_sort_order_editor" value="<%cfg_build_sort_order_editor%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Page spanning: if enabled, Gossamer Links will break up large numbers of links
      in a category onto multiple pages.
    </td>
  </tr>
  <tr>
    <td class="option">build_span_pages</td>
    <td class="value">
      <input type="radio" value="1" name="build_span_pages" id="bsp1" <%if cfg_build_span_pages%>checked="checked" <%endif%>/><label for="bsp1">Yes</label>
      <input type="radio" value="0" name="build_span_pages" id="bsp0" <%ifnot cfg_build_span_pages%>checked="checked" <%endif%>/><label for="bsp0">No</label>
    </td>
  </tr>
  <tr>
    <td class="option">build_links_per_page</td>
    <td class="value"><input type="text" name="build_links_per_page" value="<%cfg_build_links_per_page%>" size="5" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Whether or not to split apart the what's new listings into separate pages based on date.
    </td>
  </tr>
  <tr>
    <td class="option">build_new_date_span_pages</td>
    <td class="value">
      <input type="radio" value="1" name="build_new_date_span_pages" id="bndsp1" <%if cfg_build_new_date_span_pages%>checked="checked" <%endif%>/><label for="bndsp1">Yes</label>
      <input type="radio" value="0" name="build_new_date_span_pages" id="bndsp0" <%ifnot cfg_build_new_date_span_pages%>checked="checked" <%endif%>/><label for="bndsp0">No</label>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      These options determines whether or not links will be grouped by category
      on the New and Cool pages.
    </td>
  </tr>
  <tr>
    <td class="option">build_new_gb</td>
    <td class="value">
      <input type="radio" value="1" name="build_new_gb" id="bng1" <%if cfg_build_new_gb%>checked="checked" <%endif%>/><label for="bng1">Yes</label>
      <input type="radio" value="0" name="build_new_gb" id="bng0" <%ifnot cfg_build_new_gb%>checked="checked" <%endif%>/><label for="bng0">No</label>
    </td>
  </tr>
  <tr>
    <td class="option">build_cool_gb</td>
    <td class="value">
      <input type="radio" value="1" name="build_cool_gb" id="bcg1" <%if cfg_build_cool_gb%>checked="checked" <%endif%>/><label for="bcg1">Yes</label>
      <input type="radio" value="0" name="build_cool_gb" id="bcg0" <%ifnot cfg_build_cool_gb%>checked="checked" <%endif%>/><label for="bcg0">No</label>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Column to use to sort the category listings.
    </td>
  </tr>
  <tr>
    <td class="option">build_category_sort</td>
    <td class="value"><input type="text" name="build_category_sort" value="<%cfg_build_category_sort%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Use Yahoo-style related categories: this will put the related categories
      grouped in with the main categories, prefixed with an @ sign. If you use
      this, you can only sort alphabetically.
    </td>
  </tr>
  <tr>
    <td class="option">build_category_yahoo</td>
    <td class="value">
      <input type="radio" value="1" name="build_category_yahoo" id="bcy1" <%if cfg_build_category_yahoo%>checked="checked" <%endif%>/><label for="bcy1">Yes</label>
      <input type="radio" value="0" name="build_category_yahoo" id="bcy0" <%ifnot cfg_build_category_yahoo%>checked="checked" <%endif%>/><label for="bcy0">No</label>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Number of columns your subcategory list will be divided into. Note that this option is deprecated - you should only need this if you are using version 2.x templates.
    </td>
  </tr>
  <tr>
    <td class="option">build_category_columns</td>
    <td class="value"><input type="text" name="build_category_columns" value="<%cfg_build_category_columns%>" size="5" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      <acronym>HTML</acronym> to use in table tag for subcategory listings. Note that this option is deprecated - you should only need this if you are using version 2.x templates.
    </td>
  </tr>
  <tr>
    <td class="option">build_category_table</td>
    <td class="value"><input type="text" name="build_category_table" value="<%cfg_build_category_table%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Enable/Disable the ability to display pages dynamically using the
      page.cgi script. If set to yes, you can specify a comma separated list of
      values that will be preserved as the user moves from page to page. Not
      usually necessary to change.
    </td>
  </tr>
  <tr>
    <td class="option">dynamic_pages</td>
    <td class="value">
      <input type="radio" value="1" name="dynamic_pages" id="dp1" <%if cfg_dynamic_pages%>checked="checked" <%endif%>/><label for="dp1">Yes</label>
      <input type="radio" value="0" name="dynamic_pages" id="dp0" <%ifnot cfg_dynamic_pages%>checked="checked" <%endif%>/><label for="dp0">No</label>
    </td>
  </tr>
  <tr>
    <td class="option">dynamic_preserve</td>
    <td class="value"><input type="text" name="dynamic_preserve" value="<%cfg_dynamic_preserve%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      A comma separated list of pages in which you wish to preserve sb, so,
      cat_sb, cat_so and Links column (for filtering) values.  These
      sort/filtering options only work on category and detailed pages, but if
      you have custom category/detailed pages, then you will want to add them
      to the list.  Regular expressions can be used.
    </td>
  </tr>
  <tr>
    <td class="option">dynamic_preserve_sort_pages</td>
    <td class="value"><input type="text" name="dynamic_preserve_sort_pages" value="<%cfg_dynamic_preserve_sort_pages%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Generate 404 Status codes for requests to page.cgi that do not match a valid
      category. This can be useful when you use rewrite rules to send all requests
      to page.cgi.
    </td>
  </tr>
  <tr>
    <td class="option">dynamic_404_status</td>
    <td class="value">
      <input type="radio" value="1" name="dynamic_404_status" id="ds1" <%if cfg_dynamic_404_status%>checked="checked" <%endif%>/><label for="ds1">Yes</label>
      <input type="radio" value="0" name="dynamic_404_status" id="ds0" <%ifnot cfg_dynamic_404_status%>checked="checked" <%endif%>/><label for="ds0">No</label>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Any URLs in the templates that begin with the build_root_url will get
      transformed into a dynamic URL for use with page.cgi.  If you have URLs
      that should not be transformed, then add them to this list.  You may use
      config tags such as &lt;%build_root_url%&gt; and
      &lt;build_static_url%&gt;.  Enter one URL per line.
    </td>
  </tr>
  <tr>
    <td class="option">dynamic_no_url_transform</td>
    <td class="value">
      <textarea rows="3" name="dynamic_no_url_transform" cols="39"><%Links::Config::textarea('dynamic_no_url_transform')%></textarea>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      If enabled, extra whitespace in generated <acronym>HTML</acronym> will be
      removed, reducing the size of generated <acronym>HTML</acronym> pages by
      up to 20%.
    </td>
  </tr>
  <tr>
    <td class="option">compress</td>
    <td class="value">
      <input type="radio" value="1" name="compress" id="c1" <%if cfg_compress%>checked="checked" <%endif%>/><label for="c1">Yes</label>
      <input type="radio" value="0" name="compress" id="c0" <%ifnot cfg_compress%>checked="checked" <%endif%>/><label for="c0">No</label>
    </td>
  </tr>
  <tr>
    <th colspan="2" class="heading">File and Directory Options:</th>
  </tr>
  <tr>
    <td colspan="2" class="description">
      If enabled, Gossamer Links will build a separate <acronym>HTML</acronym> page
      for each link.
    </td>
  </tr>
  <tr>
    <td class="option">build_detailed</td>
    <td class="value">
      <input type="radio" value="1" name="build_detailed" id="bd1" <%if cfg_build_detailed%>checked="checked" <%endif%>/><label for="bd1">Yes</label>
      <input type="radio" value="0" name="build_detailed" id="bd0" <%ifnot cfg_build_detailed%>checked="checked" <%endif%>/><label for="bd0">No</label>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Filename to use for the home page.  If this is left blank, then the build_index option will be used for the filename.
    </td>
  </tr>
  <tr>
    <td class="option">build_home</td>
    <td class="value"><input type="text" name="build_home" value="<%cfg_build_home%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Index page to use for directories; page that is pulled when you request a
      directory.
    </td>
  </tr>
  <tr>
    <td class="option">build_index</td>
    <td class="value"><input type="text" name="build_index" value="<%cfg_build_index%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Whether or not the build_index is appended to URLs.  Turning off this
      option allows you to switch between different index page types without
      affecting bookmarked pages or search engine rank.  Note that if you turn
      this option off, then your webserver must be configured to use the
      build_index as the index page.
    </td>
  </tr>
  <tr>
    <td class="option">build_index_include</td>
    <td class="value">
      <input type="radio" value="1" name="build_index_include" id="bii1" <%if cfg_build_index_include%>checked="checked" <%endif%>/><label for="bii1">Yes</label>
      <input type="radio" value="0" name="build_index_include" id="bii0" <%ifnot cfg_build_index_include%>checked="checked" <%endif%>/><label for="bii0">No</label>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Page name to use for pages that span more than one page.  The full name will be [build_more][page #][build_extension].
    </td>
  </tr>
  <tr>
    <td class="option">build_more</td>
    <td class="value"><input type="text" name="build_more" value="<%cfg_build_more%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Extension to use on non index pages.
    </td>
  </tr>
  <tr>
    <td class="option">build_extension</td>
    <td class="value"><input type="text" name="build_extension" value="<%cfg_build_extension%>" size="40" /></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Whether or not the Full_Name format variable should behave like it did in
      Links SQL (where it did no coalesce multiple _'s into a single _).  If
      this is a new installation, then keep this set to 'No'.  If you have
      upgraded from a previous version, and want to ensure all your urls are
      kept the same, then set this to 'Yes (broken)'.  The difference between
      the 'Yes' and 'Yes (broken)' settings is that _'s are not coalesced for
      the Full_Name variable in build_detail_format for the 'Yes' setting.
    </td>
  </tr>
  <tr>
    <td class="option">build_format_compat</td>
    <td class="value">
      <input type="radio" value="1" name="build_format_compat" id="bfc1" <%if cfg_build_format_compat == 1%>checked="checked" <%endif%>/><label for="bfc1">Yes</label>
      <input type="radio" value="2" name="build_format_compat" id="bfc2" <%if cfg_build_format_compat == 2%>checked="checked" <%endif%>/><label for="bfc2">Yes (broken)</label>
      <input type="radio" value="0" name="build_format_compat" id="bfc0" <%ifnot cfg_build_format_compat%>checked="checked" <%endif%>/><label for="bfc0">No</label>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      This option controls how the directories for categories will be named.
      Note that if your category names contain many or entirely foreign
      characters, the ID-only option is recommended.  The two "shortened" ... forms
      substitute long portions (&gt;20 characters) of the category name with
      "...", removing either characters off the beginning or end of the name.
      The shortened forms without ... simply remove extra characters without
      substituting them.  The advanced option can be used to specify a custom
      format string, but is not recommended for casual users.  See
      Links::Tools::parse_format for more details.
    </td>
  </tr>
  <tr>
    <td class="option">build_category_format</td>
    <td class="value">
      <select name="build_category_format" onchange="document.getElementById('build_category_format_custom').style.display = (this.value == 'custom') ? 'inline' : 'none'">
        <%set found_format = 0%>
        <option value="%Full_Name%"<%if cfg_build_category_format eq '%Full_Name%'%> selected="selected"<%set found_format = 1%><%endif%>>Full/Long Category/Name</option>
        <option value="%ID%"<%if cfg_build_category_format eq '%ID%'%> selected="selected"<%set found_format = 1%><%endif%>>Category ID</option>
        <option value="%Full_ID%"<%if cfg_build_category_format eq '%Full_ID%'%> selected="selected"<%set found_format = 1%><%endif%>>Category ID (including parents)</option>
        <option value="%(...)-20Full_Name/%"<%if cfg_build_category_format eq '%(...)-20Full_Name/%'%> selected="selected"<%set found_format = 1%><%endif%>>Shortened/...ng Category/Name</option>
        <option value="%(...)20Full_Name/%"<%if cfg_build_category_format eq '%(...)20Full_Name/%'%> selected="selected"<%set found_format = 1%><%endif%>>Shortened/Long Categ.../Name</option>
        <option value="%20Full_Name/%"<%if cfg_build_category_format eq '%20Full_Name/%'%> selected="selected"<%set found_format = 1%><%endif%>>Shortened/Long Categ/Name</option>
        <option value="%-20Full_Name/%"<%if cfg_build_category_format eq '%-20Full_Name/%'%> selected="selected"<%set found_format = 1%><%endif%>>Shortened/ng Category/Name</option>
        <option value="custom"<%ifnot found_format%> selected="selected"<%endifnot%>>Advanced...</option>
      </select>
      <input type="text" size="40" id="build_category_format_custom" name="build_category_format_custom" value="<%if cfg_build_category_format%><%cfg_build_category_format%><%endif%>"<%if found_format%> style="display: none"<%endif%> />
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      This option controls how dynamic <acronym>URL</acronym>s will look.  The
      "ID" setting will result in <acronym>URL</acronym>s such as
      <code>page.cgi?g=123;d=1</code> while the "Full_Name" setting will result
      in <acronym>URL</acronym>s such as
      <code>page.cgi?g=Category/Name;d=1</code>.  Gossamer Links will always accept
      both <acronym>URL</acronym> forms, this setting simply controls the
      default when Gossamer Links generates dynamic-mode <acronym>URL</acronym>s.
      You may alternatively choose another field, but be aware that this
      <b>will</b> cause problems if the column does not contain unique values
      for every category.
    </td>
  </tr>
  <tr>
    <td class="option">build_category_dynamic</td>
    <td class="value">
      <select name="build_category_dynamic" onchange="document.getElementById('build_category_dynamic_custom').style.display = (this.value == 'custom') ? 'inline' : 'none'">
        <%set found_format = 0%>
        <option value="Full_Name"<%if not cfg_build_category_dynamic or cfg_build_category_dynamic eq 'Full_Name'%> selected="selected"<%set found_format = 1%><%endif%>>Full_Name</option>
        <option value="ID"<%if cfg_build_category_dynamic eq 'ID'%> selected="selected"<%set found_format = 1%><%endif%>>ID</option>
        <option value="custom"<%ifnot found_format%> selected="selected"<%endifnot%>>Other...</option>
      </select>
      <input type="text" size="40" id="build_category_dynamic_custom" name="build_category_dynamic_custom" value="<%if cfg_build_category_dynamic%><%cfg_build_category_dynamic%><%endif%>"<%if found_format%> style="display: none"<%endif%> />
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      This option controls how detailed pages will be named.  The default is
      simply the link ID, but more complex paths are possible.  If the format
      does not contain the link ID, the link ID will be appended to the end of
      the format (_LinkID).  The "shortened" option substitutes portions of the
      category name longer than 15 characters, and portions of the link title
      longer than 20 characters with "...".  The advanced option can be used
      to specify a custom format string, but is not recommended for casual
      users.  <b>Note:</b> This option only applies when the
      <b>build_detailed</b> option above is enabled.
    </td>
  </tr>
  <tr>
    <td class="option">build_detail_format</td>
    <td class="value">
      <select name="build_detail_format" onchange="document.getElementById('build_detail_format_custom').style.display = (this.value == 'custom') ? 'inline' : 'none'">
        <%set found_format = 0%>
        <option value="%ID%"<%if cfg_build_detail_format eq '%ID%'%> selected="selected"<%set found_format = 1%><%endif%>>LinkID</option>
        <option value="%Full_Name%/%Title%_%ID%"<%if cfg_build_detail_format eq '%Full_Name%/%Title%_%ID%'%> selected="selected"<%set found_format = 1%><%endif%>>FullCategoryName/Title_LinkID</option>
        <option value="%(...)10-5Full_Name/%/%(...)20Title%_%ID%"<%if cfg_build_detail_format eq '%(...)10-5Full_Name/%/%(...)20Title%_%ID%'%> selected="selected"<%set found_format = 1%><%endif%>>FullCategoryName/Title_LinkID, shortened</option>
        <option value="custom"<%ifnot found_format%> selected="selected"<%endifnot%>>Advanced...</option>
      </select>
      <input type="text" size="40" id="build_detail_format_custom" name="build_detail_format_custom" value="<%if cfg_build_detail_format%><%cfg_build_detail_format%><%endif%>"<%if found_format%> style="display: none"<%endif%> />
    </td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      Directory permissions to use, default to 777 so that you can remove the
      directories from <acronym>FTP</acronym>/telnet as usually they are owned
      by the web server.
    </td>
  </tr>
  <tr>
    <td class="option">build_dir_per</td>
    <td class="value"><input type="text" name="build_dir_per" value="<%cfg_build_dir_per%>" size="40"></td>
  </tr>
  <tr>
    <td colspan="2" class="description">
      File permissions to set newly created pages to, use 666 if you want to
      switch between building from telnet, and building from shell. Use 644 if
      you are going to be running under cgiwrap, or only building from telnet.
    </td>
  </tr>
  <tr>
    <td class="option">build_file_per</td>
    <td class="value"><input type="text" name="build_file_per" value="<%cfg_build_file_per%>" size="40"></td>
  </tr>
</table>

<div class="submit">
  <input type="submit" value="Submit Changes" />
  <input type="submit" name="reset_defaults" value="Restore System Defaults" />
</div>

</form>
</body>
</html>
