Author Topic: Alternative Dashboard version 6.95 Released  (Read 85853 times)

0 Members and 1 Guest are viewing this topic.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard version 6.94 Released
« Reply #475 on: October 09, 2015, 11:13:58 AM »
The file seems to have fubared my site????

Mark
Do not reference 'texttags.txt' anywhere on your site!  It's only a template for use on your PC by WD.

All I did was unzip the update from Brian.  And extracted testtag.txt, dropped it into the webfiles folder.  Everything looked good for a minute or two.  Then nothing?

Mark

And this is the reason I do not mess with the website. :(
I see your site is back up.  Good.  The issue with 'September/0/2015' remains.  Did you try my suggestion about 'AltAjaxDashboardConfig6.php' above?  You do have a 'test site' with an Apache server on your PC where you can test your changes without bollixing your web site, right?  Something like WAMP or XAMPP?
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline night

  • Senior Contributor
  • ****
  • Posts: 156
Re: Alternative Dashboard version 6.94 Released
« Reply #476 on: October 09, 2015, 02:11:56 PM »
No test site.
I can't believe that Scott knowing there is a problem with his mods.  Wouldn't correct it.  It has to be something with my site.  I think I'll let it go until tomorrow.  And let WD do it's midnight updates.  And see if what I have done fixes it.

Thanks for sticking by me.
Mark

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard version 6.94 Released
« Reply #477 on: October 09, 2015, 02:25:15 PM »
No test site.
...
Thanks for sticking by me.
Mark
I learned the hard way that making new script changes only on my web site is like walking a high wire without a net.  One slip, and you grab the wire and hope you can get back up.  Until then, the performance is on hold.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline night

  • Senior Contributor
  • ****
  • Posts: 156
Re: Alternative Dashboard version 6.94 Released
« Reply #478 on: October 09, 2015, 03:11:58 PM »
The old file is what's running now.  The new file is what is in the new dashboard archive.  If I drop the new file into the web folder.  I don't have a website.  Just a blank page.

Any ideas on this wrinkle?

Mark

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Alternative Dashboard version 6.94 Released
« Reply #479 on: October 09, 2015, 06:10:23 PM »
Another possibility without your own server setup (easily handled by things like MAMP or WAMP, as has been mentioned) is to make duplicate copies of the files involved and rename them; e.g., index2.php, ajax-dashboard6-2.php, etc.). This way your working site is not touched and keeps functioning for your visitors, and all the messing around - err, testing is done on the dups, which do not appear on your site except to you (because you know the 'secret' file names).
John
W7JKG

Offline BurnsvilleWeather

  • Burnsville, MN USA
  • Forecaster
  • *****
  • Posts: 863
  • Retired from Weather!
Re: Alternative Dashboard version 6.94 Released
« Reply #480 on: October 11, 2015, 01:16:37 PM »
What is wrong with the code?  I will fix any errors but you really don't tell me what the error is!

Scott


No test site.
I can't believe that Scott knowing there is a problem with his mods.  Wouldn't correct it.  It has to be something with my site.  I think I'll let it go until tomorrow.  And let WD do it's midnight updates.  And see if what I have done fixes it.

Thanks for sticking by me.
Mark
www.BurnsvilleWeatherLIVE.com (Formally Webster Weather LIVE)
Home of the Alternative Dashboard and Mobile Dashboard Scripts. Weather Display Scripts and Graphics


Davis VP2 with, UV, Solar, Leaf, Web Cam.

Offline night

  • Senior Contributor
  • ****
  • Posts: 156
Re: Alternative Dashboard version 6.94 Released
« Reply #481 on: October 11, 2015, 06:51:55 PM »
What is wrong with the code?  I will fix any errors but you really don't tell me what the error is!

Scott


No test site.
I can't believe that Scott knowing there is a problem with his mods.  Wouldn't correct it.  It has to be something with my site.  I think I'll let it go until tomorrow.  And let WD do it's midnight updates.  And see if what I have done fixes it.

Thanks for sticking by me.
Mark

It has to be my site not Scott's Mod

Mark

Just so there's no confusion.

Offline BurnsvilleWeather

  • Burnsville, MN USA
  • Forecaster
  • *****
  • Posts: 863
  • Retired from Weather!
Re: Alternative Dashboard version 6.94 Released
« Reply #482 on: October 12, 2015, 07:13:18 PM »
Ok, Open mouth insert foot!  I even read it twice!  Sorry about that Mark!  Didn't  see that you wrote not the code!  It was a hard weekend! 

Scott  ](*,)  :oops:

What is wrong with the code?  I will fix any errors but you really don't tell me what the error is!

Scott


No test site.
I can't believe that Scott knowing there is a problem with his mods.  Wouldn't correct it.  It has to be something with my site.  I think I'll let it go until tomorrow.  And let WD do it's midnight updates.  And see if what I have done fixes it.

Thanks for sticking by me.
Mark
www.BurnsvilleWeatherLIVE.com (Formally Webster Weather LIVE)
Home of the Alternative Dashboard and Mobile Dashboard Scripts. Weather Display Scripts and Graphics


Davis VP2 with, UV, Solar, Leaf, Web Cam.

Offline night

  • Senior Contributor
  • ****
  • Posts: 156
Re: Alternative Dashboard version 6.94 Released
« Reply #483 on: October 12, 2015, 07:38:04 PM »
I must be a pain to write code and then have people complain about it.  I can see where you would have a knee jerk reaction.  Personally I never look a gift horse in the mouth.  I appreciate all the hard work you put into these endeavors.

Mark

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Alternative Dashboard version 6.94 Released
« Reply #484 on: October 12, 2015, 08:12:20 PM »
Mark,

Know how you feel about this, but care to try a small exercise in coding? Looked back in the topic but didn't see this being suggested.

* Make a copy of your index.php file. This will be a fall-back 'just in case'.
* Your current index.php should start out something like this...

Code: [Select]
<?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (WD-USA template set)
############################################################################
#
#   Project:    Sample Included Website Design
#   Module:     sample.php
#   Purpose:    Sample Page
#   Authors:    Kevin W. Reed <kreed@tnet.com>
#               TNET Services, Inc.
#
Copyright: (c) 1992-2007 Copyright TNET Services, Inc.
etc. Down from that about 10 or so more lines you should see this...

Code: [Select]
############################################################################
# This document uses Tab 4 Settings
############################################################################
require_once("Settings.php");
require_once("common2.php");
etc.

* Copy the following code...
Code: [Select]
//--self downloader --
if (isset($_REQUEST['sce']) && ( strtolower($_REQUEST['sce']) == 'view' or
    strtolower($_REQUEST['sce']) == 'show') ) {
   $filenameReal = __FILE__;
   $download_size = filesize($filenameReal);
   header('Pragma: public');
   header('Cache-Control: private');
   header('Cache-Control: no-cache, must-revalidate');
   header("Content-type: text/plain");
   header("Accept-Ranges: bytes");
   header("Content-Length: $download_size");
   header('Connection: close');

   readfile($filenameReal);
   exit;
}
//----------------------------------------------------------------------------\\

...and insert it just before the...

Code: [Select]
require_once("Settings.php");
* What you should wind up with is this (in context)...
Code: [Select]
############################################################################
# This document uses Tab 4 Settings
############################################################################
//--self downloader --
if (isset($_REQUEST['sce']) && ( strtolower($_REQUEST['sce']) == 'view' or
    strtolower($_REQUEST['sce']) == 'show') ) {
   $filenameReal = __FILE__;
   $download_size = filesize($filenameReal);
   header('Pragma: public');
   header('Cache-Control: private');
   header('Cache-Control: no-cache, must-revalidate');
   header("Content-type: text/plain");
   header("Accept-Ranges: bytes");
   header("Content-Length: $download_size");
   header('Connection: close');

   readfile($filenameReal);
   exit;
}
//----------------------------------------------------------------------------\\
require_once("Settings.php");
require_once("common2.php");
etc.

Save it and run that page. You should see NO changes at all on the page.

However, this code will let the folks here see the actual code on your index.php page, thereby hopefully making it easier to find the problem. Visitors to your site will not even know it's there.
John
W7JKG

Offline night

  • Senior Contributor
  • ****
  • Posts: 156
Re: Alternative Dashboard version 6.94 Released
« Reply #485 on: October 12, 2015, 08:33:02 PM »
Done

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Alternative Dashboard version 6.94 Released
« Reply #486 on: October 12, 2015, 10:06:19 PM »
Now to find your URL. May I politely suggest you put in your sig, or at least add it to your messages?

I will take a look at your code later tonight.
John
W7JKG

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Alternative Dashboard version 6.94 Released
« Reply #487 on: October 12, 2015, 10:27:22 PM »
Your code is different from what I usually see. Please add the code above to the following files, just as you did to your index.php, with a slight change...

Settings.php
ajax-dashboard6.php

These files have a different format than the index file, so you can add the code starting on line 2, right after the <?php item in line 1; i.e...

Code: [Select]
<?php
//--self downloader --
if (isset($_REQUEST['sce']) && ( strtolower($_REQUEST['sce']) == 'view' or
    
strtolower($_REQUEST['sce']) == 'show') ) {
   
$filenameReal __FILE__;
   
$download_size filesize($filenameReal);
   
header('Pragma: public');
   
header('Cache-Control: private');
   
header('Cache-Control: no-cache, must-revalidate');
   
header("Content-type: text/plain");
   
header("Accept-Ranges: bytes");
   
header("Content-Length: $download_size");
   
header('Connection: close');

   
readfile($filenameReal);
   exit;
}
//----------------------------------------------------------------------------\\

You will probably need to insert a return after the last line (the long dotted line).
John
W7JKG

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard version 6.94 Released
« Reply #488 on: October 13, 2015, 12:22:29 AM »
Your code is different from what I usually see. Please add the code above to the following files, just as you did to your index.php, with a slight change...

Settings.php
ajax-dashboard6.php

These files have a different format than the index file, so you can add the code starting on line 2, right after the <?php item in line 1; i.e...

Code: [Select]
<?php
//--self downloader --
if (isset($_REQUEST['sce']) && ( strtolower($_REQUEST['sce']) == 'view' or
    
strtolower($_REQUEST['sce']) == 'show') ) {
   
$filenameReal __FILE__;
   
$download_size filesize($filenameReal);
   
header('Pragma: public');
   
header('Cache-Control: private');
   
header('Cache-Control: no-cache, must-revalidate');
   
header("Content-type: text/plain");
   
header("Accept-Ranges: bytes");
   
header("Content-Length: $download_size");
   
header('Connection: close');

   
readfile($filenameReal);
   exit;
}
//----------------------------------------------------------------------------\\

You will probably need to insert a return after the last line (the long dotted line).
I would recommend also adding this snippet to 'AltAjaxDashboardConfig6.php' in order to give a complete picture of your web site's desktop setup.  Thanks for suggesting this, John.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard version 6.94 Released
« Reply #489 on: October 13, 2015, 12:26:31 AM »
Now to find your URL. May I politely suggest you put in your sig, or at least add it to your messages?

I will take a look at your code later tonight.
Gotcha on this one, John!  :-P Click on the green ball beneath night's name to the left and you'll go to his site.  Only a few members don't link their sites like this, and it can be frustrating when they don't do so and then ask questions.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Alternative Dashboard version 6.94 Released
« Reply #490 on: October 13, 2015, 01:46:52 AM »
I would recommend also adding this snippet to 'AltAjaxDashboardConfig6.php' in order to give a complete picture of your web site's desktop setup.  Thanks for suggesting this, John.

