Plugin Directory

Changeset 2151810


Ignore:
Timestamp:
09/05/2019 03:39:38 PM (7 years ago)
Author:
zebrasoft
Message:

Update for 1.2.15

Location:
immotoolbox-connect/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • immotoolbox-connect/trunk/immotoolbox-connect.php

    r2118203 r2151810  
    2424along with ImmoToolBox Connect. If not, see https://www.gnu.org/licenses/gpl.html.
    2525*/
    26 define('ITBCONNECT_VERSION', '1.2.14');
     26define('ITBCONNECT_VERSION', '1.2.15');
    2727
    2828/**
  • immotoolbox-connect/trunk/includes/ITBConnectAPI.php

    r2118203 r2151810  
    169169                    $property['text_'.$k] = $v;
    170170                }
    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), '-');
    172182                $property['url'] = $url = rtrim(get_page_link($property_page_id), '/').'/'.$property['id'].'-'.$slug.'/';
    173183                $property['image'] = $img = $property['images'][0]['url'];
  • immotoolbox-connect/trunk/public/ITBConnectPublic.php

    r2118203 r2151810  
    385385            $property_id = get_query_var('property_id');
    386386        }
     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        }
    387392        $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;
    392402
    393403        add_thickbox();
  • immotoolbox-connect/trunk/readme.md

    r2118203 r2151810  
    66Tested up to: 5.2.3
    77Requires PHP: 5.6
    8 Stable tag: 1.2.14
     8Stable tag: 1.2.15
    99License: GPL3
    1010License URI: https://www.gnu.org/licenses/gpl.html
     
    3535
    3636= 1.2 =
     37* Add handling of not found properties
    3738* New visitor selection page
    3839* Image for France DPE information
     
    4344* Fix url format
    4445* Sort by Type,Country, City
     46
    4547
    4648= 1.1 =
     
    6466### Property details page
    6567This 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.
     68By default only one is required but if your using a multilingual website you'll have to create of page for each language. 
    6769This page uses the `[itb_property]` shortcode
    6870
    6971### Search results page
    70 This page is used to display the search results when using a search engine.
     72This page is used to display the search results when using a search engine. 
    7173This page uses the `[itb_searchresults]` shortcode (this shortcode uses the same parameters as the `[itb_listing]` shortcode)
    7274
    7375### Visitor selection page
    74 This page is used to display the properties added to his selection by the visitor.
     76This page is used to display the properties added to his selection by the visitor. 
    7577This page uses the `[itb_selection]` shortcode (this shortcode uses the same parameters as the `[itb_listing]` shortcode)
    7678
     
    8486
    8587#### Using the Gutenberg block :
    86 You can use the "ImmoToolBox Property Listing" block to add the listing inside a page.
     88You can use the "ImmoToolBox Property Listing" block to add the listing inside a page. 
    8789All the options of the listing are inside the Block Setting on the side bar.
    8890
    8991#### Using the manual shortcode `[itb_listing]`
    90 The Property Listing shortcode is `[itb_listing]`.
     92The Property Listing shortcode is `[itb_listing]`. 
    9193You can add it anywhere you want to add a listing inside a page.
    9294
    9395Here are the shortcode parameters :
    9496
    95 **Filter by type :**
    96 Possible values are 'sale' or 'rental'
     97**Filter by type :** 
     98Possible values are 'sale' or 'rental' 
    9799ex: `[itb_listing type="sale"]`
    98100
    99 **Filter by country code :**
    100 You have to use two-letter country codes
     101**Filter by country code :** 
     102You have to use two-letter country codes 
    101103ex: `[itb_listing country="US"]`
    102104
    103 **Of course you can combine this settings :**
     105**Of course you can combine this settings :** 
    104106ex: `[itb_listing type="rental" country="US"]`
    105107
     
    119121This shortcode enable you to display properties inside another page with a slider
    120122
    121 **8 properties for sale**
     123**8 properties for sale** 
    122124ex: `[itb_carousel type="sale" nbpp="8"]`
    123125
    124 **Your properties marked as "selection" in ImmoToolBox**
     126**Your properties marked as "selection" in ImmoToolBox** 
    125127ex: `[itb_carousel featured="1"]`
    126128
    127 **Multi-lingual website**
     129**Multi-lingual website** 
    128130See "Properties listing pages" information above
    129131
     
    131133
    132134#### Using the Gutenberg block :
    133 You can use the "ImmoToolBox Property Seach" block to add the search engine inside a page.
     135You can use the "ImmoToolBox Property Seach" block to add the search engine inside a page. 
    134136All the options of the search engine are inside the Block Setting on the side bar.
    135137
     
    137139The Property Search shortcode is `[itb_search]`.
    138140
    139 **An horizontal search engine**
     141**An horizontal search engine** 
    140142ex: `[itb_search format="horizontal"]`
    141143
    142144**Multi-lingual website**
    143145If 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.
     146Where the value of this parameter is the ID of a "Search results page" in the right language. 
    145147ex: `[itb_search format="horizontal" searchresults_page_id="123"]`
    146148
     
    150152This 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"]`)
    151153
     154**Property not found**
     155It'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`. 
     156ex: `[itb_property notfound_page_id="123"]`
    152157
    153158## 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.
     159All the html content of this Gutenberg blocks and shortcodes are generated using [Twig](https://twig.symfony.com/) and can be totally customized. 
    155160By 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 :
     161The files must be located in the directory : 
    157162 `/wp-content/themes/YOU-THEME-child/itb-connect/partials/`
  • immotoolbox-connect/trunk/readme.txt

    r2118203 r2151810  
    66Tested up to: 5.2.3
    77Requires PHP: 5.6
    8 Stable tag: 1.2.14
     8Stable tag: 1.2.15
    99License: GPL3
    1010License URI: https://www.gnu.org/licenses/gpl.html
     
    3535
    3636= 1.2 =
     37* Add handling of not found properties
    3738* New visitor selection page
    3839* Image for France DPE information
     
    151152This 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"]`)
    152153
     154**Property not found**
     155It'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`.
     156ex: `[itb_property notfound_page_id="123"]`
    153157
    154158## Advanced custom html generation
Note: See TracChangeset for help on using the changeset viewer.