| $Source: /home/miva/Templates/bbs.mv,v $ | | $Log: bbs.mv,v $ | Revision 1.9 1998/01/08 burch and derek | Added version check for runnning | through Miva Mia or Miva | Changed all hard IMG SRC's to evaluate variables | who's values are configured at the top of the doc. | IMG's are relative to Miva Mia startup dir by default. | | Revision 1.8 1997/10/23 16:59:38 burch | Fixed bug in determining if the Next button | should be displayed | | Revision 1.7 1997/10/23 02:57:50 burch | Misc Bug Fixes | | | bbs.mv - "Town Hall" message posting system for Miva (htmlscript 3.0) | | PROCEDURE FOR INSTALLING THIS TEMPLATE: | | 1. Copy and run | bbs.mv will automatically create the directories | and files it needs. See the function setup() | for more information. | | DIRECTORIES/FILES IT USES: | (These can easily be changed--See the section labelled | global variables) | | bbs/ | cat.dbf Category database | cat.mvx Category index | msgs.dbf Message database | msgs.mvx Message index | threads.mvx Message thread index | | messages/ | X-n.msg Message files | | WHERE TO GET HELP: | | Htmlscript maintains an open list server for the Miva users group. | You can post messages to this list with questions and items of | interest for other htmlscript users. To subscribe to this list | send email to majordomo@htmlscript.com with the following on the | *first line* of the message body (not the subject): | | subscribe miva-users youremail@domain.com | | Email your questions to: hts-users@htmlscript.com | | global variables | | DESCRIPTION: | | These variables are used throughout the program. | graphic location variables | | DESCRIPTION: | | These variables are used to reference graphics. | They are relative by default to run through Miva Mia, and | may need to be edited to evaluate properly if the | application is to be run through Miva with a | conventional "cgi-bin/miva?..." URL. | | This little snippet of code demonstrates how you can check to see | if the user is running a specific version of Netscape or Microsoft's | browser. | | We make this check because not all versions of IE or Navigator support | background images in table cells. | | So, if the browser doesn't support table cell background images, | then the user will just have to live with "columns" that don't dynamically | grow and shrink with the size of the data. | Begin HTML with background image, | menu bar, and main container table. Alaska Sisters in Crime
Alaska Sisters in Crime Alaska Reads

| This code displays a select list of categories and automatically | selects the category that we are displaying.
 
 
 
     

| setup() | | DESCRIPTION: | | setup() opens the database files that will be used | throughout the applet. If they do not exist, it | will create them. | | RETURNS: | | NULL ("") on success, an error message otherwise Creating ''
Creating ''
Creating ''
Creating ''
Creating ''
Creating ''
Creating ''
| categoryname() | | DESCRIPTION: | | Does a database lookup to determine the name of a | category based on its category number | | RETURNS: | | The category name on success, or "Category Not Found" | if the category wasn't found in the database | showmessage() | | DESCRIPTION: | | showmessage() displays the message specified by | "message" | | RETURNS: | | NULL ("") on success, an error message otherwise
 Author: ' }">
 Posted:  
 Subject:  

| haschildren() | | DESCRIPTION: | | haschildren() checks to see if the specified message | has any children | | RETURNS: | | True if the message has children, false otherwise | displaymessages() | | DESCRIPTION: | | displaymessages() displays up to "max" messages from | the category specified by "category" that have the | parent "parent," starting at the "offset"'th message | in the category. | | RETURNS: | | The number of messages displayed
Replies
display
You have requested a message number that is greater than the number of messages in this category.
This message has no replies There are no messages in this category
| post() | | DESCRIPTION: | | post() displays a form for posting a new message | in "category" and automatically builds an Re: ... | subject if "message" is non-0 | | RETURNS: | | NULL ("") on success, an error message otherwise
 Name:
 E-Mail Address:
 Subject:

  


 
| savemessage() | | DESCRIPTION: | | savemessage() inserts a new record into the database | and creates the message file in the messages directory | addcat() | | DESCRIPTION: | | addcat() displays a form allowing the user to create | a category

Name for new Category:
| savecat() | | DESCRIPTION: | | savecat() inserts a new category into the database | | RETURNS: | | The number of the new category