KnowledgeShare   v2.0


:: 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 also enables link and download (file) management so that you can offer resources and downloadable files in your knowledge base / support system. 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'
    :: WYSIWYG rich-text editor for article authoring
    :: Unlimited nested categories, define your own k-base hierarchy
    :: Support for popular SMTP E-Mail components (ASP Mail, ASP Email, JMail)
    :: Can be used with either Access or SQL Server database
    :: Customizable email confirmation messages
    :: Resources library provides complete links management (category browsing, suggest links, rate/rank)
    :: Complete user management tools (login, register, edit/delete, password lookup)
    :: Downloads/file library includes browser-based uploads and file management
    :: Display featured or "hot" articles
    :: Users can rate articles on usefulness
    :: Basic stats reporting of impressions and click-thrus
    :: 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

A limited, non-exclusive license and right to install and use one (1) copy of the program for your own use on one (1) website. You may not network the program or otherwise install it or use it on more than one computer at a time. The program is licensed, not sold. Your license confers no title or ownership in the program. For more information see, readme.asp

On-line Demonstration




^ Top

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")

^ Top

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 links and content (articles) in the 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 links and 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'

    The CategoryTypes table (admin_cattypes.asp) is used to create different groups of categories. You may want to have one set of categories for knowledge base articles, and a different set of categories for links

    By default, several CatTypes have been created and can be updated using the 'admin_cattypes.asp' page. To see how the CatTypes affect site hierarchy view 'cat.asp' in your browser. This page organizes each category by it's category type, and then display subordinate categroies, content, links, and classifieds. If you choose to modify the existing, or create new CategoryTypes, you may need to also modify the pages that are used for content display or submission. The Category selection list in these pages reference the corresponding CatType, so if you change the value of the CatTypeId in the database, you'll need to change the database SQL query that is used to create the category select list on the 'submit_' page. The SQL query is defined within the actual .asp code, so you'll need to edit the appropriate pages in a text or HTML editor. Database queries can be changed by modifying the SQL statement used to created the Category select lists in the 'submit_' page..

    ie; =get_options ("SELECT Cat... ...WHERE Cats.CatTypeId = Cattypes.CatTypeId AND Cats.CatTypeId = 9, CatId)

  2. Setting up email notification features:

    The site has the ability to send emails automatically when triggered by the following events:

    -- new user registration (register.asp)
    -- user password lookup (login.asp)
    -- bad link error reporting (links.asp)
    -- link approval (admin_links.asp)

    To activate email features you need to do the following:
    • edit application variables in 'global.asa'
      - application("smtp_server") - Specify the correct SMTP mail server.
      - application("email_component") - Specify the component installed on the Web server. Code provided for w3jmail, aspSmartMail, CDONTS and ASPMail email components. Other email components can be used by editing the 'i_smtp.asp' file accordingly.
      - set site_root, from_name, and from_address application variables
    • edit 'links.asp' -- specify the correct email address for link error reports
    • modify the variables as need in the send_confirmation sub of 'register.asp'
    • modify the variables as need in the send_confirmation sub of 'admin_links.asp'


  3. 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'.

^ Top


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.

    Links, LinkTypes, LinkRatings - These table are used to manage the links area. Links always have a related category (CatID). LinkTypes can be used as another means to classify links. For example, link types might be: "resource", "article", "news/press release", "personal site", "external link", "internal link", "download", etc.. The submitter of the link is identified by user_id.

    MessageRecipients, Messages - These tables are used to manage the internal messaging features. The submitter of the message is identified by Messages.user_id and the intended recipients are defined by 1 or more user_id's in MessageRecipients.

    Users - This table is used to manage all "registered" users and for login validation. The "user_id" field also relates the user to data stored in the 'Links', 'Content', 'MessageRecipients', 'Messages'. Using the "user_id" any data that is posted by or intended for any given user can be tracked.

    UserLinks - This table is used to track and manage a user's favorite links.

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

^ Top

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)


