<?php
+
require_once("gwvpweb.php");
require_once("gwvpgitbackend.php");
require_once("gwvpuseradmin.php");
require_once("gwvpsetup.php");
require_once("gwvpdatabase.php");
require_once("gwvpconfig.php");
+require_once("gwvppluginloader.php");
// only enable this if you need it:
require_once("gwvpdebug.php");
--- /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
--- /dev/null
+<?php
+
+if(function_exists("gwvp_DebugEnabled")) {
+ error_log("hello, test plugin loaded");
+}
+
+?>
\ No newline at end of file