Warning: A non-numeric value encountered in...
Re: Warning: A non-numeric value encountered in...
I'll wait. But anyway, there is still the issue with 2lang. There is shown nothing even on localhost.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Warning: A non-numeric value encountered in...
Addedinto the template: no change so far.
Code: Select all
<?php if (function_exists('opcache_invalidate')) opcache_invalidate(__FILE__)?>
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Warning: A non-numeric value encountered in...
Hm, the "daily" pages need to have English names as well, since date('l', …) returns always English day names.Tata wrote:I'll wait. But anyway, there is still the issue with 2lang. There is shown nothing even on localhost.
That would only cause template.htm to be invalidated. You can try:Tata wrote:Addedinto the template: no change so far.Code: Select all
<?php if (function_exists('opcache_invalidate')) opcache_invalidate(__FILE__)?>
Code: Select all
<?php if (function_exists('opcache_reset')) opcache_reset()?>
Christoph M. Becker – Plugins for CMSimple_XH
Re: Warning: A non-numeric value encountered in...
I was googling after some localisation but haven't found nothing. The EN day names make no big sense on another 2lang pages.cmb wrote:Hm, the "daily" pages need to have English names as well, since date('l', …) returns always English day names.
It seems, there would be some workaround - evaluating the number of the day with its equivalent in
Code: Select all
$day_name = explode(',', $plugin_tx['week_plan_xh']['day_names']);
$day_name = array_map('trim', $day_name);
Code: Select all
<div class='w_plan_next_day'>" .
newsbox(date('l', strtotime(' + 1 day'))) .
"</div>
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Warning: A non-numeric value encountered in...
Well, there is strftime(), but this relies on the locale setting, which is not really reliable on multi-threaded web servers. Furthermore, there is IntlDateFormatter, but the Intl extension is often unavailable.Tata wrote:I was googling after some localisation but haven't found nothing.
These won't be shown to visitors, though, so if the admin has basic English skills, sticking with English day names appears to be acceptable.Tata wrote:The EN day names make no big sense on another 2lang pages.
Well, you could call newsbox() like so:Tata wrote:It seems, there would be some workaround - evaluating the number of the day with its equivalent inSo it would actualise the call using language strings forCode: Select all
$day_name = explode(',', $plugin_tx['week_plan_xh']['day_names']); $day_name = array_map('trim', $day_name);
Code: Select all
<div class='w_plan_next_day'>" . newsbox(date('l', strtotime(' + 1 day'))) . "</div>
Code: Select all
newsbox($day_name[date('w', strtotime('+ 1 day'))])
Christoph M. Becker – Plugins for CMSimple_XH