Integration of a Support and Ticketing System (HESK) with classipress
This is a tutorial for integrating
HESK (PHP Help Desk Software) allowing you to set up a Web-based ticket support system quickly and easily into classipress . This is a bit of time consuming job but its worth it.
Download hesk
here and install it into a sub folder/domain of your website. In my case I installed it on a "kb" subdomain. You can use the same database or create a new database for it. I am not going to focus on how to install it but I am going to focus on how to integrate it with classipress.
After installation, you will be editing some files which are as follows.
1>Initialize wordpress for users: Files to be edited:
/kb/index.php
/kb/knowledgebase.php
/kb/submit_ticket.php
/kb/ticket.php
Add this
/* Start Mod - Initialize Wordpress */
require('../wp-load.php');
/* End Mod - Initialize Wordpress */
Before:
/* Get all the required files and functions */
2> Initialize Wordpress for admin
Files to be edited:
/kb/admin/admin_main.php
/kb/admin/admin_reply_ticket.php
/kb/admin/admin_settings.php
/kb/admin/admin_settings_save.php
/kb/admin/admin_submit_ticket.php
/kb/admin/admin_ticket.php
/kb/admin/archive.php
/kb/admin/assign_owner.php
/kb/admin/change_status.php
/kb/admin/delete_tickets.php
/kb/admin/edit_post.php
/kb/admin/find_tickets.php
/kb/admin/generate_spam_question.php
/kb/admin/index.php
/kb/admin/knowledgebase_private.php
/kb/admin/mail.php
/kb/admin/manage_canned.php
/kb/admin/manage_categories.php
/kb/admin/manage_knowledgebase.php
/kb/admin/manage_users.php
/kb/admin/new_ticket.php
/kb/admin/profile.php
/kb/admin/reports.php
/kb/admin/show_tickets.php
Add this
/* Start Mod - Initialize Wordpress */
require('../../wp-load.php');
/* End Mod - Initialize Wordpress */
Before This
/* Get all the required files and functions */
3>Getting the Classipress header.
File to be edited :
Add This
<!-- Start Mod - Get Classipress Header -->
<?php get_header(); ?>
<!-- End Mod - Get Classipress Header -->
<div class="page_content_left">
<div class="shadowblock_out">
<div class="shadowblock">
Before
<?php include(HESK_PATH
. 'header.txt'); ?>
4>Getting the Classipress Footer .
Files to be edited
Replace this :
With this
?>
</div><!--/shadowblock-->
</div><!-- /shadowblock_out -->
</div><!-- /page_content_left -->
<div class="clr"></div>
<!-- Start Mod - Get Classipress Footer -->
<?php get_footer(); ?>
<!-- End Mod - Get Classipress Footer -->
<?php exit(); ?>
5>Now since hesk and wordpress have the same logout procedures they seem to conflict with each other.So lets rename the function.
Files to be edited
Find:
case 'logout':
hesk_token_check
($_GET['token']);
logout
();
Replace with :
case 'kb_logout':
hesk_token_check
($_GET['token']);
kb_logout
();
Also, find This in the same file
Replace with
:
This will pretty much integrate the system with classipress. There are some other modifcations too which fine tune the integration, but since this post is getting too long I will request you to do it yourself. The link is
here . Also as a disclaimer, I am not behind all this hardwork. I just modified the modifications to fit into classipress. You can have a look how it looks with classipress
here. The site is live so, please, do not submit any tickets. If you think its really time consuming to go through all this, just reply this thread saying you want the file and I can upload the whole edited package of hesk, so that you can use it.
Hope you enjoy your integration.
Thanks.