Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbSync

  • This is a WordPress plugin. It will not work as a plugin in bbPress. WordPress and bbPress must be integrated.

    bbSync will integrate WordPress and bbPress pretty thoroughly. Any posts made on the blog will create a new topic on the forums (this supports slugs and anything else that will come). Any replies made to the topic in the forums can be shown under the WP post with <?php felbbreplies(); ?>, and it will show people’s avatars if you use Louisedade’s avatar upload plugin.

    You can migrate the old synchronisation from bbPress Post and delete the unnecessary tables (this plugin keeps its data in topicmeta, with the key wp_posts).

    Hoping to add stuff later, either when I want it myself or when other people want it. I want feedback if you have it! I eat my own dog food and I’m finding it delicious. Will upload as official plugin when I get access.

    bbPress Post and this plugin should not be running at the same time, otherwise you’ll get duplicate topics when you blog. If you get some error about a call to member function of a non-object, there’s a good chance adding this in the middle of your bbPress’ config.php file will help:

    global $bbdb;

    This plugin does need configuring to do anything useful. Head to Options > bbSync and fill things in please.

    http://rapidshare.com/files/35813637/bbsync.zip.html

Viewing 25 replies - 26 through 50 (of 259 total)
  • fel: Disabling the “Do you want me to load bbPress whenever to …” checkbox worked! I’m now getting the replies from the forum topics on indie pages. Just a few quick questions:

    How do you keep it from posting the entire original entry in the forums? (I know the “How much of your blog post do you want shown on the forums? Set it to 0 to get the full post.” option is there, but I don’t quite understand how to use it – for example, make it stop at the <!--more--> tag.)

    What are the rest of the tags (other than <?php felbbreplies(); ?> ) that we can use? I can go ahead and test them out, to make sure that the rest of them are working as well.

    Sneaky: Don’t worry! :)

    Im beginning to believe that there is something inherrently wrong somewhere else that is preventing me from getting anything to work really….

    Ive tried numerous methods at trying to get bbsync and the header/footer integration to work and nothing works for me. All I get is a blank page with both bbsync and header/footer integration….

    I’m not a php wiz by any stretch of the imagination but I am good at following directions and I am picking up PHP as I go along, but nothing is working for me.

    Im at a loss…

    UPDATE: Thinking that the problem with bbsync may have been an incompatibility with another WP plugin, I deactivated all WP plugins except for bbsync, still, nothing…blank page on save/publish post.

    Starrett, there’s a few template tags. Originally I was thinking I could make it so people can customise the comment structure in a seperate template file but dismissed it as thinking that no-one would care (I don’t). It’ll be quite easy to put it back in. They are all used internally, so they do work. Do you use the Avatar Upload plugin, actually? Can’t remember if I made a check for that.

    It’s probably a good idea to let it stop at the more tag. With a link to the original entry? Can do, would make that a generic option (hmm, got quite a lot of options now).

    The option “how much of your post” is the character count. A little less than ideal, I suppose. :P You can set this on a per-post basis by enabling per-post options, too.

    Sneaky, the most important thing is error logs. I’ll see if I can help with that. :)

    ^Thanks fel!

    Fel: I just made a small change to the felbbreplies(); function in order to get a reply link on pages where there aren’t yet any replies. I simply added echo '<h3><a href="' . bbreplylink() . '">Reply!</a></h3>'; to the else clause. If the topic has been created in the forums, it works perfectly, if not, the “Reply!” button simply links to the current page. Not ideal, I know, but it at least makes sure that the reply link appears, whether there are previous replies or not.

    I actually just installed the Upload Avatars plugin, but it doesn’t seem to be working correctly with bbsync – the<?php bbreplyavatar(); ?> portion of felbbreplies(); is returning the following on the WP pages: <img alt="admin avatar" src="http://path_to/wp/forums/avatars/" class="avatar" /> So it appears to know which directory contains the avatar, but doesn’t include the avatar’s file name.

    *Update* – I have just noticed that new forum replies don’t appear back in WP unless the original post is re-saved.

    Sorry to leave you guys in limbo, but I can’t give you the new version because I’m halfway through adding stuff so it probably doesn’t work and I’ve got exams over the next few days so I’m a bit busy :o Will be back on this on Thursday. Could be quite rad! :P

    Hey fel just wanted to give you an update that may or may not help you. BBpress-Post works 1oo% fine for me. All of my wp posts go right into BB and when I click on “leave a comment/discuss in fourm” I go straight to the topic in BB. All I would need is for those comments to come back into wp so that you can view them without going into BB and for the avatars to be supported/viewable in wp which is what bbsync does and it is killing me that I cant get it to work!!!!

    Anyway, I thought this might help because it seems their code/config (use of three php files?) works fine on my end…thought you might able to adapt something in your next version based on this…

    thanks again fel!!!!

    Yeah, I know, but thanks. ^^ In the meantime you can use this hack I brewed up a while ago to display replies as comments beneath bbPress-Post integrated posts. Don’t think it supports avatars, though. But we’ll get this to work :)

    hey fel! Thanks for the reply! I was actually trying this hack now. I am very close but I am getting an error whereby it is looking for my posts in “dbname.posts”. That database doesnt exist, the database is simply wp_posts, not databasename.posts.

    Here is the error:

    [Table 'databasename.posts' doesn't exist]

    SELECT poster_id, post_text, post_time FROM posts WHERE topic_id = 6

    I took out the database name out but i am sure you get the point!


    antonskey
    Member

    @antonskey

    fel, thanks for the plugin. i haven’t tried it yet, but it sounds like exactly what i’m looking for.

    Sneaky, I have an idea of what it is. Find this line near the beginning:

    $bbprefix = get_option( 'wpbb_bbprefix' );

    And replace with

    $bbprefix = 'bb_';

    or your actual bb table prefix.

    Sorry fel but that piece of code isnt in there. This is what it looks like

    ‘<?php

    function felblogtotopicid( $felpostID ) {

    global $table_prefix, $wpdb;

    $posts_table = $table_prefix . “bbpress_post_posts”;

    $topic_id = $wpdb->get_var(“SELECT topic_id FROM $posts_table WHERE post_id = $felpostID LIMIT 1;”);

    return $topic_id;

    }

    global $post, $wpdb;

    if( $forumtopic = felblogtotopicid( $post->ID ) ) {

    $bbprefix = get_option( ‘wpbb_bbprefix’ );

    $replies = $wpdb->get_results( ‘

    SELECT poster_id, post_text, post_time

    FROM ‘ . $bbprefix . ‘posts

    WHERE topic_id = ‘ . $forumtopic

    );’

    I think it has something to do with ‘$table_prefix, $wpdb;’ and ‘$posts_table = $table_prefix . “bbpress_post_posts”;’. My table prefix is not wpdb (where wpdb = database name) it is just wp. Plus that ‘.’ in there is throwing it off as well as the error reads:

    [Table 'databasename.posts' doesn't exist]

    SELECT poster_id, post_text, post_time FROM posts WHERE topic_id = 6

    “.posts” That ‘.’ is getting into the code and appending itself to the db name…

    I think…

    You are the master though….

    It’s there! I’m looking at it right now. In the code you copied it is line 10.

    The bb_posts table is what we’re looking for, not wp_posts (also a table), and it tells you the databasename.tablename so it’s actually trying to look for a table called “posts”. I don’t think the wpbb_prefix option exists in your tables, I suspect that’s a Latest Discussions plugin thing (ah, hindsight). If it did, it would read bb_. The . is used to join two strings together, so what it should be doing is joining 'bb_' and 'posts' together into the table name 'bb_posts', but since that option doesn’t exist in your tables it just join together '' (a blank) and 'posts', leaving us with the incorrect table name of just 'posts'. I suspect.

    I am blind thats why I called you the master. I will fix it as soon as I can! Now go study!


    antonskey
    Member

    @antonskey

    like i said, i haven’t implemented this plugin as of yet (haven’t even installed bbpress, just planning to in the near future), but will this plugin allow me to put the “Add this topic to your favorites” link on the wordpress post page? i would like to have that capability to allow the users who don’t comment to create a list of their favorites without having to follow the link to the thread in the forum to do so.


    antonskey
    Member

    @antonskey

    sorry for the double post, my internet’s screwy

    fel! Sucess! That got it to work! The only problem now is that the Reply link is not pointing correctly to the topic, it is pointing to the post’s permalink…

    Oh well, I will wait for bbsync to do the rest!

    Anton, no. :o But looking at your site I see you have a password-protected post, which reminds me I should deal with that.

    Sneaky, cool!

    Sneaky, sitting on some code to look through error logs here but it’s working at what you might call a sub-optimal level in several respects. Gonna brood on it some more, sorry to still leave you waiting. Will upload it when it works.

    Hey, got that to work surprisingly quickly, all that file stuff was new to me. This (bb) plugin should work on .8.2.

    http://rapidshare.com/files/38571149/errorlogs.php.html

    Tell me if it finds any error logs. I hope all servers handle it the same! I think mine is Linux so if yours is Windows then maybe it won’t work, I dunno.

    Well crap.

    I tried to upgrade to the new version of bbPress today, and now my entire setup is, well, broken. All I get from the forums is “Doesn’t look like you’ve installed bbPress yet, go here.” yet I have already installed them (it gave me this earlier, so I went in, cleared the database tables as there wasn’t anything important in the forums yet, and reinstalled completely) and have confirmed this by checking the database to make sure everything was there. Now I can’t post anything in WP because every time I try, the bbPress install gives me the same “Doesn’t look like…” message. I’ve gone ahead and disabled bbSync until I can figure out what is up.

    This is the function that checks if you’re installed.

    function bb_is_installed() { // Maybe we should grab all forums and cache them.
    global $bbdb;
    $bbdb->hide_errors();
    $installed = $bbdb->get_var("SELECT * FROM $bbdb->forums LIMIT 1");
    $bbdb->show_errors();
    return $installed;
    }

    Your database version must be correct because it connects ok. Are you sure there’s something, anything, in bb_forums?

    Ah ha! There aren’t any records in bb_forums, but the table is there. Any suggestions?

    Yup. If you have any backups, take data from that, else fill with some fake data.

    Hey fel, I dont know how to use this php file. I put it in my-plugins, now what?

Viewing 25 replies - 26 through 50 (of 259 total)

The topic ‘bbSync’ is closed to new replies.