Extensions

Script Extensions

Estimated reading: 4 minutes

LIMBAS allows inclusion of extensions for special applications. There are two options:

Extend LIMBAS core with your own script

When LIMBAS is started, it identifies all files “ext_*.inc” from the directory ./dependent/EXTENSIONS and any subdirectories. Prior to the execution of a script .php, .dao or .lib it is verified if one or more (from various subdirectories) ext_.inc are present. If so they will be executed if necessary.
In the current version the following Source Files can be extended:

Source ScriptExtension NameExecutionFunctionality
session_auth.libext_global.incscript beginGlobal
main.phpext_main.incscript middleHome Page
main.phpext_main.jsscript endHome Page Javascript Body elements
main_admin.phpext_main_admin.incscript middleAdmin Home Page
main_dyns.phpext_ajax.incscript beginHome Page for Ajax-Calls
gtab/gtab.libext_gtab.incscript beginBasic functions for all database queries and changes
gtab/html/gtab_erg.phpext_gtab_erg.incscript beginFunctions for the list view
gtab/html/gtab_erg.daoext_gtab_erg_dao.incscript beginFunctions for the list view
gtab/dao/gtab_change.daoext_gtab_change.incscript beginFunctions for the detail view
lib/session_auth.libext_session_auth.incscript endFunctions for the Session Initialization
lib/session_auth.libext_ldap.incscript beginFunctions for LDAP authentication
extra/report/report.daoext_report.incscript beginFunktionen für Reports
extra/explorer/filestructure.libext_explorer.incscript beginFunctions for LIMBAS DMS
layout/nav.phpext_nav.incscript endExtension of the navigation bar
extra/multiframe/multiframe.daoext_multiframe.incscript endFunctions for displays in the multi-purpose window on the right edge of the browser
admin/setup/color_schema.libext_css.inc
ext_scss.inc
extscssv.inc
script endExtension for overrides of the main stylesheet of Limbas (for direct layout adjustments)
main.phpext_main.cssscript middleAdditionally integrated CSS for own extensions

Generally, unlimited extension scripts can be created, using the same name but saved in different folders. You can create your own folder structure in the ./dependent/EXTENSIONS directory which will give you a better overview.

Expand LIMBAS with own functions

The script to be executed by LIMBAS, must be in the directory ./dependent/EXTENSIONS or a subdirectory in a file with the extension *.ext

In Admin->Setup->Menu Items the script has to be selected, for the menu item that triggers the execution of the script. If the menu item already has a Limbas action the originally planned action will not be executed. Additionally own menu items can be added. These can be authorized and used to the full extend in extensions. Actions or links that are not used in menus can also be used like “menu items”.

In the example the file helloworld.ext is executed. It includes the following example code:

The action can now be call by the following link: http://…openlimbas/dependent/main.php?action=nav_meinMenue.

Extend the main.php with the file ext_main.inc

This file must be created in the directory /dependent/EXTENSIONS or a subdirectory. In order to select an extension for a new main menue item first an action must be inserted.
The action can be any name which will later be used to call the extension. (attention: each name can only be used once)
The call is carried out by the additon of the limbas link by “main.php?action=NAME_OF_THE_ACTION”.

The line “$action=’null'” is an important entry, because otherwise all following actions will be executed.

If you call now the link …/main.php?action=nav_myMenue in the browser you can see the return value “hello”.

Extending the Stylesheet

The files ‘ext_scss.inc’ and ‘ext_scssv.inc’ get inserted as is (raw text) and then compiled to css. The ‘ext_css.inc’ gets interpreted as php file and executed. Everything what is written into the variable $buf will get appended to the css file. To apply the extension, the color scheme has to be regenerated.

Share this Doc

Script Extensions

Or copy link

CONTENTS