Forum Replies Created

Viewing 3 replies - 181 through 183 (of 183 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.

    Plugin Author Markus Echterhoff

    (@mechter)

    In short: No, I don’t think MyBBXP can do this to your satisfaction, this is not its intended purpose.

    That being said, if I understand correctly, you would like a listing of recent MyBB forum topics as the main content of a pa .ge. You could use a page template that uses the MyBBXP recent topics widget as its sole content. However, that would look rather dull because the widget really only displays the titles of the topics, no authors, no dates, no summaries, which is what I suppose you would like to see. Now, with a little more effort, you could instead extract the code to fetch the posts from the widget() function in mybbxp-recent-topics.php and use it to build your own page template. Then create a normal WordPress page, select your new page template and save it. That’s what I would do.

    Perhaps I can help? I had a similar problem and solved it by writing this plugin, hope you enjoy it.

    https://www.ads-software.com/extend/plugins/mybb-cross-postalicious/

Viewing 3 replies - 181 through 183 (of 183 total)