ssi_shd_called()
ssi_shd_called()
Makes SMF hook system happy that it has a function to call for SSI.
This file handles data gathering primarily for SSI.php purposes. It expects Subs-SimpleDesk.php to have been required as this will still be needed for helpdesk permissions checks and base functions.
The function names imply who is expected to be the target, ssi_user functions are those intended for users, ssi_staff for staff members, such as ssi_userTickets() is primarily for displaying the tickets started by a given user, ssi_staffAssignedTickets() for all the tickets assigned to a given member of staff.
No support for displaying these through SHTML is provided, nor is any planned.
Unlike other SimpleDesk functions, these use a SSI style camel casing.
ssi_userTickets(integer $started_by, array|integer $dept = array(), integer $limit = 10, string $output_method = 'echo') : null|array
Gets a list of the tickets currently open that are a given user's (subject to ticket visibility).
integer | $started_by | The user id whose tickets you want to examine, defaults to the current user. |
array|integer | $dept | An array of department ids whose tickets you want to examine, defaults to all departments. |
integer | $limit | The number of tickets to limit to, default 10. |
string | $output_method | Set to 'echo' for displaying content, set to 'array' to simply return data. |
An array of data, more details under the underlying function {@link ssi_getSDTickets()}
ssi_staffAssignedTickets(integer $assignee, integer|array $dept = array(), integer $limit = 10, string $output_method = 'echo') : null|array
Gets a list of the tickets currently open that are assigned to the current user (presumably staff, subject to ticket visibility).
integer | $assignee | The user id whose tickets whose assigned tickets you want to examine, defaults to the current user. |
integer|array | $dept | An array of department ids whose tickets you want to examine, defaults to all departments. |
integer | $limit | The number of tickets to limit to, default 10. |
string | $output_method | Set to 'echo' for displaying content, set to 'array' to simply return data. |
An array of data, more details under the underlying function {@link ssi_getSDTickets()}
ssi_staffTicketsUrgency(integer $urgency, integer|array $dept = array(), integer $limit = 10, string $output_method = 'echo') : null|array
Gets a list of all tickets based on urgency criteria given (subject to ticket visibility)
integer | $urgency | The urgency of tickets you want to get. |
integer|array | $dept | An array of department ids whose tickets you want to examine, defaults to all departments. |
integer | $limit | The number of tickets to limit to, default 10. |
string | $output_method | Set to 'echo' for displaying content, set to 'array' to simply return data. |
An array of data, more details under the underlying function {@link ssi_getSDTickets()}
ssi_getSDTickets(string $query_where, array $query_where_params = array(), integer $query_limit, string $query_order = 'hdt.id_ticket ASC', $output_method = 'echo') : null|array
Gets tickets based on supplied criteria; this is a helper function not really intended to be called directly.
string | $query_where | SQL clauses to be supplied to the query in addition to {query_see_ticket} - note 'AND' is not required at the start. |
array | $query_where_params | Key/value associative array to be injected into the query, related to $query_where. |
integer | $query_limit | Number of items to limit the query to. |
string | $query_order | The clause to order tickets by, defaults to tickets by order of creation. |
$output_method |
An array of arrays, each primary item containing the following:
ssi_staffMembers(boolean $honour_admin_setting = true, string $output_method = 'echo') : array
Gets a list of all staff members within the helpdesk.
boolean | $honour_admin_setting | Within the administration panel is the option to exclude forum admins from being considered staff (so can't assign tickets to them). If true (default), assume the outcome of that should be applied here too. |
string | $output_method | Leave as default or explicitly set to 'echo' for this function to output a list of helpdesk staff members, set to 'array' to block output, and have the standard contents back. |
The return is always an array of members that are staff; contains many details about members since SMF's member context is loaded (including avatar, personal text and so on)
Page created in 0.017 seconds with 10 queries.