osFaq v1.2.2 ST Install Guide

osFAQ v1.2.2 ST integration guide for osTicket 1.10 STABLE (and 1.9, 1.8)

Setup SEO Friendly URL’s (optional)


You must have osTicket v1.7.RC5 or newer installed. Tested up to OST v1.10

osFaq v1.2.2 ST – Install / Upgrade

  1. Download

    the osFaq files here: osFaq Download

  2. Offline mode

    Its recommended to set your osTicket site to offline mode before continuing.

  3. Extract

    the compressed download and upload the contents of the upload/ folder to your osTicket directory. EG: the same directory you installed osTicket in.

  4. Integrate osFaq into the osTicket navigation system.

    The osFaq installer can also guide you through this process.

    Edit [your-osTicket-installation]/include/class.nav.php
    and paste the following below the “Knowledgebase” tab in the function getNavLinks() (Near the bottom of the file. Directly above: $this->navs=$navs;):

    $navs['osfaq']=array('desc'=>'FAQs','href'=>'osfaq.php','title'=>'Frequently Asked Questions');


        function getNavLinks(){
            global $cfg;
            //Paths are based on the root dir.
                $navs = array();
                $user = $this->user;
                $navs['home']=array('desc'=>__('Support Center Home'),'href'=>'index.php','title'=>'');
                if($cfg && $cfg->isKnowledgebaseEnabled())
                // Show the "Open New Ticket" link unless BOTH client
                // registration is disabled and client login is required for new
                // tickets. In such a case, creating a ticket would not be
                // possible for web clients.
                if ($cfg->getClientRegistrationMode() != 'disabled'
                        || !$cfg->isClientLoginRequired())
                    $navs['new']=array('desc'=>__('Open a New Ticket'),'href'=>'open.php','title'=>'');
                if($user && $user->isValid()) {
                    if(!$user->isGuest()) {
                        $navs['tickets']=array('desc'=>sprintf(__('Tickets (%d)'),$user->getNumTickets($user->canSeeOrgTickets())),
                                                'title'=>__('Show all tickets'));
                    } else {
                        $navs['tickets']=array('desc'=>__('View Ticket Thread'),
                                               'title'=>__('View ticket status'));
                } else {
                    $navs['status']=array('desc'=>__('Check Ticket Status'),'href'=>'view.php','title'=>'');
                // osFaq integration
                $navs['osfaq']=array('desc'=>'FAQs','href'=>'osfaq.php','title'=>'Frequently Asked Questions');
            return $this->navs;
  5. Edit [your-osTicket-installation]/include/class.nav.php
    and paste the following below the “Knowledgebase” tab in the function getTabs() (line 130 approx. Directly below:
    $this->tabs['kbase'] = array('desc'=>__('Knowledgebase'),'href'=>'kb.php','title'=>__('Knowledgebase'));):

                $this->tabs['osfaq']=array('desc'=>'osFAQ','href'=>'osfaq_admin.php','title'=>'Frequently Asked Questions', 'class'=>'no-pjax');


        function getTabs(){
            global $thisstaff;
            if(!$this->tabs) {
                $this->tabs = array();
                $this->tabs['dashboard'] = array(
                    'desc'=>__('Dashboard'),'href'=>'dashboard.php','title'=>__('Agent Dashboard'), "class"=>"no-pjax"
                if ($thisstaff->hasPerm(User::PERM_DIRECTORY)) {
                    $this->tabs['users'] = array(
                        'desc' => __('Users'), 'href' => 'users.php', 'title' => __('User Directory')
                $this->tabs['tasks'] = array('desc'=>__('Tasks'), 'href'=>'tasks.php', 'title'=>__('Task Queue'));
                $this->tabs['tickets'] = array('desc'=>__('Tickets'),'href'=>'tickets.php','title'=>__('Ticket Queue'));
                $this->tabs['kbase'] = array('desc'=>__('Knowledgebase'),'href'=>'kb.php','title'=>__('Knowledgebase'));
                // osFaq integration
                $this->tabs['osfaq']=array('desc'=>'osFAQ','href'=>'osfaq_admin.php','title'=>'Frequently Asked Questions', 'class'=>'no-pjax');
                if (count($this->getRegisteredApps()))
            return $this->tabs;
  6. Integrate osFaq into the osTicket client area.

    The osFaq installer can also guide you through this process.

    Edit [your-osTicket-installation]/include/client/header.inc.php
    and paste the following text between the <head> and </head> tags, preferably below the other stylesheet imports:

  7. Display the featured FAQ area on your osTicket home page

    You can display the featured FAQ area on any osTicket page by using the following line of code. Paste it where you want the featured FAQ’s to be displayed.
    The installer/upgrader will check for the existence of this line of code in [your-osTicket-directory]/index.php

    This is an example implementation:

  • Run the osFaq Installer:

    In a new browser window, goto: http://[your-osTicket-directory]/faq/setup/

    • The installer will ask what language you want to use when it first starts. The chosen language will also be applied to osFaq. You can also change language from the osFaq settings area after the install/upgrade.
    • The install wizard will choose the most suitable install or upgrade option for you.
    • Next the installer will install or upgrade the osFaq database tables in your existing osTicket database to osFaq version 1.2.2 ST.
    • Then the installer will guide you through any incomplete integration steps (as listed above).
    • Once finished your new osFaq installation is ready to use.
  • Online mode

    You should turn your osTicket site back online now.

  • Setup SEO Friendly URL’s (optional)

    Only required if you want to use SEO friendly URLs instead of the default php type URLs. SEO URLs will have a greater indexable value to search engines due to text from the FAQs being used for the URL text.
    This process can be automated from the osFaq settings page after the install is complete. If you dont have a .htaccess file in your osticket directory, you will need to create one first and set its permissions to writtable. The file location should be [your-osticket-install]/.htaccess

    When SEO-URL’s is enabled on the osFaq admin settings page, it will ask if you want to write some data to this file. Anything already in your .htaccess file (in the osTicket root directory) from previous installs of osFaq will be removed. Other custom entries will be preserved and new data will be written to it if the .htaccess option is checked. You can turn the SEO-URL option on or off at any time from the osFaq settings page. If you turn SEO-URLs off and have the write box checked, any entries written by this system will be removed from the file.

    NOTE: You can also perform the .htaccess writes manually if you wish, using the manual-instructions below. If you wish to enable the SEO-URL’s option in osFaq, make sure the .htaccess option is NOT checked.


    Manual Instructions (not required in most cases)

    IMPORTANT: Copy the information below and past it into [your-osTicket-directory]/.htaccess. Make sure you change the RewriteBase location in [your-osTicket-directory]/.htaccess to match your installation of osTicket.
    EG: the path where you installed osTicket, in relation to your servers public root directory “/
    The example below is for an osTicket installation installed in a folder called support


    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /support/
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)-c([0-9]+)-a([0-9]+)-p.html$ osfaq.php?cid=$2&answer=$3&print=true&%{QUERY_STRING}
    RewriteRule ^(.*)-c([0-9]+)-a([0-9]+).html$ osfaq.php?cid=$2&answer=$3&%{QUERY_STRING}
    RewriteRule ^(.*)-c([0-9]+)-a([0-9]+)-(pg|i)([0-9]+)-p.html$ osfaq.php?cid=$2&answer=$3&$4=$5&print=true&%{QUERY_STRING}
    RewriteRule ^(.*)-c([0-9]+)-a([0-9]+)-(pg|i)([0-9]+).html$ osfaq.php?cid=$2&answer=$3&$4=$5&%{QUERY_STRING}
    RewriteRule ^(.*)-c([0-9]+)-(pg|i)([0-9]+)-p.html$ osfaq.php?cid=$2&$3=$4&print=true&%{QUERY_STRING}
    RewriteRule ^(.*)-c([0-9]+)-(pg|i)([0-9]+).html$ osfaq.php?cid=$2&$3=$4&%{QUERY_STRING}
    RewriteRule ^(.*)-c([0-9]+)-p.html$ osfaq.php?cid=$2&print=true&%{QUERY_STRING}
    RewriteRule ^(.*)-c([0-9]+).html$ osfaq.php?cid=$2&%{QUERY_STRING}