Dieses Kapitel wird Ihnen weitere Inforamtionen über das Schreiben von einfachen OTRS Modulen geben.
Mit Benachrichtigungsmodulen können Sie Agenten neue Information zukommen lassen. Die Navigation sieht normalerweise folgendermaßen aus:
Dies ist ein Beispiel für ein simples Benachrichtigungsmodul. Speichern Sie es unter Kernel/Output/HTML/NotificationMotd.pm.
# -- # Kernel/Output/HTML/NotificationMotd.pm - message of the day # Copyright (C) 2003 Hans Mueller mail@example.com # -- # $Id: developer-guide-custom-modules.sgml,v 1.3.2.1 2004/03/01 23:56:19 robert Exp $ # -- # This software comes with ABSOLUTELY NO WARRANTY. For details, see # the enclosed file COPYING for license information (GPL). If you # did not receive this file, see http://www.gnu.org/licenses/gpl.txt. # -- package Kernel::Output::HTML::NotificationMotd; use strict; # -- sub new { my $Type = shift; my %Param = @_; # allocate new hash for object my $Self = {}; bless ($Self, $Type); # get needed objects foreach (qw(ConfigObject LogObject DBObject LayoutObject UserID)) { $Self->{$_} = $Param{$_} || die "Got no $_!"; } return $Self; } # -- sub Run { my $Self = shift; my %Param = @_; return $Self->{LayoutObject}->Notify(Info => 'Tägliche Neuigkeiten!'); } # -- 1; |
# Frontend::NotifyModule - module name (50-Motd) $Self->{'Frontend::NotifyModule'}->{'50-Motd'} = { Module => 'Kernel::Output::HTML::NotificationMotd', }; |
Die standardmäßigen Benachrichtigungsmodule sind die folgenden:
# agent interface notification module to check the used charset $Self->{'Frontend::NotifyModule'}->{'1-CharsetCheck'} = { Module => 'Kernel::Output::HTML::NotificationCharsetCheck', }; # agent interface notification module to check the admin user id # (don't work with user id 1 notification) $Self->{'Frontend::NotifyModule'}->{'2-UID-Check'} = { Module => 'Kernel::Output::HTML::NotificationUIDCheck', }; |