50 "identifier" => String,
53 "description" => HTML,
54 "created_date" => Date,
55 "last_modified" => Timestamp,
57 "published" => Boolean,
58 "sort_order" => Number);
127 $count = queryValue(
ForumMessage,
"COUNT(1)",
"WHERE forum_id={$this->forum_id} AND message != '' AND deleted=0");
133 return Query::create(
Forum,
"WHERE identifier=:identifier")
147 var
$fields = array(
"forum_site_xref_id" => Number,
148 "forum_id" => Number,
149 "site_id" => Number);
158 return $this->getRelated(
Forum);
163 return $this->getRelated(
Site);
178 "parent_id" => Number,
179 "topic_id" => Number,
180 "author_id" => Number,
181 "date_posted" => Date,
182 "last_modified" => Timestamp,
183 "forum_id" => Number,
184 "deleted" => Boolean);
196 return $this->getRelated(
Forum);
212 return $mgr->getUser($this->author_id);
225 var
$table =
"forum_message_attachment_xref";
228 var
$fields = array(
"forum_message_attachment_xref_id" => Number,
229 "message_id" => Number,
230 "attachment_id" => Number);
255 "message_id" => Number,
256 "forum_id" => Number,
259 "date_created" => Date);
274 $messages = $this->
Messages(
"WHERE deleted=false ORDER BY date_posted DESC LIMIT 1");
280 return $this->getRelated(
Forum);
300 return Query::create(
ForumMessage,
"WHERE topic_id=:topic_id and parent_id > 0 and deleted=0")
301 ->bind(
":topic_id", $this->topic_id)
302 ->executeValue(
"COUNT(1)");
318 "published" => Boolean,
319 "sort_order" => Number);
327 return $this->getRelated(
Forum);
332 $messages = $this->getRelatedList(
ForumMessage,
"",
"WHERE deleted!=1 ORDER BY date_posted DESC LIMIT 1");
static usingFile()
Uses the specified framework file(s) from the framework directory.
UserSubscription()
Get the subscriptions to this forum for this user.
Subscriptions($constraint="")
static findByIdentifier($identifier)
Attachments($constraint="")
countReplies()
When counting forum message replies to a topic, exclude the forum message that has a parent id of 0,...
Provides the interface to the user model for the application.