61 $forum_id = checkNumeric($_GET[
"forum_id"]);
65 <p><label>Search Results
for</label> <?echo htmlSafe($this->searchText)?>
66 <a
class=
'button' style=
'float: right' href=
'<?echo $forum->identifier?>'>« Back
to Forum</a>
69 if (count($this->messages) > 0)
76 $class = $alt ?
"message alt" :
"message"
78 <a name=
"message<?echo $message->message_id?>"></a>
79 <div
id=
"message<?echo $message->message_id?>" class=
"<?echo $class?>">
82 <a
class=
"button" style=
'float: right' href=
'forum_topic?forum_id=<?echo $message->forum_id?>&topic_id=<? echo $message->topic_id ?>'> View
this topic </a>
84 <strong><?echo
$message->title?></strong><br/>
85 <span
class=
"small">Posted by <?echo $userProfile?> at <?echo
$message->date_posted?></span>
87 <div
class=
"message_content">
91 $attachments =
$message->Attachments();
95 $pk =
$u->getPrimaryKey();
97 if (count($attachments) > 0)
99 echo
"<h4 style='margin-bottom: 4px'>Attachments</h4>";
107 if ($author &&
$user && ($author->get(
$pk) ==
$user->get(
$pk)) || checkRole(
"admin,data"))
110 &
nbsp;&
nbsp;<a
style=
"font-size: 10px" href=
"/action/forum/attachment_delete?forum_id=<?echo $this->topic->forum_id?>&message_id=<?echo $message->message_id?>&attachment_id=<?echo $attachment->attachment_id?>" onclick=
"return confirm('Are you sure you want to delete <?echo $attachment->filename?>?');">Delete
this attachment</a>
120 if (
$user && $author->get(
$pk) ==
$user->get(
$pk) || checkRole(
"admin,data,moderator"))
122 $controls[] =
"<a href=\"forum_message_form?forum_id={$this->topic->forum_id}&topic_id={$this->topic->topic_id}&message_id={$message->message_id}\">Edit</a>";
125 if (
$user && $author->get(
$pk) ==
$user->get(
$pk) || checkRole(
"admin,data,moderator"))
127 $controls[] =
"<a href=\"/action/forum/message_delete?forum_id={$this->topic->forum_id}&topic_id={$this->topic->topic_id}&message_id={$message->message_id}\" onclick=\"return confirm('Are you sure you want to delete this message?');\">Delete</a>";
132 $controls[] =
"<a href=\"forum_message_form?forum_id={$this->topic->forum_id}&topic_id={$this->topic->topic_id}&parent_id={$message->message_id}\">Reply</a>";
136 <div
class=
"message_controls"><? echo implode(
" | ", $controls);?></div>
146 <p><em>No messages have been posted
for this topic.</em></p>
156 $link =
"<img src=\"{$icon}\" alt=\"Icon\" style=\"display:inline-block;vertical-align:middle\"/> ";
157 $link .=
"<a href='/action/attachment/download?attachment_id={$attachment->attachment_id}'>{$attachment->filename}
158 </a> ({$attachment->file_size})\n";
if(! $attachment_id) $attachment
static formatUserProfile($u)
__construct($messages, $searchText, $id="forum_search_results")
formatAttachment($icon, $attachment)
Provides the interface to the user model for the application.