Author Topic: Weather Sky template comments  (Read 11888 times)

gemini06720

  • Guest
Weather Sky template comments
« 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)...  >:(
« Last Edit: June 08, 2012, 04:09:16 PM by admin »

Offline admin

  • Your Weather master
  • Administrator
  • Full Member
  • *****
  • Posts: 50
Re: Weather Sky template comments
« Reply #1 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
« Last Edit: June 08, 2012, 04:08:52 PM by admin »

Offline nitrx

  • Jr. Member
  • **
  • Posts: 20
    • Apeldoorn Weer NL
Re: Weather Sky template comments
« Reply #2 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 ??

Offline nitrx

  • Jr. Member
  • **
  • Posts: 20
    • Apeldoorn Weer NL
Re: Weather Sky template comments
« Reply #3 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 ??

Offline admin

  • Your Weather master
  • Administrator
  • Full Member
  • *****
  • Posts: 50
Re: Weather Sky template comments
« Reply #4 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

Offline nitrx

  • Jr. Member
  • **
  • Posts: 20
    • Apeldoorn Weer NL
Re: Weather Sky template comments
« Reply #5 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 ?
« Last Edit: July 14, 2012, 09:29:07 AM by nitrx »

Offline admin

  • Your Weather master
  • Administrator
  • Full Member
  • *****
  • Posts: 50
Re: Weather Sky template comments
« Reply #6 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

Offline nitrx

  • Jr. Member
  • **
  • Posts: 20
    • Apeldoorn Weer NL
Re: Weather Sky template comments
« Reply #7 on: July 14, 2012, 10:10:36 AM »
Jacques ,the errorlight gives 0 $ErrorLight = '0';

Offline nitrx

  • Jr. Member
  • **
  • Posts: 20
    • Apeldoorn Weer NL
Re: Weather Sky template comments
« Reply #8 on: July 14, 2012, 10:12:42 AM »
BTW $sensorcontactlost = ''; is empty ....

Offline admin

  • Your Weather master
  • Administrator
  • Full Member
  • *****
  • Posts: 50
Re: Weather Sky template comments
« Reply #9 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)
 
Jacques
« Last Edit: July 14, 2012, 10:34:41 AM by admin »

Offline nitrx

  • Jr. Member
  • **
  • Posts: 20
    • Apeldoorn Weer NL
Re: Weather Sky template comments
« Reply #10 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

Offline admin

  • Your Weather master
  • Administrator
  • Full Member
  • *****
  • Posts: 50
Re: Weather Sky template comments
« Reply #11 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
« Last Edit: July 15, 2012, 07:34:43 AM by admin »

Offline nitrx

  • Jr. Member
  • **
  • Posts: 20
    • Apeldoorn Weer NL
Re: Weather Sky template comments
« Reply #12 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

Offline admin

  • Your Weather master
  • Administrator
  • Full Member
  • *****
  • Posts: 50
Re: Weather Sky template comments
« Reply #13 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

Offline nitrx

  • Jr. Member
  • **
  • Posts: 20
    • Apeldoorn Weer NL
Re: Weather Sky template comments
« Reply #14 on: July 15, 2012, 09:40:00 AM »
That did the job Jaques  8) Merci beaucoup,
Ron