/ .. / / -> download
DEPENDENCIES
_____________________________________________________________________
    
    - phtools
    - Bash
    - core utils


PHTOOLS
_____________________________________________________________________

    These are a set of utilities which 1436chan uses to create
    dynamic menu content. They can be downloaded at:

    http://github.com/kibook/phtools


NOTES ON GOPHER SERVER COMPATIBILITY
_____________________________________________________________________

    1436chan has so far been developed/tested exclusively on the
    Bucktooth gopher server. As long as a gopher server has support
    for the following features, it should work without issue:

    - Executable scripts ("moles")
    - "gophermap" files which are executable scripts

INSTALLING/UPGRADING
_____________________________________________________________________

    1. Extract chan.tar.gz to the folder that will be the root of
   your chan

    2. Run sh setup.sh

    You can use the -quick flag (sh setup.sh -quick) to skip the
    setup prompts and select all defaults. This is particularly
    useful when upgrading (setup.sh will use your existing
    configuration as the defaults).


SETUP OPTIONS
_____________________________________________________________________

    Running sh setup.sh will prompt you for several options,
    which are stored in params.sh. This section outlines what
    each of these options means:

    SERVER_HOST
      This is the hostname of the Gopher server that the board is
      running on.

    SERVER_PORT
      This is the port of the Gopher server that the board is
      running on.

    CHAN_ROOT
        This is the root selector of your board.

    MAX_THREADS
        The maximum number of threads allowed on the board. When
        MAX_THREADS threads already exist and a user creates a
        new thread, the oldest thread (in terms of last updated)
        is either archived or deleted (see ENABLE_ARCHIVE below).

    MAX_TITLELEN
        The maximum characters allowed in a thread
        title. Additional characters are truncated.

    MAX_POSTS
        The maximum number of posts allowed in a thread. When
        MAX_POSTS posts already exist, users will be unable to
        add more posts to a thread. If this is 0, there is no
        limit to the number of posts allowed.

    MAX_POSTLEN
        The maximum characters allowed in a post. Additional
        characters are truncated.

    ENABLE_ARCHIVE
        Either 'y' or 'n'. If 'y', then old threads are preserved
        instead of deleted when MAX_THREADS is reached. They will
        be listed in a special "Archive" section instead of the
        main menu. Otherwise, old threads are permanently deleted.

    DATE_FORMAT
        The format for displaying the date on posts and threads.

    SHOW_EMPTY_THREADS
        Either 'y' or 'n'. If 'y', then threads with 0 posts
        are shown on the main menu of the board. Otherwise, such
        empty threads are hidden until they have at least 1 post.

    LAST_POSTS
        Up to LAST_POSTS posts are shown under each thread on
        the main menu.

    MAX_UPLOAD
        Maximum size of an upload in bytes. If this is > 0 then users
        are allowed to reply with 'uploaded' files.

        If this is 0, then uploads are disabled.

    REMOTE_FILE_UPLOAD
        Allow  users to provide a URL to a file which the server
        downloads to the respective thread directory and then posts a
        link to it in said thread.

        [WARNING]: This means your server may connect to and download
        from other arbitrary servers. If you are concerned about
        what connections you make or what kinds of files you are
        storing on your server, disable this!

    MAX_IMAGE
        Maximum dimensions of an uploaded image (WxH). Leave blank
        to disable.

    DATA_DIR
        Directory where extra data will be stored. Should be a
        directory outside the gopher server root but with the same
        permissions as CHAN_ROOT.

    DELETE_TIME
        Number of seconds within which a user may delete their own
        post. Set to 0 to disable this feature.

    MAX_RSS_ITEMS
        Maximum number of feed items in the RSS feed. Set to 0 to
        disable the RSS feed entirely.

    POST_LIMIT
        Number of seconds of cooldown time between posting/creating
        new threads. Set to 0 to disable this feature.

    SALT_DIR
        Directory where salts used to generate tripcodes/post IDs
        will be stored. Should be a directory outside the gopher
        server root but with the same permissions as CHAN_ROOT.
        Multiple boards may point to the same SALT_DIR to synchronize
        tripcodes/post IDs across boards.

    ENABLE_POST_IDS
        Either 'y' or 'n'. If 'y', posts are given a post ID based
        on the IP address of the poster.


ADMINISTRATOR UTILITY
_____________________________________________________________________

    The Administrator utility provides a simple menu for performing
    common tasks. To use it, run:
    
        sh admin.sh

    and follow the prompts. The individual scripts this menu calls
    are described below as well.


DELETING A THREAD OR POST
_____________________________________________________________________

    To delete a thread (from the root folder):

        sh deletethread.sh <thread>

    where <thread> is the thread number (##) of the thread.

    To delete a post (from the root folder):

       sh deletepost.sh <post>

    where <post> is the post number (#) of the post.


MESSAGE OF THE DAY
_____________________________________________________________________

    Create or edit the 'motd' file to add a message of the day
    to the top of the board.

    Lines in the motd file without TAB characters are turned in
    to inline text (type i), e.g. the line:
        Hello world!
    will become:
        iHello world!<TAB>fake<TAB>(NULL)<TAB>0<CR><LF>
    
    Otherwise they are interpreted as Gopher links, e.g.:
        IA picture<TAB>/pic<TAB>host<TAB>port


STICKIES
_____________________________________________________________________

    Stickies appear at the top of the board (in order of last
    update) marked by the prefix [sticky]. Unlike threads stickies
    will never be deleted or archived unless done so manually by
    an administrator. The administrator can create new stickies or
    turn existing threads in to stickies using the scripts below:

  sh newsticky.sh <title>
      Creates a new open sticky titled <title>. Open stickies
      can still be replied to by anyone.

  sh newrosticky.sh <title>
      Creates a new read-only (closed) sticky titled
      <title>. Closed stickies can only be replied to by an
      administrator.

  sh makesticky.sh <directory>
      Turns an existing thread in to an open sticky.

  sh makerosticky.sh <directory>
      Turns an existing thread in to a closed sticky.

  rm -r sticky_<...>
      Deletes the sticky with id <...>. Alternatively use
      sh deletethread.sh <##> where ## is the thread number
      of the sticky.

  sh post.sh sticky_<...>
      Add a post to the sticky with id <...>.


MULTIPLE BOARDS
_____________________________________________________________________

  There is no built-in feature for this, but if you wish to have
  multiple boards (representing certain subjects for discussion
  perhaps) you may simply create a parent directory for the overall
  "chan" and then perform the INSTALLING/UPGRADING procedure in
  multiple subdirectories, one for each board. Finally, create
  your own gophermap in the parent directory to customise the
  list of boards.


PERMISSIONS
_____________________________________________________________________

  If you need multiple users to have write permissions to your chan
  (for example, when using Bucky running as a different user than the
  one running the Gopher server), it is recommended you create a
  group for these users and give group ownership to the chan
  directory. For example:

      chgrp -R 1436chan /var/gopher/chan

  will set group ownership of your chan folder to '1436chan'. Then:

      usermod -aG server 1436chan
      usermod -aG bucky 1436chan

  now both server (the user running the Gopher server) and bucky can
  write.

  After modifying permissions, run:
      sh setup.sh


/ gopher://khzae.net/0/chan/README
Styles: Light Dark Classic