The prestaForumConnectorPlugin aims to provide an easy way to connect an user management system to the forum solution of your choice.

Just choose the connectors of you choice for the user management system on one part and for the forum solution, follow the install instructions and you will be able to use the same user database and the same login process.

For example, this will allow you to connect sfGuard to phpBB3. Currently only sfGuard (Propel or Doctrine versions) and phpBB3 are supported. More will come.

The prestaForumConnectorPlugin aims to provide an easy way to connect an user management system to the forum solution of your choice.

IMPORTANT : this plugin was designed for phpBB 3.0.6 and sfDoctrineGuardPlugin 4.X. If you use other versions, it is necessary to validate that the existing connectors are functional.
We will not make further changes to this plugin and we will not correct the problems raised, unless a patch is being provided and we just have to integrate it and create a new minor release.

Just choose the connectors of your choice for the user management system on one part and for the forum solution, follow the install instructions and you will be able to use the same user database and the same login process.

For example, this will allow you to connect sfGuard to phpBB3. Currently only sfGuard (Propel or Doctrine versions) and phpBB3 are supported.

Developers

License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Release 1.0.0 - 24/11/2009

prestaForumConnectorPlugin

The prestaForumConnectorPlugin aims to provide an easy way to connect an user management system to the forum solution of your choice.

Just choose the connectors of your choice for the user management system on one part and for the forum solution, follow the install instructions and you will be able to use the same user database and the same login process.

For example, this will allow you to connect sfGuard to phpBB3. Currently only sfGuard (Propel or Doctrine versions) and phpBB3 are supported. More will come.

Extending the plugin in order to create a connector to an other user management system can be done very quickly.

Installation

Install the plugin

./symfony plugin:install prestaForumConnectorPlugin
./symfony cc

Be sure to have the plugin enabled in /config/ProjectConfiguration.class.php

In /config/ProjectConfiguration.class.php in setup method add a connector to the clear:cache task event in order to clear forum cache when clearing project's cache

In /config/database.yml be sure to have a connection for the database that will contain forum's tables (can be the same database as for the project or a different one).

In /config/app.yml add the following options (and personalize them for your needs)

all:
prestaForumConnector:
userConnector:
class: presta%%UsedUserConnectorName%%Connector # the name of the connector to use (here we use sfGuardPropel as user management tools)
# param:
# for the required parameters see the help related to the connector that you're using
forumConnector:
class: presta%%UsedForumConnectorName%%Connector # the name of the connector to use (here we use phpBB3 as forum platform tools)
# param:
# for the required parameters see the help related to the connector that you're using
forumWebDir: <?php echo sfConfig::get('sf_web_dir');?>/forum/ # path to the forum directory
forumDatabaseId: default # the identifier of the database connection to use for the forum solution as defined in database.yml

If necessary add the following line to .htaccess file under the "RewriteEngine On" line

# redirect to the index file if index.php in not present in url for the forum
RewriteRule ^forum/$ forum/index.php [QSA,L]

See the help related to the connectors you use for continuing the installation.

Once the connector installation is finished launch the patchForum task, that will patch you're forum solution in order to link it with user management system.

./symfony prestaForumConnector:patchForum frontend --env=dev

Once this task is finished and has succeed, you can synchronize your user database.

./symfony prestaForumConnector:synchUser frontend all --env=dev

Forum Connectors

PHPBB3

Installation

In /config/app.yml define the following options for the forumConnector

This taks will ask for user's password, and ask if the user should be considered as the forum's founder

Forum upgrade

If you want to do a forum upgrade (eg from v3.0.5 to v3.0.6), it is recommanded that you reinstall the forum from scratch in order to get the forum patcher to work.

User Connectors

sfGuard - Propel version

Installation

Be sure to have sfGuardPlugin installed and configured

In /config/app.yml define the following option for the userConnector:

all:
prestaForumConnector:
userConnector:
class: prestaSfGuardPropelConnector
param:
getUsernameMethod: getUsername # define here the name of the sfGuardUser's method to use for retrieving the username
getEmailMethod: getEmail # define here the name of the sfGuardUser's method to use for retrieving the email. Can be getUsername if the username is the email. If needed create yourself this method if the email is stored in another table like the profile table.
getCultureMethod: getCulture # define here the name of the sfGuardUser's method to use for retrieving the user's preferred culture. If needed create yourself this method if the culture is stored in another table like the profile table or if it is a constant.

Change the parent class in myUser.class.php

class myUser extends prestaForumConnectorSfGuardPropelSecurityUser
{}

Add the following methods to sfGuardUser.php in order to synchronize forum's users when sfGuard's users are updated

sfGuard - Doctrine version

Installation

Be sure to have sfDoctrineGuardPlugin installed and configured

In /config/app.yml define the following option for the userConnector:

all:
prestaForumConnector:
userConnector:
class: prestaSfGuardDoctrineConnector
param:
getUsernameMethod: getUsername # define here the name of the sfGuardUser's method to use for retrieving the username
getEmailMethod: getEmail # define here the name of the sfGuardUser's method to use for retrieving the email (should be getEmailAddress for latest sfDoctrineGuardPlugin). Can be getUsername if the username is the email. If needed create yourself this method if the email is stored in another table like the profile table.
getCultureMethod: getCulture # define here the name of the sfGuardUser's method to use for retrieving the user's preferred culture. If needed create yourself this method if the culture is stored in another table like the profile table or if it is a constant.

Warning: If you use latest sfDoctrineGuardPlugin version with email field included, be sure to redefine the 'getEmailMethod' to 'getEmailAddress'.