Skip to content

Instantly share code, notes, and snippets.

@a-bennett
a-bennett / build_nginx.sh
Created Jan 30, 2017 — forked from MattWilcox/build_nginx.sh
Fetch, build, and install the latest nginx with the latest OpenSSL for RaspberryPi
View build_nginx.sh
#!/usr/bin/env bash
# names of latest versions of each package
export VERSION_PCRE=pcre-8.38
export VERSION_OPENSSL=openssl-1.0.2d
export VERSION_NGINX=nginx-1.9.7
# URLs to the source directories
export SOURCE_OPENSSL=https://www.openssl.org/source/
export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
@a-bennett
a-bennett / tickets.inc.php
Last active Feb 12, 2020
OsTicket 1.9.4 - Easy Custom Columns - Viewing List Data
View tickets.inc.php
<?php
/*
* Easy Custom Fields. OsTicket 1.9.4
* For Information See http://www.andrewbennett.com.au/?p=487
* tickets.inc.php file from /include/staff/tickets.inc.php
*
* Instructions:
* 1) Copy this gist to a new tickets.inc.php
* 2) Fill out the field ID (which can be found via the database or via using Firebug/Web Inspector). See http://www.andrewbennett.com.au/?p=487 for more info.
* 3) Backup your current file /include/staff/tickets.inc.php
@a-bennett
a-bennett / tickets.inc.php
Created Dec 11, 2014
OsTicket 1.9.4 - Displaying Custom Form Fields in ticket queue
View tickets.inc.php
<?php
//Displaying Custom Form Fields in ticket queue - OsTicket 1.9.4
//File Path /include/staff/tickets.inc.php - remember to backup your old one first!
//Mod by Andrew Bennett - andrewbennett.com.au all changes can be found by searching AB throughout this file.
//Set all variables here.
$ab_list['form_id'] = "X"; //ID found from _form table
$ab_list['field_id'] = "XX"; //ID from from _form_field table
$ab_list['heading'] = "XXXXXX"; //Name displayed to front end users.
//Show Due Date
if(!defined('OSTSCPINC') || !$thisstaff || !@$thisstaff->isStaff()) die('Access Denied');
@a-bennett
a-bennett / tickets.inc.php
Created Dec 11, 2014
OsTicket 1.9.4 - Displaying Custom Form Fields in Queue
View tickets.inc.php
<?php
// /include/staff/tickets.inc.php - OsTicket 1.9.4
if(!defined('OSTSCPINC') || !$thisstaff || !@$thisstaff->isStaff()) die('Access Denied');
$qstr='&'; //Query string collector
if($_REQUEST['status']) { //Query string status has nothing to do with the real status used below; gets overloaded.
$qstr.='status='.urlencode($_REQUEST['status']);
}
//See if this is a search
@a-bennett
a-bennett / tickets.inc.php
Last active Aug 29, 2015
OsTicket 1.9.2 - Easy Custom Column
View tickets.inc.php
<?php
//Original File - https://raw.githubusercontent.com/osTicket/osTicket-1.8/v1.9.2/include/staff/tickets.inc.php
//Updated with notes from: http://www.andrewbennett.com.au/2014/07/osticket-1-9-2-easy-custom-column-in-ticket-view/
/*
* The Name field (currently “field_17″ ) needs to be worked out from the database by looking at the [tbl_prefix]_ticket__cdata
* The Desc field (Currently “Sample 1″) is what your users will see as the column heading.
*/
$CustomList1Name = "field_17";
$CustomList1Desc = "Sample 1";
if(!defined('OSTSCPINC') || !$thisstaff || !@$thisstaff->isStaff()) die('Access Denied');
@a-bennett
a-bennett / step-1.php
Created Nov 29, 2014
tickets.inc.php step by step
View step-1.php
$sortOptions=array('date'=>'effective_date','duedate'=>'duedate','ID'=>'ticket.`number`*1',
'pri'=>'pri.priority_urgency','name'=>'user.name','subj'=>'cdata.subject',
'status'=>'status.name','assignee'=>'assigned','staff'=>'staff',
'dept'=>'dept.dept_name');
@a-bennett
a-bennett / tickets.inc.php
Created Nov 29, 2014
OsTicket 1.9.4 - Ticket View with Due Date Column
View tickets.inc.php
<?php
/*
* OsTicket 1.9.4
* Edited by: Andrew Bennett - http://andrewbennett.com.au
* Show Due Date Column and allow sorting
* Remember to backup your orginal ticket.inc.php file!
* This file goes into the following folder: /[osticket-install]/include/staff/tickets.inc.php
*/
if(!defined('OSTSCPINC') || !$thisstaff || !@$thisstaff->isStaff()) die('Access Denied');