“Tickets” Documentation by “Michael Dale” v6.2


Tickets

Created: 08/10/2014
Updated: 20/04/2016
By: Michael Dale

Thank you for purchasing Tickets. If you have any questions that are beyond the scope of this help file, please feel free to log a support request via our support portal. Thanks so much!

We also recommend that you check out our online handbook, it contains the most up to date information.


Table of Contents

  1. Welcome
  2. Features
  3. System Requirements
  4. Install
  5. Upgrading
  6. Release Log
  7. Developers
  8. Credits
  9. License

Welcome - top

Welcome to Tickets.

Tickets

Tickets is a full featured, yet easy to use help-desk system.

It is great for users and businesses who wish to keep track of and manage support requests online.

You can create multiple users, search tickets, convert POP3 emails into tickets, create custom priorities and much much more.

Tickets has been designed to be easy to install and all config files and database files are created during the install. You simply need a web hosting account and one free MySQL database (no programming is required).

You can easily upgrade to new versions free of charge. All your existing settings, users and tickets are kept intact.

If you have any problems at all please leave a comment here and we will get back to you as quickly as possible.

Tickets has been built around our own custom framework that is used in a number of different public and private applications. It has proven to be stable and secure.

For advanced users or programmers you can create your own plugins to extend the program. Please see the Developers section for a link to the developer pack.

Tickets is designed to be a stand alone web application, you are of course welcome to modify the code, but I cannot support modified code if it breaks.

Whenever I release a new version of Tickets an upgrade script is included (more below), please make sure you keep Tickets up to date.

Please note: If you modify the Tickets code the upgrade script may fail. It will be up to you to fix this if a problem occurs. You must support your own code changes.


Support - top

We have our own support portal that includes a support ticket system, knowledge base and forums, please register here for all support needs.

Dalegroup Support Portal


Features - top

Tickets includes a number of features.


System Requirements - top

Tickets is written in PHP5.4 and uses a MySQL5 database. Tickets is a "Web Application" that must be installed on a Web Server.

You must install Tickets on a web host that supports PHP5.4, MySQL5 and Apache.

You may also install Tickets on your personal computer by using one of the many options (i.e google WAMPserver or XAMPP), this is not covered in this document.

The full system requirements can be found below.


Install - top

There are a number of steps required to install Tickets.

  1. Copy the unzipped contents of the zip file to somewhere on your webserver. You can install Tickets in a folder on your existing web hosting or setup a new subdomain.
  2. Create an empty MySQL database (most hosting provides a control panel that allows you to do this).
  3. Ensure your PHP install can create files (for config.php to be created during the install).
  4. Run http://tickets.example.com/install/ from your web browser.
  5. Follow the steps.
  6. Backup your MySQL database and user/settings/config.php file.
  7. Setup a process to visit http://tickets.example.com/cron/ every 5 minutes (more info below in the CRON section).
  8. Done

Permissions for Install - top

During the Tickets install two files will be created, .htaccess (in the root of the tickets folder) and config.php (in user/settings/).

These files are required for Tickets to function.

If the install fails and is unable to write these files please check the security permissions on the tickets folder on your web server.

On Linux/BSD/MacOS the easiest thing to do is to set the permissions of the entire folder to 777. Once the install has completed we recommend you switch back to 755.

Otherwise you can simply try 755, it depends on your web host.

For information on chmod permissions please see this page.


Upgrading - top

Upgrading is pretty easy.

  1. Download the latest version of the Tickets zip file
  2. Backup your MySQL database, config.php file and .htaccess file.
  3. Backup any custom code or changes you have made (this will be overwritten).
  4. Unzip the new install onto your local computer.
  5. Delete the install/ folder.
  6. Upload this to your existing install of Tickets replacing all existing files.
  7. Login
  8. Run the database upgrade from your web browser (run http://tickets.example.com/upgrade/).

CRON Setup - top

The cron system allows Tickets to send and receive emails (and other tasks) in the background. Please ensure this is setup as it is a required task.

There are a number of ways to set this up. The best method is to use a Linux Cron style setup on the server itself. This will be the most reliable method.

Although you can use one of the many free web cron services, these often only work once every 10-15mintes, meaning that emails take longer to send.

Linux Cron

  1. Type crontab -e in your linux command line.
  2. Type in the following: */5 * * * * wget -q -O /dev/null "http://tickets.example.com/cron/"
  3. Save
  4. crontab -l should now list the cron process

If you do not have access to the command line you might have access to the web hosting control panel that should allow this. Otherwise talk with your webhost.

Windows Scheduled Task

Windows supports the same type of CRON process through the use of a Scheduled Task and a 3rd party wget program.

Wget for Windows


Custom Email Notification Templates - top

Tickets allows you to customise the emails sent to users.

You can use the following fields in your templates.

Field Description Available In
#SITE_NAME# The name of your site. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply, New User
#SITE_ADDRESS# The URL of your site. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply, New User
#TICKET_KEY# REQUIRED - Allows Tickets to match emails to tickets. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_SUBJECT# The subject of the ticket. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_ID# The id of the ticket. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_DESCRIPTION# The body of the ticket. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_NOTE_DESCRIPTION# The body of the ticket reply. New Ticket Reply, New Department Ticket Reply
#GUEST_URL# An HTML link to access the ticket without login. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_URL# An HTML link to access the ticket. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_DEPARTMENT# The department that the ticket is in. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_STATUS# The status of the ticket. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_PRIORITY# The priority of the ticket. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_OWNER_NAME# The owner name of the ticket. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_OWNER_EMAIL# The owner email of the ticket. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_ASSIGNED_NAME# The assigned user full name of the ticket. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#TICKET_ASSIGNED_EMAIL# The assigned user email address of the ticket. New Ticket, New Department Ticket, New Ticket Reply, New Department Ticket Reply
#USER_FULLNAME# The name of the user that the email/account is for. New User
#USER_NAME# The username of the user that the email/account is for. New User
#USER_PASSWORD# The password of the user that the email/account is for. New User
#USER_EMAIL# The email address of the user that the email/account is for. New User

POP3 Download - top

The POP3 download system allows you to use an email address to send and receive tickets.

Although not required we recommend that you use a new POP3 mail account to ensure that only new messages are imported.

The POP3 download system supports multiple accounts. Here is an example setup.

POP Account Department Leave Messages (on server) Download Files Priority
accounts@example.com Accounts Yes Yes Medium
support@example.com Support No Yes High
sales@example.com Sales No Yes Medium
sms@example.com SMS Notices No No High

If you have an existing contact form on your website you can simply create a new department in Tickets and POP3 account. Once this is done, setup your contact form to send emails to this new address. Tickets can then download these messages.


User Permissions - top

Tickets includes 6 different user levels/permissions. These permissions allow you to add users with restricted access to features or tickets.

Permissions are global. So if a user is a moderator, they can moderate tickets from any department that they are assigned to.

Permission Features Ticket Access Use
Administrator All Features (Profile, Tickets, Tickets Mass Moderate, Users, Settings) All Tickets This should only be given to technical users that are completely trusted with the system.
Global Moderator Profile, Tickets, Tickets Mass Moderate All Tickets Allows access to every ticket in the system.
Moderator Profile, Tickets, Tickets Mass Moderate Add/Edit/Delete/View (all tickets in departments that the user is a member of). Department Manager
Staff Profile, Tickets Add/View and basic Edit (all tickets in departments that the user is a member of). Support Staff
User Profile, Tickets Add/View and basic Edit (only tickets assigned to or created by the user). Contractor
Submitter Profile, Tickets Add/View and basic Edit (only tickets created by the user). Client/End User

Custom Language - top

To create your own language

  1. Make sure you have a good text editor. On Windows I recommend Notepad++
  2. Ensure that you use the encoding type UTF-8 without BOM in the text editor.
  3. Copy system/languages/english_aus.lang.php to user/languages/example.php
  4. Open the new example.php file in your text editor.
  5. Change the words on the right hand side to match your language (leaving the left hand side alone).
  6. When finished save the file and close
  7. Load Tickets and go to Settings.
  8. Change the "Default Language" to "Example"

When you make a new language, if you could please send it to me that would be great. I can then include this in future versions for everyone to use.


Release Log - top

The release log is now maintained online.


Developers - top

As of version 1.4 Tickets supports plugins.

You can download the developers pack here.


Plugins - top

As of version 1.4 tickets now supports plugins.

Plugins allow you to extend Tickets without modifying the core code. This means that you can easily distribute extra functionality without requiring users to make any code changes.

Plugins also allow users to upgrade to a new version of Tickets without needing to re-apply code changes.


Plugin Hooks - top

A plugin hook is an area where your plugin can interact with Tickets.

During sections of processing Tickets will call a plugin hook, this is where your plugin comes alive.

The plugin system allows you to add sections to Tickets that look exactly like the built in functionality.

Below is an example of creating a hook.

//get the plugins class
$plugins 		= &sts\singleton::get('sts\plugins');

//setup a hook
$plugins->add(
	array(
		'plugin_name'	=> 	__CLASS__,
		'task_name'		=> __CLASS__ . 'section_name',
		'section'		=> 'section_name',
		'method'		=> array($this, 'section_name')
	)
);	

Plugins are stored in the user/plugins/ folder and can be activated from the settings page.

Section Name Area Example Use Version
loader Runs at the end of loader.php Useful for setting up data after all plugins are loaded. 1.4+
html_header Runs in the HTML head section. Useful for loading in extra CSS or Javascript files. 1.4+
html_header_nav_start Runs in the HTML menu section. Useful for adding extra menu items. 1.4+
html_header_nav_settings Runs in the HTML settings menu section. Useful for adding extra menu items to the settings drop down. 1.4+
plugin_page_header_* Runs before the HTML header in a specific/requested page. Visit /p/examplecsslist/ and plugin_page_header_examplecsslist is called. Visit /p/foo/ and plugin_page_header_foo is called.
This section should be used to set the title of new pages (and other page setup) for logged in users.
1.4+
plugin_page_body_* Runs in the body of a specific/requested page. Visit /p/examplecsslist/ and plugin_page_body_examplecsslist is called. Visit /p/foo/ and plugin_page_body_foo is called.
This section should be used to create HTML in the body of the new page. For logged in users.
1.4+
public_page_header_* Runs before the HTML header in a specific/requested page. Visit /public/examplecsslist/ and public_page_header_examplecsslist is called. Visit /public/foo/ and public_page_header_foo is called.
This section should be used to set the title of new pages (and other page setup). For pages that don't require the user to be logged in.
1.4+
public_page_body_* Runs in the body of a specific/requested page. Visit /p/examplecsslist/ and public_page_body_examplecsslist is called. Visit /p/foo/ and public_page_body_foo is called.
This section should be used to create HTML in the body of the new page. For pages that don't require the user to be logged in.
1.4+
cron_* Runs when a specific cron interval is run. Useful for background processing or tasks that need to happen often.
Hooks include: cron_every_five_minutes, cron_every_hour, cron_every_day, cron_every_week and cron_every_month.
1.4+
download_other_files Runs in /files/download/ when ticket_id isn't set Useful for downloading other files.
Use method download_other_files(&$files) and pass an array of files from the storage class.
1.5+
view_ticket_details_finish Runs in the view ticket page after the ticket details (guest portal included). Useful for displaying extra details about a ticket. 2.2+
view_ticket_user_details_finish Runs in the view ticket page after the users details (guest portal included). Useful for displaying extra details about a user on the ticket page. 2.2+
view_ticket_sidebar_finish Runs in the view ticket page after all sidebar boxes (guest portal included). Useful for adding an extra sidebar box. 2.2+
profile_content_finish Runs after the content on the profile page. Useful for adding extra content boxes on the profile page. 2.2+
auth_logged_in_start Runs when "if logged in" is checked in the system. Useful when using a custom login system. 2.2+
auth_load_start Runs when the logged in user is loaded from the database. Useful when using a custom login system. 2.2+
auth_login_start Runs when a user logs in. Useful when using a custom login system.
An array of the username and password is passed to this hook.
2.2+
auth_logout_start Runs when the user logs out. Useful when using a custom login system. 2.2+
view_user_sidebar_finish Runs on the left side of the view user page. Useful for adding extra information or sidebar widgets. 2.5+
view_user_details_finish Runs in the main content box of the view user page. Useful for adding extra user data. 2.5+
submit_register_form_success_before_create_user Runs after a user has successfully registered but before the account has been created. Useful for validating any extra form fields that have been added. 2.5+
submit_register_form_success_after_create_user Runs after a user has successfully registered and been created. Useful for storing any extra form fields. 2.5+
view_register_sidebar_finish Runs on the left side of the view regsiter page. Useful for adding extra information or sidebar widgets, or explaining extra form fields. 2.5+
view_register_form Runs in the register form Useful for adding extra form fields. 2.5+
view_user_content_finish Runs after all existing user data on the view user page. Useful for adding lists or large amounts of extra user data. 2.5+
view_tickets_content_start Runs above the tickets list. Useful for adding alerts above the main tickets index view page. 2.5+
view_tickets_content_finish Runs below the tickets list. Useful for adding less important information to the tickets index view page. 2.5+
api_default_action Runs when an unknown (custom) api_action is requested. Useful for adding custom API calls. 3.0+ (use api_hook_authenticated_* for 4.1+)
api_unauthenticate_action Runs when an unauthenticated (custom) api_action is requested. Useful for adding custom API calls. 3.1+ (use api_hook_unauthenticated_* for 4.1+)
body_header Runs just after the html body is loaded (for every page). Useful for adding google analytics etc. 3.2+
api_hook_authenticated_* Runs when an authenticated (custom) api_action is requested. Useful for adding custom API calls. 4.1+
api_hook_unauthenticated_* Runs when an unauthenticated (custom) api_action is requested. Useful for adding custom API calls. 4.1+

Credits - top

Dalegroup Pty Ltd

3rd Party Code

A number of MIT, LGPL and other copyrighted libraries and resources have been used in this program. These copyrights remain the property of their owners.

Some of these libraries include

If we have missed anything please let us know!


License - top

This program was developed by Dalegroup Pty Ltd and is copyrighted.

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND WHETHER EXPRESSED OR IMPLIED.

In no event shall the author or Dalegroup Pty Ltd be held liable for any damages whatsoever, including without limitation, damages for loss of business profits, business interruption, loss of business information, or any other loss arising from the use or inability to use the software.

Your purchase of Tickets allows you to install a SINGLE (one) copy of Tickets on ONE server. You may not resell, distribute or rent Tickets.


Once again, thank you so much for purchasing this web application. As I said at the beginning, I'd be glad to help you if you have any questions relating to Tickets. No guarantees, but I'll do my best to assist.

Michael Dale

Go To Table of Contents