Changeset 101 for openweather
- Timestamp:
- 19/04/07 04:42:02 (5 years ago)
- File:
-
- 1 edited
-
openweather/openweather.module (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
openweather/openweather.module
r100 r101 84 84 'type' => MENU_SUGGESTED_ITEM); 85 85 86 $items[] = array('path' => 'admin/settings/openweather', 87 'title' => t('openweather'), 88 'callback' => 'drupal_get_form', 89 'callback arguments' => 'openweather_admin_settings', 90 'access' => user_access('administer site configuration'), 91 'type' => MENU_CALLBACK); 92 86 93 } 87 94 else { … … 108 115 'weight' => 3, 109 116 'type' => MENU_CALLBACK); 117 110 118 } 111 119 } … … 119 127 */ 120 128 function openweather_node_info() { 121 return array('openweather' => array('name' => t("openweather"), 'base' => 'openweather')); 129 return array( 130 'openweather' => array( 131 'name' => t("openweather"), 132 'base' => 'openweather', 133 'module' => 'openweather', 134 )); 122 135 } 123 136 … … 135 148 if ($radarURL != null) $output .= "<img src='$radarURL'/>"; 136 149 137 if (module_exist ("weather")){150 if (module_exists("weather")){ 138 151 $b = weather_block('view'); 139 152 $output .= $b['content']; … … 153 166 } 154 167 155 function openweather_ settings() {168 function openweather_admin_settings() { 156 169 $form['openweather_radar'] = array( 157 170 '#type'=>'textfield', … … 250 263 * rendering of the poll. 251 264 */ 252 function openweather_view( &$node, $teaser = FALSE, $page = FALSE, $block = FALSE) {265 function openweather_view($node, $teaser = FALSE, $page = FALSE, $block = FALSE) { 253 266 global $user; 254 267 … … 265 278 $output .= "<img src='?q=node/".$node->nid."/graph/windspeed' />"; 266 279 280 // Only show the add readings form when in full view 281 // $node->teaser = $output; 282 // $node->body = $output; //$output.drupal_get_form('openweather_add_reading', $form); 283 $node = node_prepare($node, $teaser); 267 284 $node->links = $links; 268 // Only show the add readings form when in full view 269 $node->teaser = $output; 270 $node->body = $output; //$output.drupal_get_form('openweather_add_reading', $form); 285 $node->content['graphs'] = array( 286 '#value' => theme('openweather_graphs', $output), 287 '#weight' => 1, 288 ); 289 return $node; 271 290 } 272 291 … … 314 333 'openweather.addEntry', 315 334 'openweather_add_entry', 316 array('boolean','string','string', 'string', 'struct') 335 array('boolean','string','string', 'string', 'struct'), 336 t('Add data entry from remote device'), 317 337 ), 318 338 );
Note: See TracChangeset
for help on using the changeset viewer.
