Advertisement:

Author Topic: [SMF Converter] vBulletin 3.7  (Read 246889 times)

Offline Kool22Masta

  • Newbie
  • *
  • Posts: 1
Re: [SMF Converter] vBulletin 3.7
« Reply #100 on: June 25, 2009, 07:47:44 PM »
My vbulletin is located on another server than my SMF.
When I use the URL of the vbulletin, it doesnt work.

So i uploaded the sql file with the vbulletin database in it to the server where the smf and the converter are.
instead of the vbulletin url i just put in the url of the sql file, and the converter said that it worked, but nothing happend in the SMF forum.

Wouldnt it be much easier if there were a converter, where you just put in an sql backup and then it just puts out an sql file that i can import into smf, so it would work for everyone?

ThorstenE

  • Guest
Re: [SMF Converter] vBulletin 3.7
« Reply #101 on: June 26, 2009, 02:41:17 PM »
My vbulletin is located on another server than my SMF.
When I use the URL of the vbulletin, it doesnt work.

Both Forums (SMF and vBulletin) must be installed on the same server .. please check:
Converting to SMF

Offline ecmrf

  • Newbie
  • *
  • Posts: 3
Re: [SMF Converter] vBulletin 3.7
« Reply #102 on: July 08, 2009, 07:09:44 PM »
I just converted a VB 3.8.1 board, all went well except :

Converting members... Successful.
Converting administrators... Successful.
Converting categories... Successful.
Converting boards... Successful.
Assigning boards to categories... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting smileys... Successful.
Converting attachments...
Fatal error: Call to undefined function getAttachmentFilename() in /home/muster/public_html/ecmrf.com/forum/convert.php(1097) : eval()'d code on line 26


Is there anything I need to do?

ThorstenE

  • Guest
Re: [SMF Converter] vBulletin 3.7
« Reply #103 on: July 09, 2009, 02:07:27 AM »
sorry, the script attached to the first post is for SMF 1.1.8, attachments was redisigned for SMF 1.1.9..

you can replace the last two blocks in vbulletin37_to_smf.sql (attachments and avatars) with this code:
Code: [Select]
/******************************************************************************/
--- Converting attachments...
/******************************************************************************/

---* {$to_prefix}attachments
---{
$no_add = true;
$keys = array('ID_ATTACH', 'size', 'filename', 'ID_MSG', 'downloads', 'width', 'height');

if (!isset($vb_settings))
{
$result = convert_query("
SELECT varname, value
FROM {$from_prefix}setting
WHERE varname IN ('attachfile', 'attachpath', 'usefileavatar', 'avatarpath')
LIMIT 4");
$vb_settings = array();
while ($row2 = mysql_fetch_assoc($result))
{
if (substr($row2['value'], 0, 2) == './')
$row2['value'] = $_POST['path_from'] . substr($row2['value'], 1);
$vb_settings[$row2['varname']] = $row2['value'];
}
mysql_free_result($result);
}

// Is this an image???
$attachmentExtension = strtolower(substr(strrchr($row['filename'], '.'), 1));
if (!in_array($attachmentExtension, array('jpg', 'jpeg', 'gif', 'png')))
$attachmentExtention = '';

// Set the default empty values.
$width = '0';
$height = '0';

$newfilename = getLegacyAttachmentFilename($row['filename'], $ID_ATTACH);
if (empty($vb_settings['attachfile']))
{
$fp = @fopen($attachmentUploadDir . '/' . $newfilename, 'wb');
if (!$fp)
return;

fwrite($fp, $row['filedata']);
fclose($fp);
}
elseif ($vb_settings['attachfile'] == 1)
{
if (!copy($vb_settings['attachpath'] . '/' . $row['userid'] . '/' . $row['attachmentid'] . '.attach', $attachmentUploadDir . '/' . $newfilename))
return;
}
elseif ($vb_settings['attachfile'] == 2)
{
if (!copy($vb_settings['attachpath'] . '/' . chunk_split($row['userid'], 1, '/') . $row['attachmentid'] . '.attach', $attachmentUploadDir . '/' . $newfilename))
return;
}

// Is an an image?
if (!empty($attachmentExtension))
list ($width, $height) = getimagesize($attachmentUploadDir . '/' . $newfilename);

$rows[] = "$ID_ATTACH, " . filesize($attachmentUploadDir . '/' . $newfilename) . ", '" . addslashes($row['filename']) . "', $row[ID_MSG], $row[downloads], '$width', '$height'";
$ID_ATTACH++;
---}
SELECT
postid AS ID_MSG, counter AS downloads, filename, filedata, userid,
attachmentid
FROM {$from_prefix}attachment;
---*

/******************************************************************************/
--- Converting avatars...
/******************************************************************************/

---* {$to_prefix}attachments
---{
$no_add = true;
$keys = array('ID_ATTACH', 'size', 'filename', 'ID_MEMBER');

if (!isset($vb_settings))
{
$result = convert_query("
SELECT varname, value
FROM {$from_prefix}setting
WHERE varname IN ('attachfile', 'attachpath', 'usefileavatar', 'avatarpath')
LIMIT 4");
$vb_settings = array();
while ($row2 = mysql_fetch_assoc($result))
{
if (substr($row2['value'], 0, 2) == './')
$row2['value'] = $_POST['path_from'] . substr($row2['value'], 1);
$vb_settings[$row2['varname']] = $row2['value'];
}
mysql_free_result($result);
}


$newfilename = getLegacyAttachmentFilename($row['filename'], $ID_ATTACH);
if (strlen($newfilename) > 255)
return;
elseif (empty($vb_settings['usefileavatar']))
{
$fp = @fopen($attachmentUploadDir . '/' . $newfilename, 'wb');
if (!$fp)
return;

fwrite($fp, $row['filedata']);
fclose($fp);
}
elseif (!copy($vb_settings['avatarpath'] . '/avatar' . $row['ID_MEMBER'] . '_' . $row['avatarrevision'] . '.gif', $attachmentUploadDir . '/' . $newfilename))
return;

$rows[] = "$ID_ATTACH, " . filesize($attachmentUploadDir . '/' . $newfilename) . ", '" . addslashes($row['filename']) . "', $row[ID_MEMBER]";
$ID_ATTACH++;
---}
SELECT ca.userid AS ID_MEMBER, ca.filedata, ca.filename, u.avatarrevision
FROM ({$from_prefix}customavatar AS ca, {$from_prefix}user AS u)
WHERE u.userid = ca.userid;
---*

Offline digger

  • Sr. Member
  • ****
  • Posts: 760
  • Gender: Male
    • realdigger on GitHub
    • SMF Russian Community
Re: [SMF Converter] vBulletin 3.7
« Reply #104 on: July 10, 2009, 12:39:16 PM »
sorry, the script attached to the first post is for SMF 1.1.8, attachments was redisigned for SMF 1.1.9..

you can replace the last two blocks in vbulletin37_to_smf.sql (attachments and avatars) with this code:

Converting attachments...
Fatal error: Call to undefined function getLegacyAttachmentFilename() in /home/uaforumo/domains/uaforum.org/public_html/new/convert.php(1097) : eval()'d code on line 26

ThorstenE

  • Guest
Re: [SMF Converter] vBulletin 3.7
« Reply #105 on: July 10, 2009, 02:01:04 PM »
digger, have you replaced the attachments conversion from the orginal script with my version above? the error you posted is related to our old attachments conversion.

Offline Sayrex

  • Newbie
  • *
  • Posts: 1
Re: [SMF Converter] vBulletin 3.7
« Reply #106 on: July 14, 2009, 08:49:25 AM »
convert.php for vbulletin 3.7 is not available for download...
please check convert.php link .  :(

ThorstenE

  • Guest
Re: [SMF Converter] vBulletin 3.7
« Reply #107 on: July 14, 2009, 12:58:56 PM »
convert.php is the same file for ALL of our converters, you can download any converter from our downloads page and use the included convert.php, you only need the custom board_to_smf.sql (vbulletin37_to_smf.sql).

Offline navjotjsingh

  • Jr. Member
  • **
  • Posts: 118
  • Gender: Male
Re: [SMF Converter] vBulletin 3.7
« Reply #108 on: July 16, 2009, 07:46:24 AM »
I am getting a error:

Code: [Select]
Converting posts (this may take some time)... Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Unsuccessful!
This query:

    SELECT
    pm.pmid AS ID_PM, pm.userid AS ID_MEMBER, pm.messageread != 0 AS is_read,
    '-1' AS labels
    FROM `navjot_careertalk`.vb_pm
    LIMIT 0, 500;

Caused the error:

    Unknown column 'pm.pmid' in 'field list'


How to get past this?

I am trying to convert vb 3.8.1 to SMF 1.1.0.

ThorstenE

  • Guest
Re: [SMF Converter] vBulletin 3.7
« Reply #109 on: July 16, 2009, 02:09:50 PM »
mhh, seems like vBulletin changed their database structure in version 3.8.1

can you please check the table vb_pm with phpMyAdmin? is there a column named pmid?

Offline Fisch.666

  • Jr. Member
  • **
  • Posts: 205
Re: [SMF Converter] vBulletin 3.7
« Reply #110 on: July 16, 2009, 07:27:31 PM »
Hi!

I have the same problem like navjotjsingh when i try to convert my vbulletin 3.8.3 into smf 1.1.10.

There is an table called vb3_pm with an column called pmid in my database and the first step of the personal messages conversion with this query:

Code: [Select]
SELECT
pm.pmid AS ID_PM

runs without a problem. Any hints how we can fix this? Thanks in advance for an reply.

ThorstenE

  • Guest
Re: [SMF Converter] vBulletin 3.7
« Reply #111 on: July 17, 2009, 01:36:31 AM »
navjotjsingh or Fish.666,
can anyone take a screenshot from the table vb3_pm.. (the structure -> column names are important)?

Thank you

Offline Fisch.666

  • Jr. Member
  • **
  • Posts: 205
Re: [SMF Converter] vBulletin 3.7
« Reply #112 on: July 17, 2009, 02:22:59 AM »
Hi!

Thanks again for your reply. I don't have accesss to phpmyadmin, but i hope this screens are ok:


Offline navjotjsingh

  • Jr. Member
  • **
  • Posts: 118
  • Gender: Male
Re: [SMF Converter] vBulletin 3.7
« Reply #113 on: July 17, 2009, 04:05:11 AM »
Attached is the structure from my screenshot.


ThorstenE

  • Guest
Re: [SMF Converter] vBulletin 3.7
« Reply #114 on: July 17, 2009, 06:58:55 AM »
ok, thank you :) it's a bug in vbulletin37_to_smf.sql:

in vbulletin37_to_smf.sql replace:

Code: [Select]
SELECT
pm.pmid AS ID_PM, pm.userid AS ID_MEMBER, pm.messageread != 0 AS is_read,
'-1' AS labels

with:
Code: [Select]
SELECT
pmid AS ID_PM, userid AS ID_MEMBER, messageread != 0 AS is_read,
'-1' AS labels

Offline navjotjsingh

  • Jr. Member
  • **
  • Posts: 118
  • Gender: Male
Re: [SMF Converter] vBulletin 3.7
« Reply #115 on: July 17, 2009, 08:30:10 AM »
Thanks it worked. But for converting attachments for each attachment it shows this error:

Code: [Select]
Warning: copy(attachments/1/1.attach) [function.copy]: failed to open stream: No such file or directory in /home/navjot/public_html/sdemo/convert.php(1097) : eval()'d code on line 42

And for avtar it showed:
Code: [Select]
Warning: copy(/home/navjot/public_html/careertalk/customavatars/avatar378_1.gif) [function.copy]: failed to open stream: No such file or directory in /home/navjot/public_html/sdemo/convert.php(1097) : eval()'d code on line 30

Rest everything went smooth.

None of the avatar or attachment were converted.

Offline Fisch.666

  • Jr. Member
  • **
  • Posts: 205
Re: [SMF Converter] vBulletin 3.7
« Reply #116 on: July 17, 2009, 10:07:43 AM »
Hi!

Thanks again for your help, the import works now without a problem.  :)

Offline SimpleJoe

  • Jr. Member
  • **
  • Posts: 142
    • moodyjoe on Facebook
    • http://www.linkedin.com/pub/joseph-moody/b/9b9/308 on LinkedIn
    • @joemoody on Twitter
    • Online Institute
Re: [SMF Converter] vBulletin 3.7
« Reply #117 on: July 21, 2009, 07:13:20 PM »
I get a blank page that says "SMF Converter" but there's no other data:
http://birdcarversonline.com/convert.php

Both VB and SMF are using the same database on the same server ... any ideas?
Hosting Simple Machines since YaBB -- One of the first SMF Forum Hosting providers with Chat and FTP for the inner developer in us all.

ThorstenE

  • Guest
Re: [SMF Converter] vBulletin 3.7
« Reply #118 on: July 22, 2009, 01:11:00 AM »
a blank page is often server related (strict php configuration: e.g. memory_limit, max_execution_time ...)
Any chance to modify the php.ini or to check the webservers error log?

Workaround: make a backup from your vBulletin and convert it on your local computer (XAMPP is an easy installable Webserver incl. PHP- and MySQL)

Offline navjotjsingh

  • Jr. Member
  • **
  • Posts: 118
  • Gender: Male
Re: [SMF Converter] vBulletin 3.7
« Reply #119 on: July 22, 2009, 02:08:50 AM »
Thanks it worked. But for converting attachments for each attachment it shows this error:

Code: [Select]
Warning: copy(attachments/1/1.attach) [function.copy]: failed to open stream: No such file or directory in /home/navjot/public_html/sdemo/convert.php(1097) : eval()'d code on line 42

And for avtar it showed:
Code: [Select]
Warning: copy(/home/navjot/public_html/careertalk/customavatars/avatar378_1.gif) [function.copy]: failed to open stream: No such file or directory in /home/navjot/public_html/sdemo/convert.php(1097) : eval()'d code on line 30

Rest everything went smooth.

None of the avatar or attachment were converted.

Please look at my error too.