PDA

View Full Version : Help with cleaner.php after migration


Jean Pierre
09-01-2015, 03:31 PM
Hello everyone, I have a problem with my forum that I recently migrated from MyBB 1.8.5 to vBulletin 4.2.3

MyBB uses some different bbcodes to vBulletin, therefore, they have no format in posts, and therefore, the appearance thereof looks very bad.

This is solved using the file cleaner.php has so far helped me solve simple bbcodes; however, there are some bbcodes they are giving me problems as alignment, for example:


some text
another text this is a bold
This is a text in bold and this is a imagehttps://vborg.vbsupport.ru/


I wonder how to fix the alignment shown in the example above, without affecting other bbcodes; I only want to have a proper alignment in vBulletin as their bbcodes alignment are:


some text
another text this is a bold
This is a text in bold and this is a image https://vborg.vbsupport.ru/


Please, help me. Thanks.

Zachery
09-01-2015, 08:14 PM
Can you give me the sample data from the database?

Jean Pierre
09-02-2015, 02:01 AM
Hello, thanks for your answer, Do you need the data of a complete post, of the database?
If so, I put here the code that I found in one of many posts that exist in my forum, where still the BBcode of alignment of MyBB persist.


En esta ocasi?n quer?a hacerles muestra del nuevo tr?iler del GTA V.
Hace unos d?as se estreno a nivel mundial y se confirma lo que todos esper?bamos, estamos ante un Juegasoo..!!

https://vborg.vbsupport.ru/external/2015/09/18.jpg



I suppose that I need to put a script in the archive cleaner.php to solve this, I hope you can help me please, thanks you in advanced.

Jean Pierre
09-03-2015, 06:49 PM
Please, I really need help with this, anyone can help me?
Zachery thank you, I'm still waiting your reply.

Dave
09-03-2015, 07:43 PM
It's rather tricky to do this due to the tags all using the "align" bbcode. It's possible with preg_match/replace rules but this will take a while to make. Your best shot would be to create a thread in the "paid services" section.

Seven Skins
09-05-2015, 07:25 AM
Easiest way will be if you completely remove these align tags. By doing this all your text will be aligned to left .

You can run a query to remove these tags e.g.


UPDATE post SET pagetext = REPLACE(pagetext,'','');
UPDATE post SET pagetext = REPLACE(pagetext,'','');