This content has been marked as final. Show 4 replies
Any reason you want to go with a PHP based forum? Ever consider a CF based
phpBB is just waaaaaaaaaaaaaay better than the CF forums I've seen around on the web, in terms of functionality, esthetics, and add-on capability (MODS). Sorry about all the a's. I'm getting there, I'll post the walk-thru when done.
If anyone's interested, I figured out a way to log into both my cfm site and my phpbb forum, seemlessly.
Joint registration was easy. Just post the required fields into the required tables.
regdate must be unix, and password must be hash (md5).
For log in I used two functions... one for cfm login & the other for phpbb login.
Using the first function to simply log into my cfm site, I stored both the phpbb username and password in session scope. This infomation I used for the second function.
<cffunction name="inphpbb" access="public" returntype="string">
<cfargument name="username" type="string" required="yes">
<cfargument name="password" type="string" required="yes">
<cfif not isdefined('session.login')>
<cflocation url="#application.homepage#" addtoken="no">
<html xmlns=" http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<form name="phpbblogin" action=" http://www.yoursite.com/phpbb/login.php" method="post">
<input name="username" type="hidden" value="#arguments.username#" />
<input name="password" type="hidden" value="#arguments.password#" />
<input name="autologin" type="hidden" value="1" />
<input type="hidden" name="redirect" value=" http://www.yoursite.com/alldone.cfm">
<input name="login" type="hidden" value="Log in" />
One small edit must be made to your login.php.
Approx line 104, Comment redirect(append_sid($url, true));
In it's place type, header("location: ".$HTTP_POST_VARS['redirect']); exit();
This was a lot quickly. So if any questions, I'll be checking back periodically. Thanks to all whom helped me with aspects of this code (Mike, Dan).
No I need to figure out how to sign out both, should be easier.