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 4019) - 03 April 2024

Legacy Cumulus 1 release 1.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

WU temperature under icon?

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

WU temperature under icon?

Post by William Grimsley »

Hi Ken,

Is it possible, like all the other icons on the site, except the one under the data head "Forecast", to put the "High of 7" underneath it?

I tried this. I changed:

Code: Select all

for ($i=$startIcon;$i<$finIcon;$i++) {
		$ni = $doRTL?$numIconsInFoldedRow-1-$i+$startIcon+$k:$i;  
	    print "<td style=\"width: $wdth%;\">" . img_replace($WUforecasticon[$ni],$WUforecastcond[$ni],$WUforecastpop[$ni]) . "</td>\n";
To

Code: Select all

for ($i=$startIcon;$i<$finIcon;$i++) {
		$ni = $doRTL?$numIconsInFoldedRow-1-$i+$startIcon+$k:$i;  
	    print "<td style=\"width: $wdth%;\">" . img_replace($WUforecasticon[$ni],$WUforecastcond[$ni],$WUforecastpop[$ni],$WUforecasttemp[$ni]) . "</td>\n";
But, that just added another "High of 7" onto the bottom icons that already had "High of 7" :bash:

Please help,

Thanks

William
User avatar
saratogaWX
Posts: 1185
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: WU temperature under icon?

Post by saratogaWX »

I'm not sure why you think modifying the support script (WU-forecast.php) would be the best approach to solving the issue you've ascertained, because for future maintainability of your site, it is the last place to modify to achieve the desired effect without altering other parts of your site's display.

If the issue is with the presentation of one area in ajax-dashboard.php, then that is likely the place to make the modification and use the data that is available.

The ajax-dashboard.php has

Code: Select all

          <td align="center" valign="middle">
		    <table border="0" cellpadding="2" cellspacing="0">
              <tr>
                <td class="data1" align="center" style="font-size: 8pt; border:none;text-align: center">
				  <?php print $forecasticons[1]; ?>
			   </td>
              </tr>
            </table>
		  </td>
to present the Forecast area. Changing it to

Code: Select all

          <td align="center" valign="middle">
		    <table border="0" cellpadding="2" cellspacing="0">
              <tr>
                <td class="data1" align="center" style="font-size: 8pt; border:none;text-align: center">
				  <?php print $forecasticons[1]; ?><br/><?php print $forecasttemp[1]; ?>
			   </td>
              </tr>
            </table>
		  </td>
would do what you want (as is already done near the bottom of the page in the Weather Forecast area).
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: WU temperature under icon?

Post by William Grimsley »

Hi Ken,

Yes, I was looking at the WU-forecast.php file to see what I wanted was possible. But, I didn't look at the ajax-dashboard file which is stupid of me, as that was where the obvious answer was! :bash:

Sorry, I'm still not with the <?php print ?> bit yet! :lol:

Also, thanks for the code! That worked! :D

Thanks for you help,

William
Post Reply