Plugin_Howto

Plugin Howto

Note: This page is just being put together, for questions please refer to the mailinglist.

Basics

This page puts together a few notes for getting into the development of "Flux CMS"-Plugins

See also:

Setup

Basic setup of plugins in Flux CMS - Subject of contents (extract):

  • PHP-Files for Plugin itself
  • XSL-Files
  • .configxml

Folders

  • inc/bx/plugins/*
  • themes//
  • dbforms2/*
  • ...

Keeping a plugin in a separate repository

If you want to keep your pluginfiles separate from the "official" "Flux CMS"-sources, create a directory called "localinc". Classes in there are loaded exactly as the regular "inc"-Folder. If a file is placed in both folders, the original "inc" gets higher priority.

localinc/bx/plugins/myplugin.php

Debugging while developing

Some handy debuggung-functions are provided by the class bx_helpers_debug. For outputting a variable, just add the following to your code:

bx_heplers_debug::webdump($foo);

Available Plugins

Get them

Each plugin correspond to a php file. To see what's available, check :

For example, you can get/find :

  • address : manage an address list?
  • basket : allow the creation of a basket as for a shopping website.
  • event : proposes a lists of events edited via dbforms2
    etc.

Use them

In each plugin php file, you should find some info about the needed context :

  • .configxml to use,
  • an eventual database table that has to be created and could/should be accessed via dbforms2 (admin url : /admin/dbforms2/tablename)
  • and the eventual xsl file that offers standard public interface for that plugin.

You can get more infos about some 'classical' plugins on this website (check this page's siblings).

You will find some global and detailed infos in 'Plugins for Flux CMS' - pdf, 1MB.

You also can find some interesting infos at http://beni.bitflux.ch about the folllwing plugins :

  • comments (also called generalcomments) : allows comments on anypages of the website. admin access via dbforms2.
  • tagcloud : based on tags edited via the blog plugin. Creates a nice tagcloud. Great!
  • graph : ???

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.