Changeset 331573
- Timestamp:
- 01/12/2011 04:12:14 AM (15 years ago)
- Location:
- wunderground/branches/wordpress-weather
- Files:
-
- 2 edited
-
readme.txt (modified) (5 diffs)
-
wordpress-weather.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wunderground/branches/wordpress-weather/readme.txt
r331384 r331573 4 4 Tested up to: 3.0.3 5 5 Stable tag: trunk 6 Contributors: katzwebdesign 6 Contributors: katzwebdesign,rjune 7 7 Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zackkatz%40gmail%2ecom&item_name=WP%20Wunderground%20for%20WordPress&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8 8 8 9 Get accurate and beautiful weather forecasts powered by Wunderground.com for your content or your sidebar.9 Pulls weather forecasts from different providers and displays them elegantly via widget or shortcode. 10 10 11 11 == Description == … … 48 48 <h4>Using the `[forecast]` Shortcode</h4> 49 49 If you're a maniac for shortcodes, and you want all control all the time, this is a good way to use it. 50 * list of supported parameters: source, location, measurement, caption, 51 * numdays, linkdays, datelabel, todaylabel, cache, class, highlow, iconset. 50 52 51 53 `[forecast location="Tokyo, Japan" caption="Weather for Tokyo" measurement='F' todaylabel="Today" datelabel="date('m/d/Y')" highlow='%%high%%°/%%low%%°' numdays="3" iconset="Cartoon" class="css_table_class"]` … … 53 55 <strong>The shortcode supports the following settings:</strong> 54 56 57 * `source="wunderground"` - Can be "wunderground" or "accuweather", more sources to come 55 58 * `location="Tokyo, Japan"` - Use any city/state combo or US/Canada ZIP code 56 59 * `caption="Weather for Tokyo"` - Add a caption to your table (it's like a title) … … 60 63 * `highlow='%%high%%°/%%low%%°'` - Format how the highs & low temps display ("85°/35°" in this example) 61 64 * `numdays=3` - Change the number of days displayed in the forecast. Up to 6 day forecast. 65 * `linkdays=false` - Make the daily forecast a link back to the source, true or on to enable, anything else disables 62 66 * `iconset="Cartoon"` - Choose your iconset from one of 10 great options 63 67 * `class="css_table_class"` - Change the CSS class of the generated forecast table … … 151 155 152 156 == Changelog == 157 158 = 2.0 = 159 * Rewrote backend to allow collection of data from various weather sources(AccuWeather and Weather Underground Initially) 160 * Added themes not tied to any weather service(Humanity) 161 * Changed HTML to a list, with CSS to control it. *TODO* Need to make css user editable 162 * Backwards compatibility needs tested. 153 163 154 164 = 1.2.3 = -
wunderground/branches/wordpress-weather/wordpress-weather.php
r331563 r331573 60 60 function shortcode($atts) { 61 61 $settings = shortcode_atts( array( 62 'source' => " base"62 'source' => "wunderground" 63 63 , 'location' => "46534" 64 64 , 'measurement' => "F" … … 86 86 break; 87 87 case "wunderground": 88 default: 88 89 include("wpw-backwunderground.inc"); 89 90 $wpw_obj = new wpw_backWunderground(); 90 break;91 default:92 include("wpw-backbase.inc");93 $wpw_obj = new wpw_backBase();94 91 break; 95 92 } … … 108 105 $wpw_obj->setDays(absint($settings['numdays'])); 109 106 switch(strtolower($settings['linkdays'])) { 110 case " false":111 case "o ff":112 $wpw_obj->setDaysLink( false);107 case "true": 108 case "on": 109 $wpw_obj->setDaysLink(true); 113 110 break; 114 111 default: 115 $wpw_obj->setDaysLink( true);112 $wpw_obj->setDaysLink(false); 116 113 break; 117 114 }
Note: See TracChangeset
for help on using the changeset viewer.