News:

Wondering if this will always be free?  See why free is better.

Main Menu

Can't convert Vbulletin to SMF (least not properly)

Started by Deimos, June 26, 2005, 12:14:09 PM

Previous topic - Next topic

Uzbekistan

HI everyone!
First of all Unknown - i tried converting vB303 to smf1.1b3p and it gave me error converting polls saying that there were two duplicates. I checked that tuple through phpmyadmin and did not find any duplcates.

Then i had to install smf1.0.5 and tried converting to it from vb3.0.3. But now i get the same errors as goodhe used to get - zero byte attachements and no avatars. I used converter from download section and it does say inside in comments that it is for version 1.0.5 so there could be no mistakes. have you solved goodhe's problem and if yes can you tell me what should i do?

[Unknown]

Please try the attached converter with SMF 1.1 Beta 3 Public, and post the error message you get.

-[Unknown]

Uzbekistan

Thanks man! You are hero as always (33.881 posts!!!!)!
But picture attachements are not previewed :(. Any suggestions?

PS. I have GD2 installed on the server and Thumbnails are enabled in Admin panel. Anything to be rebuild/recount?

[Unknown]

As stated in the 1.1 release announcement, previews may not work properly for everyone in 1.1 Beta 3 Public.

Please try uploading the upgrade.php file and upgrade_1-1.sql from the upgrade zip file on the downloads page, and running that.  That may resolve your problems.

-[Unknown]

Uzbekistan

#24
Hi [Unknown]. Thanks for your support, you were very much helpfull indeed. I have converted my bb to smf with all the attachments and avatars. Everything is working just fine now but some minor problems with links in posts.

After convertion links within posts are not all working properly. A little research showed that:

1. [url]http://domain.com[/url] - works fine;
2. [url=http://domain.com]Text[/url] - works fine;
3. [url="http://domain.com"]Text[/url] - NOT working fine. On press goes to the board root (http://mydomain.com/forum).
   However, if you 'modify' the post and save it without any changes the link changes to: http://"http://domain.com"
4. [email="[email protected]"][email protected][/email] - NOT fine. Links to: mailto:
   After saving the post (modify->no changes->save) link chages to: mailto:"[email protected]"


Is there any way to solve this issue? Possibly, resave all messages or rerender them some how ???

Thanks in advance.

Besides, i just realised that all attachements are now shown twice inside posts.
Any suggestions?

[Unknown]

Quote from: Uzbek on August 28, 2005, 09:56:42 AM
After convertion links within posts are not all working properly. A little research showed that:

I'm afraid I was not aware that vBulletin allowed "s around emails and URLs.  You haven't started using this forum live yet, I hope?

! Handle url="" and email="" in vBulletin converters. (vbulletin_to_smf.sql, vbulletin3_to_smf.sql)

QuoteBesides, i just realised that all attachements are now shown twice inside posts.
Any suggestions?

Are you sure you didn't rerun the converter or any part of it twice?  Can you try the attached converter?

-[Unknown]

Uzbekistan

Quote from: [Unknown] on August 28, 2005, 07:46:52 PM
Quote from: Uzbek on August 28, 2005, 09:56:42 AM
After convertion links within posts are not all working properly. A little research showed that:

I'm afraid I was not aware that vBulletin allowed "s around emails and URLs.  You haven't started using this forum live yet, I hope?

! Handle url="" and email="" in vBulletin converters. (vbulletin_to_smf.sql, vbulletin3_to_smf.sql)

-[Unknown]

I didn't understand - did you attach already modified .sql or you are suggesting us to modify? If the latter is true - which part to be modified?

Regarding double attachements - i solved it (i did run it twice) as well as the problem with thumbnails preview (upgrade.php helped).

Thanks for much valued help!

PS. I almost completed converting the board :(

Uzbekistan

I just tried the installation / convertion using the last file you attached - still links are being parsed wrong :(.

[Unknown]


Uzbekistan

Thx Unknown - its too late now. We converted the forum and manually edited some crucial links. Now we are changing the theme as well to our tastes (smf has nice features but lacks powerful theming features - windowbg & windowbg2 in .css control too much info! We introduced a few new classes and changed a lot in somethng.templates.php but there still a lot to do). now i am also translating it into russian and there is a problem i am facing now - russian text is not visible in mail notifications sent to recepients! Any ideas where would i look?

[Unknown]

What does it look like?  It should work in 1.1.... but you may need to set the character set in index.russian.php.

-[Unknown]

Uzbekistan

it is set to windows-1251 which is default encoding for cyrillic fonts in windows and it works fine on other sites.

I just tried changing from php mail sender to smtp - still the same problem, emails don't show russian text.

[Unknown]

What do they show instead?  Do you have iconv installed on the server (you can tell with a phpinfo)?

-[Unknown]

Uzbekistan

#33
Example:


Text in my forum:
Quote
Quote from: jdadajonov on August 30, 2005, 01:41:18 PM
Проголосовал но на мыло нифига не пришло ???
Неужто у них робот такой тормозной (час жду уже)
Со мною тоже самое случилось, проголосовал а письмецо через день подоспело.

Quote from: rOOstique on August 30, 2005, 12:58:02 PM
banner kakoyto nezametniy! a! nado ego v seredinu stavit' a ne poboku.
Не заметный, у тебя экран цветной ? :D

Quote from: Severus on August 30, 2005, 01:02:01 PM
E arzimidi aka, prosto hafa bo'p ketasan shuncha ovoz berasanu, ayrim dangasalarni deb ohirgi orinlarni olasan...:(
Erta indin ortib qolsa kerak, ishoning  ::)


Text in email:

Quote
:

  : jdadajonov -  30, 2005, 06:41:18 pm
       ???
      (  )

    ,      .

  : rOOstique -  30, 2005, 05:58:02 pm
banner kakoyto nezametniy! a! nado ego v seredinu stavit' a ne poboku.

  ,     ? :D

  : Severus -  30, 2005, 06:02:01 pm
E arzimidi aka, prosto hafa bo'p ketasan shuncha ovoz berasanu, ayrim dangasalarni deb ohirgi orinlarni olasan...:(

Erta indin ortib qolsa kerak, ishoning ::)

    ,                .

  ,
The O'zbekiston Forumi :: Ԯ

Uzbekistan

Regarding phpinfo:

Configure Command  './configure' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-mcrypt' '--enable-magic-quotes' '--with-mysql' '--enable-discard-path' '--with-pear' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib'
Server API  CGI 
Virtual Directory Support  disabled 
Configuration File (php.ini) Path  /usr/local/Zend/etc/php.ini 
PHP API  20020918 
PHP Extension  20020429 
Zend Extension  20021010 
Debug Build  no 
Thread Safety  disabled 
Registered PHP Streams  php, http, ftp, compress.zlib 

Uzbekistan

seems to me that there is no iconv (wtf is that?)

[Unknown]

Well, it should still be possible without iconv.  But, iconv is an internationalization library that can improve things a lot.  If your host is a good one, you may be able to get them to add it.

In any case, that's very strange.  Can you forward the email to me so I can see what its headers are, perhaps?

Can you try, in Subs-Post.php, finding this:

function mimespecialchars($old_string)

And then, from there down to:
function smtp_mail($mail_to_array, $subject, $message, $headers)

Replace that whole section with:

function mimespecialchars($old_string)
{
global $txt, $modSettings;

$charset = $txt['lang_character_set'];

// This is the fun part....
if (preg_match('~&#\d{3,8};~', $old_string) != 0)
{
$fixchar = create_function('$n', '
if ($n < 128)
return chr($n);
elseif ($n < 2048)
return chr(192 | $n >> 6) . chr(128 | $n & 63);
elseif ($n < 65536)
return chr(224 | $n >> 12) . chr(128 | $n >> 6 & 63) . chr(128 | $n & 63);
else
return chr(240 | $n >> 18) . chr(128 | $n >> 12 & 63) . chr(128 | $n >> 6 & 63) . chr(128 | $n & 63);');

// Attempt to convert to UTF-8, if we can... it might fail if the character set is unknown.
if ($txt['lang_character_set'] != 'UTF-8' && function_exists('iconv') && $old_string2 = @iconv($txt['lang_character_set'], 'UTF-8', $old_string))
{
$old_string2 = preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $old_string2);

// Converting back is potentially lossy; only do it if we're in "dumb email client" compat mode.
if (!empty($modSettings['disableQuotedPrintable']))
$old_string2 = @iconv('UTF-8', $txt['lang_character_set'] . '//IGNORE', $old_string2);
else
$charset = 'UTF-8';

$old_string = $old_string2;
}
else
{
$simple = true;

preg_match_all('~&#(\d{3,8});~', $old_string, $matches);
foreach ($matches[1] as $entity)
{
if ($entity > 255)
$simple = false;
}
unset($matches);

if ($simple)
$old_string = preg_replace('~&#(\d{3,8});~e', 'chr(\'$1\')', $old_string);
else
{
$old_string = preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $old_string);

// Unicode, baby.
$charset = 'UTF-8';
}
}
}

// This is as far as we go if quoted-printable is disabled.
if (!empty($modSettings['disableQuotedPrintable']))
return array($charset, $old_string);

$string = $old_string;
$i18n_char = false;

// Look for special characters...
for ($i = 0; $i < strlen($string); $i++)
if (ord($string{$i}) >= 128 || $string{$i} == '=' || $string{$i} == '?' || $string{$i} == '_')
{
$i18n_char |= ord($string{$i}) >= 128;

// Add on to the string whenever we find a special character.
$string = substr($string, 0, $i) . '=' . strtoupper(dechex(ord($string{$i}))) . substr($string, ++$i);
}

// We don't need to mess with the subject line if no special characters were in it..
if ($i18n_char)
return array($charset, '=?' . $charset . '?Q?' . $string . '?=');
else
return array($charset, $old_string);
}

// Send an email via SMTP.
function smtp_mail($mail_to_array, $subject, $message, $headers)


How do I modify files? Does that help any?

-[Unknown]

Uzbekistan

Sh********tttttttttttttttttt!!!!

It is my fault!!! shame on me.... i feel ashameddddd!
Sorry, there is no problem at all! Thanks for your help Unknown - SMF rulezz! :)
Just my mail client went wrong - was messing up encoding (i never came along with somethng like that before!)...

Advertisement: