Skip to content

Instantly share code, notes, and snippets.

@moderatorwes
moderatorwes / zendesk.js
Created July 8, 2014 20:59
Zendesk: Point a Category to External Link
//Point Category to external link
$("ul.category-list li a:contains('My Category')").replaceWith('<a href="externallinkhere.com"> My Category</a> ');
@moderatorwes
moderatorwes / zendesk.js
Last active August 29, 2015 14:03
Zendesk: Hide a Section from View
//Hide a Section from View
$(' h3 a:contains("Section Name")').closest('.section').hide();
@moderatorwes
moderatorwes / zendesk.js
Created July 8, 2014 21:08
Zendesk: Changing the Community Name on Search Page
// renaming community to partner discussion on Search Page
$("h2.search-results-subheading:contains('Community')").replaceWith('<h2>Partner Discussion <a href="/hc/communities/public/topics" class="search-results-subheading-link"> browse</a></h2> ');
$(".search-results-column a:contains('browse Community')").text('browse Partner Discussion');
@moderatorwes
moderatorwes / zendesk.js
Created July 8, 2014 21:14
Zendesk: Change name of Knowledge Base on Search Page
//Change name of Knowledge Base on Search Page
$("h2.search-results-subheading:contains('Knowledge Base')").replaceWith('<h2>iMentor Resources <a href="/hc/" class="search-results-subheading-link"> browse</a></h2>');
$(".search-results-column a:contains('browse Knowledge Base')").text('browse iMentor Resources');
});
@moderatorwes
moderatorwes / zendesk.css
Created July 8, 2014 21:17
Zendesk: Remove styling issue with Bootstrap framework for User Dropdown
/*Remove styling issue with Zendesk and Bootstrap framework User Dropdown*/
#user-menu{
position: inherit !important;
top: 0 !important;
left: 0 !important;
z-index: 1000 !important;
float: left !important;
min-width: 100% !important;
padding:0 !important;
margin: 0 !important;
@moderatorwes
moderatorwes / zendesk.js
Last active June 8, 2021 00:47
Zendesk: Send Category to Community (Humble Squid Theme)
//send category links to community - Change category and google.com to your helpcenter
$('a').each(function() {
var value = $(this).attr('href');
if(value=='/hc/en-us/categories/200108526-Technical')
{
$(this).attr('href', 'http://google.com');
}
});
@moderatorwes
moderatorwes / zendesk.css
Created July 8, 2014 21:26
Zendesk: Placing icons beside Title on Category and Sections
h1.imageheading a, h2.imageheading a, h3.imageheading a,h1.imageheading, h2.imageheading,h3.imageheading, .section > h2,.section h3
{
font-size: 32px;
line-height: 64px;
padding-left: 80px;
}
.imageheading.general-icon {
background: #fff url(//p2.zdassets.com/hc/theme_assets/path to your image.png) top left no-repeat;
}
@moderatorwes
moderatorwes / zendesk.js
Last active June 29, 2016 18:18
Zendesk: Show less than 6 articles
//Step by Step article located here: https://support.zendesk.com/entries/31041636-Show-less-than-6-articles-in-a-section-in-Help-Center
//Show less than 6 articles
if( document.location.href.indexOf('section') == -1 ) {
var categories = $('ul.article-list');
for (var j = categories.length - 1; j >= 0; j--) {
var articles = $(categories[j]).find('li'),
nativeMore = $(categories[j]).siblings('.see-all-articles');
if ( articles.length > 3 ) {
for (var k = 3; k < articles.length; k++ ) {
$(articles[k]).hide();
@moderatorwes
moderatorwes / zendesk.js
Created August 3, 2014 03:51
Zendesk: Add attachment warning to Submit Ticket Screen
//add message about attachment
$('.upload-dropzone').before("<p>**attachments must be less than 5mb</p>");
@moderatorwes
moderatorwes / zendesk.js
Last active August 29, 2015 14:05
Zendesk: Changing wording of link "See all # of Articles"
//Change wording of link "See all # of articles" to "click to see more"
$('a.see-all-articles').text('Click to see more...');