Does anyone have the season counter script, i believe it was Curly’s, that you could share.
Implementation isn’t trivial, but I have it on my highly modified version of Scott Thompson’s Alternate Dashboard.
In ‘AltAjaxDashboardConfig6.php’ (in context):
$useNewMoon = 1; // Use New Moon Display
// 0 = no display; 1 = Local TZ display; 2 = UTC display; 3 = Both UTC and Local Displays
$useNextSeason = 1; // Use Next Season Display
// 0 = no display; 1 = Local TZ display; 2 = UTC display; 3 = Both UTC and Local Displays
$useSeasonCntDwn = true; // Use Season Count Down Timer
// NOTICE
//
// Language translation for month names are located in the main dashboard script in the function section towards the end of the code
The Dashboard code (again in context):
<?php } else if ($use24HTChange) { ?>
<?php echo "24 Hour Temp. Change" ?>
<a class="hvr-glow hvr-grow" href="https://www.gwwilkins.org/wxus24htempchange.php" target="_blank" title="US 24 Hr. Temp Change Map in New Tab"><img src="<?php echo getUniqueImageURL('http://weather.unisys.com/surface/previous/sfc_con_24temp.gif')?>" id="DeltaT24Hr" height="112" width="140" alt="24 Hour Delta T" align="middle"/></a>
<?php } else if ($useNextSeason) { ?>
</td></tr><tr><td class="datahead" colspan="2" style="text-align:center"><?php langtrans('Season Countdown') ?>
<?php }?>
</td>
</tr>
<?php } if ($useNextSeason >1) {?>
<tr>
<td class="data2" style="vertical-align:middle;"><?php langtrans($nextSeason); ?>:</td>
<td class="data2" nowrap="nowrap" style="text-align: right; vertical-align:middle; <?php echo ($useNextSeason==3?'font-size:9px; line-height:140%':'')?>">
<!-- Use GMT's from common.php via $tyEvent in Curly's season-include.php -->
<?php $localTR[0] = date('H:i',($tyEvent-date_offset_get(new DateTime)-(date("I",$tyEvent)?3600:0))).' UTC'; // Hour:Min am/pm TZ string
$localTR[1] = date('j M Y',$tyEvent); // dd Mon yyyy string
$dmylen = strlen($localTR[1]);
echo $localTR[0];?>
<?php echo rdate($RecDateF, (split_to_mon(1, substr($localTR[1], 0, $dmylen))), (split_to_day(1, substr($localTR[1], 0, $dmylen))), (split_to_year(substr($localTR[1], 0, $dmylen)))); ?>
</td>
</tr>
<?php } if (($useNextSeason==1) || ($useNextSeason==3)) { ?>
<tr>
<td class="data2" style="vertical-align:middle; <?php echo ($useNextSeason==3?'font-size:9px; line-height:140%':'')?>"><?php echo ($useNextSeason==3?'Local
':'').$nextSeason.($useNextSeason==3?'':'
Begins')?>:</td>
<td class="data2" nowrap="nowrap" style="text-align: right; <?php echo ($useNextSeason==3?'font-size:9px; line-height:140%':'font-size:11px')?>">
<!-- Use GMT's from common.php via $tyEvent in Curly's season-include.php -->
<?php $localTR[0] = date($timeOnlyFormat.' T',$tyEvent); // Hour:Min am/pm TZ string
$localTR[1] = date('j M Y',$tyEvent); // dd Mon yyyy string
$dmylen = strlen($localTR[1]);
echo $localTR[0];?>
<?php echo rdate($RecDateF, (split_to_mon(1, substr($localTR[1], 0, $dmylen))), (split_to_day(1, substr($localTR[1], 0, $dmylen))), (split_to_year(substr($localTR[1], 0, $dmylen)))); ?>
</td>
</tr>
<?php if ($useSeasonCntDwn===true) { ?>
<tr> <!-- Season Counter by Curly -->
<td class="data2" colspan="2" id="cdcounter" style="text-align:center">
</td>
</tr>
<?php } ?>
<tr>
<td class="data2" colspan="2" style="text-align:center;">
</td>
</tr>
<?php } // end $useET ?>
Here’s where I placed the call to ‘season-include.php’ in my Dashboard (context included):
// end of special testing parms
print "<!-- fcstby='$fcstby' fcstscript='" . $SITE['fcstscript'] . "' fcstorg='" . $SITE['fcstorg'] . "' -->\n";
// end of overrides from Settings.php
include_once('season-include.php'); // Countdown timer to next season
if (!isset($keepNarrow)) $keepNarrow = true;
include_once($WXtags); // for the bulk of our data
Finally my version of ‘season-include.php’ is in the attached zip.
season-include.zip (1.7 KB)
Jerry, Thanks for the information. I will work on the new Dashboard and implement your help once finished. Hope to do that over the weekend. I noticed you have quite a bit of scripts on your website for us to use, thanks so much for those.
One of the ones i have seen is Curly’s SWSPnational.php script. I know that it quit working, i guess because of weather.gov moving things around. But I have found a website that uses the script and it is working http://www.foresthillweather.com/SWSPnational.php I have tried to contact them but have been unable to get a reply. Your website is AWESOME, by the way. 8)
Thanks again
Roger