Ok, to take this one step further. The login doesn't work well either, it logs me in, but I am not taken back to the gallery.
In reference to the following hack:
https://vborg.vbsupport.ru/showthrea...2&page=1&pp=15
First off, a small correction:
bridge/vbulletin30.inc.php
Replace all instances of "VB_BD_HOST" with "VB_DB_HOST".
So here is my modification:
bridge/vbulletin30.inc.php
#1
Find:
PHP Code:
define('VB_WEB_PATH', '/forum/');
Add underneath:
PHP Code:
define('VB_DOC_ROOT', $_SERVER['DOCUMENT_ROOT'].'/forum');
Of course you have to modify the path, this works in my example.
#2
Find "function udb_login()" and replace its contents with the following:
PHP Code:
function udb_login_page($url)
{
$bbuserid = (int) ((isset($_COOKIE['bbuserid']) && !empty($_COOKIE['bbuserid']))?$_COOKIE['bbuserid']:0);
$bbpassword = (string) $_COOKIE['bbpassword'];
$bbusername = (string) '';
$db_conn = mysql_connect(VB_DB_HOST, VB_DB_USERNAME, VB_DB_PASSWORD) OR die('vbbridge: No connection.');
mysql_select_db(VB_DB_NAME, $db_conn) OR die ('vbbridge: No such database.');
$query = "select username from ". VB_USER_TABLE ." where userid = $userid";
if($rawdb = @mysql_query($query)){
if(mysql_num_rows($rawdb) > 0){
$array = mysql_fetch_array($rawdb);
$bbusername=$array['username'];
mysql_free_result($rawdb);
}
}
mysql_close($db_conn);
if(empty($bbusername)){
?>
<html>
<head>
<script type="text/javascript" src="<?php echo VB_WEB_PATH; ?>clientscript/vbulletin_md5.js"></script>
</head>
<body>
<form action="<?php echo VB_WEB_PATH; ?>login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password);">
<span class="sectionheader">Username:</span>
<input type="text" class="button" name="vb_login_username" id="navbar_username" size="15" accesskey="u" tabindex="1" value="username" onfocus="if (this.value == 'username') this.value = '';" /><br/>
<span class="sectionheader">Password: </span>
<input type="password" class="button" name="vb_login_password" size="15" accesskey="p" tabindex="2" /><br/>
<input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />
<span class="sectionheader">Remember Me</span><br/>
<input name="submit" type="submit" class="button" accesskey="s" tabindex="4" title="Log In" value="Log In" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="forceredirect" value="1" />
<input type="hidden" name="url" value="URL_TO_YOUR_GALLERY_HERE">
<input type="hidden" name="vb_login_md5password" />
</form>
</body>
</html>
<?php
}else{
udb_redirect('index.php');
}
// hard exit
exit;
}
Make sure you replace
URL_TO_YOUR_GALLERY_HERE in the code snippet. You can make it more pretty by including CSS and so on, and so on. This is quite dirty. But it works.
Cheers,
Till