jpeg, jpg, gif, bmp, svg or png
. If there are multiple image attachments
then the first one ordered by comment and name is taken. The empty string
is returned if no image attachment is found.
on
comment:name
which will take the one that sorts first wrt the comment, falling back to the name
%STARTINCLUDE%%DBCALL{"Applications.RenderTopicThumbnail" section="%IF{ "'%ATTACHMENTS{"%OBJECT%" attr=".*t.*" format="yes"}%'='yes'" then="thumbnailed" else="defaultthumbnail" }%" object="%OBJECT%" align="%ALIGN{default="right"}%" size="%SIZE{default="48x48>^"}%" type="%TYPE{default="simple"}%" crop="%CROP{default="on"}%" sort="%SORT{default="comment:name"}%" }%%STOPINCLUDE%
%STARTSECTION{"thumbnailed"}%%ATTACHMENTS{ "%object%" attr=".*t.*" warn="off" hidenull="on" format="$percntIMAGE{ \"$name\" topic=\"$web.$topic\" align=\"%align%\" type=\"%type%\" size=\"%size%\" crop=\"%crop%\" title=\"\" tooltip=\"%TOOLTIP{default="on"}%\" warn=\"off\" output=\"png\" }$percnt" }%%ENDSECTION{"thumbnailed"}% %STARTSECTION{"defaultthumbnail"}%%ATTACHMENTS{ "%object%" name=".*\.(jpe?g|gif|png|bmp|svg|JE?PG|GIF|PNG|BMP|SVG)" warn="off" limit="1" sort="%sort%" reverse="%IF{"'%sort%' = 'date'" then="on" else="off"}%" hidenull="on" format="$percntIMAGE{ \"$name\" topic=\"$web.$topic\" align=\"%align%\" type=\"%type%\" size=\"%size%\" crop=\"%crop%\" title=\"\" tooltip=\"%TOOLTIP{default="on"}%\" warn=\"off\" output=\"png\" }$percnt" }%%ENDSECTION{"defaultthumbnail"}%
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.