--- /dev/null
+<?php
+
+function gwvp_PluginLoader($path="")
+{
+ if($path != "") {
+ // try and find it
+ error_log("attempting to load plugins from $path");
+ $dh = opendir("$path");
+ if($dh) {
+ while(($file = readdir($dh))!==false) {
+ $mt = preg_match("/.*.php$/", $file);
+ if($mt > 0) {
+ error_log("loading plugin $file");
+ require_once("$path/$file");
+ //echo "required $basedir/$file\n";
+ }
+ }
+ }
+ }
+}
+
+// we assume the config is loaded, but this is where it works:
+error_log("begin plugin load");
+if(isset($plugin_path)) {
+ error_log("path set");
+ if(is_dir($plugin_path)) {
+ error_log("is dir, beginning load");
+ gwvp_PluginLoader($plugin_path);
+ }
+}
+
+?>
\ No newline at end of file