Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

A few brave testers wanted please

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

A few brave testers wanted please

Post by beteljuice » Sun 11 Nov 2018 3:05 am

About time we added some new content to the 'new' forum ;)

The betejuice has been playing with the 'little day night chart' and the banner style one.

To create a mouse-over 'pop-up' with legend. The only way to demonstrate is within a page, so .....
Here's a demo on a dummy site, but I've made so that you can customise to your own requirements and download all the necessary / modified files :shock:

This is all done on-the-fly and What You See could well be NOT What You Get !!! - there may be all sorts of errors / missing information - that's why I need brave testers who can tell me what's gone wrong :bash:

HAVE A PLAY
Image
......................Imagine, what you will KNOW tomorrow !

RayProudfoot
Posts: 2632
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: A few brave testers wanted please

Post by RayProudfoot » Sun 11 Nov 2018 10:00 am

Greetings Beteljuice,

I remember this day/night graphic from years ago but despite repeated requests the originator of it couldn't enhance it. I have it running on my website home page but it doesn't feature the popup when you hover over it.

I'd love to have your enhanced version. I've had a quick play on your test page and it looks good. Downloading now.
Cheers,
Ray, Cheshire.

Image

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: A few brave testers wanted please

Post by beteljuice » Sun 11 Nov 2018 12:06 pm

Error found already !

... Which of course only happens on the 11th of the month.

@ Ray and anyone else who has already downloaded customised files ...

sun_banner.php
approx. line #85 change to:

Code: Select all

$lang_day_suffix= array("1" => "st.", "2" => "nd.", "3" => "rd.", "4" => "th.", "5" => "th.", "6" => "th.",
                        "7" => "th.", "8" => "th.", "9" => "th.", "0" => "th.", "11" => "th.");
(edited to include '.')

and approx. line #275
change

Code: Select all

if(strlen($suff) == 2 ) $suff = substr($suff, -1);
to:

Code: Select all

if(strlen($suff) == 2 && $suff != "11") $suff = substr($suff, -1);
It wouldn't be any fun without the gremlins !
Last edited by beteljuice on Sun 11 Nov 2018 2:07 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !

freddie
Posts: 329
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux (Ubuntu 18.04)
Location: Ystrad, Rhondda, Wales
Contact:

Re: A few brave testers wanted please

Post by freddie » Sun 11 Nov 2018 12:18 pm

beteljuice wrote:
Sun 11 Nov 2018 12:06 pm

Code: Select all

$lang_day_suffix= array("1" => "st.", "2" => "nd.", "3" => "rd.", "4" => "th.", "5" => "th.", "6" => "th.",
                        "7" => "th.", "8" => "th.", "9" => "th.", "0" => "th.", "11" => "th");
Don't know if it matters, but all your values in the above array end in "." except for the one you just put in for the 11th....
Freddie
Image

User avatar
grwkak
Posts: 85
Joined: Fri 28 Jun 2013 12:32 am
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Hambden, Ohio US
Contact:

Re: A few brave testers wanted please

Post by grwkak » Sun 11 Nov 2018 12:32 pm

How do you download the files? There is a zip icon - but its greyed out.

Guy

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: A few brave testers wanted please

Post by beteljuice » Sun 11 Nov 2018 12:46 pm

@ freddie - thank you, I'll change it later

@guy
.. There is a zip icon - but its greyed out.
... because you haven't updated the location name of the banner :D

These things keep the beteljuice up at night :lol:
Image
......................Imagine, what you will KNOW tomorrow !

RayProudfoot
Posts: 2632
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: A few brave testers wanted please

Post by RayProudfoot » Sun 11 Nov 2018 12:55 pm

It’s going to be tomorrow before I can test, sorry. Amendment to code noted.
Cheers,
Ray, Cheshire.

Image

User avatar
grwkak
Posts: 85
Joined: Fri 28 Jun 2013 12:32 am
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Hambden, Ohio US
Contact:

Re: A few brave testers wanted please

Post by grwkak » Sun 11 Nov 2018 1:19 pm

Got it - downloaded now.

Guy

water01
Posts: 1486
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Somewhere in the USA
Contact:

Re: A few brave testers wanted please

Post by water01 » Sun 11 Nov 2018 2:05 pm

Don't know if it is just me but the pop-up on your test site appears in Firefox but not in IE11?

