Migrating from Invision Power Board to Discourse

is this offer still available ?
Getting to the point where I might have to pay IPB :sadpanda:

Want to convert from http://mandrivausers.org/

「いいね!」 2

Hey, i will probably need to do a migration from IP Board v3.4.5 to Discourse at my job, any news about the import script? Would love to test it.

I wont promise that it will work for you, but I will try to clean it up and submit a PR in the next few days. If you have a budget, my contact info is in my profile.

「いいね!」 3

I also need to do a migration from a bitrix based forum, so i’ll have to write a custom script anyway and figure out how all of this works, anything to save me some time would be extremely helpful. Thank you.

Here it is. The two sites that I imported with this code were wildly different. I hope that someone finds it useful.

https://github.com/discourse/discourse/pull/5543

「いいね!」 11

Some version of this is in core now, so you probably don’t want to use what’s in the link above.

「いいね!」 4

IPBoard バージョン4 のインポートスクリプトはどこにあるか教えていただけますか?
リポジトリには ipboard と ipboard3 のインポートスクリプトしか見当たりません。
IPBoard4 から Discourse への移行はサポートされていますか?

わかりません。ipboard.rbスクリプトを試してみるのが良いと思いますが、どのバージョンのipboard用に書いたのかは全くわかりません。データを使って試してみて、うまくいくかどうか確認するしかありません。以前(何年も前に)言ったように、ipboardスクリプトを最初に書いたとき、私が試した2つのサイトは非常に、非常に異なっていました。

有料サポートにご興味がある場合は、Redirecting… をご覧ください。

返信ありがとうございます。
自分のデータで試しましたが、途中で壊れてしまい、完了できませんでした。
4バージョンには存在しない「profile_portal」というテーブルを探そうとしています。
スクリプトはipb3以前のもの用に書かれているのだと思います。

有料サポートについて検討します。

@pfaffman

サポート可能か教えていただけますでしょうか。v2.3.6からインポートしたいのですが、このバージョンにはforum_idがないため、トピックをリンクする際に問題が発生しています。トピックとフォーラムをリンクする値がどのテーブルに格納されているか教えていただけますでしょうか。

現在、トピックをインポートするために使用しているのは以下のコードです。インポートはできますが、すべてのトピックが「未分類」に移行してしまいます。

def import_topics
  puts "\n📌 Importing Topics..."
  total_count = mysql_query("SELECT count(*) count FROM iBB_posts WHERE new_topic = 1;").first['count']

  batches(BATCH_SIZE) do |offset|
    discussions = mysql_query(<<-SQL
      SELECT pid as tid, topic_id, post_title as title, post as raw,
             FROM_UNIXTIME(post_date) as created_at, author_id
      FROM iBB_posts
      WHERE new_topic = 1
      ORDER BY post_date ASC
      LIMIT #{BATCH_SIZE} OFFSET #{offset};
    SQL
    ).to_a

    break if discussions.empty?

    create_posts(discussions, total: total_count, offset: offset) do |discussion|
      {
        id: "topic-#{discussion['tid']}",
        user_id: user_id_from_imported_user_id(discussion['author_id']) || Discourse::SYSTEM_USER_ID,
        title: format_title(discussion['title']),  # Ensure titles are properly formatted
        raw: discussion['raw'],
        created_at: discussion['created_at'],
        post_number: 1
      }
    end
  end
end
def format_title(title)
  return "Untitled Topic" if title.nil? || title.strip.empty?
  CGI.unescapeHTML(title)
end
def import_replies
  puts "\n📌 Importing Replies..."
  total_count = mysql_query("SELECT count(*) FROM iBB_posts WHERE new_topic = 0;").first['count']

  batches(BATCH_SIZE) do |offset|
    comments = mysql_query(<<-SQL
      SELECT pid, topic_id, post as raw, FROM_UNIXTIME(post_date) as created_at, author_id
      FROM iBB_posts
      WHERE new_topic = 0
      ORDER BY post_date ASC
      LIMIT #{BATCH_SIZE} OFFSET #{offset};
    SQL
    ).to_a

    break if comments.empty?

    create_posts(comments, total: total_count, offset: offset) do |comment|
      topic_id = topic_lookup_from_imported_post_id("topic-#{comment['topic_id']}")
      next unless topic_id

      {
        id: "post-#{comment['pid']}",
        topic_id: topic_id,
        user_id: user_id_from_imported_user_id(comment['author_id']) || Discourse::SYSTEM_USER_ID,
        raw: comment['raw'],
        created_at: comment['created_at']
      }
    end
  end
end

トピック作成者にカテゴリを渡していないため、修正する必要があります。

しかし、IPB SQLデータベースにforum_idが見つかりません。使用できません。

それなら、無料のヘルプを得て修正するのは難しいでしょう。IPBインポートスクリプトは他に2つあると思います。それらがどこにforum_idを配置したか、データベース内を探してみてください。

予算があれば、Discourse Migration - Literate Computing をご覧ください。予算を教えていただければ、それに合わせるよう努力します。

「いいね!」 2

ご返信ありがとうございます。サービス提供の提案ではなく、問題に関する技術的なガイダンスを探していました。迅速なご返信に改めて感謝いたします。

データベースの構造を確認できないため、その構造を把握できないことをお詫び申し上げます。

私がお伝えできること、そしてお伝えしたことは、データベース内を検索してカテゴリがどこにあるかを見つけるということです。トピックレコードには、カテゴリが隠されているフィールドが必ず存在します。時には、カテゴリIDが含まれている別のテーブルへのリンクになっており、結合(join)を行う必要がある場合もあります。おそらく、予期しない名前が付いているだけでしょう。

「いいね!」 1