EKlecticCore Content Management System

EKCCMS Documentation for Developers

If you are a developer seeking technical help that is not available here, click here to send us an email. We will personally respond to your request, and update this documentation.

More Article has image(s) EKCCMS Debugging Window

EKCCMS includes a powerful debugging window for PHP developers using this framework. When a variable is sent to the debugging screen, the file and ...More...

More EKCCMS Debugging Window Advanced Feature

Built into the debugging mechanism is the ability to set a "debugging level" for debug messages. The debug level is an arbitrary value that you can...More...

Less Module development overview

There are many benefits to using the EKCCMS module API, some of which include:

Automatic configuration interface.

  • EKCCMS generates the config GUI based upon the configuration variables that are defined.
  • In other words, developers spend ZERO TIME developing configuration interfaces.
  • Optional instructions for users can be built strait into the module using the ->get_instructions() method.

Easy enough for new developers, powerful enough for pros

  • To fully integrate into EKCCMS, a module only needs one method to be customized: ->get_html()
  • The only other required method is ->get_config_object, which should be copied from the template module (mod_template.php).

Quickest path to develop a new module:

  1. On your development server, go to the /modules folder and copy mod_template.php to your new module file (i.e. we'll use mod_example.php for the sake of example).
  2. Open mod_example.php, and change the class name from mod_template to mod_example and save the file.
  3. Change the configuration variables in the ->get_config_object method to suit your needs.
  4. Change the HTML output in the ->get_html() method to suit your needs.
  5. That's all! Your module can now be added to any content block.

The EKCCMS module API is activated by using specific naming conventions for module files and classes. Here is a crash course on EKCCMS modules for experienced developers:

  • Module file must reside in /modules directory.
  • Module file must begin with "mod_".
  • Module classname must be the same as the module filename without the PHP extension. (e.g. mod_articles.php must contain "class mod_articles { }" or the system will crash.

If these conventions are observed, then EKCCMS will attempt to use the following methods of the module class (most of which should be relatively self-explantory to an experienced developer):

  1. ->get_html()
  2. ->get_direct_html_output()
  3. ->get_config_object()
  4. ->get_instructions()

These special variables are also important if they are used:

  1. ->config = The internal "configuration object" variable which is serialized and stored in the content_metadata field of the content table.
  2. ->config->file = Auto-generates a file popup configuration option for a server-based file.
  3. ->file_dir = Root directory for ->config->file popup.
  4. ->config->dir = Same as ->config->file, but for directories only.
  5. ->config->src_dir = Root directory for ->config->dir option.