Search:

# CWIS Developers Documentation

- Main Page
- Classes
- Files

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Forum Class Reference

A converastion forum which includes topics and messages. More...

List of all members.

## Setup/Initialization/Destruction
| Forum ($ForumId=NULL)
| Object Constructor.
| Delete ()
| Remove this forum, deleting all assocated topics and messages.
## Accessors
| ForumId ()
| Get the forum's Id.
| LastMessageDate ()
| Get the date of the most recent post.
| LastMessagePoster ()
| Get the CWIS username of the most recent poster.
| LastMessagePosterEmail ()
| Get the email address of the most recent poster.
| ModeratorName ()
| Get the CWIS username of the forum's moderator.
| ModeratorEmail ()
| Get the email of the forum's moderator.
| GetTopicList ()
| Get a list of the topics in this forum.
| ForumName ($NewValue=DB_NOVALUE)
| Get or modify the forum's name.
| ForumDescription ($NewValue=DB_NOVALUE)
| Get or modify the forum description.
| TopicCount ($NewValue=DB_NOVALUE)
| Get or set the forum's topic count.
| MessageCount ($NewValue=DB_NOVALUE)
| Get or set the forum's message count.
| ModeratorId ($NewValue=DB_NOVALUE)
| Get or set the forum's moderator.
| GetErrorStatus ()
| Retrieve error codes associated with the creation of the forum.
## Public Attributes
const | OK = 0
const | NONEXISTENT = 1

## Detailed Description

A converastion forum which includes topics and messages.

Definition at line 26 of file Forum.php.

## Member Function Documentation

Forum::Delete | ( |  | ) |

Remove this forum, deleting all assocated topics and messages.

Definition at line 84 of file Forum.php.

References ForumId(), and OK.

Forum::Forum | ( | $ | ForumId = `NULL` | ) |

Object Constructor.

After constructing the object, be sure to call GetErrorStatus() and verify that it returns Forum::OK.

Parameters:

  | ForumId | The Id number of the forum to retrieve from the database, or -1 to create a new forum

Definition at line 43 of file Forum.php.

References ForumId(), NONEXISTENT, and OK.

Forum::ForumDescription | ( | $ | NewValue = `DB_NOVALUE` | ) |

Get or modify the forum description.

Parameters:

  | NewValue | (OPTIONAL)

Returns:
  forum description

Definition at line 198 of file Forum.php.

Forum::ForumId | ( |  | ) |

Get the forum's Id.

Returns:
  forum Id

Definition at line 110 of file Forum.php.

Referenced by Delete(), Forum(), GetTopicList(), LastMessageDate(), LastMessagePoster(), and LastMessagePosterEmail().

Here is the caller graph for this function:

Forum::ForumName | ( | $ | NewValue = `DB_NOVALUE` | ) |

Get or modify the forum's name.

Parameters:

  | NewValue | (OPTIONAL)

Returns:
  forum name

Definition at line 191 of file Forum.php.

Forum::GetErrorStatus | ( |  | ) |

Retrieve error codes associated with the creation of the forum.

Returns:
  Forum::OK if everything worked, something else otherwise.

Definition at line 225 of file Forum.php.

Forum::GetTopicList | ( |  | ) |

Get a list of the topics in this forum.

Returns:
  an array of TopicId's for this forum's conversations

Definition at line 171 of file Forum.php.

References ForumId().

Forum::LastMessageDate | ( |  | ) |

Get the date of the most recent post.

Returns:
  Post date or "None" for empty forums

Definition at line 116 of file Forum.php.

References ForumId(), and GetLastMessage().

Forum::LastMessagePoster | ( |  | ) |

Get the CWIS username of the most recent poster.

Returns:
  The CWIS username of the most recent poster

Definition at line 129 of file Forum.php.

References ForumId(), and GetLastMessage().

Forum::LastMessagePosterEmail | ( |  | ) |

Get the email address of the most recent poster.

Returns:
  email address of the most recent poster

Definition at line 140 of file Forum.php.

References ForumId(), and GetLastMessage().

Forum::MessageCount | ( | $ | NewValue = `DB_NOVALUE` | ) |

Get or set the forum's message count.

Parameters:

  | NewValue | (OPTIONAL)

Returns:
  message count

Definition at line 212 of file Forum.php.

Forum::ModeratorEmail | ( |  | ) |

Get the email of the forum's moderator.

Returns:
  email of the forum's modreator

Definition at line 161 of file Forum.php.

References ModeratorId().

Forum::ModeratorId | ( | $ | NewValue = `DB_NOVALUE` | ) |

Get or set the forum's moderator.

Parameters:

  | NewValue | (OPTIONAL)

Returns:
  the CWIS user ID of the forum's moderator

Definition at line 219 of file Forum.php.

Referenced by ModeratorEmail(), and ModeratorName().

Here is the caller graph for this function:

Forum::ModeratorName | ( |  | ) |

Get the CWIS username of the forum's moderator.

Returns:
  CWIS username of the forum's moderator

Definition at line 151 of file Forum.php.

References ModeratorId().

Forum::TopicCount | ( | $ | NewValue = `DB_NOVALUE` | ) |

Get or set the forum's topic count.

Parameters:

  | NewValue | (OPTIONAL)

Returns:
  topic count

Definition at line 205 of file Forum.php.

## Member Data Documentation

const Forum::NONEXISTENT = 1

Definition at line 32 of file Forum.php.

Referenced by Forum().

const Forum::OK = 0

Definition at line 31 of file Forum.php.

Referenced by Delete(), and Forum().

The documentation for this class was generated from the following file:

- Forum.php