How to use the phpBB auth. management for an entire website?

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
-öx-
Registered User
Posts: 5
Joined: Tue Apr 04, 2006 11:43 pm

How to use the phpBB auth. management for an entire website?

Post by -öx- »

I'm actually developing a website that will contain a phpBB board.
As there seems to be a beta in the next days (is that right?), I want to wait for it.

The new authentification/permission management of phpBB seems to be pretty good and it shouldn't be a big problem to use it for my entire site.
My site consists mainly of one index page that changes according to the variables given by post/get. What I want to say, there's one page that manages the hole website (according to sid, pid, ...) so the authentification check should be at the beginning of this page that the cms can decide which content or if any content may be shown. How do I want to do this? There’ll be a sql-table with the user names and their rights.
On loading the index page, it should check if somebody is logged in, who it is and check the rights according to the sql-table.

I think this shouldn’t be a big deal, and I guess the developers planned scenarios like that one modelling phpBB3.
Now, finally my question: Is there any kind of documentation how to do this? Or at least any kind of documentation how the authentification/permission management works?

If not, could any of the developers give me a short summary? It would be great to embed this to the new site, even if phpBB3 isn’t in beta yet – I guess the authentification thing won’t change a lot any more.

Thanks very much for your help!

User avatar
nuclear_eclipse
Registered User
Posts: 36
Joined: Mon Apr 24, 2006 8:41 pm
Location: Rochester, NY
Contact:

Re: How to use the phpBB auth. management for an entire webs

Post by nuclear_eclipse »

^ Read the rules ^

No support during development. Wait until a final release is made, then check back.

-öx-
Registered User
Posts: 5
Joined: Tue Apr 04, 2006 11:43 pm

Re: How to use the phpBB auth. management for an entire webs

Post by -öx- »

That's true!
But as this is something I (and probably some other webmasters) could do in advance - even before the beta is released - it would be great if somebody would have a little hint. :)

User avatar
SHS`
Registered User
Posts: 1628
Joined: Wed Jul 04, 2001 9:13 am
Location: The Boonies, Hong Kong
Contact:

Re: How to use the phpBB auth. management for an entire webs

Post by SHS` »

-öx- wrote: That's true!
But as this is something I (and probably some other webmasters) could do in advance - even before the beta is released - it would be great if somebody would have a little hint. :)
You either have to work it out for yourself, or wait until packaged later releases (probably RC, maybe gold) for documentation on APIs etc.
Jonathan “SHS`” Stanley • 史德信
phpBB™ 3.1.x, Bug/Security trackers
phpBB™ Bertie Bear 3.0 — prosilver Edition!Asking Questions The Smart Way

User avatar
stubbers
Registered User
Posts: 406
Joined: Sat Oct 23, 2004 10:36 pm
Location: LoSt
Contact:

Re: How to use the phpBB auth. management for an entire website?

Post by stubbers »

I just have a question, as long as we don't ask the dev's for their assistance is there anything wrong with discussing this here? I'd like to discuss it too. Of course if you think it breaches the forum rules or is innapropriate that's fine, it just seems like the place to have this discussion.

User avatar
stubbers
Registered User
Posts: 406
Joined: Sat Oct 23, 2004 10:36 pm
Location: LoSt
Contact:

Re: How to use the phpBB auth. management for an entire website?

Post by stubbers »

Unfortunatley there isn't any documentation created. You'd have to make that yourself (it would make you very popular). I doubt the dev's will help you with this at the moment but that's fine. It shouldn't be too hard and in fact if you do it correctly you should be able to sue the phpBB authentication modules to do this, phpBB3 seems even more split into the modules than in the past so it shouldn't be too hard to use one of those to create a log in for your site and indeed probably manage all the content.

I'd be having a look at this once I got phpBB 3.0 beta 1 installed (which I will be doing as soon as it comes out).

Cheers,
Stubbers

APTX
Registered User
Posts: 680
Joined: Thu Apr 24, 2003 12:07 pm

Re: How to use the phpBB auth. management for an entire website?

Post by APTX »

How popular would I get if I'd point to a file named auth_api.html which is available in the snapshots for a very long time now?
Don't give me my freedom out of pity!

-öx-
Registered User
Posts: 5
Joined: Tue Apr 04, 2006 11:43 pm

Re: How to use the phpBB auth. management for an entire webs

Post by -öx- »

Thanks stubbers for your 'assistance'! I'll try to get into it and let you guys now how it worked out.
And thanks to APTX, I probably wouldn't have found that file :) I guess it'll help a lot and is in fact exactly what I was asking for!

Alrighty... You'll here from me, when it's done!

Twillingate.info
Registered User
Posts: 120
Joined: Thu Mar 30, 2006 9:30 pm

Re: How to use the phpBB auth. management for an entire webs

Post by Twillingate.info »

-öx- wrote: I'm actually developing a website that will contain a phpBB board.
As there seems to be a beta in the next days (is that right?), I want to wait for it.
There's no release date for the beta yet...
Administrator of The Fun Bucket

Yoda_IRC
Registered User
Posts: 158
Joined: Tue Mar 01, 2005 10:19 pm

Re: How to use the phpBB auth. management for an entire webs

Post by Yoda_IRC »

the auth.php looks like its kind of unfinshed. Doesn't really specify what it means when it says a hash of user data (lists the fields but not what the hash is ment to be or do). The source code for the auth module might be a good place to look, but it does contain a worrying comment:

Code: Select all

/**
	* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
	* @todo replace this with a new system
	*/
the login function seems to read a function name from the config to auth the user, it returns an object, and if a certian field returns a certian value it setsup a session. Also includes a file containing the methods name, persumably that would be a good place to add an authentication function.

Looks like it might be possible to have phpBB log a user in using any arbitary system that returns a value, not sure how it would handle a user not having got all the registration fields phpBB has.

Not got a clue how to actually perform a login, however its got to be in these php files somewhere, phpBB can log a user in so all I have to do is find the bit that does it. Yay for Open Source!

(note: I am not asking for help in how to do anything, it will do me good to poke around in the source code to find out how things work).

Though the previous comment suggests it MAY change, if the todo is right that is.

Post Reply