mirror of
https://github.com/e107inc/e107.git
synced 2025-03-13 17:09:46 +01:00
Merge pull request #449 from Axeia/master
Added alt text to news category icons and fixed double ID bug (so at least that part is valid HTML)
This commit is contained in:
commit
fa9d8fd2ad
@ -406,8 +406,7 @@ class news_shortcodes extends e_shortcode
|
||||
$src = (is_readable(e_IMAGE_ABS."newspost_images/".$category_icon)) ? e_IMAGE_ABS."newspost_images/".$category_icon : e_IMAGE_ABS."icons/".$category_icon;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$alt_text = e107::getParser()->toHTML($this->news_item['category_name'], FALSE ,'defs');
|
||||
//TODO - remove inline styles
|
||||
if($this->param['caticon'] == ''){$this->param['caticon'] = 'border:0px';}
|
||||
|
||||
@ -418,12 +417,12 @@ class news_shortcodes extends e_shortcode
|
||||
break;
|
||||
|
||||
case 'tag':
|
||||
return "<img class='news_image' src='{$src}' alt='' style='".$this->param['caticon']."' />";
|
||||
return "<img class='news_image' src='{$src}' alt='$alt_text' style='".$this->param['caticon']."' />";
|
||||
break;
|
||||
|
||||
case 'url':
|
||||
default:
|
||||
return "<a href='".e107::getUrl()->create('news/list/category', $this->news_item)."'><img class='img-rounded' style='".$this->param['caticon']."' src='".$src."' alt='' /></a>";
|
||||
return "<a href='".e107::getUrl()->create('news/list/category', $this->news_item)."'><img class='img-rounded' style='".$this->param['caticon']."' src='".$src."' alt='$alt_text' /></a>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -488,4 +487,4 @@ class news_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -261,7 +261,7 @@ class comment
|
||||
$indent = ($action == 'reply') ? " class='offset1' " : "";
|
||||
$formid = ($action == 'reply') ? "e-comment-form-reply" : "e-comment-form";
|
||||
|
||||
$text = "\n<div id='{$formid}' {$indent}>\n".e107::getMessage()->render('postcomment', true, false, false);//temporary here
|
||||
$text = "\n<div{$indent}>\n".e107::getMessage()->render('postcomment', true, false, false);//temporary here
|
||||
|
||||
// $text .= "Indent = ".$indent;
|
||||
$text .= "<form id='{$formid}' method='post' action='".str_replace('http:', '', $_SERVER['REQUEST_URI'])."' >";
|
||||
|
Loading…
x
Reference in New Issue
Block a user