How to get more out of Akiva's WebBoard version 4.x, 5.x, and 6.x with Rog's Logoff Button Patch (version 2.0)

This describes freeware that I wrote which allows any virtual board manager (or WebBoard administrator) to improve the functionality of the "logoff" button.

Note that this is version 2.0, which corrects a number of weaknesses in the previous release.


Let's review the following: WebBoard users log in under two possible "authentication" modes.  Under basic authentication, a grey pop-up box is used to log in: this box is under the control of the user's browser, and the user may save his or her password by using a checkbox on the pop-up.  The browser passes the login name and password to the server in encrypted form, thus preventing hackers from "intercepting" web packets.  Under cookie authentication, users log in through a normal browser window, and a cookie is used to declare their login status.  The login name and password are passed to the server without encryption, and if the user chooses to save their password, this value is saved on the user's computer as an unencrypted cookie.  Under WebBoard 4, the logoff button only clears performs any necessary "marking read" updating, and sends the user to the logoff URL.  For WebBoard 5 and 6, the user is sent to a page that explains some, but not all of the consequences of logging off under basic authentication, and which gives the user the chance to clear his or her cookies under cookie authentication.  The information on this page doesn't appear to vary, regardless of whether the user has actually saved his or her password under cookie authentication, and/or visited one or both types of boards.


This system provides you with a strategy that takes into account whether or not the user had accessed boards of either or both types, and one that clearly informs the user of their options at logoff time, in plain English.  For example, the terms "basic authentication" and "cookie authentication" aren't used, when communicating with the user.


This code is freeware.  You use it at your own risk.  No warrany of fitness for use or any other form of guarantee inheres.

You may use it and/or the source code in whole or in part for any otherwise legal purpose that you deem fit; however you may not claim legal ownership of same for legal purposes against anyone who's obtained it from an "independent source" (such as this web page).


1:  Description of the processing

2:  Install (1): Complete Install Zips

3:  Install (2): Standard Install

4:  Install (3): Rebuilding the source files, and/or making modifications

5:  Install: (4) configuring the files

6:  Bug reports, comments, and change requests, etc.

7:  Other freeware products

8:  Version history information

9:  Acknowledgements


1:  Description of the processing

(If you wish, you may skip this lengthy section, and proceed immediately to the install information, that begins in section 2).


To better explain the processing, I need to clarify a few facts.

For simplicity, I'll refer to boards as no-auth boards (i.e. those that use no authentication, basic boards (i.e. those that use basic authentication), and cookie boards (i.e. those that use cookie authentication).

  • The user has accessed a cookie board during this browser session if and only if: the WB-Pass cookie is defined.

    This makes it easy to determine whether or not a user has accessed a cookie board.

    Under WebBoard 5 and 6, the WB-Save cookie will be set, if and only if the user has checked the "save password" box during the last cookie board login.

  • It's harder to determine whether or not the user has accessed a basic board during this browser session, particularly for "no frames" users.

    If the user has never accessed a cookie board, or goes to a basic board before going to any cookie board, then this system will always know.  That's because it can detect whether or not the board is a no-auth board, and if the WB-Pass cookie isn't set, then it follows that the board must be a basic board.

    For frames users, the frameset is redefined to include a hidden frame: the URL "loginagain" is loaded in that hidden frame.  For cookie boards, the regular login page (login.html) will come up in that hidden frame, but for basic boards, the page loginagain.html will come up in that hidden frame.

    However for "no frames" users, my system can't always be certain about whether or not they've accessed a basic board, unless they access this board before accessing any cookie boards during the current browser session, and they don't have a saved password cookie.

    (Unfortunately, the tag script call authmodeld doesn't seem to return a value which is accessible to either of the default open scripting languages, so it can't be used.  And while direct database access would settle the question, I try to avoid this in my systems, since system administrators tend to be rather protective of their databases.)

  • In order to assist the system, there's an additional "variables" file that you configure: this file carries two flags that indicate: (1) whether all basic boards have the logoff system code installed; and (2) whether any "ordinary users" have access to basic boards.  By "ordinary users," I mean those who aren't WebBoard administrators, virtual board managers of the current board, or anyone else who's sophisticated enough to know what they're doing when it comes to logging off.

    These values are G_AllBdsFlag (set to 1 iff all basic boards have the logoff system installed, otherwise 0); and G_AnyBasicFlag (set to 1 if ordinary users of this board have access to basic boards, else 0).

  • For reasons that will become clear later on, the "logoff" button's functionality is removed for guests on cookie boards, as well as for everyone on "no auth" boards.

    One might quibble about the wisdom of this choice: a stronger implementation would simply use database access to determine the type of board.


