a demo

uniterre - March 27, 2008 - 19:50
Project:Weather
Version:6.x-2.0
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Please, can anyone give us a website using this weather module ?

#1

crutch - April 5, 2008 - 14:46

This version of weather is not working. Module looks for location table in database. Attempted to load location module 5.x in 6 but does not work. Weather is dependent on the Location module for which there is no 6.x version yet.

Best regards,
Crutch

#2

crutch - April 15, 2008 - 01:01

Toddy,

Is 6.x working? I've done everything possible and it always makes my site unavailable when enabling the weather block in left or right column.

IE/Linux/Apache1.3.37 (Unix)/MySQL4.1.22-standard-log/PHP5.2.5/cPanel11.18.3-RELEASE/Drupal 6.1

Is it dependent on the location module?

Thanks,
Crutch

#3

toddy - April 15, 2008 - 18:54

Hi,

Weather does not depend on the Location module, but can use its data if available. I've installed a working version for Drupal 6.x, without ever installing the Location module in that setup. Maybe the problem is that you cannot download data from the internet on your server? Do you have other modules installed which fetch data from other sources?

Regards,
Tobias

#4

crutch - April 16, 2008 - 13:11

Thanks for the reply Tobias. I have some more detail with my recent experience here http://drupal.org/node/215982. I have two other sites where the weather is working but it is with older version of drupal and weather. I'm thinking it may be a setting or something that changed in drupal core but I don't really know and I'm not sure where to start looking for the items.

Best regards,
Crutch

#5

izmeez - April 27, 2008 - 18:06

Is it correct that since there is no Location module available for Drupal 6.x the ability to determine the weather to display cannot be determined by the user's IP or is there another way to do this in Drupal 6.x ?

Other than that, the Weather module (v6.x-2.1) works great. Thanks. It is really nice that users can customize "My weather" and display more than one location. Installation on Drupal 6.2 was smooth.

Is it possible to also select other sources for weather data? The Metar database seems somewhat limited.

Izzy

#6

toddy - April 28, 2008 - 07:20

Hi,

I don't know how to display the weather based on a user's IP address, sorry. I'm also not sure whether this works with the Location module. Did you set this up in Drupal 5?

Currently, the module only supports METAR data, although I'm aware that the DB is not complete. It would be best to get weather data from GRIB sources (see e.g. http://en.wikipedia.org/wiki/GRIB), however, I'm currently not working on that.

#7

NancyDru - July 29, 2008 - 16:48

Back to the original question: Is there a demonstration site that I can look at?

#8

crutch - July 30, 2008 - 01:39

http://sutton-homes.com/main/

Demo here on Drupal 5. I can't get it to work on 6.

I customized the block and added a link to the specific location at noaa.

#9

toddy - July 30, 2008 - 08:59

Sorry, currently there is no dedicated website for demo purposes.

Regards,
Tobias

#10

madapple - August 2, 2008 - 02:36

Crutch
any chance you could show how you modified for the forecast?
and any idea how to have the module display the forecast diirectly?

#11

crutch - December 7, 2008 - 19:08

Hi madapple, sorry for late reply.

I'll have to locate the block code if still interested. I simply dug into the module (specifically the code that displays the block) and moved the content around and added styles.

I didn't attempt any new connections to noaa or other display options. Simply reformatted the existing content.

#12

madapple - December 11, 2008 - 14:58

Crutch

no worries
the bosses decided that standard display was plenty.

Thank you though!

Madapple

#13

crutch - January 10, 2009 - 06:18

Madapple,

Below is the section on the weather.module file. Basically, I hard coded style/layout (some ugly html in there now that I look at it), but gave me quick, flexibility. I'm sure views could handle this in some way. I'm just getting into views after the DIWD conference. Updating the module would require a redo of the weather.module customizations.

It's running on D5.1 and weather-5.x-3.0.tar.gz and works great. I just keep getting white screen when enabling weather block with config beyond that pair. I attempted an install of weather on 6.8 on cPanel tonight and got white screen. There must be a server setting or some other setting that is timing out the METAR data and then timing out the site or the site is not looking for the data or something similar.

Thanks,
Crutch

