I'm building a website with codeigniter (PHP) and I'm looking for a forum easy to integrate with my current database so users don't have to register twice. Moreover, I need to use the same html head and styles that in my website, placing the forum inside a div of <body>
Could anyone recommend me any simple forum applica开发者_Go百科tion for my situation? Thanks.
I'm not aware of CI-specific solutions, but I've used a couple times MyBB and I can say it's really easy to integrate anywhere, as (at least in the 1.6 release, I haven't use it for some time) it's structure is easily moddable. I integrated it in a Joomla! website and in a custom one, and in both ways it's just a matter of reading the mybb_users
table for access; it's quite a detailed table, so you can find almost anything you need for a registration table, like salt,password,timestamp of registration,email, and so on, so you just need to query that table and you're set.
As for the integration with CI I think the best way would be to place the whole forum folder and access it there; for the header, footer and other website parts you just change the relative forum template (layout are divided into subsets of templates, so you can change it easily and in details) and the user would not notice they are different applications.
You can also try and build a CI library for communicatin with the forum; they don't have an official API, but in functions.php
and a couple other files I don't remember now (yes, 1.6 was mostly procedural, hope they have changed it now) you'll find all the relevant MyBB core, so building an API is straightforward; I once built own for Joomla! and was really easy.
Moreover, there's This guy who wrote an integration for MyBB which is, in fact, a nice API; I don't know how updated it is, just check, but It's not difficult to port those files to a Codeigniter custom library, in case.
For database integration you're not going to find a forum that uses the same DB architecture as CodeIgnitor. What you can do, however, is alter your PHP registration scripts (for both CodeIgnitor and your forum) to add an entry in both member records.
Depending on your database you can also use Database Triggers to automatically update the other table when one is updated.
As for your layout, anything can be modified. Open source options will be the simplest, so I'd recommend phpBB for simplicity sake.
For more information on Database Triggers in MySQL, see here: http://dev.mysql.com/doc/refman/5.0/en/triggers.html
I would suggest using PHPBB forum or Wordpress with the BuddyPress plug-in.
I'm not quite sure how the integration with your codeigniter would be, but seeing as PHP is open-source, it shouldn't be too hard to crack open and find out.
精彩评论