You are correct of course, Jerry. Forgot (but using the same excuse you and I have chatted about)...  :roll:
John
W7JKG

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Alternative Dashboard version 6.94 Released
« Reply #491 on: October 13, 2015, 01:48:54 AM »
Gotcha on this one, John!  :-P Click on the green ball beneath night's name to the left and you'll go to his site.  Only a few members don't link their sites like this, and it can be frustrating when they don't do so and then ask questions.
Ahh - payback for all my picking on you.   ;)

Thanks for the info - did not know that.
John
W7JKG

Offline vinesweather

  • Senior Contributor
  • ****
  • Posts: 293
    • The Vines Weather
Re: Alternative Dashboard version 6.94 Released
« Reply #492 on: October 13, 2015, 10:13:45 AM »
Hi All
Excuse my ignorance, but from what I have read so far this only affects the USA? Is that correct?

Many thanks
Chris

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard version 6.94 Released
« Reply #493 on: October 13, 2015, 10:23:37 AM »
Hi All
Excuse my ignorance, but from what I have read so far this only affects the USA? Is that correct?

Many thanks
Chris
It affects the ajax-dashboard6 in 'narrow' mode.  You're in 'wide' mode exclusively, and your dashboard 'Almanac' is showing dates in the correct format, which means you wouldn't have the problem in 'narrow' mode.  The extra width in Mark's dashboard occurs because his Almanac's date formatting uses full month names rather than short month names.

On another note, do you mean to not have your 'Donate' text match the rest of your dashboard's CSS, Chris?
« Last Edit: October 13, 2015, 10:26:45 AM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard version 6.94 Released
« Reply #494 on: October 13, 2015, 01:50:51 PM »
Mark, I've modified quite a few things in your dashboard.  Firstly, I've found that using 'style="width:180"' isn't reliable.  All pixel dimensions should include 'px' after them in CSS styles, so I've added 'px' to 16 such entries, one being 'style="width:23"' that should have been 'style="width:230px"'.

More significantly, I changed some text dimensions to match mine and therefore be less likely to have the dashboard overflow to the right.  But most significantly I changed the 'rdate()' call to:
Code: [Select]
                    <?php echo rdate($RecDateF, (split_to_mon(2ltrim($fullmoondate))), (split_to_day(2ltrim($fullmoondate))), (split_to_year(ltrim($fullmoondate)))) ?>
from
Code: [Select]
                    <?php echo rdate($RecDateF, (split_to_mon(1ltrim($fullmoondate))), (split_to_day(1ltrim($fullmoondate))), (split_to_year(ltrim($fullmoondate)))) ?>
A similar change was made for the Next New Moon 'rdate()' call.

I found small differences between my 'Base-USA' derived 'Settings.php' and your 'Base-International' derived 'Settings.php' that Scott is distributing.  My first use of the dashboard was with the original Saratoga-template 'Base-USA' dashboard, and I'm not sure how significant these differences are.  I didn't change much there.

In your 'AltAjaxDeashboardConfig6.php' I did change your '$RecDateF      = '7';' to '$RecDateF      = '2';' and your '$ShortDateF    = '5';' to '$ShortDateF    = '6';' to throw some text into the dates which makes them easier to decipher.  I also changed '$SStartUpDay' to an actual day instead of just a year and a month.

In all, I think the most significant changes were to the 'rdate()' calls to display the 'Full Moon' and 'New Moon' dates.  Your dashboard contained Scott's code, but I think that somewhere along the way between WD versions Brian may have modified the format of these two variables in 'testtags.txt' and therefore 'testtags.php'.  I remember fighting with this not too long ago, and my solution is as above.

