|
| Function Reference |
|
|
|
|
There is a growing list of functions that are available for use within plugins. These provide hooks into existing RocketDMS code and functionality and can be used within any of your plugins. plugin::add_pick_list($code,$list)Create a pick list. This will be a 1-tiered combo with all items listed. Creates and populates a pick-list for use in document tags. This function will do the same thing that you can do via the Config program, Settings tab, Document tags sub-tab. $code = String, Pick list code. $list = Array, pick list contents : $list = array();
plugin::add_pick_list_grouped($code,$list)Create a grouped pick list. This will be a 2-tiered combo with all items grouped by the first character of the label. Creates and populates a pick-list for use in document tags. This function will do the same thing that you can do via the Config program, Settings tab, Document tags sub-tab. $code = String, Pick list code. $list = Array, pick list contents : $list = array();
plugin::alert($msg)Message popup on the screen. User clicks OK to close the dialogue and continue.
plugin::choose_file($caption,$path,$filter)File open dialogue. Returns empty string on cancel. Returns: String or FALSE if cancelled.
plugin::clear_pick_list($code)Clears the contents from a pick list of the given $code.
plugin::debug()Displays debug information. Helpful for testing and development of plugins but should be removed or commented out when not being used. Also triggered by the Debug checkbox on the settings tab of the plugin workbench.
plugin::err($msg)Creates a modal error message popup on the screen. User clicks OK to close the dialogue and continue.
plugin::explorer($file (optional))Open a Windows explorer. If file specified then opens with that file selected.
plugin::file_list($path)List of files in given path/folder. Returns: Array
plugin::folder_add($docstore_path,$folder) Add a new folder to the document store. $docstore_path = String, Full path to an existing folder in the document store. Starts with forward slash, all forward slashes. eg. /Pikaia/Invoices $folder = String, Name of folder to add under the given $docstore_path.
plugin::form($form_title, $fields, $field_size, $defaults, $comment) Design and present a pop-up form to get input from the user. Returns an array of entered data. Very handy! $form_title = String, Title displayed in pop-up for window title bar. $fields = Array of strings listing all of the form field labels. The array order sets the order of the form fields. $field_size = Array of integers listing the size of each entry field. $defaults = (optional) Array of mixed default values for each form field. $comment = (optional) String of text to display on the form. Returns: Array of FALSE if cancelled Example: $title = 'Credit while attending outside training/meeting.'; plugin::ini_read($var) Arbitrary settings or values that can be saved and read locally on user pc. Used to save individual user settings. Returns: Mixed plugin::ini_write($var,$val)Arbitrary settings or values that can be saved and read locally on user pc. Used to save individual user settings.
plugin::message($msg)Creates a modal message popup on the screen. User clicks OK to close the dialogue and continue.
plugin::set_order($list,$headings,$title,$win_name) Pop-up dialogue to display a list of items and let the user manually sort the list into any order. $list = Array of arrays . List of rows to sort. Each row may have multiple columns. $headings = (optional) Array of strings used as column headings. $title = (optional) String for pop-up dialogue window title. $win_name = (optional) String used internally as an identifier for the pop-up. Used to save and restore pop-up window size and position. Returns: Array or FALSE if cancelled. Example:
plugin::setting_read($var)Arbitrary settings or values that can be saved and read across all users and plugins. Can be used as a way of sending data between plugins. See also ini_read. Returns: Mixed
plugin::setting_write($var,$val)Arbitrary settings or values that can be saved and read across all users and plugins. Can be used as a way of sending data between plugins. See also ini_read.
plugin::start_wait($cmd,$params) Shell command and wait for completion. $cmd = String command to run. $params = (optional) String command line parameters.
plugin::start_no_wait($cmd,$params) Shell command in background. Continue without waiting for completion. $cmd = String command to run. $params = (optional) String command line parameters.
plugin::string($title,$label,$prompt,$default,$err_msg,$width)Get a string input from the user. Returns: String
plugin::yes_no($question,$caption)Ask user a Yes/No question. Returns TRUE/FALSE.. Returns: TRUE|FALSE
|
| Last Updated on Friday, 11 November 2011 14:27 |