Fw: phpweather-CVS-latest
Brought to you by:
iridium
From: Michael <psa...@ea...> - 2002-08-07 21:09:53
|
From: Jake Ortman=20 To: Michael=20 Sent: Wednesday, August 07, 2002 9:49 AM Subject: RE: phpweather-CVS-latest On that page (http://www.sunrayinc.com/sunriver/weather/), I have this = in the main content table area: <?php require('phpweather.php'); require('pw_utilities.php'); $weather =3D new phpweather(array()); $language =3D "en"; require(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); require(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); $type =3D 'pw_text_' . $language; $text =3D new $type($weather, array()); echo $text->print_table() . "<br />\n"; ?> My print_table function looks like so: function print_table() { // We use our own weather-object. $data =3D $this->weather->decode_metar(); $location =3D $data['location']; $date =3D $this->print_pretty_time($data['time']); $wind =3D $this->print_pretty_wind($data['wind']); $temperature =3D = $this->print_pretty_temperature($data['temperature']); $pressure =3D $this->print_pretty_altimeter($data['altimeter']); $humidity =3D = $this->print_pretty_rel_humidity($data['rel_humidity']); =20 $sky =3D $this->print_pretty_clouds($data['clouds']); $icons =3D new pw_images($weather, array()); =20 if ($this->properties['orientation'] =3D=3D 'vertical') { } else { echo '<table align=3D"center" width=3D"100%" cellspacing=3D"0" = cellpadding=3D"2" border=3D"0">'; echo '<tr>'; echo '<td width=3D"20%" align=3D"center">'; echo '<img src=3D"./skyimage.php?icao=3Dkrdm">'; echo '</td>'; echo "<td width=3D\"60%\" align=3D\"center\">$sky $temperature</td>"; echo '<td width=3D"20%" align=3D"center">'; echo '<img src=3D"./tempimage.php?icao=3Dkrdm">'; echo '</td></tr><tr>'; echo '<td width=3D"20%" align=3D"center">'; echo '<img src=3D"./windimage.php?icao=3Dkrdm">'; echo '</td>'; echo " <td colspan=3D\"2\" width=3D\"80%\">$wind</td> </tr> <tr> <td width=3D\"20%\" align=3D\"center\"> </td> <td colspan=3D\"2\" width=3D\"80%\">$humidity</td> </tr> <tr> <td width=3D\"20%\" align=3D\"center\"> </td> <td colspan=3D\"2\" width=3D\"80%\">$pressure</td> </tr> </table> "; } One thing I forgot to mention is that I created duplicates of the = "currentimage.php" file, editing them for the temp image, sky image, and = wind image, and called them in my print_table function. That's the only = way I could get the images to work right (I'm not a whiz PHP guy, I just = tried it and it worked). If you'd like, feel free to send that to the list. I don't have the = list's e-mail address with me (I'm not on my usual computer). If you = have a solution re: the night time icons, let me know! -Jake -----Original Message----- From: Michael [mailto:psa...@ea...] Sent: Tuesday, August 06, 2002 6:05 PM To: web...@su... Subject: phpweather-CVS-latest I still dont quite understand this,=20 How did you get your page to show that information? Is there code you can send me to help me? Thanks. Michael |