Page 26 of 49

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Sun 11 Apr 2021 8:38 pm
by BCJKiwi
@sutne

Most of the <?php echo $RT_rrate; ?> style entries have been removed from the pages which have realtime data updates as the php is not required - the data is supplied via ajax.
You can add them back if you want but why would you?

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Sun 11 Apr 2021 8:42 pm
by sutne
BCJKiwi wrote: Sun 11 Apr 2021 8:38 pm @sutne
You can add them back if you want but why would you?
Because the rate is missing.
From your site as well:
1F7049F2-6019-4E91-B769-0D8431F5E9D1.png

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Sun 11 Apr 2021 9:20 pm
by BCJKiwi
Hmm..
That turns out to be because the ajax id is incorrect !

Code: Select all

	<td style="text-align:left"><span class="ajax" id="ajaxrratehrNoU"></span>
Should be

Code: Select all

	<td style="text-align:left"><span class="ajax" id="ajaxrainratehrNoU"></span>
Goodness knows how long that error has been there!

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 9:21 am
by Fredsc13
mimo57 wrote: Sun 11 Apr 2021 5:11 pm I think I still have a problem, I have disabled all languages except "en" and "fr", but they are still all available.
I applied the same settings in ajaxCUmx.js and ajaxCUmx.min.js (at the root)
and it works on my side.

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 11:24 am
by uktricky
Tried this on mine and still getting missing data in the NAV_BAR:
Screenshot 2021-04-12 at 12.22.37.png
footer.php includes: <script src="./ajaxCUmx.js"></script>
Only using EN as enabled language - if I enable another language I.e. Spanish (ES) and allow the selection nothing changes other than the dropdown appearing
Forecasts don't show either when enabled = 1 which again I assume is down to language not working
Running on my own server
Apache and PHP7.3
BCJKiwi wrote: Sun 11 Apr 2021 4:28 am Ver 2.2.1b patch for comma decimal and extra sensors (WH45)
Also available in First Post this thread.

Apologies to those inconvenienced by the incomplete files provided in 2.2.1a

Thanks to betejuice for his help in resolving the issues with the 2.2.1a release.

If you have difficulty with data not displaying as it should, or issues with the nav menu header, you may wish to try the /src/ajaxCUmx.js file instead of the ajaxCUmx.min.js file.
Have found the non-minimised version more reliable on public servers.
It is fine on the local development server I use but not so reliable on the public server.

1. copy ajaxCUmx.js from ./src/to main folder.
2. edit footer.php and change path in
<script src="./ajaxCUmx.min.js"></script>
to
<script src="./ajaxCUmx.js"></script>

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 12:33 pm
by beteljuice
Are you using the new patch realtime-xT template ?

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 2:15 pm
by uktricky
beteljuice wrote: Mon 12 Apr 2021 12:33 pm Are you using the new patch realtime-xT template ?
Thank you that has fixed it although I cannot turn off the language selection now!!!

LANGUAGE - Settings for language components
allow_Languages = false; // NO var !! true / false - true for multiple languages, false for THE language in NEXT LINE set_language
set_Language = "en"; // NO var !! short ISO code - DEFAULT lang of site - regardless of allow_Languages

Using the non-MIN version of the ajax file fixed turning off languages ...
Screenshot 2021-04-12 at 15.35.57.png
Assume this decimal point thing was supposed to be fixed?

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 5:38 pm
by beteljuice
Using the non-MIN version of the ajax file fixed turning off languages ...
That would be because ..
footer.php includes: <script src="./ajaxCUmx.js"></script>
;)

Comma vs point for thous delimiter ... Hmm

What does the value look like in your realtime-x.txt ?

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 6:00 pm
by uktricky
beteljuice wrote: Mon 12 Apr 2021 5:38 pm
Using the non-MIN version of the ajax file fixed turning off languages ...
That would be because ..
footer.php includes: <script src="./ajaxCUmx.js"></script>
;)

Comma vs point for thous delimiter ... Hmm

