SimpleDesk API
Procedural File: SimpleDesk-Admin.php
Source Location: /source/SimpleDesk-Admin.phpThis file handles the core of SimpleDesk's administrative information and options from within SMF's own admin panel.
Tags:
- since
- 1.0
Contains the following functions:
shd_admin_action_log [line 418]
void shd_admin_action_log (
)
Initialises the helpdesk action log.
This function loads the language strings, and hands off to shd_load_action_log_entries() to perform the actual log generation.
Before doing so, however, this function will also prepare for deletion of old entries, as well as sorting out the columns and ordering rules before handing control to the other function.
Tags:
- since
- 1.0
Return value
This function has no return value.shd_admin_info [line 97]
void shd_admin_info (
)
Loads the main SimpleDesk information page for forum administrators.
This function primarily collects information about SimpleDesk before handing over to the template:
- list of helpdesk staff
- totals of tickets in the system (open/closed/deleted)
- credits
- also, in the template, whether this is a current or outdated version of SimpleDesk
Tags:
- since
- 1.0
Return value
This function has no return value.shd_admin_main [line 37]
void shd_admin_main (
)
The start point for all interaction with the SimpleDesk administration area.
Enforces that users attempting to access the area have either forum or helpdesk administrative privileges, loads the SimpleDesk administrative CSS and Javascript and promptly directs users to the specific function for the task they are performing.
Tags:
- since
- 1.0
Return value
This function has no return value.shd_admin_options [line 197]
void shd_admin_options (
$return_config, [ $override = ''] )
Configuration options and save functions generally for SimpleDesk.
This function handles all the sub areas under General Options, and adds the options listed below in $modSettings.
<strong>Display options</strong>
- 'shd_staff_badge' (dropdown) - selects the type of badge(s) to display:
- nobadge (default): Display no badges, just a small staff icon for staff members
- staffbadge: Display nothing for normal users, and badge/stars for staff
- userbadge: Display nothing for staff and normal badge/staff for regular users
- bothbadge: Display regular badges/stars for both staff and users
- 'shd_display_avatar' (checkbox) - whether to display avatars in the replies area or not
- 'shd_ticketnav_style' (dropdown) - selects the type of navigation in the ticket area:
- sd (default): use the original SimpleDesk style, icons+text in the bar just above the main ticket area
- sdcompact: use the SimpleDesk icons, in the bar just above the main ticket area, but no captions
- smf: use an SMF style button-strip above the ticket menu
- 'shd_allow_ticket_bbc' (checkbox) - one-stop enable/disable of bbcode in tickets (see shd_format_text() for where this is used)
- 'shd_allow_ticket_smileys' (checkbox) - one-stop enable/disable of smileys in tickets (see shd_format_text() for where this is used)
- 'shd_attachments_mode' (dropdown) - selects the presentation of attachments to users:
- ticket (default): treat attachments as if they are attached to the ticket overall; do not enforce max number per ticket
- reply: treat all attachments as attached to replies; enforce same limit per reply as with posts normally
- 'shd_bbc' (bbc) - enable/disable individual BBC tags around the helpdesk (see shd_format_text() for where this is used)
<strong>Administrative options</strong>
- 'shd_disable_action_log' (checkbox) - if checked, no actions are added to the action log.
- 'shd_staff_ticket_self' (checkbox) - if checked, a ticket opened by a staff member can be assigned to them to action.
- 'shd_admins_not_assignable' (checkbox) - if checked, a ticket cannot be assigned to forum admins, only regular staff. (Since 1.1 only)
- 'shd_privacy_display' (dropdown) - whether to display privacy or not:
- smart (default): Display ticket privacy if it's likely to be relevant (if users can alter ticket privacy, and/or see private tickets AND the ticket is private, show it)
- always: Always display ticket privacy; likely to be confusing
<strong>Standalone options</strong>
- 'shd_helpdesk_only' (checkbox) - if checked, Standalone mode is active.
- 'shd_disable_pm' (checkbox) - if checked, personal messages will not be available at all when SimpleDesk is in (active) Standalone mode
- 'shd_disable_mlist' (checkbox) - if checked, the memberlist will not be available at all when SimpleDesk is in (active) Standalone mode
Tags:
- see
- shd_format_text()
- since
- 1.0
Parameters
- $return_config
- $override
Return value
This function has no return value.shd_admin_support [line 489]
void shd_admin_support (
)
Loads the support page for users to submit support requests directly to SimpleDesk.net
Very small function because essentially it just loads a template; there is no logic or processing to actually perform.
Tags:
- since
- 1.0
Return value
This function has no return value.shd_credits [line 505]
void shd_credits (
)
Loads the list of credits of people who've worked on SimpleDesk.
This defines the list of peoples' names, and none of it will be in language strings; the actual category titles and positions will be, but the names themselves can live in this file normally.
Tags:
- since
- 1.0
Return value
This function has no return value.shd_modify_admin_options [line 382]
array shd_modify_admin_options (
bool $return_config )
Provide a helper callback for admin search area.
SMF 2.0 features an admin search area, and to identify what settings there are, it calls the function that will handle the searching, which is required to then return a list of possible options' language strings.
Since all of the SD options are currently handled in a single parameterised function, we have to provide a non-parameterised version that the ACP can call, which is this function.
Tags:
- see
- shd_admin_options()
- since
- 1.0
Parameters
- bool $return_config
- Whether to return configuration items or not; this is provided solely for SMF ACP compatibility (it expects to pass bool true in to get a list of options)
Return value
Returns a type array. An array of items that make up the search options on the given admin page, each item is itself an array of (type, option name/language string, [other related information])shd_modify_display_options [line 342]
array shd_modify_display_options (
bool $return_config )
Provide a helper callback for admin search area.
SMF 2.0 features an admin search area, and to identify what settings there are, it calls the function that will handle the searching, which is required to then return a list of possible options' language strings.
Since all of the SD options are currently handled in a single parameterised function, we have to provide a non-parameterised version that the ACP can call, which is this function.
Tags:
- see
- shd_admin_options()
- since
- 1.0
Parameters
- bool $return_config
- Whether to return configuration items or not; this is provided solely for SMF ACP compatibility (it expects to pass bool true in to get a list of options)
Return value
Returns a type array. An array of items that make up the search options on the given admin page, each item is itself an array of (type, option name/language string, [other related information])shd_modify_posting_options [line 362]
array shd_modify_posting_options (
bool $return_config )
Provide a helper callback for admin search area.
SMF 2.0 features an admin search area, and to identify what settings there are, it calls the function that will handle the searching, which is required to then return a list of possible options' language strings.
Since all of the SD options are currently handled in a single parameterised function, we have to provide a non-parameterised version that the ACP can call, which is this function.
Tags:
- see
- shd_admin_options()
- since
- 1.0
Parameters
- bool $return_config
- Whether to return configuration items or not; this is provided solely for SMF ACP compatibility (it expects to pass bool true in to get a list of options)
Return value
Returns a type array. An array of items that make up the search options on the given admin page, each item is itself an array of (type, option name/language string, [other related information])shd_modify_standalone_options [line 402]
array shd_modify_standalone_options (
bool $return_config )
Provide a helper callback for admin search area.
SMF 2.0 features an admin search area, and to identify what settings there are, it calls the function that will handle the searching, which is required to then return a list of possible options' language strings.
Since all of the SD options are currently handled in a single parameterised function, we have to provide a non-parameterised version that the ACP can call, which is this function.
Tags:
- see
- shd_admin_options()
- since
- 1.0
Parameters
- bool $return_config
- Whether to return configuration items or not; this is provided solely for SMF ACP compatibility (it expects to pass bool true in to get a list of options)



