Page 1 of 1

Combining Serendipity with phpBB2

Posted: Wed Apr 05, 2006 12:15 am
by hadrian
I'm implimenting some forums for my social commentary site using phpBB2. I'm using the latest beta of Serendipity. So far we have found the comments feature to be not robust enough and basically want to replace it.

We'd like to make a forum in PHPBB2 and then have Serendipity automatically add a new topic entry to that forum every time I post, instead of having comments. Also, the comment URL attached to the entry would load up the correct phpBB forum and topic.

I know this is possible, my question is more regarding whether it is easy? feasible? has anyone done it before and can instruct me what code to modify? I am fairly good with PHP but don't know exactly how Serendipity is structured in order to make the necessary changes.

Also, should I then make sure phpBB and Serendipity use the same SQL database?

Thanks for any help....

Re: Combining Serendipity with phpBB2

Posted: Wed Apr 05, 2006 11:33 am
by garvinhicking
Hi!

Such a thing can be done quite easily with a serendipity plugin.

Just create your PHP plugin and hook it into the "backend_publish" hook. This gets executed anytime a new entry is published, and then you can make your PHP plugin create the phpBB forum topic.

You can save the new thread ID within the serendipity_entryproperties table then, and fetch it when displaying your entries.tpl template smarty file. Just place a code like

Code: Select all

<a href="{$entry.properties.phpbb_link}">Discuss</a>
You might want to look at some easy event plugins for an example. The best one to start with might be the serendipity_event_weblogping plugin. This also executes something when an entry is saved; you can just replace the PING code with your PHPBB insertion code.

HTH,
Garvin

Posted: Wed Apr 05, 2006 11:45 pm
by hadrian
Excellent; I should be able to craft something fairly quickly later this evening. Thanks for pointing me in the right direction.