Weather by You!

Templates and Projects support => Php templates => Topic started by: gemini06720 on June 07, 2012, 06:31:21 AM

Title: Weather Sky template comments
Post by: gemini06720 on June 07, 2012, 06:31:21 AM
Jacques, may I suggest, when you design and test templates, that you fully activate the PHP error detection...  ;)

I have just installed the Weather Sky templates on my home/office server (XAMPP) running under Apache and PHP v5.3.8.

Upon loading the 'index.php' template, PHP returns the following error message: 'Parse error: syntax error, unexpected '<' in O:\htdocs\weather-sky\wt_data.inc.php on line 498'. Not a very good start!  :o

Looking at the 'wt_data.inc.php' template, I noticed that from line 498 on, the single quotes are missing around the webtags - you have, for example,
Code: [Select]
$RCdew = <#RCdew>; when/where it should be
Code: [Select]
$RCdew = '<#RCdew>';
It would also be a better PHP template design if similar code appearing in each templates be moved to external individual templates - the code design of the Weather Sky templates is not really acceptable under PHP as PHP offers a lot more flexibilities than the basic HTML - the Weather Sky templates are designed as basic HTML templates.

The code for each pages should be moved as follow:
- a top template containing only the required W3C code;
- a header template containing the code needed for the display of the top and the right column of each pages;
- a footer template containing the code for the display of the bottom of each pages.

Then, each specific template would load (require) the top, header and footer templates as required.

This is how I modified (converted to PHP) both the Sunny Weather and Weather Blues...

Jacques, if you would like to keep me as a member of this forum, may I ask that you remove this very annoying verification process when sending messages (CAPTCHAT and question)...  >:(
Title: Re: Weather Sky template comments
Post by: admin on June 07, 2012, 09:51:10 AM
Hi!
 
Welcome to this new site!
 
Thanks to highlight syntax error in wt_data_inc.php!
 
As we already discussed in the past, my developments are geared for "newbies", then for me it's
important to take users from the "affraid by" attitude to the "Wow! I've done it!". Then first step
was in good old plain html and now I go a step farther by including Php insertions. By using
that technique poeple recognize the old way, but with a few new "words" inserted.
That's why I use <p><?php echo $var; ?></p> syntax
 
For register procedure, I'm sad to be in obligation to use so strict way, but I've been under
spam attack until I used it. Fighting against advertizing, sex proposal and all those spam
were a constant "hourly job" for me. I've tried many "spam buster" add-on, but with only
small improverment. Then, as strongly suggested by SMF forum users, I've turned to that way
and spam is now a past affair!
 
That is my 3rd forum. Météo St-Ours forum has closed because no other users than spammers
(it was PhpBB). Météo du Québec has never experienced any spam with PhpBB base too. Then,
for this site I wanted to try something else and has found Small Machine Forum cute and powerful.
Since I've done many hours to do a unique design to match my main site, I'm not interested
to change it.
 
Thanks for your comments/suggestions.
 
Cheers,
Jacques
Title: Re: Weather Sky template comments
Post by: nitrx on July 14, 2012, 08:00:03 AM
Well I get an error by accessing the site  ??? http://www.apeldoorn.tk/weather/ my server has php 5.x ??
Title: Re: Weather Sky template comments
Post by: nitrx on July 14, 2012, 08:06:36 AM
Hum solved it seems I had to process the data file first and upload, I want to run the template temporly where do I change the path to the graphics and realtime.txt ??
Title: Re: Weather Sky template comments
Post by: admin on July 14, 2012, 09:13:03 AM
Hi Ron,
 
For gauges images, many are in style.css and others are in gauges page
(because this page is made in "layers")
 
For the realtime.txt file, Flash gauges need it to be in same folder
as the CumulusRealtime.swf file (root of template).
 
Best regards,
Jacques
Title: Re: Weather Sky template comments
Post by: nitrx on July 14, 2012, 09:26:34 AM
Ok thanks Jaques, I will have a look, I think I can't use the realtime.txt in this case.

BTW I'm missign an image in the http://apeldoorn.tk/weather/system.php systempage ?
Title: Re: Weather Sky template comments
Post by: admin on July 14, 2012, 10:00:38 AM
Hi Ron,
 
Something seems to be bad. That light is based on Cumulus <#ErrorLight> webtag.
That one is supposed to return 0 if nothing and 1 if problems. This number append to
style/light_red in code to form filename "light_red0.gif" and "light_red1.gif" (images
available in style folder.)
 
Your page seems to send "light_red.gif" without numbers. You could check in wt_data.inc.php
to see ehat is the status of  $ErrorLight vatiable.
 
Jacques
Title: Re: Weather Sky template comments
Post by: nitrx on July 14, 2012, 10:10:36 AM
Jacques ,the errorlight gives 0 $ErrorLight = '0';
Title: Re: Weather Sky template comments
Post by: nitrx on July 14, 2012, 10:12:42 AM
BTW $sensorcontactlost = ''; is empty ....
Title: Re: Weather Sky template comments
Post by: admin on July 14, 2012, 10:30:34 AM
Hi Ron,
 
We have to correct some things here, I have same trouble with
ErrorLight... have to check this.
 
For sensorcontactlost, error could be corrected by modification of wt_data.inc.php
file on your Pc, the right one have to be "$SensorContactLost"
(I've take bad wiki page: http://wiki.sandaysoft.com/a/fr:Webtags (http://wiki.sandaysoft.com/a/fr:Webtags))
 
Jacques
Title: Re: Weather Sky template comments
Post by: nitrx on July 15, 2012, 04:14:15 AM
Ok I've changed the sensorcontactlost but the lighterror remains,  you are going to release a fixed wt_data.inc.php ?

Thanks
Title: Re: Weather Sky template comments
Post by: admin on July 15, 2012, 07:25:13 AM
Hi Ron,
 
I've corrected Weather Sky template archive.
I include in this post the official corrected file.
 
Regards,
Jacques
Title: Re: Weather Sky template comments
Post by: nitrx on July 15, 2012, 08:47:54 AM
Thanks Jacques, but for some reason it's not resolved . http://apeldoorn.tk/weather/system.php

Grtz Ron
Title: Re: Weather Sky template comments
Post by: admin on July 15, 2012, 09:16:58 AM
Hi Ron,
 
Now that the source file is corrected, we have to check your system_txt.php
at line  #32 er need to correct SensorContactLost (with its capital letters)
Line sould look like this:   
Code: [Select]
<td><img src="style/light_red<?php echo $SensorContactLost?>.png"......
Regards,
Jacques
Title: Re: Weather Sky template comments
Post by: nitrx on July 15, 2012, 09:40:00 AM
That did the job Jaques  8) Merci beaucoup,
Ron
Title: Re: Weather Sky template comments
Post by: nitrx on July 15, 2012, 09:56:03 AM
Another issue is the Solar radiation   0 W/m⊃2 I saw the sup syntax is used but it doesn't display W/m2, sorry for all the questions  ;)
Title: Re: Weather Sky template comments
Post by: admin on July 15, 2012, 10:19:38 AM
Hi Ron,
 
1st, don't be sorry! Your comments are more then welcome!!
I've launched it as Beta status, for that reason! In that case, I have no Solar
sensor... then doesn't take enough attention to it!  :-[
 
Only index_txt.php has that bug. To solve it, simply replace these words:
W/m&sup;2
by
W/m<sup>2</sup>
 
This will display superscript correctly!
 
Thank you very much for helping me to bring a "perfect" template  ;D
 
Best regards,
Jacques
Title: Re: Weather Sky template comments
Post by: nitrx on July 15, 2012, 10:43:57 AM
That fixed it (I don't have a solar sensor either). Well I inform you if I have other issues.

Good work !
Title: Re: Weather Sky template comments
Post by: nitrx on August 02, 2012, 10:48:24 AM
I've installed the release version 1.0 but get a server error I don't even understand how the update wt_data_inc.php because this file needs to be on my local computer and procesed there  :-X

http://apeldoorn.tk/weather ...
Title: Re: Weather Sky template comments
Post by: admin on August 02, 2012, 11:15:21 AM
Hi
 
This is true, as indicated, you have to move wt_data_inc.php into C:\Cumulus\web folder
after Cumulus processed it, template will work!
 
Regards,
Jacques
Title: Re: Weather Sky template comments
Post by: nitrx on August 02, 2012, 11:17:32 AM
Were do I find the latest verion of this include it's not in the zip ?
Title: Re: Weather Sky template comments
Post by: admin on August 02, 2012, 11:27:11 AM
Hi nitrix,
 
In your zip file, you'll see 2 files:
- wt_data_inc.php (the English data inclusion)
- wt_data_intl.php (International version, for accented or foreign date names)
 
Take the one for you, and process it by Cumulus.
 
IMPORTANT - You coul use both, but template search for wt_data_inc.php
(Then, if you use intl version, you have to rename it)
 
Regards,
Jacques
Title: Re: Weather Sky template comments
Post by: nitrx on August 02, 2012, 11:34:31 AM
That doesn't work too strange, the only page I can acces is manage.php ...   :-[
Title: Re: Weather Sky template comments
Post by: admin on August 02, 2012, 11:37:13 AM
Nitrix
 
Have you put the whole hunch of file and folders in your weather folder??
 
Jacques
Title: Re: Weather Sky template comments
Post by: nitrx on August 02, 2012, 11:39:26 AM
Yes I did Jaques, I've done it twice the second instance I had removed all files, because I thought there might be conflicts with some files from the beta version.

Ron
Title: Re: Weather Sky template comments
Post by: nitrx on August 02, 2012, 11:47:34 AM
Oeps solved it seems there was another unprocessed data file thanks for your patience  8)
Title: Re: Weather Sky template comments
Post by: nitrx on August 02, 2012, 11:53:36 AM
Not solved completely I see the page but no values in it

the remote data are availble ..
<?php
$version = "1.2";
if (isset($_GET['ver'])) {
  echo $version;
  exit;
}
//
// Title    : Webtags converted to PHP Variables
// Plateform: Cumulus v1.9.2
// Autor    : Jacques Desroches (weatherbyyou.com)
// Version  : 1.2 (2012-08-02)
//

// Date formatted
$pre_time ="";
$pre_date = " on ";

// Section MEASURE UNITS
$tempunit = '&deg;C';
$tempunitnodeg = 'C';
$pressunit = 'mb';
$rainunit = 'mm';
$windunit = 'm/s';
$windrununit = 'km';
$cloudbaseunit = 'm';

// Section DATE and TIME
$date = '2-8-2012';
$time = '18:49 on 02 augustus 2012';
$timehhmmss = '18:49:35';
$timeUTC  = '16:49 on 02 augustus 2012';
$day = '02';
$dayname = 'donderdag';
$shortdayname = 'do';
$month = '08';
$monthname = 'augustus';
$shortmonthname = 'aug';
$year = '2012';
$shortyear = '12';
$hour = '18';
$minute = '49';

//-- Section CURRENT CONDITIONS --
$apptemp = '18,4';
$avgtemp = '19,1';
$temp = '20,6';
$wetbulb  = '15,9';
$intemp = '23,3';
$temptrend = '-0,1';
$temptrendtext = 'Dalend';
$temptrendenglish = 'Falling';
$heatindex = '20,6';
$humidex = '23,0';
$hum = '59';
$inhum = '99';
$dew = '12,3';
$wchill = '20,6';
$rfall = '12,0';
$rrate = '0,0';
$rhour = '0,0';
$r24hour = '12,0';
$rmidnight = '12,0';
$LastRainTipISO = '2012-08-02 14:07';
$press = '1012,8';
$presstrend = 'Langzaam stijgend';
$presstrendval = '+0,3';
$presstrendenglish = 'Rising';
$altimeterpressure = '1012,8';
$wspeed = '4,2';
$wgust = '5,4';
$wlatest = '5,4';
$bearing = '235';
$avgbearing = '257';
$wdir = 'WZW';
$currentwdir = 'ZW';
$wdirdata = '280,235';
$wspddata = '280,235';
$nextwindindex = '2';
$windrun = '0';
$beaufort = 'F3';
$beaufortnumber = '3';
$beaudesc = 'matige wind';

//-- Section TODAY CONDITIONS --
$tempTH = '22,2';
$TtempTH = '15:16';
$tempTL = '16,7';
$TtempTL = '04:37';
$temprange = '5,5';
$apptempTH = '24,6';
$TapptempTH = '15:16';
$apptempTL = '17,3';
$TapptempTL = '16:35';
$heatindexTH = '23,9';
$TheatindexTH = '15:16';
$wchillTL = '16,7';
$TwchillTL = '04:37';
$dewpointTH = '19,5';
$TdewpointTH = '09:18';
$dewpointTL = '11,3';
$TdewpointTL = '16:26';
$humTH = '99';
$ThumTH = '05:19';
$humTL = '57';
$ThumTL = '16:07';
$rrateTM = '57,6';
$TrrateTM = '01:30';
$hourlyrainTH = '9,6';
$ThourlyrainTH = '01:41';
$pressTH = '1013,1';
$TpressTH = '18:34';
$pressTL = '1006,1';
$TpressTL = '00:24';
$windTM = '4,7';
$TwindTM = '12:16';
$wgustTM = '7,7';
$TwgustTM = '12:44';
$bearingTM = '10';
$Tbeaufort = 'F3';
$Tbeaufortnumber = '3';
$TwindTM = '12:16';
$domwindbearing = '266';
$domwinddir = 'W';

//-- Section YESTERDAY CONDITIONS --
$tempYH = '27,4';
$TtempYH = '17:39';
$tempYL = '12,4';
$TtempYL = '06:13';
$temprangeY = '15,0';
$apptempYH = '27,2';
$TapptempYH = '19:44';
$apptempYL = '12,8';
$TapptempYL = '06:36';
$heatindexYH = '27,3';
$TheatindexYH = '17:39';
$wchillYL = '12,4';
$TwchillYL = '06:13';
$heatdegdaysY = '1,7';
$cooldegdaysY = '3,8';
$dewpointYH = '18,3';
$TdewpointYH = '09:58';
$dewpointYL = '10,6';
$TdewpointYL = '16:21';
$humYH = '99';
$ThumYH = '06:48';
$humYL = '38';
$ThumYL = '16:07';
$rfallY = '0,0';
$rrateYM = '0,0';
$TrrateYM = '00:

andso-on confused, I try later it's dinner time too late almost  :)
Title: Re: Weather Sky template comments
Post by: admin on August 02, 2012, 11:57:24 AM
Hi Ron,
 
All data is there, we see dates and others. That file is supposed to be send on your website.
In Cumulus\web there supposed to be there a version to process, like this
 
// Date formatted
$to = utf8_encode("to ");  // Ex: to 20 may
$pre_time = utf8_encode("at ");  // Ex: at 10:45
$pre_date = utf8_encode(" on ");  // Ex:  on 25 may
$only_date = utf8_encode("On ");  // Ex: On 25 may
// Section  MEASURE UNITS
$tempunit = '<#tempunit>';
$tempunitnodeg = '<#tempunitnodeg>';
$pressunit = '<#pressunit>';
$rainunit = '<#rainunit>';
$windunit = '<#windunit>';
$windrununit = '<#windrununit>';
$cloudbaseunit = '<#cloudbaseunit>';

Take the original file in your zip file!
 
Jacques
Title: Re: Weather Sky template comments
Post by: nitrx on August 02, 2012, 11:59:36 AM
Thats a copy of my remote site Jacques
Title: Re: Weather Sky template comments
Post by: admin on August 02, 2012, 12:04:25 PM
Ron,
 
There is no error displayed?
 
File is exactly that name: wt_data_inc.php ?
 
Jacques
EDIT: When i sniff your site, I see it inclomplete, no include folder or lang folder!!!
Title: Re: Weather Sky template comments
Post by: nitrx on August 03, 2012, 01:50:19 AM
Oeps wt_data_inc.php was wt_data.inc.php in my case changed it and it works thanks Jacques, (the lang en include maps were and are availble) I think it's better to put a dummy index.html in some maps.

Ron
Title: Re: Weather Sky template comments
Post by: [David] on August 21, 2012, 05:52:53 PM
Hey you guys, I`m new to php and I need an help ... I found this issue and I cannot do anything to manage my Weather Sky page :( I can`t see any language in the list

And I cannot manage anything due to this error message

Can you help me?

(http://s10.postimage.org/7ddqfumzt/Error.jpg)
Title: Re: Weather Sky template comments
Post by: PeterP on October 14, 2012, 12:12:12 AM
If it helps I also actually have a similar message on my /manage.php screen.

There are no local comparison files to view and compare

Peter

Title: Re: Weather Sky template comments
Post by: Mr.Meteo on October 14, 2012, 07:10:40 AM
Hi Peter,

First, file wr_data_intl.php file is intended to be used in other then English site.
Then, because you're not using it, it cause error messsage, to solve this, just erase
this file from your website and things will be better!

Problem is because file contain non processed wentags (eg. <#temp>), if you want to keep it
in website to be sure to have all newest files in your Template Manager Module, simply tell Cumulus
to process it at least once.

Rehards,
Jacques