Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.4.6 (build 3070) - 23 March 2020
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

See the Wiki for downloading either version.

Don't try to change "todayyest.html"

Share your Cumulus MX user interface here

Moderator: mcrossley

Post Reply
sfws
Posts: 601
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Modified Fine Offset
Operating System: Win. 10 PC
Location: The Marches, UK

Don't try to change "todayyest.html"

Post by sfws » Mon 23 Mar 2020 10:19 am

This is just a warning, after I tried to change the solar table on the today and yesterday page in the MX interface. The contents of the tables in the todayyest.html file will be seen as you first load the file, but the ajax routines quickly replaces whole tables to change their content. So there is absolutely no point in editing the HTML, other than to change the order of complete tables. Do not bother to edit what on that web page source file is within any table (to add, relabel, or remove, items).

Have a look at the tempTable below, It mentions High Temperature, but it does not mention Low Temperature yet both are being updated while you view the page. It includes two fixed times(23:10 and 15:10) but you don't see those fixed times on the page in the interface. In other words, ignore the structure within the <table> and </table> tags, it is overwritten by the Javascript.

In the HTML file

Code: Select all

<table id="TempTable" style="width:100%">
                        <thead>
                            <tr>
                                <th>&nbsp;Temperature</th>
                                <th></th>
                                <th></th>
                                <th></th>
                                <th></th>
                            </tr>
                            <tr>
                                <th>&nbsp;</th>
                                <th colspan="2">Today</th>
                                <th colspan="2">Yesterday</th>
                            </tr>
                        </thead>
                        <tr>
                            <td>High Temperature</td>
                            <td><span id="OutdoorTemp">--</span>&nbsp;<span class="TempUnit">--</span></td>
                            <td>23:10</td>
                            <td><span id="OutdoorTemp">--</span>&nbsp;<span class="TempUnit">--</span></td>
                            <td>15:10</td>
                        </tr>
                        <tr>
                            <td>Dew Point</td>
                            <td><span id="OutdoorDewpoint">--</span></td>
                            <td><span class="TempUnit">--</span></td>
                        </tr>
                        <tr>
                            <td>Wind Chill</td>
                            <td><span id="WindChill">--</span></td>
                            <td><span class="TempUnit">--</span></td>
                        </tr>
                        <tr>
                            <td>Apparent Temperature</td>
                            <td><span id="AppTemp">--</span></td>
                            <td><span class="TempUnit">--</span></td>
                        </tr>
                        <tr>
                            <td>Heat Index</td>
                            <td><span id="HeatIndex">--</span></td>
                            <td><span class="TempUnit">--</span></td>
                        </tr>
                        <tr>
                            <td>Humidex</td>
                            <td><span id="Humidex">--</span></td>
                            <td><span class="TempUnit">--</span></td>
                        </tr>
                        <tr>
                            <td>Indoor Temperature</td>
                            <td><span id="IndoorTemp">--</span></td>
                            <td><span class="TempUnit">--</span></td>
                        </tr>
                    </table>
The corresponding\CumulusMX\interface\js\todayyest.js file

Code: Select all

var tempTable = $('#TempTable').DataTable({
        "paging": false,
        "searching": false,
        "info": false,
        "ordering": false,
        "ajax": '../api/todayyest/temp.json'
    });
I don't know where the api json mentioned is, but it would be there that you would edit (if for example you wanted to show UV or did not want to see high and Low Apparent Temp).

water01
Posts: 1705
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Don't try to change "todayyest.html"

Post by water01 » Mon 23 Mar 2020 10:36 am

I am sorry but I have to disagree. I have edited mine to remove the Solar parts and it worked fine.

Image

Not sure why your edits are not working but it maybe the same reason some of your Settings drop down items are not working?
David
Image

User avatar
mcrossley
Posts: 6172
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Don't try to change "todayyest.html"

Post by mcrossley » Mon 23 Mar 2020 11:15 am

The content of the tables is dynamically created from the downloaded data, so any changes you make to them will be lost - you need to fix the source data.

However, if you remove the table completely from the HTML it will not be created.

water01
Posts: 1705
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Don't try to change "todayyest.html"

Post by water01 » Mon 23 Mar 2020 11:29 am

The JSON files can also be looked at in the browser. If you hit F12 and make sure that Network is selected and refresh the screen you will see the json files loaded at the end of the list. In Firefox if you double click on the json line it opens a property window where it shows you the URL of json file created by the CumulusMX engine.
If you cut and paste that URL into separate tab/window this is what you get (temp as an example).
Image
David
Image

sfws
Posts: 601
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Modified Fine Offset
Operating System: Win. 10 PC
Location: The Marches, UK

Re: Don't try to change "todayyest.html"

Post by sfws » Mon 23 Mar 2020 12:33 pm

mcrossley wrote:
Mon 23 Mar 2020 11:15 am
The content of the tables is dynamically created
That is a neater way of describing it, although perhaps too technical for a few readers.

If I was developer, I would probably have just one row per table, and all table cells in the HTML empty, knowing that they would be replaced, particularly as number of cells by row, and number of rows both vary after dynamic creation.
water01 wrote:
Mon 23 Mar 2020 10:36 am
I have edited mine to remove the Solar parts and it worked fine
I did not say you could not remove a table, I said I could not edit the solar table to add UV, there is a difference.

I cannot see any image in your post, just the word image, your image has not been uploaded correctly.

The basic message remains true - that you cannot edit the table contents by changing the HTML file. I believe it a valid message to have in this forum where some readers are not as technically knowledgeable as others.

water01
Posts: 1705
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Don't try to change "todayyest.html"

Post by water01 » Mon 23 Mar 2020 12:56 pm

I cannot see any image in your post, just the word image, your image has not been uploaded correctly.
I suspect this is either a setting in your browser stopping images loading or a slow internet connection as the image was not loaded on Cumulus Support Forum but hosted on my server here http://www.dmjsystems.co.uk/djweather/tempjson.png
David
Image

freddie
Posts: 590
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux (Ubuntu 18.04)
Location: Dorrington, Shropshire
Contact:

Re: Don't try to change "todayyest.html"

Post by freddie » Mon 23 Mar 2020 2:21 pm

water01 wrote:
Mon 23 Mar 2020 12:56 pm
I suspect this is [...] a setting in your browser stopping images loading
No, it's a phpBB setting. If you want to include an image you need to upload it.
Freddie
Image

water01
Posts: 1705
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Don't try to change "todayyest.html"

Post by water01 » Mon 23 Mar 2020 3:30 pm

Surely not if you include it in img delimiters, that is how the banners work and also I can see the images in the post?
David
Image

User avatar
mcrossley
Posts: 6172
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Don't try to change "todayyest.html"

Post by mcrossley » Mon 23 Mar 2020 3:40 pm

I see the image too?

User avatar
jimi
Posts: 22
Joined: Sun 29 Sep 2013 11:06 am
Weather Station: Fine Offset WH1081
Operating System: Windows 7
Location: Glenrothes: The Kingdom of Fife
Contact:

Re: Don't try to change "todayyest.html"

Post by jimi » Tue 24 Mar 2020 12:22 am

I can see the image as well, as below

Image

It is possible to disable the use of IMG tags globally in phpBB, it's default setting is "allowed" but it can be disabled in the ACP, via Permissions, IIRC
Last edited by jimi on Tue 24 Mar 2020 3:10 am, edited 3 times in total.
Image

User avatar
jimi
Posts: 22
Joined: Sun 29 Sep 2013 11:06 am
Weather Station: Fine Offset WH1081
Operating System: Windows 7
Location: Glenrothes: The Kingdom of Fife
Contact:

Re: Don't try to change "todayyest.html"

Post by jimi » Tue 24 Mar 2020 2:41 am

Might be worth checking in your UCP on the "Board preferences/Edit display options" tab that the option to display images in posts is set to Yes.

EDIT
UCP = phpBB User Control Panel
Image

freddie
Posts: 590
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux (Ubuntu 18.04)
Location: Dorrington, Shropshire
Contact:

Re: Don't try to change "todayyest.html"

Post by freddie » Tue 24 Mar 2020 5:10 am

water01 wrote:
Mon 23 Mar 2020 3:30 pm
Surely not if you include it in img delimiters, that is how the banners work and also I can see the images in the post?
mcrossley wrote:
Mon 23 Mar 2020 3:40 pm
I see the image too?
I was wrong. It was the avatars only that I prevent remote linking to. Images in posts are okay as it is easy to edit a post with a dead link. Apologies for misleading :D
Freddie
Image

freddie
Posts: 590
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux (Ubuntu 18.04)
Location: Dorrington, Shropshire
Contact:

Re: Don't try to change "todayyest.html"

Post by freddie » Tue 24 Mar 2020 5:14 am

jimi wrote:
Tue 24 Mar 2020 2:41 am
Might be worth checking in your UCP on the "Board preferences/Edit display options" tab that the option to display images in posts is set to Yes.

EDIT
UCP = phpBB User Control Panel
NSS :lol:
Freddie
Image

User avatar
jimi
Posts: 22
Joined: Sun 29 Sep 2013 11:06 am
Weather Station: Fine Offset WH1081
Operating System: Windows 7
Location: Glenrothes: The Kingdom of Fife
Contact:

Re: Don't try to change "todayyest.html"

Post by jimi » Tue 24 Mar 2020 8:31 pm

freddie wrote:
Tue 24 Mar 2020 5:14 am
jimi wrote:
Tue 24 Mar 2020 2:41 am
Might be worth checking in your UCP on the "Board preferences/Edit display options" tab that the option to display images in posts is set to Yes.

EDIT
UCP = phpBB User Control Panel
NSS :lol:
Wasn't intended for you, I never doubted you knew what it meant, which is why I didn't explain ACP In my previous post ;) However many users have no idea about the UCP and the settings in it 8-)
Image

Post Reply