Firefox PHP

Readable Dates module

Posted by Maurice Makaay 
Re: Readable Dates module
March 01, 2006 08:41AM
Still interested in this: "So I asume that your dates are in english too when disabling the readable dates module. Please try if this assertion is right." I'm quite convinced that the problem is not a problem of this module, but I cannot test that for you.

I think that you probably see this behaviour because your long_date definition in the language file describes that the month-name should be used and your short_date definition does not do that. Different date formatting is used on different pages in Phorum.

A quick fix could be to assign the same string to long_date as the one that is already assigned to short_date. Since the short_date does not contain full month names (only numbers), locales are no issue then. It's of course nicer to have your system fixed to support the locale.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Readable Dates module
March 25, 2006 02:27PM
Hi Maurice,

I just installed your module with version 5.1.10 and I found that it is disturbing other modules like for example Users Online because you are not restoring the date formats. Following modules are formating there dates with your temporary format mask.

I think you have to add

    // Restore the date formatting
    $GLOBALS["PHORUM"]["long_date"] = $GLOBALS["PHORUM"]["long_date_backup"];
    $GLOBALS["PHORUM"]["short_date"] = $GLOBALS["PHORUM"]["short_date_backup"];

before

    return $data;

at functions phorum_mod_readable_dates_list and phorum_mod_readable_dates_read.

Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Readable Dates module
March 27, 2006 09:04AM
Hi Maurice,

I'm wondering why you are including defaults.php from the smiley-module?

In readable_dates.php I found:

require_once("./mods/smileys/defaults.php");

I think it should be:

require_once("./mods/readable_dates/defaults.php");

Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Readable Dates module
March 28, 2006 05:49AM
Quote
Oliver Riesen
I'm wondering why you are including defaults.php from the smiley-module?

I guess you're not using the latest version 1.0.5. From the changelog: "The script did not load the right defaults.php file".

Quote
Oliver Riesen
you are not restoring the date formats

I will add the restoring of the date formatting to the functions phorum_mod_readable_dates_list and phorum_mod_readable_dates_read, but I don't think that would fix all problems in this field. I really have to do a nasty trick in the module to be able to preserve the timestamps unfortunatly. Modules that use date formatting and that are run before these function in readable_dates still will used the messed up date formats. I'm open for suggestions to make this work really self-contained (without re-fetching the information from the database to get hold of the source timestamps).

I'll post a 1.0.6 containing the restore of the time formats in the first message of this thread.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Readable Dates module
March 28, 2006 06:27AM
Hi Maurice,

Quote
Oliver Riesen
I'm wondering why you are including defaults.php from the smiley-module?

Quote
mmakaay
I guess you're not using the latest version 1.0.5.

Sorry, I missed that version because I installed the module in february...

Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Readable Dates module
May 06, 2006 04:57PM
Missing a "t" on "Las" in file readable_dates.php line 135


? "Edited %count% time(s). Las edit was %lastedit% by %lastuser%."

change to

? "Edited %count% time(s). Last edit was %lastedit% by %lastuser%."


it's still a good useful module.

Thanks for writing and supporting it.

Bill
Re: Readable Dates module
May 08, 2006 03:57AM
The module has been updated for the typo. See the first message in this thread.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Readable Dates module
May 08, 2006 09:50AM
Maurice,

This works too!

Very nice!

Thanks

[opensourceCMS.com]
[ongetc.com]
Chanh Ong
Re: Readable Dates module
December 06, 2006 07:15AM
Hi

I would like to get this to work with the latest X posts module. I've looked through readable_dates.php but I can't work out how I tell it to do the same for my newest11.php page as well as the index, list and read page. My page is here.

thanks

Mark
Re: Readable Dates module
December 12, 2006 05:24PM
I'm using this, and love it, thanks!

However, I've got some ideas for enhancements:

The first is an option to display dates within the past week by their day of the week, with the exception of today and yesterday. Today is Tuesday; two days ago would display as "Sunday", three days ago would display as "Saturday". A week ago today, last Tuesday, would be displayed as "December 5", as it does now.

Another would be to allow configuration of the text to be used for dates relative to the current date. I.e. I might want mine to be "Today", "Yesterday", "Two days ago", "Three days ago", etc. The number of days back that are supported ought to be at least ten days, in my opinion. That number of days back could be a fixed number. Settings could be implemented simply as a series of text boxes to be set. If the text box for a specific date offset is empty, then the module's default behavior would be used.

It would also be nice to be able to display the most recent days in a special color or font.

Alan
Sorry, only registered users may post in this forum.

Click here to login