<!--- expects caller.set to be the query.
requires caller.Tbls to model each table. --->
<var C = GLOBAL.Def.Style.color>
<var set = caller.set>
<var Tbls = caller.Tbls>
<setcrawl>
<var Model = caller.Tbls[set.tbl]>
<var _ttl = "A #Model.singular# by">
<if set.title NEQ "">
<tag.clean_shortstring str="#escapeMarkup(set.title)#" chars="24">
<var _str = return>
<var _ttl = '<a href="http://#this_domain#/j:/#set.tbl#-#set.id#">#_str#</a>'>
</if>
<if set.uname NEQ "">
<var _ttl = _ttl & ' by <a href="http://#this_domain#/#set.id#/media">#escapeMarkup(set.uname)#</a>'>
<else>
<var _ttl = _ttl & ' by <a href="http://#this_domain#/#set.id#/media">/user-#set.user_id#</a>'>
</if>
<div>
<!--- icon --->
<div style="width:16px; float:left; padding-top:3px;">
<tag.fico i="#Model.fico#" linkback="off" style="">
</div>
<div style="margin-left:21px;">
<!--- headline --->
<small><small><div>
<div>#_ttl#</div>
</div></small></small>
<!--- thumbnail --->
<div style="padding:5px; padding-left:0px; padding-bottom:0px;">
<var _pw = 84>
<if set.tbl EQ "photo">
<if listFindNoCase("jpg,png,gif",set.extension) EQ 0>
<!--- default photo --->
<var _src = "http://#this_domain#/file:/site-balloon">
<else>
<var _src = "http://#this_domain#/file:/#set.tbl#-#set.id#?&f2=site-897&picwidth=#_pw#">
</if>
<a href="http://#this_domain#/j:/#set.tbl#-#set.id#"><img src="#_src#" border="0"></a>
<elseif set.tbl EQ "audio">
<if listFindNoCase("mp3",set.extension) EQ 0>
<!--- bad. --->
<var _src = "http://#this_domain#/file:/icon-simplistica_delete?&picwidth=#_pw#">
<else>
<var _src = "http://#this_domain#/file:/icon-bn_playbtn?&f2=site-897&picwidth=#_pw#">
</if>
<a href="http://#this_domain#/j:/#set.tbl#-#set.id#"><img src="#_src#" border="0"></a>
<elseif set.tbl EQ "video">
<if listFindNoCase("mp4",set.extension) EQ 0>
<!--- bad. --->
<var _src = "http://#this_domain#/file:/icon-simplistica_delete?&picwidth=#_pw#">
<else>
<var _src = "http://#this_domain#/file:/icon-bn_playbtn_video?&f2=site-897&picwidth=#_pw#">
</if>
<a href="http://#this_domain#/j:/#set.tbl#-#set.id#"><img src="#_src#" border="0"></a>
<elseif set.tbl EQ "text">
<if set.body EQ "">
(empty)
<else>
<tag.clean_shortstring str="#replaceMarkup(set.body)#" chars="54">
<var _str = return>
<big><div><a href="http://#this_domain#/j:/#set.tbl#-#set.id#" style="color:#C.g2#;">#_str#</a></div></big>
</if>
</if>
</div>
<small><small><div style="color:#C.g3#;">
#timeAgo(set.so_dateinserted)#
</div></small></small>
</div>
<div style="clear:both; height:11px;"> </div>
</div>
</setcrawl>