demonstration portal
customizable database-driven applications for the web


KnowledgeShare Basic Edition   v.1


:: Overview
:: Features
:: System Requirements
:: License
:: On-line Demo
:: Download

:: Installation
:: Configuration
:: Database Schema
:: Customization
:: User and Administration Interfaces
:: Support



Overview

KnowledgeShare is a flexible FAQ or knowledgebase system for your web site. It can display articles in a Question/Answer, Problem/Solution or any other content format. KnowledgeShare is easy to install, integrate and maintain. All styles can be managed from a common style sheet (default.css). Your own custom design can also be applied via the i_header.asp and i_footer.asp HTML files that create a "wrapper" around the forum content. The entire system contains 16 files, and the article display code itself is condensed to 1 file. Since the application includes the complete ASP (VBscript) source code and a Microsoft Access or SQL database, it can be customized and integrated to suite your environment. For download and purchase information visit, ASPapp.com

Features

    :: 100% customizable design and integration using your HTML template
    :: No 3rd party DLL's or executables
    :: 4 user levels: anonymous (no login required), 'registered user', 'editor' and 'administrator'
    :: Unlimited nested categories, define your own k-base hierarchy
    :: Can be used with either Access or SQL Server database
    :: Customizable email confirmation messages
    :: User management tools (login, register, edit/delete)
    :: Standard ASP VBScript means you have the customizable source code
    :: Easy to use admin interface lets you maintain the site via any browser


System Requirements

It requires that your web site be hosted on Microsoft IIS 4.0 or later. KnowledgeShare can use an Access database file which will work on most ISP hosted sites. Or it can also be used with Microsoft SQL Server 6.5 or later (also supported by many ISP's) for enhanced performance and reliability. Mailing list features require one of the supported E-Mail Components listed above.

License

Use of this free program requires any visible links and copyright information for ASPapp.com and Iatek to remains intact on each page. The program can be used and modified provided that any source code remains copyrighted by Iatek. This program cannot be re-distributed or sold. For more information see, readme.asp

On-line Demonstration





Installation

The installation process entails..
    1) "unzipping" the included .zip file
    2) extracting or copying the files to a Web accessible folder
    3) connecting to the Access (.mdb) or SQL server database

    For Access
    • - unzip the .zip file to a Web shared (alias or virtual created via IIS) folder
    • - make sure the '/data' folder is write accesible to the IUSR_MACHINE account
    • - make sure the database connection paths (cn.Open, user_cn,Open) in 'i_utils' are valid paths to the database

      The most common reason for problems is that the Internet Guest account (IUSR_MACHINE) does not have 'Write' permissions on the database file (.mdb). To fix this problem, use the Security tab in Windows Explorer to adjust the properties for this file so that the Internet Guest account has the correct permissions. When using Microsoft Access databases with ADO, it is also necessary to give the Internet Guest account Write permissions on the directory containing the .mdb file. This is because Jet creates an .ldb file to handle database locking. You may also need to give read/write permission on the Temp folder because Jet may create temporary files in this directory.

    For SQL
    • - unzip the .zip file to a Web shared (alias or virtual created via IIS) folder
    • - create a database on your SQL server
    • - execute the included .sql script on the new database (WARNING: executing the script on an existing SQL database will delete all tables and data!!)
    • - update the database connection strings (cn.Open, user_cn,Open) in 'i_utils.asp' for your SQL server database (ie; "PROVIDER=SQLOLEDB;DATA SOURCE=sqlservername_or_ip;UID=myuserid;PWD=mypwd;DATABASE=mydatabase")


Configuration

