Adminer - Plugins

Adminer and Adminer Editor can be extended by plugins. To use a plugin

User contributed plugins

To use a plugin

Create a PHP file specifying which plugins do you want to use:

<?php
function adminer_object() {
	// required to run any plugin
	include_once "./plugins/plugin.php";
	
	// autoloader
	foreach (glob("plugins/*.php") as $filename) {
		include_once "./$filename";
	}
	
	// enable extra drivers just by including them
	//~ include "./plugins/drivers/simpledb.php";
	
	$plugins = array(
		// specify enabled plugins here
		new AdminerDumpXml(),
		new AdminerTinymce(),
		new AdminerFileUpload("data/"),
		new AdminerSlugify(),
		new AdminerTranslation(),
		new AdminerForeignSystem(),
	);
	
	/* It is possible to combine customization and plugins:
	class AdminerCustomization extends AdminerPlugin {
	}
	return new AdminerCustomization($plugins);
	*/
	
	return new AdminerPlugin($plugins);
}

// include original Adminer or Adminer Editor
include "./adminer.php";
?>

Then point your browser to this file.

To create a new plugin

  1. Create a class containing any methods defined in the Adminer class (dokumentacja).
  2. If these methods return a non-null value then it will be used instead of the original (except dumpFormat, dumpOutput, editFunctions where the return value is appended to the original).
  3. Methods can also overwrite their parameters by accepting them by reference: f(&$param).
  4. If you would like to publish the plugin on this page then upload it somewhere (e.g. to GitHub Gist) and send the link to: jakub@vrana.cz.