• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

PunBB Importer 1.40

No permission to download
PunBB 1.2/1.3/1.4 Importer
#2
Your importer stops all other custom importers from displaying.
You need to update the CodeInMotion_Model_Import_PunBB::__construct() method to call its parent:
PHP:
public function __construct()
{
    parent::__construct();
    self::$extraImporters[] = 'CodeInMotion_Importer_PunBB';
}
This way it will work as intended.
 
#9
I've found and fix 3 errors in this resource. All of them on importer/PunBB.php

1. The ????? chars can be fixed by adding this:
PHP:
$this->_sourceDb->query('SET CHARACTER SET utf8');
Just before:
PHP:
$this->_prefix = preg_replace('/[^a-z0-9_]/i', '', $config['db']['prefix']);
2. The import avatars can be fixed by changing this query:
PHP:
                SELECT id
                FROM ' . $prefix . 'users
                WHERE use_avatar = 1
                    AND id > ' . $sDb->quote($start) . '
                ORDER BY id
To this:
PHP:
                SELECT id
                FROM ' . $prefix . 'users
                WHERE id > ' . $sDb->quote($start) . '
                ORDER BY id
3. The bans import also doesn't work, to fix it you must change this:
PHP:
if (!$sDb->fetchOne('SELECT user_id FROM xf_user_ban WHERE user_id = ' . $bannedId))
To this:
PHP:
if (!$this->_db->fetchOne('SELECT user_id FROM xf_user_ban WHERE user_id = ' . $bannedId))
Hope it helps.
 

kankan

Active member
#11
Just a question : how do i have to proceed to re-run a complete import ?
Do i have to empty some tables before ? Which ones ?
Regards
Nicolas
 

Benjy

Well-known member
#12
Just a question : how do i have to proceed to re-run a complete import ?
Do i have to empty some tables before ? Which ones ?
Regards
Nicolas
Best solution if you ran the import on a fresh XF install is to completely reinstall (drop db).
 

kankan

Active member
#13
If i run a fresh install, i will need to rebuild all the addon and confs.
I was thinking about empty all the tables used by your script for a clean second import.
Which base to i have to clean ?

Merci ;)
 

Benjy

Well-known member
#14
I still think reinstalling is the best solution. WHat you could do is install a fresh XF, configure it, put your modules then do a backup of this. Then you import and if anything goes wrong, you can restore your backup.
 

Benjy

Well-known member
#16
I've found and fix 3 errors in this resource. All of them on importer/PunBB.php

1. The ????? chars can be fixed by adding this:
PHP:
$this->_sourceDb->query('SET CHARACTER SET utf8');
Just before:
PHP:
$this->_prefix = preg_replace('/[^a-z0-9_]/i', '', $config['db']['prefix']);
This won't make it in the "official" release because PunBB 1.2 uses windows-1252 as default encoding.
As for the rest, thank you very much, I'm updating the importer.
 

Benjy

Well-known member
#17
Benjy updated PunBB Importer with a new update entry:

Bug fixes

IMPORTANT: starting from this version, IDs WON'T be retained for categories and forums. Them being in two separate tables with possibly identical IDs messed up some imports. Other IDs will be kept just are fine.

+ added a conditional to set source DB charset with PunBB 1.3 (props Rodolfo)
* fixed avatars and bans imports (props Rodolfo)
* fixed a bug with...
Read the rest of this update entry...
 
#18
Nice Add
Working perfectly

A question about. Have you got devellopped an other add for a puntal portail ?
Is it possible to convert images link to a file in the discussion ?
Thanks for this importer ;)
 
#20
Sorry for confusion
I have asked about a migration ;) not for a new one (migrate a Punbbportal to a new one ;) like XenPortal, database .... )
I have found XenPortal too

Thanks for your reply