4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Stoleti on January 15, 2006, 02:55:33 AM

Title: Req: More detailed who online list
Post by: Stoleti on January 15, 2006, 02:55:33 AM
I've see it in some sites and this can be useful , if we have 2 who's online list , make the default on main page and another one in a new page with more info about users online:

Getting info from MOD's like (Member personal info,Gender/country,Age)...

make show rows with : Pic ($userpic)  + Username , Country ($user_country), Gender ($user_gender) and more options for who have added more info at profiles :)

this is possible ??

Cheers :)
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 15, 2006, 02:18:39 PM
Could you give a specific example on this ?
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 15, 2006, 04:25:23 PM
here you've :)

Title: Re: Req: More detailed who online list
Post by: TheOracle on January 15, 2006, 05:36:27 PM
And what if the USERS_TABLE contains several hundreds of users within ?
Title: Re: Req: More detailed who online list
Post by: V@no on January 15, 2006, 05:39:35 PM
And what if the USERS_TABLE contains several hundreds of users within ?
they are talking about "who is online" page and not about "memberlist". Also, I see paging in the example, so even several hundreds online should not be a problem ;)
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 15, 2006, 07:23:53 PM
Quote

they are talking about "who is online" page and not about "memberlist".


This has already been assumed. What I meant is that all users accounts are in the USERS_TABLE and each pictures would need to be loaded at the same time.

Quote

Also, I see paging in the example, so even several hundreds online should not be a problem


Indeed. I saw it as well but just don't know how to proceed with paging rather than beginning with the : $get_paging = new paging(); from includes/sessions.php file. ;)
Title: Re: Req: More detailed who online list
Post by: V@no on January 15, 2006, 07:51:06 PM
Quote

they are talking about "who is online" page and not about "memberlist".


This has already been assumed. What I meant is that all users accounts are in the USERS_TABLE and each pictures would need to be loaded at the same time.
Sorry, I dont understand your point..what is the problem with that? You dont need to load any pictures that are not supposed to be showed on the page...
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 15, 2006, 08:46:55 PM
Quote

Sorry, I dont understand your point..what is the problem with that? You dont need to load any pictures that are not supposed to be showed on the page...


No, of course not. Althought, what if several members are logged at the same already and the script has to load each pictures from these online users ? Wouldn't that use more ressources on the site ?

Since paging seems to be the solution, on how many pages could this be seperated (or globally configured from the configuration page - ' if ' this can also be done) ? ;)
Title: Re: Req: More detailed who online list
Post by: V@no on January 15, 2006, 10:15:33 PM
No, of course not. Althought, what if several members are logged at the same already and the script has to load each pictures from these online users ? Wouldn't that use more ressources on the site ?
Well, do you see more then one the same username on home page? - no, same here.
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 15, 2006, 10:49:22 PM
I meant several different users at the same time. Right now, it is currently under a dropdown list (at least, from the default package). Meaning, if each pictures needs to be selected with the user account to know who's online ... won't it take more time to load (also depending of the size of active user accounts) ? ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 15, 2006, 10:59:13 PM
yes this ill work liek default list, more in new page more detailed, getting info from users profiles :) (avatar,gender,etc...) ...

yes about time to load, number of user, i understnadwhat u mean ... but i can't give exactly number, important ill be work :) so users can check and get info from users online list. :)
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 15, 2006, 11:31:37 PM
Quote

but i can't give exactly number


Then perhaps you could state the max number of users ' per page ' you'd like to show ? ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 15, 2006, 11:49:28 PM
yes :) same of pagging comments, make for example " 10 users " peer page  :mrgreen:
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 16, 2006, 12:01:20 AM
Very well. 10 users per page sounds good enough. If no one else posts this, then I think it is time for me to try out the $get_paging class since I have never made a MOD with it before. ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 16, 2006, 01:40:40 AM
Very well. 10 users per page sounds good enough. If no one else posts this, then I think it is time for me to try out the $get_paging class since I have never made a MOD with it before. ;)

