I am working on converting my phpBB forum to vB. I am using the official Impex importer, but one feature it lacks is converting internal phpBB forum links within posts to point to the correct imported vB thread.
I have searched and posted on the official forum, but it's one of those often features that always seems to be "coming soon".
Anyway, I'm open to any suggestions as an effective method to covert the links with a PHP script. I'm also hoping I might hear from someone who has already done this and might be willing to share. There must be a few people out there who have successfully converted phpBB links to vb.
phpBB links are in the following format:
http://www.domain.com/forum/viewtopic.php?t=10820
http://www.domain.com/forum/viewtopic.php?p=72155#72155
the vBulletin equivalents:
http://www.domain.com/forum/showthread.php?t=13511
http://www.domain.com/forum/showthre...8246#post48246
phpBB table: phpbb_posts
phpBB fields: post_id, topic_id
phpBB table: phpbb_posts_text
phpBB fields: post_id, post_text
vBulletin table: vb3_post
vBulletin fields: postid, threadid, pagetext, importthreadid, importpostid
So, I guess I need to:
search each vb3_post : pagetext for occurances of
http://www.domain.com/forum/viewtopic.php?p=n#n
then return the new $replace=vb3_post : postid where importpostid=n
then write the replacement over the old link
http://www.domain.com/forum/showthread.php?p=$replace#post$replace
and also search each vb3_post : pagetext for occurances of
http://www.domain.com/forum/viewtopic.php?t=n
then return the new $replace=vb3_post : threadid where importthreadid=n
then write the replacement over the old link
http://www.domain.com/forum/showthread.php?t=$replace
then after all links are replaced, overwrite the vb3_post : pagetext entry in the database
Any pointers? I appreciate any help you can offer.