Home Mail
  About Features Online Demo Order Now FAQ Services Support Contact
 
Learning Center
System requirements
Installation manual

See documentation
Other products

Section 7. Integration

Overview

To display the list of real estate properties on your site, you need to put the phpRealestate integration code into an appropriate page of your site. To get this integration code, choose the Get code option from the menu   (see picture 36).

  Picture 36

There are two ways to integrate phpRealestate into your site. This section contains the following topics:

  • Insert the SSI code into the page
  • Insert the PHP code into the page

Insert the SSI code into the page

You can use this integration method if your server is configured to support SSI. For a more detailed information please visit the official Apache site:

http://httpd.apache.org/docs/2.0/howto/ssi.html – for Apache version 2.0

http://httpd.apache.org/docs/1.3/howto/ssi.html – for Apache version 1.3

If the AllowOverride Options directive is in effect, then SSI support can be implemented using the .htaccess file. Place the .htaccess file containing the following directives to the root folder of your site:

Options +Includes

AddType text/html .shtml

AddOutputFilter INCLUDES .shtml

To integrate phpRealestate into your site, place the following SSI code to any .shtml file. This code is generated automatically depending on the phpRealestate installation folder and the current language. In general it looks similar to this:

<!--#if expr="$QUERY_STRING"-->
<!--#include virtual="/realestate.php?$QUERY_STRING"-->
<!--#else-->
<!--#include virtual="/realestate.php?lang=en&tpl=default"-->
<!--#endif-->

This code contains a string lang=en&tpl=default . Here en is a short code of the current language, which was set while creating the language; this code is displayed in the second column of the table that lists all languages (see Section 3 - Manage multilingual options ). In this case the front-end interface will only display categories and properties that belong to the English language. You can replace the value of the lang parameter with codes of other languages for different pages; default is the name of the template set used to display your real estate system. When you create a new language, a set of templates named default is automatically created based on the pre-defined set of templates. You can customize these templates, as well as create your own set of templates and assign it to tpl parameter. For more information about templates see Section 12 - Templates and internal tags .

Insert the PHP code into the page

The second way is to insert the PHP code into the page. In this case you need to insert the following code into the appropriate place of the page. This code is generated automatically and is based on the phpRealestate installation folder and your current language. In general, it looks similar to this :

<?
include('/x-www/data/realestate.int/public_html/realestate.php');
$RealEstate = new RealestateMain( 'en', 'default' );
?>

This code contains a string RealestateMain( 'en', 'default' ) . The first parameter en represents a short name of the current language (a code ), which was set while creating the language; this code is displayed in the second column of the table that lists all languages (see Section 3 - Manage multilingual options ). In this case the front-end interface will only display categories and properties that belong to the English language. You can replace the value of this parameter with codes of other languages for different pages; the second parameter default contains the name of the template set used to display your real estate system. When you create a new language, a set of templates named default based on the pre-defined set of templates is automatically created. You can customize these templates, as well as create your own set of templates and assign it to the second parameter .   For more information about templates see Section 12 - Templates and internal tags .

Before you insert the PHP code put the following line at the beginning of the file:

<?ob_start();?>

This code should be placed at the very beginning of the file, it means that there can't be any characters before this line, including spaces, tabs etc.

The following line should be placed at the end of file:

<?ob_end_flush();?>

This line must not have any characters after it.



Webmaster Resources   |   Web Design   |   Web Hosting   |   Scripts and Programs   |   Web Templates
Directories   |   Webmaster Tools   |   Website Promotion   |   Other   |   Add URL   |   Documentation
|     License