1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Generic breadcrumb() function added. Removed front-end css styling from admin area.

This commit is contained in:
Cameron 2013-06-22 18:11:10 -07:00
parent 62e06d7a30
commit 279abb0b2b
3 changed files with 39 additions and 2 deletions

View File

@ -580,7 +580,7 @@ if(isset($pref['lan_global_list']))
$sql->db_Mark_Time('Start: CHAP challenge');
$die = (e_AJAX_REQUEST == true) ? false : true; // prevent json breakage.
$die = (e_AJAX_REQUEST == true) ? false : true;
e107::getSession()
->challenge() // Make sure there is a unique challenge string for CHAP login
->check($die); // Token protection

View File

@ -231,7 +231,7 @@ elseif (isset($pref['themecss']) && $pref['themecss'])
{
$css_file = (file_exists(THEME.'admin_'.$pref['themecss']) && !vartrue($_GET['configure'])) ? 'admin_'.$pref['themecss'] : $pref['themecss'];
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
$e_js->themeCSS($css_file);
// $e_js->themeCSS($css_file); // Test with superhero.css for frontend bootstrap and 'dark' for backend bootstrap.
}
else
{

View File

@ -1570,6 +1570,43 @@ class e_form
}
/**
* Render a Breadcrumb in Bootstrap format.
* @param $array
*/
function breadcrumb($array)
{
if(!is_array($array)){ return; }
$text = '<ul class="breadcrumb">
<li>';
foreach($array as $val)
{
$ret = "";
$ret .= vartrue($val['url']) ? "<a href='".$val['url']."'>" : "";
$ret .= vartrue($val['text'],'');
$ret .= vartrue($val['url']) ? "</a>" : "";
if($ret != '')
{
$opt[] = $ret;
}
}
$text .= implode("<span class='divider'>/</span></li><li>",$opt);
$text .= "</li></ul>";
return $text;
}
/**
* Admin Button - for front-end, use button();