.id
4842
.gutitle
f_section_output
.title
f_section_output
.file
.extension
.name
.user_id
7
.notes
.body
<var C = GLOBAL.Def.Style.color>
<var set = caller.set>

<var _can_update = caller._can_update>
<var _can_delete = caller._can_delete>



<var _ttl = escapeMarkup(set.title)>
<if _ttl EQ "">
<var _ttl = "(untitled)">
</if>

<ensure variable="get.fmode" value="">
<ensure variable="get.function" value="">


<div id="#set.tbl#-#set.id#">

<var _Section = GLOBAL.Def.Sections_by_tbl[set.tbl]>

<!--- title --->

<if _can_update EQ 1>

<small><small><div style="float:right; padding:7px; background:#C.g6#; border-radius:7px;" align="right">
<if get.fmode EQ "edit">
<a href="http://#this_domain#/#so_slash_string#"><tag.fico i="tick" linkback="off" style="height:0.88em;"></a>
<a href="http://#this_domain#/#so_slash_string#"><b>Finish Editing</b></a>
<else>
<a href="http://#this_domain#/#so_slash_string#?&fmode=edit"><tag.fico i="pencil" linkback="off" style="height:0.88em;"></a>
<a href="http://#this_domain#/#so_slash_string#?&fmode=edit">Edit This</a>
</if>
<if _can_delete EQ 1>
|
<a class="delete_link" id="delete:#set.tbl#-#set.id#" href="##">Delete This</a>
<a class="delete_link" id="delete:#set.tbl#-#set.id#" href="##"><tag.fico i="cross" linkback="off" style="height:0.88em;"></a>
</if>
</div></small></small>

<if get.fmode EQ "edit">
<h3 style="margin-right:200px;"><div class="editmode">
<tag.jfield j="/#set.tbl#-#set.id#.title" v="#set.title#"
update="1"
label="Title">
</div></h3>
<else>
<h3 style="margin-right:200px;">#_ttl#</h3>
</if>

<else>

<h3>#_ttl#</h3>

</if>

<var _audience_return = 1>
<if NOT ( _can_update EQ 1 AND ( get.fmode EQ "edit" OR get.fmode EQ "preview" ) )>
<tag.audience j="/#set.tbl#-#set.id#" perm_slash="#_Section.tag#" singular="#_Section.singular#">
<var _audience_return = return>
</if>

<if _audience_return NEQ "break">

<!--- file --->
<if set.tbl NEQ "blogpost">
<if _can_update EQ 1 AND get.fmode EQ "edit">

<var _thumb_jstr = "">
<if set.thumbnail NEQ "">
<var _thumb_jstr = set.thumbnail>
</if>
<if reFindNoCase("^/?([a-z]+(_[a-z]+)*)-([0-9]+)$",_thumb_jstr) EQ 0>
<var _thumb_jstr = "">
</if>
<if _thumb_jstr EQ "">
<!--- make sure there's a thumbnail --->
<insert orb="image" title="Thumbnail: #set.title#"
is_proxy="1"
giveto_unsignedint="#GLOBAL.Def.Owner.id#">
<var _thumb_jstr = "/image-#return#">
<update orb="#set.tbl#" where="#set.tbl#.id = #set.id#" thumbnail="#_thumb_jstr#">
</if>
<!--- make sure thumbnail exists --->
<var _Thumb = QueryNew('id')>
<var _set = set>
<set j="#_thumb_jstr#" is_proxy="1">
<setcrawl>
<var _Thumb = set>
</setcrawl>
<setempty>
<!--- again, make sure there's a thumbnail --->
<insert orb="image" title="Thumbnail: #_set.title#"
is_proxy="1"
giveto_unsignedint="#GLOBAL.Def.Owner.id#">
<var _thumb_jstr = "/image-#return#">
<update orb="#_set.tbl#" where="#_set.tbl#.id = #_set.id#" thumbnail="#_thumb_jstr#">
<set j="#_thumb_jstr#" is_proxy="1">
<setcrawl>
<var _Thumb = set>
</setcrawl>
</set>
</setempty>
</set>

<div class="filecontainer" style="height:240px;">