/**
* Custom theme function for the weather block output
*/
function theme_weather($config, $metar) {
  $content .= '<strong>'. check_plain($config['real_name']) .'</strong><br />';
  if (isset($metar['reported_on'])) {
    $content .= '<small>';
    $content .= t("Re: ");
    $content .= format_date($metar['reported_on']);
    $content .= '</small>';
  }
  $content .='<br /><br />';
  $content .='<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="suttonhomesweather">';
  $content .='<tr>';
  $content .='<td align="center" width="25%">';
  $image = _weather_get_image($metar);
  $content .='<img src="';
  $content .= $image['filename'];
  $content.='" alt="'. $image['alt_text'] .'" '. $image['size'];
  $content .= ' title="'. $image['alt_text'] .'" />';
  $content .='</td>';
  $content .='<td align="center" width="75%">';
  $content .='<font size="2"><b>';
  $content .= _weather_format_condition($metar);
  $content .='</font><br><font size="3">';
  if (isset($metar['temperature'])) {
    $content .= t('!temperature',
      array('!temperature' => _weather_format_temperature($metar['temperature'], $config['units'])));
  }
  $content .='</font><br /><small><a target="_blank" href="http://forecast.weather.gov/MapClick.php?site=phi&FcstType=text&site=RAH&map.x=204&map.y=107">Check forecast</a></small></b></td></tr></table>';
  $content .= '<small>';
  $content .= '<p style="line-height: 100%">';
  $content .='<br />'; 
  if (isset($metar['wind'])) {
    $content .= t('- Wind: !wind',
      array('!wind' => _weather_format_wind($metar['wind'], $config['units'],
        $config['settings'])));
  }
  $content .='<br />';
  if (isset($metar['pressure'])) {
    $content .= t('- Pressure: !pressure',
      array('!pressure' => _weather_format_pressure($metar['pressure'], $config['units'])));
  }
  $content .='<br />';
  if (isset($metar['temperature']) and isset($metar['dewpoint'])) {
    $content .= t('- Humidity: !rel_humidity',
      array('!rel_humidity' =>
        _weather_format_relative_humidity($metar['temperature'], $metar['dewpoint'])));
  }
  $content .='<br />';
  if (isset($metar['visibility']['kilometers'])) {
    $content .= t('- Visibility: !visibility',
      array('!visibility' => _weather_format_visibility($metar['visibility'], $config['units'])));
  }
  $content .='<br />';
  if (isset($metar['#raw']) and $config['settings']['show_unconverted_metar']) {
    $content .= t('METAR data: !metar',
      array('!metar' => '<pre>'. wordwrap($metar['#raw'], 20) .'</pre>'));
  }
    $content .= '</small>';
  return $content;
}

#14

crutch - January 10, 2009 - 06:47

Toddy,

On my php_errorlog I'm getting...

10-Jan-2009 00:34:45] PHP Warning:  MySQL server has gone away
query: INSERT INTO watchdog
    (uid, type, message, variables, severity, link, location, referer, hostname, timestamp)
    VALUES
    (1, &#039;php&#039;, &#039;%message in %file on line %line.&#039;, &#039;a:4:{s:6:\&quot;%error\&quot;;s:12:\&quot;user warning\&quot;;s:8:\&quot;%message\&quot;;s:135:\&quot;MySQL server has gone away\nquery: UPDATE variable SET value = &amp;#039;s:3:\\&amp;quot;FTP\\&amp;quot;;&amp;#039; WHERE name = &amp;#039;weather_fetch&amp;#039;\&quot;;s:5:\&quot;%file\&quot;;s:49:\&quot;/home/yourecru/public_html/includes/bootstrap.inc\&quot;;s:5:\&quot;%line\&quot;;i:499;}&#039;, 3, &#039;&#039;, &#039;http://67.15.243.3/~yourecru/?q=admin/build/block&#039;, &#039;&#039;, &#039;75.177.129.127&#039;, 1231569285) in /home/yourecru/public_html/includes/database.mysql.inc on line 128
[10-Jan-2009 00:34:45] PHP Warning:  MySQL server has gone away
query: UPDATE sessions SET uid = 1, cache = 0, hostname = &#039;75.177.129.127&#039;, session = &#039;updates_remaining|a:0:{}messages|a:1:{s:6:\&quot;status\&quot;;a:1:{i:0;s:37:\&quot;The block settings have been updated.\&quot;;}}&#039;, timestamp = 1231569285 WHERE sid = &#039;c54u7tehave27la113u0aht494&#039; in /home/yourecru/public_html/includes/database.mysql.inc on line 128
[10-Jan-2009 00:34:45] PHP Warning:  MySQL server has gone away
query: UPDATE users SET access = 1231569285 WHERE uid = 1 in /home/yourecru/public_html/includes/database.mysql.inc on line 128

#15

NancyDru - January 10, 2009 - 21:03

I'm guessing you have the watchdog table set up as InnoDB. Change it to MyIsam and this will probably go away.

#16

crutch - June 3, 2009 - 13:17

Toddy,

Just a note, using Weather, Panels and D6.12, everything is working great!

The weather.tpl is perfect for modifying output.

Thanks!

#17

Babalu - June 14, 2009 - 10:17

funnydate.de / Veranstaltungen or on User Profiles
I'm using the Drupal 6 version of weather

#18

crutch - August 11, 2009 - 14:46

- I used weather in panels on my last project and it worked as expected.
- New project simply adding a site-wide block = white screen
- Process was install, activate Weather module
- Config default location
- Config new site-wide block with the same information as the Default location
- Tried to add block to right margin then white screen

---------------

Drupal 6.13
Includes: Aggregator, Block, Database logging, Filter, Garland, Menu, Node, PHP filter, Path, Ping, Profile, Search, Syslog, System, Taxonomy, Trigger, Update status, Upload, User

Modules
Up to dateAdministration menu 6.x-1.5
Also available: 6.x-3.0-alpha2 (2009-Aug-01) Download Release notes

Includes: Administration menu
Up to dateAjax 6.x-1.14
Includes: Ajax, Ajax plugin - fckeditor, Ajax plugin - webform, Ajax ui
Up to dateBackup and Migrate 6.x-1.2
Also available: 6.x-2.x-dev (2009-Aug-06) Download Release notes

Includes: Backup and Migrate
Update availableChaos tool suite 6.x-1.x-dev (2009-Jul-20)
Recommended version: 6.x-1.0-rc1 (2009-Jul-22) Download Release notes
Development version: 6.x-1.x-dev (2009-Aug-10) Download Release notes

Includes: Bulk Export, Chaos tools, Page manager, Views content panes
Update availableContent Construction Kit (CCK) 6.x-2.4
Recommended version: 6.x-2.5 (2009-Aug-03) Download Release notes
Also available: 6.x-3.x-dev (2009-Aug-10) Download Release notes

Includes: Content, Content Copy, Content Permissions, Fieldgroup, Node Reference, Number, Option Widgets, Text, User Reference
Up to dateExternal Links 6.x-1.7
Includes: External Links
Up to dateFCKeditor - WYSIWYG HTML editor 6.x-1.3
Latest version: 6.x-1.4-rc1 (2009-Aug-06) Download Release notes
Also available: 6.x-2.0-beta1 (2009-Mar-19) Download Release notes

Includes: FCKeditor
Up to dateIMCE 6.x-1.2
Includes: IMCE
Up to dateImce CCK Image 6.x-1.0-beta2
Includes: IMCE Image
Up to datejQuery plugins 6.x-1.10
Includes: jQuery plugins
Up to dateLightbox2 6.x-1.9
Includes: Lightbox2
Update availablePanels 6.x-3.0-beta4
Recommended version: 6.x-3.0-rc1 (2009-Jul-22) Download Release notes

Includes: Mini panels, Panel nodes, Panels
Up to datePoormanscron 6.x-1.0
Includes: Poormanscron
Up to dateText Resize 6.x-1.5
Includes: Text Resize
Up to dateViews 6.x-2.6
Also available: 6.x-3.x-dev (2009-Jul-26) Download Release notes

Includes: Views, Views UI, Views exporter
Up to dateViews cycle 6.x-1.0-beta1
Includes: Views Cycle
Up to dateViews Rotator 6.x-1.0-alpha2
Includes: Views Rotator
Up to dateViews Slideshow 6.x-1.0-beta2
Includes: Views Slideshow
Up to dateWebform 6.x-2.7
Also available: 6.x-3.x-dev (2009-Jul-09) Download Release notes

Includes: Webform
Up to dateWorkspace 6.x-1.4-rc1
Includes: Workspace

Themes
Up to dateZen 6.x-1.0
Also available: 6.x-2.x-dev (2009-Jul-24) Download Release notes

 
 

Drupal is a registered trademark of Dries Buytaert.