> TOP <
Listing Template Editor
The Listing Template Editor is where you can edit and setup the fields that are used on your listings, the field content, field types, field orders and search setup for the fields. There are several options on this page:
- Edit Field - Using the drop down menu, select an existing listing field and click edit to edit the listing field
- Add Field - Click on this option to add a new listing field
- Set Field Order - Click on this option to Set Field Order
- Search Setup - Click on this option to Setup the Search
- Search Results Setup - Click on this option to Setup the Search Results
Add or Edit Listing Fields
This section is for adding or editing Listing Fields. There are numerous options available for your listing fields to customize how they display on listings, search pages, search results etc. See the information below for setting up your listing fields.
General Options
Field Name - This is the name of the field as it will be stored in the database.
Field Type - The Type of field that this is. Field Type effect the Add listing and Edit listing forms that agents fill out. (Text, Textarea, select list, select box, etc....)
- Text - Provides agents with a standard text box to enter data into.
- Textarea - Provides agents with a larger text box to enter data into. Use full for things like remarks.
- Select - Provides agents with a drop down list based on the field elements, from which they can select one option.
- Select Multiple - Provides agents with a drop down list based on the field elements, from which they can select multiple options.Option Box
- Option Box - Provides agents with a list based on the field elements with radio options next to each item, from which they can select one option.
- Check Box - Provides agents with a list based on the field elements with radio options next to each item, from which they can select multiple options.
- Divider - Creates a divider "---------------------------" in place of the field to help break up a edit listing or add listing page's layout. No real data can be entered into this field.
- Price - Provides agents with a standard text box to enter a price into. Price should be entered without any money sign, commas, or decimals. The money sign will prefix the text box in the add listing page and ".00" will suffix it. This also tells the system to format the price as setup in the site config for all listing display pages.
- URL - Provides agents with a standard text box to enter a URL into. Agents should enter the full url including http:// the system will then create a hyperlink for then on the listing pages with from this URL.
- Email - Provides agents with a standard text box to enter an email address into. Email address will be clickable links on the listing page. NOT RECOMMENDED TO USE, as spam bots can easily read thsi address from your page and start spamming the email address entered.
- Number - Provides agents with a standard text box to enter a number value into. Will be formated with decimal points as setup in site config.
- Decimal - Provides agents with a standard text box to enter a decimal value into. Same as number, except meant for values that will always have a decimal value.
- Date - Provides agents with a standard text box to enter data into, will show and enforce the required date format as defined in the site config.
- Latitude - Provides agents with a standard text box to enter a latitude into. There can only be one latitude field defined.
- Longitude - Provides agents with a standard text box to enter a latitude into. There can only be one latitude field defined.
Required - Is this field required to be filled out?
Field Caption - The Caption for the field that will be displayed to users.
Field Elements - The choices for multiple selection Field Types such as select lists, option boxes etc. Each choice should be seperated by double pipes (||) Do not uses spaces or returns after each option, run them all together as one line. For example: Option 1||Option 2||Option 3||Option 4
Default Text - The Default text to be displayed in this field
Field Tool Tip - Add a tool tip to the field that will display a question mark icon next to the field in the listing editor/add listing page so users can click on the icon and obtain information/tips regarding completing the field.
Maximum Field Length - Configure the maximum number of characters that can be entered into the field.
Field Tool Tip - Adds a tool tip to the add/edit listing pages for the field. (note: requires new css settings. If upgrading or using a custom template, you can copy the a.tooltip... classes from the vertical-menu style.css file.)
Maximum Field Length - Maximum number of characters that can be entered into this field. Applies to text, price, url, email, number, latitude, longitude, and decimal field types.
Show Field to - Use this option to restrict who will see this field. If you have the field set to display on your site using one of the template areas or individual field rending template tags then this will determine who will see this field. Available options are:
- All Visitors - Everybody will be able to view this field.
- Members and Agents - Only registered users of your site can see this field.
- Agents Only - Only Agents will be able to view this field.
- Admin Only - Only Admins will be able to view this field on the front end of the site.
Available in the following property classes - Use this option to select which property classes this field will be available in. You can select multiple classes by clicking and dragging or by holding down the "Ctrl" key while clicking.
Listing Page Options
Location on Listing Page - On the listing view page, the section of the template this field will appear in.
Field Order on Listing Page - The rank of this field on the Listing view page, the lower the number the higher on the list it will appear
Search Page Options
Allow Searching - Check this option to make the field seachable
Field Order on Search Page - The rank of this field on the Search page, the lower the number the higher on the list of options it will appear
Search Label - The Label for this field that will appear on the Search Page.
Search Type - The type of search field that should be used for this field.
- Partial Text Match - This search option presents the user with a text box to enter text into. It will then find any listings where this field contains the entered text.
- Option list of individual values - Builds a option list, that allows multiple selections, based on the field elements for this field. This option requires that a listings have ALL the selected options to be returned in the search results.
- Option list of individual values (WP Realty search logic) - Builds a option list, that allows multiple selections, based on the field elements for this field. This option will return a listings has ANY of the selected options.
- CheckBox list of individual values - Builds a list of options from the field elements with checkboxes next to each item. This option requires that a listings have ALL the selected options to be returned in the search results.
- CheckBox list of individual values (WP Realty search logic) - Builds a list of options from the field elements with checkboxes next to each item. This option will return a listings has ANY of the selected options.
- Pull down list of individual values - Builds a pulldown list, that allows a single selection, based on the field elements for this field.
- Distinct list - allow multiple - Builds a option list, that allows multiple selections, based on the actual field values for the existing listing. This option requires that a listings have ALL the selected options to be returned in the search results.
- Distinct list - allow multiple (WP Realty search logic) - Builds a option list, that allows multiple selections, based on the actual field values for the existing listing. This option will return a listings has ANY of the selected options.
- Pull down menu, 1 selection only - Builds a pull down list, that allows a single selection, based on the actual field values for the existing listing.
- Checkbox list of distinct values - Builds a list of options, based on the actual field values for the existing listings, with check boxes next to each item. This option requires that a listings have ALL the selected options to be returned in the search results.
- Checkbox list of distinct values (WP Realty search logic) - Builds a list of options, based on the actual field values for the existing listings, with check boxes next to each item. This option will return a listings has ANY of the selected options.
- Radio button list of distinct values - Builds a list of options, based on the actual field values for the existing listings, with radio options next to each item. Radio Options allow only a single selection to be made.
- Two pull downs for min/max ++ - Builds two drop down boxes, one for the user to select the minimum value from and one drop down for the maximum value. Builds the drop down by looking at the minimum value in the database and the maximum and then placing incremental values based on the Step value specified by the user. For Example if the minimum value is 1 and the maximum is 10 and you specify a step value of 2 you will get drop downs with the following options. 1,3,5,7,9,10
- Date range; two text fields - Provides two text boxes to allow user to enter two dates. Will return any listings where the date for this field is between the dates entered by the user.
- Single/Exact Date Search - Provides a text boxes to allow user to enter a date. Will return any listings where the date for this field matches the date entered by the user.
- Search For Empty(NULL) Values - Provides a check box, if check will return only listings where there is NO value entered for this field.
- Search For Non Empty Values - Provides a check box, if check will return only listings where there is a value entered for this field.
++ Step by - If you used a range selection for the
Search Type then this is the value to step each available option in the range by.
NOTE: The Step values can be manually defined instead of using a
Step By value that then builds the values based off the values stored in the listing database. In the Step By field, define your Step By using this format:
- MIN_VALUE|MAX_VALUE|STEP_VALUE
For example, using "0|300000|20000" will start with 0 and go to 300,000 in steps of 20,000.
Search Result Options
Display on Search Results page - Check this option to make the field show up on the search results page.
Field Order on Search Results Page - The rank of this field on the Search page. It corresponds to the {field_#} tag in the search result template. So the field with a rank of 1 will be displayed in the {field_1} spot. Having multiple fields with the same rank will cause problems.
> TOP <
Set Field Order
This page is to edit the field order for all of your listing fields at one time. It will display your fields in the Location on Listing Page they are currently assigned to. You can edit the Field Order on Listing Page value to raise or lower a field's position on the listing view page. Click Set Order to save your changes.
> TOP <
Search Setup
This page is to edit the Search Setup for all of your Listing Fields at one time.
Search Page Options
Allow Searching - Check this option to make the field searchable (If you Allow Searching you
MUST define a
Search Type)
Field Order on Search Page - The rank of this field on the Search page, the lower the number the higher on the list of options it will appear
Search Label - The Label for this field that will appear on the Search Page.
Search Type - The type of search field that should be used for this field. (If you Allowed Searching you
MUST define a
Search Type)
Multiple option searches search using 'AND' logic requiring all of the selected options in the results. There are several search type options that specify 'WP Realty' logic which will only require that one of the selected options be in each result.
Step by - If you used a range selection for the
Search Type then this is the value to step each available option in the range by. (Do not set this value too small or the script will timeout or run out of memory trying to generate all the step options for the search)
> TOP <
Search Results
This screen is a single screen to edit the Search Results Setup for all of your Listing Fields.
Search Results Options
Field Name - Displays the name of the field. Also displays the display name of the field in quotes
Display On Search Result Page - If this field should be displayed on the search results page.
Field Order on Search Result Page - The order of the fields being displayed on the search results page.
> TOP <
Property Classes
The Property Class Editor is where you can add or edit the property classes that are available.
Property classes allow you to define fields in the Edit Listing Template and assign them to specific property classes. As an example if you were listing both cars and houses for sale you can have a class for Homes and one for Cars and assign fields such as Make, Model to the Car class and Sq Feet to the Homes class. These fields will only be displayed for listings using the specified property class.
If you don't wish to utilize the property class system, you can remove all but one property class, and use the single property class for all your listing fields. WP Realty will use the single class by default, bypassing the property class selection when searching or creating listings.
- Class Name - Displays the name of the property class.
- Class Rank - Displays the rank of the property class.
- Action - Delete - Click on this to Delete the property class CAUTION: DELETING A PROPERTY CLASS WILL DELETE ANY/ALL LISTINGS THAT ARE ASSIGNED ONLY TO THAT PROPERTY CLASS (ie not to any other Property Classes as well)
- Action - Modify - Click on this option to Modify the property class.
- Insert Property Class - Click on this option to Insert Property Class.
> TOP <
Insert Property Class
This page is to add a new property class. The available options are:
- Class Name - This is the name of the class as it will be stored in the database and displayed to users.
- Rank - The rank of the class for the display order of the class. Classes with a lower number will display first.
- Select the listing fields to add to this class - This option allows you to select any existing listing fields that you wish to add to this new property class. The insert page is the only place that you will have the ability to mass add listing fields to the property class so it is a good idea to know which fields you want in the property class when adding the property class. Listing fields can still be added later however you must edit each listing field to select the property class.
> TOP <
Modify Property Class
This page is to modify the Property Class. There is not a whole lot of options available here but here they are.
- Class Name - This is the name of the class as it will be stored in the database and displayed to users.
- Rank - The rank of the class for the display order of the class. Classes with a lower number will display first.
> TOP <
Edit Agent/Member Templates
This screen is the Agent and Member Template Editor. They are separate sections however are identical in function so they are being covered in one section of the documentation. The difference will be in the top left hand corner it will say "Member Template Editor" when using that editor instead of the "Agent Template Editor" Here you can edit the fields that are used for your Agent's and Member's accounts.
> TOP <
Add/Edit Agent & Member Fields
The Agent and Member Template Editor is basically the same for Editing or Adding a field. The only difference will be when editing you'll already have information in the fields and will have the
Update & Delete buttons and when adding you will only have an
Add Field button.
Field Name - This is the name of the field as it will be stored in the database.
Field Type - The Type of field that this is. (Text, Textarea, select list, select box, etc....)
Required - Is this field required to be filled out?
Field Caption - The Caption for the field that will be displayed to users.
Field Elements - The choices for multiple selection Field Types such as select lists, option boxes etc. Each choice should be separated by double pipes (||) Do not uses spaces or returns after each option, run them all together as one line. For example: Option 1||Option 2||Option 3||Option 4
Default Text - The Default text to be displayed in this field
Field Tool Tip - Adds a tool tip to the signup and add/edit user pages for the field. (note: requires new css settings. If upgrading or using a custom template, you can copy the a.tooltip... classes from the vertical-menu style.css file.)
Field Order on Listing Page - The order that the fields should be displayed in.
Show Field to - Use this option to restrict who will see this field. If you have a field you only wish Agents to be able to see you can select "Agents Only" so that only logged in agents will see this field.
> TOP <
Set Field Order
Here is a single page for setting the field order of all of your agent/member fields at one time. You can edit the
Field Order on Listing Page value to raise or lower a field's position. Click
Set Order to save your changes.
> TOP <
User Manager
The user manager, as the name suggests, allows you to manage your site's users.
The navigation bar at the top of the user manager allows you to enter a specific user ID to edit or sort the site's users by different criteria. From here there is also a button to Add Users.
Below the User Manager area you will have a list of your users displayed and several details for each user.
Clicking on the
Pencil will allow you to Edit the User. Clicking on the
Red X will
Delete the user.
WARNING!!! ALERT!!! DANGER!!! YIKES!!!
Deleting an agent WILL delete ALL of the agent's listings.
> TOP <
Editing Users - Edit My Account
The Edit Users (User Manager) the area to the left displays options for editing Images and Files. The area on the right is where you will fill in the user fields that are defined in the Agent or Member Template Editor. Fields with a red * next to them indicate that field is required and must be completed in order to save the record.
> TOP <
User Images
The Image Editor is where you can upload, modify or delete images for your user. The image editor is located by first editing a user through the User Manager. You will see on the User Editor thumbnails displayed on the left side of any images already existing for the user and an option to Edit Images. Clicking on the Edit Images option will bring you to the image editor.
Upload a Picture - This option will be available if you have less than the maximum allowed images currently uploaded for your user. This value is set in the Site Config. To upload a picture click on browse and select the photo you wish to upload off of your local computer. You will have fields to upload the number of allowed images that you have remaining from the maximum allowed images setting. Click submit and it will be uploaded to your server. See the Image Upload Settings section of the Site Config for more information on uploads.
Return to Editing Listing - This will return you to the Modify User page.
Image Details - The following fields display details of the uploaded image and thumbnail. It also displays the thumbnail and the full size image.
Delete - Clicking this will delete the corresponding image and it's thumbnail.
Field Order on Listing Page - This defines the order the image will be displayed. This value is automatically incremented for each new image that is uploaded, you can update this value to change the order the images are displayed.
Caption - The caption that will be displayed with the image.
Description - The description that will be displayed when viewing the image.
Displaying User Images
To display your user images on your listings, user profile or agent lists you must add a template tag to your user template where you want the images to be displayed. There are several methods for displaying thumbnails of your images and full size images. See the Template Documentation section for available template tags.
> TOP <
User Files
The File Editor is where you can upload or modify files for your users. The File Editor is located by first editing a user through the User Manager or by clicking on Edit My Account. You will see on the User Manager a list of existing files on the left side of the user manager and an option to Edit Files. Clicking on the Edit Files option will bring you to the File editor.
Upload a File - This option will be available if you have less than the maximum allowed files uploaded for your user. This value is set in the Site Config. To upload a file click on browse and select the file you wish to upload off of your local computer. You will have fields to upload the number of allowed files that you have remaining from the maximum allowed files setting. Click submit and it will be uploaded to your server. See the Upload Settings section of the Site Config for more information on uploads.
Return to Editing Listing - This will return you to the User Manager screen.
Below the Upload a File area a list of all the existing files will be displayed which will include an icon of the file type, the file name and the size of the file. Below each file will be the following options:
Delete - Clicking this will delete the corresponding image and it's thumbnail.
Field Order on Listing Page - This defines the order the file will be displayed. This value is automatically incremented for each new file that is uploaded, you can update this value to change the order the files are displayed.
Caption - The caption that will be displayed with the file.
Description - The description that will be displayed when viewing the file.
Displaying Files
To display files on your listings, user profile or agent lists you must add a template tag to your template where you want a list of the available files to appear so they may be downloaded. See the Template Documentation section for available template tags.
> TOP <
Adding Listings
The first step in adding a new listing is that you will need to select the property class for your listing. By default only one selection is allowed but you can allow multiple selections by changing the option in the Site Configuration.
Once you have selected a property class you will be taken to a page where you will add all the listing data for your listing. Once you have filled out all the required fields and click Submit to save the listing you will be taken to the Modify Listing screen where you can edit your listing's images with the Image Manager, edit Virtual Tours using the Edit Virtual Tour option or add files using the File Manager (See sections in the Editing Listings section of the documentation).
> TOP <
Editing Listings
The Edit Listings will display all the listings you have available to modify. If you selected "Edit My Listings" you will have only those listings that are owned by you. If you have 'Admin' privileges, or permissions to edit all listings and you selected "Edit All Listings" then you will have a list of all listings available to you.
- Lookup - If you already know the listing ID of the listing you want to edit you can enter it in this field and click on Lookup to go directly to editing this listing.
- Listing Number - This is the listing ID for each listing.
- Modify Listing - Clicking on 'Modify Listing' will take you to the Edit Listing screen where you can edit the details of your listing.
- Delete Listing - Clicking on 'Delete Listing' will completely remove the listing and all of it's images from the server.
On the line below these options the 'Listing Title' and any information in the 'Notes' field will be listed for quick reference and to help you identify the listings quickly.
Once you select a listing to modify you will be taken to the Listing Editor. In the Listing Editor the area to the left displays options for editing Listing Images, VTours and Listing Files. The area on the right is where you will fill in the listing fields that are defined in the Listing Template Editor. Fields with a red * next to them indicate that field is required and must be completed in order to save the listing.
> TOP <
Listing Images
The Image Editor is where you can upload, modify or delete images for your listings. The image editor is located by first editing a listing through the Listing Editor. You will see on the Listing Editor thumbnails displayed on the left side of any images already existing for the listing and an option to Edit Images. Clicking on the Edit Images option will bring you to the image editor.
Upload a Picture - This option will be available if you have less than the maximum allowed images currently uploaded for your listing. This value is set in the Site Config. To upload a picture click on browse and select the photo you wish to upload off of your local computer. You will have fields to upload the number of allowed images that you have remaining from the maximum allowed images setting. Click submit and it will be uploaded to your server. See the Image Upload Settings section of the Site Config for more information on uploads.
Return to Editing Listing - This will return you to the Modify Listing page.
Image Details - The following fields display details of the uploaded image and thumbnail. It also displays the thumbnail and the full size image.
Delete - Clicking this will delete the corresponding image and it's thumbnail.
Field Order on Listing Page - This defines the order the image will be displayed. This value is automatically incremented for each new image that is uploaded, you can update this value to change the order the images are displayed.
Caption - The caption that will be displayed with the image.
Description - The description that will be displayed when viewing the image.
> TOP <
Displaying Images on Listings
To display your listing images on your listings you must add a template tag to your listing template where you want the images to be displayed. There are methods for displaying thumbnails of your images, full size images, specific images, slideshows and other options. See the Template Documentation section for available template tags.
> TOP <
Virtual Tours (VTours)
The Virtual Tour Editor is where you can upload or modify the Virtual Tours for your listing. For more information about virtual tours read the Virtual Tour Documentation in the Developers Guide section of this documentation.
The VTour editor is located by first editing a listing through the Listing Editor. You will see on the Listing Editor thumbnails displayed on the left side of any VTour images already existing for the listing and an option to Edit VTours. Clicking on the Edit VTours option will bring you to the VTour editor.
Upload a Picture - This option will be available if you have less than the maximum allowed Virtual Tours uploaded for your listing. This value is set in the Site Config, or if you are uploading an EGG Solution Virtual Tour then it will only allow 1 per listing. To upload a Virtual Tour click on browse and select the photo you wish to upload off of your local computer. You will have fields to upload the number of allowed images that you have remaining from the maximum allowed images setting. Click submit and it will be uploaded to your server. See the Upload Settings section of the Site Config for more information on uploads.
Return to Editing Listing - This will return you to the Modify Listing screen.
Image Details - The following fields display details of the uploaded Virtual Tour and thumbnail. It will display the thumbnail and the full size image of the virtual tour or, if you've uploaded an EGG Solution tour it will display a small egg solution icon to indicate you have uploaded that type of Virtual Tour.
Delete - Clicking this will delete the corresponding image and it's thumbnail.
Field Order on Listing Page - This defines the order the image will be displayed. This value is automatically incremented for each new image that is uploaded, you can update this value to change the order the images are displayed.
Caption - The caption that will be displayed with the image.
Description - The description that will be displayed when viewing the image.
> TOP <
Displaying Virtual Tours (VTours) on Listings
To display VTours on your listings you must add a template tag to your listing template where you want a link to your virtual tour to appear. See the Template Documentation section for available template tags.
> TOP <
Listing Files
The File Editor is where you can upload or modify files for your listings. The File Editor is located by first editing a listing through the Listing Editor. You will see on the Listing Editor a list of existing files on the left side of the listing editor and an option to Edit Files. Clicking on the Edit Files option will bring you to the File editor.
Upload a File - This option will be available if you have less than the maximum allowed files uploaded for your listing. This value is set in the Site Config. To upload a file click on browse and select the file you wish to upload off of your local computer. You will have fields to upload the number of allowed files that you have remaining from the maximum allowed files setting. Click submit and it will be uploaded to your server. See the Upload Settings section of the Site Config for more information on uploads.
Return to Editing Listing - This will return you to the Modify Listing screen.
Below the Upload a File area a list of all the existing files will be displayed which will include an icon of the file type, the file name and the size of the file. Below each file will be the following options:
Delete - Clicking this will delete the corresponding file.
Field Order on Listing Page - This defines the order the file will be displayed. This value is automatically incremented for each new file that is uploaded, you can update this value to change the order the files are displayed.
Caption - The caption that will be displayed with the file.
Description - The description that will be displayed when viewing the file.
> TOP <
Displaying Files on Listings
To display files on your listings you must add a template tag to your listing template where you want a list of the available files to appear so they may be downloaded. See the Template Documentation section for available template tags.
> TOP <
Site Log
The Site Log maintains a list of all actions performed in WP Realty in the database for an accountability record. The site log uses a next/prev menu at the top to skip between pages of the log.
The red 'X' is an option to Clear the Log. This option is only available to site admins. Pushing this will ask for a confirmation of the action and then will clear the log, placing a new log entry notating that the log was cleared, when it happened and who cleared the log.
- ID - The ID of the logged action
- Date - The date and time the logged action occurred
- User (IP) - The user ID and the user's IP address are logged
- Action - The action that was performed
> TOP <
WP REALTY TEMPLATE DOCUMENTATION
The template system in WP Realty works by replacing {template tags} located in the template files with the real content that they represent. There are multiple template files required by WP Realty, all of which have unique template tags available to provide a wide variety of information, data or appearance.
The template system also interfaces with WP Realtys login system to provide a set of permission tags to allow you to restrict sections of your templates to different user groups.
This section of the documentation contains a list of the different types of templates available in WP Realty. Below each of the types of templates, in parenthesis you will see the path (location) of the default template files for those types so you will know where to find them if you wish to edit them or make your own. In the location
TEMPLATE_NAME is the name of the template you are using per your configured template in the Site Configuration (Template Settings). In the path for the templates
FILENAME is listed in place of the specific name of the template file that is used for that template.
Each type of template may have many different versions of that particular template file available. You will see them listed below each type of template along with a description of what they do. Most of the different template types can be selected in the configuration as to which one you want to use on your site while others only use a specific file and others will use different template files based upon the template tag you use to call the function that uses that template (for example the featured listings templates are determined by the template tag used to call that function).
To make your own template from scratch, you will need to maintain the below file naming structure and at the minimum have at least one of the defined template files for each type of template. It may help to use one of the included templates as a guideline or example. Some knowledge of HTML markup will be required in order to create your own template.
> TOP <
PERMISSION TEMPLATE TAGS
Each permission tag in the template system are made up of pair of tags that surround the template data that you which to show only to a select group.
For Example:
Opening tags look like this:
{check_admin}
Closing tags look like this:
{/check_admin}
In addition to the listed template tags you can also add
! in front of any permission tag to check for NOT having that permission. Where the above example is checking for
admin permissions, the below examples will check if the user is
NOT an admin.
For Example:
Opening tags look like this:
{!check_admin}
Closing tags look like this:
{/!check_admin}
The Following tags are available in all of the templates. You can add the NOT "
!" to any of the listed permission tags:
| Tag |
Description |
| check_agent |
Shows content to agents. |
| check_guest |
Shows content to guest only. Logged in members/agents will not see this info. |
| check_member |
Shows content to members. |
| check_admin |
Shows content to administrators. |
| check_view_logs |
Shows content to administrators or agents with view log permissions |
| check_edit_pages |
Shows content to administrators or agents with edit page permissions |
| check_have_vtours |
Shows content to administrators or agents with virtual tour permissions |
| check_have_files |
Shows content to administrators or agents with file upload permissions |
| check_edit_site_config |
Shows content to administrators or agents with edit site configuration permission. |
| check_edit_member_template |
Shows content to administrators or agents with edit member template permission. |
| check_edit_agent_template |
Shows content to administrators or agents with edit agent template permission. |
| check_edit_listing_template |
Shows content to administrators or agents with edit listing template permission. |
| check_edit_all_listings |
Shows content to administrators or agents with edit all listings permission. |
| check_edit_all_users |
Shows content to administrators or agents with edit all users permission. |
| check_edit_pages |
Shows content to administrators or agents with edit pages permission. |
| check_edit_listing_classes |
Shows content to administrators or agents with edit listing classes permission. |
> TOP <
ADMIN TEMPLATES
(/admin/template/TEMPLATE_NAME)
These templates control the layout of the administrative area of your WP Realty website where agents and admins log in to edit listings, edit the site configuration and perform other tasks. Template tags from the Main Admin Templates will work on any other administrative template page. Other template pages may also have their own set of template specific tags.
> TOP <
MAIN ADMIN TEMPLATES
Template tags from the Main Admin Templates will work on any other administrative template page.
Main Admin Template Files:
(/admin/template/TEMPLATE_NAME/FILENAME)
1.
main.html - This is the template for the main administrative section of the site. It is simply a html file to control the overall design and layout of the entire admin section. The main.html file must have the tag
{content} to specify where WP Realty should place it's information.
2.
or_index.html - This is the template used to generate the content area for the index page of the admin section that agents/admins see when they log in.
Each tag in the template system looks like this
{tag_name}. The Following tags are available in all Admin Templates.
> TOP <
Main Admin Template Tags
| Tag |
Description |
| license_tag |
This places the required html comments into the template. Not including this tag is a violation of the license agreement. |
| addon_links |
This tag parses all of your add-ons, triggers the installation functions and displays the admin icons from the add-on. If you remove this tag, add-on installation functions can not be triggered and add-ons may not work properly. |
| select_language |
Shows the language selection drop down. |
| version |
Shows "Version: 2.X.X". Pulls the currently installed version number and uses the $lang['version'] variable to show the word version in the correct language. |
| lang_index_home |
Shows the word "Home" from $lang['index_home'] variable. |
| lang_index_admin |
Shows the word "Admin" from $lang['index_admin'] variable. |
| lang_index_logout |
Shows the word "Logout" from $lang['index_logout'] variable. |
| baseurl |
Places the correct baseurl into the template. |
| template_url |
Places the correct admin template url into the template. |
| load_js_body |
This should be the last tag called in the head section of the template. It places all JavaScript required by WP Realty into the template as well as the <body> tag and calls any onload functions needed for the page editor. This must be in all main.html admin template files. |
| load_js |
Places JavaScript into the template. This loads javascript defined using the $load_js variable and can be used throughout WP Realty and Add-ons. This should be placed near the top of your main template between the <head> and </head> tags. |
| load_js_last |
Places JavaScript into the template. This loads javascript defined using the $load_js_last variable and can be used throughout WP Realty and Add-ons. This should be placed at the end of your main template just before the </body> tag. |
| content |
This places the actual content generated by WP Realty from specific GET['action'] calls. |
| site_title |
This places the site title set in the WP Realty site configuration. |
| company_name |
This places the company name from the site configuration onto the page. |
| company_location |
This places the company location from the site configuration onto the page. |
| company_logo |
This places the url for the company logo from the site configuration onto the page. |
| wprealtyrealty_links |
Places links to WP Realty related resources |
| general_info |
Places a general info block on the admin page providing details about your WP Realty installation. |
| charset |
Adds the charset selected in site config to your template. |
| user_id |
Displays the current user ID |
| load_jquery |
This loads the jquery core file and anything defined in the $jquery variable. |
> TOP <
EDIT LISTINGS TEMPLATE
This template is used to control the layout of the Edit Listings page which displays a list of the listings that can be edited.
Edit Listings Template File:
(/admin/template/TEMPLATE_NAME/FILENAME)
1.
edit_listings.html - This is the Edit Listings template. It has a number of tags available to it, see the edit_listings_template_tags page for details.
Each tag in the template system looks like this
{tag_name}. The Following tags are available from the Edit Listing template.
> TOP <
Edit Listings Template Tags
| Tag |
Description |
| listing_dataset |
BEGINS the section for the display of each listing in the listing editor. This section of the template will be repeated for each listing. This section must be closed with {/listing_dataset} |
| image_thumb_# |
Displays the thumbnail image from the listing where # is the thumbnail number you want displayed. |
| listingid |
Displays the listing ID on the listing view page. |
| listing_title |
This places the listing's title on the page. |
| listing_pclass |
Displays the name of the property class the listing is assigned to. In cases where the listing is part of multiple classes it will show a the names separated by a comma. |
| listing_field_FIELDNAME |
by using the name of a listing field defined in the listing template editor, you can call the individual field and place it on the page. For example to call the "address" field you would insert {listing_field_address} into your template, which would result in both the field caption and value being placed in your template, eg. "Address: 1600 Penn Ave." |
| listing_field_FIELDNAME_value |
Works the same listing_field_FIELDNAME, except you only get the field value. eg. "1600 Penn Ave." |
| listing_field_FIELDNAME_caption |
Works the same listing_field_FIELDNAME, except you only get the field caption. eg. "Address" |
| listing_field_FIELDNAME_rawvalue |
Works the same listing_field_FIELDNAME, except you only get the raw field value. For example when calling the price field instead of getting "$150,000" you would simply get "150000". |
| listing_agent_last_name |
Displays the listing agent's last name. |
| listing_agent_first_name |
Displays the listing agent's first name. |
| listing_notes |
Displays the contents of the listing's notes field. |
| listing_active_status |
If the listing is active returns "Yes" otherwise returns "No". |
| listing_featured_status |
If the listing is featured returns "Yes" otherwise returns "No". |
| listing_expiration |
Displays the listing's expiration date. (Use with block; show_expiration_block to hide this if expiration is not used) |
| edit_listing_link |
Returns the url to edit the listing for use in a link, example usage: <a href="{edit_listing_link}"><img src="images/no_lang/listing_editor_edit.jpg" alt="{lang_admin_listings_editor_modify_listing}" width="16" height="16"></a> |
| delete_listing_link |
Returns the url to delete the listing for use in a link, example usage: <a href="{delete_listing_link}" onClick="return confirmDelete()"><img src="images/no_lang/listing_editor_delete.jpg" alt="{lang_admin_listings_editor_delete_listing}" width="16" height="16"></a> |
| email_agent_link |
Returns the listing agent's email address |
| listing_hit_count |
Returns the listings hit count |
| Blocks |
| All code contained on the template inside a block will be controlled according to the block it is contained inside. This is for template designers to control the display of many fields or code by enclosing it in one simple template tag block. A STARTING block will look like a normal template tag but that block must be closed with {/TEMPLATE_TAG} The following template tags are blocks: |
| show_expiration_block |
will hide or show expiration date depending on the use expiration setting |
| Other/Miscellaneous |
| row_num_even_odd |
Gets the row number and returns it as 0 or 1. This is used, in combination with the stylesheet to alternate table row colors. Proper usage of this tag in your template would be: <tr class="result_row_{row_num_even_odd}"> |
> TOP <
WP REALTY CORE TEMPLATES AND TAGS
(/admin/template/TEMPLATE_NAME/FILENAME)
Tags in these templates will work in any of the public templates as well as when placed in the WYSIWYG page editor generated pages.
1.
main.html - This is the template for the main site. It is equivalent to the user_top.html and user_bottom.html files for WP Realty 1.x. This template file is
THE design for your website. All of the design/layout of your site is controlled with this file. The background, header images, CSS styling, static content etc is all defined in this file. It is simply a html file with the tag
{content} to specify where WP Realty should place it's information. When viewing your site through WP Realty the
{content} tag is replaced with information defined by the sub template for the action you are trying to perform. For example when viewing listings, the content area will be replaced with content using the listing_detail_default.html file, or from other template files or direct content from WP Realty depending on which page of the site you are viewing.
2.
popup.html - This is the template used on popup windows such as the Calculators and Agent Contact Forms. The template contains head/body/html tags but is otherwise a blank template. Use this template by setting &popup in the URL.
3.
blank.html - This is a completely blank and empty template file used for popup windows by setting &popup=blank
4.
printer_friendly.html - This is the template used when the user selects the Printer Friendly Page from listing details.
Optional
5.
page#_main.html - This is an optional main template for the site that is based on the page number. If you wish to have a unique template design for a specific page such as having featured listings in a section of the template on the home page (Page 1) but not the rest of the site then you can create a page#_main.html template with the differences you want.
WP Realty will use the page#_main.html template for pages where the alternate main template exists, if there is no specific main template for that page then it will default to the main.html template for that page.
(# would be the page number you want to use this main template for)
You can specify a PageID=# variable in the URL for any page on your site in order to specify an alternate main template file for the page you are displaying. The PageID=# variable is specified automatically for all page editor created pages, you can create a custom PageID for any other page you wish to have an alternate main template layout for.
6.
searchresults_main.html - This is an optional main template that allows you to load a unique template for your search results page. This can be used to define custom metatags for your search result pages or to simply give your search results a different look from the main template.
7.
maintenance_mode.html - This template is used and displayed to site visitors when the site is in "Maintenance Mode". (See the Maintenance Mode option in the Site Configuration General tab)
8.
500.shtml - This is not a template that is used inside WP Realty. This template is a 500 Internal Server error page that will be displayed to the user if there is a database error instead of displaying the SQL error on the page. This is for security and aesthetic purposes.
Main Template Tags For Use Within Core Templates
Each tag in the template system looks like this
{tag_name}. The Following tags are available from the main templates.
| Tag |
Description |
| license_tag |
This places the REQUIRED html comments into the template.
NOT INCLUDING THIS TAG IS A VIOLATION OF THE OPEN-REALTY LICENSE
If you would like to remove this license tag you must purchase a Commercial License for WP Realty. |
| addthis_button |
Places an "AddThis" button on your site where the template tag is specified. AddThis supports 150+ services such as Digg, Stumbleupon, Facebook, MySpace, Twitter and 100's of other services. This loads external javascript from the AddThis site to function. |
| select_language |
Shows the language selection dropdown. This is NOT yet supported. |
| templated_search_form |
This places the templated search form onto your main template page or into any of the WYSIWYG pages. |
| baseurl |
Places the correct baseurl into the template. |
| url_index |
Places the URL for the Index Page into the template. |
| url_search |
Places the URL to the Search Page into the template. |
| url_search_rental |
Places the URL to the Rental Search page into the template. |
| url_search_class_# |
Places the URL to the search page for property class # into the template. |
| url_search_results |
Places the URL to the Search Results page into the template. This will be to display ALL listings |
| url_searchresults_class_# |
Places the URL to the search results page for property class # into the template. |
| url_view_agents |
Places the URL to view the agent's into the template. |
| url_view_calculator |
Places the URL to view the calculator into the template. |
| url_view_favorites |
Places the URL to View a member's Favorite listings. This should be used inside of the check member permission tags. |
| url_view_saved_searches |
Places the URL to view a member's Saved Searches. This should be used inside of the check member permission tags. |
| url_logout |
Places the URL for a member to LOGOUT of the site. This should be used inside of the check member permission tags. |
| url_member_signup |
Places the URL for a visitor to sign up as a member to the site. This should be used inside of the check guest permission tags. |
| url_member_login |
Places the URL for a visitor to LOGIN to the site as a member. This should be used inside of the check guest permission tags. |
| url_agent_signup |
Places the URL for a visitor to sign up as an agent on the site. This should be used inside of the check guest permission tags. |
| url_agent_login |
Places the URL for an agent to LOGIN to the site as an agent. This should be used inside of the check guest permission tags. |
| url_blog |
Places the URL for the Blog Index on the site. The blog index displays a list of all the blog posts |
| page_link_# |
Places a link to the specified page # into the template. The page number is provided when editing a page with the Page Editor. |
| blog_link_# |
Places a link to the specified blog post # into the template. The blog post # is provided when editing a blog post in the Blog Manager. |
| featured_listings_vertical |
Inserts the featured listings in a vertical layout. |
| featured_listings_horizontal |
Inserts the featured listings in a horizontal layout. |
| random_listings_vertical |
Inserts random listings in a vertical layout. |
| random_listings_horizontal |
Inserts random listings in a horizontal layout. |
| latest_listings_vertical |
Inserts the latest listings in a vertical layout. |
| latest_listings_horizontal |
Inserts the latest listings in a horizontal layout. |
| featured_listings_vertical_class_# |
Inserts the featured listings for property class # in a vertical layout. |
| featured_listings_horizontal_class_# |
Inserts the featured listings for property class # in a horizontal layout. |
| random_listings_vertical_class_# |
Inserts random listings for property class # in a vertical layout. |
| random_listings_horizontal_class_# |
Inserts random listings for property class # in a horizontal layout. |
| latest_listings_vertical_class_# |
Inserts the latest listings for property class # in a vertical layout. |
| latest_listings_horizontal_class_# |
Inserts the latest listings for property class # in a horizontal layout. |
| load_js |
Places JavaScript into the template. This loads javascript defined using the $load_js variable and can be used throughout WP Realty and Add-ons. This should be placed near the top of your main template between the <head> and </head> tags. |
| load_js_last |
Places JavaScript into the template. This loads javascript defined using the $load_js_last variable and can be used throughout WP Realty and Add-ons. This should be placed at the end of your main template just before the </body> tag. |
| load_meta_keywords |
This places the meta keywords tag and values into your template. The Meta keywords help with search engine ranking. This tag should be placed inside the head tag of your main.html template. |
| load_meta_description |
This places the meta description tag and values into your template. The Meta description helps with search engine ranking. This tag should be placed inside the head tag of your main.html template. |
| load_meta_keywords_raw |
This places the raw meta keywords values into your template. The Meta keywords help with search engine ranking. This tag should be placed inside the head tag of your main.html template. Proper usage of this tag would be within the meta keywords tag for example: <meta name="keywords" content="{load_meta_keywords_raw}" /> |
| load_meta_description_raw |
This places the raw meta description values into your template. The Meta description helps with search engine ranking. This tag should be placed inside the head tag of your main.html template. Proper usage of this tag would be within the meta description tag for example: <meta name="description" content="{load_meta_description_raw}" /> |
| template_url |
Places the correct template url into the template. |
| content |
This Places the actual content generated by WP Realty from specific GET['action'] calls. |
| site_title |
This places the site title set in the WP Realty site configuration. |
| company_name |
This places the company name from the site configuration onto the page. |
| company_location |
This places the company location from the site configuration onto the page. |
| company_logo |
This places the url for the company logo from the site configuration onto the page. |
| lang_VARIABLENAME |
This places the specified language variable from your language file into the template. For example using {lang_featured_listings} would call the language variable: $lang['featured_listings'] and would display its value on the template, in this case: Featured Listings |
| load_css_FILENAME |
Places a link to your CSS file in your template. The CSS file must be located in your template directory with main.html and have a .css extension. This tag should be placed inside your html head tags. As of WP Realty CSS is no longer loaded inline. |
| charset |
Adds the charset selected in site config to your template. |
| template_select |
Shows the template selection dropdown box. |
> TOP <
LISTING DETAIL TEMPLATES
(/template/TEMPLATE_NAME/FILENAME)
These Templates are used when the user selects to view a listing. Which Template is used is determined by the administrator from the configuration screen. Any template named listing_detail_templatename.html will be shown as an option in the site configuration.
1.
listing_detail_default.html - This is the default listing View template. It has a number of tags available to it, see the listing_template_tags page for details.
2.
listing_detail_mainjavacolumn.html - This is the Listing View with Java Image with thumbnails in columns.
3.
listing_detail_slideshow.html - This is the Listing View with Slideshow.
4.
listing_detail_mainjavarows.html - This is the Listing View with Java Image with thumbnails in rows.
5.
listing_detail_tabbed.html - This is the Listing View template with all the elements layed out using Tabs.
Optional
6.
listing_detail_pclass#.html - This is an optional listing detail template based on the property class where the # is the property class ID. If you create a listing detail template with this naming for a specific property class then it will be used for listings in that property class, overriding your listing detail setting in the site config. When a template doesn't exist for a specific property class the setting in the site config will be used.
For example, if you have:
Residential = 1
Land = 2
Commercial = 3
Multifamily= 4
If you want different listing details pages for each class above your templates would need to be named as follows:
listing_detail_pclass1.html (Residential)
listing_detail_pclass2.html (Land)
listing_detail_pclass3.html (Commercial)
listing_detail_pclass4.html (Multifamily)
> TOP <
Listing Detail Template Tags
Each tag in the template system looks like this
{tag_name}. The Following tags are available from the listing detail templates.
| Tag |
Description |
| listingid |
Displays the listing ID on the listing view page. |
| headline |
Displays all listing fields set to show in the headline area from the listing template editor. |
| featured_listings_vertical |
Inserts the featured listings in a vertical layout. |
| featured_listings_horizontal |
Inserts the featured listings in a horizontal layout. |
| vtour_button |
Places a link to display the listings virtual tours. Link will only display if there is a virtual tour. |
| listing_images |
Places the listing images on the page. |
| listing_images_nocaption |
Places the listing images on the page without the image captions. |
| top_left |
Displays all listing fields set to show in the top left area from the listing template editor. |
| top_right |
Displays all listing fields set to show in the top right area from the listing template editor. |
| center |
Displays all listing fields set to show in the center area from the listing template editor. |
| feature1 |
Displays all listing fields set to show in the feature1 area from the listing template editor. |
| feature2 |
Displays all listing fields set to show in the feature2 area from the listing template editor. |
| bottom_left |
Displays all listing fields set to show in the bottom left area from the listing template editor. |
| bottom_right |
Displays all listing fields set to show in the bottom right area the listing template editor. |
| contact_agent_link |
This places a link to "Contact Agent". The link will open a popup window with the contact agent form. |
| contact_agent_link_url |
This provides the raw html address for the "Contact Agent". This can be used to create your own link to the Contact agent page using Html. |
| link_calc |
This places a link to the calculators. |
| link_calc_url |
This provides the raw html address for the calculators. This can be used to create your own link to the calculators using HTML. For example: <a href="{link_calc_url}">Calculator Link</a> (The raw html address does not contain ANY popup, size or other code found in the normal link tag) |
| link_add_favorites |
This places a link to allow members to add the listing to there favorites list. |
| link_add_favorites_url |
This provides the raw html address for the add to favorites. This can be used to create your own link to add to favorites using HTML. For example: <a href="{link_add_favorites_url}">Add Favorites Link</a> (The raw html address does not contain ANY popup, size or other code found in the normal link tag) |
| link_printer_friendly |
This places a link to show the listing in the printer friendly template. |
| link_printer_friendly_url |
This provides the raw html address for the printer friendly page. This can be used to create your own link to the printer friendly page using HTML. For example: <a href="{link_printer_friendly_url}">Printer Friendly Link</a> (The raw html address does not contain ANY popup, size or other code found in the normal link tag) |
| link_email_friend |
This places a link to allow visitors to email their friends about the listing. |
| link_email_friend_url |
This provides the raw html address for the email friend form. This can be used to create your own link to the email friend form using HTML. For example: <a href="{link_email_friend_url}">Email Friend Link</a> (The raw html address does not contain ANY popup, size or other code found in the normal link tag) |
| link_map |
This places a link to the map system defined in the site configuration. |
| link_map_url |
This provides the raw html address for the map link. This can be used to create your own link to the map using HTML. For example: <a href="{link_map_url}">View Map</a> (The raw html address does not contain ANY popup, size or other code found in the normal link tag) |
| link_yahoo_school |
This places a link to the yahoo school information for the listing area. |
| link_yahoo_school_url |
This provides the raw html address for the yahoo school information link. This can be used to create your own link to the yahoo school information using HTML. For example: <a href="{link_yahoo_school_url}">View School Information</a> (The raw html address does not contain ANY popup, size or other code found in the normal link tag) |
| link_yahoo_neighborhood |
This places a link to the yahoo neighorhood information for the listing area. |
| link_yahoo_neighborhood_url |
This provides the raw html address for the yahoo neighborhood information link. This can be used to create your own link to the yahoo neighborhood information using HTML. For example: <a href="{link_yahoo_neighborhood_url}">View Neighborhood Information</a> (The raw html address does not contain ANY popup, size or other code found in the normal link tag) |
| link_edit_listing |
This places a link to edit the listing on the listing detail page if the agent is logged in and is the owner of the listing, or if the logged in agent is an admin or has permissions to edit all listings. |
| link_edit_listing_url |
This provides the raw html address to the edit listing page on the listing detail page if the agent is logged in and is the owner of the listing, or if the logged in agent is an admin or has permissions to edit all listings. |
| listing_agent_name |
This places the listing agent's name. |
| listing_agent_link |
This places a link to the listing agent's information |
| listing_agent_listings |
The places a link to the search results to view other listings from the listing agent. |
| listing_agent_id |
The places the listing agents id on the page. |
| listing_title |
This places the listing's title on the page. |
| pclass_link |
This places a link for the search results of the current listing classes |
| hitcount |
This places the number of time the listing has been viewed. |
| slideshow_images |
Places Images into a slideshow. |
| main_image |
Places a large main listing image on the page. |
| main_image_nodesc |
Places a large main listing image on the page. This version of the tag does not display the image description below the main image. |
| image_thumb_# |
Displays a listing's thumbnail image. The number corresponds to the to the image order defined in the listing image editor. |
| image_thumb_fullurl_# |
Displays the specified thumbnail image at the configured display size. The image is linked to the image viewing path using the full URL. Where # = the number of the order of the main image specified in the image editor. |
| raw_image_thumb_# |
Same as image_thumb_# except it returns the image url to be used in an image tag. |
| main_image_java |
Places the main listing image on the page for the java image switch. |
| main_image_java_nodesc |
Places the main listing image on the page for the java image switch. This version of the tag does not display the image description below the main image. |
| listing_images_java |
Places the listing images in a vertical column, when clicked, the image will replace the current main image on the page. Requires main_image_java also be on page. |
| listing_images_java_caption |
Places the listing images in a vertical column with the image caption below each image, when clicked, the image will replace the current main image on the page. Requires main_image_java also be on page. |
| listing_images_java_rows |
Places the listing images in a row, when clicked it the image will replace the current main image on the page. Requires main_image_java also be on page. |
| listing_images_mouseover_java |
Places the listing images in a vertical column, when the mouse is over the image, the image will replace the current main image on the page. Requires main_image_java also be on page. |
| listing_images_mouseover_java_caption |
Places the listing images in a vertical column with the image caption below each image, when the mouse is over the image, the image will replace the current main image on the page. Requires main_image_java also be on page. |
| listing_images_mouseover_java_rows |
Places the listing images in a row, when the mouse is over the image it the image will replace the current main image on the page. Requires main_image_java also be on page. |
| image_full_X |
Displays the specified main/full image where X = the number of the order of the main image specified in the image editor. |
| raw_image_full_X |
Displays the specified main/full image NAME ONLY, where X = the number of the order of the main image specified in the image editor. |
| image_full_fullurl_X |
Displays the specified main/full image at the configured display size. The image is linked to the image viewing path using the full URL. Where X = the number of the order of the main image specified in the image editor. |
| listing_field_FIELDNAME |
by using the name of a listing field defined in the listing template editor, you can call the individual field and place it on the page. For example to call the "address" field you would insert {listing_field_address} into your template, which would result in both the field caption and value being placed in your template, eg. "Address: 1600 Penn Ave." |
| listing_field_FIELDNAME_value |
Works the same listing_field_FIELDNAME, except you only get the field value. eg. "1600 Penn Ave." |
| listing_field_FIELDNAME_caption |
Works the same listing_field_FIELDNAME, except you only get the field caption. eg. "Address" |
| listing_field_FIELDNAME_rawvalue |
Works the same listing_field_FIELDNAME, except you only get the raw field value. For example when calling the price field instead of getting "$150,000" you would simply get "150000". |
| next_prev |
Displays the next - prev options on the Listing Detail page. To use you will need to place the tag on the listing detail template AND turn on "Show NextPrev Bar On Listing Page" in Configuration_listing_settings . WARNING: This will cause a performance hit on sites with large databases that might yield large search results. |
| next_prev_bottom |
Displays the next - prev options on the Listing Detail page. To use you will need to place the tag on the listing detail template AND turn on "Show NextPrev Bar On Listing Page" in Configuration_listing_settings. This uses the next_prev_bottom.html template.WARNING: This will cause a performance hit on sites with large databases that might yield large search results. |
| listing_pclass |
Displays the name of the property class the listing is assigned to. In cases where the listing is part of multiple classes it will show a the names separated by a comma. |
| listing_agent_last_name |
Displays the listing agent's last name. |
| listing_agent_first_name |
Displays the listing agent's first name. |
| listing_agent_thumbnail_# |
Displays the listing agent's thumbnail image that is specified in the # place. Whatever number is specified will display the thumbnail that falls in that order. note: first image is 0, NOT 1 |
| listing_agent_field_FIELDNAME |
by using the name of an agent field defined in the user template editor, you can call the individual field and place it on the page. For example to call the "phone" field you would insert {listing_agent_field_phone} into your template, which would result in both the field caption and value being placed in your template, eg. "Phone: 555-1234" |
| listing_agent_field_FIELDNAME_value |
Works the same listing_agent_field_FIELDNAME, except you only get the field value. eg. "555-1234" |
| listing_agent_field_FIELDNAME_rawvalue |
Works the same listing_agent_field_FIELDNAME, except you only get the raw, unformatted field value. For example when calling the price field instead of getting "$150,000" you would simply get "150000". |
| listing_agent_field_FIELDNAME_caption |
Works the same listing_agent_field_FIELDNAME, except you only get the field caption. eg. "Phone" |
| show_vtour |
Embeds the VTour on your listing page. This will use the selected VTour template to display the VTour in your listing page. You should use the vtour_tab_block template block around this tag to hide the vtour if there is not a supported vtour uploaded for that listing. |
| fulllink_to_listing |
absolute link to the listing instead of the relative link, for use with the RSS Newsfeeds. |
| get_creation_date |
Displays the listing's creation date in the configured WP Realty date format. |
| get_modified_date |
Displays the listing's last modification date in the configured WP Realty date format. |
| listing_files_select |
Places a simple drop down file selection list onto the template for users to select the file they wish to download. |
| files_listing_vertical |
Places the vertical templated listing files list on the template for users to view and select the files they wish to download. |
| files_listing_horizontal |
Places the horizontal templated listing files list on the template for users to view and select the files they wish to download. |
| get_featured |
Adds "featured" to listing details or search results if listing is featured otherwise does nothing. Useful for CSS templating purposes or just letting people know this is a featured listing. |
| get_featured_raw |
Adds "yes" or "no" to the template depending on if the listing is featured or not. Primarily used in CSS for templating purposes. |
| money_sign |
Adds the configured money sign to the template. |
| Blocks |
| All code contained on the template inside a block will be controlled according to the block it is contained inside. This is for template designers to control the display of many fields or code by enclosing it in one simple template tag block. A STARTING block will look like a normal template tag but that block must be closed with {/TEMPLATE_TAG} The following template tags are blocks: |
| hide_printer_friendly |
Hides the content contained inside this block when the printer friendly page is being displayed. You must close this block with /hide_printer_friendly |
| show_printer_friendly |
Shows the content contained inside this block when the printer friendly page is being displayed. You must close this block with /show_printer_friendly |
| show_listed_by_admin_block |
Creates a block for listed by admin data. Uses the "Show Listedby Link For Admin's Listings" setting in the Configuration_listing_settings . You must close this block with /show_listed_by_admin_block |
| !show_listed_by_admin_block |
Creates a block to be displayed if this is an admin listing and if we have the Show Listedby Admin option disabled. Uses the "Show Listedby Link For Admin's Listings" setting in the Configuration_listing_settings . You must close this block with /!show_listed_by_admin |
| vtour_tab_block |
Hides the content contained inside this block if there is no supported vtour uploaded for a listing. This tag is primarily for use on the tabbed template but can be used around the show_vtour tag if embedding a vtour on your listing page. You must close this block with /vtour_tab_block |
| listing_field_FIELDNAME_block |
To be placed around listing_field_FIELDNAME tags to prevent display of any code contained inside this block into the template if the field is not to be shown. You must close this block with /listing_field_FIELDNAME_block |
| listing_agent_field_FIELDNAME_block |
To be placed around listing_agent_field_FIELDNAME tags to prevent display of any code contained inside this block into the template if the field is not to be shown. You must close this block with /listing_agent_field_FIELDNAME_block |
SEARCH PAGE TEMPLATES
(/template/TEMPLATE_NAME/FILENAME)
This template is used to control the layout of the search page.
Most of this template is created dynamically by the software base upon which fields you have specified as searchable. Due to this there is only one search page template and is NOT selectable in the configuration.
1.
search_page_default.html - This is the default search result template.
Optional
2.
search_page_class_CLASSID.html - IF there is a template file with this naming convention where the CLASSID is the number of the property class being searched then this search page template will be used instead of the default search page.
The Search Page fields must be contained inside a form. Use the following code for your template form:
<form action="index.php" method="get">
CONTENT
<input type="hidden" name="action" value="searchresults" />
<input type="submit" />
</form>
Replace the "CONTENT" above with any formatting code and template tags you wish to use for your template. You can look at the source code for the search_page_default.html file as an example to assist you.
Custom Search Pages
It is possible to forgo using WP Realty's somewhat limited Search Page Template system and create your own custom search forms. You will still use the initial code on the template for the form content but replace the CONTENT area with your own custom form fields and their values.
If you are unfamiliar with how to do this then I suggest you use WP Realty's existing search form template
You can pass the following options to the search now. Value can be a Unix integer timestamp or an ISO format Y-m-d H:i:s
Find all listings modified last before Feb 12 2006 at midnight
&listing_last_modified_less=2006-2-12
Find all listings modified last on Feb 12 2006 at 7:30:00 PM
&listing_last_modified_equal=2006-2-12%2019:30:00
Find all listings modified last after Feb 12 2006 at 8:00:00 PM
&listing_last_modified_greater=2006-2-12%2020:00:00
> TOP <
Multiple Sortby Values
Some people may want to sort listings by multiple fields. WP Realty now supports sorting by up to 2 fields, separated by a comma (see examples below).
For example you may want to have your listings sorted by City so all listings are grouped by their city and then sorted by price within those groups. Placing the city as the first sortby and the price as the second sortby will accomplish this. You will need to add a hidden field to your search form to add the additional sortbys to pass it to the search results string.
This example will sort listings by Featured Listings first and then by price. So all of your listings that are featured will appear first and then the rest of the listings will appear. They will all be sorted by price as well.
index.php?action=searchresults&sortby=listingsdb_featured,price&sorttype=DESC,ASC
This example will sort the listings by City first and then price. All of your listings will be grouped by city and then sorted by price within those groupings.
index.php?action=searchresults&sortby=city,price&sorttype=DESC,ASC
> TOP <
Additional Search String Variables
In addition to the other documented search strings, and the ones generated by the search form based on selected criteria you can also pass the following strings to the search results URL for specific results:
&featuredOnly=yes = This will give results that will display only featured listings.
> TOP <
Search Page Template Tags
Each tag in the template system looks like this
{tag_name}. The Following tags are available from the search page templates.
| Tag |
Description |
| featured_listings_NAME |
Renders featured listings using the featured listings template specified in place of "NAME" |
| browse_all_listings |
Renders a text link to "Browse all listings" and shows the total number of listings |
| search_fields |
This is the MOST IMPORTANT field. This displays all of the searchable listing fields. This MUST be inside the <form> </form> tags. |
| agent_searchbox |
Displays the drop down agent search box. |
| show_only_with_images |
Displays the Form check box for "Show only listings with images" on the search page. |
| lang_variable |
Displays the value for any defined lang variable. Examples: {lang_show_only_with_images} {lang_show_only_with_vtours} {lang_search_listings} |
| show_only_with_vtours |
Displays the Form check box for "Show only listings with virtual tours" on the search page. |
| search_type |
Adds a hidden field to the search form that includes the property class for the search. This is part of the new property class system of WP Realty 2.1. |
| postalcode_dist_search |
Adds a distance search option to the search page using zip codes. The distance search functions require the use of additional data not provided by WP Realty. See the Distance Search Database for details and instructions. |
| lat_long_dist_search |
Adds a distance search option to the search page using Latitude and Longitude positions. Your listings must have listing fields of latitude and longitude and have these values filled in already to use this feature (such as data provided by several MLS systems). WP Realty will not Geocode an address automatically. The distance search functions require the use of additional data not provided by WP Realty. See the Distance Search Database for details and instructions. |
| browse_all_listings_pclass |
Shows you the browse all listing link, except it links to the listings in the selected property class and shows a count of listings in the current property class. If no property class is selected it falls back to the old display_all_listing link. |
| full_text_search |
Adds a search box that will compare the users entry to all listing field values. |
| city_dist_search |
Adds a distance search option to the search page using city names. The distance search functions require the use of additional data not provided by WP Realty. See the Distance Search Database for details and instructions.
Note: This will not be 100% accurate as some city names have multiple zip codes and some some are located in more than 1 state. |
| Blocks |
| All code contained on the template inside a block will be controlled according to the block it is contained inside. This is for template designers to control the display of many fields or code by enclosing it in one simple template tag block. A STARTING block will look like a normal template tag but that block must be closed with {/TEMPLATE_TAG} The following template tags are blocks: |
| templated_search_form |
The search form should be contained inside this block. When a call is made for the templated search form the code inside this block will be what is displayed. This is used for including the search form on pages other than the search page. |
| no_search_results_block |
The code inside this block will be displayed when a search is performed and there are no results. This will be in addition to the code on the rest of the template. |
> TOP <
SEARCH RESULTS TEMPLATES
(/template/TEMPLATE_NAME/FILENAME)
This template is used to control the layout of the search result page, this is the most complex template file, as the search results are dependent upon the listing field setup/configuration. Changes to the listing fields can effect the layout and data that appears on the search results templates.
Which Search Results Template that is used is determined by the site configuration. Any template named search_result_templatename.html will be shown as an option in the site configuration.
1.
search_result_default.html - This is the default search result template. It has a number of tags available to it, see the search_result_template_tags page for details.
2.
search_result_box.html - This is a tabled layout for the search results containing more fields and information in a nicely formatted table.
3.
search_result_nophoto.html - This is a simple single line of listing information without any thumbnail photo displayed.
4.
search_result_tabbed.html - This is a basic implementation of the tabbed javascript code into a search results template to show the basic design and requirements of using the tabbed code on the search results.
Optional
5.
search_results_class_CLASSID.html - IF there is a template file with this naming convention where the CLASSID is the number of the property class being searched then this search results template will be used, overriding your configuration's selected search results template.
For example, if you have:
Residential = 1
Land = 2
Commercial = 3
Multifamily= 4
If you want different search results templates for each class above your templates would need to be named as follows:
search_results_class_1.html (Residential)
search_results_class_2.html (Land)
search_results_class_3.html (Commercial)
search_results_class_4.html (Multifamily)
> TOP <
Search Results Template Tags
Each tag in the template system looks like this
{tag_name}.
The
# for the thumbnails this is the order the thumbnails appear, so 1 would display the first thumbnail image, 2 the second etc.
The
# for the fields, headers and textareas is equal to the
"Field Order on Search Result Page" setting in the Listing Template Editor.
Keep in mind that the fields to be displayed on the Search Result template must also have
"Display On Search Result Page" set to
"Yes" or the field will not be displayed.
The Following tags are available from the search results templates.
| Tag |
Description |
| next_prev |
Inserts the Next_Prev function into the search results page. This uses the next_prev.html template |
| next_prev_bottom |
Inserts the Next_Prev function into the search results page. This uses the next_prev_bottom.html template |
| header_title |
Displays the title field name "Title" in the header area. This will be linked as a sortable field. |
| header_title_no_sort |
Same as above without link. Text Only |
| header_# |
Displays the Field name in the header area. This will be linked as a sortable field. The number is defined in the "Sort Order" option in the listing template editor. |
| header_#_no_sort |
Same as above without link. Text Only |
| header_pclass |
Displays "Property Class" in the header area. This is linked as a sortable field. This will sort the search results by property class |
| header_pclass_no_sort |
Same as above without link. Text Only. |
| field_title |
Displays the Title field value. |
| image_thumb_# |
Displays a listing's thumbnail image. The number corresponds to the to the image order defined in the listing image editor. |
| raw_image_thumb_# |
Same as image_thumb_# except it returns the image url to be used in an image tag. |
| image_full_X |
Displays the specified main/full image where X = the number of the order of the main image specified in the image editor. |
| raw_image_full_X |
Displays the specified main/full image NAME ONLY, where X = the number of the order of the main image specified in the image editor. |
| image_full_fullurl_X |
Displays the specified main/full image at the configured display size. The image is linked to the image viewing path using the full URL. Where X = the number of the order of the main image specified in the image editor. |
| field_# |
Displays the Data from the specified field number. The number is defined in the "Sort Order" option in the listing template editor. |
| textarea_# |
Displays entire field value from a Text Area |
| textarea_#_short |
Displays first 100 characters from a Text Area then displays "... More Info" which is linked to the listing view. |
| delete_from_favorite |
Displays the option to delete a listing from a user's saved favorites. Option will only be displayed when in favorites. |
| vtour_button |
Displays the Virtual Tour link button on the search results for each listing that has a virtual tour. NOTE: in WP Realty 2.5 and earlier this tag is called with {vtour_link} and was changed in order to be identical to the tag that is called from the listing detail page. |
| link_to_listing |
Allows you to create a link to the listing on the Search Results page. For Example: <a href="{link_to_listing}">Click here for listing details</a> |
| pclass_link |
This places a link for the search results of the current listing classes |
| listing_pclass |
Displays the name of the property class the listing is assigned to. In cases where the listing is part of multiple classes it will show a the names separated by a comma. |
| listingid |
Displays the Listing ID on the search results page. |
| listing_field_FIELDNAME |
by using the name of a listing field defined in the listing template editor, you can call the individual field and place it on the page. For example to call the "address" field you would insert {listing_field_address} into your template, which would result in both the field caption and value being placed in your template, eg. "Address: 1600 Penn Ave." |
| listing_field_FIELDNAME_value |
Works the same listing_field_FIELDNAME, except you only get the field value. eg. "1600 Penn Ave." |
| listing_field_FIELDNAME_caption |
Works the same listing_field_FIELDNAME, except you only get the field caption. eg. "Address" |
| listing_field_FIELDNAME_rawvalue |
Works the same listing_field_FIELDNAME, except you only get the raw field value. For example when calling the price field instead of getting "$150,000" you would simply get "150000". |
| listing_agent_last_name |
Displays the listing agent's last name. |
| listing_agent_first_name |
Displays the listing agent's first name. |
| listing_agent_thumbnail_# |
Displays the listing agent's thumbnail image that is specfied in the # place. Whatever number is specified will display the thumbnail that falls in that order |
| listing_agent_field_FIELDNAME |
by using the name of a user field defined in the user template editor, you can call the individual field and place it on the page. For example to call the "phone" field you would insert {listing_agent_field_phone} into your template, which would result in both the field caption and value being placed in your template, eg. "Phone: 555-1234" |
| listing_agent_field_FIELDNAME_value |
Works the same listing_agent_field_FIELDNAME, except you only get the field value. eg. "555-1234" |
| listing_agent_field_FIELDNAME_rawvalue |
Works the same listing_agent_field_FIELDNAME, except you only get the raw, unformatted field value. For example when calling the price field instead of getting "$150,000" you would simply get "150000". |
| listing_agent_field_FIELDNAME_caption |
Works the same listing_agent_field_FIELDNAME, except you only get the field caption. eg. "Phone" |
| fulllink_to_listing |
The absolute link to the listing instead of the relative. Used for RSS Newsfeeds. |
| link_edit_listing |
This places a link to edit the listing on the search results page for each listing if the agent is logged in and is the owner of the listing, or if the logged in agent is an admin or has permissions to edit all listings. |
| link_edit_listing_url |
This provides the raw html address to the edit listing page on the search results page for each listing if the agent is logged in and is the owner of the listing, or if the logged in agent is an admin or has permissions to edit all listings. |
| get_creation_date |
Displays the listing's creation date in the configured WP Realty date format. |
| get_modified_date |
Displays the listing's creation date in the configured WP Realty date format. |
| get_featured |
Adds "featured" to listing details or search results if listing is featured otherwise does nothing. Useful for CSS templating purposes or just letting people know this is a featured listing. |
| get_featured_raw |
Adds "yes" or "no" to the template depending on if the listing is featured or not. Primarily used in CSS for templating purposes. |
| money_sign |
Adds the configured money sign to the template. |
| isfavorite |
Returns "yes" if listing is marked as a favorite listing by a logged in user and "no" if not marked as favorite or the user is not logged in. Can be used for CSS etc. |
| link_add_favorites |
Displays a link to add the listing to the user's saved favorite listings. |
| link_add_favorites_url |
This provides the raw URL to the add to favorites page so that it can be placed in a link or have an image linked by the template designer. |
| listing_agent_id |
Places the ID of the listing agent on the page |
Blocks
All code contained on the template inside a block will be controlled according to the block it is contained inside. This is for template designers to control the display of many fields or code by enclosing it in one simple template tag block. A STARTING block will look like a normal template tag but that block must be closed with {/TEMPLATE_TAG} The following template tags are blocks: |
| TEMPLATE_TAG_block |
BEGINS a block for the defined template tag. All code contained on the template inside this block will not be displayed if there is no matching field. This is for template designers who do not know the number of fields the site admin will have marked as searchable. It does not hide the data if the field exist but is empty. Block must be closed with {/TEMPLATE_TAG_block} The following template tags have block options:
header_title; header_title_no_sort; header_#; header_#_no_sort; field_title; field_#; textarea_#; textarea_#_short |
| search_result_header |
BEGINS the Search Result header area. This area will only be displayed once on the page.
This section must be closed with {/search_result_header} |
| search_result_dataset |
BEGINS the section for the display of the search results. This section of the template will be repeated for each search result.
This section must be closed with {/search_result_dataset} |
| Other/Miscellaneous |
| row_num_even_odd |
Gets the row number and returns it as 0 or 1. This is used, in combination with the stylesheet to alternate table row colors. Proper usage of this tag in your template would be: <tr class="result_row_{row_num_even_odd}"> |
> TOP <
FEATURED/RANDOM LISTINGS TEMPLATES
(/template/TEMPLATE_NAME/FILENAME)
The below information applies to both the featured and random listing options.
This template is used to control the layout of the featured listings.
Which Template is used is determined by the featured or random listing template tag used on your site. The Featured Listings template tag is: {featured_listings_
NAME} where
NAME is the name of the featured listings template included in your template directory.
For example using the included templates: Using {featured_listings_
vertical} will use featured_listing_vertical.html while using {featured_listings_
horizontal} will use featured_listing_horizontal.html.
1.
featured_listing_vertical.html - This is the vertical featured listings template.
2.
featured_listing_horizontal.html - This is the horizontal featured listings template.
> TOP <
Featured/Random Template Tags
Each tag in the template system looks like this
{tag_name}.
The Following tags are available from the featured/random listings templates.
| Tag |
Description |
| lang_variable |
Displays the value for any defined lang variable. |
| listingid |
Displays the listing ID for the listing being displayed. |
| featured_url |
The URL for the featured listing being displayed. Use this for creating the link to your featured listing, for example: <a href="{featured_url}">{listing_title}</a> |
| listing_title |
Displays the listing's title. |
| featured_thumb_src |
Displays the listing's thumbnail image url for use inside an img tag. |
| featured_thumb_height |
Returns the thumbnail height. For use inside an img tag for the height setting. |
| featured_thumb_width |
Returns the thumbnail width. For use inside an img tag for the width setting. |
| money_sign |
Adds the configured money sign to the template. |
| isfavorite |
Returns "yes" if listing is marked as a favorite listing by a logged in user and "no" if not marked as favorite or the user is not logged in. Can be used for CSS etc. |
| featured_large_src |
Displays the listing's large image url for use inside an img tag. |
| featured_large_height |
Returns the image height. For use inside an img tag for the height setting. |
| featured_large_width |
Returns the image width. For use inside an img tag for the height setting. |
| listing_agent_name |
This places the listing agent's name. |
| listing_agent_link |
This places a link to the listing agent's information |
| listing_agent_listings |
The places a link to the search results to view other listings from the listing agent. |
| listing_agent_id |
The places the listing agents id on the page. |
| listing_title |
This places the listing's title on the page. |
| image_thumb_# |
Displays a listing's thumbnail image. The number corresponds to the to the image order defined in the listing image editor. |
| image_thumb_fullurl_# |
Displays the specified thumbnail image at the configured display size. The image is linked to the image viewing path using the full URL. Where # = the number of the order of the main image specified in the image editor. |
| raw_image_thumb_# |
Same as image_thumb_# except it returns the image url to be used in an image tag. |
| image_full_X |
Displays the specified main/full image where X = the number of the order of the main image specified in the image editor. |
| raw_image_full_X |
Displays the specified main/full image NAME ONLY, where X = the number of the order of the main image specified in the image editor. |
| image_full_fullurl_X |
Displays the specified main/full image at the configured display size. The image is linked to the image viewing path using the full URL. Where X = the number of the order of the main image specified in the image editor. |
| listing_field_FIELDNAME |
by using the name of a listing field defined in the listing template editor, you can call the individual field and place it on the page. For example to call the "address" field you would insert {listing_field_address} into your template, which would result in both the field caption and value being placed in your template, eg. "Address: 1600 Penn Ave." |
| listing_field_FIELDNAME_value |
Works the same listing_field_FIELDNAME, except you only get the field value. eg. "1600 Penn Ave." |
| listing_field_FIELDNAME_caption |
Works the same listing_field_FIELDNAME, except you only get the field caption. eg. "Address" |
| listing_field_FIELDNAME_rawvalue |
Works the same listing_field_FIELDNAME, except you only get the raw field value. For example when calling the price field instead of getting "$150,000" you would simply get "150000". |
| listing_pclass |
Displays the name of the property class the listing is assigned to. In cases where the listing is part of multiple classes it will show a the names separated by a comma. |
| listing_agent_last_name |
Displays the listing agent's last name. |
| listing_agent_first_name |
Displays the listing agent's first name. |
| listing_agent_thumbnail_# |
Displays the listing agent's thumbnail image that is specified in the # place. Whatever number is specified will display the thumbnail that falls in that order. note: first image is 0, NOT 1 |
| listing_agent_field_FIELDNAME |
by using the name of an agent field defined in the user template editor, you can call the individual field and place it on the page. For example to call the "phone" field you would insert {listing_agent_field_phone} into your template, which would result in both the field caption and value being placed in your template, eg. "Phone: 555-1234" |
| listing_agent_field_FIELDNAME_value |
Works the same listing_agent_field_FIELDNAME, except you only get the field value. eg. "555-1234" |
| listing_agent_field_FIELDNAME_rawvalue |
Works the same listing_agent_field_FIELDNAME, except you only get the raw, unformatted field value. For example when calling the price field instead of getting "$150,000" you would simply get "150000". |
| listing_agent_field_FIELDNAME_caption |
Works the same listing_agent_field_FIELDNAME, except you only get the field caption. eg. "Phone" |
| fulllink_to_listing |
absolute link to the listing instead of the relative link, for use with the RSS Newsfeeds. |
| Blocks |
| All code contained on the template inside a block will be controlled according to the block it is contained inside. This is for template designers to control the display of many fields or code by enclosing it in one simple template tag block. A STARTING block will look like a normal template tag but that block must be closed with {/TEMPLATE_TAG} The following template tags are blocks: |
| featured_listing_block |
Block for the each featured listing. The code inside this block will be repeated for each featured listing displayed. |
| featured_img_block |
Block for the image for the featured listing being displayed. |
| featured_listing_block_row repeat="#" |
Block for the featured listing row where rows will be used for displaying featured listings. repeat="#" is the number of times to repeat the content inside the featured_listing_block before starting a new row. When closing this block do not include repeat in the closing tag, i.e. a proper closing would be: {/featured_listing_block_row} |
| featured_img_large_block |
Block for the large image for the featured listing being displayed. |
| listing_field_FIELDNAME_block |
To be placed around listing_field_FIELDNAME tags to prevent display of any code contained inside this block into the template if the field is not to be shown. You must close this block with /listing_field_FIELDNAME_block |
| listing_agent_field_FIELDNAME_block |
To be placed around listing_agent_field_FIELDNAME tags to prevent display of any code contained inside this block into the template if the field is not to be shown. You must close this block with /listing_agent_field_FIELDNAME_block |
> TOP <
SEARCH PROPERTY CLASS TEMPLATES
(/template/TEMPLATE_NAME/FILENAME)
This template is used to control the layout of the Search Page Property Class selection. The selection of the template is not configurable and this is the template file that is always used for the search page property class selection.
1.
search_class_default.html - This is the search property class template.
Search Property Class Template Tags
Each tag in the template system looks like this
{tag_name}.
This template is not a very complicated template and only uses a few template tags to keep it simple. You will need to include your tags inside of a form and field set as well as include the submit buttons to search listings. See the default template for proper coding examples of these fields.
The Following tags are available from the search class templates.
| Tag |
Description |
| lang_variable |
Displays the value for any defined lang variable. |
| property_class_checkboxes |
Displays the property class checkboxes on the template |
> TOP <
VIEW USERS TEMPLATE
(/template/TEMPLATE_NAME/FILENAME)
This template is used to control the layout of the View Users page which displays a list of the agents. This template is not configurable and must be named as below:
1.
view_users_default.html - This is the view users template.
> TOP <
View Users Template Tags
Each tag in the template system looks like this
{tag_name}.
The Following tags are available from the view users template.
| Tag |
Description |
| agent_image_thumb_# |
Displays the agent's thumbnail image that is specified by the #. note: first image is 0, NOT 1 |
| raw_agent_image_thumb_# |
Displays the agent's thumbnail image NAME ONLY that is specified by the #. note: first image is 0, NOT 1 |
| agent_id |
Displays the agent's ID for inclusion in a link. For example: <a href="index.php?action=view_user&user={agent_id}">Click Here</a> |
| agent_first_name |
Displays the agent's first name. |
| agent_last_name |
Displays the agent's last name |
| agent_contact_link |
Renders a link to the agent contact form. |
| agent_fields |
Displays the agent's fields such as phone, address etc. |
| Blocks |
| All code contained on the template inside a block will be controlled according to the block it is contained inside. This is for template designers to control the display of many fields or code by enclosing it in one simple template tag block. A STARTING block will look like a normal template tag but that block must be closed with {/TEMPLATE_TAG} The following template tags are blocks: |
| user_block |
The block for the display of each user. Code inside the block will be repeated for each user. |
| agent_image_thumb_#_block |
Block for the agent's thumbnail image specified by the #. If there isn't a thumbnail matching that number then code inside this block will not be displayed. |
> TOP <
VIEW AGENT TEMPLATE
(/template/TEMPLATE_NAME/FILENAME)
This template is used to control the layout of the Agent Details page. This template is not configurable and must be named as below:
1.
view_user_default.html - This is the view agent template.
> TOP <
View Agent Template Tags
Each tag in the template system looks like this
{tag_name}.
The Following tags are available from the view agent template.
| Tag |
Description |
| user_first_name |
Displays the user's first name. |
| user_last_name |
Displays the user's last name. |
| user_images_thumbnails |
Displays the thumbnails of the user's images |
| agent_image_thumb_# |
Displays the agent's thumbnail image that is specified by the #. note: first image is 0, NOT 1 |
| raw_agent_image_thumb_# |
Displays the agent's thumbnail image NAME ONLY that is specified by the #. note: first image is 0, NOT 1 |
| user_display_info |
Displays the user info. All of the fields other than the first name, last name and username. |
| user_contact_link |
Renders a link to contact the agent. |
| user_listings_list |
Displays the agent's listings in a list. |
| user_hit_count |
Displays the hit count for the user. |
| user_vcard_link |
Adds a link to download the agent's information as a vcard. |
| user_id |
Displays the user's id. |
| user_listings_link |
Displays a link to the search results page showing listings from this agent. |
| user_field_FIELDNAME |
by using the name of a user field defined in the agent template editor, you can call the individual field and place it on the page. For example to call the "address" field you would insert {user_field_address} into your template, which would result in both the field caption and value being placed in your template, eg. "Address: 1600 Penn Ave." |
| user_field_FIELDNAME_value |
Works the same as user_field_FIELDNAME, except you only get the field value. eg. "1600 Penn Ave." |
| user_field_FIELDNAME_caption |
Works the same as user_field_FIELDNAME, except you only get the field caption. eg. "Address" |
| user_field_FIELDNAME_rawvalue |
Works the same as user_field_FIELDNAME, except you only get the raw field value. For example when calling a number field instead of getting "150,000" you would simply get "150000". |
> TOP <
VIRTUAL TOUR (VTOUR) TEMPLATES
(/template/TEMPLATE_NAME/FILENAME)
This template is used to control the layout of the popup virtual tour page. This template is rather complex due to large javascript requirements in the <head> and other various details.
Which Template is used is determined by the administrator from the configuration screen. Any template named vtour_templatename.html will be shown as an option in the site configuration.
1.
vtour_default.html - This is the default VTour template.
2.
vtour_classic.html - This is the "Classic" VTour template. The layout was designed after the original VTour code used in WP Realty prior to templating being available.
> TOP <
VTour Template Tags
Each tag in the template system looks like this
{tag_name}.
This template is a little more complex and involved than other WP Realty templates due to the large amounts of Javascript that are required to make the Virtual Tours, buttons, controls and other features work properly together.
Important VTour Template Details
- Inside the <body> tag of your template you must include the tag {onload}. This is required for the PTViewer type of VTours to properly initialize.
- Inside the <head> tag of your template you must include the following tags:
- {load_js} (required to properly load the Javascript into the page)
- {license_tag} (required per the WP Realty license)
- There are several configuration options available to control the size of the VTour, the size of the popup window and the initial zoom of the VTours. See VTour Config Settings for details.
In addition to the VTour Template specific tags below, you can also utilize any of the Listing Detail Template Tags. Several of these tags were utilized in the Default VTour Template.
| Tag |
Description |
| vtour |
Displays the main VTour Applet on the page. The width and height of the VTour is adjustable in the VTour Config Settings. |
| vtour_left_button |
Displays the Left Nav button for the VTour. You can replace the button with one of your own design as you wish. There are two images that will need to be replaced named vtour_back.gif and vtour_backon.gif. These images are located at /YOURTEMPLATE/images/ |
| vtour_pause_button |
Displays the Pause Nav button for the VTour. You can replace the button with one of your own design as you wish. There are two images that will need to be replaced named vtour_pause.gif and vtour_pauseon.gif. These images are located at /YOURTEMPLATE/images/ |
| vtour_right_button |
Displays the Right Nav button for the VTour. You can replace the button with one of your own design as you wish. There are two images that will need to be replaced named vtour_forward.gif and vtour_forwardon.gif. These images are located at /YOURTEMPLATE/images/ |
| vtour_zoomin_button |
Displays the Zoom In Nav button for the VTour. You can replace the button with one of your own design as you wish. There are two images that will need to be replaced named vtour_zoomin.gif and vtour_zoominon.gif. These images are located at /YOURTEMPLATE/images/ |
| vtour_zoomout_button |
Displays the Zoom Out Nav button for the VTour. You can replace the button with one of your own design as you wish. There are two images that will need to be replaced named vtour_zoomout.gif and vtour_zoomouton.gif. These images are located at /YOURTEMPLATE/images/ |
| vtour_select |
Displays the VTour drop down select box to select the next Virtual Tour image. |
| vtour_description |
Displays a box for the VTour description. |
| onload |
Adds the proper onload= command to the body tag for PTViewer type of VTours. If the VTour is an EGG Solution this tag will be ignored. |
| money_sign |
Adds the configured money sign to the template. |
| Blocks |
| All code contained on the template inside a block will be controlled according to the block it is contained inside. This is for template designers to control the display of many fields or code by enclosing it in one simple template tag block. A STARTING block will look like a normal template tag but that block must be closed with {/TEMPLATE_TAG} The following template tags are blocks: |
| vtour_header_block |
Place this block around your opening <head>, <html> and <body> tags in your VTour Template. The contents of these tags will be removed if the VTour is being displayed directly on the listing detail page. You must close this block with /vtour_header_block |
| vtour_footer_block |
Place this block around your closing <html> and <body> tags in your VTour Template. The contents of these tags will be removed if the VTour is being displayed directly on the listing detail page. You must close this block with /vtour_footer_block |
| vtour_content_block |
Place this block around any content in your VTour Template that you want removed if the VTour is being displayed directly on the listing detail page. The contents of these tags will be removed if the VTour is being displayed directly on the listing detail page. You must close this block with /vtour_content_block |
> TOP <
FILE DOWNLOAD TEMPLATES
(/template/TEMPLATE_NAME/FILENAME)
This template is used to control the layout of the file download section when using the vertical or horizontal templated file list.
Which Template is used is determined by the templated file download template tag used on your site. The templated file download template tags are:
For Listing Template:
{files_listing_NAME} where
NAME is the name of the featured listings template included in your template directory. For example using the included templates:
{files_listing_vertical} will use files_listing_vertical.html
{files_listing_horizontal} will use files_listing_horizontal.html
1.
files_listing_vertical.html - This is the vertical listing files template.
2.
files_listing_horizontal.html - This is the horizontal listing files template.
For Agent Template:
{files_user_NAME} where
NAME is the name of the featured users template included in your template directory. For example using the included templates:
{files_user_vertical} will use files_user_vertical.html
{files_user_horizontal} will use files_user_horizontal.html
1.
files_user_vertical.html - This is the vertical listing files template.
2.
files_user_horizontal.html - This is the horizontal listing files template.
> TOP <
File Download Template Tags
Each tag in the template system looks like this
{tag_name}.
The Following tags are available from the file download templates.
| Tag |
Description |
| lang_variable |
Displays the value for any defined lang variable. |
| file_download_url |
The download URL for the file being displayed. This URL is to a download function in WP Realty, this will help protect abuse of the file system such as people directly linking to files externally. Use this for creating the link to your files, for example: <a href="{file_download_url}">{file_filename}</a> |
| file_url |
The direct download URL for the file being displayed. This URL is a direct link to the file on your server. If you use this download URL then you must remove the included .htaccess files in the files/listings and files/users folders. Be aware that this will allow users to link directly to your files from anywhere and may open your site for abuse by people uploading files to share with others at the expense of your bandwidth. Use this for creating the link to your files, for example: <a href="{file_url}">{file_filename}</a> |
| file_filename |
Displays the filename of the file. |
| file_caption |
Displays the caption of the file. |
| file_description |
Displays the description of the file. |
| file_filesize |
Displays the filesize of the file. |
| file_icon |
Displays the url for the file icon for use in a img tag. For example:
<img src="{file_icon}" height="{file_icon_height}" width="{file_icon_width}" alt="{file_caption}" /> |
| file_icon_height |
Displays the configured height for the file icons for use in a img tag. For example:
<img src="{file_icon}" height="{file_icon_height}" width="{file_icon_width}" alt="{file_caption}" /> |
| file_icon_width |
Displays the configured width for the file icons for use in a img tag. For example:
<img src="{file_icon}" height="{file_icon_height}" width="{file_icon_width}" alt="{file_caption}" /> |
| Blocks |
| Template tag Blocks are template tags that will have a starting and ending tag. Starting tags will be listed below. Blocks must be closed with {/TEMPLATE_TAG_block} The following template tags are block options: |
| file_block |
Block for the each file. The code inside this block will be repeated for each file being displayed. This block is required in order to display the files. |
| file_block_row repeat="#" |
Block for the file row where rows will be used for displaying files in a horizontal layout. repeat="#" is the number of times to repeat the content inside the file_block before starting a new row. When closing this block do not include repeat in the closing tag, i.e. a proper closing would be: {/file_block_row} |
> TOP <
RSS TEMPLATE
(/template/TEMPLATE_NAME/FILENAME)
This template is used to control the layout of the XML Data feed for the RSS Newsfeeds. This template is rather complex due to having to follow certain XML structure for proper XML output that can be read by RSS Newreaders. There are also several configuration options on the RSS tab of your site configuration that will effect the output of these newsfeeds. You should be familiar with the RSS Specification if you are attempting to modify the RSS Template. Use the included template as a guide for proper usage of the XML RSS structure.
In order to setup links to your RSS Newsfeeds you will need to add a link to one of the following actions:
rss_featured_listings - This will provide the user with an RSS Newsfeed of the featured listings. A link to this Newsfeed would look something like this:
<a href="index.php?action=rss_featured_listings" >{lang_rss_featured_link_title}</a>
rss_lastmodified_listings - This will provide the user with an RSS Newsfeed of the latest modified listings. A link to this Newsfeed would look something like this:
<a href="index.php?action=rss_lastmodified_listings" >{lang_rss_lastmodified_link_title}</a>
This template is not a configuration selectable template, your RSS Newsfeeds will always use this specific template file in your selected template directory:
1.
rss.html - This is the RSS template.
> TOP <
RSS Template Tags
Each tag in the template system looks like this
{tag_name}.
The Following tags are available from the RSS template:
| Tag |
Description |
| rss_title |
Places the RSS Title in the RSS Feed. The RSS title is set in the Site Configuration on the RSS tab for the type of RSS feed you are using. |
| rss_webroot |
Places the URL to the RSS Feed you are providing. |
| rss_description |
Places the RSS Description in the RSS Feed. The RSS Description is set in the Site Configuration on the RSS tab for the RSS feed you are using. |
| rss_listing_guid |
Places a Unique identifier for the listing into the RSS feed. |
| rss_listing_description |
Places the listing description into the RSS Feed. The listing description is obtained from the Site Configuration RSS tab in the Listing Description Field for the type of RSS Feed you are providing. HTML and Listing Template Tags can be used in that field. |
| listing_agent_name |
This places the listing agent's name. |
| listing_agent_link |
This places a link to the listing agent's information |
| listing_agent_listings |
The places a link to the search results to view other listings from the listing agent. |
| listing_agent_id |
The places the listing agents id on the page. |
| listing_title |
This places the listing's title on the page. |
| image_thumb_# |
Displays a listing's thumbnail image. The number corresponds to the to the image order defined in the listing image editor. |
| image_thumb_fullurl_# |
Displays the specified thumbnail image at the configured display size. The image is linked to the image viewing path using the full URL. Where # = the number of the order of the main image specified in the image editor. |
| raw_image_thumb_# |
Same as image_thumb_# except it returns the image url to be used in an image tag. |
| image_full_X |
Displays the specified main/full image where X = the number of the order of the main image specified in the image editor. |
| raw_image_full_X |
Displays the specified main/full image NAME ONLY, where X = the number of the order of the main image specified in the image editor. |
| image_full_fullurl_X |
Displays the specified main/full image at the configured display size. The image is linked to the image viewing path using the full URL. Where X = the number of the order of the main image specified in the image editor. |
| listing_field_FIELDNAME |
by using the name of a listing field defined in the listing template editor, you can call the individual field and place it on the page. For example to call the "address" field you would insert {listing_field_address} into your template, which would result in both the field caption and value being placed in your template, eg. "Address: 1600 Penn Ave." |
| listing_field_FIELDNAME_value |
Works the same listing_field_FIELDNAME, except you only get the field value. eg. "1600 Penn Ave." |
| listing_field_FIELDNAME_caption |
Works the same listing_field_FIELDNAME, except you only get the field caption. eg. "Address" |
| listing_field_FIELDNAME_rawvalue |
Works the same listing_field_FIELDNAME, except you only get the raw field value. For example when calling the price field instead of getting "$150,000" you would simply get "150000". |
| listing_pclass |
Displays the name of the property class the listing is assigned to. In cases where the listing is part of multiple classes it will show a the names separated by a comma. |
| listing_agent_last_name |
Displays the listing agent's last name. |
| listing_agent_first_name |
Displays the listing agent's first name. |
| listing_agent_thumbnail_# |
Displays the listing agent's thumbnail image that is specified in the # place. Whatever number is specified will display the thumbnail that falls in that order. note: first image is 0, NOT 1 |
| listing_agent_field_FIELDNAME |
by using the name of an agent field defined in the user template editor, you can call the individual field and place it on the page. For example to call the "phone" field you would insert {listing_agent_field_phone} into your template, which would result in both the field caption and value being placed in your template, eg. "Phone: 555-1234" |
| listing_agent_field_FIELDNAME_value |
Works the same listing_agent_field_FIELDNAME, except you only get the field value. eg. "555-1234" |
| listing_agent_field_FIELDNAME_rawvalue |
Works the same listing_agent_field_FIELDNAME, except you only get the raw, unformatted field value. For example when calling the price field instead of getting "$150,000" you would simply get "150000". |
| listing_agent_field_FIELDNAME_caption |
Works the same listing_agent_field_FIELDNAME, except you only get the field caption. eg. "Phone" |
| fulllink_to_listing |
absolute link to the listing instead of the relative link, for use with the RSS Newsfeeds. |
| Blocks |
| All code contained on the template inside a block will be controlled according to the block it is contained inside. This is for template designers to control the display of many fields or code by enclosing it in one simple template tag block. A STARTING block will look like a normal template tag but that block must be closed with {/TEMPLATE_TAG} The following template tags are blocks: |
| rss_listing_block |
This block contains the data for listings that will be repeated for every listing in the RSS Feed. |
| listing_field_FIELDNAME_block |
To be placed around listing_field_FIELDNAME tags to prevent display of any code contained inside this block into the template if the field is not to be shown. You must close this block with /listing_field_FIELDNAME_block |
| listing_agent_field_FIELDNAME_block |
To be placed around listing_agent_field_FIELDNAME tags to prevent display of any code contained inside this block into the template if the field is not to be shown. You must close this block with /listing_agent_field_FIELDNAME_block |
> TOP <
NEXT/PREV TEMPLATE
(/template/TEMPLATE_NAME/FILENAME)
This template is used to control the layout of the Next/Prev section of search results and Listing Details page. The Next/Prev template is not configurable, the site will display one of the two templates depending on the template tag used to call the next/prev function:
1.
next_prev.html - This is the next/prev template. Called with
{next_prev}
2.
next_prev_bottom.html - This is the next/prev template. Called with
{next_prev_bottom}
> TOP <
Next/Prev Template Tags
Each tag in the template system looks like this
{tag_name}.
The Following tags are available from the Next/Prev template.
| Tag |
Description |
| lang_VARIABLE |
Displays the corresponding lang variable from the WP Realty lang file. |
| nextprev_num_rows |
The number of search results (search result rows) |
| nextprev_page_type |
Displays the lang variable for "next_prev_listing". |
| nextprev_meet_your_search |
Displays the lang variable for "listings_meet_your_search". |
| nextprev_listing_num_min |
Displays the beginning number of the range of listings that are being displayed on the search results. |
| nextprev_listing_num_max |
Displays the ending number of the range of listings that are being displayed on the search results. |
| nextprev_guidestring_no_action |
Displays the search string without the GET action or session id for use in a link to save searches or refine a search.
For example:
<a href="index.php?action=save_search{nextprev_guidestring_no_action}" >{lang_save_this_search}</a> |
| nextprev_guidestring |
Displays the full search string with the GET action for use in a link to additional pages of the search results. For example:
<a href="index.php?cur_page={nextprev_prevpage}{nextprev_guidestring}" class="bt_pages"> << </a> |
| nextprev_prevpage |
Displays the number of the previous page of the search results, can be used in a link to the previous page of the search results.
For example:
<a href="index.php?cur_page={nextprev_prevpage}{nextprev_guidestring}" class="bt_pages"> << </a> |
| nextprev_disp_count |
Displays the number of the page out of the block of 10 pages that we are currently viewing. |
| nextprev_count |
Displays the number of the page out of the block of 10 pages that we are currently viewing. This is for use in a link to the page you want to goto. The link must also include the {nextprev_guidestring}.
For Example:
<a href="index.php?cur_page={nextprev_count}{nextprev_guidestring}" class="bt_pages">{nextprev_disp_count}</a> |
| nextprev_nextpage |
Displays the number of the next page of the search results, can be used in a link to the next page of the search results.
For example:
<a href="index.php?cur_page={nextprev_nextpage}{nextprev_guidestring}" class="bt_pages"> >> </a> |
| nextprev_next10page |
Displays the number of the first page of the next group of 10 pages, can be used in a link to the next 10 pages (next 100 listings).
For example:
<a href="index.php?cur_page={nextprev_next10page}{nextprev_guidestring}" >{lang_next_100}</a> |
| nextprev_prev10page |
Displays the number of the last page of the previous group of 10 pages, can be used in a link to the previous 10 pages (next 100 listings).
For example:
<a href="index.php?cur_page={nextprev_prev10page}{nextprev_guidestring}" >{lang_previous_100}</a> |
| Blocks |
| Template tag Blocks are template tags that will have a starting and ending tag. ALL Code inside a block will be displayed or hidden depending on if the block's conditions are met. Starting tags will be listed below. Blocks must be closed with {/TEMPLATE_TAG_block}. Several of the blocks have a negative switch (!) that will have the opposite condition than its non-negative version. The following template tags are block options: |
| nextprev_num_of_rows_is_1_block |
Block that will be displayed IF there is only one search result row being displayed. |
| !nextprev_num_of_rows_is_1_block |
Block that will be displayed IF there more than one search result row being displayed. |
| nextprev_show_save_search_block |
Block that will be displayed IF this is the search results page to display the save search option. This will not be displayed on other pages that use the next/prev function such as the site log. |
| nextprev_show_refine_search_block |
Block that will be displayed IF this is the search results page to display the refine search option. This will not be displayed on other pages that use the next/prev function such as the site log. |
| nextprev_is_firstpage_block |
Block that will be displayed IF this is the first page of the search results. |
| !nextprev_is_firstpage_block |
Block that will be displayed IF this is NOT the first page of the search results. |
| nextprev_page_section |
Block for the 10 page result set selection. Items in this block will be repeated ten times to create the 10 pages of the search results. There are two blocks that are used inside of this block: nextprev_page_current_block and nextprev_page_other_block, see below for details of these blocks |
| nextprev_page_current_block |
Block that is displayed in the {nextprev_page_section} block if, the page number of the search results is the one that we are currently viewing. This is used with the normal template tag, {nextprev_disp_count} to maintain the count and display the count of the page we are on. |
| nextprev_page_other_block |
Block that is displayed in the {nextprev_page_section} block if, the page number of the search results is NOT the one that we are currently viewing. This is used with the normal template tag, {nextprev_disp_count} to maintain the count and display the count of the page we are on. |
| nextprev_lastpage_block |
Block that will be displayed IF this is the last page of the search results. |
| !nextprev_lastpage_block |
Block that will be displayed IF this is NOT the last page of the search results. |
| nextprev_prev_100_button_block |
Block that will be displayed IF we are on a page past the first 10 pages. |
| !nextprev_prev_100_button_block |
Block that will be displayed IF we are NOT on a page past the first 10 pages. |
| nextprev_next_100_button_block |
Block that will be displayed IF there are more than 10 pages left to be displayed. |
| !nextprev_next_100_button_block |
Block that will be displayed IF there are NOT more than 10 pages left to be displayed. |
| nextprev_clearlog_block |
Block that will be displayed IF this is the Admin View Log page and if the user is an admin. |
> TOP <
LISTINGS NOTIFICATION TEMPLATE
(/template/TEMPLATE_NAME/FILENAME)
This template is used to control the layout of the listings notification that is sent out by WP Realty's new listing notification system. The new listing notification emails are to notify users of new listings that match their saved searches.
The Listings Notification system is automated and must be run via a CRON job. See the "Listings Notification" topic in the "Automating Tasks" section of this documentation for instructions on setting up CRON jobs for the Listings Notifications.
Which Notify Listings Template that is used is determined by the site configuration. Any template named notify_listings_
templatename.html will be shown as an option in the site configuration.
1.
notify_listings_default.html - This is the default listings notification template included with all of the included templates.
> TOP <
Listings Notification Template Tags
Each tag in the template system looks like this
{tag_name}.
In addition to the Listings Notification Template specific tags below, you can also utilize any of the Listing Detail Template Tags. Several of these tags were utilized in the included RSS Template.
The Following tags are available from the listings notification templates.
| Tag |
Description |
| notify_url |
Returns the relative URL for a listing. |
| notify_thumb_src |
Returns the URL for the listing thumbnail image |
| notify_thumb_height |
Returns the height of the listing's thumbnail image |
| notify_thumb_width |
| Returns the width of the listing's thumbnail image |
|
| Blocks |
| Template tag Blocks are template tags that will have a starting and ending tag. Starting tags will be listed below. Blocks must be closed with {/TEMPLATE_TAG_block} The following template tags are block options: |
| notify_listing_block_row repeat="#" |
Block for the file row where rows will be used for displaying files in a horizontal layout. repeat="#" is the number of times to repeat the content inside the file_block before starting a new row.
When closing this block do not include repeat in the closing tag, i.e. a proper closing would be: {/file_block_row} |
| notify_listing_block |
Block for the each listing. The code inside this block will be repeated for each listing being displayed in the notification.
This block is required in order to display the listings. |
| notify_img_block |
Block for the listing image. The code inside this block will only be displayed if there is a thumbnail image to be displayed for the listing. If the no image display is turned on then that is considered a thumbnail and this block will be displayed. |
> TOP <
TAB PANE CODE DOCUMENTATION
The Tab Pane code used in the Site Configuration is also available for use in any of your WP Realty templates. Here is all the documentation on how to use the tabbed template code to create your own content tabs inside your WP Realty templates.
> TOP <
Tabbed Content
Tab Panes can be created in any WP Realty template file. If creating a Tab Pane in the main template you must ensure it is given a different ID than tab panes used in other template files. If you fail to provide seperate ID's the Tab Panes may not appear and function as expected.
Create Tab Pane
The Tab Pane is a division which contains the content of the tab pane known as Tab Pages.
Use the following code to create the Tab Pane:
<div class="tab-pane" id="tabPane1">
<script type="text/javascript">tp1 = new WebFXTabPane( document.getElementById( "tabPane1" ) );</script>
CONTENT
</div>
div: The div is the container for the Tab Pane and all of the Tab Pages. The class must be set to "tab-pane". The div id is the ID of this Tab Pane and must be defined. If you have more than one Tab Pane in a template you MUST use different ID's for each Tab Pane.
Javascript: The Javascript identifies the div id that will be used for this Tab Pane. In this case tp1 identifies that we are using div id "tabPane1" for this tab pane. You will use "tp1" in the Tab Page code to add each Tab Page to this Tab Pane.
CONTENT: This is where you will place the code for your Tab Pages (see below)
Create Tab Pages
<div class="tab-page" id="tabPage1">
<h2 class="tab">Details</h2>
<script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage1" ) );</script>
CONTENT
</div>
div: The div is the container for the Tab Page. The class must be set to "tab-page". The div id is the ID of this Tab Page and must be defined. The id for each subsequent Tab Page should be sequential in order to keep things easy to understand.
h2: This heading is the title for this Tab Page. The class must be set to "tab".
Javascript: This Javascript adds the Tab Page to the Tab Pane. You will need to modify the "tabPage1" with the ID of this Tab Page division.
CONTENT: This is where you will place all of your HTML content, WP Realty Template tags and other content for this Tab Page.
Examples
For further assistance and examples for creating your own Tabbed content in your WP Realty Templates check the coding of the included Tabbed Listing Detail Template.
> TOP <
AUTOMATING TASKS
Cron jobs
Cron jobs are a way to trigger a URL or task on a set time basis without having to manually log in to your site. The command that you want your cron job to execute will be different for each task you want to run. The specific command will be noted for each task in this section of the documentation.
Make sure to replace
ADMINUSER with your WP Realty admin user name,
ADMINPASSEORD with your password, and replace
yourdomain.com with your real domain name and any additional path elements.
If you are unsure of how to create a cron job with your hosting account, you should contact your host for details as this varies between servers and control panels.
> TOP <
Listings Notification
The Listings Notification task should be setup to be run at least once per day. The Listings Notification task will process all users' saved searches and send out any matching new listings added since the last time the task was processed.
It is recommended that you run the task during off-peak hours to reduce load on your site while the task is being run. If you import listings using an import tool such as VieleRETS® then it is recommended that you run this task after the import of any listings is completed.
Listings Notification Cron Command:
curl -d "user_name=ADMINUSER&user_pass=ADMINPASSEORD" http://www.yourdomain.com/admin/index.php?action=send_notifications
Listings Notification Manual Trigger:
If you prefer to process listing notifications manually you can do so with the following URL:
http://www.yoursite.com/admin/index.php?action=send_notifications
Alternatively you could also add a link to the Listing Notification System in the admin page using the following code:
{check_admin}<a href="admin/index.php?action=send_notifications" title="">Process Listings Notifications</a>{/check_admin}
> TOP <
WP Realty Hook System
The hook system allows you to trigger code after certain events in WP Realty.
There are 3 files used in the hook system. They are located in the hooks folder under your Plugin root folder. The files need to be renamed in order to use them. This is to ensure your custom files are not overwritten by future upgrades to WP Realty.
listing_hook.dist.php - should be renamed listing_hook.php
user_hook.dist.php - should be renamed user_hook.php
login_hook.dist.php - should be renamed login_hook.php
> TOP <
listing_hook.php
This file contains three functions:
after_new_listing($listingID) - This function can be used to run code after a new listing is added.
after_listing_change($listingID) - This function can be used to run code after a listing is modified.
after_listing_delete($listingID) - This function can be used to run code when a listing is deleted. The code is triggered before any data is removed from the db.
user_hook.php
This file contains three functions:
after_user_signup($userID) - This function can be used to run code after a successful user (agent or member) registration.
after_user_change($userID) - This function can be used to run code after a user profile is changed.
after_user_delete($userID) - This function can be used to run code when a user is deleted. The code is triggered before any data is removed from the db.
login_hook.php
This file contains two functions:
after_user_login($userID) - This function can be used to run code after a user logs in.
after_user_logout($userID) - This function can be used to run code after a user logs out.
> TOP <
DEVELOPER'S GUIDE
Code Standards
1) Format your code so that we can read it, please!
2) Use tabs for formatting, NOT SPACES. Tabs create smaller files and editors allow developers to view a tab as however many spaces as they prefer. Spaces do not allow this.
3) Use ' instead of " for strings. This is a performance issue, and prevents
a lot of inconsistent coding styles.
4) Comments go on the line ABOVE the code, NOT to the right of the code!
5) For each section of code put a section divider with basic explanation of the following code/functions. It should look like this:
/****************************************************************************\
* These functions are used to show a listing *
\****************************************************************************/
6) Do not document every bit of code in comments. PHP is an interpreted language and it will be nasty on performance.
7) Use switch statements where many elseif's are going to be used. Switch is faster and we like it better!
8) 'If' statements need to use the following format:
if ($var == 'example') {
echo 'This is only an example';
} else {
echo 'This is not a test. This is the real thing';
}
Do NOT make if statements like this:
if ($var == 'example'){ echo 'An example'; }
All other styles are not to be used. This is it. Use it or we will personally come and nag you to death.
9) ALL 'if' statements MUST have matching { } (brackets). Do NOT create 'if' statements like this:
if ($a == b)
dosomething();
or:
if ($a == b) dosomething();
They make the code more difficult to read and follow.
10) class/function format:
class testing
{
function print_to_screen()
{
global wprealtyrealty, listing_info;
if ($var == 'example') {
echo 'This is only an example';
} else {
echo 'This is not a test. This is the real thing';
}
}
}
11) Associative arrays must be written in the following manner:
$array = array
(
'var' => 'value',
'var2' => 'value2'
);
Note that tabs are preferred around the '=>'.
12) Use the long format for <?php. Do NOT use <?.
13) All code should start with 1 tab. Example:
<?php
dosomething();
if ($a) {
dosomemorestuff();
}
NOT:
<?php
dosomething();
if ($a) {
dosomemorestuff();
}
14) Use lower case for variable and function names. No stubbly-case (mixed-case) code.
15) Thanks for following these rules :)
> TOP <
Virtual Tour Documentation
> TOP <
Virtual Tours
WP Realty supports the following types of Virtual Tours:
- Standard Spherical 360° Panoramic Images in .jpg format (Built in Full Support using PTViewer)
- EGG Solution Virtual Tours using .egg files (Additional file required; See Instructions)
Other, unsupported Virtual Tour formats can be uploaded and used through the creation of an Add-on to handle the display of the unsupported format. You will need to add the file extension and MIME File Type to the Site Configuration in order to upload unsupported formats. Unsupported formats will be displayed as "UNSUPPORTED VTOUR".
See the Add-on Documentation for more information on creating an add-on. Also check the Add-on Releases Forum for any add-ons that may have already been Released to handle your format.
> TOP <
EGG Solution Virtual Tour Notes:
In order to use the EGG Solution capability of WP Realty you will need to copy the EGG Solution viewer applet from your EGG Solution software. This applet is Copyrighted by EGG Solution and we have not been able to gain their permission to include in our distribution of WP Realty. We hope we'll be able to get permission in the future.
In your EGG Solution software create a Virtual Tour and Export it to a Web Page. Browse to the location you exported the Virtual Tour to. Copy the following two files to your WP Realty root folder:
> TOP <
Creating a Virtual Tour
WP Realty will not create the virtual tour for you from standard images. You are required to create the virtual tour and upload the resulting images to WP Realty.
Standard virtual tours can be created using one of the following methods or possibly other methods not discussed here:
- Digital Camera - Fisheye lens - Tripod and Special Mount - Photo Stitching Software
- Digital Camera - 1 shot panoramic lens* - Tripod and Standard Mount - Photo Unwrapping software
- Digital Camera - Tripod - Photo Stitching software (note this method will generate an image that can be viewed left to right but not panned up or down and zooming will be limited)
*There are several different 1 shot lenses on the market. Some of these will not create a panoramic image that is compatible with the Standard Virtual Tours using PTViewer. Such is the case with the EGG Solution System. Many of the 1 shot lenses will come with their own proprietary viewer software and applets. These are not compatible with WP Realty however most can easily be made into an Add-On.
> TOP <
Uploading and Managing Virtual Tours
Once you've created your Virtual tour .jpg images or EGG solution .egg file you will need to upload it for the listing it belongs to.
Login to the control panel using your username and password
Click on
Edit My Listings or if the user has admin powers
Edit All Listings
Select the listing you want to edit
On the left side of the window you will see two columns; 1 for Listing Images & 1 for Virtual Tours
Click on Virtual Tours
You will presented with the virtual tour management screen where you can edit or delete existing virtual tour images and upload new Virtual Tours.
You can either type in the path on your computer to the Virtual Tour or click on
Browse and find and select your file
Once the file is selected click upload and your file should be uploaded.
You can upload only 1 .egg file for EGG Solution Virtual Tours and you can NOT mix .egg tours with .jpg tours. Standard .jpg images can be uploaded up to the max number as is set in the site configuration.
You will now see your Virtual Tour is uploaded, indicated by a small copy of your jpg image for Standard Virtual Tours and a EGG Solution placeholder image for EGG Solution Virtual Tours. You can edit the Title and Description for the Virtual Tours you've uploaded and they will display under the Tour on Standard Virtual Tours, these fields are not used on EGG Solution Tours although they can be filled out to help you remember details of the tour.
> TOP <
Distance Search DB
If you want to be able to perform a radius distance search with WP Realty then you will need to populate the "zipdist" database table in your WP Realty database.
To set up this feature we used zip code and lat/long data provided by:
http://www.zipcodedownload.com/
The package you will want to get would be the USA - 5-digit ZIP Code Database, Premium Edition. You can import this database directly into the WP Realty
Zip code and Lat/Long data from other providers SHOULD be compatible but you may have to do some manipulation of their data format to import it into WP Realty. The zip code data should be imported to the WP Realty table:
default_zipdist
ADD-ON INFORMATION
Why should you utilize the add-on system? What can you do with the add-on system? In the past, people have made numerous posts on the forums about problems and complaints regarding upgrading from one version of WP Realty to a new version. Many of these problems or complaints could have been prevented by the use of the add-on system
The add-on system was well thought out during the development of WP Realty and gives great power and flexibility to site developers to add functionality they desire to WP Realty without the need to edit the core code of WP Realty.
Add-ons don't need to be some large, complex, or spectacular add-on. Add-ons can be as simple as rewriting an existing WP Realty function to better suit your taste, design or needs. This will save you from having an unsupported codebase of WP Realty that can't easily be upgraded or requires you to reapply modifications you've made to the core code of WP Realty.
As an example, the Featured Listings didn't meet the needs of a friend I was designing an WP Realty site for recently. Instead of modifying the Featured Listings function in WP Realty and having a software that, if upgraded would lose all the changes I've made I rewrote the featured listings function into an Add-on. The new add-on function is now called in his templates instead of the default featured listings functions and he has a software that doesn't require jumping through hoops to upgrade to future bug fixes, or new versions of the software.
Of course, this isn't all that add-ons are for. Some very large and complex add-ons are planned and being worked on as well to add additional functionality to WP Realty.
When a change to something is desired, stop and think about the possibility of using an add-on to do what is required rather than editing the core code of WP Realty. This can save you a lot of time in the long run and make your enjoyment of WP Realty a lot more fun.
> TOP <
INSTALLING AN ADD-ON
WP Realty Add-ons can be located at the WP Realty Forums or within your client area:
Once you have located a add-on that you want to use in WP Realty check to see if documentation for that add-on is provided. This should include instructions for installing the add-on. If instructions for your add-on are provided follow those instructions as there may be special or additional steps required.
> TOP <
ADD-ON DEVELOPER GUIDE
Add-on System Specifications Version 1.1 for WP Realty
Description: The purpose of this specification is to make a module system that auto-loads any add-ons into WP Realty.
Add-ons are very powerful modules for WP Realty that will allow most modifications, customizations and additions to be put into an Add-on format instead of having to edit the core code of WP Realty. This will make upgrading to future versions of WP Realty much easier for the site developers and prevent users from having an unsupported version of WP Realty due to code modifications.
All add-ons MUST have an addon.inc.php file. - This file is the core of the add-on system. It is what WP Realty will look for to setup and integrate the add-on. There will be the following defined functions.
Download the sample Framework Add-on to use as an example of a correctly formatted Add-on.
> TOP <
Javascript
As of WP Realty 2.1 Add-ons can now load javascript into the template using two new global variables. Add-ons should add any javascirpt they want to load to the global variables making sure to include the <script> </script> tags around their javascript. The new variables are:
1: $jscript Javascript added to this global variable will be loaded into the main template in place of the "{load_js}" template tag.
2:
$jscript_last Javascript added to this global variable will be loaded into the main template in place of the "{load_js_last}" template tag.
You must use $jscript
.= XXX so the main WP Realty javascript is not over written with your code. You MUST define the variable as a global variable in your function(s). You would use these variables in your add-on specific function(s).
> TOP <> TOP <
Search Results
If creating an add-on that will be used on the search results page and you would like to get the listing_ids for the listings in the search results you can use one of these bits of code:
1: $matched_listing_ids = search_page::search_results(true); returns the listing_ids for all of the listings in the search results
2:
$matched_listing_ids = search_page::search_results(perpage); returns the listing_ids for the search results with pagination (only the ones displayed on that page of the search results)
> TOP <
Add-on Functions
All add-on functions should be prefixed with the add-on name. This prefix name should match the add-on folder name, and is represented below by name_.
> TOP <
name_install_addon()
This function should add new database tables and data or modify existing tables and data when necessary. This should be used to store the version number of your add-on in the add-ons table and compare the add-on version to the previously installed version, if any and determine if an installation or an update is needed and then carry out any required database modifications. Here is an example of a proper name_install_addon function:
function name_install_addon()
{
$current_version = "1";
global $conn, $config;
require_once($config['basepath'].'/include/misc.inc.php');
$misc = new Misc();
//Check Current Installed Version
$sql = 'SELECT addons_version FROM '.$config['table_prefix_no_lang'].'addons WHERE addons_name = \'name\;
$recordSet = $conn->Execute($sql);
$version = $recordSet->fields[0];
if ($version == )
{
// Preform a new install. Create any needed databases etc, and insert version number into addon table.
$sql = 'INSERT INTO '.$config['table_prefix_no_lang'].'addons (addons_version, addons_name) VALUES (\'1\',\'name\')';
$recordSet = $conn->Execute($sql);
return TRUE;
}
elseif ($version != $current_version)
{
//Preform Updates to database based on previous installed version.
switch($version)
{
case '0';
break;
} // switch
return TRUE;
}
return FALSE;
}
> TOP <
name_show_admin_icons()
This function should return an array of the html links that should be shown on the administrative page. You can post as simple as a text name of your add-on to show users what's installed, or a link to an administrative page of your add-on. You can display a link using something like this: index.php?action=
name_addonname_admin You will need to define the action "
name_addonname_admin" in "
name_run_action_admin_template" to define it as a $_GET[] action for the admin page. Here is an example of a proper name_show_admin_icons function:
function name_show_admin_icons()
{
$admin_link = '<a href="index.php?action=addon_name_admin">name</a>';
return $admin_link;
}
> TOP <
name_load_template()
This should return an array with all the template tags for WP Realty's template engine to parse. If you don't define your template tags for the add-on here they won't be parsed by the template system and properly displayed. The actual replacement of the tags that are defined here is done by the
function name_run_template_user_fields Here is an example of a proper name_load_template function:
function name_load_template()
{
$template_array = array('addon_name_link');
return $template_array;
}
> TOP <
name_run_action_user_template()
This function handles the add-on's $_GET[] actions for the
USER pages. Each get action should have the function to be called defined. The Function must be named using this method:
addon_name_description. Here is an example of proper code for this function:
function name_run_action_user_template()
{
switch ($_GET['action']) {
case 'addon_name_showpage1':
$data = name_display_addon_page();
break;
default:
$data = '';
break;
} // End switch ($_GET['action'])
return $data;
}
> TOP <
name_run_action_admin_template()
This function handles the add-on's $_GET[] actions for the
ADMIN pages. Each get action should have the function to be called defined. The Function must be named using this method:
addon_name_description. Here is an example of proper code for this function:
function name_run_action_admin_template()
{
switch ($_GET['action']) {
case 'addon_name_admin':
$data = name_display_admin_page();
break;
default:
$data = '';
break;
} // End switch ($_GET['action'])
return $data;
}
> TOP <
name_run_template_user_fields()
This function handles all the replacement of {addon_name_template_tags} with the actual content. The tag replacement can call any function that already exists in WP Realty or you can create your own
ADD-ON Specific functions. All tags setup here must also be added to the
name_load_template function in order for WP Realty to parse them. Here is an example of proper code for this function:
function name_run_template_user_fields($tag = )
{
switch ($tag) {
case 'addon_name_link':
$data = name_display_addon_link();
break;
default:
$data = '';
break;
} // End switch ($_GET['action'])
return $data;
}
> TOP <
name_addonmanager_help()
This function provides the information that is displayed in the Add-on Manager help link. There are arrays for Template Tags and Action URLs. The is a variable for a link to the Add-on's documentation URL. Here is an example of proper code for this function:
function name_addonmanager_help()
{
$template_tags=array();
$action_urls=array();
$doc_url='http://wiki.wprealty-realty.org/framework';
$template_tags['addon_framework_link']='This tag places a link to the Framework Admin.';
$action_urls['addon_framework_admin']='Displays the Framework Admin page.';
return array($template_tags,$action_urls,$doc_url);
}
> TOP <
name_uninstall_tables()
This function runs the SQL commands to delete any tables or values that were added during the installation of the add-on. The return string should return TRUE to indicate the add-on's tables were removed properly.
function name_uninstall_tables()
{ global $conn, $config; require_once($config['basepath'] . '/include/misc.inc.php'); $misc = new Misc();
$sql_uninstall[] = "DELETE FROM " . $config['table_prefix_no_lang'] . "addons WHERE addons_name ='framework'";
foreach($sql_uninstall as $elementContents) {
$recordSet = $conn->Execute($elementContents);
if ($recordSet === false) {
echo "<strong><span style=\"red\">ERROR - $elementContents</span></strong><br />";
return FALSE;
} else {
return TRUE;
}
}
}
> TOP <
Add-on Specific Functions
Add-on specific functions are functions that are created specifically for the add-on's use. An example of this would be if a user wanted to create an add-on for a customized Featured Listing layout then the user can write their own Featured listing display function and have it called by the template tag {addon_superniftyfeaturedlisting_display} Using all of the above examples of properly formatted add-on functions you would be calling the following Add-on Specific Functions:
// Addon Specific Function
function name_display_addon_link()
{
$display = '<a href="index.php?action=addon_name_showpage1">name Test</a>';
return $display;
}
// Addon Specific Function
function name_display_addon_page()
{
$display = 'This is a Addon page';
return $display;
}
// Addon Specific Function
function name_display_admin_page()
{
$display = 'This is a Addon page';
return $display;
}
All of these functions have been rolled into a sample add-on called "Framework". You can download the sample Framework Add-on to use as an example or starting point for making your own add-ons.
Download the sample Framework Add-on to use as an example of a correctly formatted Add-on.
> TOP <
FREQUENTLY ASKED QUESTIONS (FAQ's)
> TOP <
What is the difference between agents and members?
Agents can post listings to your site and can also be given more advanced privileges such as editing site pages etc.
Members on the other hand, can not post listings. Members are the people who visit your site, they sign-up to be able to save searches and favorite listings. They can also receive notification by email when new listings that match saved searches are added to the site, you can enable or disable this feature from the site configuration.
> TOP <
I need to change a word, phrase or how something is said in WP Realty, how do I change it?
WP Realty was designed using language variables so that almost all wording on your WP Realty site can easily be changed in the language files. The language files contain a large list of all the language variables used on the site and their current values. For details on creating custom language files, editing current language files or changing individual language variables see the Language Documentation section of this documentation.
> TOP <
I need a feature that WP Realty doesn't have, what can I do?
If you need a special feature that doesn't exist in WP Realty you have a few options.
First and foremost you should try searching the WP Realty forums to see if anybody has posted an Add-on that includes the feature you want or to see if somebody has posted anything similar.
You can post on our Feature Request system (link in the Support Forums), write an Add-on for WP Realty to add the feature to your WP Realty site (See Add-on Documentation), post in the WP Realty support forum's Work topic to hire somebody to create an add-on, or write the feature into your core code.
Core code modifications are discouraged as they make your WP Realty site difficult to upgrade and can create new, unforeseen bugs in your copy of WP Realty. If you do choose to code a custom feature into the core code of WP Realty that would be beneficial to others you are highly encouraged to post the code to the Feature Request system so that developers can consider it for inclusion in a future release of WP Realty.
> TOP <
TROUBLESHOOTING
> TOP <
JPG Images are distorted/discolored after i upload them
If you are using the GD Libs resizing tool (set in your site configuration) make sure your server has version GD Version 2.x or higher. If your server has GD Libs version 2.x or higher then make sure you have configured support for GD Version 2.
- Log in to the admin panel
- Go to the Site Configuration
- On the Uploads/Images tab find the setting for GD Version 2.x and make sure it is "Yes". Save your changes.
- In the WP Realty's Site Config turn "Show Count In Search Options:" off.
- Increase the "Step" value on all min/max searches so it has to build less options. I recommend setting the "Max Step" value to a low number so that WP Realty will not create an unreasonable amount of step values.
- Look for min/max options where the max value is out of place. Things like 100 bedrooms is almost certainly wrong. Find the listing with the incorrect value and correct it. If you are importing data from your MLS, contact them to have the data correct at the MLS and ask them why they do not have any sort of limits in place to prevent such data entry mistakes from happening.
- Updated WP Realty requirements - PHP 4.x no longer supported
The search page is rendered dynamically from the WP Realty database using values from listings and settings in the site configuration. If, after trying these tips, you still feel your search page is rendering too slow, you may consider creating a hard coded search page. See the Custom Search Pages section of the Search Page Template documentation section.
> TOP <
RSS Feed is broken
RSS Feeds may break in rare circumstances when there are special characters in the Listing Title field and Multi-Byte String support is not enabled in PHP. There should not be any problems without Multi-Byte String support as long as the database collation and WP Realty are both set to UTF-8 character sets.
> TOP <
I get "Not Authorized" error message when trying to sign up as a member or agent
For security purposes WP Realty performs a referrer check when somebody visits the Agent or Member sign up page. The referrer check verifies that the user came to the sign up page from a link on the WP Realty site and not from a link elsewhere on the internet or from typing the address directly into the web browser. The purpose is to help reduce the number of signups on sites from spam bots. To correct the problem, place a link to the sign-up page on your WP Realty site and click that link to visit the sign-up page.
> TOP <
RECENT CHANGES
WP Realty Version 2.0.5
> TOP <
I see this error on my search results page, Notice: A non well formed numeric value encountered in include/search.inc.php
This error occurs when you have a listing field setup as a field type of "date" and have a non date value stored in that field. This usually occurs when the field is originally configured as a different field type and then changed to "date". To fix it you need to remove any non date values from the listing field for all of your listings, or change the field type to "text".
> TOP <
Search results don't display any listings but it says there should be search results
This problem occurs when you have a default search results sort by field defined that does not contain data or is not available in the property class that you are searching. Make sure that whatever field you have configured as the "Default Sortby" in the Site Configuration under the Search Results tab is available in every property class and always has data in it.
> TOP <
Search Page is slow to display
There are a few things you can do to speed up rendering of the search page.