To set-up your site, there are some basic settings that need to be modified. Some of these settings can be updated from your Web browser, and others require that you can open the appropriate .asp files in an editor. This editor can be any standard text or HTML editor (Visual InterDev, Homesite, Dreamweaver, Notepad, etc..). The application database comes pre-populated with data so that you can see how the .asp pages interact with the database.
  1. Define categories:

    All of the content (articles) in the site are classified by categories. You probably have a hierarchical list of categories and sub-categories in mind, and now is the time to define these using the admin pages. Categories can be anything that is best suited to your requirements. Your categories might by topics, subjects, technical areas, product or any other multi-level classification system that will fit to the content that will later be added to your site. To define new, or to change the existing categories go to the admin_cats.asp from your Web browser (you must login as admin/admin to access this page).

    Category data is stored in the 'Cats' table. Each category has a label that is stored in the 'Cat' field and a related 'CatId' that is an automatically generated (Access: autonumber or SQL: identity field) number. This 'CatId' is created when you add a new category. There is also an optional 'ParentId' field. This field is used to create the hierarchy of categories and sub-categories. Examine the table below to see how the 'My Main1 Sub Category' and 'My 2nd Main1 Sub Category' sub-categories are created under the 'My Main1 Category' category. Cat Table
    CatId Cat ParentId
    104 My Main1 Category
    105 My Main1 Sub Category 104
    106 My 2nd Main1 Sub Category 104
    107 My Main2 Category


    Categories without ParentId's are considered to be root (or main) categories. More advanced developers may also wish to also use the 'RelatedId' field to created related categories that will display at the bottom of the 'links.asp' page. Category relationships can be updated using 'admin_related_cats.asp'

  2. Change the admin password:

    For security reasons, it is recommended to change the default admin account password (admin) via 'admin_users.asp' To change the password, or any other account fields, click the [edit] link in the row for username 'admin'.



Database Schema
    Database Tables:

    Cats, CatTypes - These tables establish the hierarchy of categories througout the site. Categories can be anything you want such as regions, topics, subjects, people, etc.. CatTypes are used so that different categories sets can be used to organize different areas. For example, you may want "Good sites", "Bad sites", and "OK sites" as link categories, but "News", "Articles", and "Tutorials" as content categories. You might also want the classifieds area to use it's own categories. Since the 'ParentId' field is used to establish parent, child relationships you can define several levels of categories (ie: Main category, sub category, sub-sub category, etc..).

    Content, ContentTypes - These table are used to manage the content area. ContentTypes can be used to define different types of content. Content can also be related to a category (CatID). The submitter of the content is identified by user_id.

    Users - This table is used to manage all "registered" users and for login validation.

    NOTE: Other tables may exist that are not used for the functionality of this version.


Customization

To make functional changes to your site, an understanding of Active Server Pages, VBScript and relational database design is needed.

Changing the style and look of the site

    Your own custom design can also be applied by editing the 'i_header.asp' and 'i_footer.asp' HTML files that create a "wrapper" around the page content. Most fonts and colors used throughout the site are defined in the default.css file. You can change the style by modifying the values in the default.css, or reference a different .css file in 'i_header.asp'. Several other example other style sheets are provided(default1.css, default2.css, etc..). The code that references the .css file is in the section of 'i_header.asp'

    <link rel=stylesheet type="text/css" href="default.css">

Changing page content and functionality

    The home page (default.asp), is the most common page that clients and developers wish to modify. You may want to change the layout, or display different database-driven content. Familiarity with HTML, ASP, VBScript, and database design is useful when undertaking this task. To modify the home page (or any other page), simply open the page in any standard text or HTML editor.

    If you would like to modify other pages, consider the following page architecture that is used consistently throughout all pages in the application.

    -- The 'i_utils.asp' file (database and login functions library) is included at the top of every page.

    -- Variables are declared (dim)

    -- The "request_" and "validate_" subroutines

    -- The "db_" subroutines

    -- Key database fields are requested

    -- The action variable is requested and handled using the "select case action" statement

    -- Main code section (executed regardless of value of action variable)

    -- The 'i_header.asp' include file is displayed

    -- Forms and content are displayed

    -- The 'i_footer.asp' include file is displayed

