Skip to content

Instantly share code, notes, and snippets.

@skipjac
skipjac / report-csv-dl-zendesk.php
Created March 21, 2011 03:55
This downloads the scheduled report from Zendesk and saves it to the local server.
<?php
/*********************************************************************************
** This waits for the Zendesk Schedule report call and then downloads the **
** file your Local server for you to act on with other functions or programs **
*********************************************************************************/
$xmlDoc = new DOMDocument();
//Reads the POST from Zendesk
@skipjac
skipjac / javascript-widget-zenbox.js
Created March 28, 2011 15:01
this places the one click button in a zendesk custom widget that opens the Zendesk dropbox
</script>
<script type="text/javascript" src="//asset0.zendesk.com/external/zenbox/v2.1/zenbox.js"></script>
<style type="text/css" media="screen, projection">
@import url(//asset0.zendesk.com/external/zenbox/v2.1/zenbox.css);
</style>
<script type="text/javascript">
if (typeof(Zenbox) !== "undefined") {
Zenbox.init({
dropboxID: "43",
url: "http://your.zendesk.com",
@skipjac
skipjac / hide-submit-request.css
Created March 29, 2011 15:55
Zendesk hides the login and submit request from end users
We couldn’t find that file to show.
@skipjac
skipjac / dropbox-inNavBar.js
Created March 29, 2011 17:07
Add a Zendesk Dropbox to a Zendesk portal NavBar
Event.observe(window, 'load', function() {
$j('#top-menu .tab_forums').after($j('<li class="main clazz tab_idea"><a href="http://www.techassistant.net/categories/73-a-bunch-of-ideas" class="tab">Ideas</a></li>'));
$j('#top-menu .tab_forums').after($j('<li class="main clazz tab_idea"><a href="http://www.google.com/" onClick="script: Zenbox.show(); return false;" class="tab">Submit A Request</a></li>'));
});
@skipjac
skipjac / user-count-zendesk.js
Created April 16, 2011 01:45
This is a custom widget in Zendesk that gets the help desk total user count
<div id="userCnt">
</div>
<script type="javascript">
$j(document).ready(function() {
$j.get('/people.xml', function(d) {
var countopen = $j(d).find('record').parent().attr('count');
if(!countopen){countopen = 0;}
$j('#userCnt').append("<p>"+countopen + " users in your help desk.<\/p>") ;
@skipjac
skipjac / user-count-zendesk.js
Created April 16, 2011 01:45
This is a custom widget in Zendesk that gets the help desk total user count
<div id="userCnt">
</div>
<script type="javascript">
$j(document).ready(function() {
$j.get('/people.xml', function(d) {
var countopen = $j(d).find('record').parent().attr('count');
if(!countopen){countopen = 0;}
$j('#userCnt').append("<p>"+countopen + " users in your help desk.<\/p>") ;
@skipjac
skipjac / disable-shortcut.js
Created April 19, 2011 18:43
Disable Zendesk keyboard shortcuts
jQuery(function() {
jQuery(document).unbind('.zendesk.keyboard-shortcut');
});
@skipjac
skipjac / hide-deflect.css
Created May 4, 2011 21:44
hide the ticket deflection in Zendesk
div.deflect {display: none;}
@skipjac
skipjac / sat-hide-login.js
Created May 16, 2011 18:50
hide login login on customer satisfaction page
if (window.location.href.indexOf('satisfaction') >= 0) {
$j('#top-right').hide();
}
@skipjac
skipjac / zendesk-ticket-type.js
Created June 2, 2011 06:06
Replace Zendesk ticket type with a custom field. It also sets the system ticket type in the background
//Replaces the Zendesk system ticket type with a custom field.
$j(document).ready(function() {
//the custom field ID
var customfield = "20111118";
//check to see if you are on the agent ticket page
if(window.location.href.indexOf('tickets') >= 0) {
//hide the custom field label and the system ticket type
$j('select#ticket_fields_'+ customfield).prev().toggle();
$j('select#ticket_ticket_type_id').toggle();