Thumbnail For Excerpts generates invalid XHTML
-
Thumbnail For Excerpts is a wonderful plugin, making excerpts far more appealing than they are by default.
However, when validating my site’s HTML, I got errors from missing double quotes around attribute values and others a bout missing alt attributes.
I would like to suggest the following:
1. Change line 22 to
define(“TFE_TITLE”,”yes”); // show alt tags by default
2. Change line line 124 to
That didn’t go too well with the code. Let me try again:
echo (TFE_LINK=="yes"?'<a href="'.get_permalink($id).'">':"").'<img src="'.$img2.'" class="'.TFE_CLASS.'" hspace="'.TFE_SPACE.'" align="'.TFE_ALIGN.'" '.$condsize.'="'.$tfesize.'" '.(TFE_TITLE=="yes"?'alt="'.$tit1.'" title="'.$tit1.'"':' alt="Post thumbnail"').' border="0" />'.(TFE_LINK=="yes"?"</a>":"");
// Ensure alt tag is there and include double quotes for all attributes3. Change line 133 to
echo (TFE_LINK=="yes"?'<a href="'.get_permalink($id).'">':"").'<img src="'.$img1.'" class="'.TFE_CLASS.'" hspace="'.TFE_SPACE.'" align="'.TFE_ALIGN.'" '.$condsize.'="'.$tfesize.'" '.(TFE_TITLE=="yes"?'alt="'.$tit1.'" title="'.$tit1.'"':' alt="Post thumbnail"').' border="0" />'.(TFE_LINK=="yes"?"</a>":"");
// Ensure alt tag is there and include double quotes for all attributes4. Include a way to submit bugs and requests in the plugin code
If you know how to get in touch with the author of this great plugin, Radu Capan, please refer him to this thread.
Best regards,
Gal
- The topic ‘Thumbnail For Excerpts generates invalid XHTML’ is closed to new replies.