System for embedding Phorum in other applications (early preview)

Posted by Maurice Makaay 
Re: System for embedding Phorum in other applications (early preview)
February 13, 2006 08:34AM
Quote
mmakaay
I'm in the process of building a completely new template, because I have the same problem as you and because I want to have a template that holds up in limited space. The right column being pushed out isn't something that is easily fixed in one spot. There are more pages that do this. What might work is limiting the width of the <div> that is around the whole Phorum code (in header.tpl, something like PDDiv), but I never tried that.

If you like what you see at [mambo.gitaar.net] then you can wait for my template too.

That's perfect!

I must say phorum template system is very comprehensive and from the look of the templates folder I am not sure where to begin.

Is there a tutorial or outline to understand this template structure?
Where is the entry point? Is there an index.php type for this template system or is there multiple entry point depend on which screen?

Thanks

[opensourceCMS.com]
[ongetc.com]
Chanh Ong
Re: System for embedding Phorum in other applications (early preview)
February 13, 2006 08:40AM
Quote
valiant
Thanks for your answers.
I hope we can establish this approach of event-based loose-coupled integration for integrating web applications and thus get more and more CMS / frameworks to add events / hooks to their application and thus are ready for integration with dedicated applications like phorum or G2.

This is an excelent idea! May be we set a presedent here for integration between apps! Hopefull other CMS will follow and use this model!

[opensourceCMS.com]
[ongetc.com]
Chanh Ong
Re: System for embedding Phorum in other applications (early preview)
February 13, 2006 09:12AM
Quote
chanh
I must say phorum template system is very comprehensive and from the look of the templates folder I am not sure where to begin.

Is there a tutorial or outline to understand this template structure?
Where is the entry point? Is there an index.php type for this template system or is there multiple entry point depend on which screen?

There's only some documentation on the Wiki site that was setup to teach about things you can do in templates. AFAIK, there is currently no documentation on what files are used for what part of Phorum.

To get you started:

For every page, the header.tpl is sent first. After that, a specific template for the page that is handled is sent. After that, the footer.tpl is sent. These three are always sent in three separate calls in the Phorum core (take a look at some php's to see this happen).

Here's an overview of the template files in the default template. I've tried to make a little bit of a categorization to make things more clear.
GENERIC TEMPLATES:

footer.tpl         The footer that is put at the end of every page
header.tpl         The header that is put at the start of every page
message.tpl        A generic block for displaying messages
paging.tpl         A generic block for adding paging navigation to a page
stdblock.tpl       A generic block with a title and content part. I think this
                   one is now only used by pm.php and could be phased out
                   by using message.tpl instead.

ENTRYPOINT TEMPLATES:

cc_index.tpl       The user control center, this one loads other cc_* files
index_new.tpl      New style forum overview
index_classic.tpl  Classic forum overview
follow.tpl         When the user wants to follow a thread
list.tpl           Flat view message list
list_threads.tpl   Threaded view message list
login.tpl          The login page
pm.tpl             The private messages system, this one loads other pm_* files
posting.tpl        The message editor, this one loads other posting_* files
profile.tpl        For displaying a user's profile (the public one, not from CC)
read.tpl           Flat view message reading
read_threads.tpl   Threaded view message reading
register.tpl       For registering a new account
merge_form.tpl     (moderation) Merge two threads
move_form.tpl      (moderation) Move a thread to another forum
split_form.tpl     (moderation) Split a thread in two threads

I hope this will get you going.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: System for embedding Phorum in other applications (early preview)
February 13, 2006 09:22AM
Excelent! This will give me a good starting point.

Thanks

[opensourceCMS.com]
[ongetc.com]
Chanh Ong
Re: System for embedding Phorum in other applications (early preview)
February 13, 2006 09:31AM
Maurice can you add your answer here:
[www.phorum.org]

It would be helpfull for future users.

--
Amilcar Lucas
www.kdevelop.org webmaster
Re: System for embedding Phorum in other applications (early preview)
February 13, 2006 09:46AM
It seems that Maurice had come up with a really good idea.

To be honest I'm not sure whether I understand about this event based system. When you guys are discussing event based, does it means like a hook in phorum and event on ASP .Net? Basically when the system trying to do something, it will fire up an event which able to be intercept or modified by the third party system or module to change the current behaviour?

So what's the plan for the user syncing? I haven't look into this yet, but seeing from the development progress, I'm assuming that for every login user, if they are not registered to the phorum, they will be sync on-the-fly to phorum user database, am I right? So how about when deleting user, I believe Maurice had come up with a plan for this, but it will be awesome if I cna keep updated to what's going to be done and what's not going to be done.

I'm working on implementing an optional single sign on user base system to be built on top of MODx. Hopefully my idea will be accepted publicly. I was thinking the same thing to have an event driven hook/snippet that can be attached to the auth system when signing up a user, logging in a user, logging out a user, signing out a user.

If I know what Gallery2 and phorum are going to use for their loosely coupled integration with other application, I will know what kind of architectre needed to easily integrate both of this major application.

Thanks
Re: System for embedding Phorum in other applications (early preview)
February 13, 2006 09:51AM
Sure. I just added it there. It's not much, but it's indeed smart to put all bits and pieces that we do have up there. Thanks for the suggestion.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: System for embedding Phorum in other applications (early preview)
February 13, 2006 09:52AM
Gallery 2's approach to embedding is described at:
[codex.gallery2.org]
and for devs:
[codex.gallery2.org]

I'm currently writing an article that explains event-based loose-coupled integration a little more in-depth.

when we talk about event-based synchronization then we mean that e.g. if a user is created in a CMS that the CMS triggers an event and your integration code calls phorum / gallery and notifies them of the user creation upon which these applications create the user in their persistent storage (database).

the widely used alternative is on-the-fly user creation, that is, the user is created in phorum / gallery when the user does his first visit in the embedded phorum / gallery. this approach has a lot of disadvantages. its main advantage is that it doesn't require the CMS to have an event/hook system. therefore i call it a low-tech fallback solution.
Re: System for embedding Phorum in other applications (early preview)
February 13, 2006 12:00PM
Quote
wendy
If I know what Gallery2 and phorum are going to use for their loosely coupled integration with other application, I will know what kind of architectre needed to easily integrate both of this major application.

What the synchronization method is, depends solely on the programmer that is writing the integration software. The connector system really can't give a damn about how this is implemented. All that the connector wants functionally, is that the user_id exists at the moment that the get_user_id() returns it.

So I don't want to enforce an architecture for synchronizing users. I only want to make this process easier by providing the right tools.

I hope the philosophy of the possibilities will get more clear once I'm up to documenting the whole thing :)


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: System for embedding Phorum in other applications (early preview)
February 13, 2006 12:27PM
I've written 2 small documents pointing out the basic principles and aspects:

[codex.gallery2.org]

[codex.gallery2.org]

and the more specific document that explains the implementation details for Gallery 2 integrations:

[codex.gallery2.org]
Sorry, only registered users may post in this forum.

Click here to login