Ekto gammit

Integrating a Help Desk into WordPress in 15 minutes or less

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:

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).

Tagged with: , , , , ,
Posted in WordPress
15 comments on “Integrating a Help Desk into WordPress in 15 minutes or less
  1. J. Pisano says:

    Sam,

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

    Joe
    http://www.mustech.net

  2. Sam says:

    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…

  3. J. Pisano says:

    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?

  4. Hans says:

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

  5. Sam says:

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

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

  6. 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

  7. Hans says:

    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 “

  8. Hans says:

    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

  9. 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

  10. Cornelius says:

    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?

  11. Sam says:

    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…

  12. Dave Zan says:

    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

  13. 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

  14. John harman says:

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

1 Pings/Trackbacks for "Integrating a Help Desk into WordPress in 15 minutes or less"
  1. Integrating a Help Desk into WordPress in 15 minutes or less » Sam Devol says:

    […] post: Integrating a Help Desk into WordPress in 15 minutes or less » Sam Devol Comments0 Leave a Reply Click here to cancel […]

Leave a Reply

Your email address will not be published.

*