The hook system allows you to trigger your own custom code after certain events occur in OR.


You can create multiple hook files within a single OR install. Each hook file should be named  'X_hook.php', for example: sample_hook.php  


Within the hook file there must be a class named 'X_hook.php'  named identically as your hook file, as in the case of our example sample_hook.php file below that is using a Listing related hook.


sample_hook.php

<?php

class sample_hook {

       function after_new_listing($listingID) {

               //your code goes here

       }

}

?>


Each hook file can contain any of the following group of functions, each is explained in the following pages..



Open-Realty also has a few special hooks, that may only exist as a single occurrence between your hook files.




Related Topics:
User Images
User Manager
Edit User
Users
User Lead Notification
View Agent Template Tags