display all icons
// $look = 1 --->display email icon only
// $look = 2 --->display print icon only
$tp = e107::getParser();
$text_emailprint = "";
//new method emailprint_class : (only news is core, rest is plugin: searched for e_emailprint.php which should hold $email and $print values)
if($mode == "news")
{
$email = "news";
$print = "news";
}
else
{
//load the others from plugins
$handle = opendir(e_PLUGIN);
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != ".." && is_dir(e_PLUGIN.$file))
{
$plugin_handle = opendir(e_PLUGIN.$file."/");
while (false !== ($file2 = readdir($plugin_handle)))
{
if ($file2 == "e_emailprint.php")
{
require_once(e_PLUGIN.$file."/".$file2);
}
}
}
}
}
if(deftrue('BOOTSTRAP'))
{
$genericMail = $tp->toGlyph('fa-envelope',false); // "";
$genericPrint = $tp->toGlyph('fa-print',false); // "";
$class = !empty($parm['class']) ? $parm['class'] : "btn btn-default btn-secondary";
}
else // BC
{
$genericMail = "";
$genericPrint = "";
$class = "";
}
if ($look == 0 || $look == 1)
{
$ico_mail = (defined("ICONMAIL") && file_exists(THEME."images/".ICONMAIL) ? "" : $genericMail);
//TDOD CSS class
$text_emailprint .= "".$ico_mail." ";
}
if ($look == 0 || $look == 2)
{
$ico_print = (defined("ICONPRINT") && file_exists(THEME."images/".ICONPRINT) ? "" : $genericPrint);
//TODO CSS class
$text_emailprint .= "".$ico_print."";
}
return $text_emailprint;
}
}
?>