[ABD] TimeAgo timestamps

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Locked
User avatar
MuhClaren
Registered User
Posts: 126
Joined: Sat Feb 21, 2015 5:23 am

Re: [DEV] TimeAgo timestamps

Post by MuhClaren »

Raul [ThE KuKa] wrote:"PR" Spanish translation ready. ;)
Great, thanks for that effort! I'm not seeing any pull request against the master in github, would you mind creating a pull request for your commit? Thanks again!

I'm planning to re-design the output HTML for the TimeAgo string, making the HTML string element layout adjustable via the control panel. This will solve in particular the problem where "Ago" should be prepended not appended to the values when ES (or any other lang) is used.

I'm working to finish another project this week, but I plan to work on TimeAgo this coming weekend. Version 1.3.0 should be ready before next Monday.

Cheers.
User avatar
Raul [ThE KuKa]
Style Customisations
Style Customisations
Posts: 11073
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: [DEV] TimeAgo timestamps

Post by Raul [ThE KuKa] »

MuhClaren wrote:Great, thanks for that effort! I'm not seeing any pull request against the master in github, would you mind creating a pull request for your commit? Thanks again!
I think it is well the "PR"...
My Pulls:
https://github.com/MuhClaren/timeago/pulls
All unsolicited PMs will be ignored.
:warning: Knowledge Base | Documentation | Board rules | phpBB Styles Rules & Policies | Styles Queue Stats :warning:


If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate.
:flag_es: phpBB Spain - Online Since 2003 :heart:


User avatar
MuhClaren
Registered User
Posts: 126
Joined: Sat Feb 21, 2015 5:23 am

Re: [DEV] TimeAgo timestamps

Post by MuhClaren »

Raul [ThE KuKa] wrote:
MuhClaren wrote:Great, thanks for that effort! I'm not seeing any pull request against the master in github, would you mind creating a pull request for your commit? Thanks again!
I think it is well the "PR"...
My Pulls:
https://github.com/MuhClaren/timeago/pulls
Yes, indeed. I've updated the master. Thanks again for your effort.
elawrenc
Registered User
Posts: 140
Joined: Thu Jul 21, 2011 2:41 pm

Re: [DEV] TimeAgo timestamps

Post by elawrenc »

I would like to make a suggestion. Either as a default or as an option in ACP.

After 7 days, perhaps the time should just default to the date, (Apr. 30). This is how it's done in IP Board or one of the other vendors and while I understand PHPBB is not IP Board, it looks like a cleaner and more elegant way to display a time from a week ago and beyond.

From a UI standpoint, I don't think users care about the precise age of a topic once it's past a week old.

One of my complaints with PHPBB is it can tend to look a little cluttered so any way that we can take away some elements without losing the fundamental information is an improvement. At least, that's my opinion :)

Anyway, just a suggestion. I think this ext is already a vast improvement and probably should be implemented into the core.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [DEV] TimeAgo timestamps

Post by 3Di »

MuhClaren wrote:
Raul [ThE KuKa] wrote:"PR" Spanish translation ready. ;)
I'm planning to re-design the output HTML for the TimeAgo string, making the HTML string element layout adjustable via the control panel. This will solve in particular the problem where "Ago" should be prepended not appended to the values when ES (or any other lang) is used.
Me wondering how all of this it is handled by phpBB itself.. :?:

As a matter of fact it uses a kind of "ago timestamp" in the core, if not in 3.1.5 sure is into 3.2.dev.
How is it handled the Spanish Language, for example?

I didn't investigate yet.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
MuhClaren
Registered User
Posts: 126
Joined: Sat Feb 21, 2015 5:23 am

Re: [DEV] TimeAgo timestamps

Post by MuhClaren »

elawrenc wrote:I would like to make a suggestion. Either as a default or as an option in ACP.

After 7 days, perhaps the time should just default to the date, (Apr. 30). This is how it's done in IP Board or one of the other vendors and while I understand PHPBB is not IP Board, it looks like a cleaner and more elegant way to display a time from a week ago and beyond.

