Skip to Navigation

OTRS 2.2 - Developer Manual

Christian Schöpplein, Richard Kammermeyer, Stefan Rother, Thomas Raith, Burchard Steinbild, Andre Mindermann, Christopher Kuhn, Martin Edenhofer

This work is copyrighted by OTRS AG.

You may copy it in whole or in part as long as the copies retain this copyright statement.

UNIX is a registered trademark of X/Open Company Limited. Linux is a registered trademark of Linus Torvalds.

MS-DOS, Windows, Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP and Windows 2003 are registered trademarks of Microsoft Corporation. Other trademarks and registered trademarks are: SUSE and YaST of SUSE GmbH, Red Hat and Fedora are registered trademarks of Red Hat, Inc. Mandrake is a registered trademark of MandrakeSoft, SA. Debian is a registered trademark of Software in the Public Interest, Inc. MySQL and the MySQL Logo are registered trademarks of MySQL AB.

All trade names are used without the guarantee for their free use and are possibly registered trade marks.

OTRS AG essentially follows the notations of the manufacturers. Other products mentioned in this manual may be trademarks of the respective manufacturer.


Table of Contents

1. Introduction
2. Coding Style Guide
Formatting
Naming
Source Code Header and Charset
Version Comments
Objects and their allocation
Special comments
Restrictions for some functions
Using of the MainObject
Perldoc
Length of lines
3. Architecture
Directories
Files
Core Modules
Frontend Handle
Frontend Modules
CMD Frontend
Database
4. Config Mechanism
Default Config
Custom Config
Accessing Config Options
XML Config Options
Types of XML Config Variables
String
Textarea
Options
Array
Hash
Hash with SubArray, SubOptions, SubHash
FrontendModuleReg (NavBar)
FrontendModuleReg (NavBarModule)
5. Database Mechanism
How it works
SQL
XML
Database Drivers
Supported Databases
6. Log Mechanism
Use and Syntax
Example
7. Module Format
Auth Module
Notify Module
Navigation Module
Frontend Modules
Core Modules
Customer Auth Module
Customer User Module
Customer Navigation Module
Stats Module
Dynamic stats
Static stats
Using old static stats
Ticket Modules
Ticket Number Module
Ticket PostMaster Module
Ticket Menu Module
Ticket Event Module
More Modules
8. Templates
Formatting
Comment
$Data{""}
$QData{""}
$LQData{""}
$Env{""}
$QEnv{""}
$Quote{""}
$Text{""}
$Config{""}
$Include{""}
Block
set
if
system-call
Example
9. Layout
CSS Style
View
Edit/New/Search
Overview/Search Result
Delete
Images
Special CSS Definitions
10. Language Translations
How it works
Default Framework Translation File
Frontend Translation File
Custom Translation File
Add a new default framework translation
11. Object Basics
Object Options
Search Options
Config Naming
Config File
NavBar Settings
Screen flow
12. Development Environment
Framework checkout (CVS)
Linking Expansion Modules
Necessary Actions after Linking
13. Writing an OTRS module for a new object
What we want to write
Default Config File
Frontend Module
Core Module
dtl Template File
Language File
Summary
14. Package Management
Package Distribution
Package Repository Index
Package Commands
Install
Uninstall
Upgrade
List
15. Package Building
Package Spec File
Name
Version
Framework
Vendor
URL
License
ChangeLog
Description
BuildHost
BuildDate
PackageRequired
OS (^M)
Filelist
DatabaseInstall
DatabaseUpgrade
DatabaseReinstall
DatabaseUninstall
CodeInstall
CodeUninstall
CodeReinstall
CodeUpgrade
IntroInstall(Pre|Post)
IntroUninstall(Pre|Post)
IntroReinstall(Pre|Post)
IntroUpgrade(Pre|Post)
Example .sopm
Package Build
16. Unit Tests
Creating a test file
Testing
True()
False()
Is()
A. Additional Ressources
OTRS.org
Online API Library
Developer Mailing List
Commercial Support