Author Topic: [MOD Req] Who's online more detailed-  (Read 97709 times)

0 Members and 1 Guest are viewing this topic.

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD Req] Who's online more detailed-
« Reply #45 on: February 13, 2006, 01:59:27 PM »
Icecream, thanks for helping  :lol: :lol:

I am trying to make this:

Quote
username1         
_ _ _ _ _ _
I              I
I              I         
I userpic   I
I              I
---------------

usergender  (gif image)     
userage         
userlocation   

username2   

etc 

So i have all the MODs for the fields installed. Iam trying to show that on a new page which is this one:

useronline.php
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: index.php                                            *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.1                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$templates_used 'useronline,category_bit,whos_online,thumbnail_bit';
$main_template 'useronline';

define('GET_CACHES'1);
define('ROOT_PATH''./');
define('GET_USER_ONLINE'1);
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions_un.php');
include(
ROOT_PATH.'mini_top.php');
include(
ROOT_PATH.'includes/stats.php');
include(
ROOT_PATH.'encuestas.php');
$user_access get_permission();

if (isset(
$HTTP_GET_VARS['template']) || isset($HTTP_POST_VARS['template'])) {
  
$template = (isset($HTTP_GET_VARS['template'])) ? stripslashes(trim($HTTP_GET_VARS['template'])) : stripslashes(trim($HTTP_POST_VARS['template']));
  if (!
file_exists(TEMPLATE_PATH."/".$template.".".$site_template->template_extension)) {
    
$template "";
  }
  else {
    
$main_template $template;
  }
}
else {
  
$template "";
}
include(
ROOT_PATH.'includes/page_header.php');

if (!empty(
$template)) {
  
$clickstream "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_"" "ucfirst($template));
  
$site_template->register_vars("clickstream"$clickstream);
  
$site_template->print_template($site_template->parse_template($main_template));
  include(
ROOT_PATH.'includes/page_footer.php');
}

$cache_id create_cache_id(
  
'cat.page.index',
  array(
    
$user_info[$user_table_fields['user_id']],
    isset(
$user_info['lightbox_image_ids']) ? substr(md5($user_info['lightbox_image_ids']), 08) : 0,
    
$config['template_dir'],
    
$config['language_dir']
  )
);