Here's what the system actually does when the user clicks on the "logoff" button.

  • First, we attend to the business of marking messages read.

    For frames users, the profile editing page (useredit.html) is loaded in the hidden frame.  This page looks at the previously defined variables, the user profile (is the "automatically mark messages read" option on?), as well as the <WB-NEWMSGS> tag.

    For "no frames" users, the frameset help?lg_nf (lg_nf.html on the help subfolder) is loaded.  It will in turn load useredit.html in the hidden "extra" frame of this frameset, while loading help?lg_wait (lg_wait.html on the help subfolder) in the visible frame of this frameset.  That page instructs the user to wait.

    If the user has requested to "automatically mark messages read" and there are new messages, then markread?0 is loaded in the hidden frame (i.e. to mark all messages in all conferences as read).

    Otherwise, the processing ends after loading useredit.

  • Useredit or markread will terminate in one of three possible ways.  Consider the first case, in which no cookie boards have been accessed during this browser session (and the user hasn't saved their password during the last access to a cookie board).

    First, if no cookie boards have been accessed, an alert will pop up.  This alert will advise the user to close all browser windows, and remind the user how to reverse the effect of checking the "Save this password in your password list" box in the pop-up.  (That message actually varies, depending on whether the user's browser is IE or NS).  After the user clicks on "OK", the user will be sent to the logoff URL.

  • If useredit or markread detect that no basic boards have been accessed, then the user will get the choice between going to the logoff URL without clearing their cookies, or after doing so.

    If WB-Save cookie is set, we'll remind the user that s/he had previously saved the password, and that it will be UNsaved if s/he wants to clear cookies.  This is done via a confirmation box, and after clicking on either "OK" or "Cancel," the user will be sent to the logoff URL.  (Note that the WB-Save cookie doesn't appear in WebBoard 4.)

  • Useredit and markread are sensitive to a third option: what if the user has definitely acessed both basic and cookie boards; or the user has definitely accessed cookie boards, and it can't be determined whether or not basic boards have been accessed.

    When are we certain that the user has accessed a a basic board during this browser session?

    First, if the user is a frames user, and G_AllBdsFlag is 1, then we know for sure that basic board access would have been detected (since "loginagain.html" would've been loaded in the hidden frame).  Also, if the WB-Pass cookie doesn't exist, then the user must have accessed a basic board (since s/he couldn't have accessed a cookie board, because "no auth" boards lack a logoff option).

    However, if the WB-Pass cookie exists, and G_AnyBasicFlag is 0, we also assume that there are no basic boards.

    If we can't tell whether a basic board has been accessed, it must be the case that: (1) the WB-Pass cookie was always defined (the topics page will notice if this cookie is undefined, and set another cookie which indicates that a basic board was definitely accessed); (2) there are basic boards accessible to users of this board (i.e. the G_AnyBasicFlag is 1); and (3) either the user is a "no frames" user (we can always detect the access of a basic board for frames users, if all boards carry the logoff system's HTML files), or there is at least one board which doesn't have the logoff system HTML files installed (i.e. G_AllBdsFlag is 0).

    Note that condition (1) in the previous paragraph can occur if the user previously saved their password on a cookie board, closed all their browser windows, and refrained from accessing cookie boards in subsequent browser sessions.  This scenario can't be distinguished from the case in which the user has accessed both varieties of boards during the same browser session.

    In the even that the user has accessed a cookie board during this browser session (or has a saved cookie from a previous browser session), and may have accessed a basic board during this browser session, we display the following page:

    If the WB-Save cookie is defined (that means that the user has saved their password on cookie boards), then the text will vary accordingly.  The text will also vary accordingly, depending on whether we're certain that the user has accessed a basic board during this browser session.

    After clicking on one of the two links in the second table, the user will be sent to the logoff URL.

    Note that if the user selects the second link, their WB-User and WB-Pass cookies will be cleared.  Therefore, if they later access a cookie board, they'll have to provide their login name and password again ... even if they haven't closed all browser windows, and even if they'd previously checked the "save password" box on WebBoard's login page.

    Note also that this page clearly explains the consequence of checking the "save password" box when logging into a basic board, and how the user can "un-do" this state of affairs.

    This page doesn't use language that's likely to confuse most users: instead, it describes the two types of boards in simple terms.

    Finally: this page comes up only when there's no way to avoid this level of complexity.  (See the previous processing cases.)

Return to table of contents

2:  Install (1): Complete Install Zips

If you want this documentation, as well as all the included zip files, WebBoard 4 and 5 users should download lg4.zip instead.  WebBoard 6 users should download lg6.zip.

Once you download the complete zip file, you'll still have to follow the rest of the install instructions.

Return to table of contents

3:  Install (2): Standard Install

For WebBoard 4 and 5 users, the standard install file is: lg_rel4.zip.

For WebBoard 6, use: lg_rel6.zip.

You should first read the configuration instructions in section 5.  When you're ready to move these files into the board(s)' subfolder(s), don't forget to move the files on the help subfolders in!


If you've customized any of the WebBoard pages that are in my install, you'll have to either propagate your customizations to my pages, or propagate my alterations to your customized pages.

Here's a list of each file, along with the role it plays in the various operations:

For simplicity, I'll refer to boards as basic boards (i.e. those that use basic authentication), and cookie boards (i.e. those that use cookie authentication).

File name Purpose:
asknew.html This comes up on cookie boards when the user enters an invalid user ID for a cookie board login; however it will also appear if a user has accessed a cookie board, logs off, and then attempts to go back in again, during the same browser session.  I've modified it to display an appropriate message, and bring the user back to the login page.
intro.html This is the intro page that comes up in the right frame when a frames user first logs in: I've modified it to load "loginagain" in the hidden frame.  This helps the system determine whether the current board is a basic board: for basic boards, the "loginagain.html" page will actually be loaded by WebBoard, instead of login.html.
layout1.html Frameset for frames users: I've modified it to include a hidden frame, and load lg_blk.html in that frame.
lg_blk.html This is on the board's help subfolder: it's the blank page that gets loaded in the hidden frame, for frames users.
lg_both.html This is on the board's help subfolder: it's the last page that the user sees, if they've accessed a cookie board, and may have accessed a basic board.  For a screen capture of the text on this page, please see section 1.
lg_nf.html This is on the board's help subfolder: it's the frameset that gets loaded for "no frames" users, when they log off.  There's only one visible frame, which initially contains the lg_wait page, that asks them to be patient.
lg_wait.html This is on the board's help subfolder: it's the "please wait" page that comes up for "no frames" users, in the only visible frame, after they ask to log off.
lg_vars.txt This file holds the configurable variables that are described in section 1 and section 5.
login.html This is the login page for cookie boards.  It's been modified so that it can load in the hidden frame, without resetting top.location.href.  This page only appears in the WebBoard 6 version, since it's not necessary for versions 4 and 5.
loginagain.html This is the page that comes up when a user on a basic board asks to login again.  This page (or login.html) is loaded in the hidden frame for frames users, in order to determine whether the the board is a basic or cookie board.
markread.html This is the "mark messages read" page: the modifications here are described in section 1.
nftoolbar.html This is the "in line" toolbar page for "no frames" users that's used in WebBoard 6; it doesn't exist for WebBoard 4.  The logoff link on this page has been reset, in order to load lg_nf.html (unless the user is a guest).
toolbar.html This is the toolbar page for frames users: the logoff link on this page has been reset, in order to load lg_nf.html (unless the user is a guest).
topics.html This is the topics (left) frame for frames users, and the entire page for "no frames" users.  For "no frames" users, the changes are similar to those in the previous two pages, plus we also check the WB-Pass cookie, to see if it's defined (as I explain in section 1).
useredit.html This is the profile editing page: the modifications here are described in section 1.
useredit5.html This is the profile editing page: the modifications here are described in section 1.  This is for WebBoard 5 users only, and exists only in the the WebBoard 4/5 install zips.  WebBoard 5 users need to this page, instead of the version of useredit.html that's already there.

Return to table of contents

4:  Install (3): Rebuilding the source files, and/or making modifications

If you want to modify the system, you'll need to download the source code.  For WebBoard 4 and 5 users, this is in: lg_src4.zip.  For WebBoard 6 users, this is in lg_src6.zip.

Note that these zip files are contained within the "complete" install download, as described in section 2.

You'll need to unzip these files into a new folder on your hard drive.

After you do so, you'll have to install my "JavaScript MakeFile" system onto that same folder: http://www.rs-freeware.org/jsm.

Within the JavaScript MakeFile system, I offer specific instructions for WebBoard users, at: http://www.rs-freeware.org/jsm/jsmdoc.htm#WebBoard_Regenerate.

In a nutshell: after installing the "JavaScript MakeFile" system, you'll have to modify the "make" file: lg.mak.

This is the line that you'll have to change:


DEST=f:\\w\\html\\lg

DEST should have the folder name of your main WebBoard HTML folder; probably: c:\\webboard\\html, if you're running it from the server.

Note that double backslashes are required to separate folder names.

For more information about folder names, please see my DOS primer.

Return to table of contents

5:  Install: (4) configuring the files

First, you need to configure the file lg_vars.txt.  The instructions are given within the file itself.

It's very important that you open this file up with Windows Notepad, and that the Edit | Word Wrap option is off.  Don't edit it with WordPerfect, MS-WORD, or any other word processor.


WebBoard 5 users: you'll find a file called useredit5.html in the install zip.  This file must be used instead of useredit.html.


WebBoard 6 users: the "modern" layout isn't supported.  If you wish to use it, you'll have to make the corresponding modifications to layout2.html, topics2.html, and nftoolbar2.html.  If you wish, you may contact me, and I'll make them for you.

Return to table of contents

6:  Bug reports, comments, and change requests, etc.

You can e-mail me at rog@NOSPAM_rs-freeware.org if you encounter problems, or think that you've found a bug.

I can also be reached by telephone in the U.S. from about 9 AM U.S. central time to 5 PM U.S. central time at: 765-742-6705.  If you don't get an answer, you can use my numeric pager at: 765-417-0664 ... I'll try to call you back, if you're in the U.S, Canada, or Mexico.


Please supply me with as much information as you can about your server, your version of WebBoard, any browser or Operating System that was involved, including the WebBoard Server's Operating System  (9x, NT, 2K, XP?).  Also, please provide any configuration files, or customized WebBoard files that you were using.  Keep in mind that I might actually have to have the opportunity to try what you were doing, in order to diagnose the problem.


BTW, I don't gaurantee to answer all e-mail or fix all bugs, etc.  Please remember that this is freeware, and that my time and resources are limited.

That said, I've put a lot of work into designing, coding, testing, and documenting this product, and I'm probably going to be fairly interested in any comments anyone has, fixing any bugs, and/or extending the scope to applications that strike me as being potentially valuable to a large number of users.


Naturally, if you're willing to hire me to make changes for your special-purpose application, I'm certainly willing to consider your offer.  My standard rate is $75/hr., but I may charge less if the work is to be done for a small business (less than 25 employees), or a nonprofit organization (in the latter case, I might even do it on a gratis basis  :-)  I may also consider charging you nothing if you're suggesting an improvement that I feel is of value to a large number of other users.

You can find out more about me, including references, and a list of clients/projects at: http://www.rs-freeware.org/rog.

Return to table of contents

7:  Other freeware products

WebBoard users will find lots of WebBoard freeware at: http://www.rs-freeware.org/freeware.htm.

Anyone who writes JavaScript  (regardless of whether this is written on the client or server side),  deals with SQL, or who happens to be interested in obtaining the full power available from DOS may wish to check out http://www.rs-freeware.org/free2.htm

Return to table of contents

8:  Version history information

This is version 2.0, released on November 1, 2002.

This system has been completely revised since the first release, in order to provide a more powerful and complete interface that applies uniformly to WebBoard 4, 5, and 6.

This documentation was generated by Rog's FAQHack: a DOS/Windows-based freeware program that handles simple macro preprocessing with special support for FAQs and other structured HTML documents.

Return to table of contents

9:  Acknowledgements

Many users on the WebBoard 4 support board have asked for this system.

Among many users who questioned WebBoard 4's capabilities in this regard, Karen Lopez argued forcefully that this lack of functionality couldn't be defended ... merely by pointing out that previous versions of WebBoard had the same problem, or that WebBoard could be reconfigured to redress the issue:

For instance, let's say a medical supplier offered a piece of equipment that cleaned lab equipment and had a button labeled "Sterilize".  So tech.s went along, hitting the sterilize button, thinking that the equipment was safe to use.  However, behind the scenes . . . a dog was licking all the pieces.  The manufacturer really couldn't get away with: "That's all it's ever done"; and "If you really want the equipment to be sterilized, just hire our consulting sterilizer, or develop your own sterilizer."  What the manufacuture needs to do is either rename the button "A good licking" or implement a real sterilizer.

Other people pointed out to me that the previous release of this system (which merely cleared the cookies) was woefully insufficient ... they shall remain nameless, as per their request.

Return to table of contents