vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Help with cleaner.php after migration (https://vborg.vbsupport.ru/showthread.php?t=320089)

Jean Pierre 09-01-2015 03:31 PM

Help with cleaner.php after migration
 
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:

HTML Code:

[align=center]some text[/align]
[align=left]another text this is a [b]bold[/b][/align]
[align=right]This is a text in [b]bold[/b] and this is a image[img]https://vborg.vbsupport.ru/[/img][/align]

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:

HTML Code:

[center]some text[/center]
[left]another text this is a [b]bold[/b][/left]
[right]This is a text in [b]bold[/b] and this is a image [img]https://vborg.vbsupport.ru/[/img][/right]

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.

HTML Code:

[align=center][b][color=#000000]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..!![/color][/b][/align]

[align=center][img]https://vborg.vbsupport.ru/external/2015/09/18.jpg[/img]
[/align]

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.
Code:


UPDATE post SET pagetext = REPLACE(pagetext,'[align=center]','');
UPDATE post SET pagetext = REPLACE(pagetext,'[/align]','');



All times are GMT. The time now is 05:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01581 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete