Fundamental Specifications of RBBS Version 1

Copyright (C) 2003-2004 Mikio Hirabayashi
Last Update: Wed, 12 Jan 2005 01:58:13 +0900

Table of Contents

  1. Overview
  2. Installation
  3. Site Setting
  4. Usage
  5. Administration
  6. Frequently Asked Questions
  7. Copying

Overview

RBBS is a bulletin board system with Web interface. Users of RBBS can post new articles, and can attach responses to existing articles. As the principal purpose of RBBS is to be used as such communication system as BBS, it is useful for individual use and for one-to-many communication. The following are features of RBBS.

Accessibility
Articles is structured into chapters, paragraphs, and so on in the text with XML. The appearance of articles is defined with style sheet. Since document structure and presentation are separated, transmission of information corresponding to various needs in the Web environment is attained.
Floating Threads
When a response is attached to an article, the order of the article becomes the top of the page. Since articles to which responses are often attached are displayed in an exhibitionist manner, users can catch up popular topics easily. Moreover, because each response is only by one line, lighthearted communication like chat is taken.
Atom Syndication
In order for users to check new articles and responses easily, Atom feeds are delivered. Using a news reader supporting Atom, users can check some news site and RBBS at the same time.

RBBS is available on Linux, Solaris, HP-UX, FreeBSD, NetBSD, OpenBSD, Mac OS X, and Windows (Cygwin). Other UNIX systems are also. As RBBS is implemented with the C language, no environment for running a scripting language is needed. RBBS is a free software licensed under the GNU General Public License.


Installation

Preparation

To install RBBS from a source package, GCC of 2.8 or later version and `make' are required. As for Linux and BSDs, they must be already installed.

When an archive file of RBBS is extracted, change the current working directory to the generated directory and perform installation.

Installation

Run the configuration script.

./configure

Build programs. On Windows, perform `make win' instead of it.

make

Perform self-diagnostic test.

make check

Install programs. This operation must be carried out by the root user. On Windows, perform `make install-win' instead of it. You can install them into arbitrary places by yourself according to the after-mentioned steps.

make install

Result

When a series of work finishes, the following files will be installed.

/usr/local/bin/rbbsutil
/usr/local/libexec/rbbs.cgi
/usr/local/share/rbbs/rbbs.dtd
/usr/local/share/rbbs/rbbs.conf
/usr/local/share/rbbs/rbbsstyle.css
/usr/local/share/rbbs/rbbshelp.xml
/usr/local/share/rbbs/rbbshelp-ja.xml
/usr/local/share/rbbs/styles/...

Site Setting

Copying Files

Since RBBS works as a CGI script, it is necessary to set up a Web server so that CGI can be used. For example, with Apache, the following setup is performed in `httpd.conf' or `.htaccess'.

Options +ExecCGI
AddHandler cgi-script .cgi

Moreover, copy `rbbs.cgi', `rbbs.conf', `rbbsstyle.css', and `rbbshelp.xml' into a directory where CGI is available. For example, if files of RBBS was installed and RBBS is published in `/home/mikio/public_html/rbbs', perform the following steps.

cd /home/mikio/public_html/rbbs
cp -Rf /usr/local/libexec/rbbs.cgi .
cp -Rf /usr/local/share/rbbs/rbbs.conf .
cp -Rf /usr/local/share/rbbs/rbbsstyle.css .
cp -Rf /usr/local/share/rbbs/rbbshelp.xml .

Customization of the Configuration File

`rbbs.conf' installed in the above-mentioned procedure is the configuration file. Edit it by an arbitrary editor. Each line of the configuration file begins with the name of an attribute tailed with `:'. The value of each attribute is placed after `:'. The encoding of the configuration file should UTF-8. Principal attributes are the following.

systemuri: http://localhost/rbbs/rbbs.cgi
dbname: casket
helpfile: rbbshelp.xml
stylefile: rbbsstyle.css
logfile:
jetlag: 1440
pagelang: en
pagetitle: Raving Bulletin Board System
pageauthor: mikio
pagesummary: A book of quotations can never be complete.
norobot: false
captionfile:
homepageuri: ../
adminpass: qwerqwer
writepass:
httpauth: false
postauth: false
artflags:
resflags:
languages: en,ja,ko,zh,de,fr,it,es,ru,ar
categories: rave,agenda,suggestion,question,answer,confession,joke
defsubject:
defauthor:
sort: mdd
listnum: 32
shownum: 8
feednum: 32
blknum: 4
resnum: -16
filenum: 64

`systemuri' specifies the URI (URL) of the installed CGI script. At least, the value of the attribute should be changed for your site. Conversely, the other attributes do not have to be modified. `dbname' specifies the name of the directory to contain data of articles. The value should be a relative path from `rbbs.cgi' or the absolute path. Correspondingly, `helpfile' and `stylefile' specify the paths of the XML file for help information and the CSS file for styling. `logfile' specifies the path of the log file. `jetlag' specifies the jet lag of the local time zone. If it is equal to or more than 1440, it is calculated according to the date of the system. `pagelang', `pagetitle', `pageauthor', and `pagesummary' specify the language, the title, the author, and the summary, of the shown page. `norobot' specifies whether robots are to be rejected. `captionfile' specifies a file which contains pieces of HTML, shown instead of the page caption. `homepageuri' specifies the URI of the home page. `adminpass' specifies the password of the administrator. If the value is empty, all users can administrate the site. `writepass' specifies the password of writers. If the value is empty, all users can post new articles. `httpauth' specifies whether user name is coherent with assignment of the basic authentication of HTTP. If it is `true', coherence comes. `postauth' specifies whether to authorize administration of each article to the author. If it is `true', authorization comes. `artflags' specifies the default flags of articles. `resflags' specifies the default flags of responses. `languages' and `categories' specify the languages and the categories which are selected when an article is posted. They are composed of comma separated values. `defsubject' specifies the subject by default. `defauthor' specifies the name of the author by default. `sort' specifies the order of shown articles. The value should be one of `cda' (ascending order of creation date), `cdd' (descending order of creation date), `mda' (ascending order of modification date), and `mdd' (descending order of modification date). `listnum' specifies the number of articles shown in the newcome list. `shownum' specifies the number of articles shown in a page. `feednum' specifies the number of articles shown in a Atom feed. `blknum' specifies the number of displayed blocks when articles are shown with abbreviated. `resnum' specifies the number of shown responses. If the value is 0, all responses are shown. If the value is positive, beginning responses are shown. If the value is negative, ending responses are shown. `filenum' specifies the number of show files.

Although the configuration file is put on the same directory as a CGI script, since the password is described there, it must not be public. Therefore, it is necessary to set up the Web server so that the configuration file may not be exhibited. For example, with Apache, the following setup is performed in `httpd.conf' or `.htaccess'.

<Files ~ "\.conf$">
    Order allow,deny
    Deny from all
</Files>

It is necessary for the data directory specified by the configuration file is writable by the execution user of the CGI script. For example, the following commands are performed for it. You may make the effective user of the CGI script the same as the owner of the data directory.

cd /home/mikio/public_html/rbbs
mkdir casket
chmod 777 casket

Usage

Browsing Articles

You can use RBBS by accessing `rbbs.cgi' installed in your site. You see the list of newcome articles from above of the page. That is, titles of newcome articles are shown in the order of creation (or modification) date. If you select a title, you see the content of the article.

Navigation links are placed below the newcome list. They have the following functions.

Texts of newcome articles are shown below the navigation links. Some navigation links are placed also in the shoulder of each article. They have the following functions.

Posting an Article

In order to post a new article, select `POST' of the navigation links. Whereat, you move to the page to input the content of the article. As well, the password for writers is asked if the administrator have set the password to the site.

