phpbb - Using USER table and cookie info elsewhere on a site

I need to be able to some stuff on my site which will require the use of the user data held on the site’s forums (phpbb).

Basically the site (EpicDiscs) allows visitors to post reviews of online retailers they’ve shopped from and on hifi kit etc. At present you do not need a user account to do this. You simply fill in a form with name etc.

I want to redo the site so that only people with forum accounts can perform reviews.

Essentially what I want is as follows:

user comes to a page which displays a form to submit a review. Instead of the ‘name’ and ‘email’ fields I want the form to display their forum username if they are logged in. Rather than writing text into the review table I’ll modify the form to record the user’s forum id.

If the user is not logged in I want the form to display 2 buttons, login and register. On clicking the login button they will be shown a basic login form but one displayed within the main site’s template, not the forum’s. On completion they will be logged in and returned to the review submission form they were looking at before clicking login.

If they click register then again a form displayed within the main site template (rather than the forum template) will be displayed. This will obviously have to have exactly the same fields etc. as the forum reg form. On completion this form should again return the user to the review forum they were originally looking at.

Both the main site and the forums new user reg forms will also be updated to include a message to say that the account they are setting up can be used as part of the main site and the forum.

The idea is to keep things as integrated and seemless as possible.

the easy part is now done, any page which requires a user be logged in can now detect if they are or not and display the relevant form or login prompt.

You’d think it should be easy really, name the id and password fields the same as those in the phpbb login form, link my new form to that script and pass it a url to return to incase or error and for completed login but I can’t get the bloody thing working :frowning:

Anyone who’s played with phpbb know how to write a script to login and one to register which doesn’t involve any of the existing phpbb scripts and can be located and run from elsewhere on a site? The actual forms are obviously easy enough to put together, even for me :stuck_out_tongue:

don’t know if this is any help? or anything you can glean out
of the code?

http://www.phpbb.com/phpBB/viewtopic.php?t=27469

Originally posted by PMM
[B]don’t know if this is any help? or anything you can glean out
of the code?

http://www.phpbb.com/phpBB/viewtopic.php?t=27469 [/B]

cheers, off to do some reading :reading: