Web/BBS Integration
TeleFinder makes it easy to integrate a BBS into your Web site. Two Active Page templates let TeleFinder generate pages for downloading and message areas on the fly. The basic TeleFinder setup includes a starting point for your BBS at /samples/bbs.spml.Note: Like all Active Pages, this link must be followed through the server, not from disk. The sample BBS is based on the Quick Start setup. You can add or change this to suit your own needs.
Logging In
When a user attempts to access a protected area, TeleFinder sends the Unauthorized Request response, and their browser presents them with the Password dialog. The Web Server log shows this as a (401) Unauthorized error.
After entering a name and password, the browser requests the page again, and this time sends the name and password with the request. TeleFinder looks up the Name in User Manager's user database (TeleUsers file), verifies the password, and makes sure that the user's assigned "Access Group" is valid for the request.
Account Sign-up
You can add on-line account sign-up by creating an Active Page with the SPML #register command. The default installation includes registration pages in the "reg" folder. /samples/reg/homepage.spml includes the Registration Form. The form action is /samples/reg/reg.spml. "reg.spml" includes the #register command, and then displays a page based on the registration results by checking the REGISTER_ERR variable.When the registration is successful the #mailargs command is used to send an e-mail message to the sysop account announcing the new user.
In all cases the results of registration attempts are logged to
/samples/reg/log/reg.log. The URL Path "/reg/log/" is setup within the Realms as a protected area accessible only to user's with the "Sysop" Access Group.
File Downloading
TeleFinder makes web based file downloading easy with on the fly encoding and a customizable directory listing template.
The "dir.spml" Active Page uses the #dir_list SPML command to generate directory listings on the fly.
dir.spml Template
The Templates folder contains dir.spml, and this file is used to fulfill directory requests if the directory lacks a default page (homepage.spml). By default dir.spml contains the #dir_list command so that the requested directory's contents are displayed.You can disable directory listings by removing dir.spml from the Templates folder, and TeleFinder will display the "Not Found" page (error.spml) instead.
#dir_list SPML command
The #dir_list command accepts a variety of parameters that indicate which directory to index and generate HTML for each item in that directory.dir="" path to the directory to index. If this is "" the requested directory is indexed. Always use dir="" in the dir.spml Active Page.
For each item the following parameters generate HTML.
- FILENAME - the text of the file name.
- FILEHREF - a link to the file.
- ICON - the icon ( gif ) of the file. TeleFinder uses the file "file extension".gif in the icons folder, so that "page.html" will be represented by the icon "html.gif."
- FILESIZE - size of file according to #fsize config.
- LAST_MODIFIED - last mod date of the file according to #flastmod config.
- DESCRIPTION - the file's SitC description output as HTML. "" -- any quoted text/html.
See the online document for more information on other SPML commands you can use to customize the dir.spml template.
Configuration
You can use the #config command to specify the TCP-IP Port and Domain used to generate the FILEHREF. The Port and Domain default to Port and Domain receiving the directory request.dir_domain
<!-- #config dir_domain="bbs.spiderisland.com" -->This causes subsequent #dir_list commands to generate FILEHREF requests targeting bbs.spiderisland.com.
dir_port
<!-- #config dir_port="8080" -->This causes subsequent #dir_list commands to generate FILEHREF requests targeting Port 8080.
These commands are useful when you want to direct download traffic to a specific port or computer on your network.
Message Topics
As with File Download pages, TeleFinder uses a Active Page template to generate HTML on the fly when displaying Message Topics.The "topic.spml" Active Page uses the topic_list_msg SPML command to generate message listings on the fly.
topic.spml Template
The Templates folder contains topic.spml, and this file is used by the Topic Handler method. By default, files of Macintosh Type 'BBXF' are assigned to TeleFinder's Topic Handler method. This is a specific TeleFinder file format, and other files should not be assigned to this Handler method.You can disable message handling by removing topic.spml from the Templates folder, or by removing all Topic Handler assignments from TeleFinder's Handlers list.
Topic.spml is coded to handle four (4) specific requests:
· Display a listing of all messages in a topic. · Display a single message, including its contents. · Post a new message to a topic. · Display a form to use in composing a new message.
Entry into a topic usually begins on a page generated by dir.spml. When the #dir_list command encounters a TeleFinder message topic, it generates a link includes a path to the topic and a "Search For" parameter of "which=all." It that looks like this.
http://www.domain.com/conf/sample?which=all
When this link is followed, it is processed by the Topic handler which runs the topic.spml template. This request is tested for within topic.spml by this command
<!-- #if which IS all -->
Then the #topic_list_msg command is run to generate a link to each message within the topic.
When a specific message is requested, topic.spml generates a page like this:
#topic_list_msg SPML command
The #topic_list_msg command accepts a variety of parameters that display information in the message and can create links to specific messages.When #topic_list_msg is run, is looks at the "which" parameter in the request so that it can determine if it should display all messages, or a specific message in the topic.
For each requested item, the following parameters generate HTML for a given message.
- AUTHOR - The name or e-mail address of the person posting the message.
- RECIPIENT - The name or e-mail address of the person the message was addressed to.
- SUBJECT - The subject of the message.
- POST_DATE - The date and time the message was posted.
- PREV_URL - A link to the previous message in the topic.
- NEXT_URL - A link to the next message in the topic.
- THIS_URL - A link to the this message.
- MSG_BODY - The body of the message.
- MSG_NUMBER - The internal message number.
- "" -- any quoted text/html.
See the online document for more information on other SPML commands you can use to customize the topic.spml template.
Personal Web Site Templates
TeleFinder supports the BBS features Directory Indexing and Message Topics in Personal Web Sites if the user creates a templates folder in their Web Space folder. The error pages can also be included in the user's "Templates" folder for added customization.