6
$kag_en_plugs = array();
11
function kag_load_plugins($conv){
13
$kag_en_plugs = array();
14
$plugin_dir = $conv->plugins();
15
if(!is_dir($plugin_dir))
17
foreach(scandir($plugin_dir) as $dirname){
18
if(!is_dir($plugin_dir.'/'.$dirname))
20
$targ = $plugin_dir.'/'.$dirname.'/'.$dirname.'.plug.php';
21
if(!file_exists($targ))
24
$kag_en_plugs[] = $plugname;
29
function kag_plugin_oninitialize($conv){
30
static $loaded = false;
32
kag_load_plugins($conv);
36
foreach($kag_en_plugs as $plug_name){
37
$func = 'kag_'.$plug_name.'_oninitialize';
38
if(function_exists($func))
43
function kag_plugin_onconvert($conv){
45
foreach($kag_en_plugs as $plug_name){
46
$func = 'kag_'.$plug_name.'_onconvert';
47
if(function_exists($func))