^ Top

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:
    • messages
    • sent messages
    • favorite links
    • submitted links
    • submitted content (requires minimum accesslevel of 2)


  • Links

    The links section (links.asp) drives the following features:
    • browse category hierarchy (main, sub, etc..)
    • view links for the provided category (cat_id must be made available)
    • list links with associated title, url, description, rating, and views (impressions)
    • related categories (Also see...) appear at footer


  • Internal Messaging (min accesslevel=1)

    The internal messaging features let users send messages to other users. 'user_profile.asp' and 'message.asp' are used to read messages, and 'compose_messages.asp' is used to compose messages.

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, and File management 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). To find out more about the user email notification features click here.

    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.

  • Link Management (min accesslevel=2)

    - Link administration: 'admin_links.asp' can be used to add, edit, and delete links in the Links table. When an administrator adds a link, and specifies the "Webmaster email address", a new user record for this email address will be created in the 'Users' table. This enables administrators to add new links, and invite the site webmaster (speficied by the Webmaster email) to log-in and update their links. To prioritize links you need to set a priority level using 'admin_links.asp'. A priority value of 3 is normal, and priority of 1 is high. When the links display on the 'links.asp' page they will be ordered by Priority, Average Rating (AvgRating), and then Title.

    - User link submission: 'submit.asp' can be used to allow user to submit links. These links will be added to the Links table, and marked with Display=0. An administrator can later log-in to 'admin_links.asp' and approve the links for display.

    - Links display: All links are organized by category and displayed via 'links.asp'. There are 2 special "action" parameters that can be passed to this page. 'links.asp?action=new' can be used to request all new links, and 'links.asp?action=hot' can be used to request the most frequently viewed (or popular) links. Each link that displays on this page will have a 'rate this resource' link that opens the 'pu_rate.asp' pop-up page. This page enables users to rate the linked web site on a scale from 1-10.

  • 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. For example, the 'Image' content type may not use the LongDesc (Content) field, but does require the user to upload a related file. Browser based file uploading and management tools are provided to accomodate content that has additional file assets.

    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. To upload and manage files related to your content, the 'pu_upload.asp' and 'pu_fileman.asp' pages are linked to from the insert/edit mode (Filename field) on 'admin_content.asp'. The files will enable accesslevel 2 users to upload files, and accesslevel 3 users can create and delete files or folders using 'pu_fileman.asp'. The link from 'admin_content.asp' to 'pu_fileman.asp' will only appear for accesslevel 3 users.

    To prioritize content you need to set a priority level using 'admin_content.asp'. A priority value of 3 is normal, and priority of 1 is high.

    User content submission: 'submit_content.asp can be used to allow user to submit any type of 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.

  • Downloads / File Library

    The file/document/download management features are enabled via 'downloads.asp', 'submit_download.asp' and 'admin_content.asp'. You can use these pages to make any types of files available for download. In the application database, a 'Downloads' category type ('admin_cattypes.asp') has been created so that you can define categories of downloads. These categories can be entirely different than the categories used in other sections of the portal (resources/links, articles, etc..).

    The 'admin_content.asp' page can be used to create the downloadable content and upload the related download file. Users can submit files using 'submit_download.asp'. This is a 2 step process where the user submits information about the file (Title, Author, Description), a record is then created in the Content table. Next, the user selects that actual file for upload. This browser upload feature ('i_fileupload.asp') doesn't work in some older Netscape and IE for the Mac browsers. The data related to each download is stored in the 'Content' database table, therefore 'admin_content.asp' can be used to administer files in the downloads area. By default, when a user submits a file, the 'display' field in the Content database table does not get set. In order for the download to be made available, an administrator must use 'admin_content.asp' to update the display field and "approve" the download. The actual files are stored in the '/library' folder when the file is uploaded via 'submit_download.asp'. When 'admin_content.asp' is used to delete a content record, the associated file (specified in the filename field) will be deleted from the Web server.

    After the downloadable content is created using 'submit_download.asp' or 'admin_content.asp', the content is accessible from users via the 'downloads.asp' page. The downloads page lists the downloadable content (contentypeid=7) by including category, title, author and the date the content was added to the database. Site visitors can click on the title field to get detailed information on the downloadable content including title, author, submission date, short description, alternate URL for downloading, and the number of times the file has been downloaded. To download the related file, the visitor clicks a link that passes the ContentId to the 'click_download.asp' page. The 'click_download.asp' page queries the Content database table to obtain the Filename and DownloadURL values for the given ContentId record. If a value exists in the Filename field, the user is redirected to the specified filename (which may include a filename, relative, or full file path). If no value is specified for Filename, the user will be redirected to the specified Web DownloadURL.

    Access to the download file can be controlled in 2 ways:
    1. open access -- any visitor can download any file.
    2. level-based access -- users that have a specified access level can download specified file(s).


    Open download access
    No special settings are required to enable this. By default, any download content will be made accessible to all users via the 'downloads.asp' page.

    Level-based download access
    To enable this use 'admin_content.asp' to add/edit the content record, and specify the minimum required access level (Required Access Level) that the user must have in order to download the file. When a user attempts to download the file via 'click_download.asp', their accesslevel is validated against the access level specified for the content record.

    For added security, enable random file copying
    Eventhough level-based and purchase-based access provide some security to the downloads area, it is still possible for users to guess file locations and names. To further prevent unauthorized file downloads, you can enable a random file copying. In this scenario, the source file is located in a folder that is not accessible to the Web browser. When the download is requested, the source file is renamed and copied to a Web accessible folder for the user to download. To enable this, a full file path must be specified for the 'Filename' field in the Content table. When adding or editing the downloadable content using 'admin_content.asp' specify a full local path for the download filename ie; "c:\downloads\sourcefile.zip". The local folder where the file is located should be inaccessible from the Web. The Web server's anonymous user account will need "read" permissions to this folder, but since the anonymous user account is a system account, the actual download file(s) will not be accessible from the Web browser. When an authorized user attempts to access the download file via 'click_download.asp', the file will be randomly renamed and copied to a temporary download folder that is accessible from the Web. This temporary download folder is specified by the 'temp_downloads' application variable defined in global.asa. The user is then able to download the renamed file from the temporary folder. Files in the temporary folder should be removed at regular intervals manually or via a scheduled task on the Web server. By renaming the file, it makes it difficult for unauthorized users to guess the temporary filename.

    When the download file is renamed the following format is used:
    randomnumber_sessionid_originalfilename

^ Top

Support and Customer Assistance

ASPapp.com support is staffed from Monday-Friday 8:30 AM to 6:00 PM United States EST. Any requests during this time should be directed to support@aspapp.com, otherwise information and assistance can be found in the support forums at ASPapp.com. Telephone support is not provided.



^ Top

©2003 NetFronts Inc.