Changeset 2151810
- Timestamp:
- 09/05/2019 03:39:38 PM (7 years ago)
- Location:
- immotoolbox-connect/trunk
- Files:
-
- 5 edited
-
immotoolbox-connect.php (modified) (1 diff)
-
includes/ITBConnectAPI.php (modified) (1 diff)
-
public/ITBConnectPublic.php (modified) (1 diff)
-
readme.md (modified) (9 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
immotoolbox-connect/trunk/immotoolbox-connect.php
r2118203 r2151810 24 24 along with ImmoToolBox Connect. If not, see https://www.gnu.org/licenses/gpl.html. 25 25 */ 26 define('ITBCONNECT_VERSION', '1.2.1 4');26 define('ITBCONNECT_VERSION', '1.2.15'); 27 27 28 28 /** -
immotoolbox-connect/trunk/includes/ITBConnectAPI.php
r2118203 r2151810 169 169 $property['text_'.$k] = $v; 170 170 } 171 $slug = trim( sanitize_title($property['type_property'] . '-' . $property['label_num_rooms'] . '-' . $property['country_name']), '-'); 171 $slug = $property['type_property']; 172 if ($property['district_name']) { 173 $slug.='-'.$property['district_name']; 174 } 175 elseif ($property['city_name']) { 176 $slug.='-'.$property['city_name']; 177 } 178 if ($property['country_name']) { 179 $slug.='-'.$property['country_name']; 180 } 181 $slug = trim( sanitize_title($slug), '-'); 172 182 $property['url'] = $url = rtrim(get_page_link($property_page_id), '/').'/'.$property['id'].'-'.$slug.'/'; 173 183 $property['image'] = $img = $property['images'][0]['url']; -
immotoolbox-connect/trunk/public/ITBConnectPublic.php
r2118203 r2151810 385 385 $property_id = get_query_var('property_id'); 386 386 } 387 $permalink = parse_url(get_permalink()); 388 if (!$property_id && 0===strpos($_SERVER['REQUEST_URI'], $permalink['path'])) { 389 header('Location: '.(isset($atts['notfound_page_id'])?get_page_link($atts['notfound_page_id']):'../'), true, 301); 390 exit; 391 } 387 392 $data_view['atts'] = $atts; 388 if ($property_id) { 389 $property = $this->getProperty($property_id); 390 $data_view['property'] = $property; 391 } 393 394 $property = $this->getProperty($property_id); 395 396 if (!$property_id && strpos($_SERVER['REQUEST_URI'], $permalink['path'])) { 397 header('Location: '.(isset($atts['notfound_page_id'])?get_page_link($atts['notfound_page_id']):'../'), true, 301); 398 exit; 399 } 400 401 $data_view['property'] = $property; 392 402 393 403 add_thickbox(); -
immotoolbox-connect/trunk/readme.md
r2118203 r2151810 6 6 Tested up to: 5.2.3 7 7 Requires PHP: 5.6 8 Stable tag: 1.2.1 48 Stable tag: 1.2.15 9 9 License: GPL3 10 10 License URI: https://www.gnu.org/licenses/gpl.html … … 35 35 36 36 = 1.2 = 37 * Add handling of not found properties 37 38 * New visitor selection page 38 39 * Image for France DPE information … … 43 44 * Fix url format 44 45 * Sort by Type,Country, City 46 45 47 46 48 = 1.1 = … … 64 66 ### Property details page 65 67 This page is used to display your properties' details. 66 By default only one is required but if your using a multilingual website you'll have to create of page for each language. 68 By default only one is required but if your using a multilingual website you'll have to create of page for each language. 67 69 This page uses the `[itb_property]` shortcode 68 70 69 71 ### Search results page 70 This page is used to display the search results when using a search engine. 72 This page is used to display the search results when using a search engine. 71 73 This page uses the `[itb_searchresults]` shortcode (this shortcode uses the same parameters as the `[itb_listing]` shortcode) 72 74 73 75 ### Visitor selection page 74 This page is used to display the properties added to his selection by the visitor. 76 This page is used to display the properties added to his selection by the visitor. 75 77 This page uses the `[itb_selection]` shortcode (this shortcode uses the same parameters as the `[itb_listing]` shortcode) 76 78 … … 84 86 85 87 #### Using the Gutenberg block : 86 You can use the "ImmoToolBox Property Listing" block to add the listing inside a page. 88 You can use the "ImmoToolBox Property Listing" block to add the listing inside a page. 87 89 All the options of the listing are inside the Block Setting on the side bar. 88 90 89 91 #### Using the manual shortcode `[itb_listing]` 90 The Property Listing shortcode is `[itb_listing]`. 92 The Property Listing shortcode is `[itb_listing]`. 91 93 You can add it anywhere you want to add a listing inside a page. 92 94 93 95 Here are the shortcode parameters : 94 96 95 **Filter by type :** 96 Possible values are 'sale' or 'rental' 97 **Filter by type :** 98 Possible values are 'sale' or 'rental' 97 99 ex: `[itb_listing type="sale"]` 98 100 99 **Filter by country code :** 100 You have to use two-letter country codes 101 **Filter by country code :** 102 You have to use two-letter country codes 101 103 ex: `[itb_listing country="US"]` 102 104 103 **Of course you can combine this settings :** 105 **Of course you can combine this settings :** 104 106 ex: `[itb_listing type="rental" country="US"]` 105 107 … … 119 121 This shortcode enable you to display properties inside another page with a slider 120 122 121 **8 properties for sale** 123 **8 properties for sale** 122 124 ex: `[itb_carousel type="sale" nbpp="8"]` 123 125 124 **Your properties marked as "selection" in ImmoToolBox** 126 **Your properties marked as "selection" in ImmoToolBox** 125 127 ex: `[itb_carousel featured="1"]` 126 128 127 **Multi-lingual website** 129 **Multi-lingual website** 128 130 See "Properties listing pages" information above 129 131 … … 131 133 132 134 #### Using the Gutenberg block : 133 You can use the "ImmoToolBox Property Seach" block to add the search engine inside a page. 135 You can use the "ImmoToolBox Property Seach" block to add the search engine inside a page. 134 136 All the options of the search engine are inside the Block Setting on the side bar. 135 137 … … 137 139 The Property Search shortcode is `[itb_search]`. 138 140 139 **An horizontal search engine** 141 **An horizontal search engine** 140 142 ex: `[itb_search format="horizontal"]` 141 143 142 144 **Multi-lingual website** 143 145 If your website is multi-lingual, for each language (except WordPress main language) you have to add the parameter "searchresults_page_id" 144 Where the value of this parameter is the ID of a "Search results page" in the right language. 146 Where the value of this parameter is the ID of a "Search results page" in the right language. 145 147 ex: `[itb_search format="horizontal" searchresults_page_id="123"]` 146 148 … … 150 152 This shortcode displays the details of the specified property. The property is either specified in the URL or directly inside the tag (`[itb_property id="123456"]`) 151 153 154 **Property not found** 155 It's possible to specify a page ID to which the visitor should be redirected when the requested property is not found using the parameter `notfound_page_id`. 156 ex: `[itb_property notfound_page_id="123"]` 152 157 153 158 ## Advanced custom html generation 154 All the html content of this Gutenberg blocks and shortcodes are generated using [Twig](https://twig.symfony.com/) and can be totally customized. 159 All the html content of this Gutenberg blocks and shortcodes are generated using [Twig](https://twig.symfony.com/) and can be totally customized. 155 160 By default the plugin will search for the files inside your theme directory (to avoid problems it's highly recommended to use a child theme) 156 The files must be located in the directory : 161 The files must be located in the directory : 157 162 `/wp-content/themes/YOU-THEME-child/itb-connect/partials/` -
immotoolbox-connect/trunk/readme.txt
r2118203 r2151810 6 6 Tested up to: 5.2.3 7 7 Requires PHP: 5.6 8 Stable tag: 1.2.1 48 Stable tag: 1.2.15 9 9 License: GPL3 10 10 License URI: https://www.gnu.org/licenses/gpl.html … … 35 35 36 36 = 1.2 = 37 * Add handling of not found properties 37 38 * New visitor selection page 38 39 * Image for France DPE information … … 151 152 This shortcode displays the details of the specified property. The property is either specified in the URL or directly inside the tag (`[itb_property id="123456"]`) 152 153 154 **Property not found** 155 It's possible to specify a page ID to which the visitor should be redirected when the requested property is not found using the parameter `notfound_page_id`. 156 ex: `[itb_property notfound_page_id="123"]` 153 157 154 158 ## Advanced custom html generation
Note: See TracChangeset
for help on using the changeset viewer.