diff --git a/e107_files/shortcode/news_categories.sc b/e107_files/shortcode/news_categories.sc index 0ccec1827..73b20bfc5 100644 --- a/e107_files/shortcode/news_categories.sc +++ b/e107_files/shortcode/news_categories.sc @@ -1,6 +1,6 @@ /* * Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt) - * $Id: news_categories.sc,v 1.6 2009-09-25 20:20:23 secretr Exp $ + * $Id: news_categories.sc,v 1.7 2009-10-07 15:15:36 secretr Exp $ * * News Categories shortcode */ @@ -96,9 +96,21 @@ $nbr_cols = (defined("NEWSCAT_COLS")) ? NEWSCAT_COLS : $nbr_cols; $wid = floor(100/$nbr_cols); while ($row3 = $sql2->db_Fetch()) { extract($row3); - + //quick fix + if($category_icon) + { + // new path + if(strpos($category_icon, '{') === 0) + { + $category_icon = e107::getParser()->replaceConstants($category_icon, 'abs'); + } + else //old paths + { + $category_icon = e_IMAGE_ABS."icons/".$category_icon; + } + } $search[0] = "/\{NEWSCATICON\}(.*?)/si"; - $replace[0] = ($category_icon) ? "" : ""; + $replace[0] = ($category_icon) ? "" : ""; $search[1] = "/\{NEWSCATEGORY\}(.*?)/si"; $replace[1] = ($category_name) ? "".$tp->toHTML($category_name,TRUE,"defs")."" : "";