I was wondering what the best way would be to integrate a forum (e.g. phpbb). Since it’s a fresh project, I’m thinking to simply use the phpbb authentication process as Yii authentication too. I guess the only thing left then would be the theme, but I doubt there’s an easy way to integrate that, so I’ll just have to create it twice.
Has anyone already attempted a forum software integration, and how did you do it?
Yii is a framework, whereas phpbb is a content management system.
It is not clear to me what you meant by integration. As far as I can tell, it’s a bad idea.
Rewriting thousands of lines just to have the login process in common is not worth doing. You’ll finish sooner if you use phpbb’s internals to reach your goals.
Unless you are willing to rewrite half your application to conform SMF/PunBB/phpBB/etc user tables, or you are willing to rewrite half your bulletin board to conform your user tables, I think there is no right way to do this.
That’s why I suggested to build a simple forum engine on top of Yii.
I know that. It is for a from-scratch project which I know I’ll need a forum for. Might as well take an existing forum instead of reinventing the wheel, right?
My question was simply if there’s anything that could be integrated beyond the login part, but I suppose not then.
AFAIK, PHPbb is a forum software, not a full blown CMS. Integration is a nice thing. For example, for Drupal (or Joomla) a number of bridges exist to integrate the CMS to popular forum software, like SMF, PHPbb, etc.
As far PHPbb offers an API, in theory, it could integrate nicely with Yii.
I have spent some time trying to something as simple as check for an existing authenticated session in Yii from another webapp, but have failed… unfortunately no one on this forum has been able to provide any further information about how I might get it working… I am still trying when I find time.
If you manage to get a simple user profile integration working with a 3rd party forum then I think it will open the door for many other integrations. I’m not sure pestaa really understands what you want to do, or how simple it should be. If your forum app is able to use external authentication then you may have some chance of getting it working, otherwise you will probably have to hack it somehow, but definitely not have to change the DB schema. But IMO first you need to be able to retrieve the existing Yii session and get at user profile data.
Saying your going to integrate a 3rd party software with yii is pretty vague… Do you mean you want them to run together? Eg, share view/template files, etc? Or do you want them installed separately, but perhaps share the user table or other database components. Are you planning on using SOAP or some API for the applications to communicate with each other? is an API available, or will you create one?
I guess the main request here is to share authentification so that users don’t have to register twice on your site if a forum is incorporated. With Yii’s flexible authentication scheme this should be possible. You’ll maybe have to change some part of the auth code of the forum software. It will depend a lot on the quality of the forum code wether this is a hard issue.
The starting question for me would be: Should registration happen in the Yii application and user accounts then be also available in the forum? Or the other way round: forum users should automatically be users in my Yii application. Based on that decision you then can think about further steps. But investigation of the forum’s auth code will be inevitable.
yii’s site integrates a 3rd party forum, although I’m not entirely sure that this site is written with the framework. it would be excellent to have a yii forum extension, i could see a simple forum implementation taking about 2-3 months to develop correctly.
Jonah, I think it was your yii blog I read… Aren’t you working on a forum extension?
First you have to understand/figure-out how the other system (let it be a CMS, Forum or Blog engine) does the authentication (creating a user, login, logout etc).
Second, you’ll have to build a bridge between the 2 DB and map the users together, depending on your situation, the userIDs might be different.
Maybe you can let Yii handle the registration and login process and just “import” the user into the other system. (meaning, they can’t register just for the Forum part etc…)
All parts of the yii framework website is built using yii, apart from the forum. The login checks for guide/tut/cookbook/extension/comments uses the forum’s db user table for authentication.
This is done by creating a new CUserIdentity class and write an authenticate method that checks username/password (and min number of posts) against the forum’s user table.