skala
Julio Montoya 14 years ago
commit 2d455a21c8
  1. 56
      index.php
  2. 10
      main/auth/profile.php
  3. 37
      main/messages/inbox.php
  4. 20
      main/messages/new_message.php
  5. 14
      main/messages/outbox.php
  6. 20
      main/messages/view_message.php
  7. 3
      main/social/friends.php
  8. 8
      main/social/group_add.php
  9. 8
      main/social/group_edit.php
  10. 7
      main/social/group_members.php
  11. 8
      main/social/group_waiting_list.php
  12. 7
      main/social/groups.php
  13. 5
      main/social/home.php
  14. 6
      main/social/invitations.php
  15. 14
      main/social/message_for_group_form.inc.php
  16. 10
      main/social/myfiles.php
  17. 5
      main/social/profile.php
  18. 3
      main/social/profile_friends_and_groups.inc.php
  19. 3
      main/social/search.php
  20. 17
      user_portal.php

@ -226,30 +226,31 @@ echo '</div>';
echo '<div id="menu-wrapper">';
if (!api_is_anonymous()) {
// @todo move all this in a class/function
if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') {
// @todo move all this in a class/function
//Always show the user image
$img_array = UserManager::get_user_picture_path_by_id(api_get_user_id(), 'web', true, true);
$no_image = false;
if ($img_array['file'] == 'unknown.jpg') {
$no_image = true;
}
$img_array = UserManager::get_picture_user(api_get_user_id(), $img_array['file'], 50, USER_IMAGE_SIZE_MEDIUM, ' width="90" height="90" ');
$profile_content .='<div id="social_widget">';
$profile_content .= '<div id="social_widget_image">';
if (api_get_setting('allow_social_tool') == 'true') {
if (!$no_image) {
$profile_content .='<a href="'.api_get_path(WEB_PATH).'main/social/home.php"><img src="'.$img_array['file'].'" '.$img_array['style'].' border="1"></a>';
} else {
$profile_content .='<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php"><img title="'.get_lang('EditProfile').'" src="'.$img_array['file'].'" '.$img_array['style'].' border="1"></a>';
}
//Always show the user image
$img_array = UserManager::get_user_picture_path_by_id(api_get_user_id(), 'web', true, true);
$no_image = false;
if ($img_array['file'] == 'unknown.jpg') {
$no_image = true;
}
$img_array = UserManager::get_picture_user(api_get_user_id(), $img_array['file'], 50, USER_IMAGE_SIZE_MEDIUM, ' width="90" height="90" ');
$profile_content .='<div id="social_widget">';
$profile_content .= '<div id="social_widget_image">';
if (api_get_setting('allow_social_tool') == 'true') {
if (!$no_image) {
$profile_content .='<a href="'.api_get_path(WEB_PATH).'main/social/home.php"><img src="'.$img_array['file'].'" '.$img_array['style'].' border="1"></a>';
} else {
$profile_content .='<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php"><img title="'.get_lang('EditProfile').'" src="'.$img_array['file'].'" '.$img_array['style'].' border="1"></a>';
}
$profile_content .= ' </div></div>';
} else {
$profile_content .='<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php"><img title="'.get_lang('EditProfile').'" src="'.$img_array['file'].'" '.$img_array['style'].' border="1"></a>';
}
$profile_content .= ' </div></div>';
if (api_get_setting('allow_message_tool') == 'true') {
require_once api_get_path(LIBRARY_PATH).'message.lib.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
@ -272,19 +273,20 @@ if (!api_is_anonymous()) {
$profile_content .= '<div class="clear"></div>';
$profile_content .= '<div class="message-content"><ul class="menulist">';
$link = '';
if (api_get_setting('show_tabs', 'social') == 'true') {
if (api_get_setting('allow_social_tool') == 'true') {
$link = '?f=social';
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'" class="message-body">'.get_lang('Inbox').$cant_msg.' </a></li>';
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'" class="message-body">'.get_lang('Compose').' </a></li>';
if ($total_invitations == 0) {
$total_invitations = '';
} else {
$total_invitations = ' ('.$total_invitations.')';
if (api_get_setting('allow_social_tool') == 'true') {
if ($total_invitations == 0) {
$total_invitations = '';
} else {
$total_invitations = ' ('.$total_invitations.')';
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php" class="message-body">'.get_lang('PendingInvitations').' '.$total_invitations.' </a></li>';
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php" class="message-body">'.get_lang('PendingInvitations').' '.$total_invitations.' </a></li>';
$profile_content .= '</ul>';
$profile_content .= '</div>';
}

@ -72,7 +72,7 @@ function show_icon_edit(element_html) {
}
</script>';
$interbreadcrumb[] = array('url' => '../auth/profile.php', 'name' => get_lang('ModifyProfile'));
//$interbreadcrumb[] = array('url' => '../auth/profile.php', 'name' => get_lang('ModifyProfile'));
if (!empty ($_GET['coursePath'])) {
$course_url = api_get_path(WEB_COURSE_PATH).htmlentities(strip_tags($_GET['coursePath'])).'/index.php';
$interbreadcrumb[] = array('url' => $course_url, 'name' => Security::remove_XSS($_GET['courseCode']));
@ -742,14 +742,6 @@ if ($form->validate()) {
}
//if (isset($_GET['show'])) {
//if ((api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') || (api_get_setting('allow_social_tool') == 'true')) {
//$interbreadcrumb[] = array ('url' => 'javascript: void(0);', 'name' => get_lang('SocialNetwork'));
//} elseif ((api_get_setting('allow_social_tool') == 'false' && api_get_setting('allow_message_tool') == 'true')) {
//$interbreadcrumb[] = array('url' => 'javascript: void(0);', 'name' => get_lang('MessageTool'));
//}
//}
/* MAIN DISPLAY SECTION */
// the header
Display::display_header(get_lang('ModifyProfile'));

@ -95,10 +95,10 @@ if (isset($_GET['form_reply']) || isset($_GET['form_delete'])) {
for ($i=1;$i<=$count_delete;$i++) {
MessageManager::delete_message_by_user_receiver(api_get_user_id(), $info_delete[$i]);
}
$message_box=get_lang('SelectedMessagesDeleted');
Display::display_normal_message(api_xml_http_response_encode($message_box),false);
inbox_display();
exit;
$message_box=get_lang('SelectedMessagesDeleted');
Display::display_normal_message(api_xml_http_response_encode($message_box),false);
inbox_display();
exit;
}
}
@ -115,7 +115,7 @@ if ($_GET['f']=='social') {
} else {
$this_section = SECTION_MYPROFILE;
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => 'outbox.php','name' => get_lang('Inbox'));
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Inbox'));
}
Display::display_header('');
@ -130,27 +130,24 @@ if ($_GET['f']=='social' || api_get_setting('allow_social_tool') == 'true') {
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>';
//echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>';
echo '<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>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>';
}
echo '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php?type=reduced">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
//echo '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php?type=reduced">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
echo '</div>';
}
echo '<div id="social-content">';
$id_content_right = '';
//LEFT CONTENT
if (api_get_setting('allow_social_tool') != 'true') {
$id_content_right = 'inbox';
echo '<div id="inbox-menu" class="actions">';
echo '<ul>';
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/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/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '</ul>';
echo '</div>';
$id_content_right = 'inbox';
} else {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
$id_content_right = 'social-content-right';
@ -160,10 +157,8 @@ echo '<div id="social-content">';
echo '</div>';
}
echo '<div id="'.$id_content_right.'">';
if (api_get_setting('allow_social_tool') == 'true') {
echo '<div id="'.$id_content_right.'">';
if (api_get_setting('allow_social_tool') == 'true') {
echo '<div class="social-box-container2">';
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php?f=social">'.Display::return_icon('compose_message.png', get_lang('ComposeMessage'), array(), 32).'</a>';

@ -20,7 +20,7 @@ require_once '../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_message_tool')!='true'){
if (api_get_setting('allow_message_tool') !='true' ){
api_not_allowed();
}
@ -288,15 +288,14 @@ function manage_form ($default, $select_from_user_list = null) {
/* MAIN SECTION */
if ($_GET['f']=='social') {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' => '#','name' => $nameTools);
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social'));
} else {
$this_section = SECTION_MYPROFILE;
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => 'inbox.php','name' => get_lang('Inbox'));
//$interbreadcrumb[]= array ('url' => '#','name' => get_lang('ComposeMessage'));
}
Display::display_header('');
Display::display_header(get_lang('ComposeMessage'));
$group_id = intval($_REQUEST['group_id']);
@ -315,9 +314,12 @@ if ($group_id != 0) {
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>';
// echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>';
echo '<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>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>';
}
echo '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php?type=reduced">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
//echo '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php?type=reduced">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
echo '</div>';
}
}
@ -327,13 +329,13 @@ echo '<div id="social-content">';
//LEFT COLUMN
if (api_get_setting('allow_social_tool') != 'true') {
$id_content_right = 'inbox';
echo '<div id="inbox-menu" class="actions">';
/* echo '<div id="inbox-menu" class="actions">';
echo '<ul>';
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/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/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '</ul>';
echo '</div>';
echo '</div>';*/
} else {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
echo '<div id="social-content-left">';

@ -69,7 +69,7 @@ if ($_GET['f']=='social') {
} else {
$this_section = SECTION_MYPROFILE;
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Inbox'));
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox'));
}
Display::display_header('');
@ -85,9 +85,14 @@ if ($_GET['f']=='social') {
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>';
//echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>';
echo '<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>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>';
}
echo '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php?type=reduced">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
//echo '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php?type=reduced">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
echo '</div>';
}
}
@ -118,13 +123,14 @@ echo '<div id="social-content">';
//LEFT COLUMN
if (api_get_setting('allow_social_tool') != 'true') {
$id_content_right = 'outbox';
/*
echo '<div id="inbox-menu" class="actions">';
echo '<ul>';
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/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/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '</ul>';
echo '</div>';
echo '</div>';*/
} else {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
$id_content_right = 'social-content-right';

@ -21,11 +21,10 @@ if ($_REQUEST['f']=='social') {
$interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox'));
} else {
$this_section = SECTION_MYPROFILE;
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => 'inbox.php','name' => get_lang('Inbox'));
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
}
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('View'));
Display::display_header('');
Display::display_header(get_lang('View'));
if ($_GET['f']=='social') {
$social_parameter = '?f=social';
@ -37,9 +36,14 @@ if ($_GET['f']=='social') {
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>';
//echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>';
echo '<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>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>';
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>';
}
echo '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php?type=reduced">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
//echo '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php?type=reduced">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
echo '</div>';
}
@ -59,13 +63,13 @@ echo '<div id="social-content">';
//LEFT COLUMN
if (api_get_setting('allow_social_tool') != 'true') {
$id_content_right = 'inbox';
echo '<div id="inbox-menu" class="actions">';
/*echo '<div id="inbox-menu" class="actions">';
echo '<ul>';
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/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/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '</ul>';
echo '</div>';
echo '</div>';*/
} else {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
$id_content_right = 'social-content-right';

@ -16,6 +16,9 @@ require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
$this_section = SECTION_SOCIAL;

@ -8,12 +8,16 @@
$language_file= 'userInfo';
$cidReset=true;
require_once '../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php';
api_block_anonymous_users();
if (api_get_setting('allow_students_to_create_groups_in_social') == 'false' && !api_is_allowed_to_edit()) {
api_not_allowed();
}

@ -8,7 +8,13 @@
// Language files that should be included
$language_file = array('userInfo');
$cidReset = true;
include '../inc/global.inc.php';
require_once '../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
$this_section = SECTION_SOCIAL;
$libpath = api_get_path(LIBRARY_PATH);

@ -8,6 +8,12 @@
$language_file = array('userInfo');
$cidReset = true;
require '../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
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';
@ -16,7 +22,6 @@ $this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' =>'home.php','name' => get_lang('Social'));
$interbreadcrumb[] = array('url' => 'groups.php','name' => get_lang('Groups'));
$interbreadcrumb[] = array('url' => '#','name' => get_lang('MemberList'));
api_block_anonymous_users();
$group_id = intval($_GET['id']);

@ -7,6 +7,12 @@
$cidReset = true;
$language_file = array('userInfo');
require '../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
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';
@ -15,7 +21,7 @@ $this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' =>'home.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups'));
$interbreadcrumb[]= array ('url' =>'#','name' => get_lang('WaitingList'));
api_block_anonymous_users();
$group_id = intval($_GET['id']);

@ -7,13 +7,18 @@
$cidReset=true;
$language_file = array('userInfo');
require_once '../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
require_once api_get_path(LIBRARY_PATH).'message.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
api_block_anonymous_users();
$this_section = SECTION_SOCIAL;

@ -21,7 +21,10 @@ $this_section = SECTION_SOCIAL;
unset($_SESSION['this_section']);//for hmtl editor repository
api_block_anonymous_users();
//jquery thickbox already called from main/inc/header.inc.php
if (api_get_setting('allow_social_tool') !='true' ){
api_not_allowed();
}
$htmlHeadXtra[] = '<script type="text/javascript">

@ -7,6 +7,12 @@
$language_file = array('messages','userInfo');
$cidReset=true;
require '../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
require_once api_get_path(LIBRARY_PATH).'image.lib.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php';

@ -3,6 +3,12 @@
$language_file = array('registration','messages','userInfo','admin');
$cidReset=true;
require_once '../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'message.lib.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
@ -11,14 +17,6 @@ require_once api_get_path(LIBRARY_PATH).'fckeditor/fckeditor.php';
$tok = Security::get_token();
if (api_is_anonymous()) {
api_not_allowed();
}
if (api_get_setting('allow_message_tool') != 'true' && api_get_setting('allow_social_tool') != 'true') {
api_not_allowed();
}
if ( isset($_REQUEST['user_friend']) ) {
$info_user_friend=array();
$info_path_friend=array();

@ -1,11 +1,17 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @author Juan Carlos Ra<EFBFBD>a Trabado herodoto@telefonica.net
* @author Juan Carlos Trabado herodoto@telefonica.net
*/
$language_file = array('messages','userInfo');
$cidReset=true;
require '../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
require_once api_get_path(LIBRARY_PATH).'image.lib.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
@ -60,7 +66,7 @@ function register_friend(element_input) {
}
</script>';
api_block_anonymous_users();
Display :: display_header($tool_name, 'Groups');

@ -15,6 +15,11 @@ 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';
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
$user_id = api_get_user_id();
$show_full_profile = true;

@ -5,6 +5,9 @@ $cidReset=true;
require_once '../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'message.lib.php';

@ -14,6 +14,9 @@ require_once api_get_path(LIBRARY_PATH).'social.lib.php';
require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
$this_section = SECTION_SOCIAL;
$tool_name = get_lang('Search');

@ -560,7 +560,7 @@ if (api_get_setting('allow_social_tool') == 'true') {
$profile_content .= ' </div></div>';
// @todo Add a platform setting to add the user image.
if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') {
if (api_get_setting('allow_message_tool') == 'true') {
require_once api_get_path(LIBRARY_PATH).'message.lib.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
@ -583,19 +583,20 @@ if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_mes
$profile_content .= '<div class="clear"></div>';
$profile_content .= '<div class="message-content"><ul class="menulist">';
$link = '';
if (api_get_setting('show_tabs', 'social') == 'true') {
if (api_get_setting('allow_social_tool') == 'true') {
$link = '?f=social';
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'" class="message-body">'.get_lang('Inbox').$cant_msg.' </a></li>';
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'" class="message-body">'.get_lang('Compose').' </a></li>';
if ($total_invitations == 0) {
$total_invitations = '';
} else {
$total_invitations = ' ('.$total_invitations.')';
if (api_get_setting('allow_social_tool') == 'true') {
if ($total_invitations == 0) {
$total_invitations = '';
} else {
$total_invitations = ' ('.$total_invitations.')';
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php" class="message-body">'.get_lang('PendingInvitations').' '.$total_invitations.' </a></li>';
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php" class="message-body">'.get_lang('PendingInvitations').' '.$total_invitations.' </a></li>';
$profile_content .= '</ul>';
$profile_content .= '</div>';
}

Loading…
Cancel
Save