[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 » Wed Aug 19, 2015 2:55 pm

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]
Jr. Extension Validator
Posts: 4408
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: [DEV] TimeAgo timestamps

Post by Raul [ThE KuKa] » Wed Aug 19, 2015 6:25 pm

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
If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate with Image
phpBB International Support Team (Spanish - Español) :flag_es: Online Since 2003 - 15th anniversary
🎨phpBB Professional Premium Themes🔥
Author Translations (Spanish - Spain) :two_hearts:

:warning: I don't support those without the copyright Spanish translation. :warning:

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

Re: [DEV] TimeAgo timestamps

Post by MuhClaren » Wed Aug 19, 2015 10:00 pm

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: 118
Joined: Thu Jul 21, 2011 2:41 pm

Re: [DEV] TimeAgo timestamps

Post by elawrenc » Thu Aug 20, 2015 12:11 am

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
Registered User
Posts: 12893
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [DEV] TimeAgo timestamps

Post by 3Di » Thu Aug 20, 2015 7:08 am

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.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

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

Re: [DEV] TimeAgo timestamps

Post by MuhClaren » Thu Aug 20, 2015 2:13 pm

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
Registered User
Posts: 12893
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [DEV] TimeAgo timestamps

Post by 3Di » Thu Aug 20, 2015 2:43 pm

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.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
3Di
Registered User
Posts: 12893
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [DEV] TimeAgo timestamps

Post by 3Di » Thu Aug 20, 2015 9:10 pm

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.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

Goztow
Registered User
Posts: 364
Joined: Fri Aug 17, 2007 10:31 am
Location: Belgium
Contact:

Re: [DEV] TimeAgo timestamps

Post by Goztow » Thu Aug 20, 2015 9:50 pm

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
Registered User
Posts: 12893
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [DEV] TimeAgo timestamps

Post by 3Di » Fri Aug 21, 2015 12:23 am

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.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

elawrenc
Registered User
Posts: 118
Joined: Thu Jul 21, 2011 2:41 pm

Re: [DEV] TimeAgo timestamps

Post by elawrenc » Fri Aug 21, 2015 12:46 am

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 » Sat Aug 22, 2015 9:00 pm

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.. » Sat Aug 22, 2015 9:15 pm

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 » Sat Aug 22, 2015 10:05 pm

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 » Mon Aug 24, 2015 12:31 pm

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”

Who is online

Users browsing this forum: No registered users and 3 guests