System for embedding Phorum in other applications (early preview)
Posted by Maurice Makaay
|
Re: System for embedding Phorum in other applications (early preview) February 17, 2006 10:38PM |
Registered: 20 years ago Posts: 202 |
I download the latest and now I got this in the embed phorum:
There was unexpected output from Phorum. This might indicate a problem:
<br /> <b>Notice</b>: Undefined index: user in <b>f:\wamp\www\phorum\include\users.php</b> on line <b>336</b><br />
I download 5.1.8-RC2 and the problem above is gone but now I don't see any "Control center", "private message", etc
Look like some how the connector does not know about the mambo user even though the sync is successful. I check by remove the mambo account in phorum and let it sync and it does.
What's up?
[opensourceCMS.com]
[ongetc.com]
Chanh Ong
Edited 6 time(s). Last edit at 02/17/2006 11:35PM by chanh.
There was unexpected output from Phorum. This might indicate a problem:
<br /> <b>Notice</b>: Undefined index: user in <b>f:\wamp\www\phorum\include\users.php</b> on line <b>336</b><br />
I download 5.1.8-RC2 and the problem above is gone but now I don't see any "Control center", "private message", etc
Look like some how the connector does not know about the mambo user even though the sync is successful. I check by remove the mambo account in phorum and let it sync and it does.
What's up?
[opensourceCMS.com]
[ongetc.com]
Chanh Ong
Edited 6 time(s). Last edit at 02/17/2006 11:35PM by chanh.
|
Re: System for embedding Phorum in other applications (early preview) February 17, 2006 11:58PM |
Registered: 20 years ago Posts: 36 |
Cool stuff. I've been following the development of ths module, and so far I can see the future of official public integration on phorum.
I might not gonna do some major integration with MODx for now, but I will keep watching the development of this module.
Thanks for the great and wonderful effot Maurice.
I might not gonna do some major integration with MODx for now, but I will keep watching the development of this module.
Thanks for the great and wonderful effot Maurice.
|
Re: System for embedding Phorum in other applications (early preview) February 18, 2006 05:49AM |
Admin Registered: 22 years ago Posts: 8,532 |
Quote
chanh
There was unexpected output from Phorum. This might indicate a problem:
<br /> <b>Notice</b>: Undefined index: user in <b>f:\wamp\www\phorum\include\users.php</b> on line <b>336</b><br />
This probably was there all the time. The latest release includes some code to be able to catch unexpected output and do stuff with it. In the mambo connector, I have implemented "stuff" to display the info on screen. In the connector, anything can be done with this info though. It could also be logged, mailed or whatever. During development, displaying the info on screen is the easiest way I think. What you can do now as well is print debugging info in the Phorum code. Before, this info wouldn't be visible. Now it will be put in the unexpected output block.
Quote
chanh
Look like some how the connector does not know about the mambo user even though the sync is successful. I check by remove the mambo account in phorum and let it sync and it does.
That's strange. I have running the latest dev version of Phorum + the latest mod_embed on my testsite [mambo.gitaar.net] and there things do work.
Can you try to add the following to the end of the phorum_mod_embed_phorum_common_pre() function in embed_phorum.php?
print "user_id = $user_id / session_id = $sessid";If all goes well, then the user and session id should be set. You also should see that the session id fields (cookie_sessid_lt, sessid_st) in the database match the printed message id for the given user.
The latest release includes setting a cookie to remember the session id. That's the only real new code. You could try to comment out the phorum_mod_embed_phorum_sessioncookie() call to see if this has any influence. It's just before the end of the phorum_mod_embed_phorum_common_pre() function (around line 108).
Also try if disabling and after that enabling the module from the admin Modules screen works. I'm not 100% sure, but I might have shifted a bit with the hooks.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauceEdited 2 time(s). Last edit at 02/18/2006 05:51AM by mmakaay.
|
Re: System for embedding Phorum in other applications (early preview) February 18, 2006 09:48AM |
Registered: 20 years ago Posts: 36 |
|
Re: System for embedding Phorum in other applications (early preview) February 18, 2006 10:09AM |
Admin Registered: 22 years ago Posts: 8,532 |
I have been thinking about that when starting the project, but then decided that would probably already be covered by the portable code or by simply applying the site's layout to Phorum using header.tpl/footer.tpl. But while coding the full embedding I also realized that this would be a more complete solution than the portable code, because a ready connector class would take care of all integration.
The only problem that you run into when combining embedding with Phorum's own users, is that setting a cookie could be troublesome in case the master system already printed data before Phorum is called. Then cookies can no longer be set. By calling ob_start() before the master system starts outputting data can solve that problem though.
For now I'll continue coding for full embedding, but if people are seriously interested in embedding while still using Phorum users, I'll make that possible too. It needs some changes, because now all login related actions are discarded by the module.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
The only problem that you run into when combining embedding with Phorum's own users, is that setting a cookie could be troublesome in case the master system already printed data before Phorum is called. Then cookies can no longer be set. By calling ob_start() before the master system starts outputting data can solve that problem though.
For now I'll continue coding for full embedding, but if people are seriously interested in embedding while still using Phorum users, I'll make that possible too. It needs some changes, because now all login related actions are discarded by the module.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: System for embedding Phorum in other applications (early preview) February 18, 2006 01:16PM |
Registered: 20 years ago Posts: 202 |
Maurice,
I do a fresh install on a different machine just to double check and everything works!
So I will check out my other machine to see what happen there.
Great job!
Thanks
[opensourceCMS.com]
[ongetc.com]
Chanh Ong
I do a fresh install on a different machine just to double check and everything works!
So I will check out my other machine to see what happen there.
Great job!
Thanks
[opensourceCMS.com]
[ongetc.com]
Chanh Ong
|
Re: System for embedding Phorum in other applications (early preview) February 18, 2006 01:18PM |
Admin Registered: 22 years ago Posts: 8,532 |
That's good to hear! At this very moment I was scanning the code to see if I missed something. Thanks for saving me the time ;-)
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: System for embedding Phorum in other applications (early preview) February 18, 2006 04:49PM |
Registered: 20 years ago Posts: 36 |
|
Re: System for embedding Phorum in other applications (early preview) February 19, 2006 06:00PM |
Admin Registered: 22 years ago Posts: 8,532 |
Here's release 0.0.11 of the embed_phorum module. I did some cleaning up and added some features to the templates. I also fixed a bug in the URL parsing of the mambo connector. The new release can be downloaded from the first message in this thread. Here's the full changelog for 0.0.11:
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
0.0.11 2006-02-17
- Added a "to top" link to the index, read, list and search pages so
users can quickly jump back to the top of the page.
- Fixed some rendering problems for MSIE.
- Improved consitency in the templates.
- New feature in settings.tpl: You can enable the following, to
inherit font-family from the master application's CSS.
{VAR feature_css_master_sets_font-family 0}
- Added a class phorum-submit to all buttons, so buttons can be
styled in MSIE too. CSS constructions like input[type=submit] do
not work in MSIE (v6).
- Applied a style to the buttons, similar to Phorum's default
template button style. In the settings.tpl you can easily disable
this default style for the buttons by changing the feature flag
{VAR feature_css_master_sets_buttonstyle 0}
- Fixed a URL rewriting problem in the Mambo connector. This problem
only showed when letting the user jump back to the thead after
posting a reply.
- Dynamic showing/hiding of moderator options is redone. The state
of the moderator options is now remembered using a cookie.
So the moderator does not have to enable the moderator options
on every page anymore, which is good in case there are many
moderation actions to do. Visually, the moderate options switch
is now a simple checkbox.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: System for embedding Phorum in other applications (early preview) February 20, 2006 05:21PM |
Admin Registered: 22 years ago Posts: 8,532 |
Yet another release with some more MSIE template rendering fixes and a couple of new features too. The new release can be downloaded from the first message in this thread. Here's the changelog for this release:
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
0.0.12 2006-02-21 - Again some MSIE rendering problems fixed. - The embedding session id is now removed from the $PHORUM["POST_VARS"]. This was already done for the $PHORUM["GET_VARS"], to prevent the session id from turning up in forms and URL's (because we trick Phorum into doing the URI authentication scheme, it will try to generate URL's with the id in it). - Extended the fix_content() method of the base connector, so relative paths in CSS url(...) definitions are now rewritten to the absolute Phorum URL path too. - Implemented a new method get_profile_link() to the connector class. This method will get a user_id as its argument and it can return the link to use when linking to user profiles. This way it's easy to link to the master application's profile view instead of Phorum's. If this feature is not used, the method can return NULL.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Sorry, only registered users may post in this forum.



