* @copyright Curverider Ltd 2008-2010 * @link http://elgg.com/ * * * @uses $vars['entity'] Optionally, the message to view * @uses get_input('type') If the user accesses the message from their sentbox, this variable is passed * and used to make sure the correct icon and name is displayed */ // set some variables to use below if(get_input("type") == "sent"){ // send back to the users sentbox $url = $vars['url'] . "mod/messages/sent.php"; //this is used on the delete link so we know which type of message it is $type = "sent"; } else { //send back to the users inbox $url = $vars['url'] . "pg/messages/" . $vars['user']->username; //this is used on the delete link so we know which type of message it is $type = "inbox"; } // 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; } if (isloggedin()) if (isset($vars['entity'])) { if ($vars['entity']->toId == $vars['user']->guid || $vars['entity']->owner_guid == $vars['user']->guid) { ?>

«

toId); echo " " . elgg_view("profile/icon",array('entity' => $user_object, 'size' => 'tiny')); echo "

".elgg_echo('messages:to').": " . $user_object->name . "
"; } else { echo " " . elgg_view("profile/icon",array('entity' => get_entity($vars['entity']->fromId), 'size' => 'tiny')); echo "

".elgg_echo('messages:from').": " . get_entity($vars['entity']->fromId)->name . "
"; } ?> time_created); ?>

(anyone?) if($main_message = $vars['entity']->getEntitiesFromRelationship("reply")){ if($type == "sent"){ echo "

".elgg_echo('messages:original').":

"; }else{ echo "

".elgg_echo('messages:yours').":

"; } echo $main_message[0][description] . "

"; } ?>

title; ?>

$vars['entity']->description)); ?>

".elgg_echo('messages:answer')."   "; ?> $vars['url'] . "action/messages/delete?message_id=" . $vars['entity']->getGUID() . "&type={$type}&submit=" . elgg_echo('delete'), 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )); ?>

"message", "value" => '', )); ?>

getGUID() . "' />"; //pass along the owner of the message being replied to echo "fromId . "' />"; ?> " />