Outbuffering for integration with Joomla and errors

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
User avatar
Acyd Burn
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You
Contact:

Re: Outbuffering for integration with Joomla and errors

Post by Acyd Burn »

One thing i can say for sure... we won't adjust every trigger_error() instance.

Image
User avatar
Acyd Burn
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You
Contact:

Re: Outbuffering for integration with Joomla and errors

Post by Acyd Burn »

radopod wrote:This is the last roadblock as far as a complete integration is concerned.
The rokbridge is working fine without any file edits. ;)

Image
radopod
Registered User
Posts: 4
Joined: Fri Aug 29, 2008 7:15 am

Re: Outbuffering for integration with Joomla and errors

Post by radopod »

I will look at Rok Bridge. I have used it but I seem to have forgotten what exactly they do. I dumped it for JFusion because the progress there was negligible. And now I am a part of the JFusion Support Team. Personally I don't think they had the URLs sorted out. But will use it if you say so for sure and get back with you.

Could one of our guys take care of fixing each and every trigger_error() and submit to the SVN for approval? Frankly I did a few myself to get you to see the test forum and I was able to do it swift using a UTF8 editor. Marius has been doing a lot more to get this to work completely. And besides doing it once would be a great relief because if this is the approach we follow, there will be an army of users doing this day in and day out. :lol:

Will be getting back with you pretty soon.
radopod
Registered User
Posts: 4
Joined: Fri Aug 29, 2008 7:15 am

Re: Outbuffering for integration with Joomla and errors

Post by radopod »

Hey Acyd Burn
I have an update on what you were saying about RokBridge. We surely have done what RokBridge is very close to doing. That is to Sync users between Joomla and phpBB and allow for Dual Synchronisation(Login into Joomla and you are logged into phpBB automatically). But now we are trying to display phpBB in such a way that we can display the forum as part of Joomla fully compatible with different Joomla templates and modules. Basically it will look something like this

http://www.jfusion.org/index.php?option ... &Itemid=88

What you see above is called the Wrapper mode. The biggest issue with this is that no matter which page you go to within the IFrame the link remains the same. This therefore is an issue as far as SEO is concerned. Also if you visit http://jfusion.org/support, there is no integration with Joomla in that case. We can easily tackle this with Frameless integration. Wrapper mode is all that RokBridge plans to implement as well. The only other approach they have is Synced Mode
RocketWerx wrote:Modes

The bridge is designed to run into two different modes, wrapped mode and synced mode. In synced mode the bridge will only perform user and log-in/out syncing, while in wrapped mode the bridge will run as a Joomla! 1.5 application and offer extra features, like for example SEF URL's.

What does this mean in practice :

Synced mode : when you install the phpBB3 user and authentication plugins in Joomla! and activated the phpBB3 authentication plugin in phpBB3 you are running in synced mode.
Wrapped mode : when you access your phpBB installation through the special Joomla! application you are running in wrapped mode.
There are no setting required to turn off or on, wrapped mode or synced mode. Both happen on the fly and depend on the entry URL for the forum, more info on that see below.
Synced mode is essentially the default forum with the sessions and users of Joomla and phpBB tied to each other allowing for Dual login and common registration. We have had synced mode for a few months now without any errors whatsoever. I have an example of a visually integrated SMF Board which we are testing. It is restricted to the public at the moment. But if you wish to see it I will be more than happy to supply you the link.
mariusvr
Registered User
Posts: 27
Joined: Mon Aug 25, 2008 10:10 am

Re: Outbuffering for integration with Joomla and errors

Post by mariusvr »

Acyd Burn wrote:
radopod wrote:This is the last roadblock as far as a complete integration is concerned.
The rokbridge is working fine without any file edits. ;)
We are talking about visually integrating phpBB3 with Joomla. Rokbridge I believe (correct me if I am wrong), has its code in a directory outside Joomla and does not display any other Joomla content. No file edits are necessary for rokbridge, because it does not visually integrate phpBB3 inside Joomla :)

Have a look yourself why rokbridge is not a visual integration:
Joomla: http://demo.rocketwerx.com/bridge/
phpBB3: http://demo.rocketwerx.com/bridge/forum/

However user would like to have their normal Joomla menu on the top with some other modules on the page. Using wrappers/iframes is problematic since not all browsers support auto-resizing of the wrapper window and this approach is bad in terms of SEO. The other alternative would be to modify the phpBB3 template itself to match the Joomla template/header. However this is very hard to do and requires a couple of hours of work everytime you make a small update to your Joomla site. Custom modding the phpBB3 template is time consuming and impossible to do for the average user.

When phpBB3 exits, is does so by calling a die() statement (same as exit statement), which forces ALL code running on the server to stop. This prevents any visual integration by JFusion. Rokbridge I believe, calls a simple statement that parses the phpBB3 output buffer (using the phpBB3 exit hook) URL's and outputsthe phpBB3 content only. This is not a visual integration. Jfusion can not take this approach, as one can not switch back to the other Joomla code that is half way during its execution (see my previous posts for more details on why exits hooks can not be used).

SMF and myBB have clean exists that allow for output buffering, as they simply return and don't die. It would be awesome to have the same for phpBB3. It would be very hard to create this core hack myself. As I would need to re-hack the phpBB3 code wit each release and users would have to start with a "blank phpBb3 install" and apply all of their phpBB mods manually afterwards (which is very time consuming).

Thanks, Marius
User avatar
Acyd Burn
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You
Contact:

Re: Outbuffering for integration with Joomla and errors

Post by Acyd Burn »

We won't adjust every trigger_error() call. ;) It will also not work if the trigger_error() is called within a function. ;)

What you really should try is using your own message handler and hook the exit_handler(). With this you are able to control the flow. You can even use the phpBB message handler itself within yours to display the "message" correctly and then go forth...

... or you could for instance throw an exception and catch it in your code. Kellanved proposed something like this in the following way:

try {
call_phpbb()
}
catch { phpbb_exited_exception $e }

With SMF and MyBB you should have the same problems - the difference is that they do not use the message handler to display confirmation boxes, so it happens less often. ;) We also have much more error checking implemented for every single kind of thing...

anyway, i think there is a solution. :) But not the one you propose... which would not work in all instances. I already committed changes to the core though to at least get rid of the login_box() issue in ucp/mcp.

Kellanved may additionally chime in here. :)

Image
User avatar
Acyd Burn
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You
Contact:

Re: Outbuffering for integration with Joomla and errors

Post by Acyd Burn »

It would be very hard to create this core hack myself. As I would need to re-hack the phpBB3 code wit each release and users would have to start with a "blank phpBb3 install" and apply all of their phpBB mods manually afterwards (which is very time consuming).
phpBB's integrated updater is able to work with modifications... they are merged with our file changes. :)

Image
User avatar
Kellanved
Former Team Member
Posts: 407
Joined: Sun Jul 30, 2006 4:59 pm
Location: Berlin

Re: Outbuffering for integration with Joomla and errors

Post by Kellanved »

The clean exit is debatable; exit is something hard to circumvent in error situations and neither of those scripts does it AFAIR.

My only quick idea to do this without source changes would be to add a hook throwing an exception to the phpBB exit handler . i.e. throw new PhpBB_Exited_Exception('phpBB exited.');


And then do

Code: Select all

try
{
    call_phpbb();
}
catch (PhpBB_Exited_Exception $e) {}
// continue with joomla here
in your code.

~H
No support via PM.
Trust me, I'm a doctor.
mariusvr
Registered User
Posts: 27
Joined: Mon Aug 25, 2008 10:10 am

Re: Outbuffering for integration with Joomla and errors

Post by mariusvr »

Thanks for the try / exemption idea.

I'll give it a try, but it sounds like it might work :) Marius
radopod
Registered User
Posts: 4
Joined: Fri Aug 29, 2008 7:15 am

Re: Outbuffering for integration with Joomla and errors

Post by radopod »

It is great to see the pace at which the phpBB Devs are replying back. :shock: Good to see that there might be a solution here than can prevent us from touching those hard coded phpBB Files. :D
Post Reply