diff -r 902822492a68 -r fe660c52c48f includes/plugins.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/includes/plugins.php Wed Jun 13 16:07:17 2007 -0400 @@ -0,0 +1,105 @@ +load_list = Array(); + + $plugins = Array(); + + // Open a known directory, and proceed to read its contents + + if (is_dir($dir)) + { + if ($dh = opendir($dir)) + { + while (($file = readdir($dh)) !== false) + { + if(preg_match('#^(.*?)\.php$#is', $file)) + { + if(getConfig('plugin_'.$file) == '1' || in_array($file, $this->system_plugins)) + { + $this->load_list[] = $dir . $file; + $plugid = substr($file, 0, strlen($file)-4); + $f = file_get_contents($dir . $file); + $f = explode("\n", $f); + $f = array_slice($f, 2, 7); + $f[0] = substr($f[0], 13); + $f[1] = substr($f[1], 12); + $f[2] = substr($f[2], 13); + $f[3] = substr($f[3], 8 ); + $f[4] = substr($f[4], 9 ); + $f[5] = substr($f[5], 12); + $plugins[$plugid] = Array(); + $plugins[$plugid]['name'] = $f[0]; + $plugins[$plugid]['uri'] = $f[1]; + $plugins[$plugid]['desc'] = $f[2]; + $plugins[$plugid]['auth'] = $f[3]; + $plugins[$plugid]['vers'] = $f[4]; + $plugins[$plugid]['aweb'] = $f[5]; + } + } + } + closedir($dh); + } + } + $this->loaded_plugins = $plugins; + //die('
'.htmlspecialchars(print_r($plugins, true)).''); + } + function setHook($name, $opts = Array()) { + dc_dump($name, 'plugins: hook added: '); + /* + $r = Array(); + if(isset($this->hook_list[$name])) { + for($i=0;$i