Minor changes

skala
Julio Montoya 14 years ago
parent f744e157bc
commit b22e701b2e
  1. 16
      main/inc/ajax/social.ajax.php
  2. 3
      main/inc/lib/social.lib.php

@ -143,25 +143,22 @@ switch ($action) {
if (api_is_anonymous()){
echo '';
break;
}
}
require_once api_get_path(LIBRARY_PATH).'blog.lib.php';
require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
$user_id = intval($_SESSION['social_user_id']);
if ($_POST['action']) {$action = $_POST['action'];}
switch($action) {
switch ($action) {
case 'load_course' :
$course_db = $_POST['course_code'];
// @todo goto the course link
//echo '<a href="'.api_get_path(WEB_COURSE_PATH).$course_directory.'/?id_session='.$my_course['id_session'].'">'.get_lang('GotoCourse').'</a>';
$course_id=CourseManager::get_course_id_by_database_name($course_db);
$course_id = CourseManager::get_course_id_by_database_name($course_db);
if (api_is_user_of_course($course_id,api_get_user_id())) {
if (api_is_user_of_course($course_id, api_get_user_id())) {
$table_forums = Database :: get_course_table(TABLE_FORUM,$course_db);
$table_threads = Database :: get_course_table(TABLE_FORUM_THREAD,$course_db);
@ -176,8 +173,7 @@ switch ($action) {
if ($forum_result !='') {
echo '<div id="social-forum-main-title">';
echo api_xml_http_response_encode(get_lang('Forum'));
echo '</div>';
echo '</div>';
echo '<div style="background:#FAF9F6; padding:0px;" >';
echo api_xml_http_response_encode($forum_result);

@ -644,7 +644,7 @@ class SocialManager extends UserManager {
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('zoom.png',get_lang('Search'),array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li>';
//My files
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.Display::return_icon('briefcase.png',get_lang('MyFiles'),array('hspace'=>'6'),16).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.Display::return_icon('briefcase.png',get_lang('MyFiles'),array('hspace'=>'6'),16).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';
echo'</ul>
</div>';
}
@ -667,6 +667,7 @@ class SocialManager extends UserManager {
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('my_shared_profile.png',get_lang('ViewMySharedProfile'),array('hspace'=>'6','style'=>'float:left')).'<span class="social-menu-text-active" >'.get_lang('ViewMySharedProfile').'</span></a></li>
<li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('friend.png',get_lang('Friends'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Friends').'</span></a></li>
<li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.png',get_lang('SocialGroups'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('SocialGroups').'</span></a></li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('zoom.png',get_lang('Search'),array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.Display::return_icon('briefcase.png',get_lang('MyFiles'),array('hspace'=>'6'),16).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';
}

Loading…
Cancel
Save