I wouldn't try any of these modified scripts without first backing up your current scripts!  That they might not work as intended almost goes without saying. :-) If you find something newly amiss in your dashboard, please let me know immediately because it's almost certainly my fault and not Scott's.

Edit:  I just checked, and Scott is still on WD b80, so he would not have encountered any recent 'testtags.php' differences.  Another change I made to 'AltAjaxDashboardConfig6.php' was to add code to detect if your site actually is configured to display Historical Month-to-Date precipitation averages by checking for 'raintodate.php'.  If it isn't there the code will revert to '$use_historical = false'.
« Last Edit: October 13, 2015, 02:00:36 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline night

  • Senior Contributor
  • ****
  • Posts: 156
Re: Alternative Dashboard version 6.94 Released
« Reply #495 on: October 13, 2015, 01:57:47 PM »
Have you run these changes past Scott?

Mark

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard version 6.94 Released
« Reply #496 on: October 13, 2015, 02:03:22 PM »
Have you run these changes past Scott?

Mark
These changes are mine and yours, Mark, not Scott's.  He understands that people will need to customize his code.  That's how it grows and changes.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline night

  • Senior Contributor
  • ****
  • Posts: 156
Re: Alternative Dashboard version 6.94 Released
« Reply #497 on: October 13, 2015, 06:04:32 PM »
I placed your files into the website.  It looks like the alignment problem is fixed.

Now why when I place the new testtags into WD's webfiles folder.  All I get is a white screen.

Thank you Jerry
Mark

Offline BurnsvilleWeather

  • Burnsville, MN USA
  • Forecaster
  • *****
  • Posts: 863
  • Retired from Weather!
Re: Alternative Dashboard version 6.94 Released
« Reply #498 on: October 13, 2015, 07:02:56 PM »
NOTE:  I've incorporated several of the changes you mentioned into the 6.94 revision (now dated 13-OCT-2015) and is in the archive available for download.  Thanks for pointing out some of the format errors and best practices!

And Yes, everyone is free to modify and make changes.  If they are good/useful/or otherwise good for everyone, I'm happy to add them to the next version for others.  Jerry and many others are great contributors to the 6.8x version and I thank them!

I have not updated to the Latest new version of Weather Display because of it's beta status.  When it is released I'll update the script with a new version for that release.

Scott

Have you run these changes past Scott?

Mark
These changes are mine and yours, Mark, not Scott's.  He understands that people will need to customize his code.  That's how it grows and changes.
« Last Edit: October 13, 2015, 08:24:19 PM by BurnsvilleWeather »
www.BurnsvilleWeatherLIVE.com (Formally Webster Weather LIVE)
Home of the Alternative Dashboard and Mobile Dashboard Scripts. Weather Display Scripts and Graphics


Davis VP2 with, UV, Solar, Leaf, Web Cam.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard version 6.94 Released
« Reply #499 on: October 13, 2015, 07:56:47 PM »
NOTE:  I've incorporated several of the changes you mentioned into the 6.84 revision (now dated 13-OCT-2015) and is in the archive available for download.  Thanks for pointing out some of the format errors and best practices!
Picky me, again.  You mean 6.94 above and below, right?
Quote
And Yes, everyone is free to modify and make changes.  If they are good/useful/or otherwise good for everyone, I'm happy to add them to the next version for others.  Jerry and many others are great contributors to the 6.8x version and I thank them!
Thanks for confirming this for those who might be new to our processes, Scott.
Quote
I have not updated to the Latest new version of Weather Display because of it's beta status.  When it is released I'll update the script with a new version for that release.

Scott
Brian has declared the latest versions of WD as 'production' and no longer in beta.  The last beta was I think b287.
Quote
Have you run these changes past Scott?

Mark
These changes are mine and yours, Mark, not Scott's.  He understands that people will need to customize his code.  That's how it grows and changes.
Good to be hearing from you again these days, Scott! =D&gt; =D&gt;
Regards, Jerry Wilkins
gwwilk@gmail.com