+ Reply to Thread
Results 1 to 5 of 5

Thread: I Need PHPBB Help!

  1. #1
    dquigley's Avatar
    dquigley is offline x10 Sophmore dquigley is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    Fresno, CA
    Posts
    249

    Question I Need PHPBB Help!

    Hello,

    Currently someone has helped me tweak my site so that when someone creates an account on my site the account is also created on the forum, so they are basically linked, here is the code how he did that.

    PHP Code:
            // phpBB register part
            // Retrieve default group ID
            
    $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');
            }
            
    $group_id $row['group_id'];
            
     
            
    $data = array(
                    
    'username'                      => utf8_normalize_nfc(request_var('loginid'''true)),
                    
    'user_password'                 => phpbb_hash(request_var('password'''true)),
                    
    'user_email'                    => strtolower(request_var('email''')),
                    
    'group_id'                      => (int) $group_id,
                    
    'user_type'                     => USER_NORMAL,
                    
    'user_ip'                       => $user->ip,
            );
            
            
    $user_id user_add($data);
            
    // phpBB register part end
            // phpBB login part
            
    if(login_user($loginid$password)) {
                
    $username request_var('loginid'''true);
                
    $password request_var('password'''true);
                
    $autologin false;
                
    $result $auth->login($username$password$autologin);
                
    // Hope for the best
            
    }
            
    // phpBB login part end 
    Now my only problem with that is that when you create a account on my site it is "inactive" once you pay it is activated and then you are given access to all the features.

    So what I would like to do is change the above code so that new forum accounts are also "inactive" I know there is a way to manually deactivate forum accounts in the admin panel so I am guessing there is coding to do this.

    Then, I would also like the coding to "activate" the forum account, that way once they pay I can have the account automatically activated. Thank you for your help.

    Also on the site members can change there password, the problem with that is if a member changes there password on the site it will not correctly log them into the forums anymore.

    I would like to change the coding so that if the password on the site is changed then the password to there forum account is changed as well thank you.
    Last edited by dquigley; 02-01-2009 at 02:36 PM.


  2. #2
    dquigley's Avatar
    dquigley is offline x10 Sophmore dquigley is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    Fresno, CA
    Posts
    249

    Re: I Need PHPBB Help!

    151views and no responses? Is this a hard problem to solve or is it that it is a pain in the butt and no one wants to do it.


  3. #3
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: I Need PHPBB Help!

    I could do it, by I just need to think about it.

    PHPBB's website is down, so you might need to way a bit (I need to get the documentation)
    Last edited by xav0989; 02-07-2009 at 10:03 AM.
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  4. #4
    dquigley's Avatar
    dquigley is offline x10 Sophmore dquigley is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    Fresno, CA
    Posts
    249

    Re: I Need PHPBB Help!

    Well I had my friend Dead Battery help me a bit and we found a way to do it, What I have done is simply removed all rights for normal registered forum users, and created a new group called paying users, so once they pay on my site I just need the coding to switch them to that other group so they can access the forum.

    Hope that explanation was helpful, here is some of the coding stuff I think may help

    group_user_add (line 2607)

    Add user(s) to group

    * return: false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'

    mixed group_user_add ( $group_id, [ $user_id_ary = false], [ $username_ary = false], [ $group_name = false], [ $default = false], [ $leader = 0], [ $pending = 0], [ $group_attributes = false])

    * $group_id
    * $user_id_ary
    * $username_ary
    * $group_name
    * $default
    * $leader
    * $pending
    * $group_attributes
    group_user_del (line 270

    Remove a user/s from a given group. When we remove users we update their default group_id. We do this by examining which "special" groups they belong to. The selection is made based on a reasonable priority system

    * return: if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'

    false group_user_del ( $group_id, [ $user_id_ary = false], [ $username_ary = false], [ $group_name = false])

    * $group_id
    * $user_id_ary
    * $username_ary
    * $group_name
    and the site where we found that coding is

    http://area51.phpbb.com/docs/code/ph..._user.php.html


  5. #5
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: I Need PHPBB Help!

    it is, in fact, a good way to monitor and class your users
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

+ Reply to Thread

Similar Threads

  1. Mail() and phpBB
    By prppedro in forum Free Hosting
    Replies: 6
    Last Post: 12-18-2008, 06:47 PM
  2. PHPBB admin login
    By beisan-net in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 05-03-2008, 06:27 AM
  3. phpBB Installtion and Mod Installation
    By sk1tL1L in forum The Marketplace
    Replies: 5
    Last Post: 12-15-2007, 06:48 PM
  4. phpBB3 Gold Released
    By CrownVictoriaCop in forum Computers & Technology
    Replies: 2
    Last Post: 12-13-2007, 04:05 PM
  5. phpBB 2.0.17 released
    By n4tec in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 07-26-2005, 07:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers