Wiccle.com in Facebook Wiccle.com in Twitter Wiccle.com in LinkedIn Wiccle.com in Youtube RSS from Wiccle.com Wiccle.com in Atom
 
 
 

Thread: International sites.

Started: February 24, 2010, 07:40 AM  ⋅  Zone: Public Forums  ⋅  Category: Product Features  ⋅  Posts: 4  ⋅  Views 552
Started by: john  ⋅  Description: Would be nice to accommodate International Sites.
Post #1
Member: john  ⋅  Date: February 24, 2010, 07:40 AM  ⋅ Subject: "International sites."

Re-raising a very old post -

"Yesterday" and "Today" in posts don't make a lot of sense in international sites - many users live outside of the timezone of the server -

I live in Australia - here's what I'm looking at in Fusion at the moment -

I know that Markus works long hours - but crossing the International Dateline... ummm!

Still trying to remember how I resolved this in 1.20.

Post #2
Member: Markus  ⋅  Date: February 24, 2010, 12:58 PM  ⋅ Subject: "Re: International sites."

What's going on is called "relative date" in the systems, and it's happening in class_global.php under make_date() across all versions of our software. Find this line:

    if ($limit > 0 && $difference < ($limit * 86400))
    { // Make relative date

If you want to short-circuit this, you can just add $limit = 0; above this line. (As I have done at Wiccle.com while typing this, and expect to see this post have an absolute time as I hit Publish.) I will bring this under the Admin CP time controls in the next minor update, and have added this as a feature request.

If you want to for some reason control this on a case by case basis, you can look for calls to make_date() in the preprocessors under class_modules.php. You will find entries like this:

    $data['post_date_relative'] = Utility::make_date($core['module']['format_post_date'], $data['post_date'], 30);

The last variable there (30) is the value going into $limit in the function. Change that to zero wherever you want to stop using relative times. The parsing done under post_preprocessor() function applies for all post-level data, and so forth. If you want more control over date display, you can look up $core['module']['format_post_date'] in /core/config_mapper.php --- currently set to "date_long" which corresponds to the long date format you can edit in the Admin CP > System > Date & Time. (And this is used for threads and other content as well by default.)

(You can also start creating your own data preprocessor extensions if you're interested -- just let me know, it's easy enough.)

The $limit variable and the value there will also be used for deciding whether to use a long or a short timestamp after $limit number of days (like 30), but this appears to be currently commented out for some reason. I'll resurrect these controls in the next update too, they are already there, and I guess (from the comments in that file) I was too much in a rush and just snipped them out when I was trying to fix some other date-related quirk.

It looks like the "Time cutoff" field in the Admin CP time options (available under $core['init']['no_time_after_days']) is actually meant to replace this hard-coded value in the preprocessors, but just hasn't been put into use yet. (There are the few odd idle switches still in the Admin CP.)

Post #3
Member: john  ⋅  Date: February 24, 2010, 05:38 PM  ⋅ Subject: "Re: International sites."

Thanks Markus,

(You can also start creating your own data preprocessor extensions if you're interested -- just let me know, it's easy enough.)

I think you must have me confused with someone clever! Laughing

Post #4
Member: Markus  ⋅  Date: February 25, 2010, 05:51 AM  ⋅ Subject: "Re: International sites."

I insist that it is not beyond your cleverness. You just need to get over the terminology shock. Please review this new tutorial.

I don't code anything that would be hard to understand, unless I do it intentionally to obfuscate something or in cooperation with leprechauns to advance our secret plans for world dominion.

I hate code that is so cryptic you need to be a rocket scientist to unravel it. Most of the code in iWiccle is embarrassingly simple in comparison to many super-refined CMS platforms out there. Guess why they are so hard to customize, and why releasing bug fixes takes them a small eternity.

 

Product Features

Add to Favorites
Public Forums
Category  ⋅  Write-ups and screenshots illustrating current and upcoming iWiccle and Wiccle features.
 

Public Forums

Add to Favorites
Public Forums
Zone  ⋅ Public forum sections for support and discussions. Available for everyone.
 

Zone Categories

 
Questions? Ask us!
Back to Top