This refers to b2evolution version 0.9.0

All the plugins are stored in subfolders of the /plugins folder.

As of version 0.9.0, there are two types of plugins: the toolbar plugins that display on the post edit screen, and the renderer plugins that act as filters when displaying pots. Each type has its own subfolder.

How to enable/disable a plugin

The easiest way to completely disable a renderer plugin is to delete the corresponding .php file from the appropriate plugins subfolder. (This does not work for toolbar plugins in version 0.9.0)

To disable a toolbar plugin, open the file /b2evocore/_class_toolbars and look for:

	function display()
	{
		$this->init();	// Init if not done yet.

		$this->index_Plugins['b2evQTag']->display();
		$this->index_Plugins['b2evSmil']->display();
	}	

Delete (or comment out) the line for the plugin you don't want. b2evQTag is for the QuickTags. b2evSmil is for the smileys toolbar.

Plugin parameters

If you want to act with a little more control, just open the plugin .php file in a text editor and look for the following settings...

Toolbar plugins

priority

This controls the relative order in which the toolbar will be displayed. Example:

var $priority = 30;

Renderer plugins

priority

This controls the relative order in which the renderer will be applied to the post text. Example:

var $priority = 30;
apply-when

This controls when the renderer should be applied.

Possible values are:

  • 'stealth' (renderer will always apply and the post authors won't even know; plugin will be invisible but active)
  • 'always' (aka 'forced': renderer will always apply and the post author won't be able to uncheck it)
  • 'opt-out' (renderer will be checked by default for new posts, but author can uncheck it to disable it)
  • 'opt-in' (renderer will be unchecked by default for new posts, but author can check it to enable it)
  • 'lazy' (renderer will only apply to old posts that require it but will not be available for new posts)
  • 'never' (renderer will be invisible and inactive)

Example:

var $apply_when = 'opt-out';

Created by fplanque • Last edit by fplanque on March 6th, 2013

3 comments

J. K. Hoffman

What would be really nice is some kind of API doc so we could write plugins for b2e. For instance, I wrote a moon phase plugin for WordPress and I'd like to adapt it to b2e for my wife, but I can't for lack of info about the configuration and data structre. Good documentation would be great for this.

08/19/04 @ 00:40
Comment from: isaac
Isaac

The Tech Documentation is about the closest thing you'll find so far.

If you posted a fake email address, contact me via a comment or something and I'll work with you to port over the moon phase thing if it can be done.

08/19/04 @ 05:07
Brian Feinzimer

It's weird because out of no where I was getting PHP errors about line 47 which contianed the string

$this->index_Plugins['b2evSmil']->display();

and I had never gotten the error before...I'm guessing one of my smiley/toolbar thingy files got corrupted so I couldent use the item, I just removed the line and now it works.

I'm using 0.9.0.10

07/19/05 @ 23:18