MyBB Community Forums

Full Version: merged VB 4.2.5 to mybb, but need solution for bb codes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I am using Vbulletin over 15 years now, but need to switch beceause VBbulletin 5 is not as great as the first ones.
So i am trying several forum software, to find wich is best for me.

MyBB is at this point a realy good solution, and have installed it.
However after merge a backup from VB 4.2.5 to MyBB i now have 90.000 threads that are using bb codes that are not working in MyBB.

Is there a solution the get the bb codes back into MyBB?
Because adjusting 90.000 threads, and 1.2 million posts is not realy an option Big Grin Big Grin Big Grin .

Hope someone got an solution for me.

Sorry for my English, i am from The Netherlands

Greets
Compare the standard BBCodes on your previous VB forum with the standard ones in MyBB. So find all different BBCodes.
Then you need to create extra MyCodes for MyBB that will cover all those missing.
ACP > Configuratio > MyCodes

For example
Regular Expression:
\[SPECIALVBCODE\](.*?)\[/SPECIALAVBCODE\]
Replacement:
<span class="YOUR_CSS_RULE">$1</span>

If it's not clear to solve, let us know some examples of missing VB BBCodes.

[ExiTuS]
(2021-01-24, 03:57 PM)[ExiTuS] Wrote: [ -> ]Compare the standard BBCodes on your previous VB forum with the standard ones in MyBB. So find all different BBCodes.
Then you need to create extra MyCodes for MyBB that will cover all those missing.
ACP > Configuratio > MyCodes

For example
Regular Expression:
\[SPECIALVBCODE\](.*?)\[/SPECIALAVBCODE\]
Replacement:
<span class="YOUR_CSS_RULE">$1</span>

If it's not clear to solve, let us know some examples of missing VB BBCodes.

[ExiTuS]


Hi there, thank you for your respons.

These are some examples for what is in vb: ( I used "{" instead of "[" beceause otherwise don't show here in message)

{FONT=Comic Sans MS}{/FONT} Font type
{SIZE=3}{/SIZE}= Size of text
{COLOR="#FFA500"}{/COLOR}= Color of text
{CNETER}{/CENTER}= Center text

If i understand, for each one i have to make a new one in "Mycodes"?
Is there a way to change the ones in "MyBB"? Or do i realy need to make new ones?

And with the examples above, can you show me how to make them?
I do not realy understand how Big Grin

Thank you verry much for your help, reale appreciate this.

Regards
Adama
Hi Adama,

FONT=xxx
= Identical in both VB and MyBB. No need to change.

Some bad news:

SIZE=X
Not possible to convert number (1,2,3,4,5) to size descriptor ([[x]x-]large, medium, [[x]x-]small)
because SIZE is already a standard MyBBCode and can not be overridden!

COLOR='#xxxxxx'
= Not possible to remove apostrophes
because COLOR is already a standard MyBBCode! and can not be overridden!

Better try to find and replace these values manually within the posts table in database.

Maybe a MyBB developer can give a clue on how to override an existing MyCode (/inc/class_parser.php) with an own Regex pattern. I think thats only possible with a modification of the hard code.

Good news:

VB: CENTER (equals MyCode ALIGN)
MyCode Regex and Replacement:
\[CENTER\](.*?)\[/CENTER\]
<div class="mycode_align" style="text-align: center;">$1</div>

[ExiTuS]
Hmmm ok!

Thinking about something else...
Is there a way to convert the bbcodes to html, or a script that runs over all topics and changes the codes to mybb codes?

I just need a way to adjust al the topics. After that is done, the new mybb codes are good enough for me, and the staf and members just have to adapt to them.
Perhaps it is possible to make the changes to the table using SQL REPLACE() or PATINDEX().
Be very careful with these functions and first do an attempt on a copy table.

When you don't wish to play around with SQL, you can export the posts table and make the changes in an adavnced Windows editor (e.g. Notepad++ can handle search/replace using Regex) or with Unix tools (e.g. sed).

[ExiTuS]
Ok, i will take a look at that.
MyBB looks like a good replacement for VB, but i have to get this fixed.

90.000 topics and 1.3 million reply's adjusting is not an option Big Grin

I will get back on this, thx for your help