Ignore:
Timestamp:
Jun 14, 2011, 8:29:09 PM (10 years ago)
Author:
mistic100
Message:

remove SmiliesSupport version test, allow 3 chars hexadecimal colors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/bbcode_bar/bbcode_bar.inc.php

    r11295 r11377  
    3636
    3737  // smilies support > 2.2.f ## must be parsed after bbcode_bar, because the javascript must be after bbc's one
    38   if (isset($pwg_loaded_plugins['SmiliesSupport']) AND strcmp($pwg_loaded_plugins['SmiliesSupport']['version'], '2.2.f') != -1) {
     38  if (isset($pwg_loaded_plugins['SmiliesSupport']))
     39  {
    3940    set_smiliessupport();
    4041  } 
     
    189190  {
    190191    //Images
    191     $patterns[] = "#\[img\](.*?)\[/img\]#si";
     192    $patterns[] = "#\[img\](.*?)\[/img\]#is";
    192193    $replacements[] = '<img src="\\1" />';
    193194  }
     
    227228  {
    228229    //Size
    229     $patterns[] = "#\[size=([1-2]?[0-9])\](.*?)\[/size\]#si";
     230    $patterns[] = "#\[size=([1-2]?[0-9])\](.*?)\[/size\]#is";
    230231    $replacements[] = '<span style="font-size: \\1px; line-height: normal">\\2</span>';
    231232  }
     
    233234  {
    234235    //Colours
    235     $patterns[] = "#\[color=(\#[0-9A-F]{6}|[a-z]+)\](.*?)\[/color\]#si";
     236    $patterns[] = "#\[color=(\#[0-9A-F]{6}|\#[0-9A-F]{3}|[a-z]+)\](.*?)\[/color\]#is";
    236237    $replacements[] = '<span style="color: \\1">\\2</span>';
    237238  }
Note: See TracChangeset for help on using the changeset viewer.