MyBB Community Forums

Full Version: phpBB -> MyBB Converter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
i encourtered some error will run import.php
----
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hanephc/public_html/ver2/import.php on line 1315
SELECT r.rank_title, r.rank_image, COUNT(*) as rankees FROM phpbb_ranks r LEFT JOIN phpbb_users u ON (u.user_rank = r.rank_id) WHERE r.rank_id = 6 GROUP BY u.rank_idUnknown column 'u.rank_id' in 'group statement'
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hanephc/public_html/ver2/import.php on line 1315
SELECT r.rank_title, r.rank_image, COUNT(*) as rankees FROM phpbb_ranks r LEFT JOIN phpbb_users u ON (u.user_rank = r.rank_id) WHERE r.rank_id = 6 GROUP BY u.rank_idUnknown column 'u.rank_id' in 'group statement'
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hanephc/public_html/ver2/import.php on line 1315
SELECT r.rank_title, r.rank_image, COUNT(*) as rankees FROM phpbb_ranks r LEFT JOIN phpbb_users u ON (u.user_rank = r.rank_id) WHERE r.rank_id = 6 GROUP BY u.rank_idUnknown column 'u.rank_id' in 'group statement'
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hanephc/public_html/ver2/import.php on line 1315
SELECT r.rank_title, r.rank_image, COUNT(*) as rankees FROM phpbb_ranks r LEFT JOIN phpbb_users u ON (u.user_rank = r.rank_id) WHERE r.rank_id = 1 GROUP BY u.rank_idUnknown column 'u.rank_id' in 'group statement'
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hanephc/public_html/ver2/import.php on line 1315
SELECT r.rank_title, r.rank_image, COUNT(*) as rankees FROM phpbb_ranks r LEFT JOIN phpbb_users u ON (u.user_rank = r.rank_id) WHERE r.rank_id = 6 GROUP BY u.rank_idUnknown column 'u.rank_id' in 'group statement'
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hanephc/public_html/ver2/import.php on line 1315
SELECT r.rank_title, r.rank_image, COUNT(*) as rankees FROM phpbb_ranks r LEFT JOIN phpbb_users u ON (u.user_rank = r.rank_id) WHERE r.rank_id = 6 GROUP BY u.rank_idUnknown column 'u.rank_id' in 'group statement'
---
and also

i can't use any edit or textbox that i can paste the content... on cache manager >> cache 'usertitles'

" it's happened before and i have some idea how to fix it. go into admin cp and go into cache manager (near the bottom of the menu). then view the cache 'usertitles' "

thanks in advance
In the Cache Manager you have to click View Contents next to usertitles. Then hilight everything in the grey box that appears and copy it. Then go back and click Rebuild Cache, then click View Contents again and copy this contents.

I've fixed the other bug you got in the attached file. This is version 0.9. Hope it works Smile
Hello!

This "import.php" does not work for the phpBB (Forums) in PHP-Nuke.
It says there is no valid installation from phpBB. Sad
I use PHP-Nuke 7.4 with phpBB 2.0.17.
I also changed the version number inside the import.php.
No effect - the same Message.

Is there an other way to convert the phpBB to myBB?

Coldcut
Coldcut Wrote:Hello!

This "import.php" does not work for the phpBB (Forums) in PHP-Nuke.
It says there is no valid installation from phpBB. Sad
I use PHP-Nuke 7.4 with phpBB 2.0.17.
I also changed the version number inside the import.php.
No effect - the same Message.

Is there an other way to convert the phpBB to myBB?

Coldcut

You can try this:

1. create a dummy folder inside your mybb directory (eg. phpbb)
2. create in this folder (phpbb) a file "config.php" with the following contents:

<?php

$dbms = 'mysql4';

$dbhost = 'localhost';
$dbname = 'dbname';
$dbuser = 'user';
$dbpasswd = 'passwd';

$table_prefix = 'nuke_bb';

define('PHPBB_INSTALLED', true);

?>

The variables $db... are the same like in your nuke/config.php. If you changed your nuke database prefix u need to change the $table_prefix like: nukeprefix_bb

3. Start the importer and set the path to the dummy phpbb folder.

Good luck
The ugly guest posting again:

Changes:

function import_forums()
...
  $phpbb_forums = do_query($phpbb_db, "
    SELECT
      f.*,
      p.topic_id AS last_topic_id,
      p.post_username AS last_poster_username,
      p.post_time AS last_post_time
    FROM
      phpbb_forums f
    LEFT JOIN
      phpbb_posts p ON (p.post_id = f.forum_last_post_id)
  ");

  mysql_query("TRUNCATE TABLE ".$config[table_prefix]."forums", $mybb_db);
  $phpbb_html = (mysql_result(mysql_query("SELECT config_value FROM " .$table_prefix. "config WHERE config_name = 'allow_html'", $phpbb_db), 0) == 1) ? 'yes' : 'no';
  $phpbb_bbcode = (mysql_result(mysql_query("SELECT config_value FROM " .$table_prefix. "config WHERE config_name = 'allow_bbcode'", $phpbb_db), 0) == 1) ? 'yes' : 'no';
  $phpbb_smilies = (mysql_result(mysql_query("SELECT config_value FROM " .$table_prefix. "config WHERE config_name = 'allow_smilies'", $phpbb_db), 0) == 1) ? 'yes' : 'no';

  while ($phpbb_forum = mysql_fetch_array($phpbb_forums))
  {
    $phpbb_forum['forum_status'] = ($phpbb_forum['forum_status'] == 0) ? 'yes' : 'no';

    if (!$phpbb_forum['last_topic_id'])
    {
      $phpbb_forum['last_topic_id'] = 0;
      $phpbb_forum['last_post_time'] = 0;
      $phpbb_forum['last_poster_username'] = '';
    }
    else
    {
      $phpbb_forum['last_poster_username'] = ($phpbb_forum['last_poster_username'] != '') ? $phpbb_forum['last_poster_username'] : 'Guest';
      $phpbb_forum['last_poster_username'] = ($phpbb_forum['last_poster_username'] != 'Anonymous') ? $phpbb_forum['last_poster_username'] : 'Guest';
    }

    $success = mysql_insert($mybb_db, $config[table_prefix].'forums', array
    (
      'fid'            => $phpbb_forum['forum_id'],
      'name'           => addslashes($phpbb_forum['forum_name']),
      'description'    => addslashes($phpbb_forum['forum_desc']),
      'type'           => 'f',
      'pid'            => ($phpbb_forum['cat_id'] + $last_forum),
      'parentlist'     => ($phpbb_forum['cat_id'] + $last_forum).','.$phpbb_forum['forum_id'],
      'disporder'      => $phpbb_forum['forum_order'],
      'active'         => 'yes',
      'open'           => $phpbb_forum['forum_status'],
      'threads'        => $phpbb_forum['forum_topics'],
      'posts'          => $phpbb_forum['forum_posts'],
      'lastpost'       => $phpbb_forum['last_post_time'],
      'lastposter'     => addslashes($phpbb_forum['last_poster_username']),
      'lastposttid'    => $phpbb_forum['last_topic_id'],
      'allowhtml'      => $phpbb_html,
      'allowmycode'    => $phpbb_bbcode,
      'allowsmilies'   => $phpbb_smilies,
      'allowimgcode'   => $phpbb_bbcode,
      'allowpicons'    => 'yes',
      'allowtratings'  => 'yes',
      'usepostcounts'  => 'yes',
      'showinjump'     => 'yes',
      'modposts'       => 'no',
      'modthreads'     => 'no',
      'modattachments' => 'no',
      'style'          => -1,
      'overridestyle'  => 'no'
    ));

function import_posts()
...
  $phpbb_topics = do_query($phpbb_db, "
    SELECT
      t.*,
      p1.poster_id AS first_poster_id,
      p1.post_username AS first_poster_username,
      p2.poster_id AS last_poster_id,
      p2.post_username AS last_poster_username,
      p2.post_time,
      v.vote_id
    FROM
      phpbb_topics t
    LEFT JOIN
      phpbb_posts p1 ON (p1.post_id = t.topic_first_post_id)
    LEFT JOIN
      phpbb_posts p2 ON (p2.post_id = t.topic_last_post_id)
    LEFT JOIN
      phpbb_vote_desc v ON (v.topic_id = t.topic_id)
    WHERE
      t.topic_type < $max_thread_level
  ");

  mysql_query("TRUNCATE TABLE ".$config[table_prefix]."threads", $mybb_db);
  while ($phpbb_topic = mysql_fetch_array($phpbb_topics))
  {
    $phpbb_topic['topic_status'] = ($phpbb_topic['topic_status'] > 0) ? 'yes' : 'no';
    $phpbb_topic['topic_type'] = ($phpbb_topic['topic_type'] > 0) ? '1' : '0';
    $phpbb_topic['post_time'] = ($phpbb_topic['post_time'] > 0) ? $phpbb_topic['post_time'] : '0';
    if ($phpbb_topic['topic_vote'] > 0 && $phpbb_topic['vote_id'])
      $phpbb_topic['topic_vote'] = $phpbb_topic['vote_id'];

    if ($phpbb_topic['first_poster_id'] < 0)
      $phpbb_topic['first_poster_id'] = 0;

    $phpbb_topic['first_poster_username'] = ($phpbb_topic['first_poster_username'] != '') ? $phpbb_topic['first_poster_username'] : 'Guest';
    $phpbb_topic['last_poster_username'] = ($phpbb_topic['last_poster_username'] != '') ? $phpbb_topic['last_poster_username'] : 'Guest';
    $phpbb_topic['last_poster_username'] = ($phpbb_topic['last_poster_username'] != 'Anonymous') ? $phpbb_topic['last_poster_username'] : 'Guest';

    $success = mysql_insert($mybb_db, $config[table_prefix].'threads', array

do_query is only a little helper which replaces the prefixes. You don't need to add but need to change the query.

function do_query($connection, $query)
{
	include './inc/config.php';
	include $_POST['phpbb_path'] . 'config.php';

	$query = str_replace('phpbb_', $table_prefix, $query);
	$query = str_replace('mybb_', $config[table_prefix], $query);

	return mysql_query($query, $connection);
}
Hi!

Thank you for your Help! Smile
But now i become a Error Message before the Import Process start:
Quote:Fatal error: Call to a member function on a non-object in /home/.sites/../...../web/modules/Forum/import.php on line 490
At this line is:
Quote:// Loop through the folder
$dir = dir($source);
while (false !== $entry = $dir->read()) { <- This is line 490
// Skip pointers
if ($entry == '.' || $entry == '..') {
continue;
}

Coldcut
I'm just taking a guess, but maybe you need to do

$dir = new dir($source);
No, it dosn't work.Sad
Then i become the Error on line 489.

Coldcut
Coldcut Wrote:No, it dosn't work.Sad
Then i become the Error on line 489.

Coldcut

Oh sorry I forgot. You need to copy the folder modules/Forum/images into your dummy phpbb directory so it lookes like "phpbb/images".
Hi!

Done, but there is the same Error message:
Fatal error: Call to a member function on a non-object in /home/.sites/../...../web/modules/Forum/import.php on line 490

Coldcut
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16