Meanwhile, I've made some modifications to the cell.php system.
I've made it possible to use an absolute scale for Solar Index rather than the default percentage of theoretical maximum for the station's lat-long location as determined by WD. The code uses inline javascript and substitutes <?php if ($haveSolar) { // Have a Solar Sensor show current values ?>
<?php if ($dayornight == 'Night'){ ?>
<td colspan="3" <?php if ($haveUV) { ?> rowspan="2" <?php } ?> style="white-space:nowrap; text-align: center; font-size:12px;border: 1px solid black;">
<?php if ($time_hour > 12) { // Display Summary if in the evening ?>
<?php langtrans('High Today'); ?>: <?php echo $highsolar; ?><br />
@ <?php echo $highsolartime; ?><br />
<?php } else { ?>
<?php langtrans('High Yest'); ?>: <?php echo $highsolaryest; ?><br />
@ <?php echo $highsolaryesttime; ?><br />
<?php } ?>
<?php langtrans('Today'); ?>: <?php echo $sunshinehourstodateday; ?><?php langtrans('Hrs'); ?> <br />
<?php langtrans('Month'); ?>: <?php echo $sunshinehourstodatemonth; ?> <?php langtrans('Hrs'); ?>
</td>
<?php } ?>
<?php if ($dayornight == 'Day') { ?>
<td align="center" width="35%" nowrap="nowrap" class="data2" style="text-align: center; font-size: 9px;">
<span class="ajax" id="toggleSI">
<script type="text/javascript">
function toggle_SI(){
if (document.getElementById("ajaxSIWm2").style.display == 'none') {
document.getElementById("ajaxSIWm2").style.display = 'inline'
document.getElementById("ajaxSIimgWm2").style.display = 'inline'
document.getElementById("ajaxSISolarp").style.display = 'none'
document.getElementById("ajaxSIimgSolarp").style.display = 'none'
} else {
document.getElementById("ajaxSIWm2").style.display = 'none'
document.getElementById("ajaxSIimgWm2").style.display = 'none'
document.getElementById("ajaxSISolarp").style.display = 'inline'
document.getElementById("ajaxSIimgSolarp").style.display = 'inline'
}
};
</script>
</span>
<span class="ajax" id="ajaxsolar" style="font-size: 14px;"><?php echo $VPsolar; ?></span> W/m<sup>2</sup><br/>
<span class="ajax" id="ajaxsolarpct"><?php echo strip_units($currentsolarpercent); ?>
</span>%<br/>
<span class="ajax" id="ajaxSIWm2" style="display:inline; font-size: 8px;" onclick="javascript:toggle_SI()">W/m<sup>2</sup> <b>⇒</b> SI</span>
<span class="ajax" id="ajaxSISolarp" style="display:none; font-size: 8px;" onclick="javascript:toggle_SI()">Solar % <b>⇒</b> SI</span>
</td>
<td width="30%" align="center">
<span class="ajax" id="ajaxSIimgWm2" style="display:inline"
onclick="javascript:toggle_SI()">
<img src="ajax-images/SI<?php echo round(($VPsolar*10)/(round($recordhighsolar,0)),0);?>.gif" height="65" width="34"
alt="" id="ajaxsiimg" title="Current WM2 Solar Index"/></span>
<span class="ajax" id="ajaxSIimgSolarp" style="display:none"
onclick="javascript:toggle_SI()">
<img src="ajax-images/SI<?php echo floor(strip_units($currentsolarpercent)*0.1);?>.gif" height="65" width="34"
alt="" id ="ajaxsiimg2" title="Current Solar% Solar Index"/></span>
</td>
<td align="center" style="white-space:nowrap; text-align:center; font-size: 9px;border-bottom: 1px solid black;">
<?php langtrans('Highest'); ?>:<br />
<?php echo $highsolartime; ?><br />
<span style="font-size: 14px;"><?php echo $highsolar; ?></span>
</td>
<?php } ?>
<?php } else { // don't have solar show info instead ?>
<td colspan="3" <?php if ($haveUV) { ?> rowspan="2" <?php } ?> style="text-align: center; white-space:nowrap;border-left: 1px solid black; border-bottom: 1px solid black;" >
<?php langtrans('Sunrise is at'); ?>: <?php echo $sunrise; ?><br />
<?php langtrans('Solar Noon'); ?>: <?php echo $solarnoon; ?><br />
<?php langtrans('Sunset is at'); ?>: <?php echo $sunset; ?><br />
</td>
<?php } // end $haveSolar ?>
for <?php if ($haveSolar) { // Have a Solar Sensor show current values ?>
<?php if ($dayornight == 'Night'){ ?>
<td colspan="3" <?php if ($haveUV) { ?> rowspan="2" <?php } ?> style="white-space:nowrap; text-align: center; font-size:12px;border: 1px solid black;">
<?php if ($time_hour > 12) { // Display Summary if in the evening ?>
<?php langtrans('High Today'); ?>: <?php echo $highsolar; ?><br />
@ <?php echo $highsolartime; ?><br />
<?php } else { ?>
<?php langtrans('High Yest'); ?>: <?php echo $highsolaryest; ?><br />
@ <?php echo $highsolaryesttime; ?><br />
<?php } ?>
<?php langtrans('Today'); ?>: <?php echo $sunshinehourstodateday; ?><?php langtrans('Hrs'); ?> <br />
<?php langtrans('Month'); ?>: <?php echo $sunshinehourstodatemonth; ?> <?php langtrans('Hrs'); ?>
</td>
<?php } ?>
<?php if ($dayornight == 'Day') { ?>
<td align="center" style="white-space:nowrap; text-align: center; font-size: 9px; border-left: 1px solid black; border-bottom: 1px solid black;">
<span class="ajax" id="ajaxsolar" style="font-size: 14px;"><?php echo $VPsolar; ?></span><br />W/m<span style="vertical-align:super">2</span><br />
<span class="ajax" id="ajaxsolarpct"><?php echo strip_units($currentsolarpercent); ?></span>%
</td>
<td align="center" style="border-bottom: 1px solid black;">
<span class="ajax" id="ajaxSIimg">
<img src="ajax-images/SI<?php echo get_SIrange($currentsolarpercent); ?>.gif" height="65" width="34" alt="" title="Current Solar Index" />
</span>
</td>
<td align="center" style="white-space:nowrap; text-align:center; font-size: 9px;border-bottom: 1px solid black;">
<?php langtrans('Highest'); ?>:<br />
<?php echo $highsolartime; ?><br />
<span style="font-size: 14px;"><?php echo $highsolar; ?></span>
</td>
<?php } ?>
<?php } else { // don't have solar show info instead ?>
<td colspan="3" <?php if ($haveUV) { ?> rowspan="2" <?php } ?> style="text-align: center; white-space:nowrap;border-left: 1px solid black; border-bottom: 1px solid black;" >
<?php langtrans('Sunrise is at'); ?>: <?php echo $sunrise; ?><br />
<?php langtrans('Solar Noon'); ?>: <?php echo $solarnoon; ?><br />
<?php langtrans('Sunset is at'); ?>: <?php echo $sunset; ?><br />
</td>
<?php } // end $haveSolar ?>
The SI Icon and index derivation indicator are clickable to switch between an SI based on an absolute scale (referencing the station's maximum W/m2) and the original SI based on percent of theoretical maximum derived from the station's lat-long location. The greatest discrepancies between these two indices occur when the sun is closer to the horizon. Solar percent is needed in order to determine possible cloud cover, but as an index it's somewhat misleading vis-a-vis the UV index. Hence the optional modification.
I've also added a StormVue Last Hour's Lightning graph <td style="text-align:center;">
<img src="./lightning/strikes105-all.php" id="myPull3" height="105" width="117" alt="Last Hr. Strikes" align="middle"/>
</td>
<span class="ajax" id="imagereLoader">
<script type="text/javascript"><!--
//<![CDATA[
function reloadImage() {
var now = new Date();
if (document.images && (ajaxUpdates < update.maxupdates)) {
document.images.myPull3.src = './lightning/strikes105-all.php?' + now.getTime();
}
setTimeout('reloadImage()',15000);
}
setTimeout('reloadImage()',15000);
//]]>
-->
</script>
</span>
here </td>
(NEW CODE GOES HERE!)
<td style="text-align: center; border: none;border-left: 1px solid black;">
<?php langtrans(moonphase($moonage)); ?> <br /><img src="<?php echo $imagesDir .'moon/w/' . $moonHemisphere .'-moon'. str_pad($moonagedays, 2, "0", STR_PAD_LEFT) ?>.gif"
with an autorefresh routine and with an appropriate header modification <tr>
<td class="datahead2" style="width:50%; text-align:center"><?php langtrans('Almanac'); ?></td>
<td class="datahead2" style="width:25%; text-align:center"><?php langtrans('Lightning'); ?></td>
<td class="datahead2" style="width:25%; text-align:center"><?php langtrans('Moon'); ?></td>
</tr>
.
Lastly, I've modified the cell-cam.php page to autorefresh when new images are uploaded and included the update-refresh routine. The code is attached and would require some customization of image names, but should otherwise be usable.