다른게시판DB 를 phpBB 로 옮겨보신분 도움좀 주세요..

jenix의 이미지

안녕하세요.

제가 만들어서 쓰던 게시판 DB 를 phpBB 로 옮기려고 하는데..

현재 제 게시판에선 이름, 글제목, 글내용만 phpBB 로 옮기려고 하거든요.

그래서 다음과 같이 코드를 짜서 돌렸는데..

일단 phpBB 디비로는 잘들어갑니다.

근데 웹페이지에는 나오질 않는군요.

글을 하나 쓰면, 제일 첫글 다음글로 리플레이형식으로 나오고,

다시 또 새글을 쓰면 그 다음글이 나타나며 다시 리플레이형식으로 나오고 그러네요.

include/functions_posting.php 에 참조해서 topics , posts, posts_text 3가지 테이블에 입력했는데.. 뭐가 잘못된건지 모르겠습니다. ㅠ0ㅠ

도움 부탁드립니다.

$query = "SELECT name,title,body FROM freeboard";
$result = mysql_query($query) or die("Query failed : " . mysql_error());

mysql_select_db("phpbb") or die("Could not select database");

$forum_id = 1;
$current_time = time();
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {                                                                         $query2 = "insert into phpbb_topics values('','$forum_id','$line[title]','-2','$current_time','0','0','0','0','0','0','0','0');";
    $result2 = mysql_query($query2) or die("Query failed : " . mysql_error());

    printf("\n complete topics\n");

    $topic_id = mysql_insert_id();
                                                                                                                                  $query3 = "insert into phpbb_posts values('','$topic_id','$forum_id','-1','$current_time','0','$line[name]','0','0','0','0',NULL,'0');";
    $result3 = mysql_query($query3) or die("Query failed : " . mysql_error());
    printf("\n complete posts\n");

    $post_id = mysql_insert_id();

    $query4 = "insert into phpbb_posts_text values('$post_id','0','$line[title]','$line[body]');";
    $result4 = mysql_query($query4) or die("Query failed : " . mysql_error());
    printf("\n complete posts_text\n");                                                                                       
}
[/code]
arboris의 이미지

phpbb가 포스팅 시간순으로 게시하도록 되잇어서 그런것 아닐까요?
리플라이 식으로 나온다는 것이 변환한 모든 posting이 한 thread밑에 나온다는 말인가요?
스크린 샷을 보여 주시면 이해가 더 쉬울것 같은데...

우분투가 좋아요.

익명 사용자의 이미지

안녕하세요.

includes/function_post.php 의 update_post_stats 함수도 보세요..

아마도 topic_first_post_id, topic_last_post_id 때문이 아닐까요?? 아니면.. ㅜㅜ;

서명:
악이 승리하기 위한 유일한 조건은 선한 사람들이 아무 일도 안 하는 것이다. - 에드먼드 버크

jenix의 이미지

감사힙니다 :)

topic_first_post_id, topic_last_post_id 때문이었군요 ㅠ0ㅠ

잘 이전하였습니다 ㅎㅎ

---------------------------------------------------------------------------
http://jinhyung.org -- 방문해 보세요!! Jenix 의 블로그입니다! :D

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.