The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Converting from Xenforo to vBulletin
Hey,
I was wondering if someone might be willing to give me a hand with converting this matter of code to be cross-compatible with vbulletin? Thanks, Code:
<?php // ************************************************************************************************** // IMPORTANT CONFIGURATION ITEMS // ************************************************************************************************** $enabled = true; $serverip = '127.0.0.1'; // ************************************************************************************************** // END OF IMPORTANT CONFIGURATION ITEMS // DO NOT EDIT ANYTHING BEYOND THIS POINT! // ************************************************************************************************** // Necessary XenForo Hooks require($fileDir . 'library/XenForo/Autoloader.php'); XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . 'library'); XenForo_Application::initialize($fileDir . 'library', $fileDir); XenForo_Application::set('page_start_time', $startTime); // Assistance in placing file in correct directory w/o include/require. $proxyfile = 'proxy.php'; $adminfile = 'admin.php'; if (!file_exists($proxyfile)) { die('This file is not in the correct directory. Please contact a website administrator.'); }; if (!file_exists($adminfile)) { die('This file is not in the correct directory. Please contact a website administrator.'); }; // Checks to make sure accessing IP is server IP. $acuntite = $_SERVER['REMOTE_ADDR']; if (strlen($_SERVER['REMOTE_ADDR'])<6) { die ('Access denied.'); }; if ($acuntite != $serverip) { die('Access denied.'); }; // Post get items $username = $_GET['un']; $password = $_GET['pw']; // If no info specified if(is_null($username) && is_null($password)) return; $error = ""; $ph = new XenForo_Model_User(); $result = $ph->validateAuthentication($username, $password, $error); // Ensures system is enabled before continuing. If not, returns error if ($enabled != true) { die('3'); } // Final get id if(is_numeric($result) && $result > 0 && !(strpos($username, '@') !== false)) { $user = $ph->getFullUserById($result); // ensures user is not banned $banned = $user['is_banned']; // if banned, return error 2 if($banned == 1) echo "2"; // if not banned, successful login else echo "1"; } // and if all else fails, the shit you provided is wrong so return error 0 else echo "0"; // Echo 0 = Incorrect user/pass // Echo 1 = Successful Login // Echo 2 = Banned User // Echo 3 = System disabled ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|