Next, input `Language', `Category', `Subject', `Author', and `Text'. In some cases, input `Password' for administration. When inputting finishes , select `SUBMIT'.

Then, you move to the page to confirm the view of the article. `Source' specifies XML expression of the article. If you confirm it, select `SUBMIT' and the article is posted.

Each line in the body text is treated as a paragraph. However, if a line begins with `!', the line is treated as a topic. If a line begins with `!!', the line is treated as a subtopic. If a line begins with `*', the line is treated as a list item. If a line begins with `|', the line is treated as a pre-formatted text. It is possible to modify a part of a line. If a line begins with `@graph:', the line is treated as a URL and it shows a graphic of the URL. If a line is `----', a ruled line is drawn. `[[^foo]]' makes `foo' an emphasized phrase. `[[~foo]]' makes `foo' a cited phrase. `[[+foo]]' makes `foo' an inserted phrase. `[[-foo]]' makes `foo' a deleted phrase. `[[foo|bar]]' makes `foo' a hyper link to `bar'. The following is an example.

!My Gourmet
I'm universally recognized as [[^a gourmet]].
If I pick up three of my favorite menus, I say the follwing.
*hashed rice : the decisive factor is rich beef
*pizza toast : accented [[-celery]][[+bell pepper]] is greatest
*broiled pig innards : take it with distilled spirit
!Logo of RBBS
I have made it.
@graph:http://rbbs.sourceforge.jp/logo.png
----
!Hello World
Here is the simplest program in C language.
!!sample
This code can be compiled with [[GCC|http://gcc.gnu.org/]].
|int main(int argc, char **argv){
|  printf("Hello, World\n");
|  return 0;
|}

The body text of an article can be structured with XML. If the text begins with `<', the text is treated as XML. The following blocks can appear in the body text of XML.

There can be the following modifications in the content of each block element and `item' element.

An example of the XML text is shown below.

<topic>Breakfast</topic>
<para>Today's breakfast was ham and egg.  It was yummy.</para>
<list>
<item>ham and egg = 340 kcal.</item>
<item>croissant = 280 kcal.</item>
<item>coffee = 0 kcal.</item>
</list>
<topic>Lunch</topic>
<para>Today's lunch was <del>none</del><ins>Snickers</ins>.</para>
<topic>Dinner</topic>
<para>I had grilled beef at the dinner table.
<emp>Rib steak</emp> is the greatest.</para>
<topic>Today's Discovery</topic>
<para>I found <link to="http://qdbm.sourceforge.net/">QDBM</link>.
It's logo is not the greatest.</para>
<graph data="http://qdbm.sourceforge.net/logo.png"/>
<para><cite>Happiness is a perfume...</cite> -- Emerson</para>
<break/>
<topic>Today's Hello, World</topic>
<asis>#include &lt;stdio.h&gt;

int main(int argc, char **argv){
  printf("Hello, World\n");
  return 0;
}
</asis>

Posting a Response

In order to attach a response to an article, select the `RESP' link. Whereat, the input form to write a response is shown. The left field is to specify the name of the author. The right field is to specify the body text. After inputting them, select `SUBMIT'. The article to which a new response have been attached is regarded as modified and its shown order become the top.

The body text of a response should be plain text and can not contain any line feed. If the body is empty but `SUBMIT' is selected, no response is written but the page is refreshed. If the name of the author begins with `sink:', the modification date of the article is not changed.

Atom Syndication

RBBS supports syndication of Atom 0.3. The two kinds of feed is available. The feed at the main navigation is for newcome articles. The feed at each article is for the article only.


Administration

Editing an article

When you select the `EDIT' link of each article, the password is asked and you move to the page to edit the article. Each article is expressed with XML. The root element is `article', whose contents are `head', `body' and `tail'. Refer to `rbbs.dtd' for the entire definition of the XML for articles. The character encoding of an article must be UTF-8.

The `head' element contains the following elements. All elements are necessary and the order is not variable.

The body element expresses the text of the article. Refer to the description of the `Posting a Response' section.

The tail element expresses responses. It contains 0 or more `response' elements. Each contain the body text of a response. The attributes of `response' element are the following. All attributes are necessary.

When you have finished inputting, select the `SUBMIT' link and move to the confirmation page. And, select `SUBMIT' again then the edit is reflected. Though the modification date of the article is changed usually, the date specified by XML is adopted if the check box of `Update Time Stamp' is off.

Deleting an Article

An article is deleted if the XML is empty when editing.

The Utility Command

`rbbsutil' is provided as a command to administration on the machine of the Web server. This command is composed of sub commands for some purposes. The name of a sub command is specified by the second argument. The format is the following format.

rbbsutil import [-mod id] name [file]
Import an article specified by `file' to a database specified by `name'. If `-mod' is specified, an existing article specified by the ID is updated.
rbbsutil export [-ft] [-fh] [-fa] name id
Export the XML data of an article specified by `id' from a database specified by `name'. If `-ft' is specified, plain text is output instead of the original XML. If `-fh' is specified, HTML is output instead of the original XML. If `-fa' is specified, Atom is output instead of the original XML.
rbbsutil delete name id
Delete an article specified by `id' of a database specified by `name'.
rbbsutil list [-scd] [-sma] [-smd] name
Output the list of IDs of all articles in a database specified by `name'. The order is ascending of creation date. If `-scd' is specified, the order is decending of creation date. If `-mca' is specified, the order is ascending of modification date. If `-mcd' is specified, the order is decending of modification date.
rbbsutil dump [-ft] [-fh] [-fa] name
Dump data of all articles in a database specified by `name'. If `-ft' is specified, plain text is output instead of the original XML. If `-fh' is specified, HTML is output instead of the original XML. If `-fa' is specified, Atom is output instead of the original XML.
rbbsutil savefile [-mod id] [-pw str] [-sj str] [-at str] [-cd str] name [file]
Save a file specified by `file' to a database specified by `name'. If `-mod' is specified, an existing file specified by the ID is updated. The options `-pw', `-sj', `-at', and `-cd' specifies attributes password, subject, author, and creation date.
rbbsutil loadfile [-al] name id
Load the content of a file specified by `id' from a database specified by `name'. If `-al' is specified, the attributes is output instead of the content.
rbbsutil deletefile name id
Delete a file specified by `id' of a database specified by `name'.
rbbsutil listfile name
Output the list of IDs of all files in a database specified by `name'.
rbbsutil optimize name
Optimize a database specified by `name'.
rbbsutil initialize name
Initialize a database specified by `name'.
rbbsutil password key [code]
If only `key' is specified, its cryptgraph is output. If `key' and `code' are specified, whether `key' matches `code' is checked.

`rbbsutil export' and `rbbsutil export' read the following environment variables.

Others

Besides the above, RBBS provides the following management functions.

If you are not fond of clear text passwords in the configuration file, you can use DES cryptgraphs created with `rbbsutil password' instead of them. Then, add the prefix `crypt:' to cryptgraphs.

adminpass: crypt:Qu57sOeCZArQA

If you want to forbid response to new articles, set the value of `artflags' in the configuration file to include `l'. If you want to forbid floating of articles to which a response attached, set the value of `resflags' in the configuration file to include `s'.


Frequently Asked Questions

Q. : Does RBBS concern Radio BBS?
Q. : No. It doesn't at all.
A. : There is no remarkable point. But, RBBS is my favorite.
Q. : Do you plan to support RSS 1.0?
A. : No, I don't. I prefer Atom.
Q. : Can I structure a response with XML?
A. : No, you can't. Simple is best.
Q. : Isn't it improbable for the database to be broken?
A. : It is vanishingly improbable. But, if you warry, back it up.

Copying

RBBS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2.1 of the License or any later version.

RBBS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with RBBS (See the file `COPYING'); if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

RBBS was written by Mikio Hirabayashi. You can contact the author by e-mail to `mikio@users.sourceforge.net'.