|
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... | |
Public Member Functions inherited from Item | |
| __construct ($Id) | |
| Constructor, used to load existing items. More... | |
| Destroy () | |
| Destroy item. More... | |
| Delete () | |
| Destroy item. More... | |
| Id () | |
| Get item ID. More... | |
| Name ($NewValue=DB_NOVALUE) | |
| Get/set name of item. More... | |
| DateCreated ($NewValue=DB_NOVALUE) | |
| Get/set when item was created. More... | |
| CreatedBy ($NewValue=DB_NOVALUE) | |
| Get/set ID of user who created the item. More... | |
| DateLastModified ($NewValue=DB_NOVALUE) | |
| Get/set when item was last modified. More... | |
| LastModifiedBy ($NewValue=DB_NOVALUE) | |
| Get/set ID of user who last modified the item. 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... | |
Static Public Member Functions inherited from Item | |
| static | GetCanonicalId ($Id) |
| Normalize item ID to canonical form. More... | |
| static | ItemExists ($Id) |
| Check whether an item exists with the specified ID. More... | |
Setup/Initialization/Destruction | |
| static | Create ($Name, $ModeratorId, $Description=NULL) |
| Create a forum. 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... | |
Additional Inherited Members | |
Public Attributes inherited from Item | |
| const | NO_ITEM = -2123456789 |
| ID value used to indicate no item. More... | |
Protected Member Functions inherited from Item | |
| UpdateValue ($ColumnName, $NewValue=DB_NOVALUE) | |
| Convenience function to supply parameters to Database::UpdateValue(). More... | |
| UpdateDateValue ($ColumnName, $NewValue=DB_NOVALUE) | |
| Convenience function to supply parameters to Database::UpdateValue(), with preprocessing of new values to convert them into an SQL-compatible date format. More... | |
Static Protected Member Functions inherited from Item | |
| static | CreateWithValues ($Values) |
| Create a new item, using specified initial database values. More... | |
| static | SetDatabaseAccessValues ($ClassName) |
| Set the database access values (table name, ID column name, name column name) for specified class. More... | |
Protected Attributes inherited from Item | |
| $DB | |
| $Id | |
| $ItemIdColumnName | |
| $ItemNameColumnName | |
| $ItemTableName | |
| $ValueCache = array() | |
Static Protected Attributes inherited from Item | |
| static | $ItemIdColumnNames |
| static | $ItemNameColumnNames |
| static | $ItemTableNames |
| Forum::AddTopic | ( | $Author, | |
| $TopicName, | |||
| $Subject, | |||
| $Body | |||
| ) |
Add topic to forum.
| CWUser | $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 304 of file Forum.php.
References Topic\Create(), Item\Id(), PostMessage(), and TopicCount().
|
static |
| Forum::Delete | ( | ) |
Remove this forum, deleting all assocated topics and messages.
Definition at line 84 of file Forum.php.
References Item\Destroy(), and Item\Id().
|
static |
| Forum::ForumDescription | ( | $NewValue = DB_NOVALUE | ) |
Get or modify the forum description.
| string | $NewValue | New forum description. This parameter is optional. |
Definition at line 258 of file Forum.php.
References Item\UpdateValue().
| Forum::ForumId | ( | ) |
Get the forum's ID.
Definition at line 108 of file Forum.php.
References Item\Id().
| Forum::ForumName | ( | $NewValue = DB_NOVALUE | ) |
Get or modify the forum's name.
| string | $NewValue | New forum name. This parameter is optional. |
Definition at line 248 of file Forum.php.
References Item\UpdateValue().
| Forum::GetLastMessage | ( | ) |
Get the last message posted in the forum.
Definition at line 221 of file Forum.php.
References Item\Id(), 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 118 of file Forum.php.
References GetLastMessage().
| Forum::LastMessagePoster | ( | ) |
Get the CWIS username of the user with the most recent post.
Definition at line 135 of file Forum.php.
References GetLastMessage().
| Forum::LastMessagePosterEmail | ( | ) |
Get the e-mail address of the user with the most recent post.
Definition at line 148 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 278 of file Forum.php.
References Item\UpdateValue().
Referenced by PostMessage().

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

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