1 (edited by youthevang 2005-05-13 19:32)

Topic: PunBB and WordPress Posts

Is there a way that when you post in a WordPress blog to have it also posted in PunBB as well, so that your users may be able to comment on the entry in the forum.  For example if a user or guest clicks on Comments (0), they user or guest would be directed to the topic in the forum so that they may post their comment.  I know that this has been done for Nucleus using the NP_PunBB plugin and I was hoping that there was something similar for WordPress.  I tried to figure out if I could do it with extern.php, but I have had no luck.  Thanks for your help.

2

Re: PunBB and WordPress Posts

I've been thinking about this for a long time.

Gamerz (from the WP forums) was talking about getting something like this working for phpbb a while back but his example link was broken, and nothing ever came of it.

Also, Matt, from WP developed bbPress, and writes a little in the dev list about how integrating the two should be easy to do.

imagine a WP post, and a bbPress series of responses? heavy...

As for punnbb:

My thoughts have been that it would be best to first create a uniformed look and feel.

either get punbb to look like your WP install
or your wordpress install to look like your bunbb design.

op ed:
(this is important for continuity... if you want to use one or the other as the "front end" of your site then it is essential. usually, in communities, when people find your message board, they just directly link there, and never read your pages or news sections again.)

once you have them looking very much the same, the easiest thing to do would be to disable comments on WordPres, and altar the "comments" link globally, and individually in WP.

modfy the link to either load the board inline below the post, or as a popup.

The tricky part is to get the number of replies between the two applications. but, punnbb has a superb rss addition that alexking (also a wordpress benefactor) developed.

possible you could maintain those counts on your main site with a feed.

i am not proficient in php to otherwise determine how you could hard code a function to go see how many replies there have been, and then output the number on the wordpress page.

(however, that code would end this issue, and solved the problem completely!)

dunnoe if my reply is even helpful...

good luck.

Re: PunBB and WordPress Posts

If Wordpress has similar plugin functionality as Nucleus, it should be a walk in the park.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: PunBB and WordPress Posts

I started working on a WordPress plugin.  I am not programmer at all, but below is what I have so far.  Any suggestions would be helpful.

//
function wp2punbb( $id )
{
global $wpdb;

/*
* fetch and process wp data
**/
$posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE ID = '$id'");

if ( !$posts )
return $id;

$post = $posts[0];
$title = apply_filters('the_title', $post->post_title);
$content = apply_filters('the_content', $post->post_content);

/*
* insert into punbb as appropriate
*/
function connectPunBB()
    {
        // connect to PunBB database
        $this->link = mysql_connect($this->getOption('host'), $this->getOption('username'), $this->getOption('password'));
        if (!$this->link)
        {
            sql_connect();
            doError("Cannot connect to PunBB database...");
        }
        if (!mysql_select_db($this->getOption('database')))
        {
            sql_connect();
            doError("Cannot select PunBB database...");
        }
    }

// add the new information into the database
$query="INSERT INTO punbb_posts (post,poster,message) VALUES ('$_POST[post]','$_POST[poster]','$_POST[message]')";
if(!mysql_db_query($dbname,$query,$link_id)) die(mysql_error());
mysql_close($this->link);
// likely a simple insert query
   
return $id;
}

add_filter('post_publish', 'wp2punbb');
//

Re: PunBB and WordPress Posts

One thing that comes to mind is if it would be possible to use PunBB's database class instead of calling e.g. mysql_connect, mysql_query etc manually. That way, you would have your connection to PunBB's database in $db and then use whatever Wordpress uses to talk to it's database.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: PunBB and WordPress Posts

I've actually thought about this a lot as well. I set up a site at http://www.newathens.org for me and my friends, and I found myself wishing for an 'integrated' solution to a community site. I'm SURE I'm not the only one.

The way I see it, most people (nowadays) do what I do - install punbb, wordpress, and coppermine.

I've read a couple of posts about integrating the look/theme into one cohesive site (even though it might be 3 different dbs, etc), and I think there is room for a combo install that would do all three in one shot.

As touched on, I think the thing holding that back is bbpress. I'd much prefer that Wordpress used punbb, but it seems that the original verison that relied on tables scared off the devs. (http://codex.wordpress.org/Release_Philosophy) and (http://codex.wordpress.org/IRC_Meetups).

Taking it one step farther and using punbb for comments on wordpress would be awesome, but might be a bit over ambitious for the time being.

Maybe the best solution would be (like macrumors.com) to set up a thread per wordpress entry automatically, with a link to that inserted into the wordpress post (in addition to the comment link?).

I'm up for trying to make this happen, if anybody else thinks it would be a good idea.

7

Re: PunBB and WordPress Posts

trevor, I'm working towards your same goals but using other tools.

You pick Wordpress, PunBB and Coppermine

I pick Nucleus CMS, PunBB and singapore

I too favor the idea of letting PunBB handle all the conversations in my integrated solution, whether these threads originate from the CMS front end or the gallery.

The situation we have is that we all favor our own front ends and galleries. Some like Wordpress while others favor Mambo, some want to use Coppermine while others care for Gallery. There lies the problem, we're all heading towards the same destination but using different vehicles to get there.

Let's add to that the users of our respective CMS's that want to use a forum other than PunBB, like phpBB or SMF.

What we have is a myriad of combinations where small select groups work on their unique mix. The only such group that gained traction was CPG-Dragonfly, when they integrated Post-Nuke, phpBB and Coppermine. Other than CPG, there's nothing else, just snippets of code here and there on forums.

With any integrated solution, keep this in mind, you have to do it in a way that's easy to keep upgraded. When Wordpress 2.0 comes out, will it be easy to bring your site to the new version or will your mods keep you in 1.5 for not wanting to mess with the code.

Making the bridge is one thing, making it easy to cross back and forth is another.

Re: PunBB and WordPress Posts

That's a really interesting point. I think in the case of Wordpress, the new 'theme' and 'plugin' systems they came out with might help with the upgrading process. What I should look into would be a way to use the same 'theme' between Wordpress and PunBB. Maybe that would be the first step in getting PunBB to work with other programs - trying to use the same 'themes' or whatever they're called in different CMS programs.

9

Re: PunBB and WordPress Posts

I'm so glad this discussion didn't just die like a brick!

You know I don't think that the style issue is that big of a deal. Like a gallery, it's pretty straightforward to style a punbb install like any other "parent" site script (wordpress, nucleus, etc...)

I styled the SPG with my personal WP theme by simply adding the header and footer to the index.php and then combining the css file.

a little this and that and it was done.

To my mind the isse is how to integrate them at the database level.

"a walk in the park" perhaps for some, but for me (falls off his chair laughing.)

I mean, what's the list of important exchanges?

to me:

1. shared users (register at one [punbb,] and be recognized by the other[wp])
2. use punbb instead of comments
3. link the files using template tags [im wp]
ex:
the number of comments is counted by wp
the link to comments is a link to punbb
choice to popup, or reload page

4. the display is a combination of the original post (in wp) and the discussion below (in punbb)

these connections and exhanges seem, frankly, overwhelming to me.

As for which is better, or what to use...

I think that it would have to be a decision made in advance. In that WordPress and Nucleus, MT, and all the poular blog scripts do the same junk, but they work very differently.

I'll try to do my part, and develop some method of theme/templae exchange between WP and Punbb.

got a week or two free, so i can start asap.

Thanks for keeping this going...

10

Re: PunBB and WordPress Posts

Man, I don't know about integrating them at that level. I feel like a good start would be getting a single install, and a unified theme.

Even getting there would seem pretty tough, much less integrating the databases, etc. Don't get me wrong, I think that would be a GREAT idea - but I think it would be better to start with small steps.

As for choosing the programs to integrate, I like the idea of using PHP/MySQL/GPL software as a bundle. That means, to my mind, PunBB, WordPress, and Coppermine.

I think it would be a mean feat to even decide on what programs to tackle! But I'm up for ideas. What I imagined is a single ZIP file to download, a single install script to run, and a unified look when it's all done. Choosing a set of programs to install and getting that far seems like the best first step.

11

Re: PunBB and WordPress Posts

My votes:

WordPress, Punbb, and something very simple like Folderblog, or SPG for the gallery.

Because the first hurdle here is integration of front and back end?

All CSS and a little php.

something complex like Gallery, or Coppemine would demand a secondary backend, whereas SPG etc, only require a first time setup, styling, and then uploading.

WP could easily be modified to upload those images (by type) into the new locations for gallery output.

12

Re: PunBB and WordPress Posts

You know my vote is for Wordpress/PunBB. I'm not into Folderblog because license is terrible:

LICENSE
folderblog is copyright © 2004 Donald Tetto. While you may edit folderblog's source code for personal use, you may not redistribute modified versions of the folderblog code.
http://folderblog.tetto.org/

I really like the look of SPG, especially the "special wp" verison:

This is a special version of Simple PHP Gallery that is pre-configured to pull the gallery into a Wordpress template. Be sure to peruse the readme.

The license isn't GPL, though, which is a bummer. It's CC by-nc-sa, which is OK, but not as nice as GPL. Here are two more gallery-type programs to consider:

http://phpthumb.sourceforge.net/

http://photostack.org/

I agree that the first hurdle is just css and php, integrating the front-end isn't going to be easy. What do you think about a Wordpress plugin that automatically creates a new thread in a specific directory per post? That would be a pretty non-invasive integration option, I think. You could also show the activity of that thread in wordpress, as a secondary 'comments' type indicator.

13

Re: PunBB and WordPress Posts

trevor wrote:

I really like the look of SPG, especially the "special wp" verison:

If you use SPG, check this out: http://tanksoftware.com/gallmage/

14

Re: PunBB and WordPress Posts

I think that "The Gallery Issue" is going to be a setback indeed. There are so many Galleries, and yet, no one is really 100% happy with them.

Here are a couple decent links to people i admire who have thought this over in depth:

http://www.noscope.com/journal/2005/04/photoalbum-cms

http://binarybonsai.com/archives/2004/0 … -solution/

15

Re: PunBB and WordPress Posts

dss wrote:

There are so many Galleries, and yet, no one is really 100% happy with them.

I spent many months looking at gallery scripts, settled on singapore because it was light and had what I needed.

My gallery is just directories, ftp or drag and drop images into them and singapore automatically adjusts to the changes. Uploading one image at a time was not an option for me, I might upload 100's of images at a time and I don't have the time to describe each one.

I was also looking for a gallery script that didn't have MB's of PHP code, which Coppermine and Gallery have. Commenting of images and ranking was not something I needed either, I'd rather have users either comment on my blog or on the forum.

Gallery scripts fall into 2 categories, either they handle a few hundred images or handle thousands. I wanted something that would grow with me and was not be a bear to manage over time.

16

Re: PunBB and WordPress Posts

maybe it would be best to worry about the PunBB and Wordpress end before any photo gallery integration?

17

Re: PunBB and WordPress Posts

Here you go Wordpress and singapore: http://patrick.greentaperacing.us/gallery/

18

Re: PunBB and WordPress Posts

trevor wrote:

maybe it would be best to worry about the PunBB and Wordpress end before any photo gallery integration?

heh...

yeah, good call.

19

Re: PunBB and WordPress Posts

Hi all,

My vote would be for MovableType and Wordpress..