<if _thumb_jstr NEQ "" AND _Thumb.recordcount GT 0>
<div style="float:right; margin-right:1em; width:27%; margin-top:80px;">
<h5>Thumbnail Image:</h5>
<!--- file --->
<div class="editmode" align="center">
<tag.jfield j="/#_Thumb.tbl#-#_Thumb.id#.file" v=""
update="1"
picwidth="84" max_height="84"
label="Thumbnail (optional)"
so_lastupdated="#_Thumb.so_lastupdated#">
</div>
<small><small><div style="padding-top:2px; color:#C.g5#;">
Optional: upload a thumbnail image to represent your post.
</div></small></small>
</div>
</if>

<div style="float:left; margin-left:1em; width:50%;">
<!--- file --->
<h5>Main File:</h5>
<div class="editmode" align="center">
<tag.jfield j="/#set.tbl#-#set.id#.file" v=""
update="#_can_update#"
picwidth="132" max_height="172"
label="Main File"
so_lastupdated="#set.so_lastupdated#">
</div>
<small><small><div style="padding-top:2px; color:#C.g5#;">
The main picture, video, audio or other file for this post.
<if set.extension NEQ "">
(Current file type: <span style="color:#C.back#;"><b>#escapeMarkup(set.extension)#</b></span>)
</if>
</div></small></small>
</div>

</div>
<div>&nbsp;</div>

<else>

<tag.f_ensure_thumb set="#set#">
<var _has_thumb = return>

<!--- IMAGE --->
<if listFindNoCase("jpg,png,gif",set.extension) GT 0>

<var _pw = 400>
<div class="filecontainer" align="center">
<img src="http://#this_domain#/file:/#set.tbl#-#set.id#?&picwidth=#_pw#&f2=image-657" border="0" style="max-height:#round(_pw*3)#;">
</div>
<div>&nbsp;</div>

<!--- VIDEO --->
<elseif listFindNoCase("mp4,flv",set.extension) GT 0>

<var _pw = 320>
<var _src = "http://#this_domain#/file:/#set.tbl#-#set.id#.9#hash(set.so_lastupdated)#.#set.extension#">
<var _usethumb = "/image-787">
<if _has_thumb EQ 1>
<var _usethumb = set.thumbnail>
</if>
<div class="filecontainer" align="center">
<div style="width:#_pw#px;">
<div id="playmedia-video-#set.tbl#-#set.id#" class="media_player_video" style="display:block; width:#_pw#px; height:#round(_pw*0.75)#px; background:##202020;" href="#_src#" title="#escapeDoubleQuotes(escapeMarkup(set.title))#">
<if get.function NEQ "play">
<img src="http://#this_domain#/file:#_usethumb#?&f2=image-787&picwidth=#_pw#&so_lastupdated=#urlEncodedFormat(set.so_lastupdated)#" alt="#escapeDoubleQuotes(escapeMarkup(set.title))#" style="cursor:pointer;">
</if>
</div>
</div>
</div>
<div>&nbsp;</div>

<!--- AUDIO --->
<elseif listFindNoCase("mp3",set.extension) GT 0>

<var _src = "http://#this_domain#/file:/#set.tbl#-#set.id#.9#hash(set.so_lastupdated)#.#set.extension#">
<div class="filecontainer" align="center">
<div>
<div id="playmedia-audio-#set.tbl#-#set.id#" class="media_player_audio no_autoplay" style="display:block; width:100%; height:30px; background:##202020;" href="#_src#"></div>
</div>
</div>
<div>&nbsp;</div>

</if>

</if>
</if>

<!--- body --->
<if _can_update EQ 1 AND get.fmode EQ "edit">
<div class="editmode">
<tag.jfield j="/#set.tbl#-#set.id#.body" v="#set.body#"
update="1"
label="Body">
</div>
<else>
<div class="copy" style="margin-right:2em;">
#noJavascript(escapeWhitespace(set.body))#
</div>
</if>

</if>

<if ( get.fmode EQ "preview" OR _audience_return EQ "break" ) AND _can_update EQ 1 AND get.fmode NEQ "edit">

<small><small><div align="right" style="padding-top:3px;">
<if get.fmode EQ "preview">
<a style="padding:7px; background:#C.alert#; border-radius:7px;" href="http://#this_domain#/#so_slash_string#">Exit Preview</a>
<else>
<a style="color:#C.g3#;" href="http://#this_domain#/#so_slash_string#?&fmode=preview">Preview Without Audience Meter...</a>
</if>
</div></small></small>

</if>

<!--- timeago, share, download --->
<div>&nbsp;</div>
<div style="color:#C.g3#;">
Posted #timeAgo(set.so_dateinserted)#
|
<var _sharehref = "http://#this_domain#/share?&url=#urlEncodedFormat('http://#this_domain#/#_Section.tag#/#set.id#')#&title=#urlEncodedFormat(set.title)#">
<a href="#_sharehref#"><img src="http://#this_domain#/file:/icon-facebook" border="0" style="height:0.88em;"></a>
<a href="#_sharehref#"><img src="http://#this_domain#/file:/icon-twitter" border="0" style="height:0.88em;"></a>
<a href="#_sharehref#">Share</a>
<if set.has_downloads_unsignedint EQ 1>
<if _can_update EQ 1>
|
<a href="http://#this_domain#/#_Section.tag#/#set.id#/download">Manage Downloads</a>
<a href="http://#this_domain#/#_Section.tag#/#set.id#/download"><tag.fico i="drive-download" linkback="off" style="height:1em;"></a>
<elseif _audience_return NEQ "break">
|
<a href="http://#this_domain#/#_Section.tag#/#set.id#/download">Download</a>
<a href="http://#this_domain#/#_Section.tag#/#set.id#/download"><tag.fico i="drive-download" linkback="off" style="height:1em;"></a>
</if>
<elseif _can_update EQ 1>
|
<a href="http://#this_domain#/#_Section.tag#/#set.id#/download">Enable Downloads</a>
<a href="http://#this_domain#/#_Section.tag#/#set.id#/download"><tag.fico i="drive-download" linkback="off" style="height:1em;"></a>
</if>
</div>

<if set.season_unsignedint GT 0 AND set.episode_unsignedint GT 0>
<var J = jParse('/f_episode@fentriss.season_unsignedint.episode_unsignedint.release_unsignedint:1')>
<var _set = set>
<set orb="#J.orb#" select="#J.select#" where="#J.orb#.season_unsignedint = #set.season_unsignedint# AND #J.orb#.episode_unsignedint = #set.episode_unsignedint# AND (#J.where#)" maxrows="1">
<setcrawl>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div style="border-top:1px solid #C.g4#;">&nbsp;</div>
<div>
<a href="http://fentriss.com/episodes/#set.season_unsignedint#-#set.episode_unsignedint#"><b>Episode #set.episode_unsignedint#: #escapeMarkup(set.title)#</b></a>
</div>
<var _ppw = 120>
<div style="padding-top:7px; margin-left:1em; height:100px;">
<set orb="video" select="video.id,video.user_id,video.title,video.thumbnail,video.so_lastupdated"
where="video.user_id IN(#GLOBAL.Def.Facts.fentriss_user_ids#) AND video.episode_unsignedint = #set.episode_unsignedint# AND video.season_unsignedint = #set.season_unsignedint#" maxrows="10">
<setcrawl>
<if set.id EQ _set.id>
<span style="float:left; margin-bottom:7px; width:#_ppw#px; margin-right:7px;">
<div>
<img src="http://#this_domain#/file:#set.thumbnail#?&picwidth=#_ppw#&so_lastupdated=#urlEncodedFormat(set.so_lastupdated)#" border="0" style="opacity:0.7; filter:alpha(opacity=70);">
</div>
<small><div style="padding-top:2px; color:#C.g3#;" align="center">
#escapeMarkup(set.title)#
</div></small>
</span>
<else>
<a href="http://#set.user_id#.fentriss.com/#GLOBAL.Def.Sections_by_tbl[set.tbl].tag#/#set.id#" style="float:left; margin-bottom:7px; width:#_ppw#px; text-decoration:none !important; color:#C.text#; margin-right:7px;">
<div>
<img src="http://#this_domain#/file:#set.thumbnail#?&picwidth=#_ppw#&so_lastupdated=#urlEncodedFormat(set.so_lastupdated)#" border="0">
</div>
<small><div style="padding-top:2px;" align="center">
#escapeMarkup(set.title)#
</div></small>
</a>
</if>
</setcrawl>
<div style="float:left; min-width:120px;">
<div>
<if set.recordcount EQ 1>
There is one video in this episode.
<else>
There are #set.recordcount# videos in this episode. Watch the videos in any
order you like.
</if>
</div>
<small><small><div style="padding-top:2px;">
<a href="http://fentriss.com/episodes">More Episodes...</a>
</div></small></small>
</div>
</set>
</div>
</setcrawl>
</set>
</if>

</div>
 
.sum_double
0.00
.producttype
.productincludes
.physical_unsignedint
0
.isprotected_unsignedint
0
.overridesiteheader_unsignedint
0