Trixology

WeatherCat => WeatherCat Web Templates => Topic started by: Alan Rowley on July 15, 2015, 07:55:40 PM

Title: Leuven new installation problems
Post by: Alan Rowley on July 15, 2015, 07:55:40 PM
I am a new WeatherCat and Leuven user. I am slowly setting up my site with the Leuven template, but I have a couple of problems that I cannot solve.

1. How do I get rid of the
Quote
There is a communication problem. Go directly to the Meteoalarm site
message at the top of the page?

2. In settings, I changed
Quote
$SITE['Support']   = 'V';
to
Quote
$SITE['Support']   = 'H';
expecting the display of social media icons to move to the top of the page. Instead, the icons disappeared, even when I reverted the change.

As soon as I have solved these errors, I can start to set up the rest of the site.

Link: Bracken House Weather (http://www.brackenhouse.net/weather27/index.php)

ALAN
Title: Re: Leuven new installation problems
Post by: wvdkuil on July 15, 2015, 08:40:23 PM
I am a new WeatherCat and Leuven user. I am slowly setting up my site with the Leuven template, but I have a couple of problems that I cannot solve.

1. How do I get rid of the
Quote
There is a communication problem. Go directly to the Meteoalarm site
message at the top of the page?

2. In settings, I changed
Quote
$SITE['Support']   = 'V';
to
Quote
$SITE['Support']   = 'H';
expecting the display of social media icons to move to the top of the page. Instead, the icons disappeared, even when I reverted the change.

As soon as I have solved these errors, I can start to set up the rest of the site.

Link: Bracken House Weather (http://www.brackenhouse.net/weather27/index.php)

ALAN
Earlier today (16:18 CET) I already sent you a message using your contact page.
Quote
Please change line 81 in wsUserSettings.php from
if ($SITE['region'] ==   'europe') {
to
if ($SITE['region'] ==   'america') {

This will remove a lot of problems.
Check the WiKi http://leuven-template.eu/dokuwiki27/doku.php?id=en:php#if (http://leuven-template.eu/dokuwiki27/doku.php?id=en:php#if)

You changed some lines in the settings file which should not be changed.
Please only change the lines step by step as described in the WiKi. Randomly changing lines without the description leeds to unknown errors.
At the moment you are using partly "region - america"  and partly "region - europe" settings mixed together.

I you click on that message
Quote
There is a communication problem. Go directly to the Meteoalarm site : www.meteoalarm.eu and check the Weather-warnings there .

you arrive at
http://www.meteoalarm.eu/en_UK/0/0/CTC009.html?lang=en (http://www.meteoalarm.eu/en_UK/0/0/CTC009.html?lang=en)
and CTC009 is an american area code, not a european one.

Quote
2. In settings, I changed $SITE['Support']   = 'V'; to $SITE['Support']   = 'H';

There is no such setting as $SITE['Support']. You made that yourself. The original line reads
Code: [Select]
$SITE['socialSiteSupport'] = 'V';  // ##### ' ' no support; "H"orizontal or "V"ertical  display of facebook icons and othersWiKi describes it in detail, I think:
http://wiki.leuven-template.eu/doku.php?id=en:check_these_first#social_site_buttons (http://wiki.leuven-template.eu/doku.php?id=en:check_these_first#social_site_buttons)

As described MULTIPLE times, please only change the value AFTER the single "=" sign and only when instructed so.
Please follow the WiKi first time, later you can go randomly through the settings.
A template  is written in PHP, not HTML. And PHP  is a programming language so change slowly and do a lot of testing,

Succes, Wim

 
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 15, 2015, 09:00:51 PM
Thanks for your reply Wim.

Sorry, I didn't get your message through my contacts page as I had an incorrect email address. It is correct now.

I did follow the wiki, but they say that you can't teach an old dog new tricks. At 62 years old, that is certainly the case with me. Not only am I having to learn your template, I am also new to WeatherCat, having spent six years with Weather Display on Windows. I've corrected the two errors and the site is now looking good.

I am now about to start the task of adapting the pages from my old site to the new template. I may have more questions later.

ALAN.
Title: Re: Leuven new installation problems
Post by: wvdkuil on July 16, 2015, 11:03:28 AM
Thanks for your reply Wim.

Sorry, I didn't get your message through my contacts page as I had an incorrect email address. It is correct now.

I did follow the wiki, but they say that you can't teach an old dog new tricks. At 62 years old, that is certainly the case with me. Not only am I having to learn your template, I am also new to WeatherCat, having spent six years with Weather Display on Windows. I've corrected the two errors and the site is now looking good.

I am now about to start the task of adapting the pages from my old site to the new template. I may have more questions later.

ALAN.
Just checked the progress and if the errors are gone or maybe new ones popped up..

1. Your small globe below your avatar on the left of your postings, point to a non-existent website
http://www.brackenhouse.net/weather/msindex.php

2. The pages look Ok but sometimes the fonts are  large.
http://www.brackenhouse.net/weather27/index.php?p=10&lang=en
100% in the dashboard "Temperature" , 130%  a little lower for "Precipitation"

I will look into that, or is it on purpose?

Succes, Wim
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 16, 2015, 11:15:03 AM
Hi Wim,

I have been experimenting with the css files to get the site looking how I want it. I will be making some changes today.

Thanks for checking back.

ALAN
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 16, 2015, 01:40:21 PM
Wim,

The large font and the link to the home page in my profile have now been corrected.

A quick question for you - on my home page, under temperature, the high and low for last year, records/today and normals/today are incorrect. Where is the template picking these settings from, and how do I correct it?

ALAN.
Title: Re: Leuven new installation problems
Post by: wvdkuil on July 16, 2015, 06:43:43 PM
Wim,

The large font and the link to the home page in my profile have now been corrected.

A quick question for you - on my home page, under temperature, the high and low for last year, records/today and normals/today are incorrect. Where is the template picking these settings from, and how do I correct it?

ALAN.
Last year comes from your data at WU.
Records and normals come from the almanac data for your latitude-longitude also from WU.

Please delete the almanac file in the cache and see if it improves things.
I will check tomorrow with the files themselves,

Wim
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 16, 2015, 08:18:59 PM
I've deleted the relevant file from the cache. Nothing seems to have changed. I found it strange that the page was reporting records from 2001 and 2003 when I didn't have a weather station until 2009. If they are genuine records from my locality, then I can live with the figures.

I'm progressing nicely with the template now, and I hope to have the site fully functional over the weekend. Thanks for your help so far.

ALAN
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 20, 2015, 11:09:53 AM
How do I hide the link to 'Other Stuff / Partnerships' on my site? When I delete it or set show="no", I get the following error ...

Quote
Notice: Undefined index: wsPartners in /home/alanrowley3/public_html/weather27/_my_texts/partners.php

I'm stumped.

ALAN.

UPDATE: Quote edited to correct the error message.
Title: Re: Leuven new installation problems
Post by: awilltx on July 20, 2015, 02:16:39 PM
How do I hide the link to 'Other Stuff / Partnerships' on my site? When I delete it or set show="no", I get the following error ...

/home/alanrowley3/public_html/weather27/_my_texts/partners.php


This sounds like a bug in the templates. I would submit a question on the Leuven site. I have downloaded the new v2.7 and will begin testing so maybe I can find something that will work.

Cheers and good luck,
Alan
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 20, 2015, 06:25:16 PM
The correct error message I get is ...

Quote
Notice: Undefined index: wsPartners in /home/alanrowley3/public_html/weather27/_my_texts/partners.php
Title: Re: Leuven new installation problems
Post by: wvdkuil on July 20, 2015, 06:52:30 PM
How do I hide the link to 'Other Stuff / Partnerships' on my site? When I delete it or set show="no", I get the following error ...

Quote
/home/alanrowley3/public_html/weather27/_my_texts/partners.php

I'm stumped.

ALAN.
1. If you want to display information about the "partners" (WU  WOW and others) is set in wsUserSettings.php line
Code: [Select]
221 | $SITE['partners'] = 'V';// ##### show other websites (partners)  with your weatherdata side('V') or bottom('B') or not ('')You set it to display "V" which means vertical in the side area.
2. You set for each partner, if you are using that partner and what your ID is, lines 416-440
Code: [Select]
  416 | #---------------------------------------------------------------------------
  417 | # IMPORTANT     Partner information:
  418 | #---------------------------------------------------------------------------
  419 | # your id's for weather sites, mostly used to display logo and make a link to your weatherdata on their site
  420 | # set to false if you do not cooperate with them
  421 | #
  422 | # WU  settings for your data at wunderground site  IVLAAMSG47
  423 | #
  424 | $SITE['wuId'] = true;
  425 | $SITE['wuId'] = 'INOTTING15'; // ##### the ID of your personal weather station at the Wunderground site or false if you are not a member
  426 | $SITE['wuStart'] = '01-10-2009'; // #####  Stations first day of operation at wunderground format dd-mm-yyyy for wu history pages
  427 | #
  428 | # other sites where your data is shown
  429 | #
  430 | $SITE['hwaID'] = false; // ##### Example  $SITE[hwaID'] = 'abcdefg';
  431 | $SITE['wowID'] = 6099914; // ##### Example  $SITE['wowID']        = 1234567;
  432 | $SITE['awekasID'] = false; // ##### Example  $SITE['awekasID'] = 1234;
  433 | $SITE['wcloud']         = 'd0163319505'; // example $SITE['wcloud']         = 'd1686817653';
  434 | $SITE['anWeID'] = false; // ##### Example  $SITE['anWeID'] = '1234567';
  435 | $SITE['pwsID'] = 'SELSTON'; // ##### Example  $SITE['pwsID'] = 'abcd99';
  436 | $SITE['cwopId'] = 'DW3696'; // ##### Example  $SITE['cwopId']       = 'C6440';
  437 | $SITE['weatherlinkID'] = ''; // ##### Example  $SITE['weatherlinkID']= 'abcdefgh';
  438 | $SITE['wp24ID'] = false;    // ##### true or false
  439 | $SITE['uswg'] = false;    // ##### true or false
  440 | #---------------------------------------------------------------------------
That is all.  Deleting other scripts will result in errors.

Where do these errors come from:
Code: [Select]
Notice: Undefined index: wsPartners in /home/alanrowley3/public_html/weather27/_my_texts/partners.php3. If you do not want a page to display, first set it to "hide" in the menu file.
Do not comment or remove to quickly all kind of pages WITHOUT slowly moving AND testing a lot.
Also do not remove whole groups if you think you do not need those pages.

The partners page is essential and wanted by you as you are member of multiple partners.
That partner page is used to display your information at that site inside the template.
So set the group again to show and the errors will be gone.
Code: [Select]
<item caption="Other Stuff" show="no">
4.  Some examples at the demo site:
http://weather-template.nl/weather27/   => click on the logo of weathercloud and
http://weather-template.nl/weather27/index.php?p=82&s=wcloud&lang=en#data-area  is displayed, inside the template, you are not loosing a visitor.
Clicking on the WOW log and again another partner page is displayed inside your own website.

But all those pages are displayed using wsPartners =>  p=82.

Wim
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 20, 2015, 08:57:00 PM
Thanks for your help, Wim.

I have adapted the 'partnerships' page and I am now using it in the 'other stuff' section.
I have also solved the problem of the UV Index Forecast icons and they now show at their actual size.

The website is now looking almost how I want it. I have a few more minor adjustments to make before I start copying pages from my old weather site.

Thanks for the support, and your excellent templates.

ALAN

Bracken House Weather (old site) (http://www.brackenhouse.net/weather/) | Bracken House Weather (new site) (http://www.brackenhouse.net/weather27/)
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 28, 2015, 05:03:03 PM
Hello again,

I have run into another problem that has me stumped, this time on my trends page (http://www.brackenhouse.net/weather27/index.php?p=111&lang=en). If you look at the page, you will see that it is returning two errors ...

Quote
Notice: Undefined variable: wsTrends in /home/alanrowley3/public_html/weather27/inc/trends.php on line 418

Notice: Undefined index: rainHour in /home/alanrowley3/public_html/weather27/inc/trends.php on line 449

I've made lots of changes to the template, as you can see, but I hadn't made any changes to this page before the errors appeared.

Can anyone help?

ALAN.
Title: Re: Leuven new installation problems
Post by: wvdkuil on July 28, 2015, 05:31:02 PM
Hello again,

I have run into another problem that has me stumped, this time on my trends page (http://www.brackenhouse.net/weather27/index.php?p=111&lang=en). If you look at the page, you will see that it is returning two errors ...

Quote
Notice: Undefined variable: wsTrends in /home/alanrowley3/public_html/weather27/inc/trends.php on line 418

Notice: Undefined index: rainHour in /home/alanrowley3/public_html/weather27/inc/trends.php on line 449

I've made lots of changes to the template, as you can see, but I hadn't made any changes to this page before the errors appeared.

Can anyone help?

ALAN.
The trends page is normaly not available for WeatherCat users and should not appear in your menu as there are no "trend" values for Wc users.
And the errors are there because the script can not find the trend values, at least I can not find values like 5min ago - 10 min ago and so on.

WiKi http://wiki.leuven-template.eu/doku.php?id=en:facts (http://wiki.leuven-template.eu/doku.php?id=en:facts)

This is the demo site for release 2.7 -> WeatherCat  http://weather-template.nl/weather27/index.php?p=10&wp=WC (http://weather-template.nl/weather27/index.php?p=10&wp=WC)
The menu does not contain the trends page.
I made another page with historical data  http://weather-template.nl/weather27/index.php?p=61-1&lang=en&wp=WC#data-area

Wim
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 28, 2015, 05:40:28 PM
Quote
The trends page is normaly not available for WeatherCat users

That explains everything. On my old site, which was fed by Weather Display, I used the trends page a lot. It's a shame that it can't be re-created in WeatherCat.

A further problem I have is how do I change the cities in the dropdown menu on the forecast pages (Brussels, Antwerp, Eindhoven etc.)? Those cities don't mean anything to me and I would like to change them to somewhere I'm interested in.

Thanks - ALAN.
Title: Re: Leuven new installation problems
Post by: wvdkuil on July 28, 2015, 06:39:59 PM
Quote
The trends page is normaly not available for WeatherCat users

That explains everything. On my old site, which was fed by Weather Display, I used the trends page a lot. It's a shame that it can't be re-created in WeatherCat.

A further problem I have is how do I change the cities in the dropdown menu on the forecast pages (Brussels, Antwerp, Eindhoven etc.)? Those cities don't mean anything to me and I would like to change them to somewhere I'm interested in.

Thanks - ALAN.
The files for the different cities are in the weather??/_my_texts/ folder: lat_lon_eu.txt
Code: [Select]
# you have to find the correct latitude and longitude for the places you want to use
# You could go to google maps and click (on the city name) on the map to find the information in the browser address-area
# example
# https://www.google.be/maps/place/3012+Wilsele/@50.8904695,4.69451,15z
#
#latitude  |longitude|name      |METAR|yahoo|
|51.2603851|4.3577201|Antwerp   |EBAW|966591|
|50.6246401|5.5990901|Li?ge     |EBLG|973540|
|50.57     |3.82  |Mons/Bergen  |EBCV|974484|
|50.92     |5.77  |Maastricht   |EHBK|731497|
|49.63     |6.2   |Luxemburg    |ELLX|979721|
|51.2      |2.87  |Oostende     |EBOS|975129|
WiKi: http://wiki.leuven-template.eu/doku.php?id=en:forecast_settings#multiple_city_area_selection_for_forecasts

Some scripts use latitude/longitude. Others a Metar or a code such as yahoo. Those are in the first file.

There is a separate file for yr-no forecasts   yrno_areas.txt
Code: [Select]
#To find the correct Country/region/City code visit http://www.yr.no/ and locate the nearest city the place you want to use.
#In the browser address area you find the correct code. Example http://www.yr.no/place/Belgium/Flanders/Leuven/
#
for yahoo go to https://weather.yahoo.com/ and search your city
https://weather.yahoo.com/belgium/capital-region-of-brussels/brussels-968019/
#
|Norge/Rogaland/Eigersund/Egersund/|    Egersund|
|Norge/Rogaland/Stavanger/Stavanger/|   Stavanger|
|Norge/Hordaland/Bergen/Bergen/|        Bergen|
|Netherlands/North_Brabant/Eindhoven|   Eindhoven|
|Belgium/Wallonia/Li?ge|                Li?ge|

Succes, Wim
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 28, 2015, 07:34:41 PM
Success indeed Wim. It's working a treat. I'll change all the settings after lunch.

Thanks again - ALAN.
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 31, 2015, 05:36:46 PM
I'm sorry to bother you guys again, but I'm stuck on another poser.

I have six years of data produced by Weather Display and the Saratoga template that I want to copy over into my new site. I am doing this by way of a daily / monthly summary page.

This is the original page - http://www.brackenhouse.net/weather/wxhistory.php (http://www.brackenhouse.net/weather/wxhistory.php).
This is my effort to integrate it into WeatherCat / Leuven - http://www.brackenhouse.net/weather27/index.php?p=157&lang=en (http://www.brackenhouse.net/weather27/index.php?p=157&lang=en)

As you will see, the page looks fine for the current month (July 2015), but if you select another month from the dropdown menu, you are taken back to the home page. Can anyone suggest any way of forcing the page to display the correct month? I am desperate to get this working as it compensates for WeatherCat being unable to import data from Weather Display.

Wim?
Title: Re: Leuven new installation problems
Post by: wvdkuil on July 31, 2015, 05:56:08 PM
I'm sorry to bother you guys again, but I'm stuck on another poser.

I have six years of data produced by Weather Display and the Saratoga template that I want to copy over into my new site. I am doing this by way of a daily / monthly summary page.

This is the original page - http://www.brackenhouse.net/weather/wxhistory.php (http://www.brackenhouse.net/weather/wxhistory.php).
This is my effort to integrate it into WeatherCat / Leuven - http://www.brackenhouse.net/weather27/index.php?p=157&lang=en (http://www.brackenhouse.net/weather27/index.php?p=157&lang=en)

As you will see, the page looks fine for the current month (July 2015), but if you select another month from the dropdown menu, you are taken back to the home page. Can anyone suggest any way of forcing the page to display the correct month? I am desperate to get this working as it compensates for WeatherCat being unable to import data from Weather Display.

Wim?
Can you please zip the Saratoga page and post it, or send it in an email?

As Saratoga pages are 'stand-alone" the adress each other by page-name
wxhistory.php
and when you select a period
/wxhistory.php?date=201506

The leuven-template removed all general code from the page and executes the pages by
index.php?p=pagecode
and when you select a periode the link should become
index.php?p=pagecode&date=201506
So no ? as that one is already used but an &.

All scripts which use "in-script" selectors need some minor adjusting.

Hope this makes it a little bit clearer.

I think it could work already when you change line 124 in the html part of _my_scripts/wxhistory.php from
Code: [Select]
<form action="" method="get">to
Code: [Select]
<form action="index.php?p=157" method="get">We have then hard-coded the pagenumber, but for now that is OK.

Wim



Wim
Title: Re: Leuven new installation problems
Post by: wvdkuil on July 31, 2015, 06:08:59 PM
Sorry for the previous solution. It was a long day and it looked like a simple solution, they tend to not work.

You have to add one line extra below the form line:
Code: [Select]
<form action="" method="get">
<input type="hidden" style="padding: 0px; border: 0px; margin: 0px" name="p" value="157">

Otherwise the p=xyz in the form action field will be written over by the period selection just made.

Wim
Title: Re: Leuven new installation problems
Post by: Alan Rowley on July 31, 2015, 06:15:50 PM
Wim, you are a coding genius. Thank you so much, I am a happy man again.
Title: Re: Leuven new installation problems
Post by: Alan Rowley on August 05, 2015, 10:23:01 PM
Another annoying little error that pops up occasionally. Anyone any ideas?

Quote
Warning: Division by zero in /home/alanrowley3/public_html/weather27/scriptsWC/tagsWC.php on line 298

ALAN.
Title: Re: Leuven new installation problems
Post by: Alan Rowley on August 08, 2015, 09:05:30 PM
I'm still getting this division by zero error frequently. The offending line is ...

Quote
$ws['solarActPerc']      =  round((100*$ws['solarAct']/$max_solar),0);

Does anyone have any ideas?

ALAN.
Title: Re: Leuven new installation problems
Post by: xairbusdriver on August 09, 2015, 03:52:44 AM
Might put try if ($max_solar > 0) { do the rounding routine } or just if(!$max_solar) {skip the routine }. I have no idea what the value is for or what might happen if it is not created; it may be used elsewhere. In that case, you could have the 'test' just set $max_solar to 1 and proceed with the rounding.

Or you could get the expert advice from Wim. Where's the fun in that! [lol]
Title: Re: Leuven new installation problems
Post by: wvdkuil on August 09, 2015, 08:48:15 AM
I'm still getting this division by zero error frequently. The offending line is ...

Quote
$ws['solarActPerc']      =  round((100*$ws['solarAct']/$max_solar),0);

Does anyone have any ideas?

ALAN.
No sun => no solar value => no max_solar. Strange but with some systems it is like that. Sloppy programmer that "Wim".

Important: I do not always get a message that there are new postings, or that there is a new "leuven"-topic.

So if you have a "real" error, like this one, also use the support system to warn me. http://support.leuven-template.eu/ (http://support.leuven-template.eu/)

@ALL
Attached a new version of tagsWC.php.
1. Make a backup/copy of weather27/scriptsWC/tagsWC.php
2. Unzip attachement
3. Replace older with new version

Wim
Title: Re: Leuven new installation problems
Post by: Alan Rowley on August 09, 2015, 11:02:23 AM
New copy installed. Hopefully that's the end of that error.

Thanks Wim.