1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-18 12:21:45 +02:00

Added support for bootstrap glyphs (see admin-> Site-links icon for example)

This commit is contained in:
Cameron
2013-07-12 07:13:10 -07:00
parent 62f178f9bb
commit 955bb78769
10 changed files with 295 additions and 57 deletions

View File

@@ -2430,6 +2430,10 @@ class e_parse extends e_parser
}
/**
* Given an email address, returns a link including js-based obfuscation
*/
@@ -2609,11 +2613,30 @@ class e_parser
// Parse i_xxxx to bootstrap glyph format.
/**
* Parse xxxxx.glyph file to bootstrap glyph format.
* @return FALSE if not a glyph file or if bootstrap is not found.
*/
public function glyph($text)
{
$text = preg_replace('/\[(i_[\w]*)\]/',"<i class='$1'></i>", $text);
return $text;
if(!deftrue('BOOTSTRAP'))
{
return false;
}
if(substr($text,-6) == '.glyph') // Bootstrap or Font-Awesome.
{
list($cls,$tmp) = explode('.glyph',$text);
return "<i class='".$cls."'></i> "; // retain space.
}
return false;
//$text = preg_replace('/\[(i_[\w]*)\]/',"<i class='$1'></i>", $text);
// return $text;
}
/**