From ab76e96e862892dc101330954510778162e4c448 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 15 Nov 2017 15:11:33 -0800 Subject: [PATCH] Issue #2863 Possible fix for Glyph issue (bootstrap2 icons while using bootstrap3) --- e107_handlers/e_parse_class.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 841325e79..6cbe8e406 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -3888,7 +3888,7 @@ class e_parser - list($cls) = explode('.glyph',$text,2); + list($id) = explode('.glyph',$text,2); // list($type, $tmp2) = explode("-",$text,2); // return $cls; @@ -3897,7 +3897,6 @@ class e_parser // $id = str_replace($removePrefix, "", $cls); - $id = $cls; $spin = null; $rotate = null; @@ -3951,8 +3950,17 @@ class e_parser } elseif(strpos($text, 'icon-') === 0) // Bootstrap 2 { - $prefix = ''; - $tag = 'i'; + if(deftrue('BOOTSTRAP') != 2) // bootrap 2 icon but running bootstrap3. + { + $prefix = 'glyphicon '; + $tag = 'span'; + $id = str_replace("icon-", "glyphicon-", $id); + } + else + { + $prefix = ''; + $tag = 'i'; + } } elseif($custom = e107::getThemeGlyphs()) // Custom Glyphs