if (!
$cache_page_index || !$content get_cache_file($cache_id)) {
// Always append session id if cache is enabled
if ($cache_page_index) {
  
$old_session_mode $site_sess->mode;
  
$site_sess->mode 'get';
}

ob_start();


//-----------------------------------------------------
//--- Show Profile ------------------------------------
//-----------------------------------------------------
if ($action == "showprofile") {
  
$txt_clickstream $lang['profile'];
  if (isset(
$HTTP_GET_VARS[URL_USER_ID]) || isset($HTTP_POST_VARS[URL_USER_ID])) {
    
$user_id = (isset($HTTP_GET_VARS[URL_USER_ID])) ? intval($HTTP_GET_VARS[URL_USER_ID]) : intval($HTTP_POST_VARS[URL_USER_ID]);
    if (!
$user_id) {
      
$user_id GUEST;
    }
  }
  else {
    
$user_id GUEST;
  }

  if (
$user_row get_user_info($user_id)) {
    
$user_homepage = (isset($user_row['user_homepage'])) ? format_url($user_row['user_homepage']) : REPLACE_EMPTY;
    if (!empty(
$user_homepage) && $user_homepage != REPLACE_EMPTY) {
      
$user_homepage_button "<a href=\"".$user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$user_homepage."\" /></a>";
    }
    else {
      
$user_homepage_button REPLACE_EMPTY;
    }

    
$user_icq = (isset($user_row['user_icq'])) ? $user_row['user_icq'] : REPLACE_EMPTY;
    if (!empty(
$user_icq) && $user_icq != REPLACE_EMPTY) {
      
$user_icq_button "<a href=\"http://wwp.icq.com/scripts/search.dll?to=".$user_icq."\" target=\"_blank\"><img src=\"http://web.icq.com/whitepages/online?icq=".$user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$user_icq."\" /></a>";
    }
    else {
      
$user_icq_button REPLACE_EMPTY;
    }

$lang['num_votes'] = "Image votes";
$lang['avg_rating'] = "Image average rating";

    
$lang['user_votes'] = "Abgegebene Bewertungen:";
    
$lang['vot'] = "Bewertungen";
    
$sql "SELECT COUNT(vote) AS user_votes FROM ".VOTED_TABLE." WHERE user_id = ".$user_id;
    
$result $site_db->query_firstrow($sql);
    
$user_votes $result['user_votes'];
    
$lang_user_votes $lang['user_votes'];
    
$lang_vot $lang['vot'];

    
$sql "SELECT SUM(image_votes) num_votes, AVG(image_rating) avg_rating
            FROM "
.IMAGES_TABLE."
            WHERE "
.get_user_table_field("""user_id")." = ".$user_id." AND image_rating > 0";
    
$result $site_db->query_firstrow($sql);
    
$result['num_votes'] = ($result['num_votes']) ? $result['num_votes'] : 0;
    
$result['avg_rating'] = ($result['avg_rating']) ? sprintf("%.2f"$result['avg_rating']) : 0;

    
$site_template->register_vars(array(
      
"num_votes" => $result['num_votes'],
      
"avg_rating" => $result['avg_rating'],
      
"lang_num_votes" => $lang['num_votes'],
      
"lang_avg_rating" => $lang['avg_rating'],
    
"user_votes" => $user_votes,
    
"lang_user_votes" => $lang_user_votes,
    
"lang_vot" => $lang_vot,
    ));

    if (!empty(
$user_row['user_email']) && (!isset($user_row['user_showemail']) || (isset($user_row['user_showemail']) && $user_row['user_showemail'] == 1))) {
      
$user_email $user_row['user_email'];
      
$user_email_save str_replace("@"" at "$user_row['user_email']);
      if (!empty(
$url_mailform)) {
        
$user_mailform_link $site_sess->url(preg_replace("/{user_id}/"$user_row['user_id'], $url_mailform));
      }
      else {
        
$user_mailform_link $site_sess->url(ROOT_PATH."member.php?action=mailform&amp;".URL_USER_ID."=".$user_row['user_id']);
      }
      
$user_email_button "<a href=\"".$user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$user_email_save."\" /></a>";
    }
    else {
      
$user_email REPLACE_EMPTY;
      
$user_email_save REPLACE_EMPTY;
      
$user_mailform_link REPLACE_EMPTY;
      
$user_email_button REPLACE_EMPTY;
    }
$sql "SELECT *
        FROM "
.LIGHTBOXES_TABLE."
        WHERE "
.get_user_table_field("""user_id")." = ".$user_row['user_id'];
    
$user_lightbox_info $site_db->query_firstrow($sql);
    
$num_rows_all 0;
    if (!empty(
$user_lightbox_info['lightbox_image_ids'])) {
    
$image_id_sql str_replace(" "","trim($user_lightbox_info['lightbox_image_ids']));
    
$sql "SELECT COUNT(image_id) AS images
         FROM "
.IMAGES_TABLE."
         WHERE image_active = 1 AND image_id IN (
$image_id_sql)";
    
$result $site_db->query_firstrow($sql);
    
$num_rows_all $result['images'];
   }
   
$site_template->register_vars(array(
     
"lang_show_user_lightbox" => $lang['show_user_lightbox']." (".$num_rows_all.")",
     
"url_show_user_lightbox" => ($user_info['user_level'] == ADMIN) ? $site_sess->url(ROOT_PATH."search.php?search_lightbox=".$user_row['user_id']) : "",
     
"user_id" => $user_row['user_id'],
     
"user_name" => (isset($user_row['user_name'])) ? htmlspecialchars($user_row['user_name']) : REPLACE_EMPTY,
"lang_show_user_comments" => $lang['show_user_comments'],
     
"url_show_user_comments" => $site_sess->url(ROOT_PATH."member.php?action=showcomments&user_id=".$user_row['user_id']),
 
"lang_avatar" => $lang['avatar'],
 
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" alt=\"\">" "",
 "lang_pm" => ($user_info['user_id'] != $user_row['user_id']) ? "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=new&user_id=".$user_row['user_id'])."\">".$lang['pm_user_pm_alt']."</a>" "",
     
"user_email" => $user_email,
     
"user_email_save" => $user_email_save,
     
"user_mailform_link" => $user_mailform_link,
      
"user_email_button" => $user_email_button,
      
"user_join_date" => (isset($user_row['user_joindate'])) ? format_date($config['date_format'], $user_row['user_joindate']) : REPLACE_EMPTY,
      
"user_last_action" => (isset($user_row['user_lastaction'])) ? format_date($config['date_format']." ".$config['time_format'], $user_row['user_lastaction']) : REPLACE_EMPTY,
      
"user_homepage" => $user_homepage,
//User Pic
      
"userpic_img" => ($config['userpic'] && $user_row['userpic']) ? ROOT_PATH."data/userpic/".$user_row['userpic'] : "",
//End User Pic

      
"user_homepage_button" => $user_homepage_button,
      
"user_icq" => $user_icq,
      
"user_icq_button" => $user_icq_button,
      
"user_icq_status" => (isset($user_row['user_icq'])) ? get_icq_status($user_row['user_icq']) : REPLACE_EMPTY,
"lang_user_posts" => $lang['user_posts_status'],
"user_posts" => (isset($user_row['user_posts'])) ? $user_row['user_posts'] : REPLACE_EMPTY,
      
"user_comments" => (isset($user_row['user_comments'])) ? $user_row['user_comments'] : REPLACE_EMPTY,
      
"lang_profile_of" => $lang['profile_of'],
      
"lang_show_user_images" => preg_replace("/".$site_template->start."user_name".$site_template->end."/siU"$user_row['user_name'], $lang['show_user_images']),
      
"url_show_user_images" => $site_sess->url(ROOT_PATH."search.php?search_user=".urlencode($user_row['user_name'])),
      
"lang_join_date" => $lang['join_date'],
      
"lang_last_action" => $lang['last_action'],
      
"lang_comments" => $lang['comments'],
      
"lang_email" => $lang['email'],
      
"lang_homepage" => $lang['homepage'],
      
"lang_icq" => $lang['icq'],
 
"lang_user_age" => $lang['user_age'],
"lang_user_birthday" => $lang['user_birthday']
    ));

    if (!empty(
$additional_user_fields)) {
      
$additional_field_array = array();
      foreach (
$additional_user_fields as $key => $val) {
        
$additional_field_array[$key] = (!empty($user_row[$key])) ? format_text($user_row[$key], 1) : REPLACE_EMPTY;
        
$additional_field_array['lang_'.$key] = $val[0];
      }
      if (!empty(
$additional_field_array)) {
        
$site_template->register_vars($additional_field_array);

//--- User Age Mod ------------------------------------
$birthday_array = array();

$birthday_array get_birthday($additional_field_array['user_age_birthday']);
$birthday_array[3] = get_age($birthday_array[0], $birthday_array[1], $birthday_array[2]);

if(
$birthday_array[0] == "0000")
{
$site_template->register_vars(array(
"user_age_missing" => $lang['user_age_missing']
));
}
else
{
if(
$birthday_array[0] != "0000" && $birthday_array[1] != "00" && $birthday_array[2] != "00")
{
$birthday_timestamp format_date($config['date_format'], strtotime($birthday_array[0] . "-" $birthday_array[1] . "-" $birthday_array[2]));
}
else
{
$birthday_timestamp = (($birthday_array[1] != "00") ? $lang['months'][$birthday_array[1]] . " " "") . $birthday_array[0];
}

$site_template->register_vars(array(
"user_birthday" => $birthday_timestamp,
"user_age" =>  $birthday_array[3
));
}
//--- End of User Age Mod -----------------------------

      
}
    }
    
$content $site_template->parse_template("member_profile");
  }
  else {
    
$content $lang['invalid_user_id'];
  }
}


//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"msg" => $msg,
  
"clickstream" => $clickstream
));
if (
$news_type == "latestnewsall") {  
 
$site_template->print_template($site_template->parse_template(archive));      
}  
else {  
 
$site_template->print_template($site_template->parse_template($main_template));  
}

