INDEX:
Requirements
Install
Setup SEO Friendly URLs (optional)
Requirements
You must have osTicket v1.6.RC5 or newer installed.
v1.0 RC3 – Install / Upgrade
-
Download
the osFaq files here: osFaq Download
-
Extract
the compressed download and upload the contents of the
upload/
folder to your osTicket directory. EG: the same directory you installed osTicket in. -
Offline mode
Its recommended to set your osTicket site to offline mode before continuing.
*** Upgrading from RC2 … skip to step 6. -
Integrate osFaq into the osTicket staff area.
The osFaq installer can also guide you through this process.
Edit:
[your-osTicket-installation]/include/staff/header.inc.php
and paste the following text between the‹head›
and‹/head›
tags, preferably below the other stylesheet imports:
1<link rel="stylesheet" href="../faq/styles/faq_admin.css" type="text/css">Edit
[your-osTicket-installation]/include/class.nav.php
and paste the following below the “My Account” tab in the functionStaffNav
(after line 42 approx.):
1$tabs['faq']=array('desc'=>'FAQs','href'=>'faq_admin.php','title'=>'Frequently Asked Questions');ie:
123456789101112131415161718192021222324function StaffNav($pagetype='staff'){global $thisuser;$this->ptype=$pagetype;$tabs=array();if($thisuser->isAdmin() && strcasecmp($pagetype,'admin')==0) {$tabs['dashboard']=array('desc'=>'Dashboard','href'=>'admin.php?t=dashboard','title'=>'Admin Dashboard');$tabs['settings']=array('desc'=>'Settings','href'=>'admin.php?t=settings','title'=>'System Settings');$tabs['emails']=array('desc'=>'Emails','href'=>'admin.php?t=email','title'=>'Email Settings');$tabs['topics']=array('desc'=>'Help Topics','href'=>'admin.php?t=topics','title'=>'Help Topics');$tabs['staff']=array('desc'=>'Staff','href'=>'admin.php?t=staff','title'=>'Staff Members');$tabs['depts']=array('desc'=>'Departments','href'=>'admin.php?t=depts','title'=>'Departments');}else {$tabs['tickets']=array('desc'=>'Tickets','href'=>'tickets.php','title'=>'Ticket Queue');if($thisuser && $thisuser->canManageKb()){$tabs['kbase']=array('desc'=>'Knowledge Base','href'=>'kb.php','title'=>'Knowledge Base: Premade');}$tabs['directory']=array('desc'=>'Directory','href'=>'directory.php','title'=>'Staff Directory');$tabs['profile']=array('desc'=>'My Account','href'=>'profile.php','title'=>'My Profile');$tabs['faq']=array('desc'=>'FAQs','href'=>'faq_admin.php','title'=>'Frequently Asked Questions');}$this->tabs=$tabs;} -
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:
1<link rel="stylesheet" href="./faq/styles/faq.css" media="screen">Edit
[your-osTicket-installation]/include/client/header.inc.php
and paste the following text between the‹ul id="nav"›
and‹/ul›
tags, preferably directly under the opening‹ul id="nav"›
tag
(the link will appear as the far right header link):
1<li><a class="ticket_status" href="faq.php">FAQs</a></li>ie:
1234567891011121314<ul id="nav"><li><a class="ticket_status" href="faq.php">FAQs</a></li><?if($thisclient && is_object($thisclient) && $thisclient->isValid()) {?><li><a class="log_out" href="logout.php">Log Out</a></li><li><a class="my_tickets" href="tickets.php">My Tickets</a></li><?}else {?><li><a class="ticket_status" href="tickets.php">Ticket Status</a></li><?}?><li><a class="new_ticket" href="open.php">New Ticket</a></li><li><a class="home" href="index.php">Home</a></li></ul>
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 FAQs to be displayed.
The installer/upgrader will check for the existance of this line of code in[your-osTicket-directory]/index.php
1<?php require(ROOT_DIR.'faq/include/client/faq_external.php'); ?>This is an example implementation:
1234<hr /><?php require(ROOT_DIR.'faq/include/client/faq_external.php'); ?><div class="clear"></div><hr />-
Run the osFaq Installer:
In a new browser window, goto:
http://[your-osTicket-directory]/faq/setup/
- Choose from Install or Upgrade.
- The installer will install or upgrade the osFaq database tables in your existing osTicket database to version RC3. Your current osTicket table prefix will be used.
- Following the database setup the installer will guide you through any incomplete integration steps (listed above).
- Once finished your new osFaq installation is ready to use.
-
Online mode
You can turn your osTicket site back online now.
Setup SEO Friendly URLs (optional)
In the upload/
folder you received in the osFAQ download there was an OPTIONAL file included called OPTIONAL.htaccess
It contains some optional apache code and allows the FAQ system to use Search Engine Friendly URLs in client pages.
If you are upgrading osFaq: consider replacing your existing [your-osTicket-directory]/.htaccess
file with the one in your new osFaq download.
Check your server to see if it already has a [your-osTicket-directory]/.htaccess
file. If it does, copy the contents of OPTIONAL.htaccess
and paste it below the existing content in your .htaccess
file.
If there is no [your-osTicket-directory]/.htaccess
file, rename OPTIONAL.htaccess
to .htaccess
IMPORTANT: Make sure you change the RewriteBase to match your installation of osTicket EG: the place you installed osTicket to where your .htaccess file is located (mentioned above).
Where /support/
is the RewriteBase of your osTicket installation.
1 2 3 4 5 6 |
## apache Rewrite Options +FollowSymLinks RewriteEngine On RewriteBase /support/ RewriteRule ^(.*)-cid-(.*)-p.html$ faq.php?category_id=$2&print=true&%{QUERY_STRING} RewriteRule ^(.*)-cid-(.*).html$ faq.php?category_id=$2&%{QUERY_STRING} |