Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > osTicket 1.6.x > Mods and Customizations

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-23-2009, 03:25 AM
musicmanmg musicmanmg is offline
Junior Member
 
Join Date: Sep 2009
Posts: 4
Send a message via Skype™ to musicmanmg
Question Embed osTicket into my Wordpress theme

I'm trying to embed osticket which is in a subfolder of my wordpress site called support into my main Wordpress theme. Can someone advise me what code I need to amend my head and footer to be on the osticket index.php in order to apply the current Wordpress theme.

I can make it work putting the full path /var/www/vhosts etc in the code of the index.php on the osticket function but I get the impression I need to amend something in the DIR setting on the client.inc.php page.

Is there a standard way this can be done or can someone help me out on this one?

Thanks,

Martin.
Reply With Quote
  #2  
Old 10-02-2009, 10:45 AM
musicmanmg musicmanmg is offline
Junior Member
 
Join Date: Sep 2009
Posts: 4
Send a message via Skype™ to musicmanmg
Default Problem fixed.

Got it sussed now.

Code:
<?php
require('./wp-blog-header.php');
?>
worked ok but I missed off

Code:
get_header()
and

Code:
get_footer()
in the relevant places.

Once those went in everything worked sweet.

http://www.home-computer-help.co.uk can be seen working with this setup.
Reply With Quote
  #3  
Old 10-04-2009, 09:29 PM
masino_sinaga masino_sinaga is offline
Senior Member
 
Join Date: Apr 2009
Location: Bandung, Indonesia
Posts: 670
Send a message via Yahoo to masino_sinaga
Default

musicmanmg,

Thanks for the info.

Sincerely,
Masino Sinaga
Reply With Quote
  #4  
Old 09-10-2010, 01:08 AM
J. James Beaudoin J. James Beaudoin is offline
Junior Member
 
Join Date: Sep 2010
Posts: 2
Default A better way to do this...

Actually, I've found that you should add the wp-blog-header.php call to the "main.inc.php" file, as adding it to "index.php" will only affect the look of the index.php file. So, in the "main.inc.php" file, add the following line with the other includes and requires (which you can find under the line that reads "#include required files"):

Code:
require(ROOT_DIR.'../wp-blog-header.php');
Now, the above code assumes that you have osTicket in a folder under wordpress, such as: /home/webuser/html/blog/tickets. "Blog" being the root directory of your Wordpress install and "tickets" being where your ostickets install is.

Now, you also need to change your header and footer files in the include/client/ directory.

Make sure to keep backups of your original "footer.inc.php" and "header.inc.php" files.

In the "header.inc.php" file, blank the entire file and replace it with this line:

Code:
<?php get_header(); ?>
Do the same to the "footer.inc.php" file, but insert this code:

Code:
<?php get_footer(); ?>
You may have to tweak your theme in order to get things working (such as moving your sidebar and the related divs to your footer, instead of leaving them in the page). But this gives you a good place to start.

Last edited by J. James Beaudoin; 09-10-2010 at 01:09 AM. Reason: brief copy edit
Reply With Quote
  #5  
Old 09-14-2010, 10:40 PM
SashKernel SashKernel is offline
Junior Member
 
Join Date: Jul 2010
Location: Toronto
Posts: 6
Send a message via MSN to SashKernel
Default

Is there a way to do the same with Drupal?
Reply With Quote
  #6  
Old 09-22-2010, 12:12 PM
Kenith Kenith is offline
Junior Member
 
Join Date: May 2010
Location: California, USA
Posts: 9
Default

I am also looking to do something similar. I simply need the client viewable content to match that of my existing php web site. We use drupal currently as or CMS.
Reply With Quote
  #7  
Old 10-22-2010, 10:35 AM
karl800 karl800 is offline
Junior Member
 
Join Date: Oct 2010
Posts: 1
Default Works Great

Thanks for the advice on this.
Work pretty well after a few extra tweaks.
You can see it here

StokePCSupport

Thanks Again
Karl
Reply With Quote
  #8  
Old 01-12-2011, 09:17 AM
ReDeeMer ReDeeMer is offline
Junior Member
 
Join Date: Jan 2011
Posts: 1
Default Osticket with wordpress website

Hi Karel are you able to elaborate a bit on how you got the OsTicket so well integrated into your word press website ?
Thanks
Red
Reply With Quote
  #9  
Old 02-21-2011, 10:12 PM
gravitywell gravitywell is offline
Junior Member
 
Join Date: Feb 2011
Posts: 2
Default

Quote:
Originally Posted by J. James Beaudoin View Post
Actually, I've found that you should add the wp-blog-header.php call to the "main.inc.php" file, as adding it to "index.php" will only affect the look of the index.php file. So, in the "main.inc.php" file, add the following line with the other includes and requires (which you can find under the line that reads "#include required files"):

Code:
require(ROOT_DIR.'../wp-blog-header.php');
Now, the above code assumes that you have osTicket in a folder under wordpress, such as: /home/webuser/html/blog/tickets. "Blog" being the root directory of your Wordpress install and "tickets" being where your ostickets install is.

Now, you also need to change your header and footer files in the include/client/ directory.

Make sure to keep backups of your original "footer.inc.php" and "header.inc.php" files.

In the "header.inc.php" file, blank the entire file and replace it with this line:

Code:
<?php get_header(); ?>
Do the same to the "footer.inc.php" file, but insert this code:

Code:
<?php get_footer(); ?>
You may have to tweak your theme in order to get things working (such as moving your sidebar and the related divs to your footer, instead of leaving them in the page). But this gives you a good place to start.
I followed this and it worked (needs a little tweaking like you said) but after the modification I cannot login or view a ticket, when I try to login it just goes right back to the login page as if nothing happened (doesn't even say that login failed or anything). Anyone seen this?
Reply With Quote
  #10  
Old 01-24-2013, 08:03 PM
Luciel Luciel is offline
Junior Member
 
Join Date: Jan 2013
Location: Malaga, Spain
Posts: 17
Send a message via MSN to Luciel Send a message via Skype™ to Luciel
Default

I had several issues with integration in to my theme (just the basics like possitioning the damned thing).

First problem was the my header was overlapping OST (which shouldnt happen!?) but aniway, fixed it a dirty fix (<br>x6) anihow, the footer is a different beast.

It was displaying rather messed up, by doing some changes on several files I could get it more or less fine, except the right side of the OST box seems to be limiting the footer expansion (footer expands to the width of the screen and fills in accordingly with 3 sections (similar to widget sections, but not widget-able, rather hard coded content). On the rest of the site (wp stuff) works perfect, so instead of calling in the footer through the get footer thingie, I copied the footer section from the themeīs footer.php so I could try to fix it for this page without affecting the rest of the page, copy worked fine however as expected (it was essentially getting the same by calling the footer) it still seems to continue on a second line (making the footer huge and awfull) when it reaches the limit of what seems to be the OST box.



The attached image is what the footer is supposed to look like and looks like in the rest of the website. However on the OST page, the twitter logo on the far right is pushed beneath the FB logo.

Itīs driving me insane, tried a ton of things and nothing seems to fix it (removing the twitter logo fixes the footer aesthetically, so it prooves that it is being pushed down and therefore making the footer double the height).

Any help/suggestions would be very much appreciated
Reply With Quote


Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:42 AM.