- To create your own LiveURL plugin, go to the client modules directory via SFTP (/livewhale/client/modules) and create a new module subdirectory describing the project. For example: /livewhale/client/modules/my_plugins.
- Then create a LiveURL subdir for that project, which will contain any LiveURL plugins you want to make: /livewhale/client/modules/my_plugins/live.
- Next, create a plugin file in the directory created in step 2. If you wish to access your plugin via /live/my_data_feed, then name the file my_data_feed.php. The full path will result in: /livewhale/client/modules/my_plugins/live/my_data_feed.php
- Now edit the file in step 3 and write your own custom PHP code
- Once you are finished, you will be able to access your plugin at http://<your.site.edu>/live/my_data_feed
Passing argument to the LiveURL plugin
Your LiveURL plugin has access to an array of arguments passed to the request. These are stored in $LIVE_URL['REQUEST'].
In the following example, $LIVE_URL['REQUEST'] would be an array containing "id" and "1". You can then have your LiveURL plugin respond to specific commands this way.
Note: The LiveURL plugin does not automatically include the CMS application, and therefore does not initially have access to the LiveWhale framework functions. If you need this functionality, then your plugin can load the app: require '/path/to/web/root/livewhale/frontend.php'. (For example, if you wanted to use the $_LW->dbo object to perform database requests against the LiveWhale database.)