Version: 1.00, by OmerE
Developer Last Online: Nov 2023
Version: 3.0.3
Rating:
Released: 07-24-2004
Last Update: Never
Installs: 9
Is in Beta Stage
No support by the author.
Hi,
This "mod" will import attachments from your phpBB2 board to
your vB3 board, and comes in the form of another ImpEx module for
the phpBB2 system.
You must patch your impex before you start the import process.
You cannot use this to import attachments from a phpBB2 board
to an existing vBulletin board already imported, as crucial data is
missing (namely, mapping the old phpBB2 postid to the new vB postid).
It also requires a small modification to one of the core ImpEx files
to fix a small bug (missing addslashes on a variable passed to the DB),
and several other phpBB2 module files.
I wrote this for personal use, in order to import my own board.
Later tested it on another board and fixed a few bugs, but I'm certain
there may be some left.
It's based on the IPB attachment importer, but I believe I'm allowed
to post it here, as only registered owners should be able to grab the
code.
Two small comments - during the import stage, it will ask you what's
the largest attachment you want to import. This is limited by several
factors - the setting of the MySQL variable "max_allowed_packet" (as
attachments are imported into the DB), and the type of the filedata
field in the attachment table. vB uses "mediumtext", which will
limit you to 16MB attachments. If you want to import larger attachments,
be sure to change these two. If using the slow queries log, you may
also want to consider either disabling it temporarily, or raising the
long_query_time value - otherwise the MySQL will choke itself just
trying to write out almost every single large attachment to the logfile...
which will slow things down even more.
Finally - in order for the import process to finish quickly and efficiently,
an INDEX is required on the importpostid column in the "post" table.
I did not add this automatically, as I'm not sure where all those added
fields that the importer adds to tables are cleared up. Before running
the attachments module (but after running the posts module), execute
this query:
Code:
ALTER TABLE `post` ADD INDEX `importpostidx` ( `importpostid` )
This will greatly speed up the process (running without it would
be much, much slower - try to avoid doing that).
I dunno if I'm allowed to post the modified ImpEx files themselves,
so I'll post a patch file from ImpEx 1.21 (much easier than listing by hand ).
If the files can be posted, please let me know, and I'll attach those as well.
To use the patch file put it one level above the "impex" directory,
then run:
patch -p1 -d impex < phpBB2_attachments_import.patch
EDIT: forgot to include the importattachmentid column here.
Look 2 posts down for instructions.
Hope this helps someone.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Kindly edit your original post, and include that it should be installed BEFORE importing your phpBB settings. This has left me in a bind, and I will sit without phpBB attachments for now as I already have 60 users online.
Thanks for taking the time to look at this. Would love to be able to get the attachments over from my old phpbb2 board
Paul
Hi,
Since patch should be patching the files hunk by hunk, it should be fine.
To be certain, take a look at 000.php - if you can find this text in it
"function get_phpbb2_attachment_details" - then all is well.
If anyone would like to offer the board and attachments dir for dev I'll include an attachment module in the official importer, its just to date I've not got a phpBB site with the attachments, I've only ever got the mysqldump.
So great to hear this excellent news. I went ahead and tried to import the attachments. We ran the patch and got a couple of errors which I'll show later in this post.
I do see the import attachments module in my impex list and I can run it. Except it says on each line "skipping"... and sometimes it does say "skipping, possible PM attachment" and then it shows the attacht ID but when the module is over and I'm redirected to my impex main page, it's says 0 imported, 0 failed. What am I doing wrong?
Also, here's the info from the patch :
mmm... okay here's a little edit. Turns out my path was wrong Now I get another error message though... which is :
"Imported pm_text, Error with importing attachment"
On each and every line that is treated by the script... Can anyone help me on this one ?
1. Why this error?
2. Why only pms ?? Where are all my posts attachments ? :ermm: