Advertisement:

Author Topic: HELP - how we can add that column - "last login" of the members  (Read 805 times)

Offline Espirito Vadio

  • Newbie
  • *
  • Posts: 6
HELP - how we can add that column - "last login" of the members
« on: January 16, 2018, 07:09:49 AM »

Hello everyone

The theme is Aluminium (2.0), and the SMF: SMF 2.0.15


We already read many board's from the forum, but we cant do that widout your help.

We would like to have a column as exemplified in the next images ...


Now it's like this, without the "column"



This is how we want it.
This is another Forum, but I know that in Simple Portal there is also what is in the next image ...




What we want is this!



Everything is in Portuguese, sorry  :( ,  but it does not matter, we want to know, how we can add that column?
We want some, wo tell us, when it was the "last login" of the members.


Thank you for all the help you can give us.

Best Regards


Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,049
  • 'Tis the gift to be simple (duh)
Re: HELP - how we can add that column - "last login" of the members
« Reply #1 on: January 17, 2018, 12:40:51 PM »
Do you want 'Last Online', as in Admin -> Members?

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,049
  • 'Tis the gift to be simple (duh)
Re: HELP - how we can add that column - "last login" of the members
« Reply #2 on: January 17, 2018, 10:18:00 PM »
Ok, here's how to add the column and make it sortable.  You should remove at least one column (website would be best, if you don't need it), or table will be too wide.

Memberlist.template.php

Code: [Select]

/// Group and date.
echo '
<td class="windowbg lefttext">', empty($member['group']) ? $member['post_group'] : $member['group'], '</td>
<td class="windowbg lefttext">', $member['registered_date'], '</td>
<td class="windowbg lefttext">', $member['last_login'], '</td>';

if (!isset($context['disabled_fields']['posts']))


Memberlist.php

Code: [Select]

'registered' => array(
'label' => $txt['date_registered']
),

'last_login' => array(
'label' => 'Last visit'
),

'posts' => array(


Code: [Select]

'registered' => array(
'down' => 'mem.date_registered DESC',
'up' => 'mem.date_registered ASC'
),

'last_login' => array(
'down' => 'mem.last_login DESC',
'up' => 'mem.last_login ASC'
),

'id_group' => array(



Offline Espirito Vadio

  • Newbie
  • *
  • Posts: 6
Re: HELP - how we can add that column - "last login" of the members
« Reply #3 on: January 18, 2018, 06:41:19 AM »
First of all we want to thank you for your help.

Yes, we can remove the column from the email, it was convenient.
The goal is to take out the Email's column and insert "last time online / visit or last online". anything within that information.

example image:





However, we will try to use the codes posted in the previous topic, and then confirm if it resulted.



Extremely grateful

Hugs
« Last Edit: January 18, 2018, 07:18:16 AM by Espirito Vadio »

Offline Espirito Vadio

  • Newbie
  • *
  • Posts: 6
Re: HELP - how we can add that column - "last login" of the members
« Reply #4 on: January 22, 2018, 04:39:29 AM »

Hello everyone


We already have the column as we wanted. It work's  ;D


Here is the picture




We are very grateful. Thanks


hug's