gadamiak (@gadamiak)

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • We need to create a basic import plugin. — This I have done, it’s experimental and I’d like some more eyes on the code before calling it “done”

    I’ve looked for it but haven’t found it. I guess it hasn’t been published yet?

    I ask for help in making a single-use script to import topics and posts into existing BBPress installation.

    I need to import a legacy Q&A (hundreds of them) stored in a flat file. I need to handle fields missing in the source, which contains: Q poster, Q poster’s e-mail (optional), Q post date, Q content, A content. I want to import those and fill the missing fields with arbitrary values.

    I chose to use API to do the task, which is a right choice, what was pointed above. I converted the source file manually and imported it into a multi-dimensional array. Then I want to use functions bb_insert_topic and bb_insert_post in a simple loop:

    $topic_id = bb_insert_topic(array(...));

    bb_insert_post(array('topic_id' => $topic_id, ...);

    The problem is: I can create topics/posts only for current user. Any poster_ parameters passed to bb_insert_ are ignored. In other words, I can’t create anonymous topics/posts with poster credits I specify. I guess I’m missing a setting or constant?

    The PHP script is located in the root folder of BBPress. I do require('./bb-load.php'); and log in to my keymaster user in the browser. All of $bbdb, $bb and $bb_current_user are populated (I used FirePHP to debug).

    What am I missing?

    Filed a ticket for this issue as it’s still present in r2442:

    In reply to: How to unblock a user?

    Unfortunately, no change in r2442. I posted a ticket for this issue:

    In reply to: How to unblock a user?

    Exactly. After that I manually deleted bbpress_been_blocked from usermeta table for that user but it got back somehow.

    I just upgraded to latest revision from the trunk (2442), but the problem persists. This site is still in testing stage so I’m going to reinstall it and see if that helps.

Viewing 4 replies - 1 through 4 (of 4 total)