Re: [Fwd: [Back-end-development] Integrating Phorum into Back-end]

Joe Stewart <[email protected]> Wed, 21 Jan 2004 09:35:18 -0600
Newsgroups gmane.comp.cms.phpslash.devel
Message-ID <[email protected]>
On Wed, Jan 21, 2004 at 10:05:36AM -0500, Mike Gifford wrote:
> Hello,
> 
> Thought that I'd forward this question over to the phpSlash list to see
> if anyone has done anything like this and would have some suggestions. 
> Tim's looking to bring this into Back-End, but hopefully we'd be able to
> bring that over to PSL pretty easily to add to the new foundry.
> 
> Mike
> 
> -----Forwarded Message-----
> From: Tim Verhoeven <[email protected]>
> To: Back-end Development list <back-end-development-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> Subject: [Back-end-development] Integrating Phorum into Back-end
> Date: Wed, 21 Jan 2004 11:45:19 +0100
> 
> Hey,
> 
> As some of you know I'm trying to integrate the Phorum messageboard 
> (www.phorum.org) into Back-end. Yesterday I've made some first attempts at 
> it. This using the BE_survey.php file as a example. (Uses PHP's output 
> buffering and includes).
> 
> This allowed me to get started with it and get a feeling on how the Phorum 
> code is build.
> Basically each function is written in a seperate php file. Some basic 
> functions are present in common.php. But all the rest are standalone. So 
> no OO or functions calls we can use. There also is no central index file 
> that controls the flow, so a typical phorum page contains links to a lot 
> of different files.

phorum5 has a script for integrating into other scripts that does call all of those 
scripts from central index file.  I think we can just capture that output using output 
buffering.  It's been awhile since I've looked at it.

I would suggest integrating phorum5 as a start instead of the current stable stuff.  
It is a complete rewrite.

> Templates is very simple, they just include a header and footer into the 
> output.

This is how I integrated phorum into phpslash.  I changed the headers to use the 
phpslash config files, header, columns and footer.  Here are some old patches:

[ 541835 ] Phorum w/ phpSlash look and feel.	
http://sourceforge.net/tracker/index.php?func=detail&aid=541835&group_id=10566&atid=310566

and an older:

[ 541701 ] Simple Phorum header and footer files.
http://sourceforge.net/tracker/index.php?func=detail&aid=541701&group_id=10566&atid=310566

phorum5 does have its own templating system.  We may be able to tack some stuff in
there easier.  It compiles the templates to php and caches them.  I think you can
have phpblocks in the templates, but I'm not sure.

> For DB they use a abstraction layer (nothing standard).
>

At one time I had a phplib abstraction file for phorum5.  It's not too hard.  I 
think Brian made a couple of changes that I suggested along the way.
 
> As I understand it Back-end needs it's content passed (using a variable, 
> function, ...). So there are some strategies to make Phorum integrate into 
> Backend :
> 
> 1) Make a "index" file ourself that intercepts all links made on phorum 
>    pages and use those to select to correct page to include.
>    Problems : we need to parse the get arguments and forward those and 
>               edit each file to change all <a> tags.
> 2) Make functions for each phorum file and have a "index" file that calls 
>    the required function. So we don't need to parse the get arguments.
>    Problems : a lot of rewriting, we still could use PHP output buffering 
>               to reduce that workload.
> 3) Rewrite it into a "real" Backend module/plugin with a class file 
>    containing all functions. This allows to rewrite all stuff to use 
>    Back-end provided functions (DB, Session, cookies,...)
>    Problems : a lot ot work, no real quick results.
> 

Yeah.  I didn't get this far yet.

> So now for discussion. Did I miss another way to do this. What is the best 
> option to choose. As I see it, it will be nearly impossible to make the 
> ingration work without touching any of the phorum files. So for me at the 
> moment I'm more going for option 3.
> 

That was my conclusion with the stable tree too.  The authorization can be done.  
You can patch the login process to preauth BE/PSL.  Then change the login links to 
the phorum login page.  I got this to work.  I wanted to auth phorum using the 
phplib auth, but went the brute force way to get something working.  I never 
consolidated registration.

At this point I decided to wait till phorum5 was more stable.  At the time it was 
only in cvs and not near any kind of release.

> Any other ideas, sugggestions, ...
> 

I would like to help get phorum5 working as psl0.8 module first.  This is one of 
the modules I want available when psl0.8 is released.

After that, maybe help. backport to BE0.7

thanks,

Joe


> Regards,
> Tim Verhoeven
> 
> 


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn