Firefox PHP

System for embedding Phorum in other applications (early preview)

Posted by Maurice Makaay 
Re: System for embedding Phorum in other applications (early preview)
May 15, 2008 03:00AM
Hi Maurice,

Everything seems to work except it apparently isn't reading the CSS file:

[demo.vlynx.com]

The only change I made from your default Mambo install is in phorum.php
$PHORUM_DIR = "../phorum";
changed to
$PHORUM_DIR = "./phorum";
since it is installed in a directory under Joomla; i.e., ./joomla/phorum

I moved your sample embed templates into Phorum's template directory (./phorum/templates) and selected them in the Phorum admin.

I've tried my best reading the README, this thread, etc., but I admit some of this is over my head. Is there something obvious I'm missing?

--Peter
Re: System for embedding Phorum in other applications (early preview)
May 15, 2008 03:39AM
None of the head tags seem to be included in the page. For example if you search for something, then the redirect after the "busy searching" page is not done. This is handled through a meta refresh in the header, which is not present either apparently.

It sounds like this type of code (from mods/embed_phorum/connectors/mambo/connector.php) does not work (anymore?) for Joomla:
$mainframe->_head['custom'][] = $elements["style"];

I'm not a Joomla literate, but maybe you could ask around with people that do know more about Joomla than I do. The goal is to put some data in the page <head> section programmatically.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: System for embedding Phorum in other applications (early preview)
July 12, 2008 08:44AM
Quote
Maurice Makaay

We try to use trigger_error() for all errors in Phorum. Those errors could be caught by an exception handler. There might still be die() calls in there. If you find any that get in your way, then please tell us. We can change them to trigger_error(). Maybe a future idea for the embed_phorum mod could be to offer such an error handler and a callback method. I'll keep that in mind.

Using 0.20...
 # grep die phorum/mods/embed_phorum/*
phorum/mods/embed_phorum/PhorumConnectorBase.php:        die("Phorum embedding connector \"" . $this->name . "\" " .
phorum/mods/embed_phorum/PhorumConnectorBase.php:        die("Phorum embedding connector \"" . $this->name . "\" " .
phorum/mods/embed_phorum/embed_phorum.php:    if (! isset($GLOBALS["PHORUM_CONNECTOR"])) die("
phorum/mods/embed_phorum/embed_phorum.php:            die("No user data found for user id $user_id. " .
phorum/mods/embed_phorum/run_phorum.php:if (! isset($GLOBALS["PHORUM_CONNECTOR"])) die("
phorum/mods/embed_phorum/run_phorum.php:    die("embed_phorum error: Cannot change directory to " .
phorum/mods/embed_phorum/run_phorum.php:            die();
phorum/mods/embed_phorum/syncuser.php:        die("embed_phorum_syncuser(): no user_id found in the syncuser data");
phorum/mods/embed_phorum/syncuser.php:        die("syncuser error: non-numerical user_id found in the syncuser data");
phorum/mods/embed_phorum/syncuser.php:            die("syncuser error: usernames cannot be changed, but for " .
phorum/mods/embed_phorum/syncuser.php:        die("embed_phorum_deleteuser(): no user_id found in the syncuser data");

IMO, it would be much nicer to throw exceptions directly in the embed code, as that will allow unique handling of specific exceptions - which is pretty vital for proper intergration... of course that will destroy PHP4 compat, but... who cares? ;)
Re: System for embedding Phorum in other applications (early preview)
August 16, 2008 04:26AM
Quote
Maurice Makaay
I'm working on that right now (good vacation time spending ;-) and I have some CMS systems downloaded on my laptop to test it. But not finished yet. Currently fighting a bit with Drupal and getting around to its module writing system to build a Phorum integration. I hope to finish a working setup during my flight back to the Netherlands.

If it's only for user integration and single sign on, you might also be able to take a different route. You could write a module that implements the "user_session_restore" hook, which is a really convenient hook for handling single sign on. The other thing to do would be keeping Phorum users in sync with the main system. If you search for "user_session_restore" in these forums, you'll be able to find some example implementations.

Maurice,

Any news on the Drupal? I started using it with Phorum and am looking for ways to embed it.

Sergej

------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Re: System for embedding Phorum in other applications (early preview)
August 16, 2008 04:29AM
No news for that.
AFAIK he worked on it while in the US but lost the code in a harddisk accident.


Thomas Seifert
Re: System for embedding Phorum in other applications (early preview)
August 16, 2008 04:57AM
The horror!!

Sergej

------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Embed_phorum for Phorum 5.2
June 18, 2009 05:22AM
Dear Maurice,

Could you please help me and answer the following question:
I use embed_phorum, but it seems that this module only works under Phorum 5.1 version (not 5.2).
So I have a question: do you a version of embed_phorum for Phorum 5.2?

Thank you.

Yours Sincerely, Kostyantyn.
Re: Embed_phorum for Phorum 5.2
June 18, 2009 07:36AM
Sorry, but there is no version for 5.2. I had it ready at one point in the past, but an unfortunate hard disk accident wiped the new code from the face of the earth. Since then I've been busy in other development tasks (both work and Phorum). I will redo the 5.2 version of the module, but I'm afraid that I cannot provide a time frame on this.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Embed_phorum for Phorum 5.2
October 21, 2009 07:16AM
I'm starting to integrate Phorum into Drupal and I have to decide if I try to make it run inside Drupal or just use Drupals authentication.

So what changes do the 5.2 templates require to make them embeddable? Would it be easier to modify the existing embedded templates for 5.2 or make the current 5.2 templates embedded?

But I may just run only the authentication part for now even though this could be a good starting point with the embedding business :)

---
-=[ Panu ]=-
Re: Embed_phorum for Phorum 5.2
October 21, 2009 07:29AM
Check out my External Authentication module with its Drupal plugin. You can further use my Generic Integration template (at least for ideas on how to edit template headers/footers for embedding).


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Sorry, only registered users may post in this forum.

Click here to login