Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Now available: AJAX/PHP multilingual website templates

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by meteotortosa »

I've a lot of issues, this is the first

- I am translating the file "language-ct-txt" and I can not find a phrase. In my personal website, you can see that says "Probáblemente lluvioso " in the section of the rain, but in the translation file, the only overlap is in the WU-section forecast.php.

That is why it may be in another section, but failed will find itself

http://www.meteotortosa.cat/web3/wxindex.php

Code: Select all

# WU-forecast.php Icon forecast terms
#
langlookup|Chance flurries|Posibilidad de ráfagas de nieve|
langlookup|Chance rain|Posibilidad de lluvia|
langlookup|Chance sleet|Posibilidad de aguanieve|
langlookup|Chance snow|Posibilidad de nieve|
langlookup|Chance thunderstorms|Posibilidad de tormentas|
langlookup|Clear|Despejado|
langlookup|Cloudy|Cubierto|
langlookup|Flurries|Ráfagas de nieve|
langlookup|Fog|Niebla|
langlookup|Hazy|Hazy|
langlookup|Mostly cloudy|Muy nuboso|
langlookup|Partly cloudy|Parcialmente nuboso|
langlookup|Mostly sunny|Muy poco nuboso|
langlookup|Rain|Probáblemente lluvioso|
langlookup|Sleet|Aguanieve|
langlookup|Snow|Nieve|
langlookup|Sunny|Soleado|
langlookup|Thunderstorms|Tormenta eléctrica|
#
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by meteotortosa »

OMG !!

I've a big issue. I've tried to insert a new link with flyout-menu.xml and I've this error

Code: Select all

XML error: mismatched tag at line 53

Code: Select all

46 -->
	47 <item caption="Forecast &amp; Advisories"/>
		48 <item caption="Forecast details" link="wxforecast.php"/>
		49 <item caption="Advisories" link="wxadvisory.php"/>
		50 <item caption="WXSIM Forecast details" link="wxsimforecast.php"/>
		51 <item caption="UV Index Forecast" link="wxuvforecast.php"/>
		52
	53 </item>
	
	54 <item caption="Almanac"/>
	    55 <item wxonly="WD,MH" caption="Weather Trends" link="wxtrends.php"/>
		56 <item caption="Station Graphs" link="wxgraphs.php"/>
		57 <item caption="WU History" link="wxwuhistory.php"/>
		58 <item wxonly="WD" caption="Station Monthly Reports" link="wxhistory.php"/>
		59 <item wxonly="CU,VWS,WL" caption="NOAA reports" link="wxnoaaclimatereports.php"/>
		60 <item caption="Sun/Moon Almanac" link="wxastronomy.php"/>
		61 <item caption="Earthquake activity" link="wxquake.php"/>
		62 <item caption="Nearby METAR Reports" link="wxmetar.php"/>
Where are wrong? :?

www.meteotortosa.cat/web3 <- the web ;)
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by meteotortosa »

SOLVED !!

Code: Select all

47 <item caption="Forecast &amp; Advisories"/>
by

Code: Select all

47 <item caption="Forecast &amp; Advisories">
and

Code: Select all

54 <item caption="Almanac"/>
by

Code: Select all

54 <item caption="Almanac">
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by saratogaWX »

mickopla wrote:I got the script up and running today which i'm delighted about but i'm wondering how do i edit the wxindex.php to change the default settings? Also i have the WU-Forecast.php running properly for my area but the forecast on the wxindex.php is not the correct region. Here are my links Http://www.waterfordcityweather.com/wxindex.php
http://www.waterfordcityweather.com/WU-forecast.php
For the templates, all the configuration items are in Settings.php (and Settings-weather.php).

For the WU-forecast.php, enter your primary site URL in $SITE['fcsturlWU'] (or as the first entry in $SITE['WUforecasts'] = array( ...);

When using the templates, you don't have to customize the support scripts like WU-forecast.php .. the script will configure itself based on the associated entries in Settings.php / Settings-weather.php files.

Best regards,
Ken
Last edited by saratogaWX on Tue 06 Dec 2011 10:23 pm, edited 1 time in total.
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by meteotortosa »

saratogaWX wrote:For the templates, all the configuration items are in Settings.php (and Settings-weather.php).

For the WU-forecast.php, enter your primary site URL in $SITE['fcsturlWU'] (or as the first entry in $SITE['WUforecasts'] = array( ...);

When using the templates, you don't have to customize the support scripts like WU-forecast.php .. the script will configure itself based on the associated entries in Settings.php / Settings-weather.php files.

Best regards,
Ken
Have you seen in my web anything that it should not be modified?

Thanks,

Lluís
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by saratogaWX »

meteotortosa wrote:
saratogaWX wrote:For the templates, all the configuration items are in Settings.php (and Settings-weather.php).

For the WU-forecast.php, enter your primary site URL in $SITE['fcsturlWU'] (or as the first entry in $SITE['WUforecasts'] = array( ...);

When using the templates, you don't have to customize the support scripts like WU-forecast.php .. the script will configure itself based on the associated entries in Settings.php / Settings-weather.php files.

Best regards,
Ken
Have you seen in my web anything that it should not be modified?

Thanks,

Lluís
Hi Lluis, my comment was intended for mickopla .. sorry, I'd not included a quote about that when originally posting, so I understand the confusion.

I recommend that folks not modify the underlying support scripts (like WU-forecast.php, get-meteoalarm-info.php, get-metar-conditions-inc.php, common.php etc) as those scripts may be replaced in full by a future update. The wx...php, Settings.php, Settings-weather.php, top.php, header.php, menubar.php, footer.php and flyout-menu.xml are all intended to be modified by you to suit your needs .. the distributed pages of those names are starting points. If they need replacement in the future, the updates script will note "replace old with new after modifications are made" to signal that you'll need to port your mods from the old to the new page before installing.

The language-LL.txt files are also expected to be modified by you if need be. The distributions may include updated versions as folks contribute them for the various languages .. it's your option to keep the one for your primary website language as-is, and just update the ones for the other languages you offer on your site.

Since the distribution is all in source, it's yours to enhance as you see fit .. you can make your maintenance job easier by only modifying the scripts you need to modify, and relying on replacements with updates as they are available.
The support scripts get replacements when either an underlying change to a source website (like WeatherUnderground or temis.nl) changes format and needs a script change to accommodate the new format, or a support script may have a change to fix a bug or provide a template feature enhancement (like the recent changes to provide a wxmetar.php page).

Hope this helps...

BTW.. when you're satisfied with your changes for Catalan, I'd love to pick up and distribute them for the lang=ct translation :)

Best regards,
Ken
mickopla
Posts: 119
Joined: Mon 11 Oct 2010 7:56 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7

Re: Now available: AJAX/PHP multilingual website templates

Post by mickopla »

Thanks Ken

I really appreciate your fantastic templates. It took me a while to adjust to the php format and which php files to edit to make changes but i'm getting there.

Best Regards

Mike

Edit: I set up a satellite php but i cant get the maps to fit properly on the page. I have seen the exact set up on another website and they fit fine. I'm wondering what i need to edit in order to fix this page. Cheers, Mike
http://www.waterfordcityweather.com/wxsatellite.php
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by meteotortosa »

I've two big issues

- Graphs. I don't understand whats happen...
MeteoTortosa.cat Trend Graphs.png
These link ara all OK. Example:

http://www.meteotortosa.cat/liveview/images/temp.png

Image

- NOAA Reports

Code: Select all

Warning: opendir(http://www.meteotortosa.cat/meteoct/NOAA-reports/) [function.opendir]: failed to open dir: not implemented in /home/meteotor/public_html/web3/include-NOAA-reports.php on line 178
A little help is appreciated ;)

Lluís

www.meteortosa.cat/web3
You do not have the required permissions to view the files attached to this post.
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by saratogaWX »

There are three items in Settings-weather.php that need to be changed to make the graphs and NOAA reports work. You need to use relative file addressing for these items, not URL links, so change

Code: Select all

$SITE['realtimefile'] = 'http://www.meteotortosa.cat/liveview/realtime.txt';
$SITE['graphImageDir'] = 'http://www.meteotortosa.cat/liveview/images/';
$SITE['NOAAdir'] = 'http://www.meteotortosa.cat/meteoct/NOAA-reports/';
to

Code: Select all

$SITE['realtimefile'] = '../liveview/realtime.txt';
$SITE['graphImageDir'] = '../liveview/images/';
$SITE['NOAAdir'] = '../meteoct/NOAA-reports/';
and it should work (assuming your site stays in the ./web3/ directory relative to the document root of the website.

Best regards,
Ken
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by saratogaWX »

mickopla wrote:Thanks Ken

I really appreciate your fantastic templates. It took me a while to adjust to the php format and which php files to edit to make changes but i'm getting there.

Best Regards

Mike

Edit: I set up a satellite php but i cant get the maps to fit properly on the page. I have seen the exact set up on another website and they fit fine. I'm wondering what i need to edit in order to fix this page. Cheers, Mike
http://www.waterfordcityweather.com/wxsatellite.php
Hi Mike,

Thanks for the kind words, and I'm glad you are enjoying using the template set :)

You just need to add a ' width="620" height="451" ' to the <img ... /> statements to have the browser scale the images to fit in the 620px space available in the narrow template. Those images are 845px wide by 615px tall so overflow the display area.

Best regards,
Ken
mickopla
Posts: 119
Joined: Mon 11 Oct 2010 7:56 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7

Re: Now available: AJAX/PHP multilingual website templates

Post by mickopla »

saratogaWX wrote:
mickopla wrote:Thanks Ken

I really appreciate your fantastic templates. It took me a while to adjust to the php format and which php files to edit to make changes but i'm getting there.

Best Regards

Mike

Edit: I set up a satellite php but i cant get the maps to fit properly on the page. I have seen the exact set up on another website and they fit fine. I'm wondering what i need to edit in order to fix this page. Cheers, Mike
http://www.waterfordcityweather.com/wxsatellite.php
Hi Mike,

Thanks for the kind words, and I'm glad you are enjoying using the template set :)

You just need to add a ' width="620" height="451" ' to the <img ... /> statements to have the browser scale the images to fit in the 620px space available in the narrow template. Those images are 845px wide by 615px tall so overflow the display area.

Best regards,
Ken
Thanks Ken
That worked great.

Not directed at Ken but maybe someone else or Ken might know the answer. I want to add the wxspace.php to my site. I have tried the script that is for the USA template but i'm getting a Error 003 on the images. I was looking for a Base-World version of the script but couldn't find one that's why i used the USA version. so i'm wondering is the error 003 because its the wrong version or would it be the file permissions which i have changed as per Readme.txt of script? Thanks in advance.
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by meteotortosa »

saratogaWX wrote:There are three items in Settings-weather.php that need to be changed to make the graphs and NOAA reports work. You need to use relative file addressing for these items, not URL links, so change

Code: Select all

$SITE['realtimefile'] = 'http://www.meteotortosa.cat/liveview/realtime.txt';
$SITE['graphImageDir'] = 'http://www.meteotortosa.cat/liveview/images/';
$SITE['NOAAdir'] = 'http://www.meteotortosa.cat/meteoct/NOAA-reports/';
to

Code: Select all

$SITE['realtimefile'] = '../liveview/realtime.txt';
$SITE['graphImageDir'] = '../liveview/images/';
$SITE['NOAAdir'] = '../meteoct/NOAA-reports/';
and it should work (assuming your site stays in the ./web3/ directory relative to the document root of the website.

Best regards,
Ken
A lot of thanks Ken, It's works !!! or not !! :o

Can you see this, please? -> http://www.meteotortosa.cat/web3/wxnoaa ... eports.php
And my NOAA-reports web folder -> http://www.meteotortosa.cat/meteoct/NOAA-reports/

I'm looking for into some files, and I think is all OK

A lot of thanks again
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by saratogaWX »

mickopla wrote: Thanks Ken
That worked great.

Not directed at Ken but maybe someone else or Ken might know the answer. I want to add the wxspace.php to my site. I have tried the script that is for the USA template but i'm getting a Error 003 on the images. I was looking for a Base-World version of the script but couldn't find one that's why i used the USA version. so i'm wondering is the error 003 because its the wrong version or would it be the file permissions which i have changed as per Readme.txt of script? Thanks in advance.
It's likely that your PHP installation has turned off allow_url_fopen (it's the default in PHP5).

Edit (or create a new) php.ini file in the document root of your website and put in it:

allow_url_fopen = on;

Then the image scripts should be able to open/resize/cache the images on the space weather page.

Yes, you can use the USA version with your template set .. the only downside is that it will remain in English (as there is no built-in support for the translation functions).

Best regards,
Ken
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by saratogaWX »

meteotortosa wrote:
A lot of thanks Ken, It's works !!! or not !! :o

Can you see this, please? -> http://www.meteotortosa.cat/web3/wxnoaa ... eports.php
And my NOAA-reports web folder -> http://www.meteotortosa.cat/meteoct/NOAA-reports/

I'm looking for into some files, and I think is all OK

A lot of thanks again
Glad the Graphs images are working now :)

The issue with the NOAA reports is caused by the naming of the files in your meteoct/NOAA-reports/ directory.

The files there are
NOAA2007.txt
NOAA200705.txt
NOAA200706.txt
NOAA200707.txt
NOAA200708.txt
NOAA200709.txt
NOAA200710.txt
NOAA200711.txt
NOAA200712.txt
NOAA2008.txt
NOAA200801.txt
NOAA200802.txt
NOAA200803.txt
NOAA200804.txt
NOAA200805.txt
NOAA200806.txt
NOAA200807.txt
NOAA200808.txt
NOAA200809.txt
NOAA200810.txt
NOAA200811.txt
NOAA200812.txt
NOAA2009.txt
NOAA200901.txt
NOAA200902.txt
NOAA200903.txt
NOAA200904.txt
NOAA200905.txt
NOAA200906.txt
NOAA200907.txt
NOAA200908.txt
NOAA200909.txt
NOAA200910.txt
NOAA200911.txt
NOAA200912.txt
NOAA2010.txt
NOAA201001.txt
NOAA201002.txt
NOAA201003.txt
NOAA201004.txt
NOAA201005.txt
NOAA201006.txt
NOAA201007.txt
NOAA201008.txt
NOAA201009.txt
NOAA201010.txt
NOAA201011.txt
NOAA201012.txt
NOAA201101.txt
NOAA201102.txt
NOAA201103.txt
NOAA201104.txt
NOAA201105.txt
NOAA201106.txt
NOAA201107.txt
NOAA201108.txt
NOAA201109.txt
NOAA201110.txt
NOAA201111.txt
NOAAMO.TXT
NOAAMO200703.txt
NOAAMO200704.txt
NOAAPRMO.TXT
NOAAPRYR.TXT
NOAAYR.TXT
NOOA200708.txt
NOOA200809.txt
NOOA200810.txt
and for Cumulus reports, should be named as

NOAAMO<MM><YY>.txt for monthly reports (e.g. NOAAMO1211.txt for December, 2011)
NOAAYR<YYYY>.txt for yearly reports (e.g. NOAAYR2011.txt for 2011 report)

It looks like you have a mix of WeatherLink names and Cumulus names in that directory. Correct the filenames to match the Cumulus convention, and the NOAA report display should work fine. Be sure to remove all the other files not matching the Cumulus convention from the directory.

Best regards,
Ken
mickopla
Posts: 119
Joined: Mon 11 Oct 2010 7:56 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7

Re: Now available: AJAX/PHP multilingual website templates

Post by mickopla »

saratogaWX wrote:
mickopla wrote: Thanks Ken
That worked great.

Not directed at Ken but maybe someone else or Ken might know the answer. I want to add the wxspace.php to my site. I have tried the script that is for the USA template but i'm getting a Error 003 on the images. I was looking for a Base-World version of the script but couldn't find one that's why i used the USA version. so i'm wondering is the error 003 because its the wrong version or would it be the file permissions which i have changed as per Readme.txt of script? Thanks in advance.
It's likely that your PHP installation has turned off allow_url_fopen (it's the default in PHP5).

Edit (or create a new) php.ini file in the document root of your website and put in it:

allow_url_fopen = on;

Then the image scripts should be able to open/resize/cache the images on the space weather page.

Yes, you can use the USA version with your template set .. the only downside is that it will remain in English (as there is no built-in support for the translation functions).

Best regards,
Ken
Hi Ken

I created a php.ini file with just "allow_url_fopen = on;" in the body of the file and i still have the error 003. Should there be anything other than the "allow_url_fopen = on;" in the txt of the file? Would love to get this working but it is trying on my patience at this stage ;) Thanks in advance

Mike
Post Reply