summaryrefslogtreecommitdiff
path: root/plugins/smf2/smf2.module
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/smf2/smf2.module')
-rw-r--r--plugins/smf2/smf2.module14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/smf2/smf2.module b/plugins/smf2/smf2.module
new file mode 100644
index 0000000..b2060f1
--- /dev/null
+++ b/plugins/smf2/smf2.module
@@ -0,0 +1,14 @@
+<?php
+
+function smf2_init($config) {
+ $smf_root_path = $config['root_path'];
+ if (file_exists($smf_root_path . 'SSI.php')) {
+ include_once $smf_root_path . 'SSI.php';
+ }
+ else {
+ file_put_contents('php://stderr', "SMF not found at <{$smf_root_path}>.\n");
+ exit;
+ }
+ require_once __DIR__ . '/BridgeSMF2.php';
+ return new BridgeSMF2();
+}