cloudy

Author Topic: Alternate dashboard help  (Read 11369 times)

0 Members and 1 Guest are viewing this topic.

Offline tonyva

  • Posts: 1,065
  • Mangawhai Heads, Northland, New Zealand
    • Mangawhai Heads Weather
Alternate dashboard help
« on: April 26, 2009, 04:28:57 AM »
Can someone show me which code to edit to remove or comment out which I have highlighted in the attached gifs.

Many thanks
Thank You
Tony

Weather Dedicated 24/7 HP Dual Core 1.8 Ghz CPU, 2GB Ram

Offline andro700

  • Chuck
  • Posts: 3,213
  • Watford City, North Dakota
    • Chuck's Weather Page
Re: Alternate dashboard help
« Reply #1 on: April 26, 2009, 04:57:00 AM »
Set this line to false to get rid of the NWS records.

$useWU     = true;            // set to false if you do not want to use "new record High/low" image

To removed the storm rain find and delete the following.

Code: [Select]
<tr>
                <td class="data1" nowrap="nowrap">Storm Rain: </td>
                <td style="text-align: right;" class="data1">
                  <?php echo strip_units($vpstormrain).$uomRain?>
</td>
              </tr>

The fire risk looks like you don't have the images or you have the directory set wrong.

Chuck

For the sup things just delete the lines you don't want.

<sup>1</sup> Rain season: Jan 1st to Dec 31st. &nbsp;&nbsp;
              <sup>2</sup> Snow season July 1st to June 30th. &nbsp;&nbsp;
              <sup>3</sup> Snow manually measured<br/>
              <sup>4</sup> Estimated amount of water needed to replace the water used by plants and evaporation from the past week.<br />
             (Negative numbers mean amount of water needed, positive numbers mean excess water is present.)



For the forecast set this to false.

$useEXTf   = true;            // Set to false to not display the extra forecast days

 

Offline tonyva

  • Posts: 1,065
  • Mangawhai Heads, Northland, New Zealand
    • Mangawhai Heads Weather
Re: Alternate dashboard help
« Reply #2 on: April 27, 2009, 02:11:24 AM »
Thanks for the help Chuck  :)
Thank You
Tony

Weather Dedicated 24/7 HP Dual Core 1.8 Ghz CPU, 2GB Ram

Offline andro700

  • Chuck
  • Posts: 3,213
  • Watford City, North Dakota
    • Chuck's Weather Page
Re: Alternate dashboard help
« Reply #3 on: April 27, 2009, 04:07:56 AM »
No problem Tony. Glad I could help you out.

Chuck

Offline tonyva

  • Posts: 1,065
  • Mangawhai Heads, Northland, New Zealand
    • Mangawhai Heads Weather
Re: Alternate dashboard help
« Reply #4 on: April 30, 2009, 09:23:01 PM »
Hi

1. Would someone kindly show me how I can move the current conditions icon up the page

2. I have replaced Storm rain with Last tip time, I have added the tag to testtags but not sure what else i need to change in dashboard to get Last tip time to show.

« Last Edit: April 30, 2009, 09:24:38 PM by tonyva »
Thank You
Tony

Weather Dedicated 24/7 HP Dual Core 1.8 Ghz CPU, 2GB Ram

Offline andro700

  • Chuck
  • Posts: 3,213
  • Watford City, North Dakota
    • Chuck's Weather Page
Re: Alternate dashboard help
« Reply #5 on: April 30, 2009, 09:29:46 PM »
Tony,

Could post the portion of the script for your first tip.

For the Icon you can make it bigger by changing the following numbers in you ajaxWDwx.js script:

Quote
function ajax_wxIconJPG ( iconWD ) {
// perform a lookup and return the graphic for the condition icon (using NWS icons)
  $iconList = new Array(
   "skc.jpg",          //  0 imagesunny.visible
   "nskc.jpg",         //  1 imageclearnight.visible
   "bkn.jpg",          //  2 imagecloudy.visible
   "sct.jpg",          //  3 imagecloudy2.visible
   "nbkn.jpg",         //  4 imagecloudynight.visible
   "sct.jpg",          //  5 imagedry.visible
   "fg.jpg",           //  6 imagefog.visible
   "hazy.jpg",         //  7 imagehaze.visible
   "ra.jpg",           //  8 imageheavyrain.visible
   "few.jpg",          //  9 imagemainlyfine.visible
   "mist.jpg",         // 10 imagemist.visible
   "nfg.jpg",          // 11 imagenightfog.visible
   "nra.jpg",          // 12 imagenightheavyrain.visible
   "novc.jpg",         // 13 imagenightovercast.visible
   "nra.jpg",          // 14 imagenightrain.visible
   "nshra.jpg",        // 15 imagenightshowers.visible
   "nsn.jpg",          // 16 imagenightsnow.visible
   "ntsra.jpg",        // 17 imagenightthunder.visible
   "ovc.jpg",          // 18 imageovercast.visible
   "bkn.jpg",          // 19 imagepartlycloudy.visible
   "ra.jpg",           // 20 imagerain.visible
   "ra.jpg",           // 21 imagerain2.visible
   "shra.jpg",         // 22 imageshowers2.visible
   "ip.jpg",           // 23 imagesleet.visible
   "ip.jpg",           // 24 imagesleetshowers.visible
   "sn.jpg",           // 25 imagesnow.visible
   "sn.jpg",           // 26 imagesnowmelt.visible
   "sn.jpg",           // 27 imagesnowshowers2.visible
   "skc.jpg",          // 28 imagesunny.visible
   "scttsra.jpg",      // 29 imagethundershowers.visible
   "hi_tsra.jpg",      // 30 imagethundershowers2.visible
   "tsra.jpg",         // 31 imagethunderstorms.visible
   "nsvrtsra.jpg",     // 32 imagetornado.visible
   "wind.jpg",         // 33 imagewindy.visible
   "ra1.jpg",          // 34 stopped rainning
   "windyrain.jpg"     // 35 windy/rain (new with V2.11)
   );               

  if (iconWD >= 0 && iconWD <= 35) {
    return ("<img src=\"" + imagedir + "/" + $iconList[iconWD] + "\" " +
            "width=\"112\" height=\"108\" alt=\"Current condition icon\" />" );
  } else {
   return '';
  }

}

Chuck

Offline tonyva

  • Posts: 1,065
  • Mangawhai Heads, Northland, New Zealand
    • Mangawhai Heads Weather
Re: Alternate dashboard help
« Reply #6 on: April 30, 2009, 09:37:36 PM »
Chuck

Here is the script

              <td class="data1" nowrap="nowrap">'' time: </td>
                <td style="text-align: right;" class="data1">
                  <?php echo strip_units($timeoflastrain).$uomRain; ?>
            </td>

I do not want to make the icon bigger but move it up the page

Thanks
Thank You
Tony

Weather Dedicated 24/7 HP Dual Core 1.8 Ghz CPU, 2GB Ram

Offline andro700

  • Chuck
  • Posts: 3,213
  • Watford City, North Dakota
    • Chuck's Weather Page
Re: Alternate dashboard help
« Reply #7 on: April 30, 2009, 10:48:04 PM »
Tony,

Not sure about the space of the current condition icon.

Here is what I have for the tag you have time of last rain. Make sure you have them correct. I am using build 27.

testtags.txt:
$timeoflastrain = "%timeoflastrain%";   // Time that the last rain tip was recorded.
$dateoflastrain = "%dateoflastrain%";   // Date that the last rain tip was recorded (not retrospective)

testtags.php:
$timeoflastrain = " 04:51";   // Time that the last rain tip was recorded.
$dateoflastrain = "4/30/2009";   // Date that the last rain tip was recorded (not retrospective)

Chuck

Offline HometownZone

  • Scott
  • Posts: 1,243
  • Webster Weather LIVE Scripts
  • Webster, MN, USA
    • Webster Weather LIVE
Re: Alternate dashboard help
« Reply #8 on: April 30, 2009, 10:51:36 PM »
Chuck