Creating other user access levels / Modifying security

    You may also want to create different levels of security in your site, where only certain users can access certain pages. Out of the box, the application has 3 levels of access:

    accesslevel = null or 0 -- anonymous users that are not logged in

    accesslevel = 1 -- (registered user/member) these users can access all (user) pages and submit links.

    accesslevel = 2 -- (author/editor) these users can access some of the 'admin_' pages to submit/modify articles and links.

    accesslevel = 3 -- (admin) these users can access all of the 'admin_' pages including user, category and file management.

    When a user logs in, the session 'user_id' and 'accesslevel' variables are set. For example, the following code could be used to display a section only to users with an accesslevel of 2 or greater...

    <% if session("accesslevel") >= 2 then %> response.write "you are seeing this because you're logged in with an access level of at least 2" <% end if %>

    To set an access level for an entire page, just modify the check_security statement at the top of the page...

    <% check_security(n) %>
    ''' (where n is the value(1,2,3,4..) of the accesslevel field in the Users database table)



The User and Administration Interface

User Pages

  • Navigation

    The 'i_menu.asp' page is included in the 'i_header.asp' page so that a consistent global navigation is available throughout the site. This page contains links to the main site areas.

  • Login and Register

    To access pages that have been protected using the check_security function (see security for more info) the user must first login to view the protocted page. For example, the 'forums.asp' page will only be made availabe to users that are logged in with an accesslevel of 1. The 'login.asp' page is used to prompt the user for their 'user_name' and 'password'. There is also a prompt for the user's 'email' address on this page so that a user can retrieve their forgotten user_name and password via email. The 'register.asp' page is used to register new users, and store their information in the application's user database. Once the information has been submitted, the user is redirected to 'login.asp'

  • Inbox (min accesslevel=1)

    Personalization features are enabled via the 'user_profile.asp' page that acts as a "control panel" for the user to view and modify database content that has been associated with a user account (user_id field). This page requires the user to be logged in so that a 'user_id' value is available.

    From this page the user can view or edit (upd_user.asp) their profile. They can also see the following database content associated with their user_id.

Administration Pages


For consistency in page naming, the pages used for adminstration begin with 'admin_'. All of these pages can be used to add, edit, and delete data in the application database and require a user to be logged in with an accesslevel of 2 or greater. A users's access level is determined by the value of the accesslevel field in the Users table. The administrative pages used for User, Category management, and require a minimum access level of 3. For more information on security, see "Creating other user access levels / Modifying security"

All administrative features can be accessed via 'admin.asp'.
  • Category Management (min accesslevel=3)

    Category management is a one of the most important aspects of your site. All of the links and content in the site will fit into the hierarchy of categories (Root categories, sub categories, sub-sub categories, etc..)

    To add or edit categories, the 'admin_cats.asp' page is used. There is a form at the top of this page that is used to add or edit category information, and there is a table of the existing categories organized by root (parent or top categories) and sub-categories. You will see that each category has a corresponding category type. The category type enables you to have separate groups of categories. For example, there can be a set of categories used to organize the links and articles, another set for the knowledge base, and another distinct set for the downloads area

  • User Management (min accesslevel=3)

    - Adding users: Login to the admin area using the default admin account (usr: admin, pwd: admin). Goto user administration ('admin_users.asp'), comlete the add user form, and click the 'Add User' button. Specify access level of 1 for basic users. Specify access level of 2 (or greater) for site administrators and editors (see "Security" for more info). Users can also be added via the 'register.asp' page. This page is set to create basic users that will be added with an accesslevel of 1. User data is stored in the 'Users' table of the application database.

    - Logging in: 'login.asp' is used to prompt users for their username and password. When a user requests a security enabled page (check_security function) an permission level is obtained by referencing the current session 'user_id' and 'accesslevel' variables. If these session variables have not been set, the user is redirected to login.asp and prompted to login using their username and password credentials. The 'login.asp' also enables users to lookup a lost password. The user specifies their email address, and it is referenced in the 'Users' table. If a matching email address is found, the related password is emailed to the specified email address. As described above, there may be situations where no user_name or password exist, but an email address does. If a user attempts to lookup a password for an account with a non-existent user_name, they will be redirected to the registration form (register.asp).

    Once logged in, users can view and manage their own profile via 'user_profile.asp' and 'upd_user.asp'. The 'user_profile.asp' page also lets users view and compose internal messages, and view their favorite links and any content they have submitted.

  • Content/Article Management (min accesslevel=2)

    The application can be used to manage many different types of "content" including articles, FAQ's, downloadable files or other "bodies" that contain text, HTML, and other related files. Various types of "content" are defined using 'admin_contenttypes.asp'. Since there are different types of content, the database fields in the 'Content' table are flexible to accomodate all types of content, but you may find that all database fields are not used for any given content type.

    Content administration: 'admin_content.asp' is used to add, edit, and delete links in the Content table. Since there are different types of content (ContentTypes), not all of the fields are used for all types of content.

    User content submission: 'submit_content.asp can be used to allow accesslevel 2 users to submit content. This content will be added to the Content table, and marked with Display=0. An administrator can later log-in to 'admin_content.asp' and approve the articles for display by checking the "Display" checkbox.


Support and Customer Assistance

› To visit our support forum click here »



^ Top

Copyright ©2000-2002 Iatek, ASPapp.com