Fixing message toolbar

skala
Julio Montoya 15 years ago
parent 5d2a24e144
commit a4aece1cb7
  1. 12
      main/messages/inbox.php
  2. 55
      main/messages/new_message.php
  3. 60
      main/messages/outbox.php

@ -126,6 +126,7 @@ if ($_GET['f']=='social') {
}
Display::display_header('');
$social_parameter = '';
if ($_GET['f']=='social') {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
@ -133,6 +134,7 @@ if ($_GET['f']=='social') {
echo '<div class="actions-title">';
echo get_lang('Messages');
echo '</div>';
$social_parameter = '?f=social';
} else {
//comes from normal profile
/*
@ -142,7 +144,7 @@ if ($_GET['f']=='social') {
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',api_xml_http_response_encode(get_lang('Outbox'))).api_xml_http_response_encode(get_lang('Outbox')).'</a>';
echo '</div>'; */
if (api_get_setting('extended_profile') == 'true') {
echo '<div class="actions">';
if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') {
@ -163,7 +165,7 @@ if ($_GET['f']=='social') {
//echo '</span>';
echo '</div>';
}
}
@ -172,9 +174,9 @@ echo '<div id="inbox-wrapper">';
//LEFT CONTENT
echo '<div id="inbox-menu">';
echo '<ul>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.Display::return_icon('message_new.png',get_lang('ComposeMessage')).get_lang('ComposeMessage').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$social_parameter.'">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$social_parameter.'">'.Display::return_icon('message_new.png',get_lang('ComposeMessage')).get_lang('ComposeMessage').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php'.$social_parameter.'">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '</ul>';
echo '</div>';

@ -14,7 +14,7 @@
==============================================================================
*/
// name of the language file that needs to be included
$language_file= 'messages';
$language_file= array('messages','userInfo');
$cidReset=true;
require_once '../inc/global.inc.php';
@ -210,36 +210,37 @@ function manage_form ($default, $select_from_user_list = null) {
MAIN SECTION
==============================================================================
*/
if (isset($_GET['rs'])) {
$interbreadcrumb[] = array ('url' => 'inbox.php', 'name' => get_lang('Messages'));
$interbreadcrumb[]= array (
'url' => '../social/'.$_SESSION['social_dest'],
'name' => get_lang('SocialNetwork')
);
if ($_GET['f']=='social') {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => 'outbox.php','name' => get_lang('Inbox'));
} else {
$interbreadcrumb[] = array ('url' => 'main/auth/profile.php', 'name' => get_lang('Profile'));
$interbreadcrumb[]= array (
'url' => 'inbox.php',
'name' => get_lang('Inbox')
);
$this_section = SECTION_MYPROFILE;
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => 'outbox.php','name' => get_lang('Inbox'));
}
$interbreadcrumb[]= array (
'url' => '#',
'name' => get_lang('ComposeMessage')
);
$this_section = SECTION_MYPROFILE;
Display::display_header('');
$group_id = intval($_REQUEST['group_id']);
echo '<div class=actions>';
if ($group_id != 0) {
echo '<div class=actions>';
echo '<a href="'.api_get_path(WEB_PATH).'main/social/groups.php?id='.$group_id.'">'.Display::return_icon('back.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).api_xml_http_response_encode(get_lang('BackToGroup')).'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php?group_id='.$group_id.'">'.Display::return_icon('message_new.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).api_xml_http_response_encode(get_lang('ComposeMessage')).'</a>';
echo '</div>';
} else {
if (api_get_setting('extended_profile') == 'true') {
if ($_GET['f']=='social') {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
SocialManager::show_social_menu();
echo '<div class="actions-title">';
echo get_lang('Messages');
echo '</div>';
$social_parameter = '?f=social';
} else {
echo '<div class=actions>';
if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') {
echo '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'&nbsp;'.get_lang('ViewSharedProfile').'</a>';
}
@ -256,11 +257,11 @@ if ($group_id != 0) {
echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.gif', get_lang('EditExtendProfile')).'&nbsp;'.get_lang('EditExtendProfile').'</a>';
}
//echo '</span>';
echo '</div>';
}
}
echo '</div>';
@ -268,9 +269,9 @@ echo '<div id="inbox-wrapper">';
//LEFT COLUMN
echo '<div id="inbox-menu">';
echo '<ul>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.Display::return_icon('message_new.png',get_lang('ComposeMessage')).get_lang('ComposeMessage').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$social_parameter.'">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$social_parameter.'">'.Display::return_icon('message_new.png',get_lang('ComposeMessage')).get_lang('ComposeMessage').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php'.$social_parameter.'">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '</ul>';
echo '</div>';

@ -6,7 +6,7 @@
==============================================================================
*/
// name of the language file that needs to be included
$language_file = array('registration','messages','userInfo','admin');
$language_file = array('registration','messages','userInfo');
$cidReset=true;
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'message.lib.php';
@ -69,31 +69,39 @@ if ($_GET['f']=='social') {
Display::display_header('');
if (api_get_setting('extended_profile') == 'true') {
echo '<div class="actions">';
if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') {
echo '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'&nbsp;'.get_lang('ViewSharedProfile').'</a>';
}
if (api_get_setting('allow_message_tool') == 'true') {
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>';
}
$show = isset($_GET['show']) ? '&amp;show='.Security::remove_XSS($_GET['show']) : '';
//echo '<span style="float:right; padding-top:7px;">';
if (isset($_GET['type']) && $_GET['type'] == 'extended') {
echo '<a href="profile.php?type=reduced'.$show.'">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
if ($_GET['f']=='social') {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
SocialManager::show_social_menu();
echo '<div class="actions-title">';
echo get_lang('Messages');
echo '</div>';
$social_parameter = '?f=social';
} else {
echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.gif', get_lang('EditExtendProfile')).'&nbsp;'.get_lang('EditExtendProfile').'</a>';
}
//echo '</span>';
echo '</div>';
if (api_get_setting('extended_profile') == 'true') {
echo '<div class="actions">';
if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') {
echo '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'&nbsp;'.get_lang('ViewSharedProfile').'</a>';
}
if (api_get_setting('allow_message_tool') == 'true') {
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>';
}
$show = isset($_GET['show']) ? '&amp;show='.Security::remove_XSS($_GET['show']) : '';
//echo '<span style="float:right; padding-top:7px;">';
if (isset($_GET['type']) && $_GET['type'] == 'extended') {
echo '<a href="profile.php?type=reduced'.$show.'">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
} else {
echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.gif', get_lang('EditExtendProfile')).'&nbsp;'.get_lang('EditExtendProfile').'</a>';
}
//echo '</span>';
echo '</div>';
}
}
/**************************************************************/
$info_delete_outbox=array();
$info_delete_outbox=explode(',',$_GET['form_delete_outbox']);
@ -120,9 +128,9 @@ echo '<div id="inbox-wrapper">';
//LEFT COLUMN
echo '<div id="inbox-menu">';
echo '<ul>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.Display::return_icon('message_new.png',get_lang('ComposeMessage')).get_lang('ComposeMessage').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$social_parameter.'">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$social_parameter.'">'.Display::return_icon('message_new.png',get_lang('ComposeMessage')).get_lang('ComposeMessage').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php'.$social_parameter.'">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '</ul>';
echo '</div>';

Loading…
Cancel
Save