1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02: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:
Cameron
2013-10-01 12:21:00 -07:00
2 changed files with 5 additions and 6 deletions

View File

@@ -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; $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 //TODO - remove inline styles
if($this->param['caticon'] == ''){$this->param['caticon'] = 'border:0px';} if($this->param['caticon'] == ''){$this->param['caticon'] = 'border:0px';}
@@ -418,12 +417,12 @@ class news_shortcodes extends e_shortcode
break; break;
case 'tag': 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; break;
case 'url': case 'url':
default: 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; break;
} }
} }

View File

@@ -261,7 +261,7 @@ class comment
$indent = ($action == 'reply') ? " class='offset1' " : ""; $indent = ($action == 'reply') ? " class='offset1' " : "";
$formid = ($action == 'reply') ? "e-comment-form-reply" : "e-comment-form"; $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 .= "Indent = ".$indent;
$text .= "<form id='{$formid}' method='post' action='".str_replace('http:', '', $_SERVER['REQUEST_URI'])."' >"; $text .= "<form id='{$formid}' method='post' action='".str_replace('http:', '', $_SERVER['REQUEST_URI'])."' >";