Skip to content

resales-online/webkit

Repository files navigation

Description

We have developed a php AJAX property search function that is simple to add to your client's website. This has been optimised for google and other search engines. This should help to increase search rankings. The properties will be listed by search engines without the need for a database. No need for updates, no need to worry about databases getting out of sync. Your client's website will always contain the latest data. We have provided a range of functionality that your client can choose to include or limit, making it completely customisable for their needs. See ( What can be Customised on my Webkit? )

Requirements This webkit has been built with PHP and JQuery. Currently the only versions of PHP supported are Ver. 5.4 and above. It is required to install the Webkit in the top level directory of the website or at most 1 level down. The "default document list" in your web site configuration must include an entry for "index.php". Certain functionality requires additional API’s you can modify this to suit your needs. Please see below a list of functions that require additional libraries: MultiSelect Fields on Search page Chosen.jquery.js Chosen.css Datepicker/Booking Calendar JQueryUI.js JQueryUI.css Icons Font-Awesome.css Samples (The sample website uses Bootstrap to standardise layout) Bootstrap.js Bootstrap.css

Getting Started

Create then Download the Webkit See the following article: Getting Started - How to Create a Webkit

Activate the Webkit. Once you have downloaded the webkit from the location included in the email. You will need to setup webkitConfig.php for the webkit to work. webkitConfig.php is the configuration file and the webkit will not work until you have defined the following constants ‘$contactId’ and ‘$hashKey’. You will find these details in the ‘Webkit Created’ email. Please update the constants to the values that you have been sent. Please note if you are trying to run the webkit on an IP address that is different to the one used when creating it, it will not work.

Setting Up As you can see in the sample modules, to add the functionality to your website simply include one file (webkitConfig.php) and call a single function to display any of the options. Listed below are the basic search functions that can be called: displaySearchForm() displaySearchResults() displayMetaTags() Below is a list of additional functionality that you can take advantage of: autoSearchLink() This takes a range of parameters to define your own search lists, the minimum amount of parameters accepted are 3 (title, location, type). Below is the full list of parameters accepted by this function. mixed autoSearchLink ( string $linkText , string $location , string $type [, string $searchType = ‘/ForSale/’ , string $area = $defaultArea , string $subType = ‘’ , string $priceMin = ‘’ , string $priceMax = ‘’ ] ) displayFeatureResults() This allows for promotion of properties that have been marked as Featured in the system. This list is displayed as a table so that you can define how many columns and/or rows you wish to show. contactForm() This function is a simple enquiry form, this automatically links up to the agent's contact database in the system and links enquiries to existing contacts or if the email address is unique it will create a new contact record and associate their search enquiry as a task. Please see the following knowledge base article for more information Leads from your website need assigning to a salesperson displayPropertyDetail() This functionality is to automatically generate the meta tags on the property detail page to improve SEO ranking.

Customisation

Configuration webkitConfig.php

The webkitConfig.php file is split up into 9 sections Authorise Constants (Location of the ContactId and Security Token) Search Criteria (The Search Criteria i.e. Language, Search Areas and Search Type) Website File Location (The modules you want the webkit to work with) Available Search Options (The search options you want to offer the user) Featured Properties Search Criteria (The Search criteria for displayFeatureResults() ) Property Detail Options (Control what functions you want on the property detail page) URL ReWrite format (Customise the URL path generated by the webkit) API URLS (The location of the API, this will only need to be updated when we release a new version of the API) Include File locations (If the directory structure of the website differs from that provided in the sample)

You can find a complete list of the variable definitions at the end of this document.

incWebkitTemplates.php

This file generates the content of the display functions. This file is split into two sections: the first to generate the content of the dropdown lists, the second is to convert the html templates to the actual output of the webkit. To change the output of the numeric drop-down lists you can edit the values of the function generateRange(). The energy rating, bathrooms and bedrooms drop-down functionality is slightly different and they have their own functions to modify if you want to change the output of the lists. getEnergyRatingLanguage; getBedBathLanguage;

Templates In the webkit folder under the directory Templates are a list of html files containing the structure of the layouts for each function. At the top of the file you will find the variables that you can use. The variable names correlate to the variables in PHP, for example: $resultBeds = {resultBeds} $resultLocation = {resultLocation} The list of HTML layouts are below; searchForm.html resultsPagination.html (HTML for the results headers and footers) resultsList.html (HTML for each result row) matchedFeatures.html (HTML for displaying features when searching by features) propertyDetail.html featuredProperty.html (HTML for each Featured Property box when using displayFeatureResults()) featuredPropertyItem.html featureListItem.html featureDetailItem.html contactForm.html The file incWebkitTemplates.php processes the HTML templates to convert them into the correct output for the function.

Javascript

The webkit has a number of javascript functions that are required. Search Function/ Search Results SearchForm.js (This is used to dynamically update the search form when the options are changed) Chosen.jquery.js [Optional] JQueryUI (Only required if using $showRentalDateRange = true;)

Property Detail jquery.resizecrop-1.0.3.js (to format the images, to always show a square image) bookingCalendar.js (to submit a date range query on a rental property) imageViewer.js (a lightweight picture carrousel tool) contactForm.js (to validate and submit a contact query) [Optional] JQueryUI (Only required if using $showBookingCalendar = true;)

Handling multiple search functions With the current functionality you can only display a single search function on a page. However you could have a rental search function on one page and a resale search function on another page by simply creating two versions of the configuration file. They can point to the same results page.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published