$content ob_get_contents();
ob_end_clean();

if (
$cache_page_index) {
  
// Reset session mode
  
$site_sess->mode $old_session_mode;

  
save_cache_file($cache_id$content);
}

// end if get_cache_file()

echo $content;

include(
ROOT_PATH.'includes/page_footer.php');
?>

A new file called session_un.php
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: sessions.php                                         *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.1                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}

/*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
    
if (!class_exists("GeoIP"))
    {
      include(
ROOT_PATH."includes/geoip.inc");
    }
   
    
$gi geoip_open(ROOT_PATH."includes/GeoIP.dat",GEOIP_STANDARD);
    
$countries = array();
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/

//-----------------------------------------------------
//--- Start Configuration -----------------------------
//-----------------------------------------------------

define('SESSION_NAME''sessionid');

$user_table_fields = array(
  
"user_id" => "user_id",
  
"user_level" => "user_level",
  
"user_name" => "user_name",
  
"user_password" => "user_password",
  
"user_email" => "user_email",
  
"user_showemail" => "user_showemail",
  
"user_allowemails" => "user_allowemails",
  
"user_invisible" => "user_invisible",
  
"user_joindate" => "user_joindate",
  
"user_activationkey" => "user_activationkey",
  
"user_lastaction" => "user_lastaction",
  
"user_location" => "user_location",
  
"user_lastvisit" => "user_lastvisit",
  
"user_comments" => "user_comments",
  
"user_homepage" => "user_homepage",
  
"user_icq" => "user_icq"
);

//-----------------------------------------------------
//--- End Configuration -------------------------------
//-----------------------------------------------------

function get_user_table_field($add$user_field) {
  global 
$user_table_fields;
  return (!empty(
$user_table_fields[$user_field])) ? $add.$user_table_fields[$user_field] : "";
}

class 
Session {

  var 
$session_id;
  var 
$user_ip;
  var 
$user_location;
  var 
$current_time;
  var 
$session_timeout;
  var 
$mode "get";
  var 
$session_info = array();
  var 
$user_info = array();

  function 
Session() {
    global 
$config;
    
$this->session_timeout $config['session_timeout'] * 60;
    
$this->user_ip $this->get_user_ip();
    
$this->user_location $this->get_user_location();
    
$this->current_time time();

    
// Stop adding SID to URLs
    
@ini_set('session.use_trans_sid'0);

    
session_name(urlencode(SESSION_NAME));
    
session_start();

    
$this->demand_session();
  }

  function 
set_cookie_data($name$value$permanent 1) {
    
$cookie_expire = ($permanent) ? $this->current_time 60 60 24 365 0;
    
$cookie_name COOKIE_NAME.$name;
    
setcookie($cookie_name$value$cookie_expireCOOKIE_PATHCOOKIE_DOMAINCOOKIE_SECURE);
  }

  function 
read_cookie_data($name) {
    global 
$HTTP_COOKIE_VARS;
    
$cookie_name COOKIE_NAME.$name;
    return (isset(
$HTTP_COOKIE_VARS[$cookie_name])) ? $HTTP_COOKIE_VARS[$cookie_name] : false;
  }

  function 
get_session_id() {
    if (
SID == '') {
      
$this->mode "cookie";
    }

    
$this->session_id session_id();
  }

  function 
demand_session() {
    
$this->get_session_id();
    if (!
$this->load_session_info()) {
      
$this->delete_old_sessions();
      
$user_id = ($this->read_cookie_data("userid")) ? intval($this->read_cookie_data("userid")) : GUEST;
      
$this->start_session($user_id);
    }
    else {
      
$this->user_info $this->load_user_info($this->session_info['session_user_id']);
      
$update_cutoff = ($this->user_info['user_id'] != GUEST) ? $this->current_time $this->user_info['user_lastaction'] : $this->current_time $this->session_info['session_lastaction'];
      if (
$update_cutoff 60) {
        
$this->update_session();
        
$this->delete_old_sessions();
      }
    }
  }

  function 
start_session($user_id GUEST$login_process 0) {
    global 
$site_db;

    
$this->user_info $this->load_user_info($user_id);
    if (
$this->user_info['user_id'] != GUEST && !$login_process) {
      if (
$this->read_cookie_data("userpass") === $this->user_info['user_password'] && $this->user_info['user_level'] > USER_AWAITING) {
        
$this->set_cookie_data("userpass"$this->user_info['user_password']);
      }
      else {
        
$this->set_cookie_data("userpass"""0);
        
$this->user_info $this->load_user_info(GUEST);
      }
    }

    
//if (!$login_process) {
      
$sql "REPLACE INTO ".SESSIONS_TABLE."
              (session_id, session_user_id, session_lastaction, session_location, session_ip)
              VALUES
              ('
$this->session_id', ".$this->user_info['user_id'].", $this->current_time, '$this->user_location', '$this->user_ip')";
      
$site_db->query($sql);
    
//}

    
$this->session_info['session_user_id'] = $this->user_info['user_id'];
    
$this->session_info['session_lastaction'] = $this->current_time;
    
$this->session_info['session_location'] = $this->user_location;
    
$this->session_info['session_ip'] = $this->user_ip;

    if (
$this->user_info['user_id'] != GUEST) {
      
$this->user_info['user_lastvisit'] = (!empty($this->user_info['user_lastaction'])) ? $this->user_info['user_lastaction'] : $this->current_time;
      
$sql "UPDATE ".USERS_TABLE."
              SET "
.get_user_table_field("""user_lastaction")." = $this->current_time, ".get_user_table_field("""user_location")." = '$this->user_location', ".get_user_table_field("""user_lastvisit")." = ".$this->user_info['user_lastvisit']."
              WHERE "
.get_user_table_field("""user_id")." = ".$this->user_info['user_id'];
      
$site_db->query($sql);
    }
    
$this->set_cookie_data("lastvisit"$this->user_info['user_lastvisit']);
    
$this->set_cookie_data("userid"$this->user_info['user_id']);
    return 
true;
  }

  function 
login($user_name ""$user_password ""$auto_login 0$set_auto_login 1) {
    global 
$site_db$user_table_fields;

    if (empty(
$user_name) || empty($user_password)) {
      return 
false;
    }
    
$sql "SELECT ".get_user_table_field("""user_id").get_user_table_field(", ""user_password")."
            FROM "
.USERS_TABLE."
            WHERE "
.get_user_table_field("""user_name")." = '$user_name' AND ".get_user_table_field("""user_level")." <> ".USER_AWAITING;
    
$row $site_db->query_firstrow($sql);

    
$user_id = (isset($row[$user_table_fields['user_id']])) ? $row[$user_table_fields['user_id']] : GUEST;
    
$user_password md5($user_password);
    if (
$user_id != GUEST) {
      if (
$row[$user_table_fields['user_password']] == $user_password) {
        
$sql "UPDATE ".SESSIONS_TABLE."
                SET session_user_id = 
$user_id
                WHERE session_id = '
$this->session_id'";
        
$site_db->query($sql);
        if (
$set_auto_login) {
          
$this->set_cookie_data("userpass", ($auto_login) ? $user_password "");
        }
        
$this->start_session($user_id1);
        return 
true;
      }
    }
    return 
false;
  }

  function 
logout($user_id) {
    global 
$site_db;
    
$sql "DELETE FROM ".SESSIONS_TABLE."
            WHERE session_id = '
$this->session_id' OR session_user_id = $user_id";
    
$site_db->query($sql);
    
$this->set_cookie_data("userpass"""0);
    
$this->set_cookie_data("userid"GUEST);

    
$this->session_info = array();

    return 
true;
  }

  function 
delete_old_sessions() {
    global 
$site_db;
    
$expiry_time $this->current_time $this->session_timeout;
    
$sql "DELETE FROM ".SESSIONS_TABLE."
            WHERE session_lastaction < 
$expiry_time";
    
$site_db->query($sql);

    return 
true;
  }

  function 
update_session() {
    global 
$site_db;

    
$sql "UPDATE ".SESSIONS_TABLE."
            SET session_lastaction = 
$this->current_time, session_location = '$this->user_location'
            WHERE session_id = '
$this->session_id'";
    
$site_db->query($sql);

    
$this->session_info['session_lastaction'] = $this->current_time;
    
$this->session_info['session_location'] = $this->user_location;
    
$this->session_info['session_ip'] = $this->user_ip;

    if (
$this->user_info['user_id'] != GUEST) {
      
$sql "UPDATE ".USERS_TABLE."
              SET "
.get_user_table_field("""user_lastaction")." = $this->current_time, ".get_user_table_field("""user_location")." = '$this->user_location'
              WHERE "
.get_user_table_field("""user_id")." = ".$this->user_info['user_id'];
      
$site_db->query($sql);
    }
    return;
  }

  function 
generate_session_id() {
    return 
session_id();
  }

  function 
return_session_info() {
    return 
$this->session_info;
  }

  function 
return_user_info() {
    return 
$this->user_info;
  }

  function 
freeze() {
    return;
  }

  function 
load_session_info() {
    if (@
ini_get('register_globals')) {
      
session_register('__session');

      if (!isset(
$GLOBALS['__session'])) {
        
$GLOBALS['__session'] = array();
      }

      
$this->session_info = &$GLOBALS['__session'];

    } else {
      if (isset(
$_SESSION)) {
        if (!isset(
$_SESSION['__session'])) {
          
$_SESSION['__session'] = array();
        }

        
$this->session_info = &$_SESSION['__session'];

      } else {
        if (!isset(
$GLOBALS['HTTP_SESSION_VARS']['__session'])) {
          
$GLOBALS['HTTP_SESSION_VARS']['__session'] = array();
        }

        
$this->session_info = &$GLOBALS['HTTP_SESSION_VARS']['__session'];
      }
    }

    if (!isset(
$this->session_info['session_user_id'])) {
        return 
false;
    }

    return 
$this->session_info;
  }

  function 
load_user_info($user_id GUEST) {
    global 
$site_db$user_table_fields;

    if (
$user_id != GUEST) {
      
$sql "SELECT u.*, l.*
              FROM "
.USERS_TABLE." u, ".LIGHTBOXES_TABLE." l
              WHERE "
.get_user_table_field("u.""user_id")." = $user_id AND l.user_id = ".get_user_table_field("u.""user_id");
      
$user_info $site_db->query_firstrow($sql);
      if (!
$user_info) {
        
$sql "SELECT *
                FROM "
.USERS_TABLE."
                WHERE "
.get_user_table_field("""user_id")." = $user_id";
        
$user_info $site_db->query_firstrow($sql);
        if (
$user_info) {
          
$lightbox_id get_random_key(LIGHTBOXES_TABLE"lightbox_id");
          
$sql "INSERT INTO ".LIGHTBOXES_TABLE."
                  (lightbox_id, user_id, lightbox_lastaction, lightbox_image_ids)
                  VALUES
                  ('
$lightbox_id', ".$user_info[$user_table_fields['user_id']].", $this->current_time, '')";
          
$site_db->query($sql);
          
$user_info['lightbox_lastaction'] = $this->current_time;
          
$user_info['lightbox_image_ids'] = "";
        }
      }
    }
    if (empty(
$user_info[$user_table_fields['user_id']])) {
      
$user_info = array();
      
$user_info['user_id'] = GUEST;
      
$user_info['user_level'] = GUEST;
      
$user_info['user_lastaction'] = $this->current_time;
      
$user_info['user_lastvisit'] = ($this->read_cookie_data("lastvisit")) ? $this->read_cookie_data("lastvisit") : $this->current_time;
    }
    foreach (
$user_table_fields as $key => $val) {
      if (isset(
$user_info[$val])) {
        
$user_info[$key] = $user_info[$val];
      }
      elseif (!isset(
$user_info[$key])) {
        
$user_info[$key] = "";
      }
    }
    return 
$user_info;
  }

  function 
set_session_var($var_name$value) {
    
$this->session_info[$var_name] = $value;
    return 
true;
  }

  function 
get_session_var($var_name) {
    if (isset(
$this->session_info[$var_name])) {
      return 
$this->session_info[$var_name];
    }

    return 
'';
  }

  function 
drop_session_var($var_name) {
    unset(
$this->session_info[$var_name]);
  }

  function 
get_user_ip() {
    global 
$HTTP_SERVER_VARS$HTTP_ENV_VARS;
    
$ip = (!empty($HTTP_SERVER_VARS['REMOTE_ADDR'])) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ((!empty($HTTP_ENV_VARS['REMOTE_ADDR'])) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : getenv("REMOTE_ADDR"));
    
$ip preg_replace("/[^\.0-9]+/"""$ip);
    return 
substr($ip050);
  }

  function 
get_user_location() {
    global 
$self_url;
    return (
defined("IN_CP")) ? "Control Panel" preg_replace(array("/([?|&])action=[^?|&]*/""/([?|&])mode=[^?|&]*/""/([?|&])phpinfo=[^?|&]*/""/([?|&])printstats=[^?|&]*/""/[?|&]".URL_ID."=[^?|&]*/""/[?|&]l=[^?|&]*/""/[&?]+$/"), array(""""""""""""""), addslashes($self_url));
  }

  function 
url($url$amp "&amp;") {
    global 
$l;
    
$dummy_array explode("#"$url);
    
$url $dummy_array[0];

    if (
$this->mode == "get" && strpos($url$this->session_id) === false) {
      
$url .= strpos($url'?') !== false $amp "?";
      
$url .= SESSION_NAME."=".$this->session_id;
    }

    if (!empty(
$l)) {
      
$url .= strpos($url'?') !== false $amp "?";
      
$url .= "l=".$l;
    }

    
$url .= (isset($dummy_array[1])) ? "#".$dummy_array[1] : "";
    return 
$url;
  }
//end of class

//-----------------------------------------------------
//--- Start Session -----------------------------------
//-----------------------------------------------------
define('COOKIE_NAME''4images_');
define('COOKIE_PATH''/');
define('COOKIE_DOMAIN''');
define('COOKIE_SECURE''0');

$site_sess = new Session();

// Get Userinfo
$session_info $site_sess->return_session_info();
$user_info $site_sess->return_user_info();

/*
  MOD BAN
  START INSERT
*/
if ($ban check_ban())
{
  
$sql "INSERT INTO ".BAN_LOGS_TABLE."
          (date, ip, uri, ban_id, user_id)
          VALUES
          ("
.time().", '".$site_sess->session_info['session_ip']."', 'http".(($_SERVER['SERVER_PORT'] != 80) ? "s" "")."//".$_SERVER['SERVER_NAME'].addslashes($_SERVER['REQUEST_URI'])."', ".$ban['id'].", '".$user_info['user_id']."')";
  
$site_db->query($sql);
  
$main_template "ban";
  
$config['badword_list'] = "";
  include(
ROOT_PATH.'includes/page_header.php');
  
$site_template->register_vars(array(
    
"lang_ban" => $lang['ban_banned'],
    
"message" => format_text($ban['message'], 101111)
  ));
  
$site_template->print_template($site_template->parse_template($main_template));
  include(
ROOT_PATH.'includes/page_footer.php');
  exit;
}
/*
  MOD BAN
  END INSERT
*/

//-----------------------------------------------------
//--- Get User Caches ---------------------------------
//-----------------------------------------------------
$num_total_online 0;
$num_visible_online 0;
$num_invisible_online 0;
$num_registered_online 0;
$num_guests_online 0;
$user_online_list "";
$prev_user_ids = array();
$prev_session_ips = array();

if (
defined("GET_USER_ONLINE") && ($config['display_whosonline'] == || $user_info['user_level'] == ADMIN)) {
  
$time_out time() - 300;
  
$sql "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.""user_id").get_user_table_field(", u.""user_level").get_user_table_field(", u.""user_name").get_user_table_field(", u.""user_invisible").", userpic
  FROM "
.SESSIONS_TABLE." s
  LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = s.session_user_id)
  WHERE s.session_lastaction >= 
