Exemplo n.º 1
0
    }
}
// Top popular
$results = $userGroup->get_groups_by_popularity(1, false);
$groups_pop = array();
foreach ($results as $result) {
    $result['description'] = Security::remove_XSS($result['description'], STUDENT, true);
    $result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
    $id = $result['id'];
    $group_url = "group_view.php?id={$id}";
    if ($result['count'] == 1) {
        $result['count'] = '1 ' . get_lang('Member');
    } else {
        $result['count'] = $result['count'] . ' ' . get_lang('Members');
    }
    $result['name'] = '<div class="group-name">' . Display::url(api_ucwords(cut($result['name'], 40, true)), $group_url) . '</div><div class="count-username">' . Display::return_icon('user.png', '', '', ICON_SIZE_TINY) . $result['count'] . '</div>';
    $picture = $userGroup->get_picture_group($id, $result['picture'], 80);
    $result['picture_uri'] = '<img class="group-image" src="' . $picture['file'] . '" />';
    $group_actions = '<div class="group-more" ><a href="groups.php?#tab_browse-3">' . get_lang('SeeMore') . '</a></div>';
    $group_info = '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>";
    $groups_pop[] = array(Display::url($result['picture_uri'], $group_url), $result['name'], $group_info . $group_actions);
}
$list = count($groups_newest);
$social_group_block = null;
if ($list > 0) {
    $social_group_block .= '<div class="list-group-newest">';
    $social_group_block .= '<div class="group-title">' . get_lang('Newest') . '</div>';
    for ($i = 0; $i < $list; $i++) {
        $social_group_block .= '<div class="row">';
        $social_group_block .= '<div class="col-md-2">' . $groups_newest[$i][0] . '</div>';
        $social_group_block .= '<div class="col-md-4">' . $groups_newest[$i][1];
Exemplo n.º 2
0
        $groups_newest[] = array(Display::url($result['picture_uri'], $group_url), $result['name'], Text::cut($result['description'], 120, true) . $group_actions);
    }
}
$results = $usergroup->get_groups_by_popularity(1, false);
$groups_pop = array();
foreach ($results as $result) {
    $result['description'] = Security::remove_XSS($result['description'], STUDENT, true);
    $result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
    $id = $result['id'];
    $group_url = "groups.php?id={$id}";
    if ($result['count'] == 1) {
        $result['count'] = '1 ' . get_lang('Member');
    } else {
        $result['count'] = $result['count'] . ' ' . get_lang('Members');
    }
    $result['name'] = Display::url(api_ucwords(Text::cut($result['name'], 40, true)), $group_url) . Display::span('<br />' . $result['count'], array('class' => 'box_description_group_member'));
    $picture = $usergroup->get_picture_group($id, $result['picture'], 80);
    $result['picture_uri'] = '<img class="social-groups-image" src="' . $picture['file'] . '" hspace="10" height="44" border="2" align="left" width="44" />';
    $group_actions = '<div class="box_description_group_actions" ><a href="groups.php?#tab_browse-3">' . get_lang('SeeMore') . '</a></div>';
    $groups_pop[] = array(Display::url($result['picture_uri'], $group_url), $result['name'], Text::cut($result['description'], 120, true) . $group_actions);
}
if (count($groups_newest) > 0) {
    $social_right_content .= '<div class="social-groups-home-title">' . get_lang('Newest') . '</div>';
    $social_right_content .= Display::return_sortable_grid('home_group', array(), $groups_newest, array('hide_navigation' => true, 'per_page' => 100), array(), false, array(true, true, true, false));
}
if (count($groups_pop) > 0) {
    $social_right_content .= '<div class="social-groups-home-title">' . get_lang('Popular') . '</div>';
    $social_right_content .= Display::return_sortable_grid('home_group', array(), $groups_pop, array('hide_navigation' => true, 'per_page' => 100), array(), false, array(true, true, true, true, true));
}
$social_right_content .= '</div>';
$app['title'] = get_lang('SocialNetwork');
Exemplo n.º 3
0
    }
}
// Top popular
$results = $userGroup->get_groups_by_popularity(1, false);
$groups_pop = array();
foreach ($results as $result) {
    $result['description'] = Security::remove_XSS($result['description'], STUDENT, true);
    $result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
    $id = $result['id'];
    $group_url = "group_view.php?id={$id}";
    if ($result['count'] == 1) {
        $result['count'] = '1 ' . get_lang('Member');
    } else {
        $result['count'] = $result['count'] . ' ' . get_lang('Members');
    }
    $result['name'] = '<div class="group-name">' . Display::url(api_ucwords(cut($result['name'], 40, true)), $group_url) . '</div><div class="count-username">' . Display::returnFontAwesomeIcon('user') . $result['count'] . '</div>';
    $picture = $userGroup->get_picture_group($id, $result['picture'], 80);
    $result['picture_uri'] = '<img class="group-image" src="' . $picture['file'] . '" />';
    $group_actions = '<div class="group-more" ><a href="groups.php?#tab_browse-3">' . get_lang('SeeMore') . '</a></div>';
    $group_info = '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>";
    $groups_pop[] = array(Display::url($result['picture_uri'], $group_url), $result['name'], $group_info . $group_actions);
}
$list = count($groups_newest);
$social_group_block = null;
if ($list > 0) {
    $social_group_block .= '<div class="list-group-newest">';
    $social_group_block .= '<div class="group-title">' . get_lang('Newest') . '</div>';
    for ($i = 0; $i < $list; $i++) {
        $social_group_block .= '<div class="row">';
        $social_group_block .= '<div class="col-md-2">' . $groups_newest[$i][0] . '</div>';
        $social_group_block .= '<div class="col-md-10">' . $groups_newest[$i][1];
Exemplo n.º 4
0
 * Code
 */
if (isset($new_language) && isset($language_variable) && isset($file_id)) {
    $file_language = $language_files_to_load[$file_id] . '.inc.php';
    $id_language = intval($_REQUEST['id']);
    $sub_language_id = intval($_REQUEST['sub']);
    $all_data_of_language = SubLanguageManager::get_all_information_of_sub_language($id_language, $sub_language_id);
    $path_folder = api_get_path(SYS_LANG_PATH) . $all_data_of_language['dokeos_folder'] . '/' . $file_language;
    $all_file_of_directory = SubLanguageManager::get_all_language_variable_in_file($path_folder);
    $return_value = SubLanguageManager::add_file_in_language_directory($path_folder);
    //update variable language
    $new_language = str_replace('"', '\\"', $new_language);
    $all_file_of_directory[$language_variable] = "\"" . api_convert_encoding($new_language, api_get_system_encoding(), 'UTF-8') . "\";";
    $result_array = array();
    foreach ($all_file_of_directory as $key_value => $value_info) {
        $result_array[$key_value] = SubLanguageManager::write_data_in_file($path_folder, $value_info, $key_value);
    }
    $variables_with_problems = '';
    if (!empty($result_array)) {
        foreach ($result_array as $key => $result) {
            if ($result == false) {
                $variables_with_problems .= $key . ' <br />';
            }
        }
    }
    if (!empty($variables_with_problems)) {
        echo $path_folder . ' ' . get_lang('IsNotWritable') . '<br /> ' . api_ucwords(get_lang('ErrorsFound')) . ': <br />' . $variables_with_problems;
    } else {
        echo get_lang('Saved');
    }
}
Exemplo n.º 5
0
    $result['description'] = Security::remove_XSS(
        $result['description'],
        STUDENT,
        true
    );
    $result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
    $id = $result['id'];
    $group_url = "groups.php?id=$id";

    if ($result['count'] == 1) {
        $result['count'] = '1 ' . get_lang('Member');
    } else {
        $result['count'] = $result['count'] . ' ' . get_lang('Members');
    }
    $result['name'] = Display::url(
            api_ucwords(cut($result['name'], 40, true)),
            $group_url
        ) . Display::span(
            '<br />' . $result['count'],
            array('class' => 'box_description_group_member')
        );
    $picture = GroupPortalManager::get_picture_group(
        $id,
        $result['picture_uri'],
        80
    );
    $result['picture_uri'] = '<img class="social-groups-image" src="' . $picture['file'] . '" hspace="10" height="44" border="2" align="left" width="44" />';
    $group_actions = '<div class="box_description_group_actions" ><a href="groups.php?#tab_browse-3">' . get_lang(
            'SeeMore'
        ) . '</a></div>';
    $groups_pop[] = array(