發佈日期:
如何在osTicket 1.6下‧整合osFaq 1.0 ST
完成了osTicket安裝,就知道事情沒有那麼快完結。今天又要求加上FAQ系統,明明之前一直都沒有此要求的。幸好只花了幾分鐘時間,便找到了osFaq,一個可以整合在osTicket的FAQ系統。
01. 在osFaq下載相關程式,最新版本為1.0 ST。
02. 解壓檔案,將osFaq_1.0-ST_FULL/osFaq_1.0-ST_FULL/upload資料夾內檔案,複製到osticket資料夾相同位置。
sudo cp -R osFaq_1.0-ST_FULL/osFaq_1.0-ST_FULL/upload /var/www/osticket
03. 編輯/var/www/osticket/include/staff/header.inc.php檔案。
sudo gedit /var/www/osticket/include/staff/header.inc.php
將: <link rel="stylesheet" href="css/main.css" media="screen"> <link rel="stylesheet" href="css/style.css" media="screen"> <link rel="stylesheet" href="css/tabs.css" type="text/css"> <link rel="stylesheet" href="css/autosuggest_inquisitor.css" type="text/css" media="screen" charset="utf-8" /> 更改為: <link rel="stylesheet" href="../faq/styles/faq_admin.css" type="text/css"> <link rel="stylesheet" href="css/main.css" media="screen"> <link rel="stylesheet" href="css/style.css" media="screen"> <link rel="stylesheet" href="css/tabs.css" type="text/css"> <link rel="stylesheet" href="css/autosuggest_inquisitor.css" type="text/css" media="screen" charset="utf-8" />
04. 編輯/var/www/osticket/include/class.nav.php檔案。找尋function StaffNav位置。
sudo gedit /var/www/osticket/include/class.nav.php
將: 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'); 更改為: 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');
05. 編輯/var/www/osticket/include/client/header.inc.php檔案。
sudo gedit /var/www/osticket/include/client/header.inc.php
將: <link rel="stylesheet" href="./styles/main.css" media="screen"> <link rel="stylesheet" href="./styles/colors.css" media="screen"> 更改為: <link rel="stylesheet" href="./faq/styles/faq.css" media="screen"> <link rel="stylesheet" href="./styles/main.css" media="screen"> <link rel="stylesheet" href="./styles/colors.css" media="screen">
06. 編輯/var/www/osticket/include/client/header.inc.php檔案。
sudo gedit /var/www/osticket/include/client/header.inc.php
將: <ul id="nav"> <? 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> 更改為: <ul id="nav"> <li><a class="osf_icon" 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>
07. 編輯/var/www/osticket/index.php檔案。找尋<div class=”clear”>位置。
sudo gedit /var/www/osticket/index.php
將: <div class="clear"></div> <br /> 更改為: <hr /> <?php require(ROOT_DIR.'faq/include/client/faq_external.php'); ?> <div class="clear"></div> <hr /> <br />
08. 打開瀏覽器,假設您的伺服器是192.168.0.101,那網址便是http://192.168.0.101/osticket/faq/setup/。
09. 選擇語言。
10. 按『Install Type』右面的『Install v1.0 ST』位置。
11. 按『Complete Step 1』。
12. 如沒有出現錯誤,按『Step 2』。
13. 如沒有出現錯誤,按『Step 3』。
14. 如沒有出現錯誤,按『Step 4』。
15. 安裝完成。將/var/www/osticket/faq/setup資料夾刪除。
sudo rm -R /var/www/osticket/faq/setup
16. 進入osTicket管理員版面,便會看到osFaq選項。
發佈留言