mirror of
https://github.com/e107inc/e107.git
synced 2025-04-19 12:11:55 +02:00
Bugtracker #4456 - handle empty news category icon - thanks marj
This commit is contained in:
parent
ef17ee279f
commit
bba4c56e23
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/news_shortcodes.php,v $
|
||||
| $Revision: 1.6 $
|
||||
| $Date: 2007-11-08 21:06:03 $
|
||||
| $Revision: 1.7 $
|
||||
| $Date: 2008-07-15 21:11:43 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -44,13 +44,15 @@ global $tp, $news_shortcodes;
|
||||
$news_item = getcachedvars('current_news_item');
|
||||
$param = getcachedvars('current_news_param');
|
||||
$category_icon = $tp -> parseTemplate('{NEWSHEADER}', FALSE, $news_shortcodes);
|
||||
if (!$category_icon) return '';
|
||||
return "<a href='".e_BASE."news.php?cat.".$news_item['news_category']."'><img style='".$param['caticon']."' src='".$category_icon."' alt='' /></a>";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN NEWSHEADER
|
||||
$news_item = getcachedvars('current_news_item');
|
||||
$param = getcachedvars('current_news_param');
|
||||
$category_icon = str_replace("../", "", $news_item['category_icon']);
|
||||
$category_icon = str_replace("../", "", trim($news_item['category_icon']));
|
||||
if (!$category_icon) return '';
|
||||
if ($category_icon && strstr("images", $category_icon)) {
|
||||
return THEME.$category_icon;
|
||||
} else {
|
||||
@ -263,6 +265,7 @@ global $tp, $news_shortcodes;
|
||||
$news_item = getcachedvars('current_news_item');
|
||||
$param = getcachedvars('current_news_param');
|
||||
$category_icon = $tp -> parseTemplate('{NEWSHEADER}', FALSE, $news_shortcodes);
|
||||
if (!$category_icon) return '';
|
||||
if($param['caticon'] == ""){$param['caticon'] = "border:0px";}
|
||||
return "<a href='".e_BASE."news.php?cat.".$news_item['news_category']."'><img style='".$param['caticon']."' src='".$category_icon."' alt='' /></a>";
|
||||
SC_END
|
||||
|
Loading…
x
Reference in New Issue
Block a user