Mehdi's Bridge for Phpbb2 (not 3 yet ...)

Discuss the integratoin of phpbb and Joomla! here.

Moderator: General Support Moderators

Forum rules
Locked
dehydratedchicken
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Sat Mar 04, 2006 1:12 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by dehydratedchicken » Thu Jun 01, 2006 9:06 pm

I now have this bridge fully integrated into my Joomla website

Managing to run the CH Mod with the only loss being the forum stats at the bottom - which didnt really matter to me
I've also got the userlist MOd working which just shows a list of members in the admin panel - was only useful when testing out the forum

I've redone the header of the forum to remove the login and register buttons so that users can only login using the main site registration page - this had to be done as I'm using Community Builder and this bridge redirected to the default joolma login and register page

And finally the index page of the forum is only available to registered members and if a guest tries to access the forum page then they are redirected to the login page

overall I think I have got a really good forum setup - a few little dodges which really dont matter - if you want to check it out then
its at http://dehydratedchicken.co.uk/phpbb

Only thing I need now is the remove user bug to be fixed by mehdi so I can remove all the users I had to create when testing out the forum features

plukke
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat May 20, 2006 5:58 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by plukke » Sat Jun 03, 2006 12:16 pm

Good work! Like to use it too. Could you tell me if it will work with phpbb2 2.0.19 and joomla 1.0.8 or do I need to upgrade to 2.0.20 first?

Furthermore, I have the attachment mod installed within phpbb2, is this a problem for your bridge?

mehdi
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Tue Oct 04, 2005 3:56 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by mehdi » Sat Jun 03, 2006 12:45 pm

Could you tell me if it will work with phpbb2 2.0.19 and joomla 1.0.8 or do I need to upgrade to 2.0.20 first?
Probably no problem, but I can't certify. Why not taking the occasion to upgrade ?
Furthermore, I have the attachment mod installed within phpbb2,
If the mod introduce new files directly (not included by a master page) viewed from the frontend (at the  root normally) then they should be processed.

User avatar
adec
Joomla! Explorer
Joomla! Explorer
Posts: 365
Joined: Sat Sep 03, 2005 8:56 pm
Location: UK
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by adec » Sat Jun 03, 2006 1:19 pm

plukke,

i'm in exactly the same set up as you... first thing I did was upgrade to 2.020 ... as Mehdi says, might as well tke the opportunity..

the next step ... which is where i'm at now ... when you install tha attachment mod, theres a number of pre processed files that you have to upload. With this tool theres also a number of preprocessed files that have to be uploaded... so I guess first I'll chck to make sure none of these files are the same...

If they are then I'll have to see what the attachment mod adds to the files, and also this tool ... theres no point just overwriting the attachment mod files with these ones, phpbb would fall over again...

if theres no matching files, then  i'm just going to go for it  :D

oh not before making a backup though  :laugh:

adec

User avatar
adec
Joomla! Explorer
Joomla! Explorer
Posts: 365
Joined: Sat Sep 03, 2005 8:56 pm
Location: UK
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by adec » Sat Jun 03, 2006 1:30 pm

there are a few files that attachment_mod has already modified, so not a good idea just to copy the premodified files from this package across...

following the manual rules here though seems like it all should be ok :

http://www.mehdiplugins.com/misc/phpbbjoomhack.htm

oh well ony one way to find out :D

plukke
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat May 20, 2006 5:58 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by plukke » Sat Jun 03, 2006 2:10 pm

Adec

Please let me know how this worked out. If it turns out to be working, please share your problems/difficulties. I´m not that experienced with this stuff at all so I´d like to know what to do and do it right...

