Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
phpBB2 attachment support for ImpEx Details »»
phpBB2 attachment support for ImpEx
Version: 1.00, by OmerE OmerE is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

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.

Comments
  #22  
Old 11-01-2004, 12:57 PM
OmerE OmerE is offline
 
Join Date: Jan 2004
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've received information about the issue from Melanie (off-board), and it
seems that the current ImpEx is compatible with the patch, but not with
the patch file. I'll post a new patch file as soon as I have some time.

Omer.
Reply With Quote
  #23  
Old 11-23-2004, 05:39 AM
zigx zigx is offline
 
Join Date: Feb 2004
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by OmerE
I've received information about the issue from Melanie (off-board), and it
seems that the current ImpEx is compatible with the patch, but not with
the patch file. I'll post a new patch file as soon as I have some time.

Omer.
is this updated already?
Reply With Quote
  #24  
Old 11-23-2004, 06:15 AM
zigx zigx is offline
 
Join Date: Feb 2004
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey guys, im getting this error:

Code:
Fatal error: Cannot redeclare get_phpbb2_attachment_details() in /var/www/domain/impex/systems/phpBB2/000.php on line 978
Any ideas?
Reply With Quote
  #25  
Old 11-23-2004, 06:21 AM
zigx zigx is offline
 
Join Date: Feb 2004
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for some reason that function and the one under it were in there twice..just deleted an instance of both of htem and that fixed it.
Reply With Quote
  #26  
Old 11-24-2004, 12:11 AM
zigx zigx is offline
 
Join Date: Feb 2004
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi OmerE, check the attachment i put on thispost...

i imported everything fine until i got to the attachment module.... hit attachment, then the error below popped up and my browser memory usage started to SKY rocket until the computer froze...

Now when i try to go back into impex's importer area it gets stuck in a loop and trys to load the frame for infinity... not sure what to do.

i couldnt get more details than this Screen shot when it crashed, but do you have any idea whats going on? or anyone for that matter?! thanks a lot guys.

and especailly thanks for this hack because if i can get it to work....i will consider you my life saver lol.
Reply With Quote
  #27  
Old 11-24-2004, 01:45 AM
zigx zigx is offline
 
Join Date: Feb 2004
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by OmerE
In the patch file included here I neglected to add one required line
which is required in order to create a temporary column in the attachment
table during the upgrade process.

In impex/systems/phpBB2/001.php, around line 89, and AFTER you
use the patch file, find this:
Code:
                                '13'    => array('post'                 =>  'importpostid')
Replace with:
Code:
                                '13'    => array('post'                 =>  'importpostid'),
                                '14'    => array('attachment'                 =>  'importattachmentid')
If you're in the middle of the process, just add a BIGINT colum
named 'importattachmentid' to the attachment table.
also, my 001.php didnt have that line in it... but i added the BIGINT column to the end of the table.
Reply With Quote
  #28  
Old 11-24-2004, 08:12 AM
Jerry's Avatar
Jerry Jerry is offline
 
Join Date: Jun 2003
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you PM me over at vbulletin.com I will add this offically so you don't have to mess about with hacks.........
Reply With Quote
  #29  
Old 11-24-2004, 08:13 AM
Jerry's Avatar
Jerry Jerry is offline
 
Join Date: Jun 2003
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by zigx
also, my 001.php didnt have that line in it... but i added the BIGINT column to the end of the table.
It wouldn't all that has changed now.
Reply With Quote
  #30  
Old 11-24-2004, 10:26 AM
zigx zigx is offline
 
Join Date: Feb 2004
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow im BRAND new to vB so this is all new to me... ill drop u a PM.
Reply With Quote
  #31  
Old 11-24-2004, 10:31 AM
Jerry's Avatar
Jerry Jerry is offline
 
Join Date: Jun 2003
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by zigx
wow im BRAND new to vB so this is all new to me... ill drop u a PM.
Well I'm one of the developers and have been after a board with attachments for a while so I can add the attachment module.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:13 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04319 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete