aboutsummaryrefslogtreecommitdiff
path: root/mod/messages/send.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-15 22:28:46 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-15 22:28:46 +0000
commit43c33492d2ab65a783c17559cf8dabd7832e9ea1 (patch)
tree7107fed1b5424db1405b842972c7e4c47f11bfd3 /mod/messages/send.php
parente8d148970261207efbe5435e1abcf68c5ed59cc8 (diff)
downloadelgg-43c33492d2ab65a783c17559cf8dabd7832e9ea1.tar.gz
elgg-43c33492d2ab65a783c17559cf8dabd7832e9ea1.tar.bz2
Updated the messages plugin to use the new CSS/HTML
git-svn-id: http://code.elgg.org/elgg/trunk@7886 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/messages/send.php')
-rw-r--r--mod/messages/send.php44
1 files changed, 15 insertions, 29 deletions
diff --git a/mod/messages/send.php b/mod/messages/send.php
index 3e1baa496..1f31e9e02 100644
--- a/mod/messages/send.php
+++ b/mod/messages/send.php
@@ -1,42 +1,28 @@
<?php
/**
-* Elgg send a message page
+* Compose a message
*
* @package ElggMessages
*/
-// Load Elgg engine
-require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
-// If we're not logged in, forward to the front page
gatekeeper();
-// Get the current page's owner
-$page_owner = elgg_get_page_owner();
-if ($page_owner === false || is_null($page_owner)) {
- $page_owner = get_loggedin_user();
- set_page_owner($page_owner->getGUID());
-}
-
-// Get the users friends; this is used in the drop down to select who to send the message to
-$user = get_loggedin_user();
-$friends = $user->getFriends('', 9999);
+$page_owner = get_loggedin_user();
+set_page_owner($page_owner->getGUID());
-// Set the page title
-$area2 = elgg_view_title(elgg_echo("messages:sendmessage"));
+$title = elgg_echo('messages:add');
-// Get the send form
-$area2 .= elgg_view("messages/forms/send",array('friends' => $friends));
+elgg_push_breadcrumb($title);
-// Sidebar menu options
-$area3 = elgg_view("messages/menu_options");
+$params = messages_prepare_form_vars(get_input('send_to'));
+$params['friends'] = $page_owner->getFriends();
+$content = elgg_view_form('messages/send', array(), $params);
-// Format
-$params = array(
- 'content' => $area2,
- 'sidebar' => $area3
-);
-$body = elgg_view_layout("one_column_with_sidebar", $params);
+$body = elgg_view_layout('content', array(
+ 'content' => $content,
+ 'title' => $title,
+ 'filter' => '',
+ 'buttons' => '',
+));
-// Draw page
-echo elgg_view_page(elgg_echo('messages:send', array($page_owner->name)), $body); \ No newline at end of file
+echo elgg_view_page($title, $body);