How to get more out of Akiva's WebBoard version 4.x with Rog's Userinfo patch, WebBoard DB access example, and example of how to (effectively) extend the user profile field list (version 2.0)

There are actually three systems here.

The "patch" system is for WebBoard 4 only - it corrects a bug: when virtual board managers or WebBoard administrators edit another user's profile, the manager's (or admin's) UserInfo fields are displayed (and modified, if the profile is saved) ... instead of the corresponding fields for the user whose profile is being edited.

The "main" system demonstrates how to use database access to store and extract information associated with a user, by providing a separate page that gathers and stores the user response to a series of questions, and places the results in the UserInfo fields.  This system is supported for WebBoard 4, 5, and 6.

The "basic" system demonstrates how to use database access to store and extract information associated with a user, by gathering it when the user signs up for the board and/or on the profile editing pages, as well as displaying it on the profile viewing pages.  This system is supported for WebBoard 4, 5, and 6.  For WebBoard 4, this system also includes the "patch."

You don't need WB admin or server access to install and run this example: other than the tag scripts, it runs completely on the client side and only requires FTP access to a virtual board's subfolder.

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).


This is version 2.0: it's been through a complete revision since the last release.


1:  Requirements

2:  What is the "patch" system, why is it only offered for WebBoard 4 and 5, and why is it valuable for people who prefer VBS over JS?

3:  What's the "main" system?

4:  What's the "basic" system?

5:  Install (1): Complete Install Zips

6:  Install (2): Standard Install

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

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

9:  Other freeware products

10:  Version history information

11:  Acknowledgements


1:  Requirements

Open scripting should be enabled on your copy of WebBoard.  This is the case for the default installation, but if you have any doubts, please make sure that the following registry key exists:
HKEY_LOCAL_MACHINE\SOFTWARE\O'REILLY\WEBBOARD\3.0\SCRIPTING\JS
and has a value of JavaScript.

All of the *.JS and *.VBS files presume that you haven't changed the default DB owner ("sa") and password (a blank).

If you have, you'll need to modify each one of those files: the comments make clear where to put your changed values.

Return to table of contents

2:  What is the "patch" system, why is it only offered for WebBoard 4 and 5, and why is it valuable for people who prefer VBS over JS?

The "patch" system is designed to get around a bug that's present in WebBoard 4  (and possibly WebBoard 5: I'm not sure if the bug is present in WebBoard 5).

What's the bug?  Well, when a WebBoard administrator or virtual board manager edits the profile of a user, the values of the "userinfo" fields are those of the administrator, or the virtual board manager: not those of the user whose profile is being edited.

The "patch" system also shows you how to use VBS to do database access: see the file called unifo.vbs.  This is the only VBS module in any of my systems, and it sheds a bit more light on VBS DB access than anything else that I've seen.

For those of us who prefer JS, I've also provided the the equivalent file: uinfo.js.

Return to table of contents

3:  What's the "main" system?

The main system shows you how to create a separate page which collects the results of a form.  Users can actually access this page from the "more options" menu (although you could put the link anywhere).

This page asks the user to fill out two survey questions: does the user prefer dogs, or cats?  And: what's the user's "sign"?

These survey results are stored in the userinfo1 field, in the user's profile, and they can be viewed or modified when the user edits that page, which is (as I mentioned before), accessible from the "more options" menu - although you could put the link anywhere:

Note that the "basic" system does exactly the same thing, except that the survey results are collected when the user first registers, or in the user profile editing page.  Unlike the basic system, the main system displays the results to the general public, on the user profile viewing page.

You can put the files for the "basic" and "main" system on the same virtual board, if you wish.

Return to table of contents

4:  What's the "basic" system?

The basic system shows you how to put a form into the new user registration pages, and user profile editing page.  It also shows how to display the results of the form in the user profile page.

Here are some examples of how the form might blend in with WebBoard pages that refer to the user profile ...

Note that I deliberately use highlighting, in order to call attention to the new fields, but there's no reason why you can't format them in order to "seamlessly" blend them in, along with WebBoard's standard fields.  To save bandwidth in the images, portions of the screen capture have been removed.

Here's what the lower part of the new user registration page might look like:


And here's what the new profile fields (i.e. the new form) might look like, on the user profile editing page:


When the user's profile is viewed, it might look like this:


The basic system's files incorporate the "patch" system, for WebBoard 4 and 5.

For more details about the form, see section 3.

Return to table of contents

5:  Install (1): Complete Install Zips

If you want this documentation, as well as all the included zip files, WebBoard 4 and 5 users can download ui4.zip instead.  WebBoard 6 users should download ui6.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

6:  Install (2): Standard Install

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

For WebBoard 6, use: ui_rel6.zip.

The WebBoard 4 and 5 zip contains three separate subfolders: ui_patch (for the "patch" system); ui_basic (for the "basic" system), and ui_main (for the "main") system.

The WebBoard 6 zip just contains the latter two subfolders.


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.

WebBoard 5 users please note: there is a file called useredit5.html in the basic system, as well as the patch system.  If you wish to use either system, these file should be used instead of the corresponding useredit.html files.


I'm going to describe the files in each system separately.

Here's a list of the files in the "patch" system (WebBoard 4 and 5 only):

File name Purpose:
uinfo.js This is the "tag script" that extracts the userinfo fields from the database.  It does the same thing as uinfo.vbs.
uinfo.vbs This is the "tag script" that extracts the userinfo fields from the database.  It does the same thing as uinfo.js.
useredit.html This is the user profile editing page.  It first lists the userinfo fields that WebBoard "returns", and then lists the fields returned by the "tag" script (i.e. the correct ones).  For WebBoard 4, these fields' contents may differ, if a WebBoard administrator or virtual board manager is editing another user's profile.  I'm not sure whether this will be true for WebBoard 5.
useredit5.html This is the analogue of useredit.html, but for WebBoard 5.


Here's a list of the files in the "main" system  (all versions of WebBoard).  Note that none of these files overlap with those in the "basic" system: you can use both at the same time.

File name Purpose:
more.html This is the "more options" page ... users are provided with a special link that takes them to the "survey" page.  On that page, they're invited to fill out and submit the special form.
uinfoget.js This is the "tag" script that returns the value of the userinfo1 field.  It's used by the pages that display the special form.
uinfoget.html This page is located on the help subfolder of the board: it's where the user actually fills out the special form.
uinfoset.js This is the "tag" script that's called whenever the user actually fills out the special form: it will store the form values into the userinfo1 field in the database.
uinfoset.html This page is what the user sees after taking the "survey" (i.e., filling out the special form.  It displays the user's responses.


Here's a list of the files in the "basic" system (all versions of WebBoard):

File name Purpose:
newuinf1.txt This is an "include" file that displays a form.  The user is asked to fill out this form when registering, or when editing their profile.  This form is also included on the pages that display the user profile.
newuinf2.txt This is an "include" file that contains the code needed to process the special form.  It contains two JavaScript functions: FormInitFnc, which displays the form values; and SaveFormFnc, which extracts the values from the form, and prepares them to be crammed into the UserInfo1 field. This file is also included in the same places as the previous one, although in some cases, its only role is to save the form values, whereas in others it's only used to display the form values, and in at least one case (within the user profile editing page), it does both.
newuser.html This is the new user registration page for boards that don't require e-mail address verification.  We ask the user to asked to fill out the special form during the registration process.
newuser-e.html Same as above, but for boards that do require e-mail address verification.
user-profile.html This is the user profile display page for boards that use "real names" (as opposed to "login names").  It displays the values of the special form, that users fill out during registration, and/or may modify when editing their profiles. displayed.
user-profile-l.html Same as above, but for boards that use "login names," instead of real names.
useredit.html This is the profile editing page, which lets the user modify the values of the special form.  Even when a WebBoard administrator or virtual board manager is editing another user's profile, the latter user's correct values are shown (and not those of the WebBoard administrator or virtual board manager.)
useredit5.html This is the analogue of useredit.html, but for WebBoard 5.
UInfoG_B.js This is the "tag" script that's used on the useredit.html pages for WebBoard 4 and 5, in order to guarantee that the special form reflects the values of the user whose profile is being edited, and not those of any WebBoard administrator or virtual board manager who happens to be editing the user's profile.  This tag script isn't present in the WebBoard 6 version.

Return to table of contents

7:  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: ui_src4.zip.  For WebBoard 6 users, this is in ui_src6.zip.

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

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: ui.mak.

These are is the lines that you'll have to change:


DEST_B=f:\\w\\html\\ui_basic
DEST_P=f:\\w\\html\\ui_patch
DEST_M=f:\\w\\html\\ui_main

DEST_B is the folder name for your WebBoard virtual board that demonstrates the "basic" system.

DEST_M is the folder name for your WebBoard virtual board that demonstrates the "main" system.  If you wish to simultaneously install the "basic" and "main" systems, then this value should be the same as the previous variable's value.

DEST_P should have the folder name for your WebBoard virtual board that demonstrates (or tests) the "patch" system.  This variable isn't present in the WebBoard 6 version of the install.

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

8:  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

9:  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

10:  Version history information

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

Nov 1, 2002: added support for WebBoard 6, and separated out the three systems into an easily-understandable form.

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

11:  Acknowledgements

Kate Thylander came up with the "help folder" trick that's used in this, as well as many other systems.  The debt of gratitude that I owe her cannot be underestimated!!

Andrew Pullen and Cathy Rathke asked me questions on the WebBoard 4 Support Board which lead to the development of this package.

Return to table of contents