mirror of
https://github.com/e107inc/e107.git
synced 2025-08-20 21:32:09 +02:00
Issue #435 - start of Bootstrap 3 core support. Enable by adding the following to your theme.php file:
define("BOOTSTRAP", 3); define("FONTAWESOME", 4); // optional e107::js("url", "//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"); e107::css('url', '//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css'); e107::css('url', "//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"); // optional
This commit is contained in:
@@ -2662,7 +2662,7 @@ class e_parser
|
||||
* Parse xxxxx.glyph file to bootstrap glyph format.
|
||||
* @return FALSE if not a glyph file or if bootstrap is not found.
|
||||
*/
|
||||
public function toGlyph($text)
|
||||
public function toGlyph($text, $space=" ")
|
||||
{
|
||||
if(!deftrue('BOOTSTRAP'))
|
||||
{
|
||||
@@ -2672,7 +2672,16 @@ class e_parser
|
||||
if(substr($text,-6) == '.glyph') // Bootstrap or Font-Awesome.
|
||||
{
|
||||
list($cls,$tmp) = explode('.glyph',$text);
|
||||
return "<i class='".$cls."'></i> "; // retain space.
|
||||
|
||||
if(deftrue('FONTAWESOME') == 4) // Convert FontAwesome 3 to 4.
|
||||
{
|
||||
$cls = str_replace('icon-', 'fa fa-', $cls);
|
||||
}
|
||||
|
||||
$text = (deftrue('BOOTSTRAP') == 3) ? "<span class='".$cls."'></span>" : "<i class='".$cls."'></i>"; // retain space.
|
||||
$text .= ($space !== false) ? $space : "";
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user