open (FILE, "$discus_conf") || die "CANNOT OPEN: $discus_conf\n";
@file = <FILE>;
close (FILE);
$evals = "";
foreach $line (@file) {
	if ($line =~ /^(\w+)=(.*)/) {
		$varname = $1;
		$value = $2;
		$value =~ s/'/\\'/g;
		$evals .= "\$$varname='$value'; ";
	}
}
eval($evals);
$titlej = $title;
$titlej =~ s/['"<>]//g;
$allow_anon = 1;
$require_postid = 1;
$big_title = 1;

$script_dir__ = $script_dir;
$admin_dir = $admin_dir_;
$html_dir = $html_dir_;
$script_dir = $script_dir_;

$url_to_default_image = "$html_url/clipart/your_image.gif";
$message_dir = "$html_dir/messages";
$message_url = "$html_url/messages";
$cgiurl = "$script_url/board-admin.$cgi_extension";
$cgiurlm = "$script_url/board-admin-menuonly.$cgi_extension";

require "$admin_dir/source/src-board-subs-common";

undef &error_message;

eval 'sub error_message { ($where, $why) = @_; print "The following error is nonserious:\n  $where ($why)\n"; die "\n"; }';

$new_messages_go = 1;
$new_subtopics_go = 1;

&ex('add_group', $superuser, "public");
&ex('add_group', $superuser, "system");
($num1) = &ex('add_topic', "Welcome to this discussion board","system");
($num2) = &ex('add_topic', "Testing Area","public");
&ex('change_layout', $num2, $num2, "SublistAbout");

$message = '\center{\topurl{http://www.chem.hope.edu/discus,Powered by Discus}}';

($message2) = &ex('webtags', $message);
&ex('change_main_message', $message2, $message);

&extract("//$num1/$num1.$ext");
($page1) = &ex('add_page', "Welcome to your discussion board!","MessagesAdd","","Main");

&extract("//$num1/$page1.$ext");
$message_hold = "Welcome to \\b{$title}!  We sincerely thank you for installing the Discus program and we hope that everything works well for you.";
($message) = &ex('webtags', $message_hold);
$postby = "<A HREF=\"mailto:discus\@mulliken.chem.hope.edu\">Discus Creators</A>";
&ex('post_message', $topic_number,$me_number,$message_hold,$message,$postby,$superuser);

$message_hold = 'With this discussion board, you can set up the board so that user accounts are required to post messages.  Right now, this \i{topic} is set up to require a user or a moderator account to post a message.  The Testing Area is set up as a \i{public} topic, so anyone can post a message there.  Posting instructions are located at the bottom of each page.';
($message) = &ex('webtags', $message_hold);
$postby = "<A HREF=\"mailto:discus\@mulliken.chem.hope.edu\">Discus Creators</A>";
&ex('post_message', $topic_number,$me_number,$message_hold,$message,$postby,$superuser);

$message_hold = 'Notice that all messages are on the same page with this application.  This allows the discussion to flow naturally.  If the pages get too long, you can use the administrative tools to delete old messages or to move old messages to other locations.';
($message) = &ex('webtags', $message_hold);
$postby = "<A HREF=\"mailto:discus\@mulliken.chem.hope.edu\">Discus Creators</A>";
&ex('post_message', $topic_number,$me_number,$message_hold,$message,$postby,$superuser);

&extract("//$num1/$num1.$ext");
($page1) = &ex('add_page', "Formatting and graphics capabilities","MessagesAdd","","Main");

&extract("//$num1/$page1.$ext");
$message_hold = 'It is possible to use formatting in your messages, such as \b{bold}, \i{italics}, \green{c}\red{o}\orange{l}\purple{o}\white{r}\blue{s}, clipart (\clipart{smile}), and even to upload tables and images.  This is covered in the "Formatting" document, available from the main menu.';
($message) = &ex('webtags', $message_hold);
$postby = "<A HREF=\"mailto:discus\@mulliken.chem.hope.edu\">Discus Creators</A>";
&ex('post_message', $topic_number,$me_number,$message_hold,$message,$postby,$superuser);

$message_hold = 'You cannot use <B>Direct HTML Input</B>.  If you do, it turns out like this message.';
($message) = &ex('webtags', $message_hold);
$postby = "<A HREF=\"mailto:discus\@mulliken.chem.hope.edu\">Discus Creators</A>";
&ex('post_message', $topic_number,$me_number,$message_hold,$message,$postby,$superuser);

$message_hold = 'Here is a short tutorial of things to try in the "Add a Message" box below (or in any other "Add a Message" box):
\list{\\b\{Bold Text\}
\\green\{Green Text\}
\\topurl\{http://www.chem.hope.edu/discus,\\i\{Discus Home Page\}\}}';
($message) = &ex('webtags', $message_hold);
$postby = "<A HREF=\"mailto:discus\@mulliken.chem.hope.edu\">Discus Creators</A>";
&ex('post_message', $topic_number,$me_number,$message_hold,$message,$postby,$superuser);

&extract("//$num1/$num1.$ext");
($page1) = &ex('add_page', "Additional exciting information","SublistAbout","","Main");
&extract("//$num1/$page1.$ext");
($page2) = &ex('add_page', "Discus Home Page","LINK","http://www.chem.hope.edu/discus","_top");
&extract("//$num1/$page1.$ext");
($page2) = &ex('add_page', "Examples of different page configurations","SublistAbout","","Main");
&extract("//$num1/$page2.$ext");
$file = "$message_dir/$topic_number/$me_number.$ext";
$message_hold = 'There are 32 different ways you can set up a page using five "discussion elements".  A "List of Subtopics" is like you see on this page -- they add additional levels to your discussion.  A "Create New Conversation" button allows users to initiate new conversations (start a new discussion thread).  You are currently reading an "About Message."  "Messages" are notes that are posted by users or moderators (they have the identity of the person posting the message and a time/date stamp).  An "Add a Message" form allows users to add messages to a page.  In addition, you can create links to other WWW documents.';
($message) = &ex('webtags', $message_hold);
&ex('change_about_message', $file, $message_hold, $message);
($page3) = &ex('add_page', "Private Index","SublistAbout","","Main");
&extract("//$num1/$page3.$ext");
$file = "$message_dir/$topic_number/$me_number.$ext";
$message_hold = 'This is a "private index" -- it has only a list of subtopics.  (However, an \i{About Message} like this is not on a "normal" private index.)  Only moderators can add new subtopics to a private index.';
($message) = &ex('webtags', $message_hold);
&ex('change_about_message', $file, $message_hold, $message);
($page4) = &ex('add_page', "Intel computers","MessagesAdd","","Main");
($page4) = &ex('add_page', "Macintosh computers","MessagesAdd","","Main");
&extract("//$num1/$page2.$ext");
($page3) = &ex('add_page', "Public Index","SublistCreateAbout","","Main");
&extract("//$num1/$page3.$ext");
$file = "$message_dir/$topic_number/$me_number.$ext";
$message_hold = 'This is a "public index" -- it has a list of subtopics but it also gives users the ability to initiate a new conversation.  (However, an \i{About Message} like this is not on a "normal" public index.)  Try initiating a new conversation by clicking on the button above!';
($message) = &ex('webtags', $message_hold);
&ex('change_about_message', $file, $message_hold, $message);
($page4) = &ex('add_page', "Unix servers","MessagesAdd","","Main");
($page4) = &ex('add_page', "Windows 95 servers","MessagesAdd","","Main");
&extract("//$num1/$page2.$ext");
($page3) = &ex('add_page', "Message Page","AboutMessagesAdd","","Main");
&extract("//$num1/$page3.$ext");
$file = "$message_dir/$topic_number/$me_number.$ext";
$message_hold = 'This is a "message page" -- it has messages that users have posted and a form for users to add a new message.  (However, an \i{About Message} like this is not on a "normal" message page.)  Once you have changed your password using the administration program, you can add a message here.';
($message) = &ex('webtags', $message_hold);
&ex('change_about_message', $file, $message_hold, $message);
&extract("//$num1/$page2.$ext");
($page3) = &ex('add_page', "What NOT to do","SublistCreateAboutMessagesAdd","","Main");
($page3) = &ex('add_page', "Why not to do it","About","","Main");
&extract("//$num1/$page3.$ext");
$file = "$message_dir/$topic_number/$me_number.$ext";
$message_hold = 'This refers to the "What NOT to do" page.  Some moderators, when setting up the page layout using the administration program, select all five discussion elements (list of subtopics, create new conversation button, about message, messages, and add a message form).  Then they don\'t specify the "About Message" or add any subtopics.  This causes there to be "blank" areas on the screen, although there are still lines to separate the elements, making the page look very ugly.  If you activate an "About Message" be sure to enter one from the administration program! \clipart{smile}';
($message) = &ex('webtags', $message_hold);
&ex('change_about_message', $file, $message_hold, $message);

&extract("//$num1/$page1.$ext");
$file = "$message_dir/$topic_number/$me_number.$ext";
&ex('change_about_message', $file, "You can also use \\i{About Messages} (like this one) which allow you to describe the content of the page.  You can set up these about messages using the administration program.", "You can also use <I>About Messages</I> (like this one) which allow you to describe the content of the page.  You can set up these about messages using the administration program.");

&extract("//$num1/$page1.$ext");
($page2) = &ex('add_page', "Getting Started -- What to do next.","MessagesAdd","","Main");

$message_hold = 'Your next step is to log into the administration program and to change the superuser password.  Then you can start playing around with the administrative tools, post some messages, or whatever...

To log into the administration program, click on \b{Administration} from the left menu.  Enter the superuser username in the \b{Username} blank and leave the \b{Password} blank empty.  You will be prompted to change your password and then to register your Discus board.  Once the password has been set and the board has been registered, you can log in again and access the full range of options.

The \link{http://www.chem.hope.edu/discus/rc,Discus Resource Center} contains helpful information, including a "Getting Started" tutorial.  We encourage you to visit the resource center for our helpful tips.';
($message) = &ex('webtags', $message_hold);
&extract("//$num1/$page2.$ext");

$postby = "<A HREF=\"mailto:discus\@mulliken.chem.hope.edu\">Discus Creators</A>";
&ex('post_message', $topic_number,$me_number,$message_hold,$message,$postby,$superuser);

&extract("//$num2/$num2.$ext");
($page1) = &ex('add_page', "The weather","MessagesAdd","","Main");
($page1) = &ex('add_page', "Good restaurants","SublistCreate","","Main");
($page1) = &ex('add_page', "Good discussion board programs","Sublist","","Main");
&extract("//$num2/$num2.$ext");
$file = "$message_dir/$num2/$num2.$ext";
&ex('change_about_message', $file, "This area is for initial testing of the board.  Soon, you will probably want to delete this topic from within the administration program and set up some topics of your own!  For now, feel free to post test messages in this area.", "This area is for initial testing of the board.  Soon, you will probably want to delete this topic from within the administration program and set up some topics of your own!  For now, feel free to post test messages in this area.");

&extract("//$num2/$page1.$ext");
($page2) = &ex('add_page', "Discus","LINK","http://mulliken.chem.hope.edu/discus","_top");

&extract("//$num2/$num2.$ext");
($page1) = &ex('add_page', "Other random testing","SublistCreateMessagesAdd","","Main");

&ex('special_user', "public", "PUBLIC", "on");

&ex('change_board_colors', "ffffff", "000000", "0000ff", "800080", "ff0000", "Verdana,Arial,Helvetica", "2", "$bgimage");
1;
