// Set content
$area2 .= elgg_view("messages/forms/view",array('entity' => $messages, 'page_view' => "sent", 'limit' => $limit, 'offset' => $offset));
-// Sidebar menu options
-//$area3 = elgg_view("messages/menu_options", array('context' => 'sent'));
-
// Format
$body = elgg_view_layout("one_column_with_sidebar",'',$area2);
--- /dev/null
+<?php
+
+ /**
+ * Elgg reply to a message form
+ * @uses $vars['entity'] This is the message being replied to
+ */
+
+ // fix for RE: RE: RE: that builds on replies
+ $reply_title = $vars['entity']->title;
+ if (strncmp($reply_title, "RE:", 3) != 0) {
+ $reply_title = "RE: " . $reply_title;
+ }
+?>
+
+<form class="margin_top" id="messages_reply_form" action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm">
+ <?php echo elgg_view('action/securitytoken'); ?>
+
+ <!-- populate the title space with the orginal message title, inserting re: before it -->
+ <p><label><?php echo elgg_echo("messages:title"); ?>: <br /><input type='text' name='title' class="input_text" value='<?php echo $reply_title; ?>' /></label></p>
+ <p><label><?php echo elgg_echo("messages:message"); ?>: <br /><textarea name='message' value='' class="input_textarea" /></textarea></label></p>
+
+ <p>
+ <?php
+
+ //pass across the guid of the message being replied to
+ echo "<input type='hidden' name='reply' value='" . $vars['entity']->getGUID() . "' />";
+ //pass along the owner of the message being replied to
+ echo "<input type='hidden' name='send_to' value='BAAA" . $vars['entity']->fromId . "' />";
+
+ ?>
+ <input type="submit" class="submit_button" value="<?php echo elgg_echo("messages:fly"); ?>" />
+ </p>
+
+</form>
+
+ <?php
+ //display the message you are replying to
+ if (isset($vars['entity'])) {
+
+ echo "<h3>" . elgg_echo("messages:replying") . "</h3>";
+ echo $vars['entity']->description;
+
+ }
+ ?>
echo elgg_view('page_elements/breadcrumbs', array(
'breadcrumb_root_url' => $url,
'breadcrumb_root_text' => $breadcrumb_root_text,
-/*
- 'breadcrumb_level1_url' => $url,
- 'breadcrumb_level1_text' => $vars['entity']->title,
- 'breadcrumb_level2_url' => $url,
- 'breadcrumb_level2_text' => $vars['entity']->title,
-*/
'breadcrumb_currentpage' => $vars['entity']->title
- ));
+ ));
?>
<!-- display the content header block -->
<div id="content_header" class="clearfloat">
if($num == 0) {
?>
-
<a href="<?php echo $vars['url']; ?>pg/messages/<?php echo $_SESSION['user']->username; ?>" class="privatemessages" > </a>
-
<?php
- } else {
+ }else{
?>
-
- <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo $_SESSION['user']->username; ?>" class="privatemessages_new" >[<?php echo $num; ?>]</a>
-
+ <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo $_SESSION['user']->username; ?>" class="privatemessages new" ><span><?php echo $num; ?></span></a>
<?php
- }
\ No newline at end of file
+ }