Fixes in the who is online page and in the social home page

skala
Julio Montoya 13 years ago
parent 37f18be380
commit 9f01919d6c
  1. 5
      main/css/base.css
  2. 8
      main/inc/lib/online.inc.php
  3. 25
      main/inc/lib/social.lib.php
  4. 2
      whoisonline.php

@ -1962,7 +1962,6 @@ div.image-social-content center.friend {
#social_widget_image {
float:left;
width:150px;
margin-bottom:10px;
padding:2px;
}
@ -3761,3 +3760,7 @@ a.forum_group_link {
#online_grid_container li img {
height: 100px;
}
#online_grid_container .thumbnail .caption {
height: 30px;
}

@ -210,11 +210,11 @@ function who_is_online($from, $number_of_items, $column = null, $direction = nul
}
//This query will show all registered users. Only for dev purposes.
/*$query = "SELECT DISTINCT u.user_id as login_user_id, login_date FROM ".$track_online_table ." e , $table_user u
$query = "SELECT DISTINCT u.user_id as login_user_id, login_date FROM ".$track_online_table ." e , $table_user u
GROUP by u.user_id
ORDER BY $column $direction
LIMIT $from, $number_of_items";
*/
$result = Database::query($query);
if ($result) {
$validtime = mktime(date("H"),date("i")-$time_limit,date("s"),date("m"),date("d"),date("Y"));
@ -284,8 +284,8 @@ function who_is_online_count($valid = null, $friends = false) {
//dev purposes show all users online
/*$table_user = Database::get_main_table(TABLE_MAIN_USER);
$query = "SELECT count(*) as count FROM ".$table_user ." ";*/
$table_user = Database::get_main_table(TABLE_MAIN_USER);
$query = "SELECT count(*) as count FROM ".$table_user ." ";
$result = Database::query($query);
if (Database::num_rows($result) > 0) {

@ -608,7 +608,7 @@ class SocialManager extends UserManager {
$html .= '<div class="social-background-content" onmouseout="hide_icon_edit()" onmouseover="show_icon_edit()">';
if ($img_array['file'] != 'unknown.jpg') {
$html .= '<a class="thickbox" href="'.$big_image.'"><img src='.$normal_image.' /> </a>';
$html .= '<a class="thumbnail thickbox" href="'.$big_image.'"><img src='.$normal_image.' /> </a>';
} else {
$html .= '<img src='.$normal_image.' width="110px" />';
}
@ -747,13 +747,27 @@ class SocialManager extends UserManager {
*/
public static function display_user_list($user_list) {
if ($_GET['id'] == '') {
$column_size = '9';
$add_row = false;
if (api_is_anonymous()) {
$column_size = '12';
$add_row = true;
}
$extra_params = array();
$course_url = '';
if (strlen($_GET['cidReq']) > 0) {
$extra_params['cidReq'] = Security::remove_XSS($_GET['cidReq']);
$course_url = '&amp;cidReq='.Security::remove_XSS($_GET['cidReq']);
}
$html .= '<div class="span9">';
if ($add_row) {
$html .='<div class="row">';
}
$html .= '<div class="span'.$column_size.'">';
$html .= '<ul id="online_grid_container" class="thumbnails">';
foreach ($user_list as $user) {
$uid = $user[0];
@ -782,11 +796,14 @@ class SocialManager extends UserManager {
$img = '<img title = "'.$name.'" alt="'.$name.'" src="'.$friends_profile['file'].'">';
}
$name = '<a href="'.$url.'">'.$status_icon.$name.'</a><br>';
$html .= '<li class="span3"><div class="thumbnail">'.$img.'<div class="caption">'.$name.'</div</div></li>';
$html .= '<li class="span'.($column_size/3).'"><div class="thumbnail">'.$img.'<div class="caption">'.$name.'</div</div></li>';
}
$counter = $_SESSION['who_is_online_counter'];
$html .= '</ul></div>';
$html .= '<div class="span9"><a class="btn btn-large" id="link_load_more_items" data_link="'.$counter.'" >'.get_lang('More').'</a></div>';
$html .= '<div class="span'.$column_size.'"><a class="btn btn-large" id="link_load_more_items" data_link="'.$counter.'" >'.get_lang('More').'</a></div>';
if ($add_row) {
$html .= '</div>';
}
}
return $html;
}

@ -168,7 +168,7 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
if (api_get_setting('allow_social_tool') == 'true') {
if (!api_is_anonymous()) {
$query = isset($_GET['q']) ? $_GET['q']: null;
$social_right_content .= UserManager::get_search_form($query);
$social_right_content .= '<div class="span9">'.UserManager::get_search_form($query).'</div>';
}
}
$social_right_content .= SocialManager::display_user_list($user_list);

Loading…
Cancel
Save