[svn r19860] logic changes - improved social network - (partial FS#3902)

skala
Isaac Flores 17 years ago
parent 037a80bb7b
commit e7bfba827e
  1. BIN
      main/img/shared_profile.png
  2. 6
      main/messages/inbox.php
  3. 14
      main/messages/new_message.php
  4. 2
      main/messages/outbox.php
  5. 3
      main/social/contacts.inc.php
  6. 11
      main/social/data_personal.inc.php
  7. 3
      main/social/group_contact.inc.php
  8. 13
      main/social/index.php
  9. 2
      main/social/profile.php
  10. 3
      main/social/select_friend_response.php

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -105,6 +105,10 @@ if (isset($_GET['form_reply']) || isset($_GET['form_delete'])) {
$user_email=trim($user_email_prepare[1]);
}
$user_id_by_email=MessageManager::get_user_id_by_email($user_email);
if ($info_reply[6]=='save_form') {
$user_id_by_email=$info_reply[2];
}
if ( isset($user_reply) && !is_null($user_id_by_email) && strlen($info_reply[0]) >0) {
MessageManager::send_message($user_id_by_email, $title, $content);
MessageManager::display_success_message($user_id_by_email);
@ -151,7 +155,7 @@ if ($request===false) {
$link_ref="../messages/new_message.php?rs=1";
}
$table_message = Database::get_main_table(TABLE_MESSAGE);
echo '<div id="div_content_messages">&nbsp;&nbsp;';
echo '<div id="div_content_messages">';
api_display_tool_title(mb_convert_encoding(get_lang('Inbox'),'UTF-8',$charset));
echo '<div class=actions>';
echo '<a onclick="compose_and_show_message(\'show\',\'1\')" href="javascript:void(0)">'.Display::return_icon('message_new.png',get_lang('ComposeMessage')).get_lang('ComposeMessage').'</a>';

@ -1,4 +1,4 @@
<?php // $Id: new_message.php 19472 2009-03-31 23:51:28Z cvargas1 $
<?php // $Id: new_message.php 19860 2009-04-19 16:39:28Z iflorespaz $
/*
==============================================================================
Dokeos - elearning and course management software
@ -50,7 +50,8 @@ if (api_get_setting('allow_message_tool')!='true'){
require_once'../messages/message.class.php';
require_once(api_get_path(LIBRARY_PATH).'/text.lib.php');
require_once(api_get_path(LIBRARY_PATH).'/formvalidator/FormValidator.class.php');
$nameTools= get_lang('Messages');
$request=api_is_xml_http_request();
$nameTools=($request===true) ? mb_convert_encoding(get_lang('Messages'),'UTF-8',$charset) : get_lang('Messages');
/*
-----------------------------------------------------------
Constants and variables
@ -98,7 +99,8 @@ $(document).ready(function (){
});
});
</script>';
$nameTools = get_lang('ComposeMessage');
$nameTools=($request===true) ? mb_convert_encoding(get_lang('ComposeMessage'),'UTF-8',$charset) : get_lang('ComposeMessage');
$fck_attribute['Height'] = "150";
$fck_attribute['Width'] = "95%";
$fck_attribute['ToolbarSet'] = "Profil";
@ -168,7 +170,8 @@ function manage_form ($default, $select_from_user_list = null) {
$form->add_textfield('title', mb_convert_encoding(get_lang('Title'),'UTF-8',$charset));
$form->add_html_editor('content', '',false,false);
if (isset($_GET['re_id'])) {
$form->addElement('hidden','re_id',$_GET['re_id']);
$form->addElement('hidden','re_id',Security::remove_XSS($_GET['re_id']));
$form->addElement('hidden','save_form','save_form');
}
$form->addElement('submit', 'compose', get_lang('Send'));
$form->setDefaults($default);
@ -210,11 +213,10 @@ if (isset($_GET['rs'])) {
'url' => '#',
'name' => get_lang('ComposeMessage')
);
$request=api_is_xml_http_request();
if ($request===false) {
Display::display_header('');
}
api_display_tool_title($nameTools);
echo '<div class=actions>';
echo '<a onclick="close_div_show(\'div_content_messages\')" href="javascript:void(0)">'.Display::return_icon('folder_up.gif',get_lang('BackToInbox')).get_lang('BackToInbox').'</a>';

@ -112,7 +112,7 @@ if( trim($info_delete_outbox[0])=='delete' ) {
}
/**************************************************************/
$table_message = Database::get_main_table(TABLE_MESSAGE);
echo '<div id="div_content_messages_sent">&nbsp;&nbsp;';
echo '<div id="div_content_messages_sent">';
api_display_tool_title(mb_convert_encoding(get_lang('Outbox'),'UTF-8',$charset));
echo '<div class=actions>';
$language_variable=($request===true) ? mb_convert_encoding(get_lang('MessageOutboxComment'),'UTF-8',$charset) : get_lang('MessageOutboxComment');

@ -10,6 +10,9 @@ require_once '../inc/lib/social.lib.php';
$this_section = SECTION_MYPROFILE;
$_SESSION['this_section']=$this_section;
//$list_path_friends=array();
$request=api_is_xml_http_request();
$language_variable=($request===true) ? mb_convert_encoding(get_lang('Contacts'),'UTF-8',$charset) : get_lang('Contacts');
api_display_tool_title($language_variable);
?>
<div id="id" class="actions">
<?php echo utf8_encode(get_lang('SocialInformationComment')); ?>

@ -21,7 +21,7 @@
==============================================================================
*/
$language_file = array('registration','messages','userInfo','admin');
$language_file = array('registration','messages','userInfo','admin','forum','blog');
require_once ('../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH).'usermanager.lib.php');
@ -30,6 +30,7 @@ require_once (api_get_path(LIBRARY_PATH).'usermanager.lib.php');
$user_info= UserManager::get_user_info_by_id(api_get_user_id());
$img_array= UserManager::get_user_picture_path_by_id(api_get_user_id(),'web',true,true);
if (isset($_POST['load_ajax'])) {
require_once (api_get_path(LIBRARY_PATH).'blog.lib.php');
require_once (api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php');
@ -106,10 +107,14 @@ if (isset($_POST['load_ajax'])) {
}
} else {
// normal behavior
$request=api_is_xml_http_request();
$language_variable=($request===true) ? mb_convert_encoding(get_lang('PersonalData'),'UTF-8',$charset) : get_lang('PersonalData');
api_display_tool_title($language_variable);
echo '<div id="actions" class="actions">';
echo '<a href="../auth/profile.php?show=1"">'.Display::return_icon('edit.gif').'&nbsp;'.mb_convert_encoding(get_lang('EditInformation'),'UTF-8',$charset).'</a>&nbsp;&nbsp;';
echo '<a href="../auth/profile.php?show=1"">'.Display::return_icon('edit.gif',mb_convert_encoding(get_lang('EditInformation'),'UTF-8',$charset)).'&nbsp;'.mb_convert_encoding(get_lang('EditInformation'),'UTF-8',$charset).'</a>&nbsp;&nbsp;';
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true' && api_get_user_id()<>2 && api_get_user_id()<>0) {
echo '<a href="../social/profile.php?shared=true">'.Display::return_icon('edit.gif').'&nbsp;'.mb_convert_encoding(get_lang('ViewSharedProfile'),'UTF-8',$charset).'</a>';
echo '<a href="../social/profile.php?shared=true">'.Display::return_icon('shared_profile.png',mb_convert_encoding(get_lang('ViewSharedProfile'),'UTF-8',$charset)).'&nbsp;'.mb_convert_encoding(get_lang('ViewSharedProfile'),'UTF-8',$charset).'</a>';
}
echo '</div>';
echo '<div id="profile_container" style="width:550px;display:block;">';

@ -11,6 +11,9 @@ $this_section = SECTION_MYPROFILE;
$_SESSION['this_section']=$this_section;
$list_path_friends=array();
$list_groups=array();
$request=api_is_xml_http_request();
$language_variable=($request===true) ? mb_convert_encoding(get_lang('ContactsGroups'),'UTF-8',$charset) : get_lang('ContactsGroups');
api_display_tool_title($language_variable);
?>
<div id="id" class="actions">
<?php echo '&nbsp;&nbsp;'.utf8_encode(get_lang('ContactsGroupsComment')); ?>

@ -449,6 +449,7 @@ if (isset($_GET['sendform'])) {
$form_reply[]=$_POST['re_id'];
$form_reply[]=urlencode($_POST['compose']);
$form_reply[]=urlencode($_POST['id_text_name']);
$form_reply[]=urlencode($_POST['save_form']);
$form_info=implode(',',$form_reply);
$form_send_data_message='?form_reply='.$form_info;
} elseif (isset($_GET['inbox'])) {
@ -473,18 +474,18 @@ $form_url_send=isset($form_send_data_message) ? $form_send_data_message :'';
<div id="container-9">
<ul>
<li><a href="data_personal.inc.php"><span><?php Display :: display_icon('profile.png' ); echo '&nbsp;&nbsp;'.get_lang('PersonalData'); ?></span></a></li>
<li><a href="data_personal.inc.php"><span><?php Display :: display_icon('profile.png',get_lang('PersonalData')); echo '&nbsp;&nbsp;'.get_lang('PersonalData'); ?></span></a></li>
<?php
if (api_get_setting('allow_message_tool')=='true') {
?>
<li><a href="../messages/inbox.php<?php echo $form_url_send; ?>"><span><?php Display :: display_icon('inbox.png'); echo '&nbsp;&nbsp;'.get_lang('Inbox');?></span></a></li>
<li><a href="../messages/outbox.php<?php echo $form_url_send; ?>"><span><?php Display :: display_icon('outbox.png',false ); echo '&nbsp;&nbsp;'.get_lang('Outbox');?></span></a></li>
<li><a href="../messages/inbox.php<?php echo $form_url_send; ?>"><span><?php Display :: display_icon('inbox.png',get_lang('Inbox')); echo '&nbsp;&nbsp;'.get_lang('Inbox');?></span></a></li>
<li><a href="../messages/outbox.php<?php echo $form_url_send; ?>"><span><?php Display :: display_icon('outbox.png',get_lang('Outbox') ); echo '&nbsp;&nbsp;'.get_lang('Outbox');?></span></a></li>
<?php }
if (api_get_setting('allow_social_tool')=='true') {
?>
<li><a href="select_friend_response.php"><span><?php Display :: display_icon('pending_invitation.png'); echo '&nbsp;&nbsp;'.get_lang('PendingInvitations'); ?></span></a></li>
<li><a href="contacts.inc.php"><span><?php Display :: display_icon('contacts.png'); echo '&nbsp;&nbsp;'.get_lang('Contacts'); ?></span></a></li>
<li><a href="group_contact.inc.php"><span><?php Display :: display_icon('group_contact.png'); echo '&nbsp;&nbsp;'.get_lang('ContactsGroups'); ?></span></a></li>
<li><a href="select_friend_response.php"><span><?php Display :: display_icon('pending_invitation.png',get_lang('PendingInvitations')); echo '&nbsp;&nbsp;'.get_lang('PendingInvitations'); ?></span></a></li>
<li><a href="contacts.inc.php"><span><?php Display :: display_icon('contacts.png',get_lang('Contacts')); echo '&nbsp;&nbsp;'.get_lang('Contacts'); ?></span></a></li>
<li><a href="group_contact.inc.php"><span><?php Display :: display_icon('group_contact.png',get_lang('ContactsGroups')); echo '&nbsp;&nbsp;'.get_lang('ContactsGroups'); ?></span></a></li>
<?php
}
?>

@ -9,7 +9,7 @@
/**
* Init
*/
$language_file = array('registration','messages','userInfo','admin');
$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');

@ -8,10 +8,11 @@ $this_section = SECTION_MYPROFILE;
$_SESSION['this_section']=$this_section;
api_block_anonymous_users();
$request=api_is_xml_http_request();
$language_variable=($request===true) ? mb_convert_encoding(get_lang('SocialInvitesComment'),'UTF-8',$charset) : get_lang('SocialInvitesComment');
api_display_tool_title($language_variable);
?>
<div class="actions">
<?php
$language_variable=($request===true) ? utf8_encode(get_lang('SocialInvitesComment')) : get_lang('SocialInvitesComment');
echo $language_variable;
?>
</div>

Loading…
Cancel
Save