Here is the script

              <td class="data1" nowrap="nowrap">'' time: </td>
                <td style="text-align: right;" class="data1">
                  <?php echo strip_units($timeoflastrain).$uomRain; ?>
            </td>

I do not want to make the icon bigger but move it up the page

Thanks

The space at the top is for the new high/low record image.  If you don't want that, turn that function off first.  If you still want it higher, change the formatting for the column from center to top format.

Scott
Scott

www.WebsterWeatherLIVE.com

Windows XP Pro(SP3), 4G Ram, QuickCam Pro 9000, Davis Vantage Pro II w/Solar/UV & Heated Rain Catcher, WXSim, 1-Wire: Lightning, Leaf, soil moist/tmp

Offline tonyva

  • Posts: 1,065
  • Mangawhai Heads, Northland, New Zealand
    • Mangawhai Heads Weather
Re: Alternate dashboard help
« Reply #9 on: May 01, 2009, 02:52:50 AM »
I have the tag correct but on the dashboard it shows -mm  :?
Thank You
Tony

Weather Dedicated 24/7 HP Dual Core 1.8 Ghz CPU, 2GB Ram

Offline andro700

  • Chuck
  • Posts: 3,213
  • Watford City, North Dakota
    • Chuck's Weather Page
Re: Alternate dashboard help
« Reply #10 on: May 01, 2009, 03:03:15 AM »
Try it this way and see what happens. You don;t need this .$uomRain, it is for mm or in. which you don't need the tag only shows time.

<?php echo $timeoflastrain; ?>

Chuck

Edit: Your testtags.php shows --  $timeoflastrain = "-";    // Time of last tip for bucket
So WD is not parsing it correctly.

« Last Edit: May 01, 2009, 03:05:29 AM by andro700 »

Offline tonyva

  • Posts: 1,065
  • Mangawhai Heads, Northland, New Zealand
    • Mangawhai Heads Weather
Re: Alternate dashboard help
« Reply #11 on: May 01, 2009, 06:02:52 PM »
Chuck I have removed $uomRain as you suggested and that's removed mm  :)

Here is my tag for last tip what do I need to edit?
 $timeoflastrain = "%timeoflastrain%";    // Time of last tip for bucket
Thank You
Tony

Weather Dedicated 24/7 HP Dual Core 1.8 Ghz CPU, 2GB Ram

Offline andro700

  • Chuck
  • Posts: 3,213
  • Watford City, North Dakota
    • Chuck's Weather Page
Re: Alternate dashboard help
« Reply #12 on: May 01, 2009, 06:15:31 PM »
Just pulled this from your testtags.php.

$timeoflastrain = " 6:55 AM";    // Time of last tip for bucket

I see that the 6 is the only thing showing up. Did you try this for the tag

<?php echo $timeoflastrain; ?>

It is acting like you have it this way. I could be wrong.
<?php echo strip_units($timeoflastrain); ?>

Chuck

Offline tonyva

  • Posts: 1,065
  • Mangawhai Heads, Northland, New Zealand
    • Mangawhai Heads Weather
Re: Alternate dashboard help
« Reply #13 on: May 01, 2009, 07:06:48 PM »
Chuck you got it  :D It's working exactly how I want it now.

Thanks again m8
Thank You
Tony

Weather Dedicated 24/7 HP Dual Core 1.8 Ghz CPU, 2GB Ram

Offline tonyva

  • Posts: 1,065
  • Mangawhai Heads, Northland, New Zealand
    • Mangawhai Heads Weather
Re: Alternate dashboard help
« Reply #14 on: May 01, 2009, 09:39:09 PM »
Scott is this where I need to edit the script to get the conditions icon higher up the page?

                 <td align="center" colspan="2" class="data1" style="text-align: center;border: none">
           <span class="ajax" id="ajaxcurrentcond">
           <?php echo $current_summary; ?> </span><br/>
 
            </td>

The new high/low image is turned off.
Thank You
Tony

Weather Dedicated 24/7 HP Dual Core 1.8 Ghz CPU, 2GB Ram

 

cumulus