As the topic says, I am trying to integrate a standalone phpBB installation with phpnuke. I don't wanna use bbtonuke since it no more has any mods being ported for it.
Ok so now, all I need to integrate is the logging in system.
My nuke is patched and nuke sentinel protected...so that produces some changes in index.php of Your_Account.
I want my nuke to pick up data from phpbb_users. So I tried changing the table from which data is picked from nuke_users to phpbb_users (both are same in their structure). But it just doesn't work.
I succeeded in making non-patched Your_Account to atleast log in, but in that case there was some problem with sessions/cookie with no modules recognizing me as logged in
Joined: Aug 30, 2005 Posts: 2178 Location: near Albany NY
Posted:
Sun Nov 18, 2007 7:42 am
My initial reaction is that, if you can make this work, we will be asking you for HELP rather than the other way around. I have never looked at a standalone PHPBB system but it is hard for me to understand how their users table could be identical to the Nuke users table. If I am not mistaken, when they did bbtonuke they took the PHPBB user fields and incorporated them into the Nuke user table, so the Nuke user table would be a superset. Correct me if I'm wrong about that. Much of the Nuke code expects a certain set of fields, in a certain order, in the users table and modifying that would be pretty difficult.
Only registered users can see links on this board! Get registered or login to the forums!
I tried it quickly, well some parts are working some are not. Logging in from phpbb isn't working (I think its because of patches and maybe nuke sentinel, I don't remember exactly what they did to Your_Account, but they did change some things). What is working however is signing in from phpnuke (Your_Account) and then entering phpbb through cookies.
Ok checked it in detail.
Basically two things aren't working.
1. Logging in using quick login box in phpbb (logging in through proper login page in phpbb works)
2. Logging in as admin in phpbb. It as usual asks me for re-authentication but then comes to "Illegal Operation"
Now I am going to cry!...I have been trying to get this thing to work for days now. Initially don't know why I thought I could make vbulletin integrate with phpnuke, got login to work but nothing else
Then it comes to this
-----------------------EDIT-----------------------
Ok some progress, I was stupid enough not to check index_body.tpl for coressponding changes. So there's only one thing that isn't working:
- Admin sign in in phpbb.
Joined: Aug 27, 2002 Posts: 15204 Location: Kansas
Posted:
Sun Nov 18, 2007 1:05 pm
khizerk wrote:
I don't wanna use bbtonuke since it no more has any mods being ported for it.
I believe that
Only registered users can see links on this board! Get registered or login to the forums!
is still developing them. But, I have found that almost all of the phpbb mods work in nuke with very little, if any, changes. Obviously the more complicated ones will be more complicated in nuke but that would just stand to reason.
Last edited by Raven on Sun Nov 18, 2007 1:10 pm; edited 1 time in total
Yeah I agree with relation to easier mods, basically what forced me to change my mind was that I had been waiting and waiting for attachment mod 2.4.5 to be ported for bbtonuke 2.0.22. I think it must have been around 3-4 months now. Floppy at clan-themes told me initially that his friend was working on it. Then he said that it has been ported but with bugs. Then there was no reply and I don't really wan't to bother him again and again.
Actually phpbb standalone is working pretty well, just need to get over this admin problem.
I've successfully integrated standalone phpbb with phpnuke now!
Finally I can use all phpbb mods (with just an addition of a variable when it comes to session management in them)
Joined: Aug 27, 2002 Posts: 15204 Location: Kansas
Posted:
Tue Nov 20, 2007 8:05 am
I would be very interested to have a write-up on how you did the integration as opposed to the way it was done way back when Is it something that you would be willing to share?
I did this with bbtonuke running, so I needed all my data from there too, so there were some additional tweaks needed in the database than otherwise would be needed with a fresh forums install.
1. Rename all nuke_bb tables to nukebb_
2. Rename nuke_users to nukebb_users. Rename nuke_users_temp to nukebb_users_temp
3. Run this file after uploading it to the root of your server (to change join date to UNIXTIME):
Code:
<?php
require_once("mainfile.php");
global $user_prefix,$db;
4. Install a phpBB2 installation in your server root (make sure you install it as a folder named phpBB2, unless you are planning to edit some of the edits need later on). I applied major mods like attachment mod before doing any further modification, but looking at what modification it needs, I am sure it can be applied afterwards too. I used EasyMod to apply the mods, and it worked like a charm
5. Edit config.php of nuke, set $user_prefix = "nukebb";
6. Edit nukebb_users:
- Change the user_id field from int(11) to mediumint( and remove the autoincrement property.
- Change the Anonymous user to have a user_id of -1. (If there's no anonymous user added you will need to add one, since phpBB can't function properly without it)
7. Delete nukebb_config and rename phpbb_config to nukebb_config (I did this just incase there was any differences between bbtonuke config table and phpbb_config table, I am a lazy brat so I avoided comparing )
- Now here, if you had applied mods to phpbb installation already, you would need to run all the sql queries that come with the mods again. Just change the table names in those sql queries from phpbb_xxxx to nukebb_xxx and remove any edits needed to phpbb_config, since they are already incorporated)
8. Now comes the part to do some edits. Obviously the edits might be different depending on your phpnuke, but I am using sentinel protected, patched nuke and it matched almost perfectly, any differences being in in this part: ($redirect == "" ))
Code:
#-----[ OPEN ]-----------------------------------
#
modules/Your_Account/index.php
#
#-----[ FIND - THERE ARE 2 INSTANCES OF THIS]----
#
$sql = "SELECT * FROM ".$prefix."_bbconfig";
$result = $db->sql_query($sql);
#
#-----[ REPLACE BOTH INSTANCES WITH ]------------
#
$sql = "SELECT * FROM ".$prefix."bb_config";
$result = $db->sql_query($sql);
#
#-----[ FIND ]-----------------------------------
#
$db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE time < $past");
$sql = "SELECT * FROM ".$user_prefix."_users_temp WHERE username='$username' AND check_num='$check_num'";
$result = $db->sql_query($sql);
#
#-----[ AFTER, ADD ]-----------------------------------
#
$uid_result = $db->sql_query("SELECT MAX(user_id) AS total FROM ".$user_prefix."_users");
$uid_row = $db->sql_fetchrow($uid_result);
$user_id = $uid_row['total'] + 1;
#
#-----[ FIND ]-----------------------------------
#
$row3 = $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount from $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'"));
$userCount = $row3['userCount'];
$row4 = $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'"));
$userCount2 = $row4['userCount'];
#
#-----[ REPLACE WITH ]-----------------------------------
#
$sql = "SELECT COUNT(user_id) AS userCount from $user_prefix"._users." WHERE FROM_UNIXTIME(user_regdate,'%b %e %Y') LIKE '$curDate2'";
$result = $db->sql_query($sql);
$row3 = $db->sql_fetchrow($result);
$userCount = $row[userCount];
$sql = "SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE FROM_UNIXTIME(user_regdate,'%b %e %Y') LIKE '$curDateP'";
$result = $db->sql_query($sql);
$row4 = $db->sql_fetchrow($result);
$userCount2 = $row[userCount];
#
#-----[ SAVE & CLOSE ]-----------------------------------
#
/admin.php
9. These are the changes required in phpBB 2.0.22. As you will see most of them deal with login and logout functions which affect any mods
Code:
#-----[ OPEN ]-----------------------------------
#
phpBB2/admin/pagestart.php
#
#-----[ OPEN ]-----------------------------------
#
phpBB2/templates/subSilver/login_body.tpl
#
#-----[ FIND SIMILAR ]---------------------------
#
<form action="{S_LOGIN_ACTION}" method="post">
#
#-----[ CONFIRM ]-----------------------------------
#
You MUST confirm that there is no "target="_top"" statement in this form tag. If there is, you MUST remove it.
#
#-----[ CONFIRM ]-----------------------------------
#
You MUST confirm that the name of the "password" variable is "user_password". If it is no "user_password", you MUST change it to "user_password".
#
#-----[ SAVE & CLOSE]-----------------------------------
#
All Files
10. Now edit phpbb config.php file. Change prefix from phpbb_ to nuke_bb
11. After applying this all, you will need to edit your index_body.tpl if your forum's theme provides quick login from the main index page. You'll need to:
#
#-----[ CONFIRM ]-----------------------------------
#
You MUST confirm that the name of the "password" variable is "user_password". If it is no "user_password", you MUST change it to "user_password".
12. You might want to edit overall_header.tpl to replicate your phpnuke's header. For me it was fairly simple. I copied the html table from header.html (from my phpnuke theme) and paste it under the table in overall_header.tpl and updated the links to the .swf files)
13. After applying this mod, I wasn't able to login into the admin section of my forums, since phpBB asks for login again in that case. To avoid that:
This removes the requirement for second login. I intend to create my own little login page just to secure it a bit more
Ok, the edits are complete. Time for some notes:
1. If you haven't applied any mods and will apply them later, remember to change table names in the sql queries of the mods from phpbb_xxxx to nukebb_xxx)
2. In any mods that use session management in their files (for example download.php of attachment mod), you will need to:
I am a noob as php as you can see, without any formal knowledge of the language. So, I am not a great tutor either . I hope I haven't missed out anything...if someone wants I would be happy to upload my copy of the edited phpbb2
Joined: Aug 27, 2002 Posts: 15204 Location: Kansas
Posted:
Tue Nov 20, 2007 10:33 am
Thank you for sharing this. I am making this a Sticky. If you or anyone else enhances it or fixes something later on please be sure to post it back here.
Joined: Aug 30, 2005 Posts: 2178 Location: near Albany NY
Posted:
Tue Nov 20, 2007 6:28 pm
Wow. That is very impressive. Could we go back to the beginning a bit though in terms of objectives?
I take it you are trying to run a Nuke based system alongside a PHPBB system but have shared users? And you want to use the PHPBB users facilities rather than Nuke's?
If so, would you be using the PHPBB version of Your Account/Administration or Nuke's version? If a new user registers where would he/she be going? Would he be simulating the way a new user would register with PHPBB in standalone mode or would be he going thru Nuke Your Account? Likewise would a Nuke administrator be using PHPBB facilities or versions of Your Account?
This is very interesting. Especially reading the PHPBB3 glossies about where they are going, they seem to have all kind of users AND GROUPS facilities. If we could use these within Nuke and not have to reinvent it, it would be cool.