Add a client side open ticket list to osTicket 1.9 or 1.10rc2

This mod was updated on 15 Dec 2015

Ever since 1.9 was released my old article on how to add a client side open ticket list has been deprecated. The article that your reading now is yet another updated version to work with both the 1.9.x and 1.10rc2 releases.

One of the features that I would love to see integrated into osTicket is an open ticket listing for clients. While I do beleive that this would be best added to core or made into a plugin this will have to suffice until one of those two things are realized.  

I feel that this simple version gives users the ability to see what tickets are already open so as to cut down on duplicate tickets, and gives the user a better idea of how many tickets are ahead of them when placing a request. This mod was originally written for osTicket 1.6ST and re-released for 1.7, 1.8 and now finally 1.9 and 1.10.  While this mod is here for everyone to be able to use, it would be great if the people who use it donated .

In the past I have included two ways to install (the mod). However with this release I am only including one way to install this (chiefly due to the fact that no one has ever donated a dime for this mod).

1. Save the display_open_topics.php into your base osTicket folder. Open it and edit the lines 18 through 24 to match your setup.

2. open osticketDirectory\assets\default\css\theme.css with your favorite text editor and scroll all the way to the bottom and add the following:

#openticks {
  padding:5px;
  background:#BFBFBF;
  -moz-border-radius: 5px;
  border-radius: 5px;
  -moz-box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.4);
  -webkit-box-shadow: 3px 3px rgba(0, 0, 0, 0.4);
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.4);
}

#openticks-a {
  border-right-style: solid;
  border-right-width: 1px;
  border-right-color: #BFBFBF;
  text-align:center;
  vertical-align:middle;
  padding-bottom:4px;
}

#openticks-b {
  text-align:center;
  vertical-align:middle;
  padding-bottom:4px;
}

3.  open and edit \index.php scroll down and replace line 79-82

</div>
</div>

<?php require(CLIENTINC_DIR.'footer.inc.php'); ?>

change to:

</div>
<p style="text-align:center">Be sure to browse both our <a href="kb/index.php">Featured Questions (FAQs)</a>, and the open tickets below before opening a ticket.  Thank you.
  <div id="openticks"><?php include('display_open_topics.php'); ?></div>
</p>
</div>

<?php require(CLIENTINC_DIR.'footer.inc.php'); ?>

The file archive for this mod can be downloaded here.

Running 1.8? Please use see this article instead for that version: Add a client side open ticket list to osTicket 1.8

How to add a configuration option to osTicket 1.8.1.2

So you wrote a mod or a plugin and want to add some configuration options directly to into the osTicket Admin panel. This is a short tutorial on how to add a setting to osTicket 1.8.1.2, and then have your mod (or plugin) check that setting.

First off realize that modding osTicket can result in the breaking of your site, and you should really perform a backup of both the site and your database prior to making changes.

Next is to decide what you want your setting to be; where you want to put it in the admin panel; and what you want to label it.  Personally I wrote a mod a while back that adds a client side open ticket list and think it would be great to be able to toggle this feature on and off, and control how many open tickets the mod displays.  You do not have to have this mod installed to follow this tutorial, but I figured a real world example might be easier so this tutorial will assume that mod is already installed. To that end I've decided on two settings:

  • "Display Open Tickets to Clients" which will be a check box., and have the help text of " Allow clients to view a safe summary of open tickets on the landing page"
  • "Display # open ticket to Clients:" which will be a text field, and have a help text of " (Limit the number of open tickets to display to clients – default 10)"

I've decided to put both of these settings in Admin panel -> Settings -> Tickets, as the last two options before the "Attachments" section.  So lets start editting with adding these fields there.

Let's open and edit: /include/class.config.php
Scroll down to line 304.
Just after the closing } add:

    function clientDisplayOpen() {
        return $this->get('client_display_open');
    }

    function clientDisplayNum() {
        return $this->get('client_display_num');
    }

This will let us use those functions to get the config variables values later.

Next scroll down to line 903.
After the line that reads:
'allow_client_updates'=>isset($vars['allow_client_updates'])?1:
add:
'client_display_open'=>isset($vars['client_display_open'])?1:0,
'client_display_num'=>$vars['client_display_num'],

This will make sure that our fields get updated when we hit save.

Now lets open and edit: /include/staff/settings-tickets.inc.php.
Scroll down to line 138.
Place your cursor after the </tr> and hit enter.
We are going to add a new tr here to display the settings on the page.
add:
        <tr>
            <td>Display Open Tickets to Clients:</td>
            <td>
                <input type="checkbox" name="client_display_open" <?php
                echo $config['client_display_open']?'checked="checked"':''; ?>>
                Allow clients to view a safe summary of open tickets on the landing page
            </td>
        </tr>
        <tr>
            <td>Display # open ticket to Clients:</td>
            <td>
                <?php
                    if($config['client_display_num'] == '0' || $config['client_display_num'] == null) {
                        $client_display_num = '10';
                    } else {
                        $client_display_num = $config['client_display_num'];
                    } ?>
                <input type="text" name="client_display_num" size=4 value="<?php echo $client_display_num ?>">
                <em>(Limit the number of open tickets to display to clients - default 10)</em>
            </td>
        </tr>

Let's go over this a little.
$config['client_display_open'] is the variable that holds if our check box is checked.
$config['client_display_num'] is the variable that holds the # of tickets to display.  Additionally it defaults to 10 if its not set, or is set to 0. This is redundant as its also checked in the display_help_topics.php also. 

Note: if you have a LOT of tickets open on a regular basis you may want to consider hard coding in a default for maximum also so that way staff cannot set it to say 500 and have it display 500 open tickets to the client.

Lastly we need to change the display logic a little to determine if we should be displaying the open ticket list.
lets open and edit: /index.php

replace last 9 lines with:
<?php
    if($cfg && $cfg->isKnowledgebaseEnabled()){ $displayfaq = '1'; }
    else { $displayfaq = '0'; }
    if ($ost->getConfig()->clientDisplayOpen()) { $displayopen = '1'; }
    else { $displayopen = '0'; }
    
    if ($displayopen == '1' && $displayfaq == '1') { ?>
        <p>Be sure to browse both our <a href="kb/index.php">Frequently Asked Questions (FAQs)</a>, and the open tickets below before opening a ticket.  Thank you.
        <div id="openticks"><?php include('display_open_topics.php'); ?></div>
        </p>
    <?php }
    else {
        if($displayfaq == '1') { ?>
            <p>Be sure to browse our <a href="kb/index.php">Frequently Asked Questions (FAQs)</a> before opening a ticket.  Thank you.
        <?php }
        if($displayopen == '1') { ?>
            <div id="openticks"><?php include('display_open_topics.php'); ?></div>
        <?php }   
    } ?></div><?php require(CLIENTINC_DIR.'footer.inc.php'); ?>

What this does is based on how displayfaq and displayopen are set it shows different things. The important part here if you're going to do this for something else is how we reference the setting specifically: $ost->getConfig()->clientDisplayOpen().

Lastly to be complete we need to edit the display_open_topics.php.  This file is not part of the standard osTicket distribution (yet?) and is included in the mod archive I mentioned earlier.  Currently its hard coded to display 10 records.  Locate lines 21-22 which should look like this:

// The maximum amount of open tickets that you want to display.
$limit = '10';

Replace them with the following:
// The maximum amount of open tickets that you want to display.
$limit = $ost->getConfig()->clientDisplayNum();

// if limit is 0 or null set to default [10].
if($limit == '0' || $limit == null) {
    $limit ='10';
}

What this does is check for the setting in the database and if it doesn't exist or is 0 for some reason sets the number to 10.  This is a little redundant because we also check to make sure that if its 0 or null that it gets set to 10 in /include/staff/settings-tickets.inc.php.

Now if you log into your osTicket installation and go to Admin panel -> Settings -> Settings -> Tickets you should see something like this:
new config options
 

Using the osTicket 1.8.1.2 API

One of the [I feel] less documented features of osTicket is the ticket API.  This API has been built into osTicket for quite some time and allows you to write your own html forms and push the data to osTicket to open tickets.  This means that you could write a contact block for your web page and have it submit to osTicket directly, or if you have another piece of software that can run a script you can write your own custom script to open tickets from that software.  Example a network monitoring system (like NOCOL/SNIPS) could open a ticket when a device stops responding.

Before you can start using the API you will need to do some configuring in osTicket.  Log into your osTicket installation with your admin account. and go to Admin panel -> Manage -> API Key.

api key start

On the right click on "Add New API Key".

osticket add api key

There are several things that you need to enter here.  First is the IP address of the source where the request will originate from.  This can be the server IP address assigned to your server that hosts the software. Next you will want to check "Can Create Tickets (XML/JSON/EMAIL)".  Then under "Admin Notes" put a note so that in the future you can go in and see what this API key was made for.  Something like: "API Key for automating X software opening tickets." where X is the name of the software your using.  Feel free to customize this to be what will relay to you the reason for this API key.  Next click "Add Key".

api key is setup

Take note of the "THISISAFAKEAPIKEYHERE!" (which of course will be a real API key for your installation).  You will need this for your script.

Next download the osTicket API example. The only thing in this archive is a file called: ost-api-example.php.   This is an example of how to use the API using PHP.  Obviously you will need to edit this file to suit your implementation of osTicket.  The two really important parts are on lines 18 and 19. 

'url'=>'http://your.domain.tld/api/tickets.json', // URL to site.tld/api/tickets.json 'key'=>'PUTyourAPIkeyHERE' // API Key goes here Edit line 18 to have your URL.
Edit line 19 by changing "PUTyourAPIkeyHERE" to your API key (aka the "THISISAFAKEAPIKEYHERE!" from earlier).

If you have any required custom fields you will want to add them to the $data = array (lines 39 through line 49).  There are examples of both a list and text field included (Agency and Site).

Next try to run the script.  You can do this by putting the script on a web server and browsing to it. [note: the webserver will need to have the IP address that you put in the API key!]

Add a client side open ticket list to osTicket 1.8

This article was updated on 21 Feb 2014
This mod still works on the new version 1.8.1ST

Earlier this year when 1.7 was released I updated an article to add a client side open ticket list. The article that your reading now is yet another updated version to work with the new 1.8 (it's also been tested under 1.8.0.1) release.

Read more “Add a client side open ticket list to osTicket 1.8”

MOD: Staff CC ticket responses for osTicket 1.7ST

This mod is a partial update of the old 1.6ST Send reply to alternate/additional email address(es) by Scottro it has been updated for osTicket version 1.7ST. It adds a new text “CC” field to the Staff view ticket page. Here are instructions on what the steps are and how to do so:

\include\class.email.php

circa line 143, locate:

    function send($to, $subject, $message, $attachments=null, $options=null) {

        $mailer = new Mailer($this);
        if($attachments)
            $mailer->addAttachments($attachments);

        return $mailer->send($to, $subject, $message, $options);
    }

replace with:

    function send($to, $subject, $message, $attachments=null, $options=null,$cc=null) {

       $mailer = new Mailer($this);
       if($attachments)
         $mailer->addAttachments($attachments);

       return $mailer->send($to, $subject, $message, $options, $cc);
     }

\include\class.mailer.php

circa line 87, locate:

function send($to, $subject, $message, $options=null) {

replace with:

function send($to, $subject, $message, $options=null, $cc=null) {

circa line 95, locate:

$to = preg_replace("/(\r\n|\r|\n)/s",'', trim($to));

on the next line add:

$cc = preg_replace("/(\r\n|\r|\n)/s",'', trim($_POST['cc_to']));

circa line 112, locate:

        $headers = array (
                'From' => $this->getFromAddress(),
                'To' => $to,
                'Subject' => $subject,
                'Date'=> date('D, d M Y H:i:s O'),
                'Message-ID' => $messageId,
                'X-Mailer' =>'osTicket Mailer'
               );

replace with:

        $headers = array ();
        $headers['From'] = $this->getFromAddress();
        $headers['To'] = $to;
        $headers['Subject'] = $subject;
        if ($cc != null) {
            $headers['cc'] = $cc;
        }
        $headers['Date'] = date('D, d M Y H:i:s O');
        $headers['Message-ID'] = $messageId;
        $headers['X-Mailer'] = 'osTicket Mailer';

\include\class.ticket.php

circa line 1400-1401 locate:

        if(!$vars['staffId'] && $thisstaff)
            $vars['staffId'] = $thisstaff->getId();

After it add:

		if($_POST['cc_to']){
		  $cc = $_POST['cc_to'];
		  $ccmsg = "[ Message was CCed to: $cc. ]\n\r\n\r";
		  $vars['response'] = "$ccmsg".$vars['response'];
		}

circa line 1442, locate:

$email->send($this->getEmail(), $msg['subj'], $msg['body'], $attachments);

replace with:

$email->send($this->getEmail(), $msg['subj'], $msg['body'], $attachments,$cc='');

\include\staff\ticket-view.inc.php

circa line 413, locate:

</tr>

replace with:

</tr>
<tr>
  <td>CC:</td>
  <td><input size=80 type="text" name="cc_to" ></td>
</tr>

Notes: Unlike the old version this one does not allow you to edit the To or BCC fields. It’s simply for CCing. This version updates the email sent and the note added o the ticket to indicate that the update was CCed to someone and to whom. Multiple CC recipients may be specified by separating emails with commas.

The original version of this mod is still available at Scottro’s web site located at: http://sudobash.net and is for osTicket version 1.6ST.

MOD: Pending – Autoclose for osTicket 1.7ST

This mod is an update of the old 1.6ST Pending Status and Autoclose mod for osTicket version 1.7ST. It adds a new “Pending” status that can be used on tickets, it also adds an autoclose feature for tickets that are left in pending for more then 5 days. Here are instructions on what the steps are and how to do so:

version: 1.7.b

Summary:

  • 1. Install the additional files
  • 2. Update the database
  • 3. Editing the files
  • 4. Customizing the Mod

Read more “MOD: Pending – Autoclose for osTicket 1.7ST”

MOD: New Bootstrap Theme for osTicket

This theme mod was written by community member and forum user fantasypc and was available for download on the osTicket forums. However the users site was hacked, and the download is no longer available. Since there has been some forum posted interest in the package. I’ve added it here for the community to be able to continue to download it. Sadly he did not include the screen shots in the archive so I couldn’t add them here, and I do not use the mod so I cannot take my own.

Enjoy!

BootStrap-OsTicket-v1.0.zip

original source: http://osticket.com/forums/showthread.php?t=14143

Agencies Dropdown and Admin UI for osTicket 1.7ST

These directions are for adding a database populated drop down field to tickets feature for osTicket v1.7ST. While it will be similar for any current version (RC through ST) it has only been tested on osTicket 1.7ST. Directions for modified osTicket v1.7ST will be similar but the line numbers may be different based on how you have modified your own implementation. These directions require that you already have a working implementation of osTickets v1.7ST. If you need these instructions for 1.6ST please click here.

Before you start following the directions on this or any other mod please be aware that you should always back up your site files and your database.

Step 1 – Modifying the Database

First we are going to create a table to store the information for the extra drop down field that we will be creating. For the purposes of this article we are creating the drop down box will be called “Agencies”. To use another name (such as “Program” or “Company” simply replace every occurrence in these directions of the word “agencies” with what you want to call it.

There are several ways to create the table (command line, phpmyadmin, MySQL Administrator, MySQL Workbench, etc.) so please feel free to use the way that you are most comfortable.

CREATE TABLE `ost_agencies` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `agency` varchar(255) NOT NULL,
  `addDate` datetime NOT NULL,
  `isenabled` tinyint(1) unsigned NOT NULL,
  `editor` varchar(25) default NULL,
  `upDate` datetime default NULL,
  `notes` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`),
  FULLTEXT KEY `agency` (`agency`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

note1: Please make sure that the ost_ prefix is what you are using for your setup. If you are using a different prefix make sure that you change this everywhere in the instructions.

note2: Please note that if you aren’t using “Agencies” please change all references to “Agencies” or “agency” to what you want it to be. There are 4 references in the above SQL query that should be changed. This same holds true for every instance in every step and the files distributed with this mod.

While we are here lets add one (1) entry into the table that you can change or edit later.

INSERT INTO `ost_agencies` (`id`,`agency`,`addDate`,`isenabled`,`editor`,`upDate`)
VALUES (1,'EMAILED TICKET','2010-09-01 11:23:47',1,'','0000-00-00 00:00:00');

Next we need to add a field to the ost_ticket table that will hold the Agency number.

ALTER TABLE `DATABASENAME`.`ost_ticket` ADD COLUMN `agency` INTEGER 
UNSIGNED NOT NULL DEFAULT 0 AFTER `updated`;

Step 2 – Modifying the files

Next we will be performing a number of edits to different files in the OSTicket directory tree.

Edit /include/client/open.inc.php
at line 45 insert the following:

<!-- start test -->
    <tr>
        <th nowrap >Agency:</th>
        <td>
            <select name=agency>
		<option value=0 selected>--select one--</option>
		<?
		  $agencies= db_query('SELECT id,agency FROM ost_agencies WHERE isenabled=1 ORDER BY agency');
		  while (list($id,$name) = db_fetch_row($agencies)){
 		    $ck=($info['id']==$id)?'selected':''; ?>
		    <option value="<?=$id?>" <?=$ck?>><?=$name?></option>
		  <?}?>
	    </select>
            <font class="error"><b>*</b> <?=$errors['source']?></font>
        </td>
    </tr>
<!-- end test -->

edit /include/client/view.inc.php
at line 36 add:

<tr>
  <th>&nbsp;</th>
  <td>&nbsp;</td>
</tr>

on line 52 add:

<tr>
  <th width="100">Agency:</th>
  <td>
  <?
    // need to take $ticket->getAgency and convert it into its name from the ost_agencies table
    $agencies= db_query('SELECT agency FROM '.TABLE_PREFIX.'agencies WHERE id='.$ticket->getAgency().'');
    $agency = db_fetch_row($agencies);
    ?>
    <?=Format::htmlchars($agency[0]);?>
  </td>
</tr>

edit /include/class.ticket.php
in function load($id=0)
at line 68 add:

.' LEFT JOIN ost_agencies agency ON (ticket.agency=agency.id) '

at line 178 after function getEmail() add:

    function getAgency() {
        return $this->ht['agency'];
    }

at line 1962 remove the ; frmo the end of the line, and add the following on the next line:

.' ,agency='.db_input($vars['agency'])

Since email doesn’t have a “agency” value we’re going to hard code one for now. You may want to create a default value in the database of “Emailed” and change this number to that.

edit /include/class.mailfetch.php
in function createTicket($mid)
at line 382 add:

$vars['agency']="45"; // set default agency for emails

line 298
added

  'agency' => $this->getAgency(),

line 1601
add on next line

  $fields['agency']    = array('type'=>'string',    'required'=>1, 'error'=>'Agency required');

line 1644
remove ; from end of line

line 1645
add

  .' ,agency='.db_input($vars['agency']);

line 1864
add

  $fields['agency']    = array('type'=>'string',    'required'=>1, 'error'=>'Agency required');

Lets add “Agencies” to the Admin panel under “Manage” -> “Agencies”

edit /include/class.nav.php
before “break;”
on line 209 add:

$subnav[]=array('desc'=>'Agencies','href'=>'agencies.php','iconclass'=>'alert-settings');

edit /scp/settings.php

on line 24
change

  'alerts' => 'Alerts and Notices Settings');

to

  'alerts' => 'Alerts and Notices Settings',

add next line:

  'agencies' => 'Agencies');

edit /include/staff/ticket-view.inc.php

at line 142 add:

<tr>
  <th>&nbsp;</th>
  <td>&nbsp;</td>
</tr>

at line 181 add:

<tr>
  <th width="100">Agency: </th>
  <td>
  <?
    // need to take $ticket->getAgency and convert it into its name from the ost_agencies table
    $agencies= db_query('SELECT agency FROM '.TABLE_PREFIX.'agencies WHERE id='.$ticket->getAgency().'');
    $agency = db_fetch_row($agencies); ?>
    <?php echo Format::htmlchars($agency[0]);?>
  </td>
</tr>

edit /include/staff/ticket-open.inc.php
at line 38 add:

<tr>
  <td width="160" class="required">Agency</td>
  <td>
    <select name=agency>
    <option value=0 selected>--select one--
    <?
    $agencies= db_query('SELECT id,agency FROM '.TABLE_PREFIX.'agencies ORDER BY agency');
    while (list($id,$name) = db_fetch_row($agencies)){
      $ck=($info['id']==$id)?'selected':''; ?>
      <option value="<?=$id?>" <?=$ck?>><?=$name?></option>
      <?
    }?>
    </select>
    <font class="error"><b>*</b> <?=$errors['source']?></font>
  </td>
</tr>

edit /include/staff/ticket-edit.inc.php
at line 40 (after the close tr from email)
add the following:

<tr>
  <td align="left">Agency:</td>
  <td>
            
    <select name="agency">	
    <?php
    $agencies= db_query('SELECT id,agency FROM '.TABLE_PREFIX.'agencies ORDER BY agency');
    while (list($id,$name) = db_fetch_row($agencies)){
      echo sprintf('<option value="%d" %s>%s</option>',
      $id, ($info['agency']==$id)?'selected="selected"':'',$name);
    }
    ?>
    </select>
  </td>
</tr>

Attached is the agencies-dropdown-admin-interface.zip which should contain all the necessary files that you should be able to simply drop in place. Instructions are included in the archive and here for those who have already modified their osTicket 1.7ST code files.

Attached File: osticket-mod-agencies-dropdown-admin-interface.zip

Add a client side open ticket list to osticket 1.7ST

This article was updated on 18 Apr 2013

One of the features that I would love to see integrated into osTicket is an open ticket listing for clients. I feel that it gives clients the ability to see what tickets are already open so as to cut down on duplicate tickets, and give them a better idea of how many tickets are ahead of them when they place their request. Now that osTicket 1.7ST has been released I have updated my previous mod for osTicket 1.6ST and re-released here for everyone to be able to use. I have included two ways to install it. If you have modified your installation already you can install manually following the directions. If you have not modified your installation I have included all the files that you can simply copy over your existing ones.

1. Save the display_open_topics.php into your base osTicket folder.
Open it and edit the lines 17 through 20 to match your setup.

Note: my installation uses an additional field ‘agency’ (site) and this is setup to display that field. You will need to change this to remove references to it.

2. Save the theme.css to osticketDirectory\assets\default\css\theme.css
-OR-
open osticketDirectory\assets\default\css\theme.css

A. To make the landing page fit together a little better

scroll or find:

#landing_page #new_ticket

change

margin-top: 40px;

to

margin-top: 10px;

scroll or find:

#landing_page #check_status

change

margin-top: 40px;

to

margin-top: 10px;

Note: I submitted this minor change to core on 04/04/2013 so it may not be needed in the future.

B. add the following to the bottom

#openticks {
  padding:5px;
  background:#BFBFBF;
  -moz-border-radius: 5px;
  border-radius: 5px;
  -moz-box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.4);
  -webkit-box-shadow: 3px 3px rgba(0, 0, 0, 0.4);
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.4);
}

#openticks-a {
  border-right-style: solid;
  border-right-width: 1px;
  border-right-color: #BFBFBF;
  text-align:center;
  vertical-align:middle;
  padding-bottom:4px;
}

#openticks-b {
  text-align:center;
  vertical-align:middle;
  padding-bottom:4px;
}

3. Copy the index.php (included) into your base osTicket folder
-OR-
open and edit \index.php
scroll down and replace line 50-54

<p>Be sure to browse our <a href="kb/index.php">Frequently Asked Questions (FAQs)</a>, before opening a ticket.</p>
</div>
<?php
} ?>
<?php require(CLIENTINC_DIR.'footer.inc.php'); ?>

change to:

<p>Be sure to browse both our <a href="kb/index.php">Frequently Asked Questions (FAQs)</a>, and the open tickets below before opening a ticket.  Thank you.
  <div id="openticks"><?php include('display_open_topics.php'); ?></div>
</p>
</div>
<?php
} ?>
<?php require(CLIENTINC_DIR.'footer.inc.php'); ?>

NOTE: This will not get displayed if you have not enabled and setup knowledgebases and have a public FAQ! To do so read this article: setting up and using FAQS in osticket. Alternatively you can replace the code change above with this one:

<?php
if($cfg && $cfg->isKnowledgebaseEnabled()){
    //FIXME: provide ability to feature or select random FAQs ??
?>
<p>Be sure to browse both our <a href="kb/index.php">Frequently Asked Questions (FAQs)</a>.
<?php
} ?>
<p>Please review the open tickets below before opening a ticket.  Thank you.
<div id="openticks"><?php include('display_open_topics.php'); ?></div>
</p>
</div>
<?php require(CLIENTINC_DIR.'footer.inc.php'); ?>

The file archive for this mod can be downloaded here.

How change the OSTicket v1.7 RC4 and RC5 logos

UPDATE: 1.7RC5 was released on 19 Feb 2013.  These instructions
will work for RC4 and RC5.

So you have installed OSTicket v1.7rc4 and now you want to customize it a little by replacing the logo images on the staff login, staff side, and pdf printing. Then this is the article for you. There are two ways to achieve this goal. The easiest way is for those not familiar with CSS, or those not comfortable with modifying the template css files.

the logo files are store in the following locations:

staff login

yourSitesHomeDir/scp/images/login-logo.png

staff side (scp)

yourSitesHomeDir/scp/images/ost-logo.png

Simply edit those files or replace them with the ones that you want to use. If you use this method you should probably make sure to make back ups of the files for later just in case you want to go back to them, or want to check the image sizes.

The second way is similar to the first in that you would want to put [upload] the images that you plan on using in the same directory as above. However you would then edit the appropriate css files that display the images and change the file names in those files. The CSS files you need to edit are listed below.

staff login

yourSitesHomeDir/scp/css/login.css

Locate the following code and make it point to your new file name.

background:url(../images/login-logo.png);

staff side (scp)

yourSitesHomeDir/scp/css/scp.css

Locate the following code and make it point to your new file name.

background:url(../images/ost-logo.png)

Both options have cons to them that you should be aware of. For example the first option if you upgrade your OSTicket to a new version chances are your images will be over written (and you will lose your custom log images). Alternatively if you choose the second option you will have to go in and re-change the CSS to point to your files.

Lastly you may have noticed that printing to PDF has yet another logo. This logo is located at:

yourSitesHomeDir/include/fpdf/print-logo.png

Once again you can replace that with your own version, or alter the following file:

yourSitesHomeDir/include/class.pdf.php

You can search for the file name or scroll down to line 58 where you will see the following code:

$this->Image(FPDF_DIR . 'print-logo.png', null, 10, 0, 20);

Simply change the print-logo.png to your file name and put the file in

yourSitesHomeDir/include/fpdf/

That’s it! Easy logo-ification of your OSTicket installation. Enjoy.