1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Hacking up PHPBB

Discussion in 'PHP' started by Christian Little, Sep 25, 2008.

  1. #1
    Supposedly this is possible, but I'm not sure where to get started on this. A new site I'm building is going to use PHPBB, but I want the user accounts to be created/stored differently than the standard PHPBB way.

    Basically the site is going to let people register on it's own registration page to unlock various features, but I want them to be able to post on the forums with the same account.

    Does anybody have some guidelines on how to make PHPBB use a different user table than the standard one?
     
    Christian Little, Sep 25, 2008 IP
  2. Warden

    Warden Peon

    Messages:
    22
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ok I can basically think of two ways to do that. It will seem obvious because it is :eek: .

    Since PHPBB was not developed to accept a different table than it's own, it doesn't have a default option for that. However, I don't think it's too hard to modify it to do so, but for that you would have to manually modify the .php source files. To be honest I don't think it would be too difficult, but you must keep in mind the way PHPBB was developed and its features, so your new table can facilitate all that the original table could.

    I have seen this implemented at varios websites, the second way is to actually use the original PHPBB table for the website. So basically doing things the other way around. Instead of optimising PHPBB for a new table, optimise the website for the PHPBB table. I personally recommend this method if you are building the website from scratch, since it wouldn't be too hard to use the already existing table. Keep in mind you could also add different columns to the table without changing PHPBB's behaviour, so additional functionality could be added to the already existing table. However, it might prove harder if the website is already developed.

    If you have any other questions please post them here.
     
    Warden, Sep 25, 2008 IP
    Christian Little likes this.
  3. Christian Little

    Christian Little Peon

    Messages:
    1,753
    Likes Received:
    80
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hmm...the second option is probably best. If I create a web form that use the same elements as the registration form for the forum software, do you think phpbb will process it as a new user?
     
    Christian Little, Sep 25, 2008 IP
  4. Warden

    Warden Peon

    Messages:
    22
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes. PHPBB cannot track how the data gets into the database. As long as it's there and it's valid (example: the password must be md5 encrypted), PHPBB can recognize and use it. You could be manually inserting a user in the database using something like phpMyAdmin or standard SQL commands. You could also create a form that only requires a username and e-mail, as long as the script also fills in the other information automatically (like generating a password automatically) and sends it to the database, PHPBB will read it as if it was entered through its original registration form.

    So it only matters that the data is there, not how it got there.
     
    Warden, Sep 25, 2008 IP
  5. Christian Little

    Christian Little Peon

    Messages:
    1,753
    Likes Received:
    80
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Beautiful thanks :) That helps alot :) +rep to you!
     
    Christian Little, Sep 25, 2008 IP