|
CWIS Developer Documentation
|
A converastion forum which includes topics and messages. More...
Public Member Functions | |
| AddTopic ($Author, $TopicName, $Subject, $Body) | |
| Add topic to forum. More... | |
| PostMessage ($TopicId, $Author, $Subject, $Body) | |
| Post new message to topic. More... | |
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 | |
| __construct ($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::__construct | ( | $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 35 of file Forum.php.
References ForumId().
| Forum::AddTopic | ( | $Author, | |
| $TopicName, | |||
| $Subject, | |||
| $Body | |||
| ) |
Add topic to forum.
| string | $Author | User adding new topic. |
| string | $TopicName | Name of new topic. |
| string | $Subject | Subject for new topic. |
| string | $Body | Text body for new topic. |
Definition at line 278 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 336 of file Forum.php.
References ForumId(), Message\OK, and Topic\OK.
| Forum::ForumDescription | ( | $NewValue = DB_NOVALUE | ) |
| Forum::ForumId | ( | ) |
Get the forum's ID.
Definition at line 102 of file Forum.php.
Referenced by __construct(), AddTopic(), Delete(), DeleteMessage(), GetLastMessage(), and GetTopicList().

| Forum::ForumName | ( | $NewValue = DB_NOVALUE | ) |
| Forum::GetErrorStatus | ( | ) |
| Forum::GetLastMessage | ( | ) |
Get the last message posted in the forum.
Definition at line 186 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 111 of file Forum.php.
References GetLastMessage().
| Forum::LastMessagePoster | ( | ) |
Get the CWIS username of the user with the most recent post.
Definition at line 124 of file Forum.php.
References GetLastMessage().
| Forum::LastMessagePosterEmail | ( | ) |
Get the e-mail address of the user with the most recent post.
Definition at line 135 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 243 of file Forum.php.
Referenced by PostMessage().

| Forum::ModeratorEmail | ( | ) |
Get the e-mail address of the forum's moderator.
Definition at line 156 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 254 of file Forum.php.
Referenced by ModeratorEmail(), and ModeratorName().

| Forum::ModeratorName | ( | ) |
Get the CWIS username of the forum's moderator.
Definition at line 146 of file Forum.php.
References ModeratorId().
| Forum::PostMessage | ( | $TopicId, | |
| $Author, | |||
| $Subject, | |||
| $Body | |||
| ) |
Post new message to topic.
| int | $TopicId | ID of topic. |
| string | $Author | User adding new message. |
| string | $Subject | Subject for new message. |
| string | $Body | Text body for new message. |
Definition at line 303 of file Forum.php.
References MessageCount(), 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 233 of file Forum.php.
Referenced by AddTopic().
