CSM 570:  TOPIC 4:  Collaboration and Management
DISCUSSION FORUM


WWWBoard from  Matt's Script Archive

1.0  Make a directory named wwwboard in your public_html directory.

1.1  FOR THIS ASSIGNMENT, download to your computer wwwboard.zip
         and unzip it.

The following files should have come with WWWBoard Version 2.0 ALPHA 2:

1. ALPHA-2 - READ THIS.
2. README
3. wwwboard.pl
4. wwwboard.html
5. faq.html
6. data.txt
7. messages/
8. wwwadmin.pl
9. passwd.txt
10. ADMIN_README

You will edit several of the files that come with WWWBoard Version 2.0 to customize it for your own purposes.  Later in this tutorial will be a description of how to edit all of the necessary files:

2.0 wwwboard.pl

This is the most complicated file you will need to edit. You can use Notepad to edit/make the necessary modifications to this file.  

Open Notepad by clicking on Stat, Programs, Accessaries, and then notepad. Then, locate and open the wwwboard.pl file.  

This file comes with a lot of variables and many options such as:  . Below is a summary of how to edit/configure all of the variables and what the options do:




   2 .1 Variables

   $basedir = "/path/to/wwwboard";

In this variable, you are putting in the directory path to your wwwboard.


Using Notepad, you will make the change to the correct $basedir for your discussion board,      For Example:  


         $basedir =  "/st3/account/public_html/wwwboard"

Account means your bama account name, e.g., smith014

In this tutorial wwwboard is used as the directory to upload the discussion board, but you could use forum, discussion, familyplace, etc.


** REMEMBER this base directory path as you will need to know it several times while setting up this Discussion Forum.

This variable should contain the absolute system path to your wwwboard directory.

Continue making the appropriate modifications for your specific server, see below:


 $baseurl = "http://your.host.xxx/wwwboard";


Example:  $baseurl = " http://bama.ua.edu/~account/wwwboard"

This is the base URL to the directory where wwwboard is kept.



 $cgi_url = "http://your.host.xxx/cgi-bin/wwwboard.pl";

Example:  $cgi_url =  "http://bama.ua.edu/cgi-bin/cgiwrap/~account/script_name
** In this tutorial, we will use the script name that GDIDBPro creates which is:  wwwboard.pl  **

This is the URL that points to wwwboard.pl file in the cgi-bin directory. This file will be used to store the followup responses from users, so this must be correct.



2.2 The following describes what each of the variables do in the wwwboard program.

 $ddatafile = "data.txt";

This is the name of the data file which will also be appended to $basedir (in this assignment the $basedir is wwwboard). It will hold the current filename count, and the script will read this in and determine the message filename from this file.



 $mesgfile = "wwwboard.html";

This is the name of the wwwboard.html file, which you will want to rename (later in this tutorial)  to index.html for the sake of a shorter URL. Because will be renamed to index.html, this means the discussion page will automatically show up when you go to it's URL, such as:  http://bama.ua.edu/~jones014/wwwboard.



$faqfile = "faq.html";

This is the path to the faq.html file which will be appended to $baseurl (in this assignment the $baseurl is wwwboard) so users can find their way to the Frequently Asked Questions file about WWWBoard.


  $ext = "html";

This is the ext (extension) with which all individual files will be created. . This should be left as html.



 $date_command = "/bin/date";

This needs to be the path to your 'date' command. ** Typically, no changes need to be made.**  This script uses the date command to time stamp the messages individually with along date and to place a short 'added' date on the wwwboard.html page.



 $title = "WWWBoard Version 2.0 Test";

This is the title of your WWWBoard, which will be used on the individual message pages. Rename your title to reflect the topic/class, etc., of your discussion board/forum, example:  ChangeWWWBoard Version 2.0 Test to "Class Discussions" or "HES 580 Forum".

  3.0  Options  

In the wwwboard.pl script, look at the options below as you can change them.  I typically want to show the faq, so I leave this variable set to 1 as discussed below.  I typically use the defaults that are set when I download  the program, but read the descriptions below and see if you want/need to change any of the variables.

   $show_faq = 1;

This option allows you to choose whether or not you want to display a link to the FAQ on every individual message page or not. It defaults to 1 and the link will be put in at the top of the message along with links to Followups, Post Followup and Back to $title. Setting this to 0 will turn it off, and keeping it at 1 will keep the link.



 $allow_html = 1;

