Go to file
2017-01-10 09:13:38 +01:00
conf add more converters for preview 2016-11-15 21:13:04 +01:00
controllers set Content-Disposition even if file type not in list of online file types 2017-01-10 08:48:05 +01:00
develop make it work again with new language dirs 2015-05-13 17:32:44 +02:00
doc various improvements 2016-05-04 08:14:04 +02:00
ext/example fix typo in description of extension 2016-04-12 09:17:35 +02:00
inc set name of file in zip file to 'docid'-'version'-'docname' (Closes #95) 2017-01-09 21:33:45 +01:00
install forget to create field secret when change table tblUsers 2016-11-16 11:39:13 +01:00
languages add new key 'command' 2017-01-09 12:58:09 +01:00
op check access rights in controller, not before 2017-01-10 06:58:07 +01:00
out Merge branch 'seeddms-5.0.x' into seeddms-5.1.x 2017-01-04 17:11:39 +01:00
restapi add method getDocumentPreview(), fix setting some headers 2017-01-05 10:05:47 +01:00
SeedDMS_Core fix search for documents with reception acknowledgement 2016-11-22 17:58:28 +01:00
SeedDMS_Lucene make all functions static 2016-07-05 17:31:25 +02:00
SeedDMS_Preview new version 1.2.1 2016-11-15 21:08:26 +01:00
SeedDMS_SQLiteFTS new version 1.0.6 2016-07-04 20:52:33 +02:00
styles Merge branch 'seeddms-5.0.x' into seeddms-5.1.x 2017-01-09 21:13:42 +01:00
themes - move all sources into trunk 2010-10-29 13:19:51 +00:00
utils Merge branch 'seeddms-5.0.x' into seeddms-5.1.x 2016-09-22 18:24:32 +02:00
views/bootstrap Merge branch 'seeddms-5.0.x' into seeddms-5.1.x 2017-01-10 09:13:38 +01:00
webdav use ldap authentication if turned on 2016-09-06 21:40:09 +02:00
.gitignore ignore some files 2017-01-05 18:06:12 +01:00
CHANGELOG Merge branch 'seeddms-5.0.x' into seeddms-5.1.x 2017-01-04 17:11:39 +01:00
drop-tables-innodb.sql - updated for version 3.4.x 2012-10-09 12:33:39 +00:00
index.php major name change from letodms to seeddms 2013-02-14 12:10:53 +01:00
LICENSE - move all sources into trunk 2010-10-29 13:19:51 +00:00
Makefile Merge branch 'seeddms-5.0.x' into seeddms-5.1.x 2017-01-09 21:13:42 +01:00
README.Extensions some more information on how extensions work 2014-12-08 14:31:07 +01:00
TODO clean up 2013-02-15 20:30:11 +01:00

Extensions in SeedDMS
====================

Since verson 5.0.0 SeedDMS can be extended by extensions. Extensions
can hook up functions into certain operations, e.g.
uploading, removing or displaying a document. They can also be
used to modify some of the internal variables like the list of
translations and they can even replace classes in the core of
seeddms and hook up functions into certain operations in the core.

All extensions are located in the folder 'ext'. Each extension
has its own folder named by the name of the extension. The central
configuration of an extension is stored in conf.php.
The configuration sets the file and classname which is loaded
during initialization of the extension. The class has to have
a method init() which is called with any page request. The
configuration itself is cached and must be updated within
the extension manager if it was changed.

The integration into SeedDMS is done by hooks, class and file
overloading. SeedDMS manages
a globally available array of hooks ($GLOBALS['SEEDDMS_HOOKS']).
This array has the elements 'view' and 'controller'. All entries
in those array elements contain instances of self defined classes
containing the hook methods. For setting up the hooks in the view
'viewFolder' the following code is needed.

$GLOBALS['SEEDDMS_HOOKS']['view']['viewFolder'][] = new SeedDMS_ExtExample_ViewFolder;

class SeedDMS_ExtExample_ViewFolder {
  ...
};

The same approach is implemented for hooks called from the controller
logic (the op/op.*.php files).

$GLOBALS['SEEDDMS_HOOKS']['controller']['removeFolder'][] = new SeedDMS_ExtExample_RemoveFolder;

class SeedDMS_ExtExample_RemoveFolder {
  ...
};

Based on these two variants of adding hooks to the seeddms application code,
the seeddms core can be extended by implementing the controller hook 'initDMS'
which is called right after the class SeedDMS_Core_DMS has been initiated.

Beside hooks and callbacks another way of modifying seeddms is given
by overloading the files in the directory 'views' and 'controllers'. Both
directories contain class files with a single class for either running
controller or view code. If an extension provides those file in its
own extension dir, they will be used instead of the files shipped with
seeddms.