
Hi, About documentation related to modules, there is: http://doc.otrs.org/1.3/en/html/, chapter 24 and 25 It's 1.3, but I don't think there are that much differences with 2.0. Another usefull link is http://dev.otrs.org/ Bert. Daniel Dumitrache a écrit :
On Tuesday 07 March 2006 18:10, Denis Jedig wrote:
Greetings list,
I wonder where I can find a comprehensive documentation on how to write and install modules in OTRS2.
yeah, that would be so nice :)
I made some efforts mimicing some of the simpler internal modules but already ran into trouble by just renaming an existent module (namely AgentTicketCustomer) and trying to incorporate it into the MenuModule - it shows up in the ticket menu but calling the appropriate URL[1] throws me a "Can't locate Kernel/Modules/myModule.pm in @INC (@INC contains: ../../[..]"
I solved this by registering myModule in Kernel/Config/Files/ I did not perfectly understand where/how to register a module, but using the existing registered modules I managed to do it.
For example, I have a module that displays/modify(+other sstuff) some info on a customer, in Ticket.xml I copied the section for AgentCustomerInfo, and modified it to fit myModule (mostly renaming some xml keys/data). Here's an example, my module is named AgentLiveCustomer : $ grep -C 15 Live Ticket.xml </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentTicketZoom" Required="0" Valid="1"> <Description Lang="en">Frontend module registration for the AgentTicketZoom object in the agent interface.</Description> <Description Lang="de">Frontendmodul-Registration des AgentTicketZoom-Objekts im Agent-Interface.</Description> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>Ticket Zoom</Description> <Title>Zoom</Title> <NavBarName>Ticket</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentLiveCustomer" Required="0" Valid="1"> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>AgentLiveCustomer</Description> <Title>AgentLiveCustomer</Title> <NavBarName>AgentLiveCustomer</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentCustomerInfo" Required="0" Valid="1"> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>AgentCustomerInfo</Description> <Title>AgentCustomerInfo</Title> <NavBarName>AgentCustomerInfo</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentTicketChat" Required="0" Valid="1">
and I've done the same thing for some other modules in Ticket.xml and Framework.xml, had no problems with it, it works
sometimes, after I manually edit one of the .xml files I must also enable the new module from: Admin->SysConfig->Ticket/Framework->Frontend::Admin/Agent::ModuleRegistration
I do not understand why this interface does not offer the possibility to register new modules, only to edit already existing ones. It took me some time until I figured out how to add new ones by editing the xml.
the modules you will want to add, most probably will be somehow similar to existing ones (more or less), you should just grep Kernel/Config/Files/ for the existing module, and register the new one the same way the existing one is registered. this has always worked for me :)
So I wondered about a bunch of questions:
- if INC contains relative paths, which directory are they relative to? The one containing index.pl?
- where/how is INC assembled?
- why does it work for all kind of in-the-box modules but does not work for "mine"?
- why can't I find any documentation on how to write new modules for OTRS2?
Thanks for helping out.
[1] http://otrs/index.pl?Action=myModule&TicketID=10 -- Denis Jedig syneticon networks GbR http://syneticon.net/service/
_______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev