LocalTimes-Talk
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.
The current download has the version date of "20150906" and had no changes reflecting the current recipe version date?
The latest version only changes the JavaScript file, the PHP file was not changed. Version updated in localtimes.php. --Petko May 29, 2016, at 05:25 PM
Thanks very much, that makes Recipe Check work
SteP 2015-08-30 Don't know why, but for me
$list
is invariably an empty array after preg_grep('/^(csum|author):(\\d+)$/', array_keys($page));so the output page is blank. What could be wrong?
Have the pages been modified more than once in the last 48 hours? Do you have "read/diff" permissions for these pages? Does the $page array contains elements with keys starting with "csum:" and "author:"? --Petko August 30, 2015, at 11:09 AM
Yes, yes (admin) and no, print_r(array_keys($page)) only shows 'csum' and 'author' keys. But $page['text'] does include stuff likeauthor:1440753988=SteP csum:1440753988=sample.jpg
On double-checking, sorry, No, this page wasn't changed more than once in the last 48 hours, just once. I tried a different page and I'm now getting a list of unformatted links with 'by <authorname>' appended to each item.
However, when I read Site.AllRecentChanges I do not see '+' links. I edited my Main.WikiSandbox page four times in the last ten minutes. And I can't see times listed as local times in AllRecentChanges or for Main.WikiSandbox?action=diff. (I do see localtimes.js being loaded in the HTML page source). Java console:
localtimes.js:37 Uncaught TypeError: Cannot read property 'innerHTML' of undefined ProcessLinks @ localtimes.js:37 (anonymous function) @ localtimes.js:101 (anonymous function) @ localtimes.js:103
Does it work on pmwiki.org? Does it work on your wiki with the default skin? The skin needs to have a <div id="wikitext"> element, and the H1 heading of the page should have a class "pagetitle", see pmwiki.tmpl. --Petko August 30, 2015, at 12:26 PM
Released a version which should ignore missing elements from the skin without generating errors. --Petko August 30, 2015, at 12:48 PM
Thank you, now it works perfectly with my wiki skin. --SteP 2015-08-31.
Hi, I can't find the new localtimes.js file version-2015 with the usual link. – Frank July 09, 2015, at 04:25 PM
It is here, the same file your browser downloads to enable the feature. --Petko July 09, 2015, at 10:27 AM
Thank you – Frank July 09, 2015, at 05:43 PM
How can the current local time for a particular country or location be displayed?[1]
{(ftime fmt="%A %F" when=now)} {(ftime fmt="%H:%M" when=now)} |
Friday 2024-12-06 11:58 |
e.g. a NZ website to display current NZ time
The recipe instructs the browser to display the local times for the visitor (of his operating system). To force all dates on the server, disable this recipe and set in config.php something like date_default_timezone_set('Pacific/Auckland');
see [2] (if a server is correctly configured and physically in your time zone, you should not need to do this). --Petko September 04, 2013, at 06:53 AM
Talk page for the LocalTimes recipe (users).