summaryrefslogtreecommitdiff
path: root/plugins/smf2/smf2.module
diff options
context:
space:
mode:
authorChristoph Burschka2013-12-30 02:45:00 +0100
committerChristoph Burschka2013-12-30 02:45:00 +0100
commitd753992668c1a3c3bd55328c05a4e24a05d6d0b3 (patch)
tree388ed2718f77cb535b14afed84de4ba77d17d72d /plugins/smf2/smf2.module
parentExplain how the class methods work. (diff)
downloadejabberd-auth-php-d753992668c1a3c3bd55328c05a4e24a05d6d0b3.tar.gz
New SMF2 plugin
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();
+}