fsuk
Offline
Posts: 127
|
 |
« on: June 30, 2008, 03:39:47 PM » |
|
UPDATE 16/07/08 :
BOTH versions 2.6 and 2.7 are atttched to this post. Fixed no wb groups in backend-------------------------------------------------------------------------------------- This mod allows users of a phpbb forum to use their phpbb user name and password to login to website baker. With this phpbb is the primary software. All the wb user preferences and controls are redundent. If the user makes changes in wb they will be overwriten next time they login. (i plan to remove the preferences menu link). THIS WILL ONLY WORK IF PHPBB3 AND WB ARE INSTALLED ON THE SAME DATABASE AND MAKE A BACKUP OF EVERYTHING IF YOU TRY THIS. 2.6 ONLY: All that needs to be done is for the class.login.php (see attatched) to be uploaded to replace the one in the frameworks folder.
Then you must edit the file replacing all instaces of phpbb3_users with the name of your phpbb users table. You will also need to change the group_id switch in the authenticate function to reflect your own user groups and preferences. 2.7 ONLYBETA New Features: wb backend via Admin Tools Converts phpbb groups to wb groups Multiple Group Support Administer group conversion via wb backend Administrators of phpbb board automaticly get assigned to WB admin group cannot be overwritten.Extract the zip folder then install phpbbINT CONTAINED IN wb2.7 phpbb3.zip unless SQL is less then ver 4.1 using the WB backend Module Installer Add define('PHPBB_PREFIX', 'phpbb_'); to the config.php file Upload the reamaining files replacing the existing ones. See readme and install for details. NOTE: If a user trys to login before their group is set to Auto Active then the user name will remain disabled until it is enable from the Access menu, even after the group is set to Auto ActiveNOTE: If you are using an SQL version previous to 4.1 then you need to use the phpbbINT.zip file attatched instead of the one in the main zip
NOTE: WB user accounts created in WB will no longer function due to a change of encryption. Existing users in WB will be overwriten by users of the same name in PHPBB.
NOTE: There is no sure method of uninstall/unintegration
For more info please see this post first: http://www.websitebaker2.org/forum/index.php/topic,10222.msg75798.html#msg75798------------------------------------------------------------------------- I finaly did it, nearly a weeks work spending all my time learning the in's and outs of wb and phpbb. How have i done this? Well firstly i've copied a few functions from phpbb3 specifically phpbb_check_hash _hash_encode64 _hash_crypt_private When a user trys to login to wb a query copies the data for the phpbb user table to the appropriote fields in the wb user table in the authenticate function Now phpbb uses its own form of encryption which is why i've had to copy some funcitons. Then it uses the phpbb_check_hash function to check the password in the authenticate function as opposed to using the wb authenthicaiton. What do you think?
|
|
|
|
« Last Edit: January 17, 2009, 11:35:18 PM by fsuk »
|
Logged
|
You say deviant like its a bad thing...
|
|
|
fahad4x4
Offline
Posts: 16
|
 |
« Reply #1 on: July 02, 2008, 01:31:47 AM » |
|
hi
Congratulations .. Phpbb forums really deserve to have Tires
|
|
|
|
|
Logged
|
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #2 on: July 02, 2008, 12:39:02 PM » |
|
Tires?  Errr anyway i've added two files to remove the preferences from the wb backend and done a write up for installing it. FILES CAN BE FOUND ON FIRST POST
|
|
|
|
« Last Edit: July 11, 2008, 02:18:07 PM by fsuk »
|
Logged
|
You say deviant like its a bad thing...
|
|
|
mahalleday
Offline
Posts: 188
|
 |
« Reply #3 on: July 09, 2008, 05:19:37 PM » |
|
I just gave this s try and it appears to work just fine. One thign though, sinc eI have integrated phpBB I no longer have admin rights on the WB backend. I can't veiw, change or added pages on anything. This is a concern for sure. is there a way to link the two and leave on admin on the wb alone? If so this would be great.
|
|
|
|
|
Logged
|
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #4 on: July 09, 2008, 05:27:01 PM » |
|
If you look in the documentation for the bit about converting groups that should help.
The user groups in phpbb and wb are different. Typicaly in wb admin is group_id = 1, in my case in phpbb amin had the group_id = 11.
You will need to find out what group_id admins have in phpbb (remeber this only works with your default group as of yet i haven't added multi group functionality as found in wb 2.7)
The easiest way to do this is in the legend or list of groups somewhere in phpbb hover over the link to Administators and look at the last number. Replace the number in red bellow with that number. Or you could read the group_id from the db.
Open framework/class.login.php
At Line 204: switch ($group_id){ case 11: //admin $group_id = 1; $active = 1; break; case 10: //user group a $group_id = 2; $active = 1; break; case 14: //user group b $group_id = 4; $active = 1; break; default: //not permited user groups details will be copied but user will be disabled $group_id = 0; $active = 0; break; }
If this dosn't work look in the db and find out what your phpbb user name's default group id is.
|
|
|
|
|
Logged
|
You say deviant like its a bad thing...
|
|
|
mahalleday
Offline
Posts: 188
|
 |
« Reply #5 on: July 09, 2008, 09:10:35 PM » |
|
Thanks for the speedy reply.
I have matched the group_id's as shown in the docs. but i still gets this prblem. I see that the newest version of your files removes the preferences link on the wb front end, that makes sense as this will allow users to aonly edit info in one place (phpbb). I just dont understand why it admin side is cut out from wb when I make and the changes as instruced i your docs.
I'll post the code tonight for you to have a look at. How hard would it be to simply have wb use the phpbb user table and simply get rid of the wb table ie. only use phpbb_users. I would think that this would solve the problem.
I'm not too bad with php so I could give this a shot. My thoughts would be a module tha you install which would re-write this necessary files to make this happen. That way if something was ever upgraded you could uninstall the mod upgrade then re-install it to get your funcality back. If that makes sense.
|
|
|
|
|
Logged
|
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #6 on: July 09, 2008, 10:12:14 PM » |
|
Originaly i looked into comibing the tables but its too much work as many of the fields are the same but are used differntly and it would mean changing a lot of variables. When you post your code could you also include a copy of the php group table.
|
|
|
|
|
Logged
|
You say deviant like its a bad thing...
|
|
|
mahalleday
Offline
Posts: 188
|
 |
« Reply #7 on: July 10, 2008, 03:11:02 AM » |
|
Here is the code from class.login.php $group_id = $results_array[group_id]; switch ($group_id){ case 5: //admin $group_id = 1; $active = 1; break; case 2: //user group $group_id = 2; $active = 1; break; default: //not permited user groups details will be copied but user will be disabled $group_id = 0; $active = 0; break; }
phpBB Table: Group_id 'Group Name' 1 'GUESTS' 2 'REGISTERED' 3 'REGISTERED_COPPA' 4 'GLOBAL_MODERATORS' 5 'ADMINISTRATORS' 6 'BOTS' WSB Group Table: 1 'Administrators' I think everything is ok. Also the backend styling seems go get all messed up once I copy all your files over. But thats less of on issue than the permissions thing.
|
|
|
|
|
Logged
|
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #8 on: July 10, 2008, 12:46:34 PM » |
|
Hmm thats odd. What version are you running this was done on version 2.6.7 not the latest 2.7
2.7 supports multiple groups which might have messed things up a bit.
Are you sure that your users Default Group in phpbb is admin and not something else and admin on the side.
Can you look in your WB user table and look what group_id your user account is being assigned to.
|
|
|
|
|
Logged
|
You say deviant like its a bad thing...
|
|
|
diodak
Offline
Posts: 85
|
 |
« Reply #9 on: July 10, 2008, 02:31:58 PM » |
|
Nice job.
Is it possible to handle login session between forum and wb? I mean if we use login form in phpbb then we can add coments in wb news.
|
|
|
|
|
Logged
|
Buchsbaum
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #10 on: July 10, 2008, 02:36:50 PM » |
|
This is only a very simple patch mod, but im begining to think it might be good to develop more.
At the moment all it does is allow you to use your phpbb user name and password to login to wb other than that there is no other integration.
|
|
|
|
|
Logged
|
You say deviant like its a bad thing...
|
|
|
mahalleday
Offline
Posts: 188
|
 |
« Reply #11 on: July 10, 2008, 06:32:22 PM » |
|
I'm using 2.7 which could be this issue. I have ben doing some reading on the phpbb forums and there is some kind of built in function in phpbb that they suggest using for this kind of thing. From what I gather you make a phpbb module that makes use of this function. I'm still looking into it but it sounds promising.
If i wanted to try this in 2.7 without multiple groups, can i assume that all i'd ned in that case statement would be the group ids for the admin group? or could I just make a second group in wsb and pass only that to phpbb and not pass the admin group? I 'll play around and see what happens.
This looks very promising if we could get this to work writing it into a module would be a huge addition to wsb.
|
|
|
|
|
Logged
|
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #12 on: July 10, 2008, 08:26:32 PM » |
|
Something along those lines, i'll install a clean copy of both phpbb and wb on my pc tommorow and see if i can update it.
|
|
|
|
|
Logged
|
You say deviant like its a bad thing...
|
|
|
mahalleday
Offline
Posts: 188
|
 |
« Reply #13 on: July 10, 2008, 08:37:33 PM » |
|
I just read this article in the phpbb knowlegde base about setting up an external page to log into phpbb. Not sure if you have seen this but it might be a godo start. I am going to try and play with it tonight if I can. http://www.phpbb.com/kb/article/phpbb2-sessions-integration/
|
|
|
|
|
Logged
|
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #14 on: July 11, 2008, 01:25:00 PM » |
|
Ok im currently working on getting it working for WB 2.7 and phpbb 3.0.1 and introduceing multiple groups
|
|
|
|
|
Logged
|
You say deviant like its a bad thing...
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #15 on: July 11, 2008, 02:06:25 PM » |
|
Update:
SEE FIRST POST FOR UPDATE
Again this only works with the default phpbb group for the user. Also note: That if when a user trys to logon the first time they are assigned to a disabled group even if that group is changed the user will remain disabled untill activated in the Access of WB.
If you are having trouble after install or change of groups delete all users from wb that match users in phpbb
To Do: Multiple Groups - Done Remove Preferences in 2.7 - Done Integrated Login - Pending WB GUI - Done
|
|
|
|
« Last Edit: July 12, 2008, 04:07:05 PM by fsuk »
|
Logged
|
You say deviant like its a bad thing...
|
|
|
diodak
Offline
Posts: 85
|
 |
« Reply #16 on: July 13, 2008, 07:49:20 PM » |
|
Nice, I`m waiting for integrated login and will install it on new website 
|
|
|
|
|
Logged
|
Buchsbaum
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #17 on: July 16, 2008, 12:26:44 PM » |
|
You might be waiting a while...
|
|
|
|
|
Logged
|
You say deviant like its a bad thing...
|
|
|
diodak
Offline
Posts: 85
|
 |
« Reply #18 on: July 16, 2008, 02:13:05 PM » |
|
Is it so complicated or you dont have time?
|
|
|
|
|
Logged
|
Buchsbaum
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #19 on: July 16, 2008, 04:59:11 PM » |
|
The problem is that even though i have sort of integrated them the two systems are still seperated.
i have been looking into a way to send the data from a login form to both wb and phpbb but it dosn't look prommising, feel free to have a go yourself but i wouldn't hang around waiting for me to sort it out.
|
|
|
|
|
Logged
|
You say deviant like its a bad thing...
|
|
|
mahalleday
Offline
Posts: 188
|
 |
« Reply #20 on: July 16, 2008, 11:27:48 PM » |
|
I have tried out the wb2.7 version and things seem to be working just fine. Only 2 small hicups, though it may be simply because I'm not doing something right.
1) If i attempt to change any wb settings via the settings tab, they do not save 2) when i access the phpbb int. module through the admin panel I can set everything to active but it won;t let me set a wb group to switch to or whatever for the phpbb group. ie the wb group drop down is empty.
I have also been doing some reading on how users of other cms's got phpbb integrated. In on example the copied the user tables from phpbb into the wsb table so that all feilds matched. If that were done (at least partially) I would think that creating/modifying a login script to write to both would be no real issue.
I might give this a try, I am fairly godo with php bu not so good with mysql as of yet so we;ll see what happens.
I do think we are onto somethign though.
|
|
|
|
|
Logged
|
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #21 on: July 16, 2008, 11:36:39 PM » |
|
I hav'nt got a clue about why the settings wont save.
As for the wb groups, have you created any groups in WB?
|
|
|
|
|
Logged
|
You say deviant like its a bad thing...
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #22 on: July 16, 2008, 11:40:06 PM » |
|
oh sorry my mistake, i forgot to change a local variable to use the TABLE_PREFIX variable in the tools.php,
ill make the changes now.
|
|
|
|
|
Logged
|
You say deviant like its a bad thing...
|
|
|
mahalleday
Offline
Posts: 188
|
 |
« Reply #23 on: July 17, 2008, 12:53:06 AM » |
|
Yeah I have a group made let me know when you have that thing corrected and I'll give it a go.
|
|
|
|
|
Logged
|
|
|
|
fsuk
Offline
Posts: 127
|
 |
« Reply #24 on: July 17, 2008, 12:53:47 AM » |
|
done
|
|
|
|
|
Logged
|
You say deviant like its a bad thing...
|
|
|
|