diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index a6f777042..d60185b03 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -2696,14 +2696,35 @@ class e_parser * @param string $icon * @example $tp->toIcon("{e_IMAGES}icons/something.png"); */ - public function toIcon($icon='') + public function toIcon($icon='',$legacyPath ='') { if(!vartrue($icon)) { return; } - $path = $this->replaceConstants($icon,'full'); + if(substr($icon,-6) == '.glyph') // Bootstrap or Font-Awesome. + { + return $this->toGlyph($icon); + } + + if($icon[0] == '{') + { + $path = $this->replaceConstants($icon,'full'); + } + elseif($legacyPath) + { + if(is_readable($legacyPath.$icon)) + { + $path = $legacyPath.$icon; + } + elseif(ADMIN) + { + return "Broken Image Path: ".$icon; + } + + } + return "".basename($path).""; } diff --git a/e107_handlers/rate_class.php b/e107_handlers/rate_class.php index 05efb9b5f..3e31caf0d 100644 --- a/e107_handlers/rate_class.php +++ b/e107_handlers/rate_class.php @@ -63,7 +63,7 @@ class rater { $TEMPLATE['STATUS'] = " "; $TEMPLATE['RATE'] = "
"; - $TEMPLATE['VOTES'] = "
".$this->renderVotes($votes,$score)."
"; + $TEMPLATE['VOTES'] = "
".$this->renderVotes($votes,$score)."
"; $tmp = explode("|",$template); diff --git a/e107_plugins/download/download_shortcodes.php b/e107_plugins/download/download_shortcodes.php index 2b0d6afaf..111259f5f 100644 --- a/e107_plugins/download/download_shortcodes.php +++ b/e107_plugins/download/download_shortcodes.php @@ -884,9 +884,11 @@ class download_shortcodes extends e_shortcode function _sc_cat_icons($source, $count, $alt) { if (!$source) return " "; - list($ret[TRUE],$ret[FALSE]) = explode(chr(1), $source.chr(1)); - if (!$ret[FALSE]) $ret[FALSE] = $ret[TRUE]; - return "*"; + // list($ret[TRUE],$ret[FALSE]) = explode(chr(1), $source.chr(1)); //XXX ??? + // if (!$ret[FALSE]) $ret[FALSE] = $ret[TRUE]; //XXX ??? + + return e107::getParser()->toIcon($source, e_IMAGE."icons/"); + //return "*"; } diff --git a/e107_plugins/download/includes/admin.php b/e107_plugins/download/includes/admin.php index 2f6704e41..7fd00494f 100644 --- a/e107_plugins/download/includes/admin.php +++ b/e107_plugins/download/includes/admin.php @@ -120,7 +120,7 @@ class download_cat_ui extends e_admin_ui protected $fields = array( 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), - 'download_category_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'width' => '5%', 'thclass' => 'center','class'=>'center' ), + 'download_category_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'width' => '5%', 'thclass' => 'center','class'=>'center','writeParms'=>'glyphs=1' ), 'download_category_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE), 'download_category_name' => array('title'=> LAN_TITLE, 'type' => 'text', 'inline' => true, 'width' => 'auto', 'thclass' => 'left'), 'download_category_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'inline' => true, 'width' => 'auto', 'thclass' => 'left'),