Jump to content

Mythos

Members
  • Posts

    12
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Mythos

  1. I've been trying out TortoiseGit recently, and I'm impressed. Works smoother than TortoiseSVN. The only issue I have found is tht you should use Git only with OpenSSH from msysgit, and not with Putty or TortoisePLink, as ssh authentication with those does seem to fail with TortoiseGit.

    Yeah TortoiseGit is cool, but I don't know how to merge :mellow:

    German language file would be nice, too ^_^

    Can you tell me how to merge a branch?

  2. Does not work.

    The first script causes this errors:

    [phpBB Debug] PHP Notice: in file /includes/functions.php on line 3858: Cannot modify header information - headers already sent by (output started at /includes/auth/auth_extdb.php:1)
    [phpBB Debug] PHP Notice: in file /includes/functions.php on line 3860: Cannot modify header information - headers already sent by (output started at /includes/auth/auth_extdb.php:1)
    [phpBB Debug] PHP Notice: in file /includes/functions.php on line 3861: Cannot modify header information - headers already sent by (output started at /includes/auth/auth_extdb.php:1)
    [phpBB Debug] PHP Notice: in file /includes/functions.php on line 3862: Cannot modify header information - headers already sent by (output started at /includes/auth/auth_extdb.php:1)

    And I don't know how to choose the table "account" from the realmd db...

    Please help!

    /edit:

    Here's my extdb code. Database passwords are changed ;)

       <?php
       /**
       * External Database auth plugin for phpBB3
       * Based on phpbb's ldap auth plugin.
       * Pedro Dias - [email][email protected][/email]
       * [url]http://pedrodiasgeekyblog.blogspot.com/2008/11/external-database-authentication-for.html[/url]
       */
    
       /*
       Credit goes to Pedro for posting the example on his blog. I made some changes to the script,
       since I was getting a connections error. The changes I made will help people who install
       phpbb3 into its own separate database.
       I can assist with some help pm acctman on phpbb3
       p.s. I am not Pedro, I'm just giving him credit for his work. I modified the script to make
       it work better.
       */
    
       /**
       * @ignore
       */
       if (!defined('IN_PHPBB'))
       {
       exit;
       }
    
       function login_extdb(&$username, &$password)
       {
       global $db, $config, $user;
    
       if (!$password)
       {
         return array(
          'status' => LOGIN_ERROR_PASSWORD,
          'error_msg' => 'NO_PASSWORD_SUPPLIED',
          'user_row' => array('user_id' => ANONYMOUS),
         );
       }
    
       if (!$username)
       {
         return array(
          'status' => LOGIN_ERROR_USERNAME,
          'error_msg' => 'LOGIN_ERROR_USERNAME',
          'user_row' => array('user_id' => ANONYMOUS),
         );
       }
    
       //// START HERE //// change where you see FILL IN
    
       /// This is the connection for my existing member database
       $dbhost1 = 'localhost';
       $dbuser1 = 'root'; //this is the mysql login for your existing member db
       $dbpass1 = 'DaTaBaSePaSsWoRd';
       $dbname1 = 'realmd';
    
       $conn = mysql_connect($dbhost1, $dbuser1, $dbpass1) or die ('Error connecting to mysql');
    
       mysql_select_db($dbname1);
    
       // We need to select the required fields, check you member table and write down the
       // following USERNAME, PASSWORD, EMAIL field names. Example my existing member fields are called
       // m_user, m_pass and m_email yours will be different. If you're lazy you can also do a SELECT *
       // I would replace with SELECT  m_user, m_pass, m_email
       // This is how my query looks:
       // $query  = "SELECT m_user,m_pass,m_email FROM rate_members WHERE m_user = '".$username."'";
    
       $query  = "SELECT username,sha_pass_hash,email FROM account WHERE username = '".$username."'";
       $result = mysql_query($query);
    
       $num_rows = mysql_num_rows($result);
    
       if($num_rows == 1){
         $row = mysql_fetch_array($result, MYSQL_ASSOC);
         $extuser = $row['username']; //user field from existing db member table
         $extpass = $row['sha_pass_hash']; //pass field from existing db member table
         $extmail = $row['email']; //email field from existing db member table
       }
    
       if ($num_rows == 1)
       {
         if (strcmp($extuser,$username) == 0 && strcmp($extpass,md5($password)) == 0)
         {
    
       /// This is the connection for phpBB3's database. The next 6 lines can be removed only if you've installed phpBB3 into you existing site db.
       /// I decided to keep things separate to make it easier to backup/restore.
       $dbhost = 'localhost';
       $dbuser = 'root'; // you can get the info from the config.php file in your forum root
       $dbpass = 'DaTaBaSePaSsWoRd';
       $dbname = 'forum';
    
    //// END HERE //// you do not have to change anything else for the script to work
       $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');     
       mysql_select_db($dbname);
    
          $sql ='SELECT user_id, username, user_password, user_passchg, user_email, user_type
                       FROM phpbb_users' . "
           WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
          $result = $db->sql_query($sql);
          $row = $db->sql_fetchrow($result);
          $db->sql_freeresult($result);
    
          if ($row)
          {
           if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
           {
            return array(
             'status'  => LOGIN_ERROR_ACTIVE,
             'error_msg'  => 'ACTIVE_ERROR',
             'user_row'  => $row,
            );
           }
    
           return array(
            'status'  => LOGIN_SUCCESS,
            'error_msg'  => false,
            'user_row'  => $row,
           );
          }
          else
          {
           $sql = 'SELECT group_id
            FROM ' . GROUPS_TABLE . "
            WHERE group_name = '" . $db->sql_escape('REGISTERED') . "'
             AND group_type = " . GROUP_SPECIAL;
           $result = $db->sql_query($sql);
           $row = $db->sql_fetchrow($result);
           $db->sql_freeresult($result);
    
           if (!$row)
           {
            trigger_error('NO_GROUP');
           }
    
           $extdb_user_row = array(
            'username'  => $username,
            'user_password' => phpbb_hash($password),
            'user_email' => $extmail,
            'group_id'  => (int) $row['group_id'],
            'user_type'  => USER_NORMAL,
            'user_ip'  => $user->ip,
           );
    
           return array(
            'status'  => LOGIN_SUCCESS_CREATE_PROFILE,
            'error_msg'  => false,
            'user_row'  => $extdb_user_row,
           );
          }
                }
         else
         {
          return array(
           'status'  => LOGIN_ERROR_PASSWORD,
           'error_msg'  => 'LOGIN_ERROR_PASSWORD',
           'user_row'  => array('user_id' => ANONYMOUS),
          );
         }
       }
    
       return array(
         'status' => LOGIN_ERROR_USERNAME,
         'error_msg' => 'LOGIN_ERROR_USERNAME',
         'user_row' => array('user_id' => ANONYMOUS),
       );
       }
    
       ?>
    

  3. How do you do that with custom profile fields?

    Please tell me more^^

    /edit:

    Some misc infos:

    I use PBWoW for my forums (http://wowcrackz.ath.cx/forum <- Demo) which makes phpbb3 to Blizzard Forums ;)

    Blizzard has the "Please log in with your World of Warcraft or Battle.net account" notice so game account = forums account.

    Would be nice if it can be, too. Forums account -> Game Account is a bit stupid, so lets change my question^^

    I wanna know how to add your Game Account to your phpbb3 forums?

  4. Hiho,

    I think my topic was deleted, so I write it into this thread (because it's the regacc thread) :)

    My problem is the Online Player List.

    My Server is allways "offline", but the server runs.

    I host with hamachi and use MaNGOS.

    I don't have to forward any ports, because Hamachi does all this ;)

    How can I get my Online Player List working?

    Would be nice, if you can help me :)

    Regards,

    Mythos

    PS: When would there be a WotLK Online Player Map, because there is only Azeroth with the Outland (TBC) and no Northrend :(

  5. Okay to my "Disconnect Problem":

    I've Upgraded my Server with the Core Files and the Scriptdev2ger Files.

    All done without an error.

    I started the Server and many errors were displayed.

    The errors sayed, that I haven't updated my database, but that's wrong, I used the newest revision of the PSDB database.

    If I want to connect to the realm, I will be kicked, and in the Console is an error with my account.

    Something is missing, I think it was "tbc", but in the database its "expansion".

    I'll write some errors in this topic, when I try it again ;)

    _______

    Mythos

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use