Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Trend Arrow
Moderator: daj
-
- Posts: 62
- Joined: Wed 30 Dec 2009 11:31 pm
- Weather Station: Davis VP2
- Operating System: Windows XP, Mac OSX
- Location: Western Massachusetts, USA
- Contact:
Trend Arrow
I've seen a few websites from people on here that have an arrow to show the temperature trend. What is required to make that work? I assume it's a script that reads the cumulus webtag and calls the appropriate image?
-
- Posts: 17
- Joined: Thu 28 Jan 2010 7:53 pm
- Weather Station: W-8681 (WH-1080)
- Operating System: Windows 7
- Location: Carnkie, Helston, Cornwall
- Contact:
Re: Trend Arrow
Here is the one I use on mine which I coded myself:
Hope this is useful.
Mark
Code: Select all
$temp_trend="<#temptrendtext>";
if($temp_trend == 'Rising'){$temp_arrow = 'trendup.gif';}
elseif($temp_trend == 'Falling'){$temp_arrow = 'trenddwn.gif';}
else {$temp_arrow = 'steady.gif';}
echo"<b>$temp °C </b><img src='images/$temp_arrow'>";
Mark
Carnkie Weather Station & Webcam: http://carnkieweather.co.uk
Live from Carnkie, Nr Helston, Cornwall.
Live from Carnkie, Nr Helston, Cornwall.
-
- Posts: 62
- Joined: Wed 30 Dec 2009 11:31 pm
- Weather Station: Davis VP2
- Operating System: Windows XP, Mac OSX
- Location: Western Massachusetts, USA
- Contact:
Re: Trend Arrow
Thank you! How would I set this up though? Would I paste the code in a new PHP document?
Re: Trend Arrow
If you are using webtags, wouldn't the values be in variables already?
So that <#temptrendtext> would actually be in $temptrendtxt ?
Something like:
So that <#temptrendtext> would actually be in $temptrendtxt ?
Something like:
Code: Select all
echo '<b>' . $temp . ' ' . $tempunits . '</b> ';
if ($temptrendtext == 'Rising') echo '<img src="images/trendup.gif"/>';
if ($temptrendtext == 'Falling') echo '<img src="images/trenddwn.gif"/>';
-
- Posts: 62
- Joined: Wed 30 Dec 2009 11:31 pm
- Weather Station: Davis VP2
- Operating System: Windows XP, Mac OSX
- Location: Western Massachusetts, USA
- Contact:
Re: Trend Arrow
I ended up figuring it out. Thank you for sharing the script.
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Trend Arrow
Oops ... IE8
You do not have the required permissions to view the files attached to this post.
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 62
- Joined: Wed 30 Dec 2009 11:31 pm
- Weather Station: Davis VP2
- Operating System: Windows XP, Mac OSX
- Location: Western Massachusetts, USA
- Contact:
Re: Trend Arrow
Yikes! I'm using Firefox as my browser. So I guess anyone using IE8 will have an issue viewing my page?
-
- Posts: 17
- Joined: Thu 28 Jan 2010 7:53 pm
- Weather Station: W-8681 (WH-1080)
- Operating System: Windows 7
- Location: Carnkie, Helston, Cornwall
- Contact:
Re: Trend Arrow
I'm using Opera, but just loaded your site in IE8, and get the same thing happen.
Carnkie Weather Station & Webcam: http://carnkieweather.co.uk
Live from Carnkie, Nr Helston, Cornwall.
Live from Carnkie, Nr Helston, Cornwall.
Re: Trend Arrow
I haven't played with these before as I don't normally have issues between browsers (except ancient ie 6 which I don't support any longer).
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
This forces IE 8 to use the !DOCTYPE declaration in the page to determine the rendering mode.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
This forces IE 8 to use the !DOCTYPE declaration in the page to determine the rendering mode.
Seem they do the same thing. The latter seems redundant since that is what IE8 is supposed to do by default.
don't recall seeing a site have both but that may not be the issue.
Looks like IE8 is confused on your font-sizes....
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
This forces IE 8 to use the !DOCTYPE declaration in the page to determine the rendering mode.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
This forces IE 8 to use the !DOCTYPE declaration in the page to determine the rendering mode.
Seem they do the same thing. The latter seems redundant since that is what IE8 is supposed to do by default.
don't recall seeing a site have both but that may not be the issue.
Looks like IE8 is confused on your font-sizes....
-
- Posts: 62
- Joined: Wed 30 Dec 2009 11:31 pm
- Weather Station: Davis VP2
- Operating System: Windows XP, Mac OSX
- Location: Western Massachusetts, USA
- Contact:
Re: Trend Arrow
Kevin,
I put those tags in but still no luck with IE8. Doing a google search I found you may have to re-write a CSS code just for IE8 viewers and insert some sort of tag to call that CSS when an IE8 user views your page. That's something I really don't want to do as I have a hard enough time understanding the CSS I currently have. It would make things easier if everyone used Firefox wouldn't it!
I put those tags in but still no luck with IE8. Doing a google search I found you may have to re-write a CSS code just for IE8 viewers and insert some sort of tag to call that CSS when an IE8 user views your page. That's something I really don't want to do as I have a hard enough time understanding the CSS I currently have. It would make things easier if everyone used Firefox wouldn't it!
-
- Posts: 62
- Joined: Wed 30 Dec 2009 11:31 pm
- Weather Station: Davis VP2
- Operating System: Windows XP, Mac OSX
- Location: Western Massachusetts, USA
- Contact:
Re: Trend Arrow
Can someone using IE please try my website http://www.westspringfieldwx.com. I ran it through the W3C validator and used a program on there called HTML Tidy. Hopefully this worked.
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Trend Arrow
......................Imagine, what you will KNOW tomorrow !
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: Trend Arrow
there is a question mark before the F (Fahrenheit) ... in FFox and IE8 instead of a degree
- GraemeT
- Posts: 312
- Joined: Wed 21 Oct 2009 11:19 am
- Weather Station: La Crosse WS-2355 & WS-2306
- Operating System: Windoze 7, 10, 11
- Location: Bayswater, Australia
- Contact:
Re: Trend Arrow
Hi Ryan
In Firefox 3.6 and IE8 I get a q-mark in front of the F
Otherwise all pages display ok in Firefox - except today and yesterday, which has a black panel instead of data
In IE 8
Home page, Advisories, Storm reports, and Yearly Summary pages display ok.
On Homepage the corners of the box around your data are square, where in FF they're rounded.
Forecast page, Today and Yesterday, Radar, Monthly Summary, and Records pages - alphabet soup!
I hope this is useful.
In Firefox 3.6 and IE8 I get a q-mark in front of the F
Otherwise all pages display ok in Firefox - except today and yesterday, which has a black panel instead of data
In IE 8
Home page, Advisories, Storm reports, and Yearly Summary pages display ok.
On Homepage the corners of the box around your data are square, where in FF they're rounded.
Forecast page, Today and Yesterday, Radar, Monthly Summary, and Records pages - alphabet soup!
I hope this is useful.
Cheers,
Graeme.
Graeme.