Definition at line 115 of file forum_view.inc.
◆ drawView()
ForumDetailsView::drawView |
( |
| ) |
|
Definition at line 182 of file forum_view.inc.
184 echo
"<div style='width: {$this->width}'>";
186 <form method=
"get" action=
"forum_search_by_author">
187 <input type=
"hidden" name=
"forum_id" value=
"<?echo $this->forum->forum_id?>"/>
188 <label
for=
"author">Search by Author</label> <input type=
"text" name=
"author" style=
"width: 200px"> <input
class=
'button' type=
'submit' value=
"Search"/>
191 $this->subscriptionView->drawLink();
192 $this->table->drawView();
◆ formatLastPost()
ForumDetailsView::formatLastPost |
( |
|
$topic | ) |
|
Definition at line 160 of file forum_view.inc.
162 $lastPost =
$topic->LastPost();
163 if (!$lastPost)
return "<em>No posts</em>";
164 $user = $lastPost->Author();
168 $title = $lastPost->title ? $lastPost->title :
"No Title";
170 return "<a href='{$this->topicLink}?forum_id={$lastPost->forum_id}&topic_id={$lastPost->topic_id}'>{$title}</a><br/>".
171 "<span class='small'>by ".$userProfile.
" ({$lastPost->date_posted})</span>";
static formatUserProfile($u)
◆ formatTitle()
ForumDetailsView::formatTitle |
( |
|
$topic | ) |
|
Definition at line 147 of file forum_view.inc.
149 if (!array_key_exists(
$topic->topic_id, $this->messages))
return "";
157 return "<a href='{$this->topicLink}?forum_id={$topic->forum_id}&topic_id={$topic->topic_id}'>{$title}</a><br/><span class='small'>(Created by ".$userProfile.
")</span>";
◆ ForumDetailsView()
ForumDetailsView::ForumDetailsView |
( |
|
$forum, |
|
|
|
$topicLink |
|
) |
| |
Definition at line 125 of file forum_view.inc.
131 $this->topics = $this->forum->Topics(
"WHERE message_id not in (select message_id from {$msgTable->table} where deleted=true)");
132 $this->messages = indexedQuery(
ForumMessage,
"WHERE forum_id={$forum->forum_id} AND deleted=false AND parent_id=0",
"topic_id");
134 $this->table =
new DataListView($this->topics,
"topic_list");
135 $this->table->column(
"Title", array($this,
formatTitle),
true,
"width: 40%")
136 ->column(
"Last Post", array($this,
formatLastPost),
true,
"width: 40%")
137 ->column(
"Views",
"{views}",
true,
"width: 10%; text-align: center")
138 ->column(
"Replies",
"{countReplies()}",
true,
"width: 10%; text-align: center");
139 $this->table->emptyMessage =
"No topics have been started in this discussion forum";
140 $this->table->filter =
true;
143 $this->subscriptionView =
new ForumSubscriptionHelper($this->forum);
static getValue($component, $name)
Retrieve the value of the specified Setting.
◆ writeScript()
ForumDetailsView::writeScript |
( |
| ) |
|
◆ $forum
◆ $messages
ForumDetailsView::$messages |
◆ $subscriptionView
ForumDetailsView::$subscriptionView |
◆ $table
◆ $topicLink
ForumDetailsView::$topicLink |
◆ $topics
ForumDetailsView::$topics |
◆ $width
The documentation for this class was generated from the following file: