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 - 176 through 200 (of 259 total)

  • Dreamstruck
    Member

    @dreamstruck

    Thanks fel…

    I’ll give this a try and see if I can get it to work out.

    Thanks for your help, it’s much appreciated!

    are there any issues with bbsync and WPMU?

    Not as far as I know. There certainly shouldn’t be any function name conflicts.

    If you try it out, can you mention here whether it works or not?

    I have it installed on WPMU and had no issues WPMU-related. The only setback is that you have to configure the bbsync setting on every blog in WPMU separately. It wasn’t a big deal for me because I only have 5 blogs on my site, but if you have more, it could be quite cumbersome.


    williamtildesley
    Member

    @williamtildesley

    how exactly would I send people to the forums instead of commenting on the blog? I notice that you do this on your own website.

    Forgive me if this is terribly simple to do.

    I put this in my template:

    <?php if($topic_id = felwptobb( $id ) ) { echo '<a href="' . bbreplylink( $topic_id ) . '">Reply!</a>'; } else { comments_popup_link('&nbsp;comments', '1 comment', '% comments','',''); } ?>

    Not at all, it’s a perfectly reasonably question. :)

    hmm.. posts gets n´s all over them…

    projects. Please check back later for for more news regarding this.
    n
    nCode test
    n n< ?php n// Testing.. n if (function()) n { etc...

    [code='php']
    n< ?php
    n// Testing..
    n
    if (function())
    n
    {
    etc...

    Ho hum. That’s pretty annoying, isn’t it? I put in a $bbdb->escape() because otherwise some database error would annoy me, but this way may well be worse. I’m not sure what to do; bb gets it nicely encoded through coming through $_POST I think. Still thinking about that one (if anyone knows what is probably quite obvious and tells me, that’d be great).

    hmm ok :) think ill wait and get back to that page later then..


    williamtildesley
    Member

    @williamtildesley

    thank you very much that worked a treat.

    I am also having a little difficulty when it comes to posting replies on the forum and then them appearing on the comments in the blog post. Sometimes it doesn’t work and sometimes it posts the same comment multiple times, is this a bug, can it be corrected?

    If i submit a post in wp with tags .. the tags are missing in bbpress. They dont get synced?

    William: does a single, unique reply in bbpress sometimes not appear in wp and sometimes appear several times? Does this change as you reload the page or does it change from reply to reply (but stay consistent between refreshes)?

    Vafaaaan: they don’t. I’ve yet to implement that.

    Fel: I,ve been having the same issue as William with multiple replies in WP and for me it stays consisten between refreshes and sometimes changes from reply to reply.

    fel: ok.. to bad .. im trying figure out the relationships in the DB , seems complex. Why isnt there a wp_tags table? :) Will you implement it? or should i try do some coding myself?


    williamtildesley
    Member

    @williamtildesley

    Okay so this is what happens for me.

    I write a blog post then as a user I post on the blog (once) it comes up as the comment has been posted twice. When I refresh the page nothing changes.

    In the forums though the comment only shows as being posted once.

    When I post a comment in the forum it does it correctly however on the blog post (in the comments) the comment from the forum is doubled.

    And the original comment (the blog comment I made) is fixed and put back correctly.

    Also the time and date can be messed up.

    The way this happens is pretty sporadic.

    Hope that helps.

    Yo. That does help, cheers William. It sounds like I’m not getting rid of comments properly. For the ones that show up all duplicate, is the comment_type in the database comment?

    vafaaaan, you’re always better off using the API. The actual relationship is this (with table names taken from vague memory) if I recall correctly:

    wp_terms lists all the terms, stores data for them

    wp_term_type assigns a type to the terms (so it says whether a term is a tag or a category)

    wp_term_relationships links a term to an object, like a post

    object_id in wp_terms_relationship is that ex. the post id ?


    williamtildesley
    Member

    @williamtildesley

    Hey,

    For the comments that have been double posted they do not appear in the database at all.

    And btw for the comments that do appear in the database they do not have any info in the comment_type field.

    Yess .. i did it..

    Wrote some lines that gets a posts TAGS .. how do i proceed ?

    <?php
    //
    // Fetch a WP posts tags by Kent
    //

    $db_type = 'mysql';
    $db_host = 'localhost';
    $db_name = 'xxxxx';
    $db_user = 'xxxxx';
    $db_pass = 'xxxxx';

    // Just picked one, for testing.
    $post_id = "6";

    @mysql_connect($db_host,$db_user,$db_pass) or die ("Couldnt connect to database!");
    @mysql_select_db($db_name) or die ("Couldnt select the requested MySQL table!");

    $fetch_post_tags = mysql_query("
    SELECT
    wp_posts.ID AS POID,
    wp_term_relationships.object_id AS RELID,
    wp_term_relationships.term_taxonomy_id AS TAXID,
    wp_term_taxonomy.taxonomy AS TAXONO,
    wp_term_taxonomy.term_id AS TAX_TERID,
    wp_terms.term_id AS TERID,
    wp_terms.name AS HOT_TAG_NAME
    FROM
    wp_posts,
    wp_term_relationships,
    wp_term_taxonomy,
    wp_terms
    WHERE
    (wp_posts.ID = wp_term_relationships.object_id AND wp_posts.ID = '$post_id')
    AND
    (wp_term_taxonomy.taxonomy = 'post_tag' AND wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id)
    AND
    (wp_term_taxonomy.term_id = wp_terms.term_id)
    ORDER BY wp_terms.name ASC
    ") or die ("Cant fetch data!");

    if (mysql_num_rows($fetch_post_tags) > 0)
    {
    $rowid = 1;

    echo "<table border="1">";
    echo "<caption>WP posts tags</caption>";
    echo "<tr style="background-color: #DDEAD5;">";
    echo "<th scope="col">Post ID</th><th scope="col">Tag</th></tr>";

    while ($blog = mysql_fetch_array($fetch_post_tags))
    {

    if ($rowid == 1)
    {
    echo "<tr><th scope="row">" . $blog['POID'] . "</th>";
    }
    else
    {
    echo "<tr><th scope="row">&nbsp;</th>";
    }

    echo "<td>" . $blog['HOT_TAG_NAME'] . "</td></tr>";

    $rowid++;
    }

    echo "</table>";
    }
    else
    {
    echo "Found nothing!";
    }
    ?>

    Please dont kill me.. im no pro coder.. :)

    William, that’s pretty strange. What do you see without bbsync on?

    vafaaaan, if you want more tags help you should ask the wp forums. Note that I wouldn’t like to use it for bbsync unless it uses the API.

    that was just a test if i understand the relationships between the tables. I can probably write a own plugin that updataes the tags bb_tags etc. but thats not a good solution

    What db stuff exists? $bbdb->get_col($sql) .. get_row ? get_array ?


    williamtildesley
    Member

    @williamtildesley

    With the plugin deactivated the database still shows only the two comments and again without the comment_type field filled in.

    Is their anything I could provide you with to help you help me :)

    vafaaaan, take a look at the wpdb documentation. It’s mostly the same.

    William, no, that’s cool. I’ve got a comment, found the same problem, and trying to figure out where my code is going wrong. But I appreciate all the help you’ve already given me :)

    fel.. cant get any results .. i know the sql string works ( tried in phpmyadmin)

    global $wpdb;

    if ($taglist = $wpdb->get_results($chk_sql))

    {

    Edit: nevermind.. was a is_numeric that break the function somehow

Viewing 25 replies - 176 through 200 (of 259 total)

The topic ‘bbSync’ is closed to new replies.