Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-05-02 16:35:46

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Show or hidde title attribute in images

Just an idea: cause some browsers display the image title content AND the title attribute when images are wrapped by a link, it will be interesting to offer the ability to choose if we want to show the title attribute into the thumbnail and article_image tags through a TXP attribute (maybe this one: title=“boolean”).

File (r3340): textpattern/publish/taghandlers.php lines #241 and #2504

extract(lAtts(array(
		(...)
		'title'		=> '',
		(...)
$out = '<img src="'.($sub_dom ? $sub_dom : hu).$img_dir.'/'.$id.'t'.$ext.'" alt="'.$alt.'"'.
						( ($caption and $title) ? ' title="'.$caption.'"' : '').
						( ($html_id and !$wraptag) ? ' id="'.$html_id.'"' : '' ).
						( ($class and !$wraptag) ? ' class="'.$class.'"' : '' ).
						($style ? ' style="'.$style.'"' : '').
						($align ? ' align="'.$align.'"' : '').
						' />';

Last edited by Pat64 (2010-05-02 16:42:11)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB