System for embedding Phorum in other applications (early preview)

I walked step by step through the code and I have found a possible spot where the code could get into a loop. Could you please try if replacing include/templates.php with the attached templates.php script does fix the problems on your system?

Edit: Almost forgot: please delete all tpl-* files from your cache-directory after installing the new templates.php script.

Issue was fixed, templates.php replacement is removed from this message

Again a new release of the Phorum embedding module (or "system" might almost be more appropriate by now). Check the first post for a download link. Here's the changelog for this release:

0.0.4 2006-02-06
- Removed PHP5 specific OO code from connector base and descendant
classes.
- Connector init() method was renamed to hook_common_pre() for clarity.
- Moved functionality for url rewriting and query parsing to methods in
the PhorumConnector class, so connectors can handle application
specific rewriting/parsing in case the functionality in the base
connector class isn't sufficient.
- Created a first implementation of a Mambo connector. The connector
supports user synchronization and Mambo specific URL rewriting.
Super Administrator users in Mambo will get the "admin" flag set
for the Phorum account. The passwords for these admin users are
also transferred to Phorum. After a Super Administrator has
visited the embedded Phorum once, he can login to admin.php too.
- The syncuser script now also understands passwords prefixed with
the string $MD5$. When this string is set, embed_phorum_syncuser()
will store the password as an already encrypted MD5 password. This
way it is possible to synchronize passwords that are stored only
MD5 encrypted in the master application.
- The syncuser.php script now keeps passwords for administrators intact,
so they can login to Phorum's admin interface.
- In the templates the [mod_embed_phorum <elementname] dividers are
renamed to [element <elementname>] for clarity.
- Moved creating the $PHORUM_CONNECTOR object to the glue code, so the
glue code has ultimate freedom in setting up the connector object.
- Finished method documentation of PhorumConnectorBase.php.
- The email settings panel in the control center will no longer spawn an
error about the email address not being filled in, in case Phorum is
not allowed to change the email address (in which case that field is
not available in the control center).
- The file.php script output was always printed in raw mode. Now,
that is only done if a file really is downloaded (so error messages
are displayed correctly).

Hemm.. Did that, and everything works allright. Does it matter if I'm running PHP as CGI module? But so far, if I'm using the embed phorum code from default package release, I'm able to fetch the phorum template just fine.

I'll try to look the problem that I might did on the embed_phorum mod.

QuotemmakaayI walked step by step through the code and I have found a possible spot where the code could get into a loop. Could you please try if replacing include/templates.php with the attached templates.php script does fix the problems on your system?

Edit: Almost forgot: please delete all tpl-* files from your cache-directory after installing the new templates.php script.

QuotemmakaayAgain a new release of the Phorum embedding module (or "system" might almost be more appropriate by now). Check the first post for a download link. Here's the changelog for this release:

0.0.4 2006-02-06
- Removed PHP5 specific OO code from connector base and descendant
classes.
- Connector init() method was renamed to hook_common_pre() for clarity.
- Moved functionality for url rewriting and query parsing to methods in
the PhorumConnector class, so connectors can handle application
specific rewriting/parsing in case the functionality in the base
connector class isn't sufficient.
- Created a first implementation of a Mambo connector. The connector
supports user synchronization and Mambo specific URL rewriting.
Super Administrator users in Mambo will get the "admin" flag set
for the Phorum account. The passwords for these admin users are
also transferred to Phorum. After a Super Administrator has
visited the embedded Phorum once, he can login to admin.php too.
- The syncuser script now also understands passwords prefixed with
the string $MD5$. When this string is set, embed_phorum_syncuser()
will store the password as an already encrypted MD5 password. This
way it is possible to synchronize passwords that are stored only
MD5 encrypted in the master application.
- The syncuser.php script now keeps passwords for administrators intact,
so they can login to Phorum's admin interface.
- In the templates the [mod_embed_phorum <elementname] dividers are
renamed to [element <elementname>] for clarity.
- Moved creating the $PHORUM_CONNECTOR object to the glue code, so the
glue code has ultimate freedom in setting up the connector object.
- Finished method documentation of PhorumConnectorBase.php.
- The email settings panel in the control center will no longer spawn an
error about the email address not being filled in, in case Phorum is
not allowed to change the email address (in which case that field is
not available in the control center).
- The file.php script output was always printed in raw mode. Now,
that is only done if a file really is downloaded (so error messages
are displayed correctly).

I think I still encounter the same problem, there is one more additional element to the array with the key name containing the whole output, except without the html and body tag on it, because I use the embed_phorum template now.

Quote
But I notice there is one more element addition to the array, with the key name contains the whole output which include html and body tag as well.

Any though on this? You can still check the link above, for more clear picture of what's happening.

Quotewendy
I just realize the mistake that I did. After struggling with this for a few days, then I just realize that the name of the template folder is embed_forum, instead of embed_phorum. Heheheheeeee :D

Read back the thread. I already told you that a while ago ;-) I'll take a look at your output later today.