News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Show join date age location last active in post and pm

Started by Rumpa, January 11, 2015, 03:07:34 PM

Previous topic - Next topic

Arantor

The mod will need substantial changes for RC1 because location is no longer a hard coded field but migrated to the custom field set up.

landyvlad

"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

pocttopus

Are there any successful experience using/emulating this mod for 2.1rc2?

Arantor

Quote from: Arantor on February 06, 2019, 06:57:28 AM
The mod will need substantial changes for RC1 because location is no longer a hard coded field but migrated to the custom field set up.

Ditto for RC2.

shadav

trying to install this onto a 2.0.17

but in sources/load.php I don't have
find
);
}
}

return true;
}


replace
);
}
}
if (!empty($profile['birthdate']) && $profile['birthdate'] !== '0001-01-01')
{
list ($birth_year, $birth_month, $birth_day) = sscanf($profile['birthdate'], '%d-%d-%d');
$datearray = getdate(forum_time());
$memberContext[$user] += array(
'age' => $birth_year <= 4 ? $txt['age'] : $datearray['year'] - $birth_year - (($datearray['mon'] > $birth_month || ($datearray['mon'] == $birth_month && $datearray['mday'] >= $birth_day)) ? 0 : 1)
);
}
return true;
}


the closest I could find was
];
}
}

return empty($loaded_ids) ? false : $loaded_ids;
}


so then if i add like this is it ok?
];
}
}
if (!empty($profile['birthdate']) && $profile['birthdate'] !== '0001-01-01')
{
list ($birth_year, $birth_month, $birth_day) = sscanf($profile['birthdate'], '%d-%d-%d');
$datearray = getdate(forum_time());
$memberContext[$user] += array(
'age' => $birth_year <= 4 ? $txt['age'] : $datearray['year'] - $birth_year - (($datearray['mon'] > $birth_month || ($datearray['mon'] == $birth_month && $datearray['mday'] >= $birth_day)) ? 0 : 1)
);
}
return empty($loaded_ids) ? false : $loaded_ids;
}


[edit] ok so that didn't work....nothing showed up in posts or pms....not sure where to add this then.....

pikeman


davo88

Quote from: pikeman on February 13, 2022, 07:34:48 AMHello, is a modification for 2.1 planned?
Wondering the same thing. My forum really needs this info displayed.

landyvlad

IF it is updated at any point it may take a while because

Quote from: Arantor on February 06, 2019, 06:57:28 AMThe mod will need substantial changes ... because location is no longer a hard coded field but migrated to the custom field set up.

Just for the benefit of those asking above :)
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Arantor

On the other hand, being a custom field, you can set it to display on the posts yourself... ;)

pikeman

Basically I only need the registration date and I don't know how to add it in the custom fields.

Arantor

Location is a custom field now, the others not so much.

landyvlad

The most useful is the ability to display 'last active' to know if there's any point PMing someone etc.

Given there's no apparent likelihood of this mod being updated, is there a way to display that information? (in post and PM)? 

Are any of these fields (aside from location as already mentioned by Arantor)  shown natively in 2.1?
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

GL700Wing

Quote from: landyvlad on July 19, 2022, 06:13:35 AMThe most useful is the ability to display 'last active' to know if there's any point PMing someone etc.

Given there's no apparent likelihood of this mod being updated, is there a way to display that information? (in post and PM)? 

Are any of these fields (aside from location as already mentioned by Arantor)  shown natively in 2.1?
I've added the 'Join Date' and 'Last Active' info to the post/PM display screen on one of my SMF 2.01.9 forums - I'll work out the code for SMF 2.1 and post it as a Tip/Trick ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Arantor

Do note that last active is deliberately hidden on the profile page if the user has their online status set to hidden - because if they don't want to present as online, showing their last active as such undermines that.

GL700Wing

Quote from: Arantor on July 19, 2022, 09:43:09 AMDo note that last active is deliberately hidden on the profile page if the user has their online status set to hidden - because if they don't want to present as online, showing their last active as such undermines that.
Noted - will check/respect that setting when I develop the Tip/Trick.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Rumpa

For SMF 2.0.19 and 2.1.3 you can Enable/Disable these buttons in Admin--->Configaration--->Modification Settings(if not redirect)

Version

V2.0 is big update it's support SMF 2.0.19
And it's support SMF 2.1.3
in SMF 2.1.x Location added by deafult so not needed any modification


davo88

2.1.4
I would like to split the 'Last active' line into two so it appears on two lines like this.

Last Active:
14 Jan 2024 at 10:52

Anyone know where and how to do this edit?

GL700Wing

Quote from: davo88 on March 14, 2024, 04:27:17 PMI would like to split the 'Last active' line into two so it appears on two lines like this.

Last Active:
14 Jan 2024 at 10:52

Anyone know where and how to do this edit?
@davo88 If you're using the code in the Tip for SMF 2.1: Show 'Date Joined' and 'Last Active' in posts and PMs I posted you could make the following change in ./Themes/default/languages/Modifications.english.php

Find:
$txt['lastActive'] = 'Last Active: ';
Replace with:
$txt['lastActive'] = 'Last Active:<br>';
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

davo88

Thanks GL700Wing. My question was actually about Rumpa's mod. But I tried the code edits in Tip for SMF 2.0/2.1: Show 'Date Joined' and 'Last Active' in posts and PMs and that produces a neat display, so I think I'll go with that option.

I have a question about adding to the date but will ask it in the 'Tip' topic in case others are interested.

Advertisement: