RSS2.0 Feed button
EnglishItalianKoreanChinese (Simplified)Chinese (Traditional)PortugueseGermanFrenchSpanishJapaneseArabicRussianGreekDutchBulgarianCzechCroatianDanishFinnishPolishSwedishNorwegianHebrewSerbianSlovakThaiTurkishHungarian

"I have often depended on the blindness of strangers."
Adrienne E. Gusoff

Sam Devol

Running with Scissors

Reading This

Integrating a Help Desk into WordPress in 15 minutes or less

Posted on December 1st, 2006
Published in WordPress
Tagged with:

I had an interest in adding a Help Desk to my site where clients could submit ‘tickets’ that would be tracked (and stored in a MySQL database, preferably alongside my current WordPress one) and when changed/updated both the client and I would be notified via email…

I had noticed a reference to Hesk (v0.93.1) in my journeys around the WP support forums, so I took a look and decided it was small and simple, which is what I needed.

Installing Hesk was simple. I chose to install it to /wp-content/hesk, then added a link to my ‘Links’ (or ‘Blogroll’ depending on what version of WP you have). Follow the directions and Boom: Functioning Help Desk.

However, it looked like you had been transported to another world. A world without art, design or beauty. A hellish world void of desirable women (or handsome men, if that blows your skirt up). So, I picked up some scissors, and started running

First, comment out lines 32 through 39 in hesk/inc/header.inc.php:

Now, we will need to add/paste that code back into 2 places inside the hesk/admin.php file. It goes into the beginning of the 2 following functions: function print_login() and function logout() right before each require_once('inc/header.inc.php'); Make sure it isn’t commented out if you’re cutting and pasting ;’)

Next, open hesk_style.css and add width:610px; to the ‘body‘ element at the top (only necessary for the login page formatting).

Hard part is over, now onto the boring repetitive tasks…

To introduce my header and sidebar I used the following code:

The first line, require('../../wp-blog-header.php'); turns this into a WordPress ‘compatible’ page and allows us to use WP functions, like get_header() and get_sidebar().

My top level container for placement of posts is my #container div, and my styling/formatting of that area is primarily in #content and .widecolumn. You should check your stylesheet and adjust these accordingly…

I inserted the new code into the following files (and only the following files):

  • admin_change_status.php
  • admin_main.php
  • admin_reply_ticket.php
  • admin_ticket.php
  • change_status.php
  • delete_tickets.php
  • find_tickets.php
  • index.php
  • manage_categories.php
  • profile.php
  • reply_ticket.php
  • show_tickets.php
  • submit_ticket.php
  • ticket.php

I inserted the code in the very top, above the very first <?php line, so it looks like this:

# Helpdesk software Hesk
# Version: 0.93b from July 5, 2005
# File name: manage_users.php
# File last modified: July 15, 2005
# Written 23rd April 2005 by Klemen Stirn
# http://www.PHPJunkYard.com

And voila! No more sucky-wucky looking pages. Well, I did add a background image/pattern to my style.css:
.enclosing {
background: lightgrey url(images/form_bg.gif) repeat;
}

This is a pretty simple operation, but the div's I introduce won't work for everyone, and tweaks will probably needed for your particular theme (I did this integration with the Barthelme theme).

16 Users Commented on " Integrating a Help Desk into WordPress in 15 minutes or less "

Subscribe to these comments Comment RSS or TrackBack URL
J. Pisano says,
3-1-2007 at 19:26:27 from 24.144.175.119    

Sam,

Are you ok? You haven’t posted in 3 months!!!

Joe
http://www.mustech.net

Sam says,
3-4-2007 at 11:22:02 from 216.164.18.158    

OMG! You’re right… (Not patronizing). I had some holiday ‘blues’ exacerbated by trying to parent a teenager, but it’s time to stop feeling sorry for myself ;’)

Thanks Joe…

J. Pisano says,
3-6-2007 at 21:39:08 from 24.144.175.119    

Sam,

Glad you’re still alive! I was starting to think about ways to find it you were in the hospital, injured or abducted by aliens, etc.! :)

