Last Active in Profile Area

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
halil16
Registered User
Posts: 1446
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Last Active in Profile Area

Post by halil16 »

Hello there,
I want the last active date instead of the registration date in the profile fields on the topics.

Can you help me?

Image
Buy me a coffee ☕
Hire me for your phpBB board. 🚩
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
O BeldeThatTowns*for sale*$1250 🛒
"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52794
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve

Re: Last Active in Profile Area

Post by stevemaury »

What do you mean by "Last active"? Last time visited? Last time posted?
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52794
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve

Re: Last Active in Profile Area

Post by stevemaury »

If you want to show Last visit:

OPEN viewtopic.php

FIND:

Code: Select all

'joined'		=> $user->format_date($row['user_regdate']),
REPLACE WITH:

Code: Select all

'joined'		=> $user->format_date($row['user_lastvisit']),
OPEN styles/prosilver/viewtopic_body.html

FIND:

Code: Select all

<dd class="profile-joined"><strong>{L_JOINED}{L_COLON}</strong> {postrow.POSTER_JOINED}</dd>
REPLACE WITH:

Code: Select all

<dd class="profile-joined"><strong>{L_LAST_VISIT}{L_COLON}</strong> {postrow.POSTER_JOINED}</dd>
Clear the cache.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
halil16
Registered User
Posts: 1446
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Re: Last Active in Profile Area

Post by halil16 »

I'm sorry for not being able to explain it properly. I was trying to say:
Image
Buy me a coffee ☕
Hire me for your phpBB board. 🚩
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
O BeldeThatTowns*for sale*$1250 🛒
"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52794
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve

Re: Last Active in Profile Area

Post by stevemaury »

If you want to show Last active:

OPEN viewtopic.php

FIND:

Code: Select all

'joined'		=> $user->format_date($row['user_regdate']),
REPLACE WITH:

Code: Select all

'joined'		=> $user->format_date($row['user_lastpost_time']),
OPEN styles/prosilver/viewtopic_body.html

FIND:

Code: Select all

<dd class="profile-joined"><strong>{L_JOINED}{L_COLON}</strong> {postrow.POSTER_JOINED}</dd>
REPLACE WITH:

Code: Select all

<dd class="profile-joined"><strong>{L_LAST_ACTIVE}{L_COLON}</strong> {postrow.POSTER_JOINED}</dd>
Clear the cache.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
halil16
Registered User
Posts: 1446
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Re: Last Active in Profile Area

Post by halil16 »

The code you provided showed the last message date of the members. What I want to do is "L_LAST_ACTIVE".

Last active: 3 minutes ago
Last active: less than a minute ago
Buy me a coffee ☕
Hire me for your phpBB board. 🚩
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
O BeldeThatTowns*for sale*$1250 🛒
"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Last Active in Profile Area

Post by david63 »

What is your definition of "last active"? Last post, last login, last page view?
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52794
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve

Re: Last Active in Profile Area

Post by stevemaury »

phpBB defines "Last active" as either the session_time or the user_lastvisit in functions_display, about line 1601:

Code: Select all

$last_active = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit'];
If lastvisit does not work for you, post in Custom coding.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
halil16
Registered User
Posts: 1446
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Re: Last Active in Profile Area

Post by halil16 »

david63 wrote: Mon May 03, 2021 4:31 pm What is your definition of "last active"? Last post, last login, last page view?
I'm talking about the last appearance on the member profile page. For example, the last time you appeared on your profile page.
USER STATISTICS
Joined: 19 Dec 2002, 10:08
Last active: Today, 20:53
Total posts:19306 | Search user’s posts
(0.45% of all posts / 2.88 posts per day)
Buy me a coffee ☕
Hire me for your phpBB board. 🚩
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
O BeldeThatTowns*for sale*$1250 🛒
"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Last Active in Profile Area

Post by david63 »

halil16 wrote: Mon May 03, 2021 7:50 pm I'm talking about the last appearance on the member profile page.
That does not make sense - many (most?) users never visit their profile page and phpBB does not record when someone does so what you are asking is not possible without an extension.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
cday
Registered User
Posts: 6
Joined: Tue Feb 11, 2020 5:54 pm

Re: Last Active in Profile Area

Post by cday »

david63 wrote: Mon May 03, 2021 4:31 pm What is your definition of "last active"? Last post, last login, last page view?
This is my question too: 'Last login' seems plausible, 'Last page view' to be known would require login, 'Last post' seems less likely... :?:

When I approve a new registration, very often the new member is never shown as having been 'active'.

Could also, of course, be due to their having not provided a valid email address, and so being unable to complete registration... ;)
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72612
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK

Re: Last Active in Profile Area

Post by KevC »

This seems to be a question unrelated to the original post from 2 years ago.

If someone is not shown as ever being active, they have never logged in. If you as admin approve the account, they decided not to come back (not unusual actually) or they never saw the email saying the account was activated (went to the junk folder). If they activate themselves, then they didn't get the email or didn't act on it.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
cday
Registered User
Posts: 6
Joined: Tue Feb 11, 2020 5:54 pm

Re: Last Active in Profile Area

Post by cday »

KevC wrote: Sun Dec 17, 2023 4:15 pm If someone is not shown as ever being active, they have never logged in.
Thank you for clarifying that! :D
User avatar
halil16
Registered User
Posts: 1446
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Re: Last Active in Profile Area

Post by halil16 »

cday wrote: Sun Dec 17, 2023 3:08 pm When I approve a new registration, very often the new member is never shown as having been 'active'.
Could also, of course, be due to their having not provided a valid email address, and so being unable to complete registration... ;)
Yes, because he hasn't logged in yet.
cday wrote: Sun Dec 17, 2023 3:08 pm Could also, of course, be due to their having not provided a valid email address, and so being unable to complete registration...
The most popular setting is the one that requires email verification by the user. But I remember someone here requesting both email and admin activecation.
KevC wrote: Sun Dec 17, 2023 4:15 pm This seems to be a question unrelated to the original post from 2 years ago.
I'm still miserable :), but a lot has changed in 2 years.
Buy me a coffee ☕
Hire me for your phpBB board. 🚩
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
O BeldeThatTowns*for sale*$1250 🛒
"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
cday
Registered User
Posts: 6
Joined: Tue Feb 11, 2020 5:54 pm

Re: Last Active in Profile Area

Post by cday »

On a board where new registrations have to be approved, and email activation of an account is also required, would activation be recorded in the profile 'Last active'?

Or, only forum logins after account setup is complete?

Return to “[3.3.x] Support Forum”