CWIS Developer Documentation
|
A converastion forum which includes topics and messages. More...
Public Member Functions | |
AddTopic ($Author, $TopicName, $Subject, $Body) | |
PostMessage ($TopicId, $Author, $Subject, $Body) | |
Static Public Member Functions | |
static | DeleteMessage ($MessageId) |
Delete a message from a forum, updating the message counts for the associated forum and topic. More... | |
Public Attributes | |
const | OK = 0 |
const | NONEXISTENT = 1 |
const | NOSUCHTOPIC = 2 |
const | NOSUCHMESSAGE = 3 |
Setup/Initialization/Destruction | |
Forum ($ForumId=NULL) | |
Object Constructor. More... | |
Delete () | |
Remove this forum, deleting all assocated topics and messages. More... | |
Accessors | |
ForumId () | |
Get the forum's ID. More... | |
LastMessageDate () | |
Get the date of the most recent post to the forum. More... | |
LastMessagePoster () | |
Get the CWIS username of the user with the most recent post. More... | |
LastMessagePosterEmail () | |
Get the e-mail address of the user with the most recent post. More... | |
ModeratorName () | |
Get the CWIS username of the forum's moderator. More... | |
ModeratorEmail () | |
Get the e-mail address of the forum's moderator. More... | |
GetTopicList () | |
Get the list of the topics in this forum. More... | |
GetLastMessage () | |
Get the last message posted in the forum. More... | |
ForumName ($NewValue=DB_NOVALUE) | |
Get or modify the forum's name. More... | |
ForumDescription ($NewValue=DB_NOVALUE) | |
Get or modify the forum description. More... | |
TopicCount ($NewValue=DB_NOVALUE) | |
Get or set the forum's topic count. More... | |
MessageCount ($NewValue=DB_NOVALUE) | |
Get or set the forum's message count. More... | |
ModeratorId ($NewValue=DB_NOVALUE) | |
Get or set the forum's moderator. More... | |
GetErrorStatus () | |
Retrieve error codes associated with the creation of the forum. More... | |
Forum::AddTopic | ( | $Author, | |
$TopicName, | |||
$Subject, | |||
$Body | |||
) |
Definition at line 249 of file Forum.php.
References ForumId(), PostMessage(), and TopicCount().
Forum::Delete | ( | ) |
|
static |
Delete a message from a forum, updating the message counts for the associated forum and topic.
int | $MessageId | ID of the message to delete |
Definition at line 300 of file Forum.php.
References Forum(), Message\OK, and Topic\OK.
Forum::Forum | ( | $ForumId = NULL | ) |
Object Constructor.
After constructing the object, be sure to call GetErrorStatus() and verify that it returns Forum::OK.
int | $ForumId | ID of the forum to retrieve from the database, or -1 to create a new forum. |
Definition at line 34 of file Forum.php.
References ForumId(), NONEXISTENT, and OK.
Referenced by DeleteMessage().
Forum::ForumDescription | ( | $NewValue = DB_NOVALUE | ) |
Forum::ForumId | ( | ) |
Get the forum's ID.
Definition at line 101 of file Forum.php.
Referenced by AddTopic(), Delete(), Forum(), GetLastMessage(), and GetTopicList().
Forum::ForumName | ( | $NewValue = DB_NOVALUE | ) |
Forum::GetErrorStatus | ( | ) |
Forum::GetLastMessage | ( | ) |
Get the last message posted in the forum.
Definition at line 183 of file Forum.php.
References ForumId(), and Message\PARENTTYPE_TOPIC.
Referenced by LastMessageDate(), LastMessagePoster(), and LastMessagePosterEmail().
Forum::GetTopicList | ( | ) |
Forum::LastMessageDate | ( | ) |
Get the date of the most recent post to the forum.
Definition at line 108 of file Forum.php.
References GetLastMessage().
Forum::LastMessagePoster | ( | ) |
Get the CWIS username of the user with the most recent post.
Definition at line 121 of file Forum.php.
References GetLastMessage().
Forum::LastMessagePosterEmail | ( | ) |
Get the e-mail address of the user with the most recent post.
Definition at line 132 of file Forum.php.
References GetLastMessage().
Forum::MessageCount | ( | $NewValue = DB_NOVALUE | ) |
Get or set the forum's message count.
int | $NewValue | New forum message count. This parameter is optional. |
Definition at line 231 of file Forum.php.
Referenced by PostMessage().
Forum::ModeratorEmail | ( | ) |
Get the e-mail address of the forum's moderator.
Definition at line 153 of file Forum.php.
References ModeratorId().
Forum::ModeratorId | ( | $NewValue = DB_NOVALUE | ) |
Get or set the forum's moderator.
int | $NewValue | New forum moderator's user ID. This parameter is optional. |
Definition at line 239 of file Forum.php.
Referenced by ModeratorEmail(), and ModeratorName().
Forum::ModeratorName | ( | ) |
Get the CWIS username of the forum's moderator.
Definition at line 143 of file Forum.php.
References ModeratorId().
Forum::PostMessage | ( | $TopicId, | |
$Author, | |||
$Subject, | |||
$Body | |||
) |
Definition at line 267 of file Forum.php.
References MessageCount(), NOSUCHTOPIC, OK, Topic\OK, and Message\PARENTTYPE_TOPIC.
Referenced by AddTopic().
Forum::TopicCount | ( | $NewValue = DB_NOVALUE | ) |
Get or set the forum's topic count.
int | $NewValue | New forum topic count. This parameter is optional. |
Definition at line 224 of file Forum.php.
Referenced by AddTopic().
const Forum::NOSUCHTOPIC = 2 |
Definition at line 21 of file Forum.php.
Referenced by PostMessage().
const Forum::OK = 0 |
Definition at line 19 of file Forum.php.
Referenced by Delete(), Forum(), and PostMessage().