Author Topic: Add image in Version 4.20 of the alt dashboard by WebsterWeatherLIVE.com  (Read 3556 times)

0 Members and 1 Guest are viewing this topic.

Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
I have some free space in my dashboard and now I want to put a image from my ip cam there, but where in the source code would I have to put the code?

I think it should be after this code, but I'm not really sure.

Code: [Select]
<span class="ajax" id="ajaxconditionicon2">
  <img src="<?php echo $imagesDir newIcon($iconnumber?>"
alt="<?php $t1 fixupCondition($Currentsolardescription);
  echo $t1?>
"
  title="<?php echo $t1?>" height="108" width="112" />
  </span> 
      </td>
  </tr>
  <tr>
              <td align="center" colspan="2" class="data1" style="text-align: center;border: none">
  <span class="ajax" id="ajaxcurrentcond"><?php//ajaxweatherreport?>
  <?php echo $t1?> </span><br/><br/>
  <strong><span class="ajax" id="ajaxtemp" style="font-size:30px">
          <?php echo strip_units($temperature) . $uomTemp?>
          </span></strong>
          <span class="ajax" id="ajaxtemparrow"><?php echo gen_difference(
          $temperaturestrip_units($temperature) -strip_units($tempchangehour), '',
          'Warmer %s'.$uomTemp.' than last hour.',
          'Colder %s'.$uomTemp.' than last hour.');?>
</span><br/>
                          <span class="ajax" id="ajaxheatcolorword"><?php  echo $heatcolourword?></span><br/>
        </td>
  </tr>
                  <tr align="center">
                      <td align="center" valign="top" class="data1" style="text-align: center;border: none">
            <span class="ajax" id="ajaxthermometer">
                          <?php $tstr "Currently $temperature, Max: $maxtemp, Min: $mintemp"?>
                          <img src="thermometer.php?t=<?php echo strip_units($temperature); ?>" alt="<?php echo $tstr?>"
          title="<?php echo $tstr?>" height="170" width="54" /> </span>
      </td>
                      <td class="data1" style="text-align: center;border: none" valign="middle">
                          Feels like:<br/><span class="ajax" id="ajaxfeelslike">
  <?php echo strip_units($feelslike) . $uomTemp?>
  </span><br/><br/>
                          24-hr<br/>difference<br/>
                          <?php 
  echo gen_difference($temperature$temp24hoursago$uomTemp,
     'Warmer %s'.$uomTemp.' than yesterday at this time.',
   
  'Colder %s'.$uomTemp.' than yesterday at this time.'); ?>

                      </td>
                 </tr>
             <tr>
             <td colspan="2">
<table width="100%"  class="data1" style="font-size: 9px;border: none">
                    <tr>
                      <th style="text-align: left;">LOCALLY:</th>
                      <th style="text-align: center;">Today</th>
                      <th style="text-align: center;">Yesterday</th>
                    </tr>
                    <tr>
                      <td><strong>High:</strong></td>
                      <td style="font-size: 9px;text-align: center;">
  <span class="ajax" id="ajaxtempmax">
                          <?php echo strip_units($maxtemp) . $uomTemp?></span><br/>
                          <?php echo fixup_time($maxtempt); ?>
      </td>
                      <td style="font-size: 9px;text-align: center;">
                          <?php echo strip_units($maxtempyest) . $uomTemp?><br/>
                          <?php echo fixup_time($maxtempyestt); ?>
      </td>
                    </tr>
                    <tr>
                      <td class="data1" style="font-size: 9px;"><strong>Low:</strong></td>
                      <td class="data1" style="font-size: 9px;text-align: center;">
  <span class="ajax" id="ajaxtempmin">
                          <?php echo strip_units($mintemp) . $uomTemp?></span><br/>
                          <?php echo fixup_time($mintempt); ?>
      </td>
                      <td class="data1" style="font-size: 9px;text-align: center;">
  <?php echo strip_units($mintempyest) . $uomTemp?><br/>
                          <?php echo fixup_time($mintempyestt); ?>
        </td>
                    </tr>
Lars Magnusson
Axelvold / Sweden
55° 57' 41" N / 13° 6' 1" E
WX Station: Davis Vantage Pro2 Plus

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
I would suggest getting current with the alt dashboard first. You are way behind, and Scott has added a number of fixes between your 4.20 and the current 6.51.
John
W7JKG

Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
I would suggest getting current with the alt dashboard first. You are way behind, and Scott has added a number of fixes between your 4.20 and the current 6.51.

I know that, but most of the new things could I not use because that there no one that provides the data for free in Sweden.

That's why I still use version 4.20
Lars Magnusson
Axelvold / Sweden
55° 57' 41" N / 13° 6' 1" E
WX Station: Davis Vantage Pro2 Plus

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Hi Axelvold, if you could display a wider view of what's above it and some more code that would be helpful. Doesn't look like the code you posted is for that section of the dashboard.

Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
Hi Axelvold, if you could display a wider view of what's above it and some more code that would be helpful. Doesn't look like the code you posted is for that section of the dashboard.

The code I did post is what generates the temperatur, and I want to have the picture under that.
Code: [Select]
<span class="ajax" id="ajaxtempmin">
                          <?php echo strip_units($mintemp) . $uomTemp?></span><br/>
                          <?php echo fixup_time($mintempt); ?>
      </td>
                      <td class="data1" style="font-size: 9px;text-align: center;">
  <?php echo strip_units($mintempyest) . $uomTemp?><br/>
                          <?php echo fixup_time($mintempyestt); ?>
        </td>
                    </tr>
<?php
  
if ($useWU) {  //  Show Weather Underground Record HIGH/LOW data
?>

                    <tr>
Lars Magnusson
Axelvold / Sweden
55° 57' 41" N / 13° 6' 1" E
WX Station: Davis Vantage Pro2 Plus

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1152
I think you are close. Please post the code you have plus the next 15 lines.

Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
I think you are close. Please post the code you have plus the next 15 lines.

ok, here is some more code.

Code: [Select]
  <span class="ajax" id="ajaxconditionicon2">
  <img src="<?php echo $imagesDir newIcon($iconnumber?>"
alt="<?php $t1 fixupCondition($Currentsolardescription);
  echo $t1?>
"
  title="<?php echo $t1?>" height="108" width="112" />
  </span> 
      </td>
  </tr>
  <tr>
              <td align="center" colspan="2" class="data1" style="text-align: center;border: none">
  <span class="ajax" id="ajaxcurrentcond"><?php//ajaxweatherreport?>
  <?php echo $t1?> </span><br/><br/>
  <strong><span class="ajax" id="ajaxtemp" style="font-size:30px">
          <?php echo strip_units($temperature) . $uomTemp?>
          </span></strong>
          <span class="ajax" id="ajaxtemparrow"><?php echo gen_difference(
          $temperaturestrip_units($temperature) -strip_units($tempchangehour), '',
          'Warmer %s'.$uomTemp.' than last hour.',
          'Colder %s'.$uomTemp.' than last hour.');?>
</span><br/>
                          <span class="ajax" id="ajaxheatcolorword"><?php  echo $heatcolourword?></span><br/>
        </td>
  </tr>
                  <tr align="center">
                      <td align="center" valign="top" class="data1" style="text-align: center;border: none">
            <span class="ajax" id="ajaxthermometer">
                          <?php $tstr "Currently $temperature, Max: $maxtemp, Min: $mintemp"?>
                          <img src="thermometer.php?t=<?php echo strip_units($temperature); ?>" alt="<?php echo $tstr?>"
          title="<?php echo $tstr?>" height="170" width="54" /> </span>
      </td>
                      <td class="data1" style="text-align: center;border: none" valign="middle">
                          Feels like:<br/><span class="ajax" id="ajaxfeelslike">
  <?php echo strip_units($feelslike) . $uomTemp?>
  </span><br/><br/>
                          24-hr<br/>difference<br/>
                          <?php 
  echo gen_difference($temperature$temp24hoursago$uomTemp,
     'Warmer %s'.$uomTemp.' than yesterday at this time.',
   
  'Colder %s'.$uomTemp.' than yesterday at this time.'); ?>

                      </td>
                 </tr>
             <tr>
             <td colspan="2">
<table width="100%"  class="data1" style="font-size: 9px;border: none">
                    <tr>
                      <th style="text-align: left;">LOCALLY:</th>
                      <th style="text-align: center;">Today</th>
                      <th style="text-align: center;">Yesterday</th>
                    </tr>
                    <tr>
                      <td><strong>High:</strong></td>
                      <td style="font-size: 9px;text-align: center;">
  <span class="ajax" id="ajaxtempmax">
                          <?php echo strip_units($maxtemp) . $uomTemp?></span><br/>
                          <?php echo fixup_time($maxtempt); ?>
      </td>
                      <td style="font-size: 9px;text-align: center;">
                          <?php echo strip_units($maxtempyest) . $uomTemp?><br/>
                          <?php echo fixup_time($maxtempyestt); ?>
      </td>
                    </tr>
                    <tr>
                      <td class="data1" style="font-size: 9px;"><strong>Low:</strong></td>
                      <td class="data1" style="font-size: 9px;text-align: center;">
  <span class="ajax" id="ajaxtempmin">
                          <?php echo strip_units($mintemp) . $uomTemp?></span><br/>
                          <?php echo fixup_time($mintempt); ?>
      </td>
                      <td class="data1" style="font-size: 9px;text-align: center;">
  <?php echo strip_units($mintempyest) . $uomTemp?><br/>
                          <?php echo fixup_time($mintempyestt); ?>
        </td>
                    </tr>
<?php
  
if ($useWU) {  //  Show Weather Underground Record HIGH/LOW data
?>

                    <tr>
                      <td><strong>NWS<br/>Normal:<br/>Record:<br/>Year:</strong></td>
                      <td style="text-align: center;">
                          <b>HIGH</b><br/>
                          <?php echo strip_units($WUmaxtemp) . $uomTemp?><br/>
                          <?php echo strip_units($WUmaxtempr) . $uomTemp?><br/>
                          <?php echo $WUmaxtempryr?><br/>
              </td>
                      <td style="text-align: center;">
                          <b>LOW</b><br/>
                          <?php echo strip_units($WUmintemp) . $uomTemp?><br/>
                          <?php echo strip_units($WUmintempr) . $uomTemp?><br/>
                          <?php echo $WUmintempryr?><br/>
              </td>
                    </tr>
<?php // end $useWU  ---------------------------------------- ?>
Lars Magnusson
Axelvold / Sweden
55° 57' 41" N / 13° 6' 1" E
WX Station: Davis Vantage Pro2 Plus

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1152
I usually make modifications with a bit of trial and error.  ;) See what this will do for you.
Code: [Select]
<table width="100%"  class="data1" style="font-size: 9px;border: none">
                    <tr>
                      <th style="text-align: left;">LOCALLY:</th>
                      <th style="text-align: center;">Today</th>
                      <th style="text-align: center;">Yesterday</th>
                    </tr>
                    <tr>
                      <td><strong>High:</strong></td>
                      <td style="font-size: 9px;text-align: center;">
  <span class="ajax" id="ajaxtempmax">
                          <?php echo strip_units($maxtemp) . $uomTemp?></span><br/>
                          <?php echo fixup_time($maxtempt); ?>
      </td>
                      <td style="font-size: 9px;text-align: center;">
                          <?php echo strip_units($maxtempyest) . $uomTemp?><br/>
                          <?php echo fixup_time($maxtempyestt); ?>
      </td>
                    </tr>
                    <tr>
                      <td class="data1" style="font-size: 9px;"><strong>Low:</strong></td>
                      <td class="data1" style="font-size: 9px;text-align: center;">
  <span class="ajax" id="ajaxtempmin">
                          <?php echo strip_units($mintemp) . $uomTemp?></span><br/>
                          <?php echo fixup_time($mintempt); ?>
      </td>
                      <td class="data1" style="font-size: 9px;text-align: center;">
  <?php echo strip_units($mintempyest) . $uomTemp?><br/>
                          <?php echo fixup_time($mintempyestt); ?>
        </td>
                    </tr>
                   
                    <tr>
          <td>
    <img width="100" height="100" border="0" src="your webcam.jpg" alt="" />               
         </td>
                    </tr>
                   
  <?php
  
if ($useWU) {  //  Show Weather Underground Record HIGH/LOW data
?>

                    <tr>
                      <td><strong>NWS<br/>Normal:<br/>Record:<br/>Year:</strong></td>
                      <td style="text-align: center;">
                          <b>HIGH</b><br/>
                          <?php echo strip_units($WUmaxtemp) . $uomTemp?><br/>
                          <?php echo strip_units($WUmaxtempr) . $uomTemp?><br/>
                          <?php echo $WUmaxtempryr?><br/>
              </td>
                      <td style="text-align: center;">
                          <b>LOW</b><br/>
                          <?php echo strip_units($WUmintemp) . $uomTemp?><br/>
                          <?php echo strip_units($WUmintempr) . $uomTemp?><br/>
                          <?php echo $WUmintempryr?><br/>
              </td>
                    </tr>
<?php // end $useWU  ---------------------------------------- ?>

Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
It's a small step, but the column gets to wide.
Lars Magnusson
Axelvold / Sweden
55° 57' 41" N / 13° 6' 1" E
WX Station: Davis Vantage Pro2 Plus

Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
Got it working, with this.

Code: [Select]
<tr>
                      <td class="data1" colspan="3"><center><b>Latest image IP cam:<img width="160" height="120" border="0" src="your webcam.jpg" alt="" /></b></center></td>
                    </tr>
Lars Magnusson
Axelvold / Sweden
55° 57' 41" N / 13° 6' 1" E
WX Station: Davis Vantage Pro2 Plus

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1152
Re: Add image in Version 4.20 of the alt dashboard by WebsterWeatherLIVE.com
« Reply #10 on: December 27, 2011, 03:45:29 PM »
Glad to see you got it worked out.

Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
Re: Add image in Version 4.20 of the alt dashboard by WebsterWeatherLIVE.com
« Reply #11 on: December 27, 2011, 04:15:16 PM »
Glad to see you got it worked out.

Thank's for your help.
Lars Magnusson
Axelvold / Sweden
55° 57' 41" N / 13° 6' 1" E
WX Station: Davis Vantage Pro2 Plus

 

anything