|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Integrating ColdFusion with phpBB?
Has anyone here attempted any degree of integration between phpBB and ColdFusion?
I have phpBB installed, and I'd like (CF) apps on the same server, that I'd like to share the phpBB login with. So basically I need CF to recognize whether or not the user is logged in, and what their username (or ID) is. Any thoughts on where to start? Any thoughts on whether or not CF can do anything with these, or where to begin my quest? Thanks. |
|
#2
|
|||
|
|||
|
|
|
#3
|
|||
|
|||
|
What did you do? I'm curious. One approach might be to use web services.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#4
|
|||
|
|||
|
I can't take credit for it. I got the answer from someone on a CF forum.
The cookie: phpbb2mysql_sid contains the session ID. So to get the login status and display a username, you'd do something like: Code:
<cfquery datasource="dsn" name="getsession"> SELECT * FROM prefix_sessions, prefix_users WHERE (session_id = '#cookie.phpbb2mysql_sid#') and (sesionduserid = userid) </cfquery> <cfif getsession.recordcount lt 1> You must Login to Procede <cfabort> <cfelse> <cfset getsession.username = session.username> <cfset getsession.userid = session.userid> </cfif> The only problem is that if someone uses auto-login on the forum, they'll have to visit a forum page first to enable that session variable. I'm thinking of trying to incorporate a small iFrame to the "home" page that loads the smallest forum page I can find. Disclaimer: I haven't tried ANY of this yet, but I can't see why it wouldn't work. *fingers crossed* |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Integrating ColdFusion with phpBB? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|