User Support

Ticket system for communicating with users

Configuration

The plugin reads its settings from a configuration file, with the following keys.

Key Description
expireInterval The number of days after the last staff reply before a ticket closes automatically. Set it to false to turn automatic closing off. Default: 7
attachmentTypes The file extensions that users may attach, as an array or a comma-separated string. Default: jpg, jpeg, png, gif, webp, pdf, txt, doc, docx, xls and xlsx
attachmentMaxFiles The most files that one submission, reply or edit may attach. Default: 5
attachmentMaxSize The largest size of each attached file, in megabytes. Default: 10

Overriding the Defaults

The defaults are found in the config/config.php file of the plugin. To change a value, create a config/responsiv/support/config.php file in your project and return only the keys you want to change.

<?php

return [
    'expireInterval' => 14,
    'attachmentTypes' => ['jpg', 'jpeg', 'png', 'pdf', 'txt', 'csv'],
];

Each key you return replaces the plugin's default for that key, so attachmentTypes must list every extension you want to allow. See Overriding Configuration Values for more details.

Automatic Closing

The expireInterval value is a whole number of days. Set it to false or 0 to turn automatic closing off, and tickets then stay open until the user or staff close them. See Closing Expired Tickets for the rules and the schedule.

The closed-by-staff and closed-by-system mail templates also receive the value as expireInterval.

Attachments

The attachment settings apply to the files that users attach with the Ticket Submit, Ticket and Ticket Update components. Files that staff attach in the admin panel are not checked against them.

  • Every file is checked before anything is saved, so one file that breaks a rule refuses the whole submission.
  • SVG files are always refused, even when svg is listed, because they can carry scripts that run when staff open them.
  • The attachmentMaxFiles limit counts the files added in one request, not the files already attached.
  • The PHP upload_max_filesize and post_max_size settings must also allow the size you set.

Errors are reported under the files field, whichever file caused them, with one of these messages.

Message Reason
You can attach up to :count files. Too many files were attached.
Each attachment must be :size MB or smaller. A file is larger than attachmentMaxSize.
Attachments must be one of these file types: :types. A file extension is not in attachmentTypes.
An attachment could not be uploaded. The upload failed, for example because the file is larger than PHP allows.