Cleaning migration and installation scripts, added some dummy divs, improving message navigation (breadcrumb) see CT#190

skala
Julio Montoya 15 years ago
parent 3ec0d9b555
commit 70edd2e396
  1. 28
      main/css/blue_lagoon/default.css
  2. 2
      main/inc/banner.inc.php
  3. 2
      main/inc/lib/banner.lib.php
  4. 69
      main/inc/lib/message.lib.php
  5. 28
      main/inc/lib/social.lib.php
  6. 15
      main/install/dokeos_main.sql
  7. 12
      main/install/migrate-db-1.8.6.1-1.8.6.2-pre.sql
  8. 30
      main/messages/inbox.php
  9. 14
      main/messages/new_message.php
  10. 31
      main/messages/outbox.php
  11. 15
      main/messages/view_message.php
  12. 17
      main/social/friends.php
  13. 2
      main/social/group_add.php
  14. 2
      main/social/group_edit.php
  15. 7
      main/social/group_invitation.php
  16. 6
      main/social/group_waiting_list.php
  17. 22
      main/social/groups.php
  18. 40
      main/social/home.php
  19. 26
      main/social/invitations.php
  20. 5
      main/social/profile.php
  21. 14
      main/social/search.php
  22. 8
      user_portal.php

@ -2694,7 +2694,6 @@ a.unread {
padding:0px;
}
#inbox-menu ul li {
padding:2px 0px;
}
@ -2939,7 +2938,6 @@ a.unread {
.search_users_grid_title { width:30%; float:left;}
.search_users_grid_nav { float:right;}
/*WAITING USER*/
.waiting_user_grid_container { width:100%;}
.waiting_user_grid_item { width:500px; height: 120px; border:1px dotted #ccc; float:left; padding:5px; margin:5px;}
@ -2986,5 +2984,31 @@ a.unread {
float: right;
min-height: 150px;
padding-bottom:30px;
}
/* SOCIAL MENU VERTICAL */
.social_menu {
width:150px;
float:left;
}
.social_menu ul {
list-style-image:none;
list-style-position:outside;
list-style-type:none;
margin:0;
padding:0px;
}
.social_menu ul li {
padding:2px 0px;
}
/* INVITATIONS */
.invitation_confirm {
border-top:1px solid #D8DFEA;
}
.invitation_image {
width:110px;
}

@ -199,7 +199,7 @@ if ($_user['user_id'] && !api_is_anonymous()) {
}
// My Profile
if (api_get_setting('show_tabs', 'my_profile') == 'true') {
if (api_get_setting('show_tabs', 'my_profile') == 'true' && api_get_setting('show_tabs', 'social') != 'true') {
$navigation['myprofile'] = $possible_tabs['myprofile'];
} else {
$menu_navigation['myprofile'] = $possible_tabs['myprofile'];

@ -64,7 +64,7 @@ function get_tabs() {
// Social
if (api_get_setting('allow_social_tool')=='true') {
$navigation['social']['url'] = api_get_path(WEB_CODE_PATH).'social/profile.php';
$navigation['social']['url'] = api_get_path(WEB_CODE_PATH).'social/home.php';
$navigation['social']['title'] = get_lang('SocialNetwork');
}

@ -162,8 +162,16 @@ class MessageManager
} else {
$class = 'class = "read"';
}
$message[2] = '<a '.$class.' href="view_message.php?id='.$result[0].'">'.GetFullUserName(($result[1])).'</a>';;
$message[3] = '<a '.$class.' href="view_message.php?id='.$result[0].'">'.$result[2].'</a>';
$link = '';
if ($_GET['f']=='social') {
$link = '&f=social';
}
$message[2] = '<a '.$class.' href="view_message.php?id='.$result[0].$link.'">'.GetFullUserName(($result[1])).'</a>';;
$message[3] = '<a '.$class.' href="view_message.php?id='.$result[0].$link.'">'.$result[2].'</a>';
$message[5] = '<a href="new_message.php?re_id='.$result[0].'">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).'</a>'.
'&nbsp;&nbsp;<a delete_one_message('.$result[0].') href="inbox.php?action=deleteone&id='.$result[0].'">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
}
@ -510,14 +518,19 @@ class MessageManager
if ($result[5]==4) {
$message[1] = Display::return_icon('mail_send.png',get_lang('MessageSent'));//Message Sent
}
$message[2] = '<a onclick="show_sent_message('.$result[0].')" href="javascript:void(0)">'.GetFullUserName($result[4]).'</a>';
$message[3] = '<a onclick="show_sent_message('.$result[0].')" href="javascript:void(0)">'.str_replace("\\","",$result[2]).'</a>';
$message[5] = '&nbsp;&nbsp;<a onclick="delete_one_message_outbox('.$result[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
} else {
$message[2] = '<a '.$class.' onclick="show_sent_message ('.$result[0].')" href="../messages/view_message.php?id_send='.$result[0].'">'.GetFullUserName($result[4]).'</a>';
$message[3] = '<a '.$class.' onclick="show_sent_message ('.$result[0].')" href="../messages/view_message.php?id_send='.$result[0].'">'.$result[2].'</a>';
$message[5] = '<a '.$class.' href="new_message.php?re_id='.$result[0].'">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).'</a>'.
'&nbsp;&nbsp;<a href="outbox.php?action=deleteone&id='.$result[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmDeleteMessage')))."'".')) return false;">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
$link = '';
if ($_GET['f']=='social') {
$link = '&f=social';
}
$message[2] = '<a '.$class.' onclick="show_sent_message ('.$result[0].')" href="../messages/view_message.php?id_send='.$result[0].$link.'">'.GetFullUserName($result[4]).'</a>';
$message[3] = '<a '.$class.' onclick="show_sent_message ('.$result[0].')" href="../messages/view_message.php?id_send='.$result[0].$link.'">'.$result[2].'</a>';
$message[5] = '<a href="outbox.php?action=deleteone&id='.$result[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmDeleteMessage')))."'".')) return false;">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
}
$message[4] = $result[3]; //date stays the same
foreach($message as $key => $value) {
@ -601,7 +614,6 @@ class MessageManager
$user_image = '<img src="'.$user_image['file'].'" style="'.$user_image['style'].'" >';
*/
if ($source == 'outbox') {
// $message_content .='<TD>'.get_lang('From').'&nbsp;'.GetFullUserName($row[2]).'</b> '.api_strtolower(get_lang('To')).' <b>'.GetFullUserName($row[1]).'</b> </TD>';
$message_content .='<TD>'.get_lang('From').' '.$user_image.'<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$row[1].'">'.GetFullUserName($row[1]).'</a> '.api_strtolower(get_lang('To')).'&nbsp;<b>'.GetFullUserName($row[2]).'</b> </TD>';
} else {
$message_content .='<TD>'.get_lang('From').' '.$user_image.'<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$row[1].'">'.GetFullUserName($row[1]).'</a> '.api_strtolower(get_lang('To')).'&nbsp;<b>'.get_lang('Me').'</b> </TD>';
@ -631,15 +643,18 @@ class MessageManager
</TABLE>
<div id="message-attach">'.(!empty($files_attachments)?implode('&nbsp;|&nbsp;',$files_attachments):'').'</div>
<DIV class=HT style="PADDING-BOTTOM: 5px">';
$social_link = '';
if ($_GET['f'] == 'social') {
$social_link = 'f=social';
}
if ($source == 'outbox') {
$message_content .= '<a href="outbox.php">'.Display::return_icon('back.png',get_lang('ReturnToOutbox')).get_lang('ReturnToOutbox').'</a> &nbsp';
$message_content .= '<a href="outbox.php?'.$social_link.'">'.Display::return_icon('back.png',get_lang('ReturnToOutbox')).get_lang('ReturnToOutbox').'</a> &nbsp';
} else {
$message_content .= '<a href="inbox.php">'.Display::return_icon('back.png',get_lang('ReturnToInbox')).get_lang('ReturnToInbox').'</a> &nbsp';
$message_content .= '<a href="new_message.php?re_id='.$message_id.'">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).get_lang('ReplyToMessage').'</a> &nbsp';
$message_content .= '<a href="inbox.php?'.$social_link.'">'.Display::return_icon('back.png',get_lang('ReturnToInbox')).get_lang('ReturnToInbox').'</a> &nbsp';
$message_content .= '<a href="new_message.php?re_id='.$message_id.'&'.$social_link.'">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).get_lang('ReplyToMessage').'</a> &nbsp';
}
$message_content .= '<a href="inbox.php?action=deleteone&id='.$message_id.'" >'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).''.get_lang('DeleteMessage').'</a>&nbsp';
$message_content .= '<a href="inbox.php?action=deleteone&id='.$message_id.'&'.$social_link.'" >'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).''.get_lang('DeleteMessage').'</a>&nbsp';
@ -926,6 +941,11 @@ function inbox_display() {
$table->set_header(4,api_xml_http_response_encode(get_lang('Date')),false,array('style' => 'width:150px;'));
$table->set_header(5,$action,false,array ('style' => 'width:100px;'));
if ($_REQUEST['f']=='social') {
$parameters['f'] = 'social';
$table->set_additional_parameters($parameters);
}
echo '<div id="div_content_table_data">';
if ($request===true) {
echo '<form name="form_send" id="form_send" action="" method="post">';
@ -958,17 +978,22 @@ function outbox_display() {
$table_message = Database::get_main_table(TABLE_MESSAGE);
$request=api_is_xml_http_request();
global $charset;
$social_link = false;
if ($_REQUEST['f']=='social') {
$social_link ='f=social';
}
if ($_SESSION['social_exist']===true) {
$redirect="#remote-tab-3";
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') {
$success= get_lang('SelectedMessagesDeleted')."&nbsp<br><a href=\""."../social/index.php?$redirect\">".get_lang('BackToOutbox')."</a>";
$success= get_lang('SelectedMessagesDeleted')."&nbsp<br><a href=\""."../social/index.php?$social_link\">".get_lang('BackToOutbox')."</a>";
}else {
$success=get_lang('SelectedMessagesDeleted')."&nbsp<br><a href=\""."../social/index.php?$redirect\">".get_lang('BackToOutbox')."</a>";
$success=get_lang('SelectedMessagesDeleted')."&nbsp<br><a href=\""."../social/index.php?$social_link\">".get_lang('BackToOutbox')."</a>";
}
} else {
$success= get_lang('SelectedMessagesDeleted')."&nbsp</b>"."<br><a href=\""."outbox.php\">".get_lang('BackToOutbox')."</a>";
$success= get_lang('SelectedMessagesDeleted').'&nbsp</b><br /><a href="outbox.php?'.$social_link.'">'.get_lang('BackToOutbox').'</a>';
}
if (isset ($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
@ -989,6 +1014,7 @@ function outbox_display() {
}
}
// display sortable table with messages of the current user
$table = new SortableTable('messages', 'get_number_of_messages_send_mask', 'get_message_data_send_mask', 3, get_number_of_messages_send_mask(), 'DESC');
$title=api_xml_http_response_encode(get_lang('Title'));
@ -999,10 +1025,19 @@ function outbox_display() {
$table->set_header(3, $title,false);
$table->set_header(4, api_xml_http_response_encode(get_lang('Date')),false,array ('style' => 'width:150px;'));
$table->set_header(5,$action, false,array ('style' => 'width:100px;'));
if ($_REQUEST['f']=='social') {
$parameters['f'] = 'social';
$table->set_additional_parameters($parameters);
}
echo '<div id="div_content_table_data_sent">';
if ($request===true) {
echo '<form name="form_send_out" id="form_send_out" action="" method="post">';
echo '<input type="hidden" name="action" value="delete" />';
$table->display();
echo '</form>';
if (get_number_of_messages_send_mask() > 0) {

@ -10,7 +10,6 @@
==============================================================================
*/
// Relation type between users
define('USERUNKNOW', 0);
define('SOCIALUNKNOW', 1);
@ -646,15 +645,24 @@ class SocialManager extends UserManager {
return $output;
}
public static function show_social_menu() {
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png').' '.get_lang('ViewMySharedProfile').'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('lp_users.png').' '.get_lang('Friends').'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('lp_users.png').' '.get_lang('Invitations').'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.gif').' '.get_lang('Groups').'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('search.gif').' '.get_lang('Search').'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php?show=1">'.Display::return_icon('edit.gif').' '.get_lang('EditProfile').'</a>';
public static function show_social_menu($show = '' ) {
echo '<div class="social_menu">';
echo '<ul>';
echo '<li>'.get_lang('Menu').'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/home.php">'.Display::return_icon('home.png').' '.get_lang('Home').'</a></li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a></li>';
if ($show == 'messages') {
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.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?f=social">'.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?f=social">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a></li>';
}
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('lp_users.png').' '.get_lang('Invitations').'</a></li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png').' '.get_lang('ViewMySharedProfile').'</a></li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('lp_users.png').' '.get_lang('Friends').'</a></li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.gif').' '.get_lang('Groups').'</a></li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('search.gif').' '.get_lang('Search').'</a></li>';
//echo '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php?show=1">'.Display::return_icon('edit.gif').' '.get_lang('EditProfile').'</a>';
/*
echo '<span style="float:right; padding-top:7px;">'.
'<a href="/main/auth/profile.php?show=1">'.Display::return_icon('edit.gif').' '.get_lang('Configuration').'</a>';

@ -2302,7 +2302,7 @@ CREATE TABLE session_category (
CREATE TABLE tag (
id int NOT NULL auto_increment,
tag varchar(255) NOT NULL,
tag char(80) NOT NULL,
field_id int NOT NULL,
count int NOT NULL,
PRIMARY KEY (id)
@ -2320,7 +2320,7 @@ CREATE TABLE user_rel_tag (
-- Table structure for user platform groups
--
CREATE TABLE `group` (
CREATE TABLE groups (
id int NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
description varchar(255) NOT NULL,
@ -2338,8 +2338,9 @@ CREATE TABLE group_rel_tag (
group_id int NOT NULL,
PRIMARY KEY (id)
);
ALTER TABLE `group_rel_tag` ADD INDEX ( group_id );
ALTER TABLE `group_rel_tag` ADD INDEX ( tag_id );
ALTER TABLE group_rel_tag ADD INDEX ( group_id );
ALTER TABLE group_rel_tag ADD INDEX ( tag_id );
CREATE TABLE group_rel_user (
id int NOT NULL AUTO_INCREMENT,
@ -2348,9 +2349,9 @@ CREATE TABLE group_rel_user (
relation_type int NOT NULL,
PRIMARY KEY (id)
);
ALTER TABLE `group_rel_user` ADD INDEX ( group_id );
ALTER TABLE `group_rel_user` ADD INDEX ( user_id );
ALTER TABLE `group_rel_user` ADD INDEX ( relation_type );
ALTER TABLE group_rel_user ADD INDEX ( group_id );
ALTER TABLE group_rel_user ADD INDEX ( user_id );
ALTER TABLE group_rel_user ADD INDEX ( relation_type );
--
-- Table structure for table message attachment
--

@ -49,7 +49,7 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('go_to_cour
CREATE TABLE IF NOT EXISTS message_attachment (id int NOT NULL AUTO_INCREMENT, path varchar(255) NOT NULL, comment text, size int NOT NULL default 0, message_id int NOT NULL, filename varchar(255) NOT NULL, PRIMARY KEY(id));
CREATE TABLE `group` (id int NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, description varchar(255) NOT NULL, picture_uri varchar(255) NOT NULL, url varchar(255) NOT NULL, visibility int NOT NULL, updated_on varchar(255) NOT NULL, created_on varchar(255) NOT NULL, PRIMARY KEY (id));
CREATE TABLE groups (id int NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, description varchar(255) NOT NULL, picture_uri varchar(255) NOT NULL, url varchar(255) NOT NULL, visibility int NOT NULL, updated_on varchar(255) NOT NULL, created_on varchar(255) NOT NULL, PRIMARY KEY (id));
CREATE TABLE group_rel_tag (id int NOT NULL AUTO_INCREMENT, tag_id int NOT NULL, group_id int NOT NULL, PRIMARY KEY (id));
CREATE TABLE group_rel_user (id int NOT NULL AUTO_INCREMENT, group_id int NOT NULL, user_id int NOT NULL, relation_type int NOT NULL, PRIMARY KEY (id));
@ -69,11 +69,11 @@ UPDATE TABLE settings_current SET selected_value = '1.8.6.2.9070' WHERE variable
INSERT INTO course_field (field_type, field_variable, field_display_text, field_default_value, field_visible, field_changeable) values (10, 'special_course','SpecialCourse', 'Yes', 1 , 1);
ALTER TABLE `group_rel_user` ADD INDEX ( group_id );
ALTER TABLE `group_rel_user` ADD INDEX ( user_id );
ALTER TABLE `group_rel_user` ADD INDEX ( relation_type );
ALTER TABLE `group_rel_tag` ADD INDEX ( group_id );
ALTER TABLE `group_rel_tag` ADD INDEX ( tag_id );
ALTER TABLE group_rel_user ADD INDEX ( group_id );
ALTER TABLE group_rel_user ADD INDEX ( user_id );
ALTER TABLE group_rel_user ADD INDEX ( relation_type );
ALTER TABLE group_rel_tag ADD INDEX ( group_id );
ALTER TABLE group_rel_tag ADD INDEX ( tag_id );
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_students_to_create_groups_in_social', NULL, 'radio', 'Tools', 'false', 'AllowStudentsToCreateGroupsInSocialTitle', 'AllowStudentsToCreateGroupsInSocialComment', NULL, NULL, 0);

@ -13,8 +13,12 @@ require_once api_get_path(LIBRARY_PATH).'message.lib.php';
api_block_anonymous_users();
if (isset($_GET['messages_page_nr'])) {
$social_link = '';
if ($_REQUEST['f']=='social') {
$social_link = '?f=social';
}
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') {
header('Location:inbox.php');
header('Location:inbox.php'.$social_link);
}
}
if (api_get_setting('allow_message_tool')!='true'){
@ -133,21 +137,12 @@ Display::display_header('');
$social_parameter = '';
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 {
//comes from normal profile
/*
echo '<div class=actions>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',api_xml_http_response_encode(get_lang('Inbox'))).api_xml_http_response_encode(get_lang('Inbox')).'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.Display::return_icon('message_new.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).api_xml_http_response_encode(get_lang('ComposeMessage')).'</a>';
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>'; */
echo '<div class="actions">';
@ -166,13 +161,22 @@ if ($_GET['f']=='social') {
echo '<div id="inbox-wrapper">';
//LEFT CONTENT
if (api_get_setting('allow_social_tool') != 'true') {
echo '<div id="inbox-menu" class="actions">';
echo '<ul>';
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 '<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 '</ul>';
echo '</div>';
} else {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
SocialManager::show_social_menu('messages');
}
echo '<div id="inbox">';
//MAIN CONTENT

@ -266,12 +266,9 @@ if ($group_id != 0) {
echo '</div>';
} else {
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') {
@ -292,13 +289,18 @@ if ($group_id != 0) {
echo '<div id="inbox-wrapper" >';
//LEFT COLUMN
if (api_get_setting('allow_social_tool') != 'true') {
echo '<div id="inbox-menu" class="actions">';
echo '<ul>';
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 '<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 '</ul>';
echo '</div>';
} else {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
SocialManager::show_social_menu('messages');
}
echo '<div id="inbox">';

@ -12,11 +12,17 @@ require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'message.lib.php';
api_block_anonymous_users();
if (isset($_GET['messages_page_nr'])) {
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') {
header('Location:outbox.php?pager="'.Security::remove_XSS($_GET['messages_page_nr']).'"&remote=3#remote-tab-3');
$social_link = '';
if ($_REQUEST['f']=='social') {
$social_link = '&f=social';
}
header('Location:outbox.php?pager='.Security::remove_XSS($_GET['messages_page_nr']).$social_link.'');
}
}
if (api_get_setting('allow_message_tool')!='true'){
api_not_allowed();
}
@ -47,6 +53,9 @@ function deselect_all(formita)
</script>';
/*
==============================================================================
MAIN CODE
@ -70,12 +79,14 @@ if ($_GET['f']=='social') {
Display::display_header('');
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';
/* 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>';*/
} else {
if (api_get_setting('extended_profile') == 'true') {
@ -116,13 +127,19 @@ $user_sender_id=api_get_user_id();
echo '<div id="inbox-wrapper">';
//LEFT COLUMN
if (api_get_setting('allow_social_tool') != 'true') {
echo '<div id="inbox-menu" class="actions">';
echo '<ul>';
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 '<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 '</ul>';
echo '</div>';
} else {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
SocialManager::show_social_menu('messages');
}
echo '<div id="inbox">';

@ -33,8 +33,6 @@ $interbreadcrumb[]= array ('url' => '#','name' => get_lang('View'));
Display::display_header('');
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>';
@ -57,13 +55,18 @@ if ($_GET['f']=='social') {
echo '<div id="inbox-wrapper">';
//LEFT COLUMN
echo '<div id="inbox-menu">';
if (api_get_setting('allow_social_tool') != 'true') {
echo '<div id="inbox-menu" class="actions">';
echo '<ul>';
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 '<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 '</ul>';
echo '</div>';
} else {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
SocialManager::show_social_menu('messages');
}
echo '<div id="inbox">';
//MAIN CONTENT

@ -20,14 +20,10 @@ api_block_anonymous_users();
$this_section = SECTION_SOCIAL;
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
//$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-1.1.3.1.pack.js" type="text/javascript"></script>';
//$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.history_remote.pack.js" type="text/javascript"></script>';
//$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.tabs.pack.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<script type="text/javascript">
function delete_friend (element_div) {
id_image=$(element_div).attr("id");
user_id=id_image.split("_");
@ -92,12 +88,19 @@ $interbreadcrumb[]= array ('url' =>'profile.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Friends'));
Display :: display_header($tool_name, 'Groups');
SocialManager::show_social_menu();
echo '<div class="actions-title">';
echo get_lang('MyFriends');
echo '</div>';
echo '<div id="social_wrapper">';
//this include the social menu div
SocialManager::show_social_menu(array('messages'));
echo '<div id="social_main">';
$language_variable = api_xml_http_response_encode(get_lang('Contacts'));
$user_id = api_get_user_id();
@ -172,5 +175,9 @@ $user_id = api_get_user_id();
</table>
</div>
<?php
echo '</div>';
echo '</div>';
Display :: display_footer();
?>

@ -20,7 +20,7 @@ if (api_get_setting('allow_students_to_create_groups_in_social') == 'false' && !
global $charset;
$htmlHeadXtra[] = '<script type="text/javascript" src="/main/inc/lib/javascript/jquery.js"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
$htmlHeadXtra[] = '<script type="text/javascript">
textarea = "";
num_characters_permited = 255;

@ -20,7 +20,7 @@ require_once $libpath.'image.lib.php';
require_once $libpath.'mail.lib.inc.php';
require_once $libpath.'social.lib.php';
$htmlHeadXtra[] = '<script type="text/javascript" src="/main/inc/lib/javascript/jquery.js"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
$htmlHeadXtra[] = '<script type="text/javascript">
textarea = "";
num_characters_permited = 255;

@ -17,10 +17,9 @@ require_once ('../inc/lib/xajax/xajax.inc.php');
api_block_anonymous_users();
$htmlHeadXtra[] = '<script type="text/javascript" src="/main/inc/lib/javascript/jquery.js"></script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="/main/inc/lib/javascript/thickbox.js"></script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="/main/inc/lib/javascript/thickbox.css" type="text/css" media="projection, screen">';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.css" type="text/css" media="projection, screen">';
$xajax = new xajax();
//$xajax->debugOn();

@ -11,9 +11,9 @@ require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
$htmlHeadXtra[] = '<script type="text/javascript" src="/main/inc/lib/javascript/jquery.js"></script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="/main/inc/lib/javascript/thickbox.js"></script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="/main/inc/lib/javascript/thickbox.css" type="text/css" media="projection, screen">';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.css" type="text/css" media="projection, screen">';
$this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' =>'home.php','name' => get_lang('Social'));

@ -17,9 +17,9 @@ api_block_anonymous_users();
$this_section = SECTION_SOCIAL;
$htmlHeadXtra[] = '<script type="text/javascript" src="/main/inc/lib/javascript/jquery.js"></script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="/main/inc/lib/javascript/thickbox.js"></script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="/main/inc/lib/javascript/thickbox.css" type="text/css" media="projection, screen">';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.css" type="text/css" media="projection, screen">';
$htmlHeadXtra[] = '<script type="text/javascript">
@ -66,8 +66,7 @@ $interbreadcrumb[]= array ('url' =>'profile.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Groups'));
Display :: display_header($tool_name, 'Groups');
//show the action menu
SocialManager::show_social_menu();
echo '<div class="actions-title">';
echo get_lang('Groups');
echo '</div>';
@ -92,6 +91,15 @@ if (isset($_POST['token']) && $_POST['token'] == $_SESSION['sec_token']) {
// getting group information
$group_id = intval($_GET['id']);
echo '<div id="social_wrapper">';
//this include the social menu div
SocialManager::show_social_menu(array('messages'));
echo '<div id="social_main">';
if ($group_id != 0 ) {
//Loading group information
if (isset($_GET['status']) && $_GET['status']=='sent') {
@ -143,7 +151,6 @@ if ($group_id != 0 ) {
} else {
// My groups -----
$results = GroupPortalManager::get_groups_by_user(api_get_user_id(), 0, true);
@ -222,6 +229,9 @@ if ($group_id != 0 ) {
Display::display_sortable_grid('popular', array(), $groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,true,true));
}
echo '</div>';
echo '</div>';
}

@ -5,4 +5,42 @@
* @author Julio Montoya <gugli100@gmail.com>
*/
header('Location:profile.php');
$language_file = array('registration','messages','userInfo','admin','forum','blog');
$cidReset = true;
require '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
require_once api_get_path(LIBRARY_PATH).'array.lib.php';
require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php';
$user_id = api_get_user_id();
$show_full_profile = true;
//social tab
$this_section = SECTION_SOCIAL;
api_block_anonymous_users();
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
Display :: display_header(null);
echo '<div id="social_wrapper">';
//this include the social menu div
SocialManager::show_social_menu(array('messages'));
echo '<div id="social_main">';
echo '<div id="social_center">';
echo 'myinfo';
echo '</div>';
echo '<div id="social_right">';
echo 'group info';
echo '</div>';
echo '</div>';
echo '</div>';
Display :: display_footer();

@ -66,10 +66,12 @@ function register_friend(element_input) {
api_block_anonymous_users();
Display :: display_header($tool_name, 'Groups');
SocialManager::show_social_menu();
echo '<div class="actions-title">';
echo get_lang('Invitations');
echo '</div>';
// easy links
if (is_array($_GET) && count($_GET)>0) {
foreach($_GET as $key => $value) {
@ -99,7 +101,15 @@ if (is_array($_GET) && count($_GET)>0) {
$language_variable = get_lang('PendingInvitations');
$language_comment = get_lang('SocialInvitesComment');
//api_display_tool_title($language_variable);
echo '<div id="social_wrapper">';
//this include the social menu div
SocialManager::show_social_menu(array('messages'));
echo '<div id="social_main">';
?>
<div id="id_response" align="center"></div>
<?php
@ -112,15 +122,6 @@ $pending_invitations = GroupPortalManager::get_groups_by_user($user_id, GROUP_
$number_loop=count($list_get_invitation);
//@todo move this to default.css
echo '<style>
.invitation_confirm {
border-top:1px solid #D8DFEA;
}
.invitation_image {
width:110px;
}
</style>';
if ($number_loop != 0) {
echo '<h2>'.get_lang('InvitationReceived').'</h2>';
@ -223,5 +224,8 @@ if (count($pending_invitations) > 0) {
Display::display_sortable_grid('waiting_user', array(), $new_invitation, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false,false,true,true,true,true));
}
echo '</div>';
echo '</div>';
Display::display_footer();
?>

@ -62,7 +62,7 @@ require_once $libpath.'magpierss/rss_fetch.inc';
api_block_anonymous_users();
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.corners.min.js" type="text/javascript" language="javascript"></script>'; //jQuery corner
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.corners.min.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.js"></script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.css" type="text/css" media="projection, screen">';
$htmlHeadXtra[] = '
@ -179,6 +179,7 @@ function register_friend(element_input) {
}
</script>';
if (isset($_GET['shared'])) {
$my_link='../social/profile.php';
$link_shared='shared='.Security::remove_XSS($_GET['shared']);
@ -246,7 +247,7 @@ if (is_array($personal_course_list)) {
}
//show the action menu
SocialManager::show_social_menu();
//SocialManager::show_social_menu();
echo '<div class="actions-title">';
if ($user_id == api_get_user_id())

@ -20,12 +20,19 @@ $tool_name = get_lang('Search');
$interbreadcrumb[]= array ('url' =>'profile.php','name' => get_lang('Social'));
Display :: display_header($tool_name);
//show the action menu
SocialManager::show_social_menu();
echo '<div class="actions-title">';
echo get_lang('Search');
echo '</div>';
echo '<div id="social_wrapper">';
//this include the social menu div
SocialManager::show_social_menu(array('messages'));
echo '<div id="social_main">';
$query = $_GET['q'];
echo UserManager::get_search_form($query);
@ -72,5 +79,8 @@ if ($query != '') {
} else {
//we should show something
}
echo '</div>';
echo '</div>';
Display :: display_footer();
?>

@ -1250,8 +1250,12 @@ if ($show_menu) {
echo '<div class="message-content">
<h2 class="message-title">'.get_lang('Messages').'</h2>
<p>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php" class="message-body">'.get_lang('Inbox').$cant_msg.' </a><br />';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php" class="message-body">'.get_lang('Comppose').' </a><br />';
$link = '';
if (api_get_setting('show_tabs', 'social') == 'true') {
$link = '?f=social';
}
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'" class="message-body">'.get_lang('Inbox').$cant_msg.' </a><br />';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'" class="message-body">'.get_lang('Comppose').' </a><br />';
if ($number_of_new_messages_of_friend > 0) {
echo '<a href="'.api_get_path(WEB_PATH).'main/social/invitations.php" class="message-body">'.get_lang('PendingInvitations').' ('.$number_of_new_messages_of_friend.') </a><br />';

Loading…
Cancel
Save