Joe
http://www.mustech.net

P.S. What plugin or code do you use to pull up the favicons in the comments?

Sam says,
3-7-2007 at 06:07:28 from 216.164.18.158    

I’m using Favatars

Hans says,
4-24-2007 at 13:44:08 from 87.184.157.126    

Hi,
thanks a lot for this great documentation!
Does it also work with the new hesk version 0.94?
Best regards

Sam says,
4-24-2007 at 20:18:28 from 216.164.18.158    

Hi Hans: I haven’t tested with any other version of Hesk…

I’ll add it to my to-do list ;’)

5-9-2007 at 14:03:13 from 217.44.222.78    

Hi Sam

Brilliant article and brilliant instructions. Worked out perfectly on 0.94. I think you might have missed a couple of templates – I can’t remember which – sorry.

Just wanted to say thanks.

Rich

Hans says,
5-9-2007 at 14:14:12 from 80.133.1.47    

Hi Sam,

recently I just tested it with the new version.

There occured some problems:

Inserting the header in admin.php does not work. Parsing stops at the first “

Hans says,
5-9-2007 at 14:17:09 from 80.133.1.47    

Now your blog cut the rest ;)

It seems the new functions are slight different. Parsing stops at the first html-tag. Where do I have to paste the code exactly?

And is there a way to include the footer of my template?

Thanks a lot and best regards

5-21-2007 at 00:46:41 from 24.144.175.119    

Sam,

How about adding “Make a new post!” to your “to do list” as well. We miss your posts!

J. Pisano -MUSicTECHnology.net
http://www.mustech.net

Cornelius says,
7-25-2007 at 09:31:22 from 198.54.202.210    

Sam,
I have done exactly as you suggested. Thank you for your excellent ideas.
I experienced the same problem as Hans with admin.php, but fortunately it works fine for the customer interface.
I do have a problem in that the security does not want to display if the wp-header is added. So I had to switch the capability off.
Any ideas on how to make that work?

Sam says,
7-25-2007 at 10:09:04 from 70.110.129.141    

Sorry Cornelius:

No new Hesk integration tutorials

If I were to upgrade I’d be happy to share my experiences, but I don’t intend to (upgrade). I originally wrote this tutorial to share my experiences setting up Hesk, but I am not currently using a support ticket system and find other things taking up my time ;’)

BTW: I never intended to ‘prettify’ ALL of Hesk, just the components a client/user would see…

Dave Zan says,
2-18-2008 at 22:07:09 from 210.5.121.190    

Hi Sam,

I just came across this in WP’s support search. Since there isn’t some plugin incorporating a ticket system, I figured I’d give this a shot for my subdomain blog report.davezan.com.

I input the code you described above so a user would see the WordPress header and all after cliking “Click Here!” to access the hesk support page. If you do that, you’ll notice it’s using the header of my main blog davezan.com instead of that in the subdomain.

Question: what exact code should I input in the index page so that it uses the header of the subdomain blog instead of my main one? I’m figuring it’s got to do with the “” line (specifically the / before wp-blog-header), but I tried some combos and didn’t get the desired effect.

I can understand if you feel this is a bit beyond what you’re ready to do. But any help or direction surely helps. :)

Thanks.

David

3-28-2011 at 06:09:34 from 84.150.18.139    

Mhh, das versteh ich jetzt nicht so ganz. Kann mir einer von euch, der sich da gut auskennt, das nochmal genau erklären. Ich versteh das mit dem Support Ticket System einfach nicht.
Beste Grüße

7-21-2011 at 15:46:43 from 68.15.203.92    

I put this into one of my wordpress sites, worked great for what it was intended to do.

Trackback & Pingback
10-21-2009 at 08:49:30 from 67.43.0.50    

Leave Your Reply Below

 Username

 Email Address

 WebsiteI follow icon

About The Site

Picture of Monkey

Observations of a Troubleshooting Monkey and

ex IT Director

ex Digital Video Director

ex Missile Mechanic

ex Motorcycle Mechanic

Work Background Contact me