Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Markus Echterhoff

    (@mechter)

    Here you go:
    https://www.putlocker.com/file/C123B17DA6FEBF38

    You’ll have to create an instance of the MybbXPCommentFetcher class, call its fetch method, passing the WordPress post ID that you’d like to display the comments for. The method will obtain the MyBB forum post id from the WP post meta and place a query against the MyBB database to fetch all forum replies. It will then run my extracted and slightly stripped down standalone version of the MyCode parser against the results (so that you’ll have interpreted MyCode in your comments), transform them into WordPress comments and return these comments.

    In order to embed it into your WordPress installation, if I remember correctly, you will have to hook the ‘comments_array’ filter. The signature for your hook looks like this: comments_array_hook($comments_array, $post_id) and it should return the same array of comments that fetch() produces. Therefore, in the hook, call fetch() to obtain the new array of comments and return it. Or you could extract the code of the fetch() method and place it directly in your hook. You could also mix forum comments with existing WordPress comments, etc. I have placed all my filter hooks in mybb-cross-postalicious.php and their corresponding methods in MyBBXP.php, simply add the ‘comments_array’ hook in the same fashion and it should work.

    Let me know if you run into trouble.

    Hey I was trying to download this to see it but it didnt work ??

    I have cackle and i want to integrate the forum posts too! Help a brother!

    Also I am trying to figure out how to read the thread last post date? And the thread last posted user so i could display them.. and the amount of posts in thread.

    I am sure its possible but id like to have some help, would like to show u what i did with my site too anyway to contact you?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display posts as comment’ is closed to new replies.