# Coloured imported Text

**URL:** https://meta.discourse.org/t/coloured-imported-text/173328
**Category:** Support
**Created:** [December 15, 2020, 3:24am UTC](https://meta.discourse.org/t/coloured-imported-text/173328 "2020-12-15T03:24:04Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![ianm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ianm/32/200859_2.png) [@ianm](https://meta.discourse.org/u/ianm)
#### Post date: [December 15, 2020, 3:24am UTC](https://meta.discourse.org/t/coloured-imported-text/173328/1 "2020-12-15T03:24:04Z")

</div>

Hi,

Have been running new hosted Discourse based forum for a month now. Very impressed. We have already 2000 users.

Bringing coloured text from previous phpBB forum, but cant get it to work in new forum:  
[color=#BFBFBF]grey-“Ready to update”[/color], [color=#FF8000]orange - old number [/color]or [color=#00BF00]green - current number[/color].

Any suggestions are appreciated.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [December 15, 2020, 5:22am UTC](https://meta.discourse.org/t/coloured-imported-text/173328/2 "2020-12-15T05:22:42Z")

</div>

Have you considered using the BBCode plugin?

---

<div class="post-metadata">

### Author: ![ianm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ianm/32/200859_2.png) [@ianm](https://meta.discourse.org/u/ianm)
#### Post date: [December 15, 2020, 5:44am UTC](https://meta.discourse.org/t/coloured-imported-text/173328/3 "2020-12-15T05:44:08Z")

</div>

Can this be used for a **hosted** forum?

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [December 15, 2020, 6:16am UTC](https://meta.discourse.org/t/coloured-imported-text/173328/4 "2020-12-15T06:16:40Z")

</div>

> [@ianm](#):
>
> [color=#BFBFBF]grey-“Ready to update”[/color], [color=#FF8000]orange - old number [/color]or [color=#00BF00]green - current number[/color].

When we imported nearly a million posts from vB to Discourse, we stripped out all the color bbcode during the migration process.

Our problem was that the BBCODE plugin does not work as expected when the BBCODE is nested (BBCODE inside BBCODE), and so after a lot of analysis on this, we decided to strip out all color BBCODE tags (recursively) during the migration process.

Nested BBCODE is really messy to import, obviously! It is “doable” but we decided it was not worth the effort (and adding little value because named color fonts, versus classes, makes theming difficult).

Hope this helps.

---

<div class="post-metadata">

### Author: ![ianm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ianm/32/200859_2.png) [@ianm](https://meta.discourse.org/u/ianm)
#### Post date: [December 15, 2020, 6:29am UTC](https://meta.discourse.org/t/coloured-imported-text/173328/5 "2020-12-15T06:29:39Z")

</div>

Is mine nested (BBCODE inside BBCODE)?  
Is there any alternative to get coloured text?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [December 15, 2020, 6:47am UTC](https://meta.discourse.org/t/coloured-imported-text/173328/6 "2020-12-15T06:47:32Z")

</div>

No, you need to use BBCode. You can nest but only if it makes sense (not unlike HTML). There may be some unimplemented codes.

My [Discourse Frotz plugin](https://meta.discourse.org/t/discourse-frotz-an-interactive-fiction-game-bot/140617/16) uses nesting successfully to combine font, colour and background colour. Note the red ‘N’ letter on the compass on the screenshot.

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/9/398a9825511ca8e6793eff834480f3d11b57e13f.png)

You’d need to ask your hoster if they can install that official plugin.

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [December 15, 2020, 8:18am UTC](https://meta.discourse.org/t/coloured-imported-text/173328/7 "2020-12-15T08:18:36Z")

</div>

> [@ianm](#):
>
> Is mine nested (BBCODE inside BBCODE)?

Hey @ianm

The code sample you provided is not nested.

Our experience with the official BBCODE plugin was that it does not “play well” with nested BBCODE. However, if you do not have nested BBCODE, this is “more-than-likey” not an issue for your migration.

Our site migration had decades of nested BBCODE (hundreds of thousands) and it was a huge problem (even with the official BBCODE plugin, which we use today) so, we just stripped all the color (and some other code tags we did not need away). Not one user has complained text color from a post 5 years old is missing and nor will they.

Getting migrated BBCODE to work properly is NOT so simple like “use the official BBCODE plugin”. If a big migration of years of various combinations of nested BBCODE was that simple, our full migration time would have been weeks versus months. It’s something to experience first-hand and is not “a theory”, it is just how it is. The official BBCODE plugin is nice, and we use it, but only after stripping out much of the nested BBCODE.

We also made the decision to strip out all color BBCODE tags (completely) because when a color is hard coded into the text, it might look OK with one theme (a light theme for example), but the same color will not look good, and will often be a distraction on another theme (for example a dark theme), so we made the decision to strip all the color BBCODE tags and we are very happy we did.

Of course, each site has to make their own tradeoff choices during migration. I can tell we had some “very smart REGEX guys” writing for months to get our migration “perfect” and most of the time spent was because of BBCODE. The official plugins and gems for this were a good “first approximation” but left a lot to be desired in the final migration, so we wrote a lot of Ruby gsub() REGEX to clean it up.

Best of luck and hope this practical view “from the battlefield of migration” was helpful. There is no doubt that migrating from one legacy forum to another can be very “tricky” if your goal is a “Great Looking” migration versus a kind of “sloppy migration”.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [December 15, 2020, 10:29am UTC](https://meta.discourse.org/t/coloured-imported-text/173328/8 "2020-12-15T10:29:33Z")

</div>

Your code works fine in the BBCode plugin as is:

![image](https://global.discourse-cdn.com/meta/original/3X/8/f/8fe625311bd0fb86f6d4d3cdcb2e619a834d74ce.png)

here, I’ve added one level of nesting:

![image](https://global.discourse-cdn.com/meta/original/3X/d/8/d8958dfd6715dbeaf9a4b5f999248fddcb86e818.png)

how about two?:

![image](https://global.discourse-cdn.com/meta/original/3X/b/a/ba0244fc611cf6c41724de956c508bf1bdee9e84.png)

how about three, and a bit more of a complex set:

![image](https://global.discourse-cdn.com/meta/optimized/3X/d/c/dc3d0ff84d097271327fec0559526683dadcc9ce_2_690x35.png)

---

<div class="post-metadata">

### Author: ![ianm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ianm/32/200859_2.png) [@ianm](https://meta.discourse.org/u/ianm)
#### Post date: [December 15, 2020, 11:26am UTC](https://meta.discourse.org/t/coloured-imported-text/173328/9 "2020-12-15T11:26:58Z")

</div>

Thank you for confirming it works in that plugin. I shall see if it can be added to our hosted forum 🤔

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [December 15, 2020, 5:34pm UTC](https://meta.discourse.org/t/coloured-imported-text/173328/10 "2020-12-15T17:34:23Z")

</div>

I’m sorry but, the BBCode plugin is not available on either our Standard or Business plans. The plugins available on each of those plans are listed here: [Plugin directory | Discourse - Civilized Discussion](https://www.discourse.org/plugins).

The BBCode plugin and any other official Discourse plugins can be installed on our Enterprise plan though.
