Skip to content

Instantly share code, notes, and snippets.

View jandreaucodes's full-sized avatar

Mike Jandreau jandreaucodes

View GitHub Profile
@jandreaucodes
jandreaucodes / dynamic-web-theme-logo
Last active August 29, 2015 14:22
Dynamically change your Web Theme's logo
@jandreaucodes
jandreaucodes / JavaScript redirect
Created June 23, 2015 13:08
Enter this JavaScript into the SOURCE of the article you want to redirect
<script>location.replace('URL TO ARTICLE')</script>
@jandreaucodes
jandreaucodes / remove-social-sharing
Created June 23, 2015 15:30
On Page(Article) you can remove the Social sharing icons by removing the code in this gist
<div id='social-share'>
<div class='share-btn'>
<a href="https://twitter.com/share" class="twitter-share-button" data-lang="en" data-count="vertical">{{system.snippets.tweet}}</a>
</div>
<div class='share-btn'>
<div class="fb-like" data-send="false" data-layout="box_count" data-width="100" data-show-faces="false"></div>
</div>
<div class='share-btn'>
<g:plusone size="tall"></g:plusone>
</div>
{% assign emails = case.emails %}
{% assign threadlength = emails.size|minus:1 %}
{% for email in emails reversed %}
{% if forloop.first %}
{{email.new_html}}
{% if email.agent %}
{%capture sig-exist%}{{email.agent.signature|size}}{%endcapture%}
{% if sig-exist != '0'%}
<div style="margin-top:10px;">
{{email.agent.signature | newline_to_br}}</div>
@jandreaucodes
jandreaucodes / Reply Theme Gravatar Code
Last active February 24, 2016 19:42
Show Gravatar in Reply Theme
{% capture checksum %}{{case.id}}@z29p6.com{%endcapture%}
{% capture checksum %}{{ checksum | gravatar_image: gravatar_unknown_user, ssl }}{%endcapture%}
{% capture checksum %}{{checksum|remove:'<img class="gravatar" alt="" width="50" height="50" src="http://www.gravatar.com/avatar/'}}{%endcapture%}
{% capture checksum %}{{checksum|remove:'?rating=PG&amp;size=50" />'}}{%endcapture%}
{% capture string %}Z29IlN{{case.id}}{% endcapture %}
{% capture hash %}{{ string | md5}}{% endcapture %}
{{customer.email}}
@jandreaucodes
jandreaucodes / gist:72c33d7cbbcbcf51bf66
Created March 18, 2016 15:50
Code for "My Cases" link in Private Portal
{% if site.myportal_enabled %}
<a href='{{ desk.system.links.myportal }}'>{{system.snippets.my_cases}}</a>
{% endif %}
@jandreaucodes
jandreaucodes / gist:7a84d77c14e0ee06d1c60312ea2ff3c4
Last active March 29, 2016 17:28
How to escape Liquid when replying to a case
{%raw%} My Liquid code goes here, ie; {{customer.first_name}} {{customer.last_name}} {%endraw%}
{% if page == 'email_new' %}
<style>
#support-side {display: none !important}
#support-main {width: 100% !important}
</style>
{%endif%}
@jandreaucodes
jandreaucodes / priority.txt
Created August 16, 2016 19:56 — forked from rruhlen/priority.txt
Hard-code drop-down to allow user to select priority on case.
<div class="priority-container">
<select class="default xl form-control" name="ticket[priority]" id="ticket_priority">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>