New db changes adding show_groups_to_users parameters in order to hide the user group list in the social network see BT#1910

skala
Julio Montoya 15 years ago
parent ca1b7615ab
commit 9a15fe57b0
  1. 8
      main/inc/lib/social.lib.php
  2. 7
      main/install/db_main.sql
  3. 6
      main/install/migrate-db-1.8.7-1.8.8-pre.sql
  4. 2
      main/social/profile.php
  5. 5
      main/social/usergroups.php

@ -626,7 +626,7 @@ class SocialManager extends UserManager {
//Shared profile
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')).'<span class="'.($show=='shared_profile'?'social-menu-text-active':'social-menu-text4').'" >'.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="'.($show=='friends'?'social-menu-text-active':'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('Groups'),array('hspace'=>'6')).'<span class="'.($show=='groups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('SocialGroups').'</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="'.($show=='groups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('SocialGroups').'</span></a></li>';
//Show groups
if (in_array($show,$show_groups)) {
@ -639,13 +639,13 @@ class SocialManager extends UserManager {
}
//Groups
if (api_get_setting('show_groups_to_users') == 'true') {
$group_class = 'social-menu-text4';
if ($show == 'classes') {
$group_class = 'social-menu-text-active';
}
echo Display::tag('li', Display::return_icon('group.png',get_lang('MyGroups'),array('hspace'=>'6')).Display::url(Display::tag('span',get_lang('MyGroups'),array('class'=>$group_class)),api_get_path(WEB_PATH).'main/social/usergroups.php'));
}
//Search users and groups
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>';
@ -674,7 +674,7 @@ class SocialManager extends UserManager {
echo ' <li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitation.png',get_lang('Invitations'),array('hspace'=>'6')).'<span class="'.($show=='invitations'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Invitations').$total_invitations.'</span></a></li>';
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('Groups'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Groups').'</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/myfiles.php">'.Display::return_icon('briefcase_small.png',get_lang('MyFiles'),array('hspace'=>'6')).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';
}

@ -817,7 +817,8 @@ VALUES
('course_hide_tools','course_maintenance','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Maintenance',1),
('course_hide_tools','course_setting','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseSettings',1),
('enabled_support_pixlr',NULL,'radio','Tools','false','EnabledPixlrTitle','EnabledPixlrComment',NULL,NULL, 0),
('chamilo_database_version',NULL,'textfield',NULL, '1.8.8.13656','DokeosDatabaseVersion','', NULL, NULL, 0);
('show_groups_to_users',NULL,'radio','Platform','true','ShowGroupsToUsersTitle','ShowGroupsToUsersComment',NULL,NULL, 0),
('chamilo_database_version',NULL,'textfield',NULL, '1.8.8.13657','DokeosDatabaseVersion','', NULL, NULL, 0);
UNLOCK TABLES;
@ -1073,7 +1074,9 @@ VALUES
('enabled_text2audio','true','Yes'),
('enabled_text2audio','false','No'),
('enabled_support_pixlr','true','Yes'),
('enabled_support_pixlr','false','No');
('enabled_support_pixlr','false','No'),
('show_groups_to_users','true','Yes'),
('show_groups_to_users','false','No');
UNLOCK TABLES;

@ -146,7 +146,11 @@ INSERT INTO settings_current (variable, subkey, type, category, selected_value,
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_support_pixlr', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_support_pixlr', 'false', 'No');
UPDATE settings_current SET selected_value = '1.8.8.13656' WHERE variable = 'chamilo_database_version';
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('show_groups_to_users',NULL,'radio','Platform','true','ShowGroupsToUsersTitle','ShowGroupsToUsersComment',NULL,NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('show_groups_to_users', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('show_groups_to_users', 'false', 'No');
UPDATE settings_current SET selected_value = '1.8.8.13657' WHERE variable = 'chamilo_database_version';
INSERT INTO language (original_name, english_name, isocode, dokeos_folder, available) VALUES ('&#2361;&#2367;&#2344;&#2381;&#2342;&#2368;', 'hindi', 'hi', 'hindi', 0);

@ -483,7 +483,7 @@ if ($show_full_profile) {
if (count($grid_my_groups) > 0) {
echo '<div class="social-box-main1">';
echo '<div class="social-box-container2">';
echo '<div>'.Display::return_icon('content-post-group1.jpg', get_lang('MyGroups')).'</div>';
echo '<div>'.Display::return_icon('content-post-group1.jpg', get_lang('MySocialGroups')).'</div>';
echo '<div class="social-box-content2">';
echo '<div><h3>'.get_lang('MyGroups').'</h3></div>';
$count_groups = 0;

@ -14,6 +14,11 @@ require_once api_get_path(LIBRARY_PATH).'usergroup.lib.php';
api_block_anonymous_users();
if (api_get_setting('show_groups_to_users') == 'false') {
header('Location: index.php');
exit;
}
$this_section = SECTION_SOCIAL;
//jquery thickbox already called from main/inc/header.inc.php

Loading…
Cancel
Save