blob: 7b949ec36ea3d5e339ccdbadfc017cb57b440d49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
<?php
/**
* Elgg reply to a message form
*
* @package ElggMessages
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Curverider Ltd <info@elgg.com>
* @copyright Curverider Ltd 2008-2010
* @link http://elgg.com/
*
* @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;
}
exit;
$reply_title = str_replace("'", "\\'", $reply_title);
?>
<form action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm">
<!-- 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
echo elgg_view('input/securitytoken');
//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;
}
?>
|