FAQ System

part of the ArsDigita Community System by David Hill

The Big Picture

Many sites have a page or series of pages to answer Frequently Asked Questions (FAQ). We want a simple interface for creating and maintaining FAQs in which the work of FAQ maintainance may be shared by specific people. A given FAQ can be either puplic and viewed by everyone or restricted so that only members of a given group may see the FAQ.

This kind of system is inherently different from the BBoard system in that there are two distinct types of users - those that can only read the FAQ and those who may contribute questions and answers.

The Medium-Sized Picture

This system consists of only two simple tables. And for FAQ maintainance the new group and scoping system is used.

The properties of a FAQ are held in the faqs table: These properties are the name of the faq and who can see the FAQ.

create table faqs (
	faq_id		integer primary key,
	-- name of the FAQ.
	faq_name	varchar(250) not null,
	-- group the viewing may be restriced to 
	group_id	integer references user_groups,
	-- permissions can be expanded to be more complex later
        scope		varchar(20),
        -- insure consistant state 
       	constraint faq_scope_check check ((scope='group' and group_id is not null) 
                                          or (scope='public'))
);

The body of a FAQ (questions and answers) are held in the faq_q_and_a table.

create table faq_q_and_a (
	entry_id	integer primary key,
	-- which FAQ
	faq_id		integer references faqs not null,
	question	varchar(4000) not null,
	answer		varchar(4000) not null,
        -- determines the order of questions in a FAQ
	sort_key	integer not null
);

Legal Transactions

From the Site Administration pages at /admin/faq the site-wide administrator can

From the Maintainers admin pages at /faq/admin or /groups/admin/**X**/faq/ the FAQ maintainers can

Acceptance Test

Future Improvements


dh@arsdigita.com