Skip to content

Instantly share code, notes, and snippets.

@DeskSupport
DeskSupport / gist:4175924
Created November 30, 2012 14:06
Email widget example
<!-- CSS & JS -->
<link href="https://desk-customers.s3.amazonaws.com/shared/email_widget.css" media="screen" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="https://desk-customers.s3.amazonaws.com/shared/email_widget.js" type="text/javascript"></script>
<!-- The lightbox -->
<div id="desk-support-box">
<a id="desk-support-box-close">&otimes;</a>
<iframe src="http://YOUR-SITE.desk.com/customer/widget/emails/new" id="desk-widget-iframe"></iframe>
</div>
@DeskSupport
DeskSupport / gist:4172448
Created November 29, 2012 22:52
Email widget example (CSS customization)
<!-- Customize colors -->
<style>
.desk-sidetab {
background-color: #438DC6;
color: white;
}
.desk-sidetab:hover {
background-color: #438DC6;
color: white;
}
@DeskSupport
DeskSupport / gist:4172433
Created November 29, 2012 22:47
Email widget example
<!-- CSS & JS -->
<link href="https://desk-customers.s3.amazonaws.com/shared/email_widget.css" media="screen" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="https://desk-customers.s3.amazonaws.com/shared/email_widget.js" type="text/javascript"></script>
<!-- The lightbox -->
<div id="desk-support-box">
<a id="desk-support-box-close">&otimes;</a>
<iframe src="http://support.desk.com/customer/widget/emails/new" id="desk-widget-iframe"></iframe>
</div>
@DeskSupport
DeskSupport / gist:4172217
Created November 29, 2012 22:06
Fab — HTML to add to contact page
<iframe src="http://fab.desk.com/customer/portal/emails/new?t=23018" style="width: 100%; border:0; margin: 0; height: 665px;"></iframe>
@DeskSupport
DeskSupport / gist:4157724
Created November 27, 2012 22:47
Email widget example
<!-- CSS & JS -->
<link href="https://desk-customers.s3.amazonaws.com/shared/email_widget.css" media="screen" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="https://desk-customers.s3.amazonaws.com/shared/email_widget.js" type="text/javascript"></script>
<!-- The lightbox -->
<div id="desk-support-box">
<a id="desk-support-box-close">&otimes;</a>
<iframe src="http://YOUR-SITE.desk.com/customer/widget/emails/new" id="desk-widget-iframe"></iframe>
</div>
@DeskSupport
DeskSupport / gist:4036736
Created November 8, 2012 04:11
Honeypot input
<input type="text" id="confirm" name="confirm" style="background: transparent; border: 0px solid transparent; margin: 0; padding: 0; font-size: 1px; float:right;">
@DeskSupport
DeskSupport / Page Header Content
Created November 2, 2012 18:59
Hide chat link if before 9am or after 5pm
<script>
(function(a){function E(a,b,c,d){var e=c.lang();return e[a].call?e[a](c,d):e[a][b]}function F(a,b){return function(c){return K(a.call(this,c),b)}}function G(a){return function(b){var c=a.call(this,b);return c+this.lang().ordinal(c)}}function H(a,b,c){this._d=a,this._isUTC=!!b,this._a=a._a||null,this._lang=c||!1}function I(a){var b=this._data={},c=a.years||a.y||0,d=a.months||a.M||0,e=a.weeks||a.w||0,f=a.days||a.d||0,g=a.hours||a.h||0,h=a.minutes||a.m||0,i=a.seconds||a.s||0,j=a.milliseconds||a.ms||0;this._milliseconds=j+i*1e3+h*6e4+g*36e5,this._days=f+e*7,this._months=d+c*12,b.milliseconds=j%1e3,i+=J(j/1e3),b.seconds=i%60,h+=J(i/60),b.minutes=h%60,g+=J(h/60),b.hours=g%24,f+=J(g/24),f+=e*7,b.days=f%30,d+=J(f/30),b.months=d%12,c+=J(d/12),b.years=c,this._lang=!1}function J(a){return a<0?Math.ceil(a):Math.floor(a)}function K(a,b){var c=a+"";while(c.length<b)c="0"+c;return c}function L(a,b,c){var d=b._milliseconds,e=b._days,f=b._months,g;d&&a._d.setTime(+a+d*c),e&&a.date(a.date()+e*c),f&&(g=a.date(),a.date(
1) The first step is creating a new help center template that has a smaller-than-usual width. To do this,
login to your Desk account, go to the Admin section, and create a new help center template. Once created,
just add the following custom CSS:
@DeskSupport
DeskSupport / functions.php
Created October 31, 2012 17:11
Genesis :: add logo from functions.php
// Add the logo to the header in Genesis
//will need to add css for this
function fws_add_logo() {
?>
<div id="logo">
</div>
<?php
}
add_action('genesis_header', 'fws_add_logo');
@DeskSupport
DeskSupport / 01 Instructions
Created October 30, 2012 15:27
Content Review Template
1. Create a new Customer Help Center in the Channel Tab of the Desk.com Admin.
2. Choose the advanced template (if you are not already using advanced templates, this adds a $29 per month feature).
3. Replace the Page (Index) template with the content below.
4. Use the "Preview" link of the template to view all the content on one page.