(My attempt to link phpbb2 and joomla with the files from joomlastuff.org failed at the SQL query leaving me with a non functional joomla install. :'(  Replaced all of the backups now but would avoid this at any cost...)

User avatar
adec
Joomla! Explorer
Joomla! Explorer
Posts: 365
Joined: Sat Sep 03, 2005 8:56 pm
Location: UK
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by adec » Sat Jun 03, 2006 3:42 pm

ok i'm at the last stage, merging the users.... because i'm using 2 separate databases, it says 'If you are using two separate database (for Joomla and Phpbb) you can always perform a copy of this table and then delete it afterward.'

stupid question but whats the easiest way of doing this through phpmyAdmin ?

thanks adec

User avatar
adec
Joomla! Explorer
Joomla! Explorer
Posts: 365
Joined: Sat Sep 03, 2005 8:56 pm
Location: UK
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by adec » Sat Jun 03, 2006 3:48 pm

stupid question ... export / import looks like the right way .... :-[

mehdi
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Tue Oct 04, 2005 3:56 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by mehdi » Sat Jun 03, 2006 3:55 pm

stupid question ... export / import looks like the right way .... Embarrassed
Not stupid 'cause there's better. In phpmyAdmin select your table then choose "Operations" tab.

User avatar
adec
Joomla! Explorer
Joomla! Explorer
Posts: 365
Joined: Sat Sep 03, 2005 8:56 pm
Location: UK
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by adec » Sat Jun 03, 2006 4:04 pm

it nearly all went ok :) ... just a slight problem, hopefully a quick search of this forum will solve it though....

all users can login to the joomla site ok .. ie the forum users ... but once signed into the joomla site, if you try to access the forum you get the error :

Fatal error: Cannot redeclare joomphpbbbindusername() (previously declared in /home/vincentt/public_html/forum/joomphpbb_engine.php:104) in /home/vincentt/public_html/forum/joomphpbb_engine.php on line 103

mehdi
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Tue Oct 04, 2005 3:56 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by mehdi » Sat Jun 03, 2006 4:17 pm

Hi adec,
Fatal error: Cannot redeclare joomphpbbbindusername()
Well, that's impossible. This function is only declared once.
Unless you modified com_phpbb. That could be an explanation...
Sorry, as useless seems the small component provided with the bridge, this one should do its minimalistic job prperly
i.e displaying a tag inside joomla. Don't change its behavior.

User avatar
adec
Joomla! Explorer
Joomla! Explorer
Posts: 365
Joined: Sat Sep 03, 2005 8:56 pm
Location: UK
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by adec » Sat Jun 03, 2006 4:31 pm

i didnt touch com_phpbb .. i can try uninstlling it and reinstalling it..

mehdi
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Tue Oct 04, 2005 3:56 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by mehdi » Sat Jun 03, 2006 4:39 pm

i didnt touch com_phpbb .. i can try uninstlling it and reinstalling it..
All right PM me link to website and how did you get error.
I may need after, admin access to your joomla panel and so on ...

User avatar
adec
Joomla! Explorer
Joomla! Explorer
Posts: 365
Joined: Sat Sep 03, 2005 8:56 pm
Location: UK
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by adec » Sat Jun 03, 2006 4:40 pm

i think it might be because of my login.php file ...... just checking it .... if so it was my fault .... might have ehemm deviated slightly on this step of the install ..... back in a sec  :-[

thewatcher
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 218
Joined: Fri Feb 17, 2006 4:30 pm
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by thewatcher » Sat Jun 03, 2006 4:42 pm

I've playing with this bridge, looks great so far. I will do some installation to another test server to familiarize my self.

Great addition.
em
[ http://www.MOSCOM.COM ] WebHosting 24x7 Phone Support.
[ http://www.KING.NET ] My Project ... converting to 1.6

User avatar
adec
Joomla! Explorer
Joomla! Explorer
Posts: 365
Joined: Sat Sep 03, 2005 8:56 pm
Location: UK
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by adec » Sat Jun 03, 2006 4:58 pm

Mehdi...

It was my fault ... sorry! .... all seems to be working perfectly!!!

http://www.vincenttreacey.com

Just a question .... for new people coming to the site ... they can register through either the site login or through the phpbb forum page.... Is it best to remove the register button on the forum page, and just make them register through the joomla site ? .. apart from that thankyou v much ! love this component!

adec

User avatar
adec
Joomla! Explorer
Joomla! Explorer
Posts: 365
Joined: Sat Sep 03, 2005 8:56 pm
Location: UK
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by adec » Sat Jun 03, 2006 5:00 pm

haha forget that question ... i just looked at the register link on the forum ... you already have it covered! ... lol .. thanks!

mehdi
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Tue Oct 04, 2005 3:56 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by mehdi » Sat Jun 03, 2006 5:01 pm

Is it best to remove the register button on the forum page, and just make them register through the joomla site ?
You may have a problem with CB as it has its own registration page.

User avatar
adec
Joomla! Explorer
Joomla! Explorer
Posts: 365
Joined: Sat Sep 03, 2005 8:56 pm
Location: UK
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by adec » Sat Jun 03, 2006 5:07 pm

CB ? Community Builder ? ... I don't use it... everything is working perectly on the site .. thanks...

adec

User avatar
adec
Joomla! Explorer
Joomla! Explorer
Posts: 365
Joined: Sat Sep 03, 2005 8:56 pm
Location: UK
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by adec » Sat Jun 03, 2006 5:48 pm

Hi Mendhi,

Final question .. I promise ...

When the forum integrates into the site it uses the default Joomla template. Is it possible anywhere in the files to speficy another template, just for the forum use ?

I used to do it through the admin template settings and assign a different template that didnt use the left hand margin - just to give the forum more space.

At the moment it seems to ignore this, so I guess one of the files would need to be 'hacked'...

thanks

mehdi
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Tue Oct 04, 2005 3:56 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by mehdi » Sat Jun 03, 2006 5:57 pm

Hi adec,
I used to do it through the admin template settings and assign a different template that didnt use the left hand margin - just to give the forum more space.
I would hack your current Joomla template to load "mainmenu" only if the com_phpbb component is not loaded.
this would be a code like:

Code: Select all

if( strcmp(mosGetParam($_GET,'option',''), "com_phpbb") !=0)
  mosLoadModules ( 'left' ); 
assuming your main menu is in left position

plukke
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat May 20, 2006 5:58 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by plukke » Mon Jun 05, 2006 5:01 pm

a simple question, I´ve got a lot of users in phpbb2, does this bridge imoprt them to joomla as well or does it just links the joomla users to a forum user after it exists in both joomla and phpbb2?

mehdi
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Tue Oct 04, 2005 3:56 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by mehdi » Mon Jun 05, 2006 5:17 pm

Hi plukke,
I provide a basic script  (quickmerge) to import phpbb2 users into joomla.
A Joomla user is automatically "linked" or bound to a phpbb user the first time he visits the forum.
The bridge makes the assumption that if a phpbb user and joomla user has the same username,
then it is the same user and then both  joomla/phpbb user are definitely bound.
If for a joomla user there's no corresponding phpbb user, then  a  new phpbb user will be automatically created.
As soon as you install the bridge, you can't access to the forum without having access into Joomla.
I mean this is a master--->slave scheme, where joomla provide login access (not true for user permissions)

You can track how phpbb and joomla user are bound inside the joomphpbb_bridge table.

plukke
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat May 20, 2006 5:58 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by plukke » Mon Jun 05, 2006 5:34 pm

Thank you for the info provided. I´ll give it a go  8)

mehdi
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Tue Oct 04, 2005 3:56 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by mehdi » Thu Jun 08, 2006 1:52 am

Hi I've just updated the bridge
with a bug fix for the infinite redirection loop while trying to login (I was asking to not delete user from phpbb).
To get rid of the bug: update the file joomphpbb_engine.php and then run the script checkassoc.php from your forum's root.

Concerning OpenSef : To disable OpenSef only when the bridge is in use, follow these steps : Make a menu item to the component . Now in the configuration panel of Opensef exclude that menu item. You don't need that menu item anymore, so delete it.

Concerning CB, I've added a page that  I hope will help.
I've planned first to make a mambot + a component to makes things easier for CB users.  But it was too much pain in the ass for such trivial problems.

All these explanations added to first post.

cheers
Mehdi

dehydratedchicken
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Sat Mar 04, 2006 1:12 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by dehydratedchicken » Sat Jun 17, 2006 10:51 am

Hi, I have restricted my forum access to registered members only

If you take a look here: http://dehydratedchicken.co.uk you will see that when you click the forum link you are automatically redirected to the default Joomla login page using the following code on the index page:

Code: Select all

// Start session management
//
$userdata = session_pagestart($user_ip, empty($forum_id) ? PAGE_INDEX : $forum_id);
init_userprefs($userdata);

         if ($userdata['user_id'] == ANONYMOUS)
         {
            redirect(append_sid('login.'.$phpEx));
         }

//
// End session management
//
However, I would like it to redirect to a custom page...after reading the thread on the joomlapolis (thanks for the link mehdi) I would like to make it redirect to the static content page with the CB login module

Do you know which part of the code I could change please?

Otherwise I am happy to use the bridge and joomla as it is...it seems to be fine with Community Builder, new users can access the forum no problem

mehdi
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Tue Oct 04, 2005 3:56 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by mehdi » Sat Jun 17, 2006 9:40 pm

Hi dehydratedchicken,
what I would do is editing joomphpbb_engine.php  file,
then inside joomphpbbMainCallback,I would  look for the latest "potential" redirection
i.e just before the lines:

Code: Select all

 //---- disabling some  fields in login page -----------------	 
	  if(strcmp($phpbbCurPage,login)==0 && !isset($_GETPOST['login']) && !isset($_GETPOST['logout'])  ) {  //displaying login form
	    if($userdata['session_logged_in']) {
	    	 $usernameField  = "<b>".$userdata['username']."</b>";
	       $usernameField .= "<input type=\"hidden\" name=\"username\" value=\"" . $userdata['username'] . "\" />";
    }
I  would add the code:

Code: Select all

   
      if ($userdata['user_id'] == ANONYMOUS)
         {
          $mypage="http://www.please-type-your-url-here.com";
           header('Location: '. $mypage);
          return ""; //don't output anything
         }
good luck

dehydratedchicken
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Sat Mar 04, 2006 1:12 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by dehydratedchicken » Tue Jun 20, 2006 10:18 am

thanks for that mehdi, the problem I got with using that was it required logged in member to click the forum link twice

Instead, what I did was keep the code I was already using, and modified the default Joomla login page, so that the link to the forgot password and register were to the CB login and forgot pages  :D

I read on the PHPBB website that a beta version of it is now available, will you be starting work on that or still working on the PHPBB2 bridge?

mehdi
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Tue Oct 04, 2005 3:56 pm

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by mehdi » Tue Jun 20, 2006 11:26 am

thanks for that mehdi, the problem I got with using that was it required logged in member to click the forum link twice
Clearly, I didn't test the code I was suggesting. And I wonder why you get such behavior.
I read on the PHPBB website that a beta version of it is now available, will you be starting work on that or still working on the PHPBB2 bridge?
I don't know... later. Hopefully, there's not a lot of adaptation to put to my bridge.
As I see phpbb3 still doesn't support utf8, which will be quite annoying when bridging with Joomla 1.5.
Currently I'm writing an FAQ, which takes a bit some times.

EzerchE
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Thu Apr 20, 2006 12:58 pm
Contact:

Re: New Bridge for Phpbb 2.020 available (from Mehdi)

Post by EzerchE » Tue Jun 20, 2006 2:12 pm

i have clean joomla 1.0.9 and modded phpbb 2.0.21, i have lot of members on phpbb side, can i use your bridge?


Locked

Return to “phpbb - Joomla! Integration”