Changeset 2890623
- Timestamp:
- 03/30/2023 06:43:21 PM (3 years ago)
- Location:
- home-value/trunk
- Files:
-
- 5 edited
-
EightB_Home_Value.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
static/js.js (modified) (6 diffs)
-
vendor/eightb/home_plugin_1/client/email_trait.php (modified) (3 diffs)
-
vendor/eightb/home_plugin_1/client/shortcodes_trait.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
home-value/trunk/EightB_Home_Value.php
r2832539 r2890623 7 7 Plugin Name: 8b Home Value 8 8 Plugin URI: https://homevalueplugin.com 9 Version: 2.3 29 Version: 2.33 10 10 */ 11 11 -
home-value/trunk/readme.txt
r2872661 r2890623 5 5 Requires at least: 4.6 6 6 Stable tag: trunk 7 Tested up to: 6. 17 Tested up to: 6.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 79 79 80 80 == Changelog == 81 82 = 2.33 20230330 = 83 84 * JS field and ajax fix 81 85 82 86 = 2.32 20221212 = -
home-value/trunk/static/js.js
r2105861 r2890623 4 4 @since 2016-12-23 18:44:35 5 5 **/ 6 jQuery(function($) 7 { 8 $.fn.extend( 9 { 10 ajaxify_form : function() 11 { 12 return this.each(function () 13 { 14 var $$ = $(this); 15 16 var $div = $( '.8b_home_value' ); 17 18 /** 19 @brief Send the form content via ajax, and then replace the page contents with the new contents. 20 @since 2016-12-23 19:21:17 21 **/ 22 $$.send_via_ajax = function() 23 { 24 $.post( { 25 'data': $$.serialize(), 26 'type': $$.attr('method'), 27 'url': $$.attr('action') 28 } ) 29 .done( function( data ) 30 { 31 // Replace the content with the new content. 32 var $data = $( data ); 33 var $new_div = $( '.8b_home_value', $data ); 34 $div.html( $new_div.html() ); 35 $div.removeClass( 'busy' ); 36 // And restart all javascript. 37 eightb_home_value(); 38 } ); 39 } 40 41 $$.submit( function( e ) 42 { 43 e.preventDefault(); 44 $div.addClass( 'busy' ); 45 $$.send_via_ajax(); 46 } ); 47 }); 48 } 49 }); 6 jQuery(function ($) { 7 $.fn.extend( 8 { 9 ajaxify_form: function () { 10 return this.each(function () { 11 var $$ = $(this); 12 13 var $div = $('.8b_home_value'); 14 15 /** 16 @brief Send the form content via ajax, and then replace the page contents with the new contents. 17 @since 2016-12-23 19:21:17 18 **/ 19 $$.send_via_ajax = function () { 20 $.post({ 21 'data': $$.serialize(), 22 'type': $$.attr('method'), 23 'url': $$.attr('action') 24 }) 25 .done(function (data) { 26 // Replace the content with the new content. 27 var $data = $(data); 28 var $new_div = $('.8b_home_value', $data); 29 $div.html($new_div.html()); 30 $div.removeClass('busy'); 31 // And restart all javascript. 32 eightb_home_value(); 33 }); 34 }; 35 36 $$.submit(function (e) { 37 e.preventDefault(); 38 // Check if the found_address field has a value 39 var $found_address = $('.found_address', $$); 40 // check if the found_address exists 41 if ($found_address.length != 0) { 42 if ($found_address.val().trim() === '') { 43 // If the found_address field is empty, do not proceed with the submission 44 // console.log('found address is empty'); 45 return; 46 } 47 } 48 $div.addClass('busy'); 49 $$.send_via_ajax(); 50 }); 51 }); 52 } 53 }); 50 54 }(jQuery)); 51 55 ; … … 54 58 @since 2016-12-23 19:29:36 55 59 **/ 56 jQuery(function($) 57 { 58 $.fn.extend( 59 { 60 noncify_form : function() 61 { 62 return this.each(function () 63 { 64 var $$ = $(this); 65 66 // Put the nonce into the form. 67 $( '<input>' ) 68 .prop( 'type', 'hidden' ) 69 .prop( 'name', '8b_home_value[nonce]' ) 70 .val( eightb_home_value_data.nonce ) 71 .appendTo( $$ ); 72 }); 73 } 74 }); 60 jQuery(function ($) { 61 $.fn.extend( 62 { 63 noncify_form: function () { 64 return this.each(function () { 65 var $$ = $(this); 66 67 // Put the nonce into the form. 68 $('<input>') 69 .prop('type', 'hidden') 70 .prop('name', '8b_home_value[nonce]') 71 .val(eightb_home_value_data.nonce) 72 .appendTo($$); 73 }); 74 } 75 }); 75 76 }(jQuery)); 76 77 ; … … 79 80 @since 2016-12-16 23:08:04 80 81 **/ 81 jQuery(function($) 82 { 83 $.fn.extend( 84 { 85 address_found : function() 86 { 87 return this.each(function () 88 { 89 var $$ = $(this); 90 91 // Put the nonce into the form. 92 var $input = $( '<input>' ) 93 .prop( 'type', 'hidden' ) 94 .prop( 'name', '8b_home_value[nonce]' ) 95 .val( eightb_home_value_data.nonce ) 96 .appendTo( $( 'form', $$ ) ); 97 98 var $image = $( '.street_view img', $$ ); 99 100 var url = $image.data( 'url' ); 101 102 // Get the dimensions. 103 var height = $image.height(); 104 var width = $image.width(); 105 106 // Replace the resolution in the street view url. 107 url = url.replace( 'RESOLUTION', width + 'x' + height ); 108 109 $image.prop( 'src', url ); 110 }); 111 } 112 }); 82 jQuery(function ($) { 83 $.fn.extend( 84 { 85 address_found: function () { 86 return this.each(function () { 87 var $$ = $(this); 88 89 // Put the nonce into the form. 90 var $input = $('<input>') 91 .prop('type', 'hidden') 92 .prop('name', '8b_home_value[nonce]') 93 .val(eightb_home_value_data.nonce) 94 .appendTo($('form', $$)); 95 96 var $image = $('.street_view img', $$); 97 98 var url = $image.data('url'); 99 100 // Get the dimensions. 101 var height = $image.height(); 102 var width = $image.width(); 103 104 // Replace the resolution in the street view url. 105 url = url.replace('RESOLUTION', width + 'x' + height); 106 107 $image.prop('src', url); 108 }); 109 } 110 }); 113 111 }(jQuery)); 114 112 ; … … 117 115 @since 2016-12-11 20:18:44 118 116 **/ 119 jQuery(function($) 120 { 121 $.fn.extend( 122 { 123 ask_for_address : function() 124 { 125 return this.each(function () 126 { 127 var $$ = $(this); 128 129 var $address = $( 'input.address', $$ ); 130 var $found_address = $( '.found_address', $$ ); 131 132 autocomplete = new google.maps.places.Autocomplete 133 ( 134 $address[ 0 ], 135 { 136 types: ['geocode'], 137 componentRestrictions: { country: 'us' } 138 } 139 ); 140 141 google.maps.event.addListener(autocomplete, 'place_changed', function() 142 { 143 var found_parts = {}; 144 var needed_parts = { 145 0 : 'street_number', 146 1 : 'route', 147 2 : 'postal_code', 148 }; 149 150 var place = this.getPlace(); 151 var components = place.address_components; 152 153 for ( var part_number in needed_parts ) 154 { 155 var part_key = needed_parts[ part_number ]; 156 157 for ( var counter = 0; counter < components.length ; counter++ ) 158 if ( components[ counter ].types[ 0 ] == part_key ) 159 found_parts[ part_key ] = components[ counter ].long_name; 160 } 161 162 var found_address = found_parts[ 'street_number' ] + ' ' + found_parts[ 'route' ] + ';' + found_parts[ 'postal_code' ]; 163 $found_address.val( found_address ); 164 } ); 165 166 }); 167 } 168 }); 117 jQuery(function ($) { 118 $.fn.extend( 119 { 120 ask_for_address: function () { 121 return this.each(function () { 122 var $$ = $(this); 123 124 var $address = $('input.address', $$); 125 var $found_address = $('.found_address', $$); 126 127 autocomplete = new google.maps.places.Autocomplete 128 ( 129 $address[0], 130 { 131 types: ['geocode'], 132 componentRestrictions: { country: 'us' } 133 } 134 ); 135 136 google.maps.event.addListener(autocomplete, 'place_changed', function () { 137 var found_parts = {}; 138 var needed_parts = { 139 0: 'street_number', 140 1: 'route', 141 2: 'postal_code', 142 }; 143 144 var place = this.getPlace(); 145 var components = place.address_components; 146 147 for (var part_number in needed_parts) { 148 var part_key = needed_parts[part_number]; 149 150 for (var counter = 0; counter < components.length; counter++) 151 if (components[counter].types[0] == part_key) 152 found_parts[part_key] = components[counter].long_name; 153 } 154 155 var found_address = found_parts['street_number'] + ' ' + found_parts['route'] + ';' + found_parts['postal_code']; 156 $found_address.val(found_address); 157 }); 158 159 }); 160 } 161 }); 169 162 }(jQuery)); 170 163 ; … … 173 166 @since 2015-07-11 19:47:46 174 167 **/ 175 ;(function( $ ) 176 { 177 $.fn.extend( 178 { 179 plainview_form_auto_tabs : function() 180 { 181 return this.each( function() 182 { 183 var $this = $(this); 184 185 if ( $this.hasClass( 'auto_tabbed' ) ) 186 return; 187 188 $this.addClass( 'auto_tabbed' ); 189 190 var $fieldsets = $( 'div.fieldset', $this ); 191 if ( $fieldsets.length < 1 ) 192 return; 193 194 $this.prepend( '<div style="clear: both"></div>' ); 195 // Create the "tabs", which are normal Wordpress tabs. 196 var $subsubsub = $( '<ul class="subsubsub">' ) 197 .prependTo( $this ); 198 199 $.each( $fieldsets, function( index, item ) 200 { 201 var $item = $(item); 202 var $h3 = $( 'h3.title', $item ); 203 var $a = $( '<a href="#">' ).html( $h3.html() ); 204 $h3.remove(); 205 var $li = $( '<li>' ); 206 $a.appendTo( $li ); 207 $li.appendTo( $subsubsub ); 208 209 // We add a separator if we are not the last li. 210 if ( index < $fieldsets.length - 1 ) 211 $li.append( '<span class="sep"> | </span>' ); 212 213 // When clicking on a tab, show it 214 $a.click( function() 215 { 216 $( 'li a', $subsubsub ).removeClass( 'current' ); 217 $(this).addClass( 'current' ); 218 $fieldsets.hide(); 219 $item.show(); 220 } ); 221 222 } ); 223 224 $( 'li a', $subsubsub ).first().click(); 225 } ); // return this.each( function() 226 } // plugin: function() 227 } ); // $.fn.extend({ 228 } )( jQuery ); 168 ; (function ($) { 169 $.fn.extend( 170 { 171 plainview_form_auto_tabs: function () { 172 return this.each(function () { 173 var $this = $(this); 174 175 if ($this.hasClass('auto_tabbed')) 176 return; 177 178 $this.addClass('auto_tabbed'); 179 180 var $fieldsets = $('div.fieldset', $this); 181 if ($fieldsets.length < 1) 182 return; 183 184 $this.prepend('<div style="clear: both"></div>'); 185 // Create the "tabs", which are normal Wordpress tabs. 186 var $subsubsub = $('<ul class="subsubsub">') 187 .prependTo($this); 188 189 $.each($fieldsets, function (index, item) { 190 var $item = $(item); 191 var $h3 = $('h3.title', $item); 192 var $a = $('<a href="#">').html($h3.html()); 193 $h3.remove(); 194 var $li = $('<li>'); 195 $a.appendTo($li); 196 $li.appendTo($subsubsub); 197 198 // We add a separator if we are not the last li. 199 if (index < $fieldsets.length - 1) 200 $li.append('<span class="sep"> | </span>'); 201 202 // When clicking on a tab, show it 203 $a.click(function () { 204 $('li a', $subsubsub).removeClass('current'); 205 $(this).addClass('current'); 206 $fieldsets.hide(); 207 $item.show(); 208 }); 209 210 }); 211 212 $('li a', $subsubsub).first().click(); 213 }); // return this.each( function() 214 } // plugin: function() 215 }); // $.fn.extend({ 216 })(jQuery); 229 217 ; 230 218 /** … … 232 220 @since 2016-12-11 20:19:08 233 221 **/ 234 eightb_home_value = function() 235 { 236 $( '.8b_home_value .ask_for_address' ).ask_for_address(); 237 $( '.8b_home_value .address_found' ).address_found(); 238 $( '.8b_home_value form' ).ajaxify_form(); 239 $( '.8b_home_value form' ).noncify_form(); 240 $( 'form.plainview_form_auto_tabs' ).plainview_form_auto_tabs(); 241 } 242 243 jQuery( document ).ready( function( jQuery ) 244 { 222 eightb_home_value = function () { 223 $('.8b_home_value .ask_for_address').ask_for_address(); 224 $('.8b_home_value .address_found').address_found(); 225 $('.8b_home_value form').ajaxify_form(); 226 $('.8b_home_value form').noncify_form(); 227 $('form.plainview_form_auto_tabs').plainview_form_auto_tabs(); 228 }; 229 230 jQuery(document).ready(function (jQuery) { 245 231 $ = jQuery; 246 232 eightb_home_value(); 247 248 if($(".input_itself input[type=range][name=home_extra_value]").length > 0 ) 249 { 250 //add range output box after range element :ky 06/07/2019 251 $(".input_itself input[type=range][name=home_extra_value]").each(function(){ 252 if(!$(this).next(".range-output").length) 253 { 233 234 if ($(".input_itself input[type=range][name=home_extra_value]").length > 0) { 235 //add range output box after range element :ky 06/07/2019 236 $(".input_itself input[type=range][name=home_extra_value]").each(function () { 237 if (!$(this).next(".range-output").length) { 254 238 $(this).after('<span class="range-output" id="range-output"></span>'); 255 239 } 256 }); 257 //update range value data in output box : KY 06/08/2019 258 var slider = document.getElementById("plainview_sdk_eightb_home_value_form2_inputs_range_home_extra_value"); 259 var output = document.getElementById("range-output"); 260 output.innerHTML = slider.value + '%'; 261 //update range value data in output box on onchange: KY 06/08/2019 262 slider.oninput = function() { 263 output.innerHTML = this.value + '%'; 240 }); 241 //update range value data in output box : KY 06/08/2019 242 var slider = document.getElementById("plainview_sdk_eightb_home_value_form2_inputs_range_home_extra_value"); 243 var output = document.getElementById("range-output"); 244 output.innerHTML = slider.value + '%'; 245 //update range value data in output box on onchange: KY 06/08/2019 246 slider.oninput = function () { 247 output.innerHTML = this.value + '%'; 248 }; 264 249 } 265 } 266 } ); 267 ; 268 250 }); 251 ; 252 -
home-value/trunk/vendor/eightb/home_plugin_1/client/email_trait.php
r2312907 r2890623 6 6 @brief Handle all e-mailing 7 7 @since 2017-03-05 14:20:12 8 **/8 **/ 9 9 trait email_trait 10 10 { … … 12 12 @brief Send this lead to the specified e-mails. 13 13 @since 2016-12-09 22:10:23 14 **/15 public function send_lead( $lead, $shortcodes)14 **/ 15 public function send_lead($lead, $shortcodes) 16 16 { 17 17 18 18 $mail = $this->mail(); 19 19 20 $sender_email = $this->get_local_or_site_option( 'email_new_lead_sender_email');21 $sender_email = do_shortcode( $sender_email);22 if ( $sender_email == '')23 // Send from the admin24 $sender_email = get_option( 'admin_email', true);25 $sender_name = $this->get_local_or_site_option( 'email_new_lead_sender_name');26 $sender_name = do_shortcode( $sender_name);20 $sender_email = $this->get_local_or_site_option('email_new_lead_sender_email'); 21 $sender_email = do_shortcode($sender_email); 22 if ($sender_email == '') 23 // Send from the admin 24 $sender_email = get_option('admin_email', true); 25 $sender_name = $this->get_local_or_site_option('email_new_lead_sender_name'); 26 $sender_name = do_shortcode($sender_name); 27 27 //$mail->from( $sender_email, $sender_name ); 28 28 29 $recipients = $this->get_local_or_site_option( 'email_new_lead_recipients');29 $recipients = $this->get_local_or_site_option('email_new_lead_recipients'); 30 30 // Allow shortcodes in the recipients. 31 $recipients = do_shortcode( $recipients);32 $recipients = $this->string_to_emails( $recipients);31 $recipients = do_shortcode($recipients); 32 $recipients = $this->string_to_emails($recipients); 33 33 /*Custom Code Start 2019/03/09 I have added conditional code for send email to lead_email */ 34 if( isset( $lead->meta ) && isset( $lead->meta->lead_email ) ) 35 { 34 if (isset($lead->meta) && isset($lead->meta->lead_email)) { 36 35 $recipients[$lead->meta->lead_email] = $lead->meta->lead_email; 37 36 } 38 37 /*Custom Code End 2019/03/09*/ 39 38 $to_array = []; 40 foreach( $recipients as $rec ) 41 { 39 foreach ($recipients as $rec) { 42 40 //$mail->to( $rec ); 43 41 $to_array[] = $rec; 44 42 } 45 43 46 44 47 45 $texts = []; 48 $texts[ 'subject' ] = $this->get_local_or_site_option( 'email_new_lead_subject');49 $texts[ 'text' ] = $this->get_local_or_site_option( 'email_new_lead_text');46 $texts['subject'] = $this->get_local_or_site_option('email_new_lead_subject'); 47 $texts['text'] = $this->get_local_or_site_option('email_new_lead_text'); 50 48 51 49 // Replace lead shortcodes. 52 foreach ( $texts as $index => $string)53 $texts[ $index ] = $this->replace_shortcodes( $texts[ $index ], $shortcodes);50 foreach ($texts as $index => $string) 51 $texts[$index] = $this->replace_shortcodes($texts[$index], $shortcodes); 54 52 55 53 /** 56 54 @brief Compatibility for version 2.1 that does not have properly prefixed lead shortcodes. 57 55 @since 2017-02-28 19:04:00 58 **/ 59 foreach( $shortcodes as $key => $value ) 60 foreach( $texts as $index => $string ) 61 $texts[ $index ] = str_replace( '[' . $key . ']', $value, $texts[ $index ] ); 62 56 **/ 57 foreach ($shortcodes as $key => $value) 58 foreach ($texts as $index => $string) { 59 // edited by bill bailey 3/29/2023 60 // if $value is not a string or number we don't want to replace it. 61 if (!is_string($value) && !is_numeric($value)) { 62 continue; 63 } 64 $texts[$index] = str_replace('[' . $key . ']', $value, $texts[$index]); 65 } 63 66 //$mail->subject( $texts[ 'subject' ] ); 64 67 //$mail->html( $texts[ 'text' ] ); 65 $headers[] = 'From: ' .$sender_name.' <'.$sender_email.'>' . "\r\n";68 $headers[] = 'From: ' . $sender_name . ' <' . $sender_email . '>' . "\r\n"; 66 69 $headers[] = 'Content-Type: text/html; charset=UTF-8'; 67 $subject = $texts[ 'subject'];68 $html = $texts[ 'text'];70 $subject = $texts['subject']; 71 $html = $texts['text']; 69 72 70 73 //add_filter( 'wp_mail_content_type', array( $this, 'set_html_content_type' ) ); 71 74 72 foreach( $to_array as $to ) 73 { 74 wp_mail( $to, $subject, $html, $headers ); 75 foreach ($to_array as $to) { 76 wp_mail($to, $subject, $html, $headers); 75 77 } 76 78 //remove_filter( 'wp_mail_content_type', array( $this, 'set_html_content_type' ) ); … … 82 84 }*/ 83 85 } 84 -
home-value/trunk/vendor/eightb/home_plugin_1/client/shortcodes_trait.php
r2105861 r2890623 6 6 @brief Handles shortcode functions. 7 7 @since 2017-03-05 11:32:31 8 **/8 **/ 9 9 trait shortcodes_trait 10 10 { … … 13 13 @details For example: 8b_home_value_ 14 14 @since 2017-03-05 11:33:05 15 **/15 **/ 16 16 public function get_plugin_prefix() 17 17 { 18 $this->wp_die( 'Please override this function: %s\%s', __CLASS__, __FUNCTION__);18 $this->wp_die('Please override this function: %s\%s', __CLASS__, __FUNCTION__); 19 19 } 20 20 … … 23 23 @details The default is the plugin prefix. 24 24 @since 2017-03-07 22:27:42 25 **/25 **/ 26 26 public function get_shortcode_name() 27 27 { … … 33 33 @details The default is shortcode_PLUGINPREFIX 34 34 @since 2017-03-07 22:27:51 35 **/35 **/ 36 36 public function get_shortcode_function() 37 37 { … … 44 44 @brief Replace the shortcodes in this text. 45 45 @since 2017-02-24 23:54:27 46 **/47 public function replace_shortcodes( $text, $replacements)46 **/ 47 public function replace_shortcodes($text, $replacements) 48 48 { 49 49 $prefix = $this->get_plugin_prefix(); 50 foreach( $replacements as $find => $replacement ) 51 $text = str_replace( '[' . $prefix . '_' . $find . ']', $replacement, $text ); 52 53 50 foreach ($replacements as $find => $replacement) { 51 // edited by bill bailey 3/29/2023 52 // if $replacement is not a string or number we don't want to replace it. 53 if (!is_string($replacement) && !is_numeric($replacement)) { 54 continue; 55 } 56 $text = str_replace('[' . $prefix . '_' . $find . ']', $replacement, $text); 57 } 58 59 54 60 /*Custom Code Start 2019/03/09 Add comparables data template file.*/ 55 61 $comparables_text = '<h5 class="hv-recent-sales">Recent Local Sales</h5>'; 56 if( isset( $replacements["comparables"] ) && count( $replacements["comparables"] ) > 0) 57 { 62 if (isset($replacements["comparables"]) && count($replacements["comparables"]) > 0) { 58 63 $temp_comp_array = $replacements["comparables"]; 59 usort($temp_comp_array, function ($a, $b) {64 usort($temp_comp_array, function ($a, $b) { 60 65 return $a->attributes->saleDate < $b->attributes->saleDate; 61 66 }); 62 63 64 $comparables_looop_count =0;65 66 67 $found_check =0;67 68 69 $comparables_looop_count = 0; 70 71 72 $found_check = 0; 68 73 $map_location_data = array(); 69 74 $map_location_data_str = ""; 70 $map_location_center_data ="";75 $map_location_center_data = ""; 71 76 //print_r( $temp_comp_array); 72 for($count = 0; $count < count($temp_comp_array ); $count++ ) 73 { 74 if( strtotime("-6 months") < $temp_comp_array[$count]->attributes->saleDate && isset( $temp_comp_array[$count]->attributes->salePrice ) && $temp_comp_array[$count]->attributes->salePrice > 0 ) 75 { 76 if( $map_location_center_data == "" ) 77 { 78 $map_location_center_data = "lat: ".$temp_comp_array[$count]->coordinates->latitude.", lng: ".$temp_comp_array[$count]->coordinates->longitude; 77 for ($count = 0; $count < count($temp_comp_array); $count++) { 78 if (strtotime("-6 months") < $temp_comp_array[$count]->attributes->saleDate && isset($temp_comp_array[$count]->attributes->salePrice) && $temp_comp_array[$count]->attributes->salePrice > 0) { 79 if ($map_location_center_data == "") { 80 $map_location_center_data = "lat: " . $temp_comp_array[$count]->coordinates->latitude . ", lng: " . $temp_comp_array[$count]->coordinates->longitude; 79 81 } 80 82 setlocale(LC_MONETARY, 'en_US'); 81 $map_location_data[] = array('<div class="show_value"><p class="hv_address">' .$temp_comp_array[$count]->address->deliveryLine.'</p><p class="hv_address">Sale Price: $'.$this->number_format( $temp_comp_array[$count]->attributes->salePrice ).'</p><p class="hv_address">Sale Date: '.date("m/d/Y",$temp_comp_array[$count]->attributes->saleDate).'</p></div>',$temp_comp_array[$count]->coordinates->latitude,$temp_comp_array[$count]->coordinates->longitude,($found_check+1));83 $map_location_data[] = array('<div class="show_value"><p class="hv_address">' . $temp_comp_array[$count]->address->deliveryLine . '</p><p class="hv_address">Sale Price: $' . $this->number_format($temp_comp_array[$count]->attributes->salePrice) . '</p><p class="hv_address">Sale Date: ' . date("m/d/Y", $temp_comp_array[$count]->attributes->saleDate) . '</p></div>', $temp_comp_array[$count]->coordinates->latitude, $temp_comp_array[$count]->coordinates->longitude, ($found_check + 1)); 82 84 $comparables_text .= ''; 83 85 $found_check++; 84 86 $comparables_looop_count++; 85 if( $comparables_looop_count >= 10 ) 86 { 87 if ($comparables_looop_count >= 10) { 87 88 break; 88 89 } … … 95 96 var map = new google.maps.Map(document.getElementById("home_value_map"), { 96 97 zoom: 15, 97 center: {' .$map_location_center_data.'},98 center: {' . $map_location_center_data . '}, 98 99 mapTypeId: google.maps.MapTypeId.ROADMAP 99 100 }); … … 101 102 } 102 103 function setMarkers(map) { 103 var locations = ' .json_encode($map_location_data).';104 var locations = ' . json_encode($map_location_data) . '; 104 105 var image = { 105 106 url: "https://maps.gstatic.com/mapfiles/ms2/micons/red-dot.png", … … 129 130 } 130 131 </script>'; 131 if( $found_check > 0) 132 { 133 $text = str_replace( '[' . $prefix . '_data_comparables]', $comparables_text, $text ); 132 if ($found_check > 0) { 133 $text = str_replace('[' . $prefix . '_data_comparables]', $comparables_text, $text); 134 } else { 135 $text = str_replace('[' . $prefix . '_data_comparables]', "", $text); 134 136 } 135 else 136 { 137 $text = str_replace( '[' . $prefix . '_data_comparables]', "", $text ); 138 } 139 } 140 else 141 { 142 $text = str_replace( '[' . $prefix . '_data_comparables]', "", $text ); 137 } else { 138 $text = str_replace('[' . $prefix . '_data_comparables]', "", $text); 143 139 } 144 140 /*Custom Code End 2019/03/09*/ 145 141 146 142 return $text; 147 143 }
Note: See TracChangeset
for help on using the changeset viewer.