$time_out
  ORDER BY "
.get_user_table_field("u.""user_id")." ASC, s.session_ip ASC";
  
$result $site_db->query($sql);
  while (
$row $site_db->fetch_array($result)) {
    if (
$row['session_user_id'] != GUEST && (isset($row['user_id']) && $row['user_id'] != GUEST)) {
      if (!isset(
$prev_user_ids[$row['session_user_id']])) {
        
$is_invisible = (isset($row[$user_table_fields['user_invisible']]) && $row[$user_table_fields['user_invisible']] == 1) ? 0;
        
$invisibleuser = ($is_invisible) ? "" "";
        
$username = (isset($row[$user_table_fields['user_level']]) && $row[$user_table_fields['user_level']] == ADMIN && $config['highlight_admin'] == 1) ? sprintf("<b>%s</b>"$row[$user_table_fields['user_name']]) : $row[$user_table_fields['user_name']];
        if (!
$is_invisible || $user_info['user_level'] == ADMIN) {
          
$user_online_list .= ($user_online_list != "") ? "<br />" "";
          
$user_profile_link = (!empty($url_show_profile)) ? str_replace("{user_id}"$row['session_user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$row['session_user_id'];
          
$userpic_img = ($config['userpic'] && @file_exists(ROOT_PATH."data/userpic/".$row['userpic']) && $user_info['user_level'] >= USER) ? "<img src=\"".ROOT_PATH."data/userpic/".$row['userpic']."\" width=\"100".$userpic_width."\" height=\"100".$userpic_height."\">" "";
      

 
  $whos_online_userpic str_replace("{userpic_img}"""$userpic_img);
          
$user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\"><center>{user_country} ".$whos_online_userpic."<br />".$username."</a>".$invisibleuser."</center>".REPLACE_EMPTYREPLACE_EMPTY;
        }
        (!
$is_invisible) ? $num_visible_online++ : $num_invisible_online++;
        
$num_registered_online++;

      }
      
$prev_user_ids[$row['session_user_id']] = 1;
    }
    else {
      if (!isset(
$prev_session_ips[$row['session_ip']])) {
        
$num_guests_online++;


if (
$num_guests_online 1){
$invitado_online_list .= " , ";
}

      }
    }
    
$prev_session_ips[$row['session_ip']] = 1;
  }
  
$num_total_online $num_registered_online $num_guests_online;
  
//$num_invisible_online = $num_registered_online - $num_visible_online;

  
$site_template->register_vars(array(
    
"num_total_online" => $num_total_online,
    
"num_invisible_online" => $num_invisible_online,
    
"num_registered_online" => $num_registered_online,
    
"num_guests_online" => $num_guests_online,
"invitado_online_list" => $invitado_online_list,
    
"user_online_list" => $user_online_list,
    
"lang_user_online" => str_replace('{num_total_online}'$num_total_online$lang['user_online']),
    
"lang_user_online_detail" => str_replace(array('{num_registered_online}','{num_invisible_online}','{num_guests_online}'), array($num_registered_online,$num_invisible_online,$num_guests_online), $lang['user_online_detail']),
  ));
  
$whos_online $site_template->parse_template("whos_online");
  
$site_template->register_vars("whos_online"$whos_online);
  unset(
$whos_online);
  unset(
$prev_user_ids);
  unset(
$prev_session_ips);
}
?>

and a new template, called useronline.html

a demo can be found here: http://www.zapomnime.com/useronline.php, but you have to be logged in (username:test / pw:test)

All i want to have is the additional userfields shown up under the image. I dont pretend that the way (whit the additional php files) i've done it ist the best way, but it works so far. Thanks for your time, i appreciate your help, even if it takes longer (because of the mod you're working on), because that feature is very important to my users.