From a UI standpoint, I don't think users care about the precise age of a topic once it's past a week old.

One of my complaints with PHPBB is it can tend to look a little cluttered so any way that we can take away some elements without losing the fundamental information is an improvement. At least, that's my opinion :)

Anyway, just a suggestion. I think this ext is already a vast improvement and probably should be implemented into the core.
That's good feedback, making some valid points. I'll consider adding an option to revert to the native date output after a user-defined number of days. It shouldn't be too CPU expensive, either. I'll be adding travis build tests eventually, and offer the extension to be assimilated into the core should the dev team so choose.
3Di wrote: Me wondering how all of this it is handled by phpBB itself.. :?:

As a matter of fact it uses a kind of "ago timestamp" in the core, if not in 3.1.5 sure is into 3.2.dev.
How is it handled the Spanish Language, for example?

I didn't investigate yet.
Interesting. I was unaware of any such programming. Could you maybe cite this with a link? I'd like to look.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [DEV] TimeAgo timestamps

Post by 3Di »

just to start with.. language/en/common.php

Code: Select all

    'datetime'            => array(
        'TODAY'        => 'Today',
        'TOMORROW'    => 'Tomorrow',
        'YESTERDAY'    => 'Yesterday',
        'AGO'        => array(
            0        => 'less than a minute ago',
            1        => '%d minute ago',
            2        => '%d minutes ago',
        ),
I will deeply investigate later on tonight, caming back home.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [DEV] TimeAgo timestamps

Post by 3Di »

Instead the Spanish version, we are talking about 3.1.15 packages, says

Code: Select all

    'datetime'    => array(
        'TODAY'    => 'Hoy',
        'TOMORROW'    => 'Mañana',
        'YESTERDAY'    => 'Ayer',
        'AGO'        => array(
            0        => 'hace menos de un minuto',
            1        => 'hace %d minuto',
            2        => 'hace %d minutos',
        ), 
so basically it is upon the Translators the correct behaviour IMHO.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Goztow
Registered User
Posts: 376
Joined: Fri Aug 17, 2007 10:31 am
Location: Belgium
Contact:

Re: [DEV] TimeAgo timestamps

Post by Goztow »

elawrenc wrote:I would like to make a suggestion. Either as a default or as an option in ACP.

After 7 days, perhaps the time should just default to the date, (Apr. 30). This is how it's done in IP Board or one of the other vendors and while I understand PHPBB is not IP Board, it looks like a cleaner and more elegant way to display a time from a week ago and beyond.

From a UI standpoint, I don't think users care about the precise age of a topic once it's past a week old.

One of my complaints with PHPBB is it can tend to look a little cluttered so any way that we can take away some elements without losing the fundamental information is an improvement. At least, that's my opinion :)

Anyway, just a suggestion. I think this ext is already a vast improvement and probably should be implemented into the core.
I 2nd this. Great job, BTW!
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [DEV] TimeAgo timestamps

Post by 3Di »

Error and buggy thing related is:
In your timeago_functions.php the word " ago" it is appended and hardcoded while using this tertiary operator, that's a no no.

Code: Select all

                'POST_DATE'      => (!empty($this->config['ta_viewtopic'])) ? $this->time_ago($row['post_time'], $detail).' ago'.$extend : $this->user->format_date($row['post_time']),
Sleepy time has come.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
elawrenc
Registered User
Posts: 140
Joined: Thu Jul 21, 2011 2:41 pm

Re: [DEV] TimeAgo timestamps

Post by elawrenc »

MuhClaren wrote:
elawrenc wrote:I would like to make a suggestion. Either as a default or as an option in ACP.

After 7 days, perhaps the time should just default to the date, (Apr. 30). This is how it's done in IP Board or one of the other vendors and while I understand PHPBB is not IP Board, it looks like a cleaner and more elegant way to display a time from a week ago and beyond.

From a UI standpoint, I don't think users care about the precise age of a topic once it's past a week old.

One of my complaints with PHPBB is it can tend to look a little cluttered so any way that we can take away some elements without losing the fundamental information is an improvement. At least, that's my opinion :)

Anyway, just a suggestion. I think this ext is already a vast improvement and probably should be implemented into the core.
That's good feedback, making some valid points. I'll consider adding an option to revert to the native date output after a user-defined number of days. It shouldn't be too CPU expensive, either. I'll be adding travis build tests eventually, and offer the extension to be assimilated into the core should the dev team so choose.
3Di wrote: Me wondering how all of this it is handled by phpBB itself.. :?:

As a matter of fact it uses a kind of "ago timestamp" in the core, if not in 3.1.5 sure is into 3.2.dev.
How is it handled the Spanish Language, for example?

I didn't investigate yet.
Interesting. I was unaware of any such programming. Could you maybe cite this with a link? I'd like to look.
Actually I was thinking the date w/o the timestamp. So, just Apr. 30 2015 without the time component. But either way works.
User avatar
MuhClaren
Registered User
Posts: 126
Joined: Sat Feb 21, 2015 5:23 am

Re: [DEV] TimeAgo timestamps

Post by MuhClaren »

3Di wrote:Error and buggy thing related is:
In your timeago_functions.php the word " ago" it is appended and hardcoded while using this tertiary operator, that's a no no.

Code: Select all

                'POST_DATE'      => (!empty($this->config['ta_viewtopic'])) ? $this->time_ago($row['post_time'], $detail).' ago'.$extend : $this->user->format_date($row['post_time']),
 
Sleepy time has come.
You're looking at old code. That has since been replaced with a language variable and moved to the lang files.
..777..
Registered User
Posts: 150
Joined: Tue Oct 28, 2014 5:43 pm

Re: [DEV] TimeAgo timestamps

Post by ..777.. »

elawrenc wrote:I would like to make a suggestion. Either as a default or as an option in ACP.

After 7 days, perhaps the time should just default to the date, (Apr. 30). This is how it's done in IP Board or one of the other vendors and while I understand PHPBB is not IP Board, it looks like a cleaner and more elegant way to display a time from a week ago and beyond.

From a UI standpoint, I don't think users care about the precise age of a topic once it's past a week old.

One of my complaints with PHPBB is it can tend to look a little cluttered so any way that we can take away some elements without losing the fundamental information is an improvement. At least, that's my opinion :)

Anyway, just a suggestion. I think this ext is already a vast improvement and probably should be implemented into the core.
I think this is a fantastic idea.
User avatar
MuhClaren
Registered User
Posts: 126
Joined: Sat Feb 21, 2015 5:23 am

Re: [DEV] TimeAgo timestamps

Post by MuhClaren »

elawrenc wrote: Actually I was thinking the date w/o the timestamp. So, just Apr. 30 2015 without the time component. But either way works.
I will add new functionality to the control panel which lets the admin define a time value when timeago should fall back to the regular native date output. As for wanting the date only (sans time), this is something that can be defined already in the ACP: General --> Board Settings --> Date Format --> custom (g:i a) are the time arguments which can be removed from the custom string. It's important to note that if one wishes to use custom format, the user default must be changed, too, since the users have the ability to set their own format from their UCP, and the default is not set to custom.
User avatar
MuhClaren
Registered User
Posts: 126
Joined: Sat Feb 21, 2015 5:23 am

Re: [DEV] TimeAgo timestamps

Post by MuhClaren »

Translation contributors, please accept pull requests and make small updates to your translations. As soon as you're done, commit / push, and hit me back with a PR. Once translations are updated I will branch v1.3.0 and release it. Svennd, please fork the project from the master repository, make your edits, commit / push, and do a pull request to me.

Pull requests can be done at: https://github.com/MuhClaren/timeago/compare click link that says compare across forks, set your fork as base compare to head fork: master / muhclaren. Here's an example: https://github.com/alhitary/timeago/com ... ren:master

Users: This is not a release announcement. As soon as the translations are updated, I will update the original post with the Change log and updated download link. Thank you.
Last edited by MuhClaren on Mon Aug 24, 2015 8:03 pm, edited 1 time in total.
Locked

Return to “Abandoned Extensions”