HWS-template (WD34) July version available

You want to concatenate? In php that’s just a period “.”

$str3 = $str1." ".$str2;

My method worked. All is good

How can I get rid of the


menu.PNG

[quote author=bitsostring link=topic=68132.msg548294#msg548294 date=1562613715]
How can I get rid of the

I realise that, but when I use it the units change to Imperial. When I use it again the units change to Metric, not back to UK, so I still have to go into the Menu. I use it a lot in testing, and that’s why it annoys me.

But if it annoys you, remove these lines 362 - 373 from w34_index2.php

Thanks, Wim :slight_smile:

(But see Customising PWS Dashboard (early versions) - #44 by pwsdashboard - PWS Dashboard 2012 - Weather-Watch Forum re station title)

Does anyone know if it is easy to create a second popup for webcam. This second popup should show a mp4 file created by WD (videolastday.mp4)

Thanks fror bringing this error to my attention.
All three metric variants use an C in the menu. So I assumed wrongly that one switches from C to “US-F” and back to “C-metric”.

I add a new w34_index2.php. It now switches from a temporary “F” back to the “C-as set in easyweather”
Also I adjusted the “clock” to 220px the get the stations=name correctly centered.

Can you please verify that is works correctly now?

Wim


w34_index2.php.zip (7.34 KB)

Yes you can make your own pop-ups.
Steps to follow in this case:

  1. Make a copy of webcam_popup.php and rename it to f.i.: my_webcam_popup.php
  2. Please always adjust the first line of the script to reflect the new name
  3. Adjust the code, f.i. I did by including a webcam feed of a mp4
  4. Add an extra line in w34_blocks.php to add your pop-up to the webcam block
$script = 'webcam_c_block.php';
$blck_ttls[$script]     = lang('LiveWebCam');
$blck_rfrs[$script]     = 120; 
$blck_ppp [$script][]   = array ('show' => true,      'popup' => 'webcam_popup.php',   'chartinfo' => 'popup',  'text' => lang('Enlarge') );
$blck_ppp [$script][]   = array ('show' => true,      'popup' => 'my_webcam_popup.php',   'chartinfo' => 'popup',  'text' => lang('Movie') );

The “my_webcam_popup.php” is attached.

I tested this at the wl.com test-site at https://sluispark.be/pwsTEST/
When you click on the smal webcam jpg in the block => the jpg is enlarged
But most people do not know that, so there are two pop-up links.
“Enlarge” and “Movie”

===

It is slightly more work to add a second webcam block, but for that you should better wait for the October release. Then user-added blocks are fully supported.

Wim


my_webcam_popup.php.zip (1.88 KB)

Works fine, thanks, Wim :slight_smile:

I should have mentioned it before. . .

I certainly didn’t - thanks, again!

my minimum temp block, the little one at the top, seems to have the time and temp reversed. Checked the raw data and it’s reversed there as well… so is it my raw data file that’s got the order incorrect? or something else?

http://www.tuley.online/pwsWD2/index.php


Screen Shot 2019-07-09 at 12.26.03 PM.png

I think there is a far bigger problem.
But first thanks for bringing this to my attention. I hope we can find a solution quickly.

realtime.txt is defined at: https://cumuluswiki.wxforum.net/a/Realtime.txt
The dates are in a metric order d/m/y and 24 hour times.
The separation between fields is the space character.

Your realtime file
=> http://www.tuley.online/pwsWD2/w34_module_test.php select …/pwsWD/WCT_Realtime.txt in the left bottom selector and click "List contents
=>

09/07/19 13:37:17 87.5 11 26.5 1.0 0 187 0.00 0.00 29.86 187 0 MPH

using Environment Canada. When I click on the warning I get a blank screen


This is caused by a https page (yours) loading a http page (http://weather.gc.ca/warnings/report_e.html?ab12).
The browser needs to get a “do-it” , see attached screenshot.

I will try to find out if there is a script error or otherwise why EC gives us a link with http as the same page is available as https also.
The EC script is loaded from https, but the links in the returned xml are still http.
I changed the script to translate the http link to https, so it should work OK now.

Wim


wrnWarningEC.php.zip (2.81 KB)

[quote author=wvdkuil link=topic=68132.msg548330#msg548330 date=1562701550]
. . . shortened . . .
realtime.txt is defined at: https://cumuluswiki.wxforum.net/a/Realtime.txt
The dates are in a metric order d/m/y and 24 hour times.
The separation between fields is the space character.

Your realtime file
=> http://www.tuley.online/pwsWD2/w34_module_test.php select …/pwsWD/WCT_Realtime.txt in the left bottom selector and click "List contents
=>

09/07/19 13:37:17 87.5 11 26.5 1.0 0 187 0.00 0.00 29.86 187 0 MPH 

---

[w34_livedata.php.zip|attachment](upload://vdxG0YDuDCSuoxf5D1zET80ZKzS.zip) (8.46 KB)

![ampm.jpg|702x190](upload://yZaSv5iPDFk7crh9rDyJoHFweq9.jpeg)

Problem: my July version page (url as left but /pwsnew/) layout is corrupted, but it was OK when I went to bed last night! What should I check?

It is easier to test with a more simple page: http://swanston.maui.co.uk/pwsnew/index.php?frame=test_image
It seems that you tried to move the alert-block to position 4 and in that process both the alert-block and the garden block are now in the same position. There is one missing?

In these cases I need access to the easyweather settings or even better an ftp password/userid.

Wim

Thanks for looking, Wim. I did indeed move the alert block, but it has worked perfectly for the last two days. There is now an alert for the first time, would that change anything?

In these cases I need access to the easyweather settings or even better an ftp password/userid.

PM on its way.

EDIT: I see it works OK if the alerts are put back to position 5.

Yes, but I changed the script so it can cope with it.
position 1-4 are included to speed up loading of the page.
The alertsblock is normally loaded last via jquery_GET in a separate PHP process as it can take considarable time to get the alarms.

There are 4 blocks + 1 special for the alerts. You can put the alerts in another place in w34_index2.php

w34_weather_item ('position1',$position1); include $position1; echo $end_block;
w34_weather_item ('position2',$position2); include $position2; echo $end_block;
if ($extra3used == 'wide') { 
w34_weather_item ('position3',$position3); include $position3; echo $end_block; }
w34_weather_item ('position4',$position4); include $position4; echo $end_block; 
w34_weather_item ('positionlast',$positionlast);/*  include $positionlast; */echo $end_block; 

This works also as used in http://wd34.weather-template.com/pws07/

w34_weather_item ('positionlast',$positionlast);/*  include $positionlast; */echo $end_block; 
w34_weather_item ('position1',$position1); include $position1; echo $end_block;
w34_weather_item ('position2',$position2); include $position2; echo $end_block;
if ($extra3used == 'wide') { 
w34_weather_item ('position3',$position3); include $position3; echo $end_block; }
w34_weather_item ('position4',$position4); include $position4; echo $end_block; 

Better not change the question in easyweather. I will remove the alert-box from easyweather, just to make sure.

Wim


wrnWarningEU.php.zip (13.7 KB)

Thanks, Wim.

position 1-4 are included to speed up loading of the page. The alertsblock is normally loaded [b]last[/b] via jquery_GET in a separate PHP process as it can take considarable time to get the alarms.

I should have known there was a reason. . . sorry.

There are 4 blocks + 1 special for the alerts. You can put the alerts in another place in w34_index2.php

Thanks again :slight_smile: