MyBB Community Forums

Full Version: Broken text
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello

I have a problem in the conversion. There is a break in a text message but at the same place during the conversion SMF 1.1 ---> MyBB 1.6 and SMF 1.1 ---> phpBB 3 ---> MyBB 1.6.

Example:

Original text:

Quote:- How to live with multiple sclerosis? Book. Doc file. Croatian http://www.dmszg-zup.hr/kako.doc 791 KB

- Website of one infected person from Croatia with advice on nutrition, vitamins, minerals, alternative http://free-bj.htnet.hr/milankramaric/

- A blog about MS in http://www.blogovanje.com/desetka/

- Web site on which the thesis about the connection between tooth amalgamskih stamps and MS-a http://solair.eunet.yu/ ~ Yod / AmalgamKatastrofa.htm

- Text with emphasis on stress http://www.feniks.co.ba/cir/node.php?id=...9a25c6dc1e ...

After conversion SMF ---> MyBB:

Quote:- How to live with multiple sclerosis? Book. Doc file. Croatian http://www.dmszg-zup.hr/kako.doc 791 KB

- Website of one infected person from Croatia with advice on nutrition, vitamins, minerals, alternative http://free-bj.htnet.hr/milankramaric/

- A blog about the MS-


After the conversion SMF ---> phpBB ---> MyBB

Quote:- How to live with multiple sclerosis? Book. Doc file. Croatian 791 KB <! - M - check your class="postlink" href="http://www.dmszg-zup.hr/kako.doc"> http://www.dmszg-zup.hr / kako.doc </ a ><!-- m ->

- Website of one infected person from Croatia with advice on nutrition, vitamins, minerals, alternative <! - M -> <a class = "postlink" href = "http://free-bj.htnet.hr/milankramaric/" > http://free-bj.htnet.hr/milankramaric/ </ a ><!-- m ->

- A blog about the MS-

My forum is SMF 1.1.11 with 180 000 messages, Serbian UTF-8 and trying to localhost

Sorry on my English. Google translate. Angel

Same problem also from SMF 2.0 to MyBB.
Only ralgith can help us, i have lost the convert that him have made for me Undecided
This is an issue with the BB Code converter included with the original SMF Module. I don't remember all the changes I did to make this functional, but I'll look into it. In the mean time I would suggest reporting it as a bug on the MyBB Merger System bug tracker.
Solution forthcoming:

In the convert/boards/smf/bbcode_parser.php change"
function convert($message)
	{
		$message = str_replace(array('[center]', '[/center]', '<br />'), array('[align=center]', '[/align]', "\n"), $message);
		$message = preg_replace("#\[size=([0-9\+\-]+?)pt\](.*?)\[/size\]#si", "[size=$1]$2[/size]", $message);
		$message = preg_replace("#\[li\](.*?)\[/li\]#si", "[*]$1", $message);
		$message = preg_replace("#\[quote(.*?)\](.*?)\[\/quote\]#esi", "\$this->mycode_parse_post_quotes('$2', '$1')", $message);
		return $message;
	}

to:
function convert($message)

	{

		$message = str_replace(array('[center]', '[/center]', "<br />", '[ftp', '[/ftp]', '&amp;', '&nbsp;', '&quot;', '&lt;', '&gt;', '<!-- m', '<!-- s', '-->'), array('[align=center]', '[/align]', "\n", '[url', '[/url]', '&', ' ', '"', '<', '>', '', '', ''), $message);
		$message = preg_replace("#\[size=([0-9\+\-]+?)pt\](.*?)\[/size\]#si", "[size=$1]$2[/size]", $message);
		$message = preg_replace("#\[size=([0-9\+\-]+?)px\](.*?)\[/size\]#si", "[size=$1]$2[/size]", $message);
		$message = preg_replace("#\[li\](.*?)\[/li\]#si", "[*]$1", $message);
		$message = preg_replace("#\[quote author=(.*?) link=(.*?) date=(\d+)\]#si", "[quote=$1 dateline=$3]", $message);
		return $message;
	}

You may or may not need the new quote line with SMF1... try keeping the original quote line (last line in the convert function) first. If it does not work use the new quote line.
Scler, you may want to read this:
http://community.mybb.com/thread-75002.html

Its very important to correct that before moving to MyBB for sure.
Hello

Thank you for your prompt reaction and please accept my apologies for delayed answer - I was travelling and did not have access to internet.

I read your answers,and (if I understood it correctly), it may happen that I did not completely describe the problem that happens in conversion.

Text in my first message that I noted as quote is not the quote in its original form. Those are normal messages that I put in the form of quotes for clearer presentation.

Please let me know if this clarification has any impact on the problem and its solution?
It shouldn't. However definitely don't use the quote line I pasted. use the original, and just change the other lines to match.

I don't know what I was on when I wrote the quoteline that appears in my changes, but it wouldn't work right if all fields weren't present.
Hello

Ok. I no longer see the broken text. Smile

Now we appear incorrect characters within a single topic. In one message, they are good in the second did not. I'll try a new conversion with the option turned off "Automatically convert messages to UTF8?".

In addition, there are still some problems but I will later on.
(2010-08-29, 01:02 PM)Scler Wrote: [ -> ]Now we appear incorrect characters within a single topic. In one message, they are good in the second did not. I'll try a new conversion with the option turned off "Automatically convert messages to UTF8?".

I finished the second conversion.

The characters were fine but again I have broken the text in the same place as in the first message of this topic.

Is your database table encoding and insert encoding the same? All tables using the same encoding as the database encoding? If not this can cause issues with the merge system.
Yes, both databases have the same encoding. utf8_general_ci
Pages: 1 2