Extensions

A extension is a collection of php classes, translations, plugins, themes, database tables, administration windows, documentation, help files, acl items, widgets, domain and page properties, custom ka.fields, media files and others.

 

If you want to extend Kryn.cms base installation then you can this via extensions.

 

File paths

 

Extension class inc/modules/<extensionKey>/<extensionKey>.class.php
PHP classes inc/modules/<extensionKey>/<extensionKey>_<className>.class.php
Translations inc/modules/<extensionKey>/lang/<langKey>.json
Help files inc/modules/<extensionKey>/lang/help_<langKey>.json
Config inc/modules/<extensionKey>/config.json
Templates / Media  
Template files inc/template/<extensionKey>/
Images inc/template/<extensionKey>/images/
Css inc/template/<extensionKey>/css/
Javascript inc/template/<extensionKey>/js/
Plugin templates inc/template/<extensionKey>/<pluginKey>/
Plugin Css inc/template/<extensionKey>/<pluginKey>/css/
Plugin Javascript inc/template/<extensionKey>/<pluginKey>/js/
Plugin images inc/template/<extensionKey>/<pluginKey>/images/

If a plugin gives users the ability to choose a template for the output then store please the css/javascript/images of an plugin-template in seperat folders.

Template Plugin Css inc/template/<extensionKey>/<pluginKey>/<choosenTemplate>/css/
Template Plugin Js inc/template/<extensionKey>/<pluginKey>/<choosenTemplate>/js/
Template Plugin images inc/template/<extensionKey>/<pluginKey>/<choosenTemplate>/images/
Administration templates / Media
Admin templates inc/template/<extensionKey>/admin/
Admin JS classes
(for custom windows)
inc/template/<extensionKey>/admin/js/<WindowClass>.js

Admin Css files

(for custom windows)

inc/template/<extensionKey>/admin/css/<WindowClass>.css
Admin images inc/template/<extensionKey>/admin/images/
   

 

 

 

Extension class

 

If you want to develop plugins or custom windows then you need to create a extension class. A extension class is a normal php class extended from baseModule.

 

Extra PHP classes

 

When you create extra php classes in your extension, save this please in the scheme above. Please notice, that you add your extension-key to the beginning of the php class, so that no conflicts exists with other extensions.

 

Translations

 

Translations are stored in little json formatted files under the scheme above. This files are automatically created when you translate your extension with the extension editor.

 

Config.json

 

All properties on a extension like the title, description, version, plugin definitions, database tables, theme definitions, windows links in the extension bar (and therefore acl items), extra js files for administration and so on are stored in this json formatted file.

 

Database tables

 

When you want to save informations in the database, then the system can handle the table schemes for you. Just define the tables with the extension editor and the system creates and alter the tables for you in installations and updates.

 

Plugins

 

Plugins are the interface between the keditor and your extension, so that users can handle with the informations which your extension does provide.

 

Links

 

Links (ak Extension links) are entry points to your extensions in the administration area. With links you can define wich path are a framework window, which path are a ACL item or which links are links in the extension bar.

 

Windows

 

With windows you gives the users the ability to manage data from your extension. For example you can build with the framework own formulars and table lists in just minutes or can build own complexe javascript interfaces.

 

ACL

 

ACL (access control list) is based on the extension links. With this links you can define entry points to your extension controller - this links are automatically at the same time ACL items. But you can also define own ACL items which aren't entry points, just to define ACL item for the frontend.

 

Widgets

 

Widgets are little framework based tables. This tables are displayed automatically in the Overview window - the user has the ability to display a widget on the desktop for quick and fast overview from data in your extension.

 

Domain and page properties

 

If you want that users can save custom values on domain or page level, then you can define domain or page properties. With this you can define own fields on the properties tab - this are ka.fields with a key and the proper definition.

 

Extending extensions

 

With this feature you have the ability to extend other (third party) extensions. For example if you want to create an extension which extend the publication (news/blog extension) extension. In more detail: You want to add a new Tab with new fields (and of course database table fields) in the 'News add/edit' window, than you can do this with this feature. You can extend each item in other extension which are stored on the config.json (and this means everything!).

 

Publish

 

You can publish your extension to the community server when you creating a extension and want to share it with others. You just need a kryn.org account and can upload your extension via your kryn installation.