Regards

Georgi :)

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD Req] Who's online more detailed-
« Reply #46 on: February 13, 2006, 04:29:12 PM »
P.S : You do not need to load a new session file as it will only create trouble over the first one. ;)

As for the useronline.php file, there are several combined MODs (or numerous different fields) that disregards this MOD. You should not use them within the who's online feature.

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD Req] Who's online more detailed-
« Reply #47 on: February 13, 2006, 04:43:01 PM »
Code: [Select]
  $sql = "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_invisible").", userpic
  FROM ".SESSIONS_TABLE." s
  LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = s.session_user_id)
  WHERE s.session_lastaction >= $time_out
  ORDER BY ".get_user_table_field("u.", "user_id")." ASC, s.session_ip ASC";

This is the SQL Statement in the session_un.php

If you want that all other additional user fields also been show,
you have to modify this.
There are 2 ways:
1. You can to this manually: Just like userpic, you can add all other needed fields
2. you can do it by additional sql, that asked for all aditional user fields, that were defined in the db_field_definitons.php

Replace this code

Code: [Select]
  $sql = "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_invisible").", userpic
  FROM ".SESSIONS_TABLE." s
  LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = s.session_user_id)
  WHERE s.session_lastaction >= $time_out
  ORDER BY ".get_user_table_field("u.", "user_id")." ASC, s.session_ip ASC";

with this

Code: [Select]
   
   $additional_sql = "";
    if (!empty($additional_user_fields)) {
      $table_fields = $site_db->get_table_fields(USERS_TABLE);
      foreach ($additional_user_fields as $key => $val) {
        if (isset($table_fields[$key])) {
          $additional_sql .= ", u.$key";
        }
      }
    }

 $sql = "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_invisible")."$additional_sql
  FROM ".SESSIONS_TABLE." s
  LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = s.session_user_id)
  WHERE s.session_lastaction >= $time_out
  ORDER BY ".get_user_table_field("u.", "user_id")." ASC, s.session_ip ASC";


Now you can use your additional field entries from db_field_defintions.php
to display it.
For example if you have as additional user field "location".
the you can display it now by using $row['location']

I hope it's a little bit clear.
Of course you have to expand your $user_online_list where you already display the values like username etc, with this value.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD Req] Who's online more detailed-
« Reply #48 on: February 13, 2006, 05:09:42 PM »
Quote

$sql = "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_invisible")."$additional_sql


@icecream:

This line will create a Bad SQL Query error message actually.

However, there's only a slight error. You might want to change into :

Code: [Select]

$sql = "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_invisible"). $additional_sql."


;)

Quote

the you can display it now by using $row['location']


Well, since you're already aware of the $user_table_fields string, now is a good time to use it :

Quote

$row[$user_table_fields['location']]


;)

Quote

Of course you have to expand your $user_online_list where you already display the values like username etc, with this value.


On this one, I would agree if only one TD alignment were involved. Althought, what trez requests is having the userpic field on 4 different TD alignments as demonstrated from here :

http://www.4homepages.de/forum/index.php?topic=6797.msg60718#msg60718

Meaning, it would require more codings in order to get this done the way he wants it. ;)
« Last Edit: February 13, 2006, 05:22:26 PM by TheOracle »

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD Req] Who's online more detailed-
« Reply #49 on: February 13, 2006, 05:16:42 PM »
Code: [Select]

$sql = "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_invisible").$additional_sql."


you forgot an " at the end
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD Req] Who's online more detailed-
« Reply #50 on: February 13, 2006, 05:22:07 PM »
Quote

you forgot an " at the end


Oh ! my ... it's a " ."  " I forgot ... post modified above - thanks.

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD Req] Who's online more detailed-
« Reply #51 on: February 13, 2006, 05:25:14 PM »
First , thanks a lot both of you for your help :) I'am now starting to modify my code, and will post further questions as soon as they come :) THANKS!!

PS: Oracle, i just want to have one user per row, like on my demonstration posted in my last post ;)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD Req] Who's online more detailed-
« Reply #52 on: February 13, 2006, 05:26:48 PM »
Quote
On this one, I would agree if only one TD alignment were involved. Althought, what trez requests is having the userpic field on 4 different TD alignments as demonstrated from here :

http://www.4homepages.de/forum/index.php?topic=6797.msg60718#msg60718

Meaning, it would require more codings in order to get this done the way he wants it. ;)


well or we've the option of change the style of "how" this ill show using this way http://www.4homepages.de/forum/index.php?topic=11578.msg60913#msg60913  :mrgreen:

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD Req] Who's online more detailed-
« Reply #53 on: February 13, 2006, 05:28:00 PM »
First , thanks a lot both of you for your help :) I'am now starting to modify my code, and will post further questions as soon as they come :) THANKS!!

PS: Oracle, i just want to have one user per row, like on my demonstration posted in my last post ;)

Ah ! so that changes everything then. It makes the task a lot more easier since I was still pointing out from the first request you made on this subject. In that case - yes - by simply modifying the $user_online_list string, you could see your expected results. However, please take note that - making further modifications to that string - results a limitation to whos_online.html file.

Oh ! by the way, if you wish to add it the way you showed above, please, also, take note that no HTML tables are involved in the while loop (in this case). Meaning, if your intention is to space up your pictures (aside - > ) then - since no pictures are on the same sizes, it could brake the whos_online.html's HTML table presentation since the HTML table itself is not within a while loop but being showed once from the HTML file. ;)

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD Req] Who's online more detailed-
« Reply #54 on: February 13, 2006, 05:29:00 PM »
@stoleti:

If you wish to show it like that (without any limitations), then please read my point of vue again. ;)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD Req] Who's online more detailed-
« Reply #55 on: February 13, 2006, 05:33:19 PM »
but make it work on new files , how Trez is trying do !!! on new php /html files  :mrgreen:

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD Req] Who's online more detailed-
« Reply #56 on: February 13, 2006, 05:34:37 PM »
Quote

but make it work on new files , how Trez is trying do !!! on new php /html files


Please read this : http://www.4homepages.de/forum/index.php?topic=11578.msg61033#msg61033 :roll:

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD Req] Who's online more detailed-
« Reply #57 on: February 13, 2006, 05:36:12 PM »
ok guys, i replace the code, and i added for example the user location in this line:

Code: [Select]
$user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\"><center> ".$user_country." ".$whos_online_userpic."<br />".$username."</a>".$invisibleuser."</center>".REPLACE_EMPTY. REPLACE_EMPTY;
but there is nothing, have i forgot a line ? (sorry for being such a newbie) :D

PS: Here is the whole part of that function in sessions_un.php:
Code: [Select]
//-----------------------------------------------------
//--- Get User Caches ---------------------------------
//-----------------------------------------------------
$num_total_online = 0;
$num_visible_online = 0;
$num_invisible_online = 0;
$num_registered_online = 0;
$num_guests_online = 0;
$user_online_list = "";
$prev_user_ids = array();
$prev_session_ips = array();

if (defined("GET_USER_ONLINE") && ($config['display_whosonline'] == 1 || $user_info['user_level'] == ADMIN)) {
  $time_out = time() - 300;
 $additional_sql = "";
    if (!empty($additional_user_fields)) {
      $table_fields = $site_db->get_table_fields(USERS_TABLE);
      foreach ($additional_user_fields as $key => $val) {
        if (isset($table_fields[$key])) {
          $additional_sql .= ", u.$key";
        }
      }
    }

$sql = "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_invisible"). $additional_sql."
  FROM ".SESSIONS_TABLE." s
  LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = s.session_user_id)
  WHERE s.session_lastaction >= $time_out
  ORDER BY ".get_user_table_field("u.", "user_id")." ASC, s.session_ip ASC";

  $result = $site_db->query($sql);
  while ($row = $site_db->fetch_array($result)) {
    if ($row['session_user_id'] != GUEST && (isset($row['user_id']) && $row['user_id'] != GUEST)) {
      if (!isset($prev_user_ids[$row['session_user_id']])) {
        $is_invisible = (isset($row[$user_table_fields['user_invisible']]) && $row[$user_table_fields['user_invisible']] == 1) ? 1 : 0;
        $invisibleuser = ($is_invisible) ? "" : "";
        $username = (isset($row[$user_table_fields['user_level']]) && $row[$user_table_fields['user_level']] == ADMIN && $config['highlight_admin'] == 1) ? sprintf("<b>%s</b>", $row[$user_table_fields['user_name']]) : $row[$user_table_fields['user_name']];
        if (!$is_invisible || $user_info['user_level'] == ADMIN) {
          $user_online_list .= ($user_online_list != "") ? "<br />" : "";
          $user_profile_link = (!empty($url_show_profile)) ? str_replace("{user_id}", $row['session_user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$row['session_user_id'];
          $userpic_img = ($config['userpic'] && @file_exists(ROOT_PATH."data/userpic/".$row['userpic']) && $user_info['user_level'] >= USER) ? "<img src=\"".ROOT_PATH."data/userpic/".$row['userpic']."\" width=\"100".$userpic_width."\" height=\"100".$userpic_height."\">" : "";
     

    $whos_online_userpic = str_replace("{userpic_img}", "", $userpic_img);
          $user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\"><center> ".$user_country." ".$whos_online_userpic."<br />".$username."</a>".$invisibleuser."</center>".REPLACE_EMPTY. REPLACE_EMPTY;
        }
        (!$is_invisible) ? $num_visible_online++ : $num_invisible_online++;
        $num_registered_online++;

      }
      $prev_user_ids[$row['session_user_id']] = 1;
    }
    else {
      if (!isset($prev_session_ips[$row['session_ip']])) {
        $num_guests_online++;


if ($num_guests_online > 1){
$invitado_online_list .= " , ";
}

      }
    }
    $prev_session_ips[$row['session_ip']] = 1;
  }
  $num_total_online = $num_registered_online + $num_guests_online;
  //$num_invisible_online = $num_registered_online - $num_visible_online;

  $site_template->register_vars(array(
    "num_total_online" => $num_total_online,
    "num_invisible_online" => $num_invisible_online,
    "num_registered_online" => $num_registered_online,
    "num_guests_online" => $num_guests_online,
"invitado_online_list" => $invitado_online_list,
    "user_online_list" => $user_online_list,
    "lang_user_online" => str_replace('{num_total_online}', $num_total_online, $lang['user_online']),
    "lang_user_online_detail" => str_replace(array('{num_registered_online}','{num_invisible_online}','{num_guests_online}'), array($num_registered_online,$num_invisible_online,$num_guests_online), $lang['user_online_detail']),
  ));
  $whos_online = $site_template->parse_template("whos_online");
  $site_template->register_vars("whos_online", $whos_online);
  unset($whos_online);
  unset($prev_user_ids);
  unset($prev_session_ips);
}
?>

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD Req] Who's online more detailed-
« Reply #58 on: February 13, 2006, 05:37:42 PM »
And where's the row indication for the $user_country string in order for gathering the info ?

In the mean time :

Quote

$user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\"><center> ".$user_country." ".$whos_online_userpic."<br />".$username."</a>".$invisibleuser."</center>".REPLACE_EMPTY. REPLACE_EMPTY;


could simply be changed to :

Code: [Select]

$user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\"><center> ".$user_country. $whos_online_userpic."<br />".$username."</a>".$invisibleuser."</center>".REPLACE_EMPTY. REPLACE_EMPTY;


;)

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD Req] Who's online more detailed-
« Reply #59 on: February 13, 2006, 05:39:10 PM »
And where's the row indication for the $user_country string in order for gathering the info ?

where do i have to put that in, how it looks like ?  :oops: