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 - 101 through 125 (of 259 total)

  • crowspeaker
    Member

    @crowspeaker

    fel,

    With that line commented out, it does NOT create the new row in wp_user_meta. (I also reverted the f00_capabilites line).

    It still will not post where I tell it to go, and it is ignoring the length I give, only creating a topic but no post.

    Aargh!

    Here’s a link to an html file with setup. Running on a Mac, OS X 10.4.10.

    http://rapidshare.com/files/46575069/setup.html

    Alright. That makes it somewhat more difficult because I cannot tell what functions are called with that hook, but maybe it is possible to find out.

    No post, you say? The mystery deepens.

    Thanks for the phpinfo. Unfortunately OS X is somewhat difficult for me … perhaps I’ll be able to do this at a friend’s house. We shall see.

    Cheers. :)


    crowspeaker
    Member

    @crowspeaker

    What is that? Spam?

    Yeah. Someone’s already tagged it modlook but it seems that Trent, mdawaffe and matt are all away or not checking it.

    just got to it! thx everyone!

    Trent

    fel,

    Just a quick question about the plugin before I install it. From the readme it sounds like the bbpress topic is the only place where wp comments and bbpress replies will be shown in the correct order (ie. by post times). The wp post will show all the wp comments first and then the bbpress replies secondly via the felbbreplies() function. Is this correct?

    No, the felbbreplies() function will show all comments/replies made anywhere by a registered member. Or should.

    great thanks!

    I think that wp 2.3 will break this as there’s (currently) a function name conflict – both use get_tag(). Will have to see about that. I’m sure bb’s function name will eventually shift but not sure when.


    joe12south
    Member

    @joe12south

    Would very much love to use this plug-in, but even after moving heaven and earth to find my absolute path on a Godaddy hosting account :-) I am still getting errors.

    When I try to publish a new article I get this:

    Fatal error: Call to a member function on a non-object in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/functions.php on line 997

    When I try to submit a comment I get this:

    Warning: Missing argument 2 for felsynccomment() in /home/content/a/d/m/adminsportzzz/html/wp-content/plugins/bbsync/bbsync.php on line 105

    Fatal error: Call to a member function on a non-object in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/functions.php on line 1216

    This is a completely fresh install of both WP (2.3) and BB, btw. Any help would be greatly appreciated.

    Hey Joe,

    try adding $bb_cache and $bbdb to the list of globals in your config.php file (as outlined earlier in this topic, or ask if you’re unsure). That seems to cause the error publishing articles. That said, right now I also get an error publishing but it seems to work fine – I’ll look at that when I’ve got my dev machine again.

    The error for comments I don’t understand. Line 105 seems to be a function declaration: https://plugins-dev.bbpress.org/browser/bbsync/trunk/bbsync.php#L105, so how it could be missing an argument I don’t know. Are you using the latest version of bbsync, too?


    joe12south
    Member

    @joe12south

    Felix,

    Thanks for the tip. Alas, still not working.

    – I am running the most recent version of bbPress.

    – I added those two lines to my “config.php” file. (I assume it doesn’t matter where they are added within the file?) Now, when I attempt to save a post, I get this:

    Warning: array_filter(): The second argument, 'Array', should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275

    Warning: array_filter(): The second argument, 'Array', should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275

    Warning: array_filter(): The second argument, 'Array', should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275

    Warning: array_filter(): The second argument, 'Array', should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275
    bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'http://www.eloiproteka.com/2007/10/08/chapter-1-school/'>Chapter 1: School <' at line 4]
    INSERT INTO bb_posts (forum_id, topic_id, poster_id, post_text, post_time, poster_ip, post_status, post_position) VALUES ('1', '2', '1', '

    A long time ago—before trucks and trains and airplanes—everything moved along rivers. The town of Apollo had sprouted from the banks of one of those rivers, and grew up the hill until it reached the top where everyone must have decided that was quite far enough. Henry Kropp lives in Apollo. Henry’s family is much the same as every other in town, just as their home is much the same as every other 3-bedroom cottage on the hill. Much the same, but not quite.

    Chapter 1: School

    ','2007-10-09 22:59:09', '69.180.212.106', '0', 1)

    Warning: array_filter(): The second argument, 'Array', should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275

    Warning: array_filter(): The second argument, 'Array', should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275

    Warning: array_filter(): The second argument, 'Array', should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php:271) in /home/content/a/d/m/adminsportzzz/html/wp-includes/pluggable.php on line 390

    When I try to post a comment, I get this:

    Warning: Missing argument 2 for felsynccomment() in /home/content/a/d/m/adminsportzzz/html/wp-content/plugins/bbsync/bbsync.php on line 105

    Warning: array_filter(): The second argument, 'Array', should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275

    Warning: array_filter(): The second argument, 'Array', should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/a/d/m/adminsportzzz/html/wp-content/plugins/bbsync/bbsync.php:105) in /home/content/a/d/m/adminsportzzz/html/wp-includes/pluggable.php on line 390


    slexaxton
    Member

    @slexaxton

    I love the plugin fel. It takes a while to get used to what file is doing what, but to anyone who is using it along with the integration scripts you might realize that the posts on the forum show up as comments and visa versa, but the comment count on the main page only counts the comments made via wordpress, and doesnt take into account the comments that show up, but were originally made in the forum.

    I added a function in the plugin that just recieved the number of posts (since this data is correct).

    function bbreplycount() {
    global $id, $opshuns;
    $posties = 0;
    if( !$opshuns )
    $opshuns = get_option('bbsync');
    require_once( $opshuns['bbpath'] );
    $topic_id = felwptobb( $id );
    if( $topic_id ) {
    $topic = get_topic( $topic_id );
    $posties = $topic->topic_posts;
    }

    return $posties - 1;
    }

    Using this I was able to modify the comments_popup_link(...) to accept another variable (the number of posts returned by the new function). Then instead of getting the number of actual comments via the wordpress method, I simply replaced my new variable with that function call. Viola, works like a charm.

    Its nothing serious, but could be helpful to some. cheers. Thanks again fel.

    Yo. Glad you like it! That is cool.

    Hwo did you modify comments_popup_link()? Because that could be a potentially very neat way to avoid all those template changes necessary. Especially if you made your changes using a hook or filter it would be great if I could put that into bbSync. But even if you just modified the bit in the template where it calls c_p_l() that would still be interesting.


    joe12south
    Member

    @joe12south

    Felix,

    Any ideas for me? I REALLY want this to work. Any help would be much appreciated.

    Yeah, sorry for the delay. I think I fixed stuff last night – at least my error messages are gone – so I’ll upload a new version.

    Here we go, use the download link at the very bottom to get it (or use the normal plugin page, once it’s updated).


    joe12south
    Member

    @joe12south

    Thanks, Felix. I’ll give it a shot.


    joe12south
    Member

    @joe12south

    Got this when saving a post after replacing my “bbsync.php” file:

    Warning: array_filter(): The second argument, 'Array', should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php:271) in /home/content/a/d/m/adminsportzzz/html/wp-includes/pluggable.php on line 390


    joe12south
    Member

    @joe12south

    And this when trying to leave a comment via WordPress:

    Warning: array_filter(): The second argument, 'Array', should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275

    Warning: array_filter(): The second argument, ‘Array’, should be a valid callback in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 271

    Warning: Invalid argument supplied for foreach() in /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php on line 275

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/a/d/m/adminsportzzz/html/forum/bb-includes/capabilities.php:271) in /home/content/a/d/m/adminsportzzz/html/wp-includes/pluggable.php on line 390

    Well that’s one error message down!

    Have you tried adding $bb_roles to your list of globals in config.php?


    joe12south
    Member

    @joe12south

    Thanks, Felix. Getting closer.

    Okay, I added “$bb_roles”

    – Now, I get no errors when creating an entry in WP. The topic is created in bbPress. Yay! Progress!

    – If I post a comment from WP, I get a blank page back on submit. If I go back and look at the entry, the comment is actually recorded, though. It is also present in bbPress.

    – If I post a reply from bbPress, it does not show in WP. Is this expected?

    hey fel,

    thanks for all the work on this plugin, before i found it, i thought i was going to have to write one myself!

    i am currently working on getting it up and running with wpmu, figuring out as i go along. i have a few suggestions, and i’ll compile them once i’m completely done hacking this thing (i’m pretty close).


    slexaxton
    Member

    @slexaxton

    Hey fel, sorry for the delay in replying. I did it the less cool way you mentioned. Just changed the template to call my own modified function with an extra parameter passed to it (the amount of posts in the topic -1). Pretty simple, but worked like a charm. You probably couldnt modify that stuff through your plugin, but you could do some magic by just writing some felfunctions that mostly do that same stuff as wordpress’s functions and then add them to the plugin. idk.

    I do have a weird bug that im trying to figure out, I think crowspeaker had a similar one. I actually think his bug might be two separate bugs.

    I can post back and forth and see comments yadadaada, everything works EXCEPT:

    If I make a post in wordpress as an administrator, I lose my administrator powers in the forum (the forum only). I get the extra capabilities(member) thing. I just delete that database entry and i can go full on again. I havent quite tracked the culprit down yet, but ill let you know. For now I can just hack it and delete that entry after every post if it exists. rofl. dont ever do that though.


    slexaxton
    Member

    @slexaxton

    This has been scarcely tested, but I think I have a fix for my bug… weird…

    in the bb-includes/capabilities.php file there is a function at the bottom that looks like this:

    function bb_give_user_default_role( $user ) {
    if ( !( is_object($user) && is_a($user, 'BB_User') ) )
    return;
    $user->set_role('member');
    }

    I changed it to look like this:

    function bb_give_user_default_role( $user ) {
    if ( !( is_object($user) && is_a($user, 'wp_User') ) )
    return;
    $user->set_role('member');
    }

    Instead of checking to see if the bb_user existed, we wanted to check to see if the wordpress user existed, assuming we merged our user table. For some reason, this seems like a bug in the bbPress code. Shouldn’t that be a variable prefix to begin with?


    slexaxton
    Member

    @slexaxton

    ONE more post for now. My next task… Do we really need redundant blog comments if we call felbbreplies? I have this whole table of comments stored for anything posted through the blog, but i dont think I ever access them. If someone knows a quick way to help me out let me know. Otherwise, I think I’ll work on that tomorrow. Thanks again felb, you’ve saved me hours of work.

    -Slex

Viewing 25 replies - 101 through 125 (of 259 total)
  • The topic ‘bbSync’ is closed to new replies.
Skip to toolbar