<!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: User Options</title>
  <%include include_style.html%>
</head>

<body>

<form method="post" action="setup.cgi">
<input type="hidden" name="do" value="setup_user" />
<%set header_title = 'User Options'%>
<%set header_details = 'These are user related options that you can change.'%>
<%include include_header.html%>

<table>
  <tr>
    <th class="heading" colspan="2">User Options:</th>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Does a user have to be validated before they can sign up? This will make
      Gossamer Links send the user an email with a validation code that they will
      need to enter before the user is activated.
    </td>
  </tr>
  <tr>
    <td class="option">user_validation</td>
    <td class="value">
      <input type="radio" value="1" name="user_validation" id="uv1"<%if cfg_user_validation%> checked="checked"<%endif%> /><label for="uv1">Yes</label>
      <input type="radio" value="0" name="user_validation" id="uv0"<%ifnot cfg_user_validation%> checked="checked"<%endif%> /><label for="uv0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      This option controls whether or not to check that links submitted by users contain valid URLs.
    </td>
  </tr>
  <tr>
    <td class="option">user_link_validation</td>
    <td class="value">
      <input type="radio" value="1" name="user_link_validation" id="ulv1"<%if cfg_user_link_validation%> checked="checked"<%endif%> /><label for="ulv1">Yes</label>
      <input type="radio" value="0" name="user_link_validation" id="ulv0"<%ifnot cfg_user_link_validation%> checked="checked"<%endif%> /><label for="ulv0">No</label>
    </td>
  </tr>

  <tr>
    <td class="description" colspan="2">
      Require users to signup before they can add or modify links?
    </td>
  </tr>
  <tr>
    <td class="option">user_required</td>
    <td class="value">
      <input type="radio" value="1" name="user_required" id="ur1"<%if cfg_user_required%> checked="checked"<%endif%> /><label for="ur1">Yes</label>
      <input type="radio" value="0" name="user_required" id="ur0"<%ifnot cfg_user_required%> checked="checked"<%endif%> /><label for="ur0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Require users to signup before they can rate links?
    </td>
  </tr>
  <tr>
    <td class="option">user_rate_required</td>
    <td class="value">
      <input type="radio" value="1" name="user_rate_required" id="urr1"<%if cfg_user_rate_required%> checked="checked"<%endif%> /><label for="urr1">Yes</label>
      <input type="radio" value="0" name="user_rate_required" id="urr0"<%ifnot cfg_user_rate_required%> checked="checked"<%endif%> /><label for="urr0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Allow users to modify links they own without validation (requires
      user_required to be set to Yes)?
    </td>
  </tr>
  <tr>
    <td class="option">user_direct_mod</td>
    <td class="value">
      <input type="radio" value="1" name="user_direct_mod" id="udm1"<%if cfg_user_direct_mod%> checked="checked"<%endif%> /><label for="udm1">Yes</label>
      <input type="radio" value="0" name="user_direct_mod" id="udm0"<%ifnot cfg_user_direct_mod%> checked="checked"<%endif%> /><label for="udm0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Allow passwords to be emailed to users?
    </td>
  </tr>
  <tr>
    <td class="option">user_allow_pass</td>
    <td class="value">
      <input type="radio" value="1" name="user_allow_pass" id="uap1"<%if cfg_user_allow_pass%> checked="checked"<%endif%> /><label for="uap1">Yes</label>
      <input type="radio" value="0" name="user_allow_pass" id="uap0"<%ifnot cfg_user_allow_pass%> checked="checked"<%endif%> /><label for="uap0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      This option controls whether or not to load links in a frame so the user can easily go back to the Gossamer Links installation or perform actions on the link.
    </td>
  </tr>
  <tr>
    <td class="option">framed_jump</td>
    <td class="value">
      <input type="radio" value="1" name="framed_jump" id="fj1"<%if cfg_framed_jump%> checked="checked"<%endif%> /><label for="fj1">Yes</label>
      <input type="radio" value="0" name="framed_jump" id="fj0"<%ifnot cfg_framed_jump%> checked="checked"<%endif%> /><label for="fj0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Enable Bookmarks?
    </td>
  </tr>
  <tr>
    <td class="option">bookmark_enabled</td>
    <td class="value">
      <input type="radio" value="1" name="bookmark_enabled" id="be1"<%if cfg_bookmark_enabled%> checked="checked"<%endif%> /><label for="be1">Yes</label>
      <input type="radio" value="0" name="bookmark_enabled" id="be0"<%ifnot cfg_bookmark_enabled%> checked="checked"<%endif%> /><label for="be0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Default bookmark folder name
    </td>
  </tr>
  <tr>
    <td class="option">bookmark_folder_default_name</td>
    <td class="value"><input type="text" name="bookmark_folder_default_name" size="30" value="<%cfg_bookmark_folder_default_name%>" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Bookmark folder limit
    </td>
  </tr>
  <tr>
    <td class="option">bookmark_folder_limit</td>
    <td class="value"><input type="text" name="bookmark_folder_limit" size="5" value="<%cfg_bookmark_folder_limit%>" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Bookmark folders per page
    </td>
  </tr>
  <tr>
    <td class="option">bookmark_folders_per_page</td>
    <td class="value"><input type="text" name="bookmark_folders_per_page" size="5" value="<%cfg_bookmark_folders_per_page%>" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      The maximum number of bookmarks a user can save
    </td>
  </tr>
  <tr>
    <td class="option">bookmark_links_limit</td>
    <td class="value"><input type="text" name="bookmark_links_limit" size="5" value="<%cfg_bookmark_links_limit%>" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      The maximum number of bookmarks per page on the user list page
    </td>
  </tr>
  <tr>
    <td class="option">bookmark_links_per_page</td>
    <td class="value"><input type="text" name="bookmark_links_per_page" size="5" value="<%cfg_bookmark_links_per_page%>" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Bookmark sort field
    </td>
  </tr>
  <tr>
    <td class="option">bookmark_links_sort</td>
    <td class="value"><input type="text" name="bookmark_links_sort" size="30" value="<%cfg_bookmark_links_sort%>" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Bookmark sort order
    </td>
  </tr>
  <tr>
    <td class="option">bookmark_links_sort_order</td>
    <td class="value">
      <select name="bookmark_links_sort_order">
        <option<%if bookmark_links_sort_order eq 'ASC'%> selected<%endif%>>ASC</option>
        <option<%if bookmark_links_sort_order eq 'DESC'%> selected<%endif%>>DESC</option>
      </select>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      The maximum number of users per page on the user list
    </td>
  </tr>
  <tr>
    <td class="option">bookmark_users_per_page</td>
    <td class="value"><input type="text" name="bookmark_users_per_page" size="5" value="<%cfg_bookmark_users_per_page%>" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Enable Newsletter?
    </td>
  </tr>
  <tr>
    <td class="option">newsletter_enabled</td>
    <td class="value">
      <input type="radio" value="1" name="newsletter_enabled" id="nle1"<%if cfg_newsletter_enabled%> checked="checked"<%endif%> /><label for="nle1">Yes</label>
      <input type="radio" value="0" name="newsletter_enabled" id="nle0"<%ifnot cfg_newsletter_enabled%> checked="checked"<%endif%> /><label for="nle0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      If set, the newsletter system will be put into global newsletter mode, where it will only allow users to (un)subscribe to/from a single global category rather than individual categories.
    </td>
  </tr>
  <tr>
    <td class="option">newsletter_global_subscribe</td>
    <td class="value">
      <input type="radio" value="1" name="newsletter_global_subscribe" id="nlgs1"<%if cfg_newsletter_global_subscribe%> checked="checked"<%endif%> /><label for="nlgs1">Yes</label>
      <input type="radio" value="0" name="newsletter_global_subscribe" id="nlgs0"<%ifnot cfg_newsletter_global_subscribe%> checked="checked"<%endif%> /><label for="nlgs0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      This is the maximum depth of the newsletter category tree to display on a page.
    </td>
  </tr>
  <tr>
    <td class="option">newsletter_max_depth</td>
    <td class="value"><input type="text" name="newsletter_max_depth" size="5" value="<%cfg_newsletter_max_depth%>" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Use cookies to store session information, or pass it through the URL.  Note that
      URL sessions will not work with statically built pages.
    </td>
  </tr>
  <tr>
    <td class="option">user_sessions</td>
    <td class="value">
      <input type="radio" value="Cookies" name="user_sessions" id="usc"<%if cfg_user_sessions eq 'Cookies'%> checked="checked"<%endif%> /><label for="usc">Cookies</label>
      <input type="radio" value="URL" name="user_sessions" id="usu"<%if cfg_user_sessions eq 'URL'%> checked="checked"<%endif%> /><label for="usu">URL</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      This is the domain for which any cookies set will work.  If blank,
      cookies will work for only the exact domain accessed.  For example, if
      your server is www.example.com and it is also accessed via example.com or
      via anything.example.com you should set this to: '.example.com'.
    </td>
  </tr>
  <tr>
    <td class="option">user_cookie_domain</td>
    <td class="value"><input type="text" name="user_cookie_domain" size="30" value="<%cfg_user_cookie_domain%>" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      If set, the names of all cookies will be prefixed with this.  Note that
      changing this value will render all cookies invalid and all users will be
      required to log in again.
    </td>
  </tr>
  <tr>
    <td class="option">user_cookie_prefix</td>
    <td class="value"><input type="text" name="user_cookie_prefix" size="30" value="<%cfg_user_cookie_prefix%>" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Number of hours user sessions should last for.
    </td>
  </tr>
  <tr>
    <td class="option">user_session_length</td>
    <td class="value"><input type="text" name="user_session_length" size="5" value="<%cfg_user_session_length%>" /></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>
