Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7586297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:23:34+00:00 2026-05-30T19:23:34+00:00

In one of their updates, phpBB removed the option for the [color=value]…[/color] BBCode to

  • 0

In one of their updates, phpBB removed the option for the [color=value]...[/color] BBCode to include quotes around the color value. My implementation of phpBB depends heavily on this functionality working, since industry software has been designed to output with quotes around the value.

How can I re-enable this format?

I have tried modifying the regular expressions in includes/message_parser.php to include the possibility of quotes (as shown below). This works for most symbols, but it seems that there is something specific somewhere else in the code which disables quotes from working.

Here are the changes I tried in includes/message_parser.php. I changed:

function bbcode_init()
    {
        static $rowset;

        // This array holds all bbcode data. BBCodes will be processed in this
        // order, so it is important to keep [code] in first position and
        // [quote] in second position.
        $this->bbcodes = array(
            'code'          => array('bbcode_id' => 8,  'regexp' => array('#\[code(?:=([a-z]+))?\](.+\[/code\])#ise' => "\$this->bbcode_code('\$1', '\$2')")),
            'quote'         => array('bbcode_id' => 0,  'regexp' => array('#\[quote(?:="(.*?)")?\](.+)\[/quote\]#ise' => "\$this->bbcode_quote('\$0')")),
            'attachment'    => array('bbcode_id' => 12, 'regexp' => array('#\[attachment=([0-9]+)\](.*?)\[/attachment\]#ise' => "\$this->bbcode_attachment('\$1', '\$2')")),
            'b'             => array('bbcode_id' => 1,  'regexp' => array('#\[b\](.*?)\[/b\]#ise' => "\$this->bbcode_strong('\$1')")),
            'i'             => array('bbcode_id' => 2,  'regexp' => array('#\[i\](.*?)\[/i\]#ise' => "\$this->bbcode_italic('\$1')")),
            'url'           => array('bbcode_id' => 3,  'regexp' => array('#\[url(=(.*))?\](.*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")),
            'img'           => array('bbcode_id' => 4,  'regexp' => array('#\[img\](.*)\[/img\]#iUe' => "\$this->bbcode_img('\$1')")),
            'size'          => array('bbcode_id' => 5,  'regexp' => array('#\[size=([\-\+]?\d+)\](.*?)\[/size\]#ise' => "\$this->bbcode_size('\$1', '\$2')")),
            'color'         => array('bbcode_id' => 6,  'regexp' => array('!\[color=(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")),
            'u'             => array('bbcode_id' => 7,  'regexp' => array('#\[u\](.*?)\[/u\]#ise' => "\$this->bbcode_underline('\$1')")),
            'list'          => array('bbcode_id' => 9,  'regexp' => array('#\[list(?:=(?:[a-z0-9]|disc|circle|square))?].*\[/list]#ise' => "\$this->bbcode_parse_list('\$0')")),
            'email'         => array('bbcode_id' => 10, 'regexp' => array('#\[email=?(.*?)?\](.*?)\[/email\]#ise' => "\$this->validate_email('\$1', '\$2')")),
            'flash'         => array('bbcode_id' => 11, 'regexp' => array('#\[flash=([0-9]+),([0-9]+)\](.*?)\[/flash\]#ie' => "\$this->bbcode_flash('\$1', '\$2', '\$3')"))
        );
...

To use the following for the ‘color’ match:

'color' => array('bbcode_id' => 6,  'regexp' => array('!\[color="?(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+)"?\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')"))

What else can I try to re-add this functionality to phpBB?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:23:36+00:00Added an answer on May 30, 2026 at 7:23 pm

    I believe that phpBB escapes special HTML characters before processing, which means your regexp should be something like this:

    '!\[color=(?:")?(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+)(?:")?\](.*?)\[/color\]!ise'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just signed up for BlueHost and one of their PHP config options is
I have a request in from a client that would like one of their
So I'm playing with geotools and I thought I'd proxy one of their data-access
We have an SEO team at my office, and one of their dictums is
I am working with some business objects that relate to one another through their
One of our clients is upgrading their servers because the old machines can't handle
One of my clients uses Trend Micro InterScan Messaging Security to protect their internal
How does one choose if someone justify their design tradeoffs in terms of optimised
I have 2 tables that their rows have one on one relation.. For you
On one section of my website, I ask my customers for their postal code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.