Perfect  :D

But this ill get info from users profiles (avatar {userpic} ; username, age, gender, country..etc ) ;) i hope u don't forget it  :D
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 16, 2006, 01:53:56 AM
First, I will try to re-build what's from the screenshot. ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 16, 2006, 03:07:23 AM
First, I will try to re-build what's from the screenshot. ;)

Yea , i totally agree  :mrgreen: , first try make work the same from screenshot , and after modifications  8)
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 16, 2006, 03:07:38 AM
Ok, so let's try the very basic way first. If you do see the picture beside the username (in a most cheap way I must say "for now") then it means it's working perfectly (in case you wonder why the presentation might be a little funky for the first time).

Assuming you're using the original block of 4images from your includes/sessions.php file, make a backup of it first.

Then, find :

Quote

if (defined("GET_USER_ONLINE") && ($config['display_whosonline'] == 1 || $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")."
     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 != "") ? ", " : "";
          $user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $row['session_user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$row['session_user_id'];
          $user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\">".$username."</a>".$invisibleuser;
        }
        (!$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++;
      }
    }
    $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,
    "user_online_list" => $user_online_list
  ));
  $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);
}


replace with :

Code: [Select]

if (defined("GET_USER_ONLINE") && ($config['display_whosonline'] == 1 || $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.", "userpic").get_user_table_field(", u.", "user_invisible")."
  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) ? REPLACE_EMPTY : "";
        $username = (isset($row[$user_table_fields['user_level']]) && $row[$user_table_fields['user_level']] == ADMIN && $config['highlight_admin'] == 1 && !empty($row[$user_table_fields['userpic']])) ? sprintf("<b>%s</b>", $row[$user_table_fields['userpic']]. $row[$user_table_fields['user_name']]) : (!empty($row[$user_table_fields['userpic']])) ? $row[$user_table_fields['userpic']]. $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 != "") ? ", " : "";
          $user_profile_link = (!empty($url_show_profile)) ? str_replace("{user_id}", $row['session_user_id'], $url_show_profile) : ROOT_PATH."index.php?pg=member_profile&action=showprofile&amp;".URL_USER_ID."=".$row['session_user_id'];
          $user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\">".$username."</a>".$invisibleuser;
        }
        (!$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++;
      }
    }
    $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,
    "user_online_list" => $user_online_list
  ));
  $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);
}

Title: Re: Req: More detailed who online list
Post by: Stoleti on January 16, 2006, 03:18:20 AM
this is my block of code with modifications (i've not the original,because i've installed some MOD's)

Quote
if (defined("GET_USER_ONLINE") && ($config['display_whosonline'] == 1 || $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.", "userpic").get_user_table_field(", u.", "user_invisible")."
     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) ? REPLACE_EMPTY : "";
        $username = (isset($row[$user_table_fields['user_level']]) && $row[$user_table_fields['user_level']] == ADMIN && $config['highlight_admin'] == 1 && !empty($row[$user_table_fields['userpic']])) ? sprintf("<b>%s</b>", $row[$user_table_fields['userpic']]. $row[$user_table_fields['user_name']]) : (!empty($row[$user_table_fields['userpic']])) ? $row[$user_table_fields['userpic']]. $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 != "") ? ", " : "";
          $user_profile_link = (!empty($url_show_profile)) ? str_replace("{user_id}", $row['session_user_id'], $url_show_profile) : ROOT_PATH."index.php?pg=member_profile&action=showprofile&amp;".URL_USER_ID."=".$row['session_user_id'];
          /*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        $username = "<img src=\"".ROOT_PATH."flags/".strtolower($cid).".png"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$username;
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/   
           $user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\">".$username."</a>".$invisibleuser;
        }
        (!$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++;
        /*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        $invitado_online_list  = "<font color=\"#00FFFF\">".$num_guests_online."</font><img src=\"".ROOT_PATH."flags/".strtolower($cid).".png"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$invitado_online_list ;
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/
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,
    "user_online_list" => $user_online_list
  ));
  $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);
}

i've added your code already here  8)
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 16, 2006, 03:23:52 AM
Quote

i've added your code already here


Ok so ... what's the status ?
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 16, 2006, 03:50:51 AM
{lang_user_online}


Doesn't work  8O
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 16, 2006, 03:51:31 AM
Quote

Doesn't work


Specifics please !!!
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 16, 2006, 03:57:15 AM
well just not show "empty space"  :|
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 16, 2006, 04:05:30 AM
And, just to check, you do have the userpic row under your USERS_TABLE right ?

If so, in the mean time, I just noticed I made a slight mistake from my last post.

Find this line :

Quote

$username = (isset($row[$user_table_fields['user_level']]) && $row[$user_table_fields['user_level']] == ADMIN && $config['highlight_admin'] == 1 && !empty($row[$user_table_fields['userpic']])) ? sprintf("<b>%s</b>", $row[$user_table_fields['userpic']]. $row[$user_table_fields['user_name']]) : (!empty($row[$user_table_fields['userpic']])) ? $row[$user_table_fields['userpic']]. $row[$user_table_fields['user_name']] : $row[$user_table_fields['user_name']];


replace with :

Code: [Select]

$username = (isset($row[$user_table_fields['user_level']]) && $row[$user_table_fields['user_level']] == ADMIN && $config['highlight_admin'] == 1 && !empty($row[$user_table_fields['userpic']])) ? sprintf("<b>%s</b>", "<img src=\"".ROOT_PATH."data/userpic/".$row[$user_table_fields['userpic']]."\">".REPLACE_EMPTY. $row[$user_table_fields['user_name']]) : (!empty($row[$user_table_fields['userpic']])) ? "<img src=\"".ROOT_PATH."data/userpic/".$row[$user_table_fields['userpic']]."\">".REPLACE_EMPTY. $row[$user_table_fields['user_name']] : $row[$user_table_fields['user_name']];


Keep me posted on this.
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 16, 2006, 04:51:37 AM
yes it's under "4images_users"  8) ( i hope i've understand what u mean ...)  :roll:
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 16, 2006, 12:44:03 PM
Ok so ... did the latest codings showed you the userpic ?  :roll:
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 16, 2006, 04:00:27 PM
no , this have just show the users list with country flags (MOD before installed)  :?
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 16, 2006, 04:21:02 PM
It's obvious that if you already installed a MOD over the original codings before, it will be harder for you to make the replacement (rather than just replacing the original codings). ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 16, 2006, 05:02:21 PM
maybe you take a look into my sessions.php (now without any of this changes) ... only modifications by another mod's ..(country flags,lightbox..) !

Title: Re: Req: More detailed who online list
Post by: TheOracle on January 16, 2006, 05:22:05 PM
I'm not sure what you're asking ... you wish, for me, to investigate the country, flags, lightbox you installed ? If so, I don't think so. ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 16, 2006, 07:41:07 PM
no no just for u take a look, cuz you've made that for a original code, so i've installed mod's before, so i've think better u take a look and see if ill be necessary change something from ur code (before posted)  :mrgreen:

I mean , make a code but already count with modifications (i've made before) :) thats nothing about investigation :) just to take a look :)
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 17, 2006, 01:57:27 AM
@Stoleti:

Good news. I have just added the userpic row into the "who's online" template and it looks pretty great actually. You can customize your HTML Table the way you want it from now on (still with the userpic subject). I will post the results sometime tonight. ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 17, 2006, 02:32:41 AM
awesome new :)

but i think i've forgot tell you , this can work in a new page ?

make 2 ways to see :

1 ) the default list (in my case country flag + username)
2 ) This one the detailed version of who's online ( i.e : users_online.php) where we make a detailed version of who's online .

and here that you've said about we customize the HTML ill be a very good new :)
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 17, 2006, 03:32:44 AM
Quote

this can work in a new page ?


My modifications only applys from the core files as no new files are / will be involved.
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 17, 2006, 04:20:43 AM
 :?  because i've who's online work in all pages, in small table (vertical mode)...so thats my ideia of make new file for this, for not affect whole templates style  :roll:
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 17, 2006, 04:31:11 AM
For now, since my knowledge is quite limited with paging, I have - at least - presented users from the who's online table the way you wanted (according to your screenshot).

Meaning, no paging is currently involved under the first release since it is the first time I'm trying this kind of feature ...

Is it still alright if no paging is in ? For the moment, I think it would be great to know if, what I already did, does fit your needs first - before jumping into any additional details. ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 17, 2006, 02:09:51 PM
yes thats no problem :) the question its another one ... make that work in another file ? example "users_online.php" ??? with paging or without :)
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 17, 2006, 02:49:57 PM
Quote

make that work in another file ?


I thought I made myself clear the first time. The first release will be from core files - such as includes/sessions.php file. :?

Then, if everything works great, I will make further codings in a new file so that users won't use paging directly from includes/sessions.php (too dangerous). ;)
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 17, 2006, 03:00:58 PM
Now, here's the modifications I did yesterday.

First, make a backup of your includes/sessions.php file, your templates/<your_template>/whos_online.html file and your USERS_TABLE.

// Step 1

In your includes/sessions.php file - based from the original block of 4images,

find :

Quote

if (defined("GET_USER_ONLINE") && ($config['display_whosonline'] == 1 || $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")."
     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 != "") ? ", " : "";
          $user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $row['session_user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$row['session_user_id'];
          $user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\">".$username."</a>".$invisibleuser;
        }
        (!$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++;
      }
    }
    $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,
    "user_online_list" => $user_online_list
  ));
  $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);
}


replace with :

Code: [Select]

if (defined("GET_USER_ONLINE") && ($config['display_whosonline'] == 1 || $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")."
  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)) {
  $sql = "SELECT user_country, user_age, user_hobbies, userpic FROM ".USERS_TABLE;
  $additional_results = $site_db->query($sql);
  while ($additional_user_rows = $site_db->fetch_array($additional_results)) {
    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['userpic']]. $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_source = (isset($additional_user_rows['userpic']) && $additional_user_rows['userpic'] && $config['userpic']) ? $additional_user_rows['userpic'] : "";
          $userpic_img = $site_sess->url(ROOT_PATH."data/userpic/".$userpic_source);
          $user_hobbies = (isset($additional_user_rows['user_hobbies']) && $additional_user_rows['user_hobbies']) ? $additional_user_rows['user_hobbies'] : $lang['no_comments'];
          $user_age = (isset($additional_user_rows['user_age']) && $additional_user_rows['user_age']) ? $additional_user_rows['user_age']. REPLACE_EMPTY. $lang['years_old'] : "";
          $user_country = (isset($additional_user_rows['user_country']) && $additional_user_rows['user_country']) ? $additional_user_rows['user_country'] : "";
          $user_gender = (isset($additional_user_rows['user_gender']) && $additional_user_rows['user_gender']) ? $additional_user_rows['user_gender'] : "";
          $user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\">".$username."</a>".$invisibleuser;
        }
        (!$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++;
      }
    }
    }
    $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,
    "userpic_img" => $userpic_img,
    "user_hobbies" => $user_hobbies,
    "user_age" => $user_age,
    "user_country" => $user_country,
    "user_gender" => $user_gender,
    "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);
}


Now, I don't know for you but these are the fields that I have added :

Quote

user_hobbies
user_age
user_country
user_gender



Meaning, some rows might contain different names as yours. If so, simply change the names from that paragraph in order to match yours. ;)

// Step 2

In your templates/<your_template>/whos_online.html file, you may customize it the way you like it as I use these tags :

Code: [Select]

{if userpic_img}
<img src="{userpic_img}">
{endif userpic_img}

{if user_online_list}
{user_online_list}
{endif user_online_list}

{if user_age}
{user_age}
{endif user_age}

{if user_country}
{user_country}
{endif user_country}

{if user_hobbies}
{user_hobbies}
{endif user_hobbies}

{if user_gender}
{user_gender}
{endif user_gender}


// Step 3

In your lang/english/main.php file,

add above the "?>" tag :

Code: [Select]

$lang['years_old'] = "years old.";


// Step 4

Make sure you have these field names correctly set from your USERS_TABLE and from your includes/db_field_definitions.php file.

Let me know how it goes. ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 17, 2006, 08:10:09 PM
ok i ill make a full backup (DB, and another files) before ;) tonight i give u the results  :mrgreen:
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 17, 2006, 10:34:28 PM
Update :

I forgot to specify the $lang['years_old'] field (if you don't already have it). I have just updated my post above (Step 3). ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 17, 2006, 10:35:27 PM
Parse error: parse error, unexpected $ in /home/blacktra/public_html/includes/sessions.php on line 646

Line 555 - 646

Quote
if (defined("GET_USER_ONLINE") && ($config['display_whosonline'] == 1 || $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")."
     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)) {
  $sql = "SELECT user_country, user_age, user_hobbies, userpic FROM ".USERS_TABLE;
  $additional_results = $site_db->query($sql);
  while ($additional_user_rows = $site_db->fetch_array($additional_results)) {
    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['userpic']]. $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'];
          /*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        $username = "<img src=\"".ROOT_PATH."flags/".strtolower($cid).".png"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$username;
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/  
          $userpic_source = (isset($additional_user_rows['userpic']) && $additional_user_rows['userpic'] && $config['userpic']) ? $additional_user_rows['userpic'] : "";
          $userpic_img = $site_sess->url(ROOT_PATH."data/userpic/".$userpic_source);
          $user_sexuality = (isset($additional_user_rows['user_sexuality']) && $additional_user_rows['user_sexuality']) ? $additional_user_rows['user_sexuality'] : $lang['no_comments'];
          $user_age = (isset($additional_user_rows['user_age']) && $additional_user_rows['user_age']) ? $additional_user_rows['user_age']. REPLACE_EMPTY. $lang['years_old'] : "";
          $user_country = (isset($additional_user_rows['user_country']) && $additional_user_rows['user_country']) ? $additional_user_rows['user_country'] : "";
          $user_gender = (isset($additional_user_rows['user_gender']) && $additional_user_rows['user_gender']) ? $additional_user_rows['user_gender'] : "";
          $user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\">".$username."</a>".$invisibleuser;
        }
        (!$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++;

        /*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        $invitado_online_list  = "<font color=\"#00FFFF\">".$num_guests_online."</font><img src=\"".ROOT_PATH."flags/".strtolower($cid).".png"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$invitado_online_list ;
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/
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,
    "userpic_img" => $userpic_img,
    "user_sexuality" => $user_sexuality,
    "user_age" => $user_age,
    "user_country" => $user_country,
    "user_gender" => $user_gender,
    "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);
}
?>

 :?:
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 17, 2006, 10:39:06 PM
Obviously, we don't have the same routines since you added a none related MOD with this MOD. The error you're having means there's a missing closed braket (this time probably from the while loop statement - as an end argument).

For your case,

find :

Quote

unset($prev_session_ips);
}


replace with :

Code: [Select]

unset($prev_session_ips);
}
}


This should do the trick.
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 17, 2006, 10:42:19 PM
In the mean time, since you're not using the "user_hobbies" row, I'd suggest to remove it from the SQL's SELECT line statement as well (since it would seems you removed it from one of the $additional_user_rows below). ;)

Once removed, you should rather replace it with the user_sexuality name you created as an additional field instead. ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 17, 2006, 11:24:10 PM
In the mean time, since you're not using the "user_hobbies" row, I'd suggest to remove it from the SQL's SELECT line statement as well (since it would seems you removed it from one of the $additional_user_rows below). ;)

Once removed, you should rather replace it with the user_sexuality name you created as an additional field instead. ;)

i've just replaced with that, cuz i've that on user_table , and no "hobbies" :)

being on USER_TABLE must work , i think  :?
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 17, 2006, 11:28:00 PM
Quote

being on USER_TABLE must work , i think


The users table is : USERS_TABLE. ;)

As for the rest, if you did added the ending braket at the end, everything should work out as you planned (for the first release).
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 17, 2006, 11:31:08 PM
error has gone  :D

but still showing only the default stuff (country flag + username) , other stuff no  :roll:

yes USERS_TABLE ..lil grammar mistake  :mrgreen:
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 17, 2006, 11:34:28 PM
Quote

But still showing only the default stuff (country flag + username) , other stuff no


If you're saying that the userpic row is not showing up, then it is clairly an implementation issue.

However, just to see if I'm right ;

[ edit ]

let's remain with this line :

Quote

FROM ".USERS_TABLE;

Title: Re: Req: More detailed who online list
Post by: Stoleti on January 17, 2006, 11:50:54 PM
still showing the default users list (who's online)

my code with updates :

Code: [Select]
if (defined("GET_USER_ONLINE") && ($config['display_whosonline'] == 1 || $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")."
  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)) {
  $sql = "SELECT user_country, user_age, user_sexuality, userpic FROM ".USERS_TABLE." WHERE ".get_user_table_field("", "user_id")." = ".$user_info['user_id'];
  $additional_results = $site_db->query($sql);
  while ($additional_user_rows = $site_db->fetch_array($additional_results)) {
    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['userpic']]. $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'];
          /*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        $username = "<img src=\"".ROOT_PATH."flags/".strtolower($cid).".png"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$username;
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/   
          $userpic_source = (isset($additional_user_rows['userpic']) && $additional_user_rows['userpic'] && $config['userpic']) ? $additional_user_rows['userpic'] : "";
          $userpic_img = $site_sess->url(ROOT_PATH."data/userpic/".$userpic_source);
          $user_sexuality = (isset($additional_user_rows['user_sexuality']) && $additional_user_rows['user_sexuality']) ? $additional_user_rows['user_sexuality'] : $lang['no_comments'];
          $user_age = (isset($additional_user_rows['user_age']) && $additional_user_rows['user_age']) ? $additional_user_rows['user_age']. REPLACE_EMPTY. $lang['years_old'] : "";
          $user_country = (isset($additional_user_rows['user_country']) && $additional_user_rows['user_country']) ? $additional_user_rows['user_country'] : "";
          $user_gender = (isset($additional_user_rows['user_gender']) && $additional_user_rows['user_gender']) ? $additional_user_rows['user_gender'] : "";
          $user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\">".$username."</a>".$invisibleuser;
        }
        (!$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++;
        /*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        $invitado_online_list  = "<font color=\"#00FFFF\">".$num_guests_online."</font><img src=\"".ROOT_PATH."flags/".strtolower($cid).".png"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$invitado_online_list ;
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/
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,
    "userpic_img" => $userpic_img,
    "user_sexuality" => $user_sexuality,
    "user_age" => $user_age,
    "user_country" => $user_country,
    "user_gender" => $user_gender,
    "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);
}
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 17, 2006, 11:53:53 PM
And what about your whos_online.html file ? Could you post it as well ? In the mean time, you did not added the "user_gender" row in your SQL's SELECT statement.
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 12:00:12 AM
all stuff i've in my USERS_TABLES , and i've put all tags you'e before posted on whos_online.html :), i've make all you've said  8)
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 18, 2006, 12:05:04 AM
all stuff i've in my USERS_TABLES , and i've put all tags you'e before posted on whos_online.html :), i've make all you've said  8)

If so ... then why do I see :

Quote

$user_gender = (isset($additional_user_rows['user_gender']) && $additional_user_rows['user_gender']) ? $additional_user_rows['user_gender'] : "";         


and is NOT in :

Quote

$sql = "SELECT user_country, user_age, user_sexuality, userpic, where's user_gender ??? FROM ".USERS_TABLE." WHERE ".get_user_table_field("", "user_id")." = ".$user_info['user_id'];


:?:
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 12:17:22 AM
added  :D wooooow its working !!!!!!!! :mrgreen:

and about paging, any news ?

a lil question how make i show each user by row with diferent background ??
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 18, 2006, 12:21:51 AM
Quote

and about paging, any news ?


Since it would seems, by your report, that all is working properly. I should start considering plans to build an additional routines for the whos_online with paging. I will keep this topic updated once I succeed.

Quote

a lil question how make i show each user by row with diferent background ??


One feature at the time - shall we ? !
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 12:25:30 AM
sure  :D !!! for now thats a very good work, succefull  :mrgreen:
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 18, 2006, 12:28:53 AM
May I ask you to post your URL so that others might see a preview of these successful codings ? ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 12:43:13 AM
actually i'm having a problem about user age....

this show birthday  date and not a user age  ( show "------------" )

-----

But in member profile the tag {user_age} works and here only {user_age_birthday}  8O

the info about Age MOD in attach  8)


-------

well i ill show when all works  fine :mrgreen: , and probably if thats not against rulez move to publish mod's ????? :roll:
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 12:45:50 AM
this means

{user_age } => XX

{user_age_birthday} => XXXX - XX - XX

but why in profile both work and here only birthday work  8O

from DB_Field_Definitions.php

Quote
$additional_user_fields['user_age_birthday'] = array($lang['user_age_birthday'], "text", 1);


but why {user_age} not work like in member_profile ?? 8O
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 18, 2006, 12:47:51 AM
Quote

but why {user_age} not work like in member_profile ??


Please read the footer of Step 1 for the answer of that question.
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 12:52:38 AM
another problem this only show my info, another users, not show at this way  8O , show default way....

 8O 8O
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 18, 2006, 12:54:36 AM
I have took a look at the ZIP file you posted regarding the user age MOD and I'm afraid to report that it contains too much expensive codings in order to implement in this MOD. No support will be given on this one. Sorry.
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 12:55:16 AM
so let's forget the AGE , and solving the another problem , why that only work at right way to me and for another users,this show as default way? without userpic ..etc ???

 :?:
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 18, 2006, 12:55:37 AM
another problem this only show my info, another users, not show at this way  8O , show default way....

 8O 8O

Look, you said it was working properly. Is it my understanding you overlooked before answering ?  :?
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 01:01:29 AM
yes i've said, but i've been alone , and for this this is working, maybe cuz be ADMIN , but i've join at site with my another pc , and this doesn't work , show country flag + username
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 01:02:47 AM
this have just show my info ........ from another user this have show the defaul ..only  :?
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 18, 2006, 01:05:14 AM
this have just show my info ........ from another user this have show the defaul ..only  :?

Then, I have just modified this post :

http://www.4homepages.de/forum/index.php?topic=11168.msg57606#msg57606

Put back the USERS_TABLE; (the way it was before).
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 01:18:57 AM
i've put back FROM ".USERS_TABLE;

and now show the noimage.png (at userpic) and only work username ...

Quote
$sql = "SELECT user_country, user_age, user_sexuality, userpic,user_gender FROM ".USERS_TABLE;

Title: Re: Req: More detailed who online list
Post by: TheOracle on January 18, 2006, 01:39:51 AM
Ok, I see what you mean now. The 2nd username (and so on) gets below the same table as the first. We do not see each table for each users but the same table from the first user through the last. :(

I guess I'll have to look deeper into this problem.
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 02:20:11 AM
ideia ill be :

1 - one user peer row
2 - Make it work for "All" users, on that case that have only work for me , but for that user, that have show in same row, and show as default way "flag+username" ;)

Keep me on for updates  8)
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 18, 2006, 05:53:59 AM
Ok, here's the thing. Whos_online.html's HTML Table structure is not under any while loop statement. Meaning, the username only appears in one whole table presentation and is, defaultly, seperated with commas under includes/sessions.php file (to make seperations of each usernames from a single TD alignment).

Meaning, in order to accomplish your request, you would NOT be able to make any modifications under whois_online.html file since the HTML Table will have to be re-coded from includes/sessions.php file entirely.

That said, are you sure you wish to have this ? Since you will be limited to edit your HTML file after this.

Please advise.

[EDIT]

OR, I don't know (yet) if this can be done but, by simply adding the TD alignment as part of the while loop then register that new related string to the whois_online.html, perhaps it could work. Althought, I can't be a 100% sure on this one since I did not tested this before.  :|
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 04:56:45 PM
without change html file ? how can i ,make it look like the first example (attach image) ? for me if this look like that for me ill be perfect  :mrgreen:
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 18, 2006, 06:06:16 PM
I'll see what I can do. I'll work on it sometime today and keep this topic updated eventually.
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 18, 2006, 06:54:59 PM
alright :) i ill wait for new updates  :mrgreen: , if i've any ideia i ill post them here !
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 19, 2006, 12:09:32 AM
how can i make a hidden/expanded online list  work i mean :

normal/expanded ill be :

Currently active users: XX

user 1
user 2
user 3


a Hidden version :

Currently active users: XX

being as link " Currently active users: XX " link for both versions  8) can be useful to save space in templates, and with option to expand for who want see full version :)

this ideia its for "Default version of user online list" not for detailed  8)



Title: Re: Req: More detailed who online list
Post by: TheOracle on January 19, 2006, 12:49:40 AM
Please stop asking for several requests at the time (on the same subject). You have already requested one modification as I'm currently developping it. However, If you wish to switch features, it is not too late to state it.  :?
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 19, 2006, 02:14:46 AM
Please stop asking for several requests at the time (on the same subject). You have already requested one modification as I'm currently developping it. However, If you wish to switch features, it is not too late to state it.  :?

ok ok sorry  :|
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 21, 2006, 05:23:32 PM
@Stoleti :

Update :

The whos_online function has been seperated into it's own file as I'm currently finalizing the codes in order to be used (well, mostly) as your screenshot describes. ;)

As for the paging class, this will have to wait a little since I don't know how to use it yet. Obviously, it is unlikely I will get any help on this one too ...

Next update to come soon . . .
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 21, 2006, 05:34:48 PM
Thats  Good new , about the age problem skip it  :wink: , let's make it more easy and simple  :mrgreen:

I ill wait for the next update go on !!  :D
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 21, 2006, 11:24:06 PM
I forgot to ask ; do you wish GUEST level to see these additional features as well or just logged in users & admin ?
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 22, 2006, 01:17:24 AM
I forgot to ask ; do you wish GUEST level to see these additional features as well or just logged in users & admin ?


Yes :) they can see  !
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 23, 2006, 04:44:51 AM
Quote

Yes Smile they can see  !


Which one ?  :?
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 23, 2006, 04:48:18 AM
GUEST's  correct ? ;)

The GUEST's can see the additional features .
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 23, 2006, 04:53:12 AM
Quote

The GUEST's can see the additional features


Very well. I'll see what I can do.
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 23, 2006, 05:10:33 AM
but a bit out of question for example on " 20 users online " this can only count the reg. members , without guest's ? i mean it because on "corrently active users" this count guest's + reg, members ;) just wondering about it, nothing so special .
Title: Re: Req: More detailed who online list
Post by: TheOracle on January 23, 2006, 05:21:08 AM
but a bit out of question for example on " 20 users online " this can only count the reg. members , without guest's ? i mean it because on "corrently active users" this count guest's + reg, members ;) just wondering about it, nothing so special .

Forget I asked. ;)

You're correct. The who's online function does not currently track GUEST level but only registered users. I guess it will remain this way. ;)
Title: Re: Req: More detailed who online list
Post by: Stoleti on January 23, 2006, 06:09:50 AM
yea, you've got the ideia  :mrgreen: