From 4ba022438e29dd305435a18e94a0bc08b5dd76a4 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 4 Jul 2009 16:18:48 -0700 Subject: Change the bbcode transformation to more standard tags that can be easily style via css --- modules/g2_import/helpers/g2_import.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'modules/g2_import/helpers') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 91fcbe8e..79f3b197 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -756,16 +756,17 @@ class g2_import_Core { } static $bbcode_mappings = array( - "#\\[b\\](.*?)\\[/b\\]#" => "$1", - "#\\[i\\](.*?)\\[/i\\]#" => "$1", - "#\\[u\\](.*?)\\[/u\\]#" => "$1", - "#\\[s\\](.*?)\\[/s\\]#" => "$1", + "#\\[b\\](.*?)\\[/b\\]#" => "$1", + "#\\[i\\](.*?)\\[/i\\]#" => "$1", + "#\\[u\\](.*?)\\[/u\\]#" => "$1", + "#\\[s\\](.*?)\\[/s\\]#" => "$1", "#\\[url\\](.*?)\[/url\\]#" => "$1", "#\\[url=(.*?)\\](.*?)\[/url\\]#" => "$2", "#\\[img\\](.*?)\\[/img\\]#" => "", "#\\[quote\\](.*?)\\[/quote\\]#" => "

$1

", "#\\[code\\](.*?)\\[/code\\]#" => "
$1
", - "#\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]#" => "$2/span>", + "#\\[size=([^\\[]*)\\]([^\\[]*)\\[/size\\]#" => "$2", + "#\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]#" => "$2", "#\\[ul\\](.*?)\\/ul\\]#" => "", "#\\[li\\](.*?)\\[/li\\]#" => "
  • $1
  • ", ); -- cgit v1.2.3 From 799d82fd6a47196bc69d1e9f23fc61ea2d331208 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 4 Jul 2009 17:01:47 -0700 Subject: Revert "Change the bbcode transformation to more standard tags that can be" This reverts commit 4ba022438e29dd305435a18e94a0bc08b5dd76a4. --- modules/g2_import/helpers/g2_import.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'modules/g2_import/helpers') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 79f3b197..91fcbe8e 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -756,17 +756,16 @@ class g2_import_Core { } static $bbcode_mappings = array( - "#\\[b\\](.*?)\\[/b\\]#" => "$1", - "#\\[i\\](.*?)\\[/i\\]#" => "$1", - "#\\[u\\](.*?)\\[/u\\]#" => "$1", - "#\\[s\\](.*?)\\[/s\\]#" => "$1", + "#\\[b\\](.*?)\\[/b\\]#" => "$1", + "#\\[i\\](.*?)\\[/i\\]#" => "$1", + "#\\[u\\](.*?)\\[/u\\]#" => "$1", + "#\\[s\\](.*?)\\[/s\\]#" => "$1", "#\\[url\\](.*?)\[/url\\]#" => "$1", "#\\[url=(.*?)\\](.*?)\[/url\\]#" => "$2", "#\\[img\\](.*?)\\[/img\\]#" => "", "#\\[quote\\](.*?)\\[/quote\\]#" => "

    $1

    ", "#\\[code\\](.*?)\\[/code\\]#" => "
    $1
    ", - "#\\[size=([^\\[]*)\\]([^\\[]*)\\[/size\\]#" => "$2", - "#\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]#" => "$2", + "#\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]#" => "$2/span>", "#\\[ul\\](.*?)\\/ul\\]#" => "
      $1
    ", "#\\[li\\](.*?)\\[/li\\]#" => "
  • $1
  • ", ); -- cgit v1.2.3 From 50462edd9c72156d841991245a4ef34624f9a3c7 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 4 Jul 2009 17:14:21 -0700 Subject: Change the BBCode Transformation to use the where possible --- modules/g2_import/helpers/g2_import.php | 9 +++++---- themes/default/css/screen.css | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) (limited to 'modules/g2_import/helpers') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 91fcbe8e..cba1d429 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -756,15 +756,16 @@ class g2_import_Core { } static $bbcode_mappings = array( - "#\\[b\\](.*?)\\[/b\\]#" => "$1", - "#\\[i\\](.*?)\\[/i\\]#" => "$1", - "#\\[u\\](.*?)\\[/u\\]#" => "$1", - "#\\[s\\](.*?)\\[/s\\]#" => "$1", + "#\\[b\\](.*?)\\[/b\\]#" => "$1", + "#\\[i\\](.*?)\\[/i\\]#" => "$1", + "#\\[u\\](.*?)\\[/u\\]#" => "$1", + "#\\[s\\](.*?)\\[/s\\]#" => "$1", "#\\[url\\](.*?)\[/url\\]#" => "$1", "#\\[url=(.*?)\\](.*?)\[/url\\]#" => "$2", "#\\[img\\](.*?)\\[/img\\]#" => "", "#\\[quote\\](.*?)\\[/quote\\]#" => "

    $1

    ", "#\\[code\\](.*?)\\[/code\\]#" => "
    $1
    ", + "#\\[size=([^\\[]*)\\]([^\\[]*)\\[/size\\]#" => "$2", "#\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]#" => "$2/span>", "#\\[ul\\](.*?)\\/ul\\]#" => "
      $1
    ", "#\\[li\\](.*?)\\[/li\\]#" => "
  • $1
  • ", diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index 7a41e970..750639f1 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -13,6 +13,7 @@ * 7) Browser hacks * 8) jQuery and jQuery UI * 9) Right-to-left language styles + * 10) BBCode Styles */ /** ******************************************************************* @@ -1064,3 +1065,21 @@ form .gError, .rtl .ui-icon-left .ui-icon { float: right; } + +/* BBCode ~~~~~~~~~~~~~~~~~~~~ */ +.gBBCodeBold { + font-weight: bold; +} + +.gBBCodeItalic { + font-style: italic; +} + +.gBBCodeUnderline { + text-decoration: underline; +} + +.gBBCodeStrike { + font-decoration: line-through; +} + -- cgit v1.2.3 From 85de2088798e2b5eac7cb26bf48e17b8034f3fb7 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 4 Jul 2009 20:30:13 -0700 Subject: Lets try the BBCode conversion again... go with basic tags even if some are deprecated. --- modules/g2_import/helpers/g2_import.php | 12 ++++++------ themes/default/css/screen.css | 18 ------------------ 2 files changed, 6 insertions(+), 24 deletions(-) (limited to 'modules/g2_import/helpers') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index cba1d429..2e40eb7f 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -756,17 +756,17 @@ class g2_import_Core { } static $bbcode_mappings = array( - "#\\[b\\](.*?)\\[/b\\]#" => "$1", - "#\\[i\\](.*?)\\[/i\\]#" => "$1", - "#\\[u\\](.*?)\\[/u\\]#" => "$1", - "#\\[s\\](.*?)\\[/s\\]#" => "$1", + "#\\[b\\](.*?)\\[/b\\]#" => "$1", + "#\\[i\\](.*?)\\[/i\\]#" => "$1", + "#\\[u\\](.*?)\\[/u\\]#" => "$1", + "#\\[s\\](.*?)\\[/s\\]#" => "$1", "#\\[url\\](.*?)\[/url\\]#" => "$1", "#\\[url=(.*?)\\](.*?)\[/url\\]#" => "$2", "#\\[img\\](.*?)\\[/img\\]#" => "", "#\\[quote\\](.*?)\\[/quote\\]#" => "

    $1

    ", "#\\[code\\](.*?)\\[/code\\]#" => "
    $1
    ", - "#\\[size=([^\\[]*)\\]([^\\[]*)\\[/size\\]#" => "$2", - "#\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]#" => "$2/span>", + "#\\[size=([^\\[]*)\\]([^\\[]*)\\[/size\\]#" => "$2", + "#\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]#" => "$2/font>", "#\\[ul\\](.*?)\\/ul\\]#" => "
      $1
    ", "#\\[li\\](.*?)\\[/li\\]#" => "
  • $1
  • ", ); diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index 750639f1..41e51623 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -13,7 +13,6 @@ * 7) Browser hacks * 8) jQuery and jQuery UI * 9) Right-to-left language styles - * 10) BBCode Styles */ /** ******************************************************************* @@ -1066,20 +1065,3 @@ form .gError, float: right; } -/* BBCode ~~~~~~~~~~~~~~~~~~~~ */ -.gBBCodeBold { - font-weight: bold; -} - -.gBBCodeItalic { - font-style: italic; -} - -.gBBCodeUnderline { - text-decoration: underline; -} - -.gBBCodeStrike { - font-decoration: line-through; -} - -- cgit v1.2.3