NAME

FTN::Database::Forum - Fidonet/FTN Message Forum SQL Database operations.

VERSION

Version 0.42

DESCRIPTION

FTN::Database::Forum is a Perl module containing common forum (message conference) related functions for Fidonet/FTN Forum related processing on a Forum table in an SQL Database, including one that defines the fields for such a Forum table. The SQL database engine is one for which a DBD module exists, defaulting to SQLite.

EXPORT

The following functions are available in this module: define_forum_table(), define_areasbbs_table(), ftnmsg_index_fields(), and ftnareas_index_fields().

FUNCTIONS

define_forum_table

Syntax: $fields = define_forum_table();

This function returns a string that contains the SQL which defines a message conference/forum table for use in an SQL database being used for Fidonet/FTN processing,

Except for the id field, which is defined in the create_ftn_table subroutine itself, the defined fields are as follows:

ftscdate

The ftscdate field is used to contain a string indicating the date of the FTN message. It can contain up to 20 characters and defaults to an empty string.

datetime

The datetime field is used to contain date and time that the FTN message was added to the forum table.

fromnode

The fromnode field is used to contain the FTN node number that the message is from. It can contain up to 72 characters and defaults to an empty string.

tonode

The tonode field is used to contain the FTN node number that the message is to. It can contain up to 72 characters and defaults to an empty string.

fromname

The fromame field is used to contain the name of whom the FTN message is from. It can contain up to 36 characters and defaults to an empty string.

toname

The toname field is used to contain the name of whom the FTN message is to. It can contain up to 36 characters and defaults to an empty string.

subject

The subject field is used to contain the subject for the FTN message. It can contain up to 72 characters and defaults to an empty string.

attrib

The attrib field is used to contain the set of attribues from the FTN message. Defaults to none of them being set. Defaults to being defined as an integer.

msgid

The msgid field is used to contain the FTN message ID. Defaults to an empty string.

replyid

The replyid field is used to contain the FTN message reply ID. Defaults to an empty string.

body

The required body field is used to contain the body of the FTN messages and defaults to an empty string.

ctrlinfo

The ctrlinfo field is used to contain the FTN control information for the message being stored in the table. Defaults to an empty string.

define_areasbbs_table

Syntax: $fields = define_areasbbs_table();

This function returns a string that contains the SQL which defines an areasbbs table for use in an SQL database being used for Fidonet/FTN to track message/forum or file echo processing.

Except for the id field, which is defined in the create_ftn_table subroutine itself, the defined fields are as follows:

areaname

The areaname field is used to contain a string indicating the distribution name of the FTN message or file area. It can contain up to 32 characters and defaults to an empty string.

bbsname

The bbsname field is used to contain a string indicating the name of the FTN message or file area as it is referenced in the database. It can contain up to 32 characters and defaults to an empty string.

description

The description field is used to contain the description of the message or file area. It can contain up to 32 characters and defaults to an empty string.

prinode

The prinode field is used to contain the primary FTN node number for the system that the area is on. It can contain up to 72 characters and defaults to an empty string.

The uplink field is used to contain the FTN node number that the system obtains the area from. It can contain up to 72 characters and defaults to an empty string.

domain

The domain field is used to contain the name of FTN domain in which the area is distributed. It can contain up to 8 characters and defaults to an empty string.

maxmsgs

The maxmsgss field is used to indicate the maximum number of messages that should be kept in this message/forum area. Defaults to the number zero.

maxdays

The maxdays field is used to indicate the maximum number of days that messages should be kept for in this message/forum area. Defaults to the number zero.

type

The type field is used to indicate what type of FTN message/forum area this is. Can be an L, for local; an N, for netmail, or an L, for local. Defaults to an L. (Message/Forum areas only.)

ftnmsg_index_fields

Syntax: $fields = ftnmsg_index_fields();

This is a function that returns a string containing a comma separated list of the fields that are intended for use in creating the ftnmsg database index. The index contains the following fields: msgid and replyid.

ftnareas_index_fields

Syntax: $fields = ftnareas_index_fields();

This is a function that returns a string containing a comma separated list of the fields that are intended for use in creating the ftnareas database index. The index contains the following fields: areaname and bbsname.

EXAMPLES

An example of opening an FTN database, then creating a forum table, loading data to it, then creating an index on it, and then closing the database connection:

use FTN::Database;
use FTN::Database::Forum;

my $db_handle = open_ftn_database(\%db_option);
$fields = define_forum_table();
create_ftn_table($db_handle, $table_name, $fields);
...   (Load data to forum table)
ftnmsg_index_tables($db_handle, $table_name);
close_ftn_database($db_handle);

AUTHOR

Robert James Clay, <jame at rocasa.us>

BUGS

Please report any bugs or feature requests via the web interface at http://sourceforge.net/p/ftnpl/ftn-database/tickets/. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

Note that you can also report any bugs or feature requests to bug-ftn-database at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=FTN-Database; however, the FTN-Database Issue tracker at the SourceForge project is preferred.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc FTN::Database::Forum

You can also look for information at:

CREDITS

The message/forum and areasbbs table definitions were originally derived from the bbsdbpl scripts areatable.pl and areasbbsadm.pl available at the FTN Perl project at SourceForge: http://ftnpl.sourceforge.net

SEE ALSO

L<FTN::Database>, L<FTN::Database::ToDo>

COPYRIGHT & LICENSE

Copyright 2001-2004,2013 Robert James Clay, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.