Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

osTicket 1.7.0 and WordPress 3.5.1 Integration

edited October 2013 in Mods and Customizations
Hello,

I have created a new guide to integrate osTicket 1.7.0 and WordPress 3.5.1

http://www.kodelibrary.com/development-platform/wordpress/integrate-osticket-with-wordpress/

Let me know if anyone has any questions.

Comments

  • Awesome, thanks! Can't wait to try it! :D

    -J
  • Should work for WordPress 3.5.2 too.
    dhruwal;39567 said:
    Hello,

    I have created a new guide to integrate osTicket 1.7.0 and WordPress 3.5.1

    http://www.kodelibrary.com/development-platform/wordpress/integrate-osticket-with-wordpress/

    Let me know if anyone has any questions.
  • Additions to Step 1 for custom page titles

    Great guide! Used it to integrate to Wordpress 3.5.2. In case anyone is interested, I added to step 1 of the guide to inject different page titles for each page. I hate seeing flags in Google Webmaster Tools for duplicate page titles. Here is the modified code. Change titles to whatever you like.


    #include added for Wordpress integration
    if (!strpos($_SERVER[\"SCRIPT_FILENAME\"], \"/scp/\")) {
    $_SERVER[\"REQUEST_URI\"]=\"/support/\"; //replace support with Wordpress page name (needs to match osTicket folder name.)
    include(ROOT_DIR.'../wp-blog-header.php');
    #assign page title depending on uri (replace support in case statements with osTicket folder name above.)
    function assignPageTitle() {
    $pageuri = $_SERVER[\"SCRIPT_NAME\"];
    switch($pageuri) {
    case \"/support/open.php\":
    return \"New Ticket\";
    case \"/support/thankyou.php\":
    return \"Thank you\";
    case \"/support/tickets.php\":
    return \"Ticket Status\";
    case \"/support/view.php\":
    return \"View Tickets\";
    #default title in case of no match
    default:
    return \"Support\";
    }
    }
    add_filter('wp_title', 'assignPageTitle');
    }
  • Thanks, yes title would be good to include. On one of my setup, I took care of it in WordPress, but doing it in Osticket would be much better.

    Glad it worked for you.
    jkomar;41831 said:
    Great guide! Used it to integrate to Wordpress 3.5.2. In case anyone is interested, I added to step 1 of the guide to inject different page titles for each page. I hate seeing flags in Google Webmaster Tools for duplicate page titles. Here is the modified code. Change titles to whatever you like.


    #include added for Wordpress integration
    if (!strpos($_SERVER[\"SCRIPT_FILENAME\"], \"/scp/\")) {
    $_SERVER[\"REQUEST_URI\"]=\"/support/\"; //replace support with Wordpress page name (needs to match osTicket folder name.)
    include(ROOT_DIR.'../wp-blog-header.php');
    #assign page title depending on uri (replace support in case statements with osTicket folder name above.)
    function assignPageTitle() {
    $pageuri = $_SERVER[\"SCRIPT_NAME\"];
    switch($pageuri) {
    case \"/support/open.php\":
    return \"New Ticket\";
    case \"/support/thankyou.php\":
    return \"Thank you\";
    case \"/support/tickets.php\":
    return \"Ticket Status\";
    case \"/support/view.php\":
    return \"View Tickets\";
    #default title in case of no match
    default:
    return \"Support\";
    }
    }
    add_filter('wp_title', 'assignPageTitle');
    }
  • Works great! Used this guide to integrate osticket 1.7 into wordpress 3.6.
    Did some other visual changes too and almost conpleted with translation of client side.
    http://www.bug-community.com/support/ for result :D
  • Glad, it worked out well.
    fonta;42958 said:
    Works great! Used this guide to integrate osticket 1.7 into wordpress 3.6.
    Did some other visual changes too and almost conpleted with translation of client side.
    http://www.bug-community.com/support/ for result :D
  • Wordpress intergration

    Nice integration. Here is how I integrated Osticket into Wordpress. I just created a blank page in WP and made it into a template. Then inserted the below code. It works great for me and I didn't have to modify the Osticket code. You can check out my integration HERE


    <?php /*
    Template Name: support
    */
    ?>

    <?php get_header(); ?>

    <div id=\"frame\">


    <?php
    echo '
    <iframe src=\"http://DomainName.com/support/index.php\" width=\"900\" height=\"640\" scrolling=\"no\" \"></iframe>
    ';
    ?>

    </div>






    <?php get_footer(); ?>
  • edited October 2013
    Hi. Unfortunately I have OSTicket V1.7.2. I say that because I have used your guild and I can not seem to get it to work with my wordpress installation. I have done alot of other research to see if there was anything new, but all the results I come up with are for v1.7.0 or later. I am not by any means new to php however I would not consider myself "Guru" status either. Basically here is what happens. At the point where I paste the code in the file "main.inc.php" (Specifically the code that includes the wp-blog-header) is when the code breaks. OST wont even get past the title tag. When I look at the source code, some of it is there (Around ten lines of code) and stops at the title tag. I am not sure what I am doing wrong. I followed your instructions. They are pretty easy to follow. Thank you BTW for that. But I see everyone else has their installation working fine. But also I see that its 1.7.0 and later. Possible they added something new that breaks the code? Thanks for any responses.

    Added info: when I have all the code installed, its like the code stops at any wordpress code. EX: if get_header was on line 38, all the code leading up to that would be parsed and show up in the source code.

    I am using WP - V3.6.1 and OST V1.7.2
  • Hello, I updated guide for osTicket WordPress Integration to a latest version. (osTicket 1.8.0.1 and WordPress 3.8)

     

    http://www.kodelibrary.com/development-platform/wordpress/integrate-osticket-with-wordpress/

  • Hi Dhruwal,

    Nice guide, but is there any way you can help me to update the page title on each page of scp ?

    Like the page title must show [company name] staff portal instead of osticket:: staff portal ?? This should be for all links within scp. what all files I must edit for this to happen ?

    Thanks 
Sign In or Register to comment.