I'm a rookie with php, as well as vbulletin in general, so I may struggle and never understand it anyway, but I'm trying to learn, and am looking for possible a guide, or some information on the various vbulletin code to help me convert a set of php scripts that work with phpbb to work with vbulletin instead.
A very small example of the existing code of one file is this:
PHP Code:
function phpbb_log_in($myAuth, $myPassword)
{
global $db, $user_ip, $mots_page_index;
$sql = "SELECT user_password, user_active
FROM " . USERS_TABLE . "
WHERE user_id = $myAuth";
if ( !($result = $db->sql_query($sql)) )
{
fatal_error("[M2] Could not obtain PHPBB authentication data <br>line =".
__LINE__ ."<br>file = ". __FILE__ ."<br>query = ". $sql);
}
$returnint = 0;
if( $row = $db->sql_fetchrow($result) )
{
if( md5($myPassword) == $row['user_password'] && $row['user_active'] )
{
$autologin = TRUE;
$session_id = session_begin($myAuth, $user_ip, $mots_page_index, FALSE, $autologin);
if( !$session_id )
{
fatal_error("[M2] Could not start session <br>line =".
__LINE__ ."<br>file = ". __FILE__ );
}
$returnint = 1;
}
}
return $returnint;
}