Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Integrating phpBB3 login on your sites
Closed Thread
Old 08-04-2008, 10:54 PM   #1 (permalink)
Osiris's Avatar
 

Join Date: Jan 2005

Location: Kentucky

Posts: 32,076

Osiris is a jewel in the roughOsiris is a jewel in the roughOsiris is a jewel in the rough

Send a message via ICQ to Osiris Send a message via AIM to Osiris Send a message via MSN to Osiris Send a message via Yahoo to Osiris Send a message via Skype™ to Osiris
Default Integrating phpBB3 login on your sites

Integrating phpBB3 login on your sites

Have you ever wanted to allow your users to sign into their phpBB 3 accounts from your homepage? In this tutorial, I'm going to show you how!
All you need is:
  1. A web host with PHP and MySQL.
  2. An installed copy of phpBB 3.
  3. A website to integrate it with.
Hit more to see the rest of the tutorial
Integrating phpBB 3's login is actually very simple. All it involves is pasting (and editing where necessary) a single piece of code, and here it is:
<form method="post" action="http://www.PATHTOYOURFORUMS/ucp.php?mode=login">
<p><input name="username" type="text" id="username" /></p>
<p><input name="password" type="password" id="password" /></p>
<p><input name="redirect" value="where/to/go/after/login" type="hidden">
<input name="login" class="mainoption" value="Log in" type="submit"></p>
</form>
Place this code (or similar code to suit your needs) into your templates login area. The most important parts of this code, and the bits it cannot function without are:
<form method="post" action="http://www.PATHTOYOURFORUMS/ucp.php?mode=login">
Without this piece of code, the form doesn't know where to send the details to; and without the details being sent to the right place, the login won't get processed. Make sure you change "http://www.PATHTOYOURFORUMS/" to your forums domain and folder (EG "www.dailytip.net/forum/"). Also, each input tag needs to keep its name no matter what. Without the names being as they are, phpBB 3 cannot get hold of the details the user has submitted.
The final piece of important code tells the script where to send users who have successfully logged in.
<input name="redirect" value="where/to/go/after/login" type="hidden">
Change the value to the place you want users to be sent; for example "./forums/" or "index.php".
__________________
Osiris is online now  
Old 08-05-2008, 05:24 PM   #2 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,683

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: Integrating phpBB3 login on your sites

This doesn't integrate anything. It just adds a login box linked to the forums login. After logging in, you'll still have the option of logging in on the home page.. because no cookies or sessions are shared.

To truly integrate it, you have to break down PHPBB's login/session system and write code to share it, so if you login on the homepage it logs you into the forums, and vise versa.
__________________

Need website help? PM me!
CrazeD is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Login Program: 99 CPU Surukei Windows Operating Systems and Software 4 03-01-2008 03:03 PM
Windows PC won't allow login tonyisnt Windows Operating Systems and Software 4 12-21-2007 01:33 PM
A little bit about MPLS Tierzero Articles 0 09-13-2007 03:04 PM
Phishing Tool Builds Sites in Seconds Osiris Virus - Spyware Protection / Detection 0 07-11-2007 01:09 PM
help with allowing sites on netgear router hazza Computer Networking & Internet Access 2 05-14-2007 11:03 PM