Web Based Knowledge Exchange Version 1.14

written by M.Liberi

Nov 10, 2003

Michele Liberi
cell: 3400833493
email: mliberi@gmail.com
Web Based Knowledge Exchange
Version 1.14

Table of Contents

  • Description
  • Package Components
  • knowlex, application main program
  • installation and configuration
  • prerequisites
  • components installation
  • configuration
  • Licensing


    Description

    Web Based Knowledge Exchange is an HTTP based client/server application built to help users to share knowledge through a question & answer mechanism. It is an evolution of the concept of HelpDesk, in fact it allows users to share day by day working experiences each other, implementing a cross collaborative system.

    The knowledge database is segmented into topics, each of them may be public or owned by one or more moderators going to approve submitted appends. Global moderators, allowed to approve submissions to any topic, can also be defined.

    Each topic contains threads with the following attributes:

    1. subtopic: one of the available subtopics
    2. category: one of the available problem categories
    3. date opened: timestamp of question creation or re-opening
    4. date closed: timestamp of question closing (empty if status=open)
    5. owner: username of the question creator
    6. severity: one of stopping, urgent, asap, info
    7. subject: free text with a short description of the question

    Any registered user is allowed to create a new thread by submitting a question to the community. The newly created thread will be immediately available, but moderators, if any, are notified about thread creation.

    there are four append type to existing threads:

    If at least one moderator is defined for the topic the thread belongs to, the proposed append will not be available until a moderator approve or reject it.

    A newly created thread remains open until an answer is submitted and eventually approved.

    A closed thread may be reopened only by the owner, that is who created it, by appending a comment to it.

    Users can quickly find threads based on the following search parameters:

    1. topic: a specific topic or all topics (whole DB)
    2. subtopic: a specific subtopic or all subtopics
    3. category: a specific category or all categories
    4. status: open threads, closed or both
    5. owner: user's owned threads only or all threads
    6. subject pattern: a unix shell like pattern contained in thread subject
    7. content pattern: a unix shell like pattern contained into thread content

    A search form is also available to filter Engineering Changes table.

    Access to application, that is user's authentication, is controlled by httpd server. The application itself has two distinct security levels: moderators and others. httpd server can be configured in order to request a password for one or both user's category. I suggest to always check moderator's identity.

    Nothing more than a browser is requested at client side to access the application. It is, in fact, based on HTML standards.

    The application uses a yerarchical, file system based, database to store question&answer threads.

    Pending submission waiting for approval/reject has the following additional attributes:

    1. date submitted: timestamp of submission
    2. submitter: username of submitter
    3. append type: comment, answer, attach or engineering change

    An e-mail notification system can be optionally set up in order to signal the following events to users:

    The following screens are available to interact with application:

    login
    a username is requested for access control. If the entered username is not known or if the user pushes "register new user" button, knowlex goes to registration form, otherwise goes to search form.

    registration
    form to create a new nickname; user is requested to input his username and e-mail address

    search
    form to search into DB for previously submitted q&a threads; the following search criteria are available: If the user is a moderator a view pending comments and answers button is also available to access the list of appends waiting for an action.

    If available NEWS set by administrator are finally shown.

    results
    display the list of q&a threads matching filter parameters set in the search form; output list is ordered by topic, open date, close date, close date, owner, severity and subject.

    new question
    form to add a new question; user is requested to input topic, subject and question text.

    edit question
    form to add a comment or an answer to an existing q&a thread; user is requested to insert text going to be appended.

    confirm
    received after a successful submission

    list of pending submissions
    accessible only by topic moderators, used to list submissions waiting for an action.

    accept or reject
    accessible only by topic moderators, add pending submission to related thread or discard it.

    EC search form
    allow user to set filtering parameters for EC results

    EC results
    display all EC matching search parameters

    DB administration
    allow selected users to:

    Package Components

    This package has the following components:

    knowlex
    application main program

    gp.km
    a general purpose collection of shared functions

    knowlex.htm
    this file

    cgi
    browser parameter parsing module

    match
    shell patterns finder

    rmfl
    an enhanced rm

    ftime
    an enhanced find

    pol
    counters manager

    upload
    cgi program used for uploading files

    It also requires kcx, shell script compiler package. Read kcx.htm for details.

    knowlex, application main program

    knowlex is the main component of the package. It is a CGI (Common Gateway Interface) program, based on input given by user through HTML forms it dynamically generates html pages.

    If activated with '-h' option it generates the following output:

    knowlex, written by M.Liberi, ver. 1.07, Mar 2003
     
    knowledge exchange CGI
     
    syntax: knowlex [option]... [parameter]...
      -h[i]         this help screen [with parameters init details]
      -w            write current parameters to stdout and exit
      -g            edit global profile and exit
      -e            edit inifile and exit
      -L            list inifile sections and exit
      -P            select inifile section interactively
      -pxx          read parameters from xx section of inifile
      --            no more options
     
    parameters
      KE_DIR        database directory
      FYA_URI       uri of approval CGI program, in a password protected httpd area
      STYLE_URI     stylesheet reference (if any)
      CAPTION       browser caption string
      TITLE         html pages customized title
      SUPPORT       login screen customized support text
      EMAIL_EG      email example for registration form
      Mail          mail agent, command to be used to send mail
      LABEL_topic   topic name remapping
      LABEL_subtop  subtopic name remapping
      LABEL_ctg     category name remapping
    

    Parameters meaning:

    KE_DIR
    base directory where application saves it's status. The directory itself and all it's content must be writable by the user running the CGI application, usually the user running HTTPD server. It contains a directory for each topic and the following: Topics subdirectories contains one text file for each Q&A thread, and the following:

    FYA_URI
    in order to protect some functions with user/password authentication a link to knowlex application can be optionally established in a password protected HTTPD server managed directory. The following functions calls knowlex using FYA_URI:
    1. view pending comments and answers
    2. approve
    3. reject

    STYLE_URI
    it is possible to change colors, shapes and html objects by referencing a stylesheet.

    CAPTION
    browser caption string

    TITLE
    a customized html text title for all dynamically generated HTML pages

    SUPPORT
    a customized html text shown at login screen bottom

    EMAIL_EG
    used to show a customized example at new user registration time.

    Mail
    mail transfer agent to be used to send e-mails. Default value is 'mail'

    LABEL_topic
    customizable topic label

    LABEL_subtop
    customizable subtopic label

    LABEL_ctg
    customizable category label

    installation and configuration

    prerequisites

    httpd server must be up and running, an alias to a CGI enabled directory must exist (tipically /cgi-bin). If that area is not password protected I also suggest to define another password protected CGI enabled directory. /ke alias to access attachments repository must also be set in $KE_DIR/.pub.

    Apache configuration example:

    DocumentRoot            /http/pub
    <Directory /http/pub>
      Options               Includes
      DirectoryIndex        index.html
    <Directory>
     
    <Directory /http/cgi-bin>
    <Directory>
     
    <Directory /http/pp-bin>
      AuthType              Basic
      AuthName              knowlex
      AuthUserFile          /http/apache_passwd
      require               valid-user
    <Directory>
     
    Alias /ke /usr/knowlexDB/.pub
    ScriptAlias /cgi-bin       /http/cgi-bin
    ScriptAlias /pp-bin        /http/pp-bin
    

    kcx, shell script compiler, must be up and running. Only runtime files are required. They are located in /bin/kcr and /bin/kcx.

    components installation

    knowlex is a CGI application so main components must be put in a HTTP server managed directory. Two files are required to stay in it:

    gp.km can stay in the same directory or among all other package components in any PATH referenced directory.

    If FYA_URI parameter is set, a link or a copy of knowlex must be put in a password protected CGI enabled directory.

    All components must be executable by user running HTTP server.

    /ke/knowlex.htm (this file) must be put in httpd server public namespace.

    configuration

    Create application inifile by running knowlex -e from a tty, with same user running HTTP server, set application parameters with values of your choice.

    knowlex.ini example:

    [default]
    KE_DIR='/usr/knowlexDB'
    FYA_URI='/pp-bin/knowlex'
    TITLE='every pages title'
    SUPPORT='please contact Fname Lname for support'
    EMAIL_EG='gruppopro.it'
    Mail='mail'
    

    Create upload configuration file /etc/upload.conf and set, at least, chdir parameter referring /ke alias pathname and exec parameter referring knowlex absolute pathname

    /etc/upload.conf example:

    user nobody
    chdir           /usr/knowlex/docs
    exec    *       /usr/HTTPServer/cgi-bin/knowlex append_thread
    

    Create knowledge database base directory, create a sub directory for each topic.

    Optionally create global moderators list .moderators in the DB directory (each line must contain a valid username) and the same file into topics subdirectories for topics specific ones.

    For each subtopic a list of moderators can be established by creating .moderators file in it.

    A list of subtopics can be set by by creating .subs file into topic directory.

    A list of categories can be set by by creating .ctgs file into topic directory.

    In order to get news displayed at the bottom of search form, a list of .htm files and a list of .txt files can be optionally created in the DB directory.

    In order to remove all threads but keeping DB structure (users, moderators, topics, categories), you can simply remove .pol file. All attachments in /ke httpd managed directory should be manually removed


    Licensing

    End-User Agreement

    Software Products: Michele Liberi programs and accompanying documentation "Freeware".

    Licensor: Michele Liberi, Viale Roma 6, Battaglia Terme (PD), Italy.

    This is a legal agreement between you, an end user, and licensor.

    By downloading and installing the freeware, you are agreeing to be bound by the terms of this agreement. If you do not agree to the terms of this agreement, do not install this freeware and delete any copies of the freeware that you have downloaded.

    This freeware is provided to you free of charge for both commercial and non-commercial purposes. Obtaining a license to this freeware from any party other than licensor and/or paying a fee for such license is strictly forbidden. If you are aware of any unauthorized third party distributing this freeware and/or charging a fee for this freeware, please report such violations to your consumer protection authorities.

    Distribution on internet and CD-ROM

    1. The Licensor grants you the right to make this freeware available on an internet site for the purpose of downloading, as long as NO FEE IS CHARGED for said download.
    2. The Licensor grants you the royalty-free right to reproduce and distribute this freeware as part of a CD-ROM to be enclosed with the print issue of any magazine, book or printed publication, as long as said CD-ROM and printed publication contain material that would have been distributed regardless of the inclusion of this freeware, and NO EXTRA FEE IS CHARGED for inclusion of this freeware.

    License terms and conditions

    1. Grant of license

      This Agreement permits you to use one copy of the Freeware acquired with this license on any single computer ("License") for both commercial and non-commercial purposes, provided the Freeware is in use on only one computer at any given time. The Freeware is "in use" on a computer when it is loaded into the temporary memory or installed into the permanent memory (e.g. hard disk, CD ROM, or other storage device) of that computer, except that a copy installed on a network server for the sole purpose of distribution to other computers is not considered "in use".

    2. Copyright

      The Freeware is owned by Licensor and is protected by copyright laws, international treaty provisions, and other national laws. You agree that you have no right, title or interest in the Freeware, except as set forth in Subsection I.

    3. Other restrictions

      You may not rent, lease, sell or transfer the Freeware to any third party. You may not reverse engineer, decompile or disassemble the Freeware.

    4. Warranties

      You acknowledge that you have licensed this freeware free of charge and that licensor makes no warranties to you in connection with this license, including but not limited to implied warranties of merchantability, fitness for a particular purpose, title, non-infringement and legality in your country. You agree to defend, indemnify and hold harmless licensor from any and all claims of infringement (including those made by third parties) resulting in whole or in part from your use of the freeware.

    5. No liability for consequential damages

      In no event shall Licensor be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the Freeware, even if Licensor has been advised of the possibility of such damages.

    6. Governing Law

      This Agreement shall be governed by and interpreted in accordance with the laws of Italy. If any dispute shall arise pursuant to any provision of this Agreement, said dispute shall be settled by binding arbitration in accordance with the rules and regulations of the courts, located in Italy. If any term or provision of this Agreement shall be declared invalid in arbitration or by a court of competent jurisdiction, such invalidity shall be limited solely to the specific term or provision invalidated, and the remainder of this Agreement shall remain in full force and effect, according to its terms. Any provision declared invalid shall be modified to the fullest extent possible to reflect the parties intent as of the Effective Date.

    Copyright © M.Liberi. All rights reserved.