User avatar
PaulMy
Posts: 1730
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: A few brave testers wanted please

Post by PaulMy » Sun 11 Nov 2018 6:34 pm

I am testing, and getting a couple of errors logged on www.komokaweather.com/weather The script is located in www.komokaweather.com/astronomy/
[11-Nov-2018 13:22:28 America/Toronto] PHP Notice: Undefined variable: legendfullHeight in /home/psoykkrhjuz3/public_html/astronomy/sun_banner.php on line 409
[11-Nov-2018 13:22:28 America/Toronto] PHP Notice: Undefined variable: tickcolor in /home/psoykkrhjuz3/public_html/astronomy/sun_banner.php on line 826
May need to do some tweaking on lat/lon to get the Sunrise, Sunset and Dawn times to exactly match the Cumulus calculation :shock:

Also still trying to figure out how to use and make sun_button.php work :oops:

Enjoy,
Paul

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: A few brave testers wanted please

Post by beteljuice » Sun 11 Nov 2018 10:37 pm

@ paulmy

You have:

Code: Select all

<!-- betlejuice sun script -->
	<td>
             <span style="width: 400px; height: 200px; margin: 5px; border:0">
	           <img src="../astronomy/sun_banner.php" alt="sun hours" width="400" height="200" ></img><br /><br />
             </span>
        </td>
<!-- end betlejuice sun script -->
So ... there is nothing to "work".
All you have asked for is the 'banner' which you have put in your own <span> </span>

If you want a 'button' and a pop-up 'banner', then you need to look at the help.txt file !!!!!

Put html <div id=" beteljuice_stuff" in your <td> </td>

Code: Select all

<td>

   <div id = "beteljuice_stuff">
      <img src = "sun_button.php" id = 'sun'>
      <div id = "sun_pop" class = " sun_pop_out off ">
        <img src = "sun_banner.php" id = 'popup'>
      </div>
   </div> <!-- end beteljuice_stuff -->
   
</td>
Then you need to put the <style> ...... </style> above that or better in the <head> </head> section.
If you want the optional image upadater ... guess what .. copy <script> .... </script> to either the bottom of your page or put it in the <head> </head> section ;)

@ water01
Don't know if it is just me but the pop-up on your test site appears in Firefox but not in IE11?
This could be very, very, serious !
That would seem to suggest it is ignoring either some of the css changing / switching in the DEMO construct or even worse ignoring what should be some 'trouble free' css / jscript transition code.

Sending you a PM .....
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
Mapantz
Posts: 525
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64 - A beast.
Location: Wareham, Dorset - UK
Contact:

Re: A few brave testers wanted please

Post by Mapantz » Sun 11 Nov 2018 11:06 pm

Hi beteljuice

Nice work!

I didn't need 'px' for the height and width, just the number.

I have added it to my site successfully, I just have an issue with the popup image affecting stuff below it

See here: https://warehamwx.co.uk/

Edit:
Forget that, I had an error in the css. :oops:

All working!
Image
Image

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: A few brave testers wanted please

Post by beteljuice » Sun 11 Nov 2018 11:27 pm

@ user from Belfast

You have the wrong TZ set in your sun_pop.php and sun_banner.php !

Edit to Europe/Belfast OR using the DEMO page type in bel
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: A few brave testers wanted please

Post by beteljuice » Sun 11 Nov 2018 11:32 pm

You are an odd bunch !!!

There are lots of you either changing the location, but not lat / lon / TZone, or changing those but not the location !

Why ? - Is the Zip icon so captivating that you must click when it becomes active ?

:?
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: A few brave testers wanted please

Post by beteljuice » Mon 12 Nov 2018 1:33 am

@ paul
[11-Nov-2018 13:22:28 America/Toronto] PHP Notice: Undefined variable: legendfullHeight in /home/psoykkrhjuz3/public_html/astronomy/sun_banner.php on line 409
[11-Nov-2018 13:22:28 America/Toronto] PHP Notice: Undefined variable: tickcolor in /home/psoykkrhjuz3/public_html/astronomy/sun_banner.php on line 826
Both 'legacy' errors ...

legendfullHeight was PHP7 bug, (difficuly one to find where to correct it !)
tickcolor - was a genuine coding error from original.

Both now fixed - thank you
Image
......................Imagine, what you will KNOW tomorrow !

Post Reply