Changeset 3418862
- Timestamp:
- 12/13/2025 11:04:30 AM (2 months ago)
- Location:
- keiste-solar-report/trunk
- Files:
-
- 5 edited
-
assets/css/solar-analysis.css (modified) (2 diffs)
-
includes/admin-settings.php (modified) (3 diffs)
-
includes/plugin-init.php (modified) (1 diff)
-
keiste-solar-report.php (modified) (8 diffs)
-
readme.txt (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
keiste-solar-report/trunk/assets/css/solar-analysis.css
r3417984 r3418862 202 202 203 203 .ksrad-wrapper .container { 204 max-width: 1200px;205 204 margin: 0 auto; 205 max-width: 650px; 206 206 padding: 0 var(--spacing-md); 207 background-color: unset !important;208 207 } 209 208 … … 1218 1217 .ksrad-wrapper { 1219 1218 min-height: 100%; 1220 margin: 0;1221 1219 padding: 0; 1220 text-align: center; 1222 1221 } 1223 1222 -
keiste-solar-report/trunk/includes/admin-settings.php
r3417330 r3418862 165 165 add_settings_field( 166 166 'google_solar_api_key', 167 ' API Key 1 (Solar API, Maps Javascript API)',167 'Google API Credentials Key', 168 168 array($this, 'google_solar_api_key_callback'), 169 'keiste-solar-admin',170 'api_keys_section'171 );172 173 add_settings_field(174 'google_maps_api_key',175 'API Key 2 (Maps API, Places API (New))',176 array($this, 'google_maps_api_key_callback'),177 169 'keiste-solar-admin', 178 170 'api_keys_section' … … 413 405 if (isset($input['google_solar_api_key'])) { 414 406 $new_input['google_solar_api_key'] = sanitize_text_field($input['google_solar_api_key']); 415 }416 417 if (isset($input['google_maps_api_key'])) {418 $new_input['google_maps_api_key'] = sanitize_text_field($input['google_maps_api_key']);419 407 } 420 408 … … 587 575 isset($this->options['google_solar_api_key']) ? esc_attr($this->options['google_solar_api_key']) : '' 588 576 ); 589 echo '<p class="description">**REQUIRED for fetching solar potential data. (Same API Key for both inputs is recommended)</p>'; 590 } 591 592 public function google_maps_api_key_callback() { 593 printf( 594 '<input type="password" id="google_maps_api_key" name="ksrad_options[google_maps_api_key]" value="%s" class="regular-text" />', 595 isset($this->options['google_maps_api_key']) ? esc_attr($this->options['google_maps_api_key']) : '' 596 ); 597 echo '<p class="description">**REQUIRED for location search and map display. (Same API Key for both inputs is recommended)</p>'; 577 echo '<p class="description">**REQUIRED - Single API key for all Google services (Solar API, Maps JavaScript API, Maps API, Places API)</p>'; 598 578 } 599 579 -
keiste-solar-report/trunk/includes/plugin-init.php
r3416617 r3418862 299 299 $default_options = array( 300 300 'google_solar_api_key' => '', 301 'google_maps_api_key' => '',302 301 'report_key' => '', 303 302 'logo_url' => '', -
keiste-solar-report/trunk/keiste-solar-report.php
r3417984 r3418862 5 5 * Plugin URI: https://keiste.com/keiste-solar-report 6 6 * Description: Comprehensive solar panel analysis tool with ROI calculations, Google Solar API integration, interactive charts, and PDF report generation. 7 * Version: 1.0.1 67 * Version: 1.0.17 8 8 * Author: Dara Burke, Keiste 9 9 * Author URI: https://keiste.com … … 34 34 // Define plugin constants (only once) with ksrad_ namespace 35 35 if (!defined('KSRAD_VERSION')) { 36 define('KSRAD_VERSION', '1.0.1 6');36 define('KSRAD_VERSION', '1.0.17'); 37 37 } 38 38 if (!defined('KSRAD_PLUGIN_DIR')) { … … 120 120 echo '<div style="font-family: Arial, sans-serif; max-width: 800px; margin: 50px auto; padding: 20px; border: 1px solid #dc3545; border-radius: 8px; background: #fff;">'; 121 121 echo '<h2 style="color: #dc3545;">⚠️ Solar Data Not Found (404)</h2>'; 122 echo '<p>The Google Solar API reports that the requested entity was not found for the provided coordinates.</p>';122 echo '<p>The Google Solar API reports that the requested building may not be suitable for solar roof installation.</p>'; 123 123 if (isset($errorResponse['error']['message'])) { 124 124 echo '<p><strong>Message:</strong> ' . esc_html($errorResponse['error']['message']) . '</p>'; 125 125 } 126 echo '<p>Please verify the latitude and longitude, or try a location within Google Solar coverage.</p>';126 echo '<p>Please choose another building, or try a location within Google Solar coverage. <a href="#" onclick="location.reload(); return false;">Try Again</a></p>'; 127 127 echo '</div>'; 128 128 exit; … … 329 329 <h3 style="color: #2A2A28; margin-bottom: 1rem; font-size: 1.3em; font-weight: 600;">🔍 How Much Can You Save With Solar? 330 330 </h3> 331 <h5 style="font-size: 1 rem; color: #2a2a28; font-family: 'Brush Script MT', cursive;">by <a href="https://keiste.com" target="_blank" rel="noopener noreferrer">Keiste.com</a></h5>331 <h5 style="font-size: 1.6rem; color: #2a2a28; font-family: 'Brush Script MT', cursive;">by <a href="https://keiste.com" target="_blank" rel="noopener noreferrer">Keiste.com</a></h5> 332 332 333 333 <?php if (apply_filters('ksrad_is_premium', false)): ?> … … 381 381 <?php endif; ?> 382 382 383 <p style="color: #3A3A38; margin-bottom: 0.5rem; font-weight: 500;">Use the search box below to select an 384 address.</p> 383 <p style="color: #3A3A38; margin-bottom: 0.5rem; font-size: 1.2rem; font-weight: 500;">Select your country and building type. Then search for your chosen building address.</p> 385 384 <p style="color: #5A5A58; font-size: 1rem; margin-bottom: 0;">We'll analyze solar potential 386 and show you financial projections for your building. </p>385 and show you financial projections for your building. Correct building type is required for the correct grant calculations.</p> 387 386 </div> 388 387 … … 446 445 </div> 447 446 447 <?php if (empty(ksrad_get_option('google_solar_api_key', ''))): ?> 448 <div class="row"> 449 <div class="section map-section col-md-12" id="map-section"> 450 <div class="alert alert-warning" style="text-align: center; padding: 2rem; margin: 2rem auto;"> 451 <h4 style="margin-bottom: 1rem;">⚠️ API Key Required</h4> 452 <p>You must add your Google API key in order for this plugin to function.</p> 453 <p>Go to <a href="https://console.cloud.google.com" target="_blank" rel="noopener">console.cloud.google.com</a>, open a free account, and enable the following APIs for your key:</p> 454 <ul style="list-style: none; padding: 0; margin: 1rem 0;"> 455 <li>✓ Google Solar API</li> 456 <li>✓ Places API (New)</li> 457 <li>✓ Maps JavaScript API</li> 458 <li>✓ Maps API</li> 459 </ul> 460 <p><a href="<?php echo admin_url('admin.php?page=ksrad-solar'); ?>" class="button button-primary">Enter API Key in Settings</a></p> 461 <p style="font-size: 0.9em; margin-top: 1rem;">See documentation for further details.</p> 462 </div> 463 </div> 464 </div> 465 <?php else: ?> 448 466 <div class="row"> 449 467 <div class="section map-section col-md-12" id="map-section"> … … 451 469 </div> 452 470 </div> 471 <?php endif; ?> 453 472 454 473 <script> … … 730 749 </div> 731 750 </div> 732 </div> 733 751 752 </div> 753 <p class="mt-3 align-center"><a href="/how-is-our-math/" style="color: #5A5A58;font-size: 0.9rem;" >How is our math?</a></p> 734 754 </div> 735 755 -
keiste-solar-report/trunk/readme.txt
r3417988 r3418862 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.0.1 67 Stable tag: 1.0.17 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 15 15 The Keiste Solar Report is a powerful WordPress plugin that provides comprehensive solar project analysis for US, Canadian, UK and Irish buildings including residential, commercial, community, business and farm buildings. Using Google's Solar API, it delivers accurate solar potential assessments, financial projections, and detailed ROI calculations. 16 16 17 The visitor simply enters a building address, their monthly electricity bill amount and their preferred System Size (ie. no of solar panels). They receive a full financial and technical breakdown along with a 10-12 page bespoke-designed personalized report download (Enterprise Plan only). 17 The visitor simply enters a building address, their average monthly electricity bill amount and their preferred System Size (ie. no of solar panels). They receive a full financial and technical breakdown along with a 10-12 page bespoke-designed personalized report download (Enterprise Plan only). 18 19 <b>NB: You will need a Google Cloud API Key to use this plugin</b> 18 20 19 21 Calculations for the visitor's solar project include estimates of Return on Investment, CO2 saved and solar project breakeven point. 20 22 21 23 The Keiste Solar Plugin features a Google Solar API integration, interactive charts, a lead generation form (Premium Plan or above) and tons more features. 24 25 </b>This interface uses 400W solar panels as standard. All the figures eg. grant, loan, small-medium-large system size and other estimates are entered by you the plugin admin in the settings. Figures are meant as estimates only, not as quotes. For the grant calculations to work, user must choose the correct building type from the dropdown menu. See the docs for more info.</b> 22 26 23 27 Check out our Enterprise Plan which will programmatically verify your visitor lead data eg. phone number and email address as well as a custom-designed personalized downloadable report. … … 80 84 Parts of rural Ireland are not covered by the satellite and so won't appear on the results. 81 85 86 Panels are chosen by the system as 400W (small) panels less than 2m squared in area. 87 88 It's up to the website admin to decide all variables in the system such as grant, loan, small - medium - large installation job cost per kWh, country geographic variables etc. 89 82 90 Stay tuned for new country support, multi-language support and additional features. 83 91 … … 92 100 1. Upload the plugin files to `/wp-content/plugins/keiste-solar-report/` or install via WordPress plugin installer 93 101 2. Activate the plugin through the 'Plugins' menu in WordPress 94 3. **IMPORTANT: Get your Google Solar API key** (see Configuration below). Enable Google Places (New) API, Google Maps API and Google Solar API for this key. Add http website restrictions to the key on your Google Console for your domain only.95 4. Go to **Solar Leads → Settings** and enter your API Key (or keys)102 3. **IMPORTANT: Get your Google Console API key** (see Configuration below). Log on to cloud.google.com and create an credentials key. Enable Google Places (New) API, Google Maps API, Google Maps Javascript API and Google Solar API for this key. Don't forget to add http website restrictions to the key - for your domain only. So noone else can use your key. 103 4. Go to **Solar Leads → Settings** and enter your API Key near the top of the page 96 104 5. Add the shortcode `[keiste_solar_report]` to any page 97 105 … … 132 140 This plugin connects to an API to obtain solar info, it's needed to show the iridescence information and access satellite photos of roofs of buildings. 133 141 134 This service is provided by "Google": terms of use,privacy policy142 This service is provided by "Google": please consult Google for the terms of use and privacy policy 135 143 136 144 == Frequently Asked Questions == 145 146 = Why do i get a red error (404) page when i search my building address? = 147 148 Not every building will be able to have solar panels fitted to the roof. Some buildings are located outside the satellite area. Try another building or contact a solar installer. 137 149 138 150 = Do I need a Google API key? = … … 181 193 182 194 1. Address search interface with Google Maps autocomplete 183 2. ROI results dashboard showing payback period and savings184 3. Interactive break-even chart over 25 years185 4. System size configuration with panel slider186 5. Financial inputs and customization options195 2. System size configuration with panel slider 196 3. ROI results dashboard showing payback period and savings 197 4. Financial analysis charts 198 5. Grant and installation variables entered by website admin 187 199 188 200 == Changelog == 201 202 = 1.0.17 = 203 * Simplified API key configuration - now uses single Google API key for all services 204 * Added conditional display for API key setup message (only shows when key is missing) 205 * Improved admin settings interface with clearer API requirements 206 * Removed redundant google_maps_api_key field 189 207 190 208 = 1.0.10 = … … 193 211 * Centered input field alignment 194 212 * Updated form control widths for better mobile display 195 196 = 1.0.9 =197 * Fixed: Added missing config-inline.js file198 * Fixed: Font Awesome loading from local files instead of CDN199 * Improved: Asset enqueuing and dependency management200 213 201 214 = 1.0.0 = … … 230 243 * Uses Google Maps API for rooftop satellite image 231 244 * Uses Google Maps Javascript API for logic 232 * Uses Google Places API for autocomplete address bar245 * Uses Google Places (New) API for autocomplete address bar 233 246 * Charts powered by Chart.js 234 247 * PDF generation by gamma.app
Note: See TracChangeset
for help on using the changeset viewer.