This option lets you choose whether or not you want to allow HTML mark-up in your posts. If you do not want to allow it, then everything that a user submits that has <>'s around it will be cut out of the message. Setting this option to '1' will allow HTML in the posts and you can turn this option off by setting it to '0'.



 $quote_text = 1;

By keeping this option set to 1, the previous message will be quoted in the followup text input box. The quoted text will have a ':' placed in front of it so you can distinguish what had been said in the previous posts from what the current poster is trying to get across. Setting this option to '0' will leave the followup text box empty for the new poster.



  $subject_line = 0;

There are three options for the way that you can display the subject line for the user posting a followup. Leaving this option at '0' which is the default value, will put the previous subject line into the followup form and allow users to edit the subject however they like. Setting this option to '1', however, will quote the subject, but simply display it to the user, not allowing him or her to edit the subject line. The third and final option can be achieved by setting the $subject_line variable to '2'. If it is set to '2' the subject will not be quoted and instead the user will be prompted with an empty subject block in their followup subject line.



  $use_time = 1;

This option allows you to choose whether or not you want to use the hour:minute:second time with the day/month/year time on the main page. Day/Month/Year will automatically be placed on the main wwwboard.html page when a new entry is added, but if you leave this variable at '1' the hour:minute:second time will also be put there. This is very useful for message boards that get a lot of posts, but if you would like to save space on your main page, you can set this to '0' causing the hour:minute:second display not to be added.

  This wwwboard.pl  file, now that you have made the necessary modifiations,  must be placed in your server's cgi-bin directory .  If your server has .cgi extensions rather than .pl extension, you can simply rename this file to wwwboard.cgi.  Remember, you must edit/change  the $cgi_url variable below to reflect this new file extension.

The file must also be chmoded 755
.
 Remember, using your FTP program, WSFTP_LE, yo can right click the file neame and select CHMOD/UNIX to make the necessary rights changes.  Ask your system administrator for more information on either the cgi-bin or chmod command, if necessary.
 3.0  wwwboard.html

wwwboard.html must be placed in the directory that you defined in $basedir (in this assignment, it's wwwboard) of your wwwboard.pl file. It must be chmoded 777 so that your web server's uid (User ID) has permission to write to this file.  **Remember, later in this tutorial we'll rename this file to index.html.**

This file needs much less editing than the wwwboard.pl script. There are three things that you will want to edit in this file. The first two are simply the title of your WWWBoard. Currently the two lines look like:

    <title>WWWBoard Version 2.0!</title>
    <h1>WWWBoard Version 2.0!</h1>

You will want to change the title and header "WWWBoard Version 2.0!" to whatever you want to call your WWWBoard, example CSM 570 Discussion Forum, etc.  This should probably be the same as the variable $title that you defined in wwwboard.pl.

The third line in this file that you will need to edit is the one that looks like:

 <form method=POST  action="http:bama.ua.edu/cgi-bin/cgiwrap/~account/wwwboard.pl">

You need to change the URL that is in action="" to the same URL that you defined in wwwboard.pl as $cgi_url.

Once you have made these changes you can SAVE THIS FILE AS index.html and exit this file.



faq.html
This file does not need to be edited, unless you want to change the heading or title or add a link back to your wwwboard page.

It should be placed in the $basedir (wwwboard) directory and its name should reflect that of the $faq_file variable defined in wwwboard.pl

It should be chmoded 744, so that it is readable by all.

messages/
This is a directory that should also be placed in $basedir (wwwboard)  as defined in wwwboard.pl. This directory must be chmoded 777 so that messages can be written into it by the server's UID.

data.txt
Simply place this file into $basedir (wwwboard) as defined in wwwboard.pl and chmod it 777 so that the web server can write an incremented number to it. This is where the file name number will be kept.

You should now be ready to use your Discussion Forum.

4.0 Administration of the WWWBoard

 When you downloaded and unzipped wwwboard.zip, it created an ADMIN.README file.  Using IE or Netscape, open this file and read it.  

It will tell you what URL to use to administer your Discussion Forum, such as  what the default user name and password is, how to change this default password, how to remove messages by:  date, author, and by thread.