What does the value look like in your realtime-x.txt ?
12/04/21~18:59:12~6.8~37~-6.9~3.8~6.7~281~0.00~0.01~1000.6~W~2~mph~C~mb~in~38.3~0.2~0.14~0.14~0.04~22.2~37~5.8~0.0~9.6~17:00~-2.0~05:38~4.9~13:39~11.4~12:01~1000.9~18:27~995.3~00:03~3.10.5~3122~10.3~6.8~6.8~0.0~0.000~40~302~0.00~6~1~0~WNW~5605~ft~2.8~6.9~44~1~92~30~04:20~16:55~-1.1~-8.6~09:10~17:11~6.4~-4.7~17:00~05:50~-2.0~05:38~788~11:50~7.0~11:09~0.05~0.01~0.00~1456~Fairly fine, improving~06:14~20:03~06:47~20:29~1~0~0~Waxing Crescent~Steady~Rising~Light breeze~10.2~9.6~17:00~5.8~10.2~9.6~17:00~-2.0~-2.0~05:38~5.5~-1.5~12:57~06:24~2.6~-4.3~15:00~06:42~0.2~-5.6~18:36~12:40~99~48~00:00~12:40~995.6~988.6~23:28~02:22~6.1~-1.5~14:58~06:24~6.1~14:58~-1.5~06:24~NW~NNW~310~329~6.1~13:54~13.6~12:03~44.1~860~12:01~7.8~8.0~11:11~miles~&#176;C~0.01~0.02~0.07~09:30~15:57~11.6~7.6~09:31~18:44~9.6~17:00~6.1~14:58~05:37~20:41~15:03~13:49~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~0~0~0.0~0.0~0.0~0.0~0.0~0.0

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 6:29 pm
by mimo57
beteljuice wrote: Sun 11 Apr 2021 7:26 pm Your (/1MX/) site seems to be running ajax 2-1-3 ?
... and those edits are not in that file.
Hello,

my site, test site, which poses a problem with the translation is at the address: https://www.meteo-orny.fr/1MXnew/
beteljuice wrote: Sun 11 Apr 2021 7:26 pm ... also ... why do you have 2000 lines of charts code ?
I don't understand what you mean, nor where you see it.

Edit:
I just upgraded with the uncompressed version of ajaxCUmx.min.js, available in the "src" folder, and it works fine. No doubt a reduction problem.
PS: what's the point of compressing them?

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 8:10 pm
by beteljuice
For Brian - re uktricky problem ..

realtime[44] = 0.000

Three dec places is making the thous separator check come out as 'period' found.

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 9:37 pm
by BCJKiwi
Well ajax limits the output to 2 dec places.

If the source is more than that then realtime-xT.txt (and CUTagsT.php and reatlimetagsT.php) will need to have a dp modifier in the tag
eg <#ET dp=2>
Unless there is some other magic you can apply to ajax? ;) ;)

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 10:23 pm
by beteljuice
... but why haven't we seen this before ?

Is this the only tag that gives 3 dec and / or is it only 3 dec because it's zero ?
... because the other problem is it gets modified to 0000

Can you even use a dp modifier on values that maybe comma dec ?

There are fiddles we can do if that is the only occurrence, but in the tangle of possible formats it could go back to being a nightmare :shock:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 11:31 pm
by HansR
Ok. I look at the testsite given above and would like to make the remark it works perfectly meaning 1) it changes language correct and 2) I see the pressure without the thousends separator (point).

For me that would mean it is not a coding issue but a local(e) issue (the realtime file seems OK too). As javascript works in two lines of executions modes (the user line and the ajax line to simplify things) that would be where I would be looking. The assignment of the realtime value somewhere in another locale?

Sorry for the interruption as I really have no idea about this template. I apologize. 8-)

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Posted: Mon 12 Apr 2021 11:34 pm
by BCJKiwi
... but why haven't we seen this before
No idea ET has been in ajax since the beginning of the MXUI template and set to 2 decimal places.
Is this the only tag that gives 3 dec and / or is it only 3 dec because it's zero ?
... because the other problem is it gets modified to 0000
No idea - require input from UK users. - should be able to see it in a processed realtimetags.php.
Wind dir variants can be 3 digits (numeric or text) but no decimals.
Can't see any numeric vars that have 3 dec places by default.
Perhaps the site where you see it has modified their ET to show three decimals?
Can you even use a dp modifier on values that maybe comma dec ?
No idea, dp=1 (or 2) works fine on ET with dot dec, don't see why it shouldn't on comma dec but will need someone using comma dec to test.