<?php
// include the plugin core
include("class.plugin.php");
// initialize the plugin class
$classPlugin = new plugin("plugins", "plugin.?.php");
// show all available plugins with aditional information
print("Number of available plugins: " . $classPlugin->intAvailablePlugins . "<br>");
print("Available plugins for loading: <br>");
foreach($classPlugin->arrAvailablePlugins as $key => $val) {
print("> <b>" . $key . "</b> (/" . $val[path] . "/" . $val[filename] . "): " . $val[info][name] . "<br> --- Plugin made by: " . $val[info][author] . "<br> --- " . $val[info][description] . "<br><br>");
}
// execute 'foo' plugin
print("<hr>Testing 'foo' plugin: ");
$classPlugin->execPlugin("foo");
// execute a function from the 'foo' plugin
if ($classPlugin->execFunction("foo", "foo_test", Array("blabla", "test 1..2..3.. passed"))) {
print("<br>foo test passed");
}
// execute 'bar' plugin
print("<hr>Testing 'bar' plugin: ");
$classPlugin->execPlugin("bar");
// execute a function from the 'bar' plugin
if ($classPlugin->execFunction("bar", "bar_test", Array("blabla", "test 1..2..3.. passed"))) {
print("<br>bar test passed");
}
?>
|