What is the FrontPage Voting Component?
Installation Overview: The Setup Utility
Installation Overview: ASPVoter
Installation Overview: CGIVoter
Compiling and Installing CGIVoter for UNIX systems
Compiling and Installing CGIVoter for Win32 systems
What is the FrontPage Voting Component?
The FrontPage Voting SDK Sample Component is a Client/Server component built using the FrontPage2000 Custom Component SDK. It is intended to exemplify how such a component might be written, and in the process makes use of some of the new Custom Component SDK functionality (such as the BOTID attribute) added for FrontPage2000. For a detailed explanation of the Custom Component SDK, please see the Software Developer's Kit documentation (fpdevkit.doc) from either the Microsoft FrontPage98 or FrontPage2000 versions of the Software Developer's Kit.
There are two versions of the FrontPage Voting Component that have been provided for FrontPage2000: The ASPVoter Component and the CGIVoter Component. The ASPVoter Component generates Active Server Page script and thus needs an ASP-enabled Web Server. The CGIVoter Component (unchanged from FrontPage98) uses CGI (Common Gateway Interface) scripts and will work on both Win32 and UNIX-based Web Servers.
Once inserted onto a page, the FrontPage Voting Component allows authors to specify the type of vote, and the voting options (Yes/No, Agree/Disagree, or For/Against). In addition, ASPVoter provides a number of results formatting options as well as a custom confirmation message. It is also possible to have more than one ASPVoter on the same page, each with their own formatting/results options and results files.
When the page containing the Voting component is displayed in a browser, the user is able to express his/her feelings about the opinion/proposal found elsewhere on the page by selecting the appropriate vote option and clicking the submission button. When the button is clicked, the user's vote is passed to the component's server-side module, which constructs a confirmation page and returns it to the browser.
At this point, the CGIVoter component's confirmation page announces that the user's vote has been registered and tallied, and also displays the percentage of the voting population that agrees with the user's vote. The ASPVoter component will display the custom confirmation message, and whichever voting results option the page author specified at design-time.
Installation Overview: The Setup Utility
The Setup directory contains the Microsoft Visual C++ 6.0 source and project files which, when compiled and built, will make an application named "setup.exe". This application, when placed in a folder with the compiled and built binaries (dll's, .exe's, .inf files) from the CGIVoter (votebot) and ASPVoter proejcts, can be run on the Web Server machine that you'd like to install these Voting Components on. This setup utility takes some of the "legwork" out of figuring out whether or not a particular FrontPage2000-extended Web Server can support a given Voting Component. It automatically determines if the particular server supports ASP, if the server has the FrontPage2000 Server Extensions, and alters the options as is appropriate.
To compile/build this .exe, simply open up vote install.mdw in Visual C++/Visual Studio 6.0, and select the Build->Build Setup.exe command. When the build has finished, setup.exe will appear in either the Release or Debug folder, depending on the project's active configuration.
Installation Overview: ASPVoter
The files necessary to compile and build the ASPVoter component may be found in the ASPVoter directory. The ASPVoter directory contains the source code, makefiles, and Microsoft Visual C++ 6.0 Project and Workspace Files needed to compile and build the FrontPage ASP Voting Component.
Both the client-and server-side (ASP) code used to implement ASPVoter are contained in the Dynamic Link Library (DLL) named "ASPVOTER". To build this DLL from the source files included, open the votebot.dsw file in Microsoft Visual C++ 6.0 and select the Build->Build ASPVOTER.DLL option. The file ASPVOTER.DLL will be built and appear in either the "Release" or "Debug" folder, depending on the active configuration that you choose when you're using the workspace.
After ASPVoter.dll has been built, create a folder named "ASPVOTER" in the C: \Microsoft Office\Office\bots\ directory on the Web Server machine. Next, move ASPVOTER.DLL and ASPVOTER.INF (found in the same top-level "ASPVoter" folder that the source files live in) to the folder you have just created.
For the final step, open a web that is hosted from the same machine that you just copied the files to, and select Tools->Recalculate Hyperlinks. If the particular Web Server is ASP-enabled (For example, Microsoft Internet Information Server version 4.0 or 5.0) and has been extended with the FrontPage 2000 Server Extensions, the ASPVoter component should now be insert-able via the Insert->Components->Additional Components dialog in FrontPage 2000's Page View.
Installation Overview: CGIVoter
The files necessary to compile and build the CGIVoter component may be found in the CGIVoter directory. The CGIVoter directory contains the source code, makefiles, and Microsoft Visual C++ Project Files needed to compile and build the FrontPage CGI Voting Component. When compiled, the Windows client- and server-side binaries will run on Windows 95, Windows 98, or Windows NT 4.0. The Server Files will only run on the platform that you compile them on.
Compiling and Installing the CGIVoter for UNIX systems
The server-side files for the Voting sample component will need to be built before they are moved to the appropriate directories. In the following instructions replace $WEBROOT with your actual web content directory.
Directory Structure:
client - Contains source code for compiling the client DLL
server - Contains source code for compiling the server DLL on
all platforms
To compile the server files, you may need to edit
the makefile (found in the server directory).
The makefile is currently set to compile Release code for non-SGI UNIX
platforms. The server files have been tested, and will compile for, HPUX
and Solaris systems. If you are compiling for a different UNIX system, for
example SGI, you may have to make additional modifications to the makefile or
the source files.
If you are compiling for UNIX, be sure to ftp the files to the UNIX system using
ASCII mode, or to convert the files from MS-DOS format to UNIX format on the
UNIX system before attempting to compile. After editing the makefile, run
make on it.
The result of compiling are two files: votesrvr.so and votebot.exe
in the Release directory. Note that on UNIX the makefile
produces a shared object file (.so) instead of a dynamic link library (.dll).
Now you are ready to install. To install the CGIVoter component on a UNIX system, you must have correct file permissions
to access the web server's directories. You must also compile the server source
yourself. The source has been tested on HPUX and Solaris systems.
To install the built components, do the following:
Edit votebot.inf to reference votesrvr.so instead
of votesrvr.dll
Copy Release/votebot.exe to $WEBROOT/cgi-bin (or $WEBROOT/_vti_bin if the server
does not have a cgi-bin directory)
Copy Release/votesrvr.so to $WEBROOT/_vti_bot/votebot
Copy ../misc/votebot.inf to $WEBROOT/_vti_bot/votebot
Copy ../winbin/votebot.dll to $WEBROOT/_vti_bot/votebot
Notes: If you decide to copy votebot.dll to the UNIX server via ftp, you may want to use BINARY mode.
If votebot.exe was placed in the cgi-bin directory, you'll need to make some modifications (see the SERK) to the frontpg.ini file.
If votebot.exe was placed in the _vti_bin directory, you'll need to do a chmod a+x for this file.
You must do a Recalculate Hyperlinks operation
before the VoteBot Sample Component will appear in the "Insert FrontPage
Component" dialog in FrontPage Editor. To do this, run the FrontPage
Explorer and open the root web on the server for which the VoteBot sample was
installed. Then, select the command Tools->Recalculate
Hyperlinks.
You are done installing the VoteBot Sample Component. You can use it by
executing Insert->FrontPage Component in the FrontPage
Editor while the FrontPage Explorer has a FrontPage web open with the VoteBot
Sample Component installed.
Compiling and Installing the CGIVoter for Windows Systems
This section gives a brief summary on compiling the CGIVoter server-side Components for Win32 platforms.
There are two parts to the FrontPage CGIVoter
Sample component. The client section is compiled into a DLL file (votebot.dll),
which is run on the client system. The server section is compiled into two
programs (votesrvr.dll, votebot.exe), which run on the server
system. If the server is Windows NT or Windows 95, please see the Windows
section to learn how you can use the binaries located in the "winbin"
directory, rather than compiling the source yourself. The client files are
in the directory "client", and the server files are in the directory
"server".
To compile the server files for Windows, you'll
need to run nmake on votebot.mak and votesrvr.mak
from the /server directory. Or, you can import these two makefiles as
projects (see the Microsoft VC5 documentation for details). The results of
compiling are two files: votesrvr.dll and votebot.exe.
This next section instructs you on how to install the
FrontPage Voting Component sample for Win95, Win98 and WinNT systems. It is
really quite simple. Please note that you must have file and directory
access permission for the machine on which you are installing this Custom
Component.
A. If you want all servers on the local machine to be able to
use the Voting Sample Component, do the following:
1) Create the directory "bots" in the FrontPage program root directory. Usually this will be C:\Program Files\Microsoft Office\Office\bots
2) In the bots directory, create another directory called "VoteBot".
3) Copy the following files to the votebot
directory you just created:
votebot.inf
votesrvr.dll
votebot.dll
B. If you want only specific servers on the local machine to be
able to use the Voting Sample Component, do the following:
1) For each server that you want to be able to access the VoteBot component,
create a directory called "_vti_bot" in the server's root web
directory. Usually this will be:
C:\webshare\wwwroot\_vti_bot for MS PWS
C:\InetPub\wwwroot\_vti_bot for MS IIS
2) In the _vti_bot directory that you just created, make a new directory called "votebot".
3) Copy the following files to the votebot
directory you just created:
votebot.inf
votesrvr.dll
votebot.dll
C. Now you need to copy the executable program (votebot.exe)
into each FrontPage web. For each web server that you want to be able to access
the Voting Sample Component, do the following:
1) Find the cgi-bin directory for the FrontPage web. This is often just a
directory directly under the root web directory. Sometimes web servers will have
the cgi-bin directory mapped to another directory on the drive. If your
web server does not have a cgi-bin directory, and does not have a mapping for
cgi-bin programs to another directory, you'll have to place the .exe in the _vti_bin
directory of the root web.
2) Copy the file votebot.exe into the cgi-bin (or _vti_bin) directory for the FrontPage web.
3) Ensure the cgi-bin directory is executable. You can check if the directory is executable by right clicking on it and choosing "Properties" in FrontPage 2000's Folders view.
4) You may have to add the following entry to the appropriate port section in the server machine's registry:
AllowExecutableScripts=
Please see the FrontPage2000 Server Extensions Resource Kit for more information about this.
You must do a Recalculate Hyperlinks operation
before the CGIVoter Sample Component will appear in the "Additional
Components" dialog when you're in FrontPage 2000's Page view. To do this, open the root web for which the VoteBot sample was
installed in FrontPage.
Then, select the command Tools->Recalculate Hyperlinks.
You are done installing the CGIVoter Component. You can use it by
executing Insert->Component->Additional Components in FrontPage
2000's Pages view when a FrontPage web hosted from the install machine is open.
(The "install machine" is the one that you just copied the Voter files
to.)