<?xml version="1.0" encoding="UTF-8"?>
<theme name="Default" author_name="Invision Power Services, Inc" author_url="https://www.invisioncommunity.com">
 <template template_group="browse" template_name="album" template_data="$album, $table, $commentsAndReviews" template_location="front" template_app="gallery"><![CDATA[
{{if $club = $album->category()->club()}}
	{{if settings.clubs and settings.clubs_header == 'full'}}
		{template="header" app="core" group="clubs" params="$club, $album->category()"}
	{{endif}}
	<div id='elClubContainer'>
{{endif}}

<div class="ipsPageHeader ipsClearfix ipsSpacer_bottom">
	<div class='ipsPos_right ipsResponsive_noFloat ipsResponsive_hidePhone'>
		{{$followerCount = \IPS\gallery\Image::containerFollowerCount( $album );}}
		{template="follow" app="core" group="global" params="'gallery', 'album', $album->_id, $followerCount"}
	</div>
	<div class='ipsPos_right ipsResponsive_noFloat ipsResponsive_hidePhone'>
		{template="promote" app="core" group="global" params="$album->asItem()"}
	</div>
	<h1 class="ipsType_pageTitle ipsContained_container">
		{{if $album->asItem()->hidden() === 1}}
			<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span>
		{{elseif $album->asItem()->hidden() === -1}}
			<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$album->asItem()->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
		{{elseif $album->asItem()->hidden() === -2}}
			<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$album->asItem()->deletedBlurb()}'><i class='fa fa-trash'></i></span></span>
		{{endif}}
		{{if $album->asItem()->mapped('featured')}}
			<span><span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span>
		{{endif}}
		{{if $album->asItem()->canEdit()}}
			<span class='ipsContained ipsType_break' data-controller="core.front.core.moderation">{{if $album->asItem()->locked()}}<i class='fa fa-lock'></i> {{endif}}
				<span data-role="editableTitle" title='{lang="click_hold_edit"}'>{$album->_title}</span>
			</span>
		{{else}}
			<span class='ipsContained ipsType_break'>{{if $album->asItem()->locked()}}<i class='fa fa-lock'></i> {{endif}}{$album->_title}</span>
		{{endif}}
	</h1>
</div>

<div class='ipsColumns ipsColumns_collapsePhone'>
	<div class='ipsColumn ipsColumn_wide'>
		<div class='ipsBox ipsPad'>
			{{if $album->coverPhoto('masked')}}
				<div class='ipsSpacer_bottom'>
					<img src='{$album->coverPhoto('masked')}' class='ipsImage' alt="{$album->name}">
				</div>
			{{elseif $album->lastImage()}}
				<div class='ipsSpacer_bottom'>
					{{if $album->lastImage()->media}}
						{template="thumbImage" group="global" app="core" params="'', $album->name, 'veryLarge', 'ipsNoThumb_video'"}
					{{else}}
						{template="thumbImage" group="global" app="core" params="'', $album->name, 'large'"}
					{{endif}}
				</div>
			{{endif}}

			{{if $album->type === \IPS\gallery\Album::AUTH_TYPE_PRIVATE}}
				<span class="ipsBadge ipsBadge_warning">{lang="album_private_badge"}</span>
			{{elseif $album->type === \IPS\gallery\Album::AUTH_TYPE_RESTRICTED}}
				<span class="ipsBadge ipsBadge_warning">{lang="album_friend_only_badge"}</span>
			{{endif}}

			<div class='ipsPhotoPanel ipsPhotoPanel_tiny ipsClearfix ipsSpacer_both'>
				{template="userPhoto" group="global" app="core" params="\IPS\Member::load( $album->owner_id ), 'tiny'"}
				<div>
					<strong class='ipsType_minorHeading'>{lang="album_created_by"}</strong><br>
					<span class='ipsType_normal'>{$album->owner()->link()|raw}</span>
				</div>
			</div>

			<ul class='ipsList_inline ipsType_medium ipsClear ipsSpacer_top ipsAreaBackground_light ipsPad ipsPad_half ipsType_center'>
				<li data-ipsTooltip title='{lang="num_images" pluralize="$album->count_imgs"}'><i class='fa fa-camera'></i> {$album->count_imgs}</li>
				{{if $album->use_comments}}
					<li data-ipsTooltip title='{lang="num_comments" pluralize="$album->comments"}'><i class='fa fa-comment'></i> {$album->comments}</li>
				{{endif}}
				{{if $album->allow_comments}}
					<li data-ipsTooltip title='{lang="gallery_image_comments_s" pluralize="$album->count_comments"}'><i class='fa fa-comment'></i> {$album->count_comments}</li>
				{{endif}}
			</ul>

			{{if $album->description}}
				<div class='ipsType_medium ipsType_richText ipsSpacer_top' data-ipsTruncate data-ipsTruncate-size="10 lines">
					{$album->description|raw}
				</div>
			{{endif}}

			{{if \IPS\IPS::classUsesTrait( $album->asItem(), 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
				{template="reputation" app="core" group="global" params="$album->asItem()"}
			{{endif}}
			
			{{if $album->canDelete() || $album->asItem()->canEdit() || $album->asItem()->canOnMessage( 'add' ) || $album->asItem()->canFeature() || $album->asItem()->canUnfeature() || $album->asItem()->canHide() || $album->asItem()->canUnhide() || $album->asItem()->canMove() || $album->asItem()->canLock() || $album->asItem()->canUnlock() || $album->asItem()->canReportOrRevoke() === TRUE}}
				<div class='ipsItemControls'>
					<ul class='ipsToolList ipsToolList_horizontal ipsPos_left ipsClearfix ipsResponsive_noFloat ipsItemControls_left cGalleryAlbumControls'>
					{{if $album->canDelete() || $album->asItem()->canEdit() || $album->asItem()->canOnMessage( 'add' ) || $album->asItem()->canFeature() || $album->asItem()->canUnfeature() || $album->asItem()->canHide() || $album->asItem()->canUnhide() || $album->asItem()->canMove() || $album->asItem()->canLock() || $album->asItem()->canUnlock()}}
						<li>
							<a href='#elAlbumActions_menu' id='elAlbumActions' class='ipsButton ipsButton_light ipsButton_verySmall ipsButton_fullWidth' data-ipsMenu>{lang="manage_album"} <i class='fa fa-caret-down'></i></a>
							<ul id='elAlbumActions_menu' class='ipsMenu ipsMenu_auto ipsHide'>
								{{if $album->asItem()->canEdit() }}
									<li class='ipsMenu_item'><a href='{$album->url()->setQueryString( array( 'do' => 'editAlbum', 'csrfKey' => \IPS\Session::i()->csrfKey ) )}' title="{lang="edit_album"}" data-ipsDialog data-ipsDialog-title="{lang="edit_album"}">{lang="edit_album"}</a></li>
								{{endif}}

								{{if $album->asItem()->canFeature()}}
									<li class='ipsMenu_item'><a href='{$album->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'feature' ) )}' title="{lang="feature_title_album"}">{lang="feature"}</a></li>
								{{endif}}
								{{if $album->asItem()->canUnfeature()}}				
									<li class='ipsMenu_item'><a href='{$album->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unfeature' ) )}' title="{lang="unfeature_title_album"}">{lang="unfeature"}</a></li>
								{{endif}}
								{{if $album->asItem()->canHide()}}				
									<li class='ipsMenu_item'><a href='{$album->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'hide' ) )}' title="{lang="hide_title_album"}" data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
								{{endif}}
								{{if $album->asItem()->canUnhide()}}				
									<li class='ipsMenu_item'><a href='{$album->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unhide' ) )}' title="{{if $album->asItem()->hidden() === 1}}{lang="approve_title_album"}{{else}}{lang="unhide_title_album"}{{endif}}">{{if $album->asItem()->hidden() === 1}}{lang="approve"}{{else}}{lang="unhide"}{{endif}}</a></li>
								{{endif}}
								{{if $album->asItem()->canLock()}}				
									<li class='ipsMenu_item'><a href='{$album->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'lock' ) )}' title="{lang="lock_title_album"}">{lang="lock"}</a></li>
								{{endif}}
								{{if $album->asItem()->canUnlock()}}				
									<li class='ipsMenu_item'><a href='{$album->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unlock' ) )}' title="{lang="unlock_title_album"}">{lang="unlock"}</a></li>
								{{endif}}
								{{if $album->asItem()->canMove()}}				
									<li class='ipsMenu_item'><a href='{$album->url()->setQueryString( array( 'do' => 'move' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="move"}"  title="{lang="galleryalbum_move_title"}">{lang="move"}</a></li>
								{{endif}}

								{{if $album->canDelete() }}
									<li class='ipsMenu_item'><a href='{$album->url()->setQueryString( array( 'do' => 'deleteAlbum', 'csrfKey' => \IPS\Session::i()->csrfKey ) )}' data-ipsDialog data-ipsDialog-title="{lang="delete_album"}" title="{lang="delete_album"}">{lang="delete_album"}</a></li>
								{{endif}}

								{{if $album->asItem()->canOnMessage( 'add' )}}
									<li class='ipsMenu_item'><a href='{$album->url()->csrf()->setQueryString( array( 'do' => 'messageForm' ) )}' data-ipsDialog data-ipsDialog-title='{lang="add_message"}'>{lang="add_message"}</a></li>
								{{endif}}
							</ul>
						</li>
					{{endif}}

					{{if $album->asItem()->canReportOrRevoke() === TRUE}}
						<li>
							<a href='{$album->url()->setQueryString('do', 'report')}' class='ipsButton ipsButton_link ipsButton_verySmall ipsButton_fullWidth' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="report_album"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="report_submit_success"}" title="{lang="report_album"}">{lang="report_album"}</a>
						</li>
					{{endif}}
					</ul>
				</div>
			{{endif}}

			{{if count( $album->_event )}}
				<hr class='ipsHr'>
				<div class='ipsSpacer_top cGalleryEvents'>
					<h2 class='ipsType_sectionHead'>{lang="events_in_album" pluralize="count( $album->_event )"}</h2>
					{template="eventBlocks" group="view" app="calendar" params="$album->_event"}
				</div>
			{{endif}}
		</div>
	</div>
	<div class='ipsColumn ipsColumn_fluid'>
		{template="contentItemMessages" group="global" app="core" params="$album->asItem()->getMessages(), $album->asItem()"}
		{{if $album->can('add')}}
			<ul class="ipsToolList ipsToolList_horizontal ipsClearfix ipsSpacer_bottom">
				{template="categoryButtons" group="browse" params="$album->can('add'), $album->category(), $album"}
			</ul>
		{{endif}}
		<div class='ipsBox'>
			{$table|raw}
		</div>
		
		{{if $album->asItem()->shareLinks()}}
			<div class="ipsSpacer_top ipsSpacer_bottom">
				{template="sharelinks" app="core" group="global" params="$album->asItem()"}
			</div>
		{{endif}}

		{{if $commentsAndReviews}}
			{{if ( $album->asItem()->use_reviews && $album->asItem()->container()->allow_reviews ) && ( $album->asItem()->use_comments && $album->asItem()->container()->allow_comments ) }}
				<a id="replies"></a>
				<h2 class='ipsHide'>{lang="user_feedback"}</h2>
			{{endif}}
			{$commentsAndReviews|raw}
		{{endif}}
	</div>
	<div class='ipsResponsive_showPhone ipsResponsive_block ipsSpacer_top'>
		{template="follow" app="core" group="global" params="'gallery', 'album', $album->_id, $followerCount"}
	</div>
	<div class='ipsResponsive_showPhone ipsResponsive_block ipsSpacer_top'>
		{template="promote" app="core" group="global" params="$album"}
	</div>
</div>

{{if $album->category()->club()}}
	</div>
{{endif}}
]]></template>
 <template template_group="browse" template_name="albumComments" template_data="$album" template_location="front" template_app="gallery"><![CDATA[<div class='ipsBox ipsSpacer_top'>
	<div class='' data-controller='core.front.core.commentFeed, core.front.core.ignoredComments' {{if settings.auto_polling_enabled}}data-autoPoll{{endif}} data-baseURL='{$album->url()}' {{if $album->isLastPage()}}data-lastPage{{endif}} data-feedID='image-{$album->id}' id='comments'>
		<div class='ipsPad'>
			<h2 class='ipsType_sectionHead ipsSpacer_bottom' data-role="comment_count">{lang="num_comments_uc" pluralize="$album->comments"}</h2>
			{{if $album->commentPageCount() > 1}}
				{$album->commentPagination( array('tab') )|raw}
				<br><br>
			{{endif}}

			<div data-role='commentFeed' data-controller='core.front.core.moderation'>
				{{if count( $album->comments( NULL, NULL, 'date', 'asc', NULL, NULL, NULL, NULL, FALSE, isset( \IPS\Request::i()->showDeleted ) ) )}}
					<form action="{$album->url()->csrf()->setQueryString( 'do', 'multimodComment' )}" method="post" data-ipsPageAction data-role='moderationTools'>
						{{$commentCount=0; $timeLastRead = $album->timeLastRead(); $lined = FALSE;}}
						{{foreach $album->comments( NULL, NULL, 'date', 'asc', NULL, NULL, NULL, NULL, FALSE, isset( \IPS\Request::i()->showDeleted ) ) as $comment}}
							{{if !$lined and $timeLastRead and $timeLastRead->getTimestamp() < $comment->mapped('date')}}
								{{if $lined = TRUE and $commentCount}}
									<hr class="ipsCommentUnreadSeperator">
								{{endif}}
							{{endif}}
							{{$commentCount++;}}
							{$comment->html()|raw}
						{{endforeach}}
						{template="commentMultimod" app="core" group="global" params="$album"}
					</form>
				{{else}}
					<p class='ipsType_normal ipsType_light ipsType_reset' data-role='noComments'>{lang="no_comments"}</p>
				{{endif}}
			</div>			
			{{if $album->commentPageCount() > 1}}
				<hr class='ipsHr'>
				{$album->commentPagination( array('tab') )|raw}
			{{endif}}

			{{if $album->commentForm() || $album->locked() || \IPS\Member::loggedIn()->restrict_post || \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings'] || !\IPS\Member::loggedIn()->checkPostsPerDay()}}
			<a id='replyForm'></a>
			<div data-role='replyArea' class='ipsAreaBackground ipsPad {{if !$album->canComment()}}cTopicPostArea_noSize{{endif}} ipsSpacer_top'>
				{{if $album->commentForm()}}
					{{if $album->locked()}}
						<p class='ipsType_reset ipsType_warning ipsComposeArea_warning ipsSpacer_bottom ipsSpacer_half'><i class='fa fa-info-circle'></i> {lang="album_locked_can_comment"}</p>
					{{endif}}
						{$album->commentForm()|raw}
				{{else}}
					{{if $album->locked()}}
						{template="commentUnavailable" group="forms" location="front" app="core" params="'album_locked_cannot_comment'"}
					{{elseif \IPS\Member::loggedIn()->restrict_post}}
						{template="commentUnavailable" group="forms" location="front" app="core" params="'restricted_cannot_comment', \IPS\Member::loggedIn()->warnings(5,NULL,'rpa'), \IPS\Member::loggedIn()->restrict_post"}
					{{elseif \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings']}}
						{template="commentUnavailable" group="forms" location="front" app="core" params="'unacknowledged_warning_cannot_post', \IPS\Member::loggedIn()->warnings( 1, FALSE )"}
					{{elseif !\IPS\Member::loggedIn()->checkPostsPerDay()}}
						{template="commentUnavailable" group="forms" location="front" app="core" params="'member_exceeded_posts_per_day'"}
					{{endif}}
				{{endif}}
			</div>
			{{endif}}
		</div>
	</div>
</div>
]]></template>
 <template template_group="browse" template_name="albumReviews" template_data="$album" template_location="front" template_app="gallery"><![CDATA[
<div data-controller='core.front.core.commentFeed' {{if settings.auto_polling_enabled}}data-autoPoll{{endif}} data-commentsType='reviews' data-baseURL='{$album->url()}' {{if $album->isLastPage('reviews')}}data-lastPage{{endif}} data-feedID='image-{$album->id}-reviews' id='reviews'>
	{{if $album->reviewForm()}}
		<div id='elImageReviewForm'>
			{$album->reviewForm()|raw}
		</div>
	{{else}}
		{{if $album->hasReviewed()}}
			<!-- Already reviewed -->
		{{elseif \IPS\Member::loggedin()->restrict_post}}
			{{if \IPS\Member::loggedIn()->restrict_post == -1}}
				{template="reviewUnavailable" group="forms" location="front" app="core" params="'restricted_cannot_comment'"}
			{{else}}
				{template="reviewUnavailable" group="forms" location="front" app="core" params="'restricted_cannot_comment', \IPS\Member::loggedIn()->warnings(5,NULL,'rpa'), \IPS\Member::loggedIn()->restrict_post"}
			{{endif}}
		{{elseif \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings']}}
			{template="reviewUnavailable" group="forms" location="front" app="core" params="'unacknowledged_warning_cannot_post', \IPS\Member::loggedIn()->warnings( 1, FALSE )"}
		{{endif}}
	{{endif}}
	{{if count( $album->reviews( NULL, NULL, NULL, 'desc', NULL, NULL, NULL, NULL, isset( \IPS\Request::i()->showDeleted ) ) )}}
		{{if !$album->hasReviewed()}}<hr class='ipsHr'>{{endif}}
		<div class="ipsClearfix ipsSpacer_bottom">
			{template="commentMultimodHeader" app="core" group="global" params="$album, '#reviews', 'review'"}
			{{if $album->reviewPageCount() > 1}}
				<div class="ipsPos_left ipsResponsive_noFloat">
					{$album->reviewPagination( array( 'tab', 'sort' ) )|raw}
				</div>
			{{endif}}
			<div class="ipsClearfix ipsPos_right ipsResponsive_hidePhone">
				<ul class="ipsButtonRow ipsClearfix">
					<li data-action="tableFilter">
						<a href="{$album->url()->setQueryString( array( 'tab' => 'reviews', 'page' => 1, 'sort' => 'helpful' ) )}" class="{{if !isset( request.sort ) or request.sort != 'newest'}}ipsButtonRow_active{{endif}}" data-action="filterClick">{lang="most_helpful"}</a>
					</li>
					<li data-action="tableFilter">
						<a href="{$album->url()->setQueryString( array( 'tab' => 'reviews', 'page' => 1, 'sort' => 'newest' ) )}" class="{{if isset( request.sort ) and request.sort == 'newest'}}ipsButtonRow_active{{endif}}" data-action="filterClick">{lang="newest"}</a>
					</li>
				</ul>
			</div>
		</div>

		<div data-role='commentFeed' data-controller='core.front.core.moderation'>
			<form action="{$album->url()->csrf()->setQueryString( 'do', 'multimodReview' )}" method="post" data-ipsPageAction data-role='moderationTools'>
				{{$reviewCount=0; $timeLastRead = $album->timeLastRead(); $lined = FALSE;}}
				{{foreach $album->reviews( NULL, NULL, NULL, 'desc', NULL, NULL, NULL, NULL, isset( \IPS\Request::i()->showDeleted ) ) as $review}}
					{{if !$lined and $timeLastRead and $timeLastRead->getTimestamp() < $review->mapped('date')}}
						{{if $lined = TRUE and $reviewCount}}
							<hr class="ipsCommentUnreadSeperator">
						{{endif}}
					{{endif}}
					{{$reviewCount++;}}
					{$review->html()|raw}
				{{endforeach}}
				{template="commentMultimod" app="core" group="global" params="$album, 'review'"}
			</form>
		</div>
		{{if $album->reviewPageCount() > 1}}
			<div>
				{$album->reviewPagination( array( 'tab', 'sort' ) )|raw}
			</div>
		{{endif}}
	{{elseif !$album->canReview()}}
		<p class="ipsType_normal ipsType_light ipsType_reset" data-role="noReviews">{lang="no_reviews"}</p>
	{{endif}}
</div>]]></template>
 <template template_group="browse" template_name="albums" template_data="$table, $headers, $albums" template_location="front" template_app="gallery"><![CDATA[{{foreach $albums as $album}}
	{{if $album instanceof \IPS\Content\Item}}
		{{$album = $album->asNode();}}
	{{endif}}
	<li class='ipsDataItem ipsAreaBackground_reset{{if $album->asItem()->hidden()}} ipsModerated{{endif}}'>
		<div class='ipsColumns ipsColumns_collapsePhone'>
			<div class='ipsColumn ipsColumn_wide'>
				<div class='ipsPad'>
					<h3 class='ipsType_sectionHead ipsContained_container'>
						{{if \IPS\gallery\Image::containerUnread( $album )}}
							<span><span class="ipsItemStatus" data-ipsTooltip title="{lang="album_new_content"}"><i class="fa fa-circle"></i></span></span>
						{{endif}}
						{{if $album->asItem()->mapped('featured')}}
							<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span>
						{{endif}}
						{{if $album->type === \IPS\gallery\Album::AUTH_TYPE_PRIVATE}}
							<span class='ipsResponsive_hideTablet ipsResponsive_hideDesktop'><span class="ipsBadge ipsBadge_warning">{lang="album_private_badge"}</span></span>
						{{elseif $album->type === \IPS\gallery\Album::AUTH_TYPE_RESTRICTED}}
							<span class='ipsResponsive_hideTablet ipsResponsive_hideDesktop'><span class="ipsBadge ipsBadge_warning">{lang="album_friend_only_badge"}</span></span>
						{{endif}}
						{{if \IPS\gallery\Image::containerUnread( $album )}}<strong>{{endif}}
							<span class='ipsContained ipsType_break'><a href='{$album->url()}' title='{lang="view_this_album" sprintf="$album->_title"}'>{$album->_title}</a></span>
						{{if \IPS\gallery\Image::containerUnread( $album )}}</strong>{{endif}}

						{{if $album->last_img_date}}
							<span class='ipsContained ipsType_break ipsType_light ipsType_small ipsType_reset ipsResponsive_hidePhone'>{lang="updated"} {datetime="$album->last_img_date"}</span>
						{{endif}}
					</h3>

					{{if $album->type === \IPS\gallery\Album::AUTH_TYPE_PRIVATE}}
						<div class='ipsSpacer_top ipsSpacer_bottom ipsSpacer_half ipsResponsive_hidePhone'><span class="ipsBadge ipsBadge_warning">{lang="album_private_badge"}</span></div>
					{{elseif $album->type === \IPS\gallery\Album::AUTH_TYPE_RESTRICTED}}
						<div class='ipsSpacer_top ipsSpacer_bottom ipsSpacer_half ipsResponsive_hidePhone'><span class="ipsBadge ipsBadge_warning">{lang="album_friend_only_badge"}</span></div>
					{{endif}}

					{{if $album->truncated()}}
						<div class='ipsType_medium ipsType_richText ipsSpacer_both ipsContained' data-ipsTruncate data-ipsTruncate-size='3 lines' data-ipsTruncate-type='remove'>
							{$album->truncated()|raw}
						</div>
					{{else}}
						<p class='ipsSpacer_bottom ipsResponsive_hidePhone'></p>
					{{endif}}

					{{if !isset( \IPS\Request::i()->tab ) || \IPS\Request::i()->tab !== 'node_gallery_gallery'}}
						<div class='ipsPhotoPanel ipsPhotoPanel_tiny ipsPhotoPanel_notPhone'>
							{template="userPhoto" group="global" app="core" params="$album->owner(), 'tiny'"}
							<div>
								<span class='ipsType_minorHeading ipsResponsive_hidePhone'>{lang="album_created_by"}</span>
								<span class='ipsType_minorHeading ipsResponsive_hideTablet ipsResponsive_hideDesktop'>{lang="by"}</span>
								<br class='ipsResponsive_hidePhone'>
								<span class='ipsType_normal'>{$album->owner()->link()|raw}</span>
								{{if $album->last_img_date}}
									<span class='ipsType_minorHeading ipsResponsive_hideTablet ipsResponsive_hideDesktop cGalleryUpdated'>{lang="updated"}</span>
									<span class='ipsType_normal ipsResponsive_hideTablet ipsResponsive_hideDesktop'>{datetime="$album->last_img_date"}</span>
								{{endif}}
							</div>
						</div>
					{{endif}}

					<ul class='ipsList_inline ipsType_small ipsResponsive_hidePhone ipsClear ipsSpacer_top ipsAreaBackground_light ipsPad ipsPad_half ipsType_center'>
						<li data-ipsTooltip title='{lang="num_images" pluralize="$album->count_imgs"}'><i class='fa fa-camera'></i> {$album->count_imgs}</li>
						{{if $album->use_comments}}
							<li data-ipsTooltip title='{lang="num_comments" pluralize="$album->comments"}'><i class='fa fa-comment'></i> {$album->comments}</li>
						{{endif}}
						{{if $album->allow_comments}}
							<li data-ipsTooltip title='{lang="gallery_image_comments_s" pluralize="$album->count_comments"}'><i class='fa fa-comment'></i> {$album->count_comments}</li>
						{{endif}}
					</ul>
				</div>
			</div>
			<div class='ipsColumn ipsColumn_fluid'>
				{{if $table->canModerate()}}
					<div class='ipsPos_right ipsPad'>
						<input type='checkbox' data-role='moderation' name="moderate[{$album->_id}]" data-actions="{expression="implode( ' ', $table->multimodActions( $album ) )"}" data-state=''>
					</div>
				{{endif}}
				<div class='ipsPad cGalleryAlbums_recent'>
					<ul class='ipsList_reset' data-controller='gallery.front.browse.imageLightbox'>
						<li {{if $album->coverPhoto( 'small' )}}style='background-image: url( "{backgroundimage="$album->coverPhoto( 'small' )"}" );'{{endif}} class='cGalleryTrimmedImage{{if !$album->coverPhoto('small') AND $album->lastImage() AND $album->lastImage()->media}} ipsNoThumb ipsNoThumb_video{{endif}}'>
							<a href='{$album->url()}' title='{lang="view_this_album" sprintf="$album->_title"}'>
								{{if $album->coverPhoto( 'small' )}}
									<img src='{$album->coverPhoto( 'small' )}' alt="{$album->_title}">
								{{endif}}
							</a>
						</li>
						{{foreach $album->_latestImages as $image }}
							{{if ( $album->cover_img_id AND $image->id != $album->cover_img_id ) OR ( !$album->cover_img_id AND $album->lastImage() AND $image->id != $album->lastImage()->id )}}
								<li {{if $image->small_file_name}}style='background-image: url( "{backgroundimage="\IPS\File::get( 'gallery_Images', $image->small_file_name )->url"}" );'{{endif}} class='cGalleryTrimmedImage{{if $image->media}} ipsNoThumb ipsNoThumb_video{{endif}}' data-imageId="{$image->id}">
									<a href='{$image->url()}' data-imageLightbox>
										{{if $image->small_file_name}}<img src='{file="$image->small_file_name" extension="gallery_Images"}' alt="{$image->caption}">{{endif}}
										{{if ( $image->directContainer()->allow_comments && $image->container()->allow_comments )}}
											<span class='cGalleryAlbums_comments'><i class='fa fa-comment'></i> {expression="count( $image->comments() )"}</span>
										{{endif}}
									</a>
								</li>
							{{endif}}
						{{endforeach}}
					</ul>	
				</div>
				<ul class='ipsList_inline ipsType_small ipsResponsive_hideTablet ipsResponsive_hideDesktop'>
					<li><i class='fa fa-camera'></i> {lang="num_images" pluralize="$album->count_imgs"}</li>
					{{if $album->use_comments}}
						<li><i class='fa fa-comment'></i> {lang="num_comments" pluralize="$album->comments"}</li>
					{{endif}}
					{{if $album->allow_comments}}
						<li><i class='fa fa-comment'></i> {lang="gallery_image_comments_s" pluralize="$album->count_comments"}</li>
					{{endif}}
				</ul>
			</div>
		</div>
	</li>
{{endforeach}}]]></template>
 <template template_group="browse" template_name="categories" template_data="" template_location="front" template_app="gallery"><![CDATA[{{if !\IPS\Request::i()->isAjax()}}
	<div class="ipsPageHeader ipsPad_half ipsClearfix ipsSpacer_bottom" data-ipsSticky data-ipsSticky-disableIn='phone'>
		<h1 class="ipsType_pageTitle">{lang="gallery_title"}</h1>
	</div>
{{endif}}
<ol class="ipsDataList">
	{template="categoryRow" group="browse" params="NULL, NULL, \IPS\gallery\Category::roots()"}
</ol>]]></template>
 <template template_group="browse" template_name="categoriesSidebar" template_data="$currentCategory=NULL" template_location="front" template_app="gallery"><![CDATA[{{$categories = $currentCategory ? $currentCategory->children() : \IPS\gallery\Category::roots();}}
{{if count($categories)}}
<div id='elGalleryCategories' class='ipsSpacer_top'>
	<h3 class='ipsType_reset ipsType_sectionTitle'>{{if $currentCategory}}{lang="subcategories"}{{else}}{lang="categories"}{{endif}}</h3>
	<div class='ipsSideMenu ipsPad_half'>
		<ul class='ipsSideMenu_list'>
			{{foreach $categories as $category}}
				<li>
					<a href="{$category->url()}" class='ipsSideMenu_item ipsTruncate ipsTruncate_line'><span class='ipsBadge ipsBadge_style1 ipsPos_right cGalleryCategoryCount'>{expression="\IPS\gallery\Image::contentCount( $category )"}</span><strong class='ipsType_normal'>{$category->_title}</strong></a>
					{{if $category->hasChildren()}}
						<ul class="ipsSideMenu_list">
							{{foreach $category->children() as $idx => $subcategory}}
								<li>
									{{if $idx >= 5}}
										<a href='{$category->url()}' class='ipsSideMenu_item'><span class='ipsType_light ipsType_small'>{lang="and_x_more" pluralize="count( $category->children() ) - 5"}</span></a>
										{{break;}}
									{{else}}
										<a href="{$subcategory->url()}" class='ipsSideMenu_item ipsTruncate ipsTruncate_line'><strong class='ipsPos_right ipsType_small cGalleryCategoryCount'>{expression="\IPS\gallery\Image::contentCount( $subcategory )"}</strong>{$subcategory->_title}</a>
									{{endif}}
								</li>
							{{endforeach}}
						</ul>
					{{endif}}
				</li>
			{{endforeach}}
		</ul>
		<a href='{url="app=gallery&module=gallery&controller=browse&do=categories" seoTemplate="gallery_categories"}' class='ipsButton ipsButton_fullWidth ipsButton_small ipsButton_light'>{lang="browse_categories"} &nbsp;<i class='fa fa-caret-right'></i></a>
	</div>
</div>
{{endif}}]]></template>
 <template template_group="browse" template_name="category" template_data="$category, $albums, $table" template_location="front" template_app="gallery"><![CDATA[
{{if $club = $category->club()}}
	{{if settings.clubs and settings.clubs_header == 'full'}}
		{template="header" app="core" group="clubs" params="$club, $category"}
	{{endif}}
	<div id='elClubContainer'>
{{endif}}

<div class="ipsPageHeader ipsClearfix ipsSpacer_bottom">
	<h1 class="ipsType_pageTitle">{$category->_title}</h1>
	<div class='ipsPos_right ipsResponsive_noFloat ipsResponsive_hidePhone'>
		{{$followerCount = \IPS\gallery\Image::containerFollowerCount( $category );}}
		{template="follow" app="core" group="global" params="'gallery', 'category', $category->_id, $followerCount"}
	</div>
</div>

{{if $category->show_rules || $category->description}}
	<hr class='ipsHr'>
	<div class='ipsBox_alt ipsSpacer_bottom'>
		{{if $category->show_rules == 1}}
			<a href="{$category->rules_link}" class='ipsJS_show ipsType_normal' data-ipsDialog data-ipsDialog-title="{lang="gallery_category_{$category->id}_rulestitle"}" data-ipsDialog-content="#elCategoryRules">{lang="category_rules"}</a>
			<div id='elCategoryRules' class='ipsHide ipsPad ipsType_richText ipsType_medium ipsSpacer_both'>{lang="gallery_category_{$category->id}_rules"}</div>
		{{elseif $category->show_rules == 2}}
			<strong class='ipsType_normal'>{lang="gallery_category_{$category->id}_rulestitle"}</strong>
			<div class='ipsType_richText ipsType_medium ipsSpacer_both'>{lang="gallery_category_{$category->id}_rules"}</div>
		{{endif}}
		{{if $category->description}}
			<div class='ipsType_richText ipsType_medium ipsSpacer_both'>
				{$category->description|raw}
			</div>
		{{endif}}
	</div>
{{endif}}

{{if $category->can('add')}}
	<ul class="ipsToolList ipsToolList_horizontal ipsClearfix ipsSpacer_bottom">
		{template="categoryButtons" group="browse" params="$category->can('add'), $category, NULL"}
	</ul>
{{endif}}


{{if $category->children()}}
	<div class="ipsAreaBackground_light ipsPad ipsSpacer_bottom">
		{template="categoryGrid" group="browse" app="gallery" params="$category->children()"}
	</div>
{{endif}}

{{if $albums}}
	<div class='ipsBox ipsSpacer_bottom'>
		{$albums|raw}
	</div>
{{endif}}

{{if $table}}
	<div class='ipsBox'>
		{$table|raw}
	</div>
{{endif}}

<div class='ipsResponsive_showPhone ipsResponsive_block'>
	{template="follow" app="core" group="global" params="'gallery', 'category', $category->_id, $followerCount"}
</div>

{{if $category->club()}}
	</div>
{{endif}}]]></template>
 <template template_group="browse" template_name="categoryButtons" template_data="$canSubmitImages, $currentCategory=NULL, $currentAlbum=NULL" template_location="front" template_app="gallery"><![CDATA[<li class='ipsToolList_primaryAction'>
	<a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" data-ipsDialog data-ipsDialog-close='false' data-ipsDialog-size='medium' data-ipsDialog-extraClass='cGalleryDialog_outer' data-ipsDialog-destructOnClose='true' data-ipsDialog-remoteSubmit='true' {{if $currentAlbum}}href="{url="app=gallery&module=gallery&controller=submit&category={$currentCategory->id}&album={$currentAlbum->id}&_new=1" seoTemplate="gallery_submit"}" {{elseif $currentCategory}} href="{url="app=gallery&module=gallery&controller=submit&category={$currentCategory->id}&_new=1" seoTemplate="gallery_submit"}" {{else}} href="{url="app=gallery&module=gallery&controller=submit&_new=1" seoTemplate="gallery_submit"}" {{endif}}>{lang="add_gallery_image"}</a>
</li>]]></template>
 <template template_group="browse" template_name="categoryGrid" template_data="$categories" template_location="front" template_app="gallery"><![CDATA[
{{if count( $categories )}}
	<div class='cGalleryCats ipsBox_alt ipsClear ipsClearfix'>
		<ul class='ipsGrid' data-ipsGrid data-ipsGrid-minItemSize='250' data-ipsGrid-maxItemSize='500'>
		{{foreach $categories as $category}}
			<li class='ipsGrid_span4 cGalleryCat'>
				<a href='{$category->url()}' style='background-image: url( "{backgroundimage="$category->coverPhoto('small')"}" );' class='cGalleryTrimmedImage' data-grid-ratio='80'>
					<h2 class='ipsType_sectionHead ipsTruncate ipsTruncate_line'>
						{{if settings.club_nodes_in_apps and $club = $category->club()}}
							{lang="club_node" sprintf="$club->name, $category->_title"}
						{{else}}
							{$category->_title}
						{{endif}}
					</h2>
					<img src='{$category->coverPhoto('small')}' alt="{$category->_title}">
					<ul class='ipsList_inline ipsType_left cGalleryCat_info'>
						<li>{{if $category->lastImage() !== NULL}}<i class='fa fa-clock-o'></i> {datetime="$category->lastImage()->date"}{{endif}}</li>
						{{if $category->allow_comments}}
							<li class='ipsPos_right' data-ipsTooltip title='{lang="cat_comment_count" pluralize="$category->_commentsForDisplay"}'><i class='fa fa-comment'></i> {$category->_commentsForDisplay}</li>
						{{endif}}
						{{if $category->allow_albums}}
							<li class='ipsPos_right' data-ipsTooltip title='{lang="cat_album_count" pluralize="$category->public_albums"}'><i class='fa fa-th-large'></i> {$category->public_albums}</li>
						{{endif}}
						<li class='ipsPos_right' data-ipsTooltip title='{lang="cat_img_count" pluralize="\IPS\gallery\Image::contentCount( $category )"}'><i class='fa fa-camera'></i> {expression="\IPS\gallery\Image::contentCount( $category )"}</li>
					</ul>
				</a>
			</li>
		{{endforeach}}
		</ul>
	</div>
{{endif}}]]></template>
 <template template_group="browse" template_name="categoryRow" template_data="$table, $headers, $categories" template_location="front" template_app="gallery"><![CDATA[{{foreach $categories as $category}}
	{{if $category->can('view')}}
	<li class="ipsDataItem ipsDataItem_responsivePhoto ipsClearfix">
		<div class='ipsDataItem_generic ipsDataItem_size3'>
			{template="thumbImage" group="global" app="core" params="$category->coverPhoto( 'small' ), $category->_title, 'medium', '', 'view_this', $category->url(), 'gallery_Images'"}
		</div>
		<div class="ipsDataItem_main">
			<h4 class="ipsDataItem_title">
				{{if \IPS\gallery\Image::containerUnread( $category )}}
					<span class='ipsItemStatus' data-ipsTooltip title="{lang="unread_cat_images"}"><i class="fa fa-circle"></i></span>
				{{endif}}
				<a href="{$category->url()}">{$category->_title}</a>
			</h4>
			<p class="ipsDataItem_meta">{$category->description|raw}</p>
			{{if $category->hasChildren()}}
				<ul class="ipsDataItem_subList ipsList_inline">
					{{foreach $category->children() as $subcategory}}
						<li class="{{if \IPS\gallery\Image::containerUnread( $subcategory )}}ipsDataItem_unread{{endif}}">
							<a href="{$subcategory->url()}">{$subcategory->_title}</a>
						</li>
					{{endforeach}}
				</ul>
			{{endif}}
		</div>
		<dl class="ipsDataItem_stats ipsDataItem_statsLarge">
			{{$count = \IPS\gallery\Image::contentCount( $category );}}
			<dt class="ipsDataItem_stats_number">{number="$count"}</dt>
			<dd class="ipsDataItem_stats_type ipsType_light">{lang="images_no_number" pluralize="$count"}</dd>
		</dl>
		<ul class="ipsDataItem_lastPoster ipsDataItem_withPhoto">
			{{if $lastPost = $category->lastImage()}}
				<li>{template="userPhoto" app="core" group="global" params="$lastPost->author(), 'tiny'"}</li>
				<li><a href="{$lastPost->url()}" class='ipsType_break ipsContained'>{$lastPost->caption}</a></li>
				<li>{lang="byline_nodate" htmlsprintf="$lastPost->author()->link()"}</li>
				<li data-short="1 dy" class="ipsType_light">{datetime="$lastPost->date"}</li>
			{{endif}}
		</ul>
		{{if $table AND $table->canModerate()}}
			<div class='ipsDataItem_modCheck'>
				<span class='ipsCustomInput'>
					<input type='checkbox' data-role='moderation' name="moderate[{$category->_id}]" data-actions="{expression="implode( ' ', $table->multimodActions( $category ) )"}" data-state=''>
					<span></span>
				</span>
			</div>
		{{endif}}
	</li>
	{{endif}}
{{endforeach}}]]></template>
 <template template_group="browse" template_name="imageTable" template_data="$table, $headers, $rows, $quickSearch" template_location="front" template_app="gallery"><![CDATA[<div data-baseurl='{$table->baseUrl}' data-resort='{$table->resortKey}' data-controller='core.global.core.table{{if $table->canModerate()}},core.front.core.moderation{{endif}}'>
	{{if \IPS\Request::i()->app == 'gallery'}}<h2 class='ipsType_sectionTitle ipsType_reset ipsClear ipsType_medium ipsHide'>{lang="num_images" pluralize="$table->count"}</h2>{{endif}}
	{{if $table->canModerate() OR ( $table->showAdvancedSearch AND ( (isset( $table->sortOptions ) and !empty( $table->sortOptions )) OR $table->advancedSearch ) ) OR !empty( $table->filters ) OR $table->pages > 1}}
		<div class="ipsButtonBar ipsPad_half ipsClearfix ipsClear">
			{{if $table->canModerate()}}
				<ul class="ipsButtonRow ipsPos_right ipsClearfix">
					<li>
						<a class="ipsJS_show" href="#elCheck_menu" id="elCheck_{$table->uniqueId}" title='{lang="{$table->langPrefix}select_rows_tooltip"}' data-ipsTooltip data-ipsAutoCheck data-ipsAutoCheck-context="#elTable_{$table->uniqueId}" data-ipsMenu data-ipsMenu-activeClass="ipsButtonRow_active">
							<span class="cAutoCheckIcon ipsType_medium"><i class="fa fa-square-o"></i></span> <i class="fa fa-caret-down"></i>
							<span class='ipsNotificationCount' data-role='autoCheckCount'>0</span>
						</a>
						<ul class="ipsMenu ipsMenu_auto ipsMenu_withStem ipsHide" id="elCheck_{$table->uniqueId}_menu">
							<li class="ipsMenu_title">{lang="{$table->langPrefix}select_rows"}</li>
							<li class="ipsMenu_item" data-ipsMenuValue="all"><a href="#">{lang="all"}</a></li>
							<li class="ipsMenu_item" data-ipsMenuValue="none"><a href="#">{lang="none"}</a></li>
							{{if count($table->getFilters())}}
								<li class="ipsMenu_sep"><hr></li>
								{{foreach $table->getFilters() as $filter}}
									<li class="ipsMenu_item" data-ipsMenuValue="{$filter}"><a href="#">{lang="$filter"}</a></li>
								{{endforeach}}
							{{endif}}
						</ul>
					</li>
				</ul>
			{{endif}}

			<ul class="ipsButtonRow ipsPos_right ipsClearfix">
				{{if $table->showAdvancedSearch AND ( ( isset( $table->sortOptions ) and !empty( $table->sortOptions ) ) OR $table->advancedSearch )}}
					<li>
						<a href="#elSortByMenu_menu" id="elSortByMenu_{$table->uniqueId}" data-role='sortButton' data-ipsMenu data-ipsMenu-activeClass="ipsButtonRow_active" data-ipsMenu-selectable="radio">{lang="sort_by"} <i class="fa fa-caret-down"></i></a>
						<ul class="ipsMenu ipsMenu_auto ipsMenu_withStem ipsMenu_selectable ipsHide" id="elSortByMenu_{$table->uniqueId}_menu">
							{{$custom = TRUE;}}
							{{foreach $table->sortOptions as $k => $col}}
								<li class="ipsMenu_item {{if $col === $table->sortBy}}{{$custom = FALSE;}}ipsMenu_itemChecked{{endif}}" data-ipsMenuValue="{$col}" data-sortDirection='{$table->getSortDirection( $col )}'><a href="{$table->baseUrl->setQueryString( array( 'filter' => $table->filter, 'sortby' => $col, 'sortdirection' => $table->getSortDirection( $col ), 'page' => '1' ) )}">{lang="{$table->langPrefix}sort_{$k}"}</a></li>
							{{endforeach}}
							{{if $table->advancedSearch}}
								<li class="ipsMenu_item {{if $custom}}ipsMenu_itemChecked{{endif}}" data-noSelect="true">
									<a href='{$table->baseUrl->setQueryString( array( 'advancedSearchForm' => '1', 'filter' => $table->filter, 'sortby' => $table->sortBy, 'sortdirection' => $table->sortDirection ) )}' data-ipsDialog data-ipsDialog-title='{lang="custom_sort"}'>{lang="custom"}</a>
								</li>
							{{endif}}
						</ul>
					</li>
				{{endif}}
				{{if !empty( $table->filters )}}
					<li>
						<a href="#elFilterByMenu_menu" data-role="tableFilterMenu" id="elFilterByMenu_{$table->uniqueId}" data-ipsMenu data-ipsMenu-activeClass="ipsButtonRow_active" data-ipsMenu-selectable="radio">{lang="filter_by"} <i class="fa fa-caret-down"></i></a>
						<ul class='ipsMenu ipsMenu_auto ipsMenu_withStem ipsMenu_selectable ipsHide' id='elFilterByMenu_{$table->uniqueId}_menu'>
							<li data-action="tableFilter" data-ipsMenuValue='' class='ipsMenu_item {{if !$table->filter}}ipsMenu_itemChecked{{endif}}'>
								<a href='{$table->baseUrl->setQueryString( array( 'filter' => '', 'sortby' => $table->sortBy, 'sortdirection' => $table->sortDirection, 'page' => '1' ) )}'>{lang="{$table->langPrefix}all"}</a>
							</li>
							{{foreach $table->filters as $k => $q}}
								<li data-action="tableFilter" data-ipsMenuValue='{$k}' class='ipsMenu_item {{if $k === $table->filter}}ipsMenu_itemChecked{{endif}}'>
									<a href='{$table->baseUrl->setQueryString( array( 'filter' => $k, 'sortby' => $table->sortBy, 'sortdirection' => $table->sortDirection, 'page' => '1' ) )}'>{lang="{$table->langPrefix}{$k}"}</a>
								</li>
							{{endforeach}}
						</ul>
					</li>
				{{endif}}
			</ul>

			<form action='{$table->baseUrl}' method='post'>
				<input type='hidden' name='csrfKey' value='{expression="\IPS\Session::i()->csrfKey"}'>
				<ul class='ipsButtonRow ipsPos_right ipsClearfix'>
					<li>
						<button type='submit' name='thumbnailSize' value='thumb' data-ipsTooltip title='{lang="view_as_thumbnails"}' class='ipsCursor_pointer{{if !isset( \IPS\Request::i()->cookie['thumbnailSize'] ) OR \IPS\Request::i()->cookie['thumbnailSize'] == 'thumb' }} ipsButtonRow_active{{endif}}'><i class='fa fa-th-large'></i></button>
					</li>
					<li>
						<button type='submit' name='thumbnailSize' value='large' data-ipsTooltip title='{lang="view_as_large"}' class='ipsCursor_pointer{{if isset( \IPS\Request::i()->cookie['thumbnailSize'] ) AND \IPS\Request::i()->cookie['thumbnailSize'] == 'large' }} ipsButtonRow_active{{endif}}'><i class='fa fa-square'></i></button>
					</li>
					<li>
						<button type='submit' name='thumbnailSize' value='rows' data-ipsTooltip title='{lang="view_as_list"}' class='ipsCursor_pointer{{if isset( \IPS\Request::i()->cookie['thumbnailSize'] ) AND \IPS\Request::i()->cookie['thumbnailSize'] == 'rows' }} ipsButtonRow_active{{endif}}'><i class='fa fa-th-list'></i></button>
					</li>
				</ul>
			</form>

			{{if $table->pages > 1}}
				<div data-role="tablePagination">
					{template="pagination" group="global" app="core" location="global" params="$table->baseUrl, $table->pages, $table->page, $table->limit"}
				</div>
			{{endif}}
		</div>
	{{endif}}

	{{if $table->canModerate()}}
		<form action="{$table->baseUrl->csrf()}" method="post" data-role='moderationTools' data-ipsPageAction class='ipsClear'>
	{{endif}}
	{{if !empty( $rows ) }}
		{{if isset( \IPS\Request::i()->cookie['thumbnailSize'] ) AND \IPS\Request::i()->cookie['thumbnailSize'] == 'large' AND \IPS\Request::i()->controller != 'search' }}
			<div class='ipsList_reset ipsClear ipsType_center cGalleryLargeList ipsAreaBackground_light ipsPad' id='elTable_{$table->uniqueId}' data-controller='gallery.front.browse.imageLightbox,gallery.front.browse.list' data-role='tableRows'>
				{template="tableRowsLarge" group="browse" app="gallery" params="$table, $headers, $rows"}
			</div>
		{{elseif isset( \IPS\Request::i()->cookie['thumbnailSize'] ) AND \IPS\Request::i()->cookie['thumbnailSize'] == 'rows' AND \IPS\Request::i()->controller != 'search' }}
			<div class='ipsDataList ipsList_reset ipsClear cGalleryRowsList' id='elTable_{$table->uniqueId}' data-role='tableRows' data-controller='gallery.front.browse.imageLightbox'>
				{template="tableRowsRows" group="browse" app="gallery" params="$table, $headers, $rows"}
			</div>
		{{else}}
			<div class='ipsPad ipsClear ipsGrid ipsGrid_collapsePhone ipsType_center cGalleryPatchwork_list' data-controller='gallery.front.browse.imageLightbox,gallery.front.browse.list' data-ipsPhotoLayout data-ipsPhotoLayout-itemTemplate='gallery.patchwork.tableItem' data-ipsPhotoLayout-minHeight='300' id='elTable_{$table->uniqueId}' data-role='tableRows'>
				{template="tableRowsThumbs" group="browse" app="gallery" params="$table, $headers, $rows"}
			</div>
		{{endif}}
	{{else}}
		<div class='ipsType_center ipsPad'>
			<p class='ipsType_large ipsType_light'>{lang="no_rows_in_table"}</p>
		</div>
	{{endif}}
	{{if $table->canModerate()}}
			<div class="ipsAreaBackground ipsPad ipsClearfix ipsJS_hide" data-role="pageActionOptions">
				<div class="ipsPos_right">
					<select name="modaction" data-role="moderationAction">
						{{if $table->canModerate('unhide')}}
							<option value='approve' data-icon='check-circle'>{lang="approve"}</option>
						{{endif}}
						{{if $table->canModerate('feature') or $table->canModerate('unfeature')}}
							<optgroup label="{lang="feature"}" data-icon='star' data-action='feature'>
								{{if $table->canModerate('feature')}}
									<option value='feature'>{lang="feature"}</option>
								{{endif}}
								{{if $table->canModerate('unhide')}}
									<option value='unfeature'>{lang="unfeature"}</option>
								{{endif}}
							</optgroup>
						{{endif}}
						{{if $table->canModerate('pin') or $table->canModerate('unpin')}}
							<optgroup label="{lang="pin"}" data-icon='thumb-tack' data-action='pin'>
								{{if $table->canModerate('pin')}}
									<option value='pin'>{lang="pin"}</option>
								{{endif}}
								{{if $table->canModerate('unpin')}}
									<option value='unpin'>{lang="unpin"}</option>
								{{endif}}
							</optgroup>
						{{endif}}
						{{if $table->canModerate('hide') or $table->canModerate('unhide')}}
							<optgroup label="{lang="hide"}" data-icon='eye' data-action='hide'>
								{{if $table->canModerate('hide')}}
									<option value='hide'>{lang="hide"}</option>
								{{endif}}
								{{if $table->canModerate('unhide')}}
									<option value='unhide'>{lang="unhide"}</option>
								{{endif}}
							</optgroup>
						{{endif}}
						{{if $table->canModerate('lock') or $table->canModerate('unlock')}}
							<optgroup label="{lang="lock"}" data-icon='lock' data-action='lock'>
								{{if $table->canModerate('lock')}}
									<option value='lock'>{lang="lock"}</option>
								{{endif}}
								{{if $table->canModerate('unlock')}}
									<option value='unlock'>{lang="unlock"}</option>
								{{endif}}
							</optgroup>
						{{endif}}
						{{if $table->canModerate('move')}}
							<option value='move' data-icon='arrow-right'>{lang="move"}</option>
						{{endif}}
						{{if $table->canModerate('split_merge')}}
							<option value='merge' data-icon='level-up'>{lang="merge"}</option>
						{{endif}}
						{{if $table->canModerate('delete')}}
							<option value='delete' data-icon='trash'>{lang="delete"}</option>
						{{endif}}
						{{if $table->savedActions}}
							<optgroup label="{lang="saved_actions"}" data-icon='tasks' data-action='saved_actions'>
								{{foreach $table->savedActions as $k => $v}}
									<option value='savedAction-{$k}'>{$v}</option>
								{{endforeach}}
							</optgroup>
						{{endif}}
					</select>
					<button type="submit" class="ipsButton ipsButton_alternate ipsButton_verySmall">{lang="submit"}</button>
				</div>
			</div>
		</form>
	{{endif}}

	{{if $table->pages > 1}}
		<div class="ipsButtonBar ipsPad_half ipsClearfix ipsClear">
			<div data-role="tablePagination">
				{template="pagination" group="global" app="core" location="global" params="$table->baseUrl, $table->pages, $table->page, $table->limit"}
			</div>
		</div>
	{{endif}}
</div>]]></template>
 <template template_group="browse" template_name="index" template_data="$featured, $new" template_location="front" template_app="gallery"><![CDATA[<div class="ipsPageHeader ipsClearfix ipsSpacer_bottom">
	<h1 class="ipsType_pageTitle">{lang="gallery_title"}</h1>
</div>

{{if \IPS\gallery\Category::canOnAny('add')}}
	<ul class="ipsToolList ipsToolList_horizontal ipsClearfix ipsSpacer_bottom">
		{template="categoryButtons" group="browse" params="\IPS\gallery\Category::canOnAny('add'), NULL, NULL"}
	</ul>
{{endif}}

{{$clubNodes = settings.club_nodes_in_apps ? \IPS\gallery\Category::clubNodes() : array();}}
{{if $rootCategories = \IPS\gallery\Category::roots()}}
	<div class="ipsSpacer_bottom">
		{{if $clubNodes}}<h2 class="ipsType_sectionHead ipsSpacer_bottom ipsSpacer_half">{lang="community_image_categories"}</h2>{{endif}}
		{template="categoryGrid" group="browse" app="gallery" params="$rootCategories"}
	</div>
{{endif}}

{{if settings.club_nodes_in_apps and $clubNodes = \IPS\gallery\Category::clubNodes()}}
	<div class="ipsSpacer_bottom">
		{{if $rootCategories}}<h2 class="ipsType_sectionHead ipsSpacer_bottom ipsSpacer_half">{lang="club_node_gallery"}</h2>{{endif}}
		{template="categoryGrid" group="browse" app="gallery" params="$clubNodes"}
	</div>
{{endif}}

{{if !empty( $featured )}}
<div class='ipsBox ipsSpacer_bottom'>
	<h2 class='ipsType_sectionTitle ipsType_reset'>{lang="featured_images"}</h2>
	<div data-controller='gallery.front.browse.imageLightbox' data-ipsPhotoLayout data-ipsPhotoLayout-itemTemplate='gallery.patchwork.indexItem' data-ipsPhotoLayout-maxRows='3' class='ipsPad_half ipsClearfix cGalleryPatchwork_index'>
		<ul class='ipsList_inline'>
			{{foreach $featured as $image}}
				<li data-role='patchworkImage' data-json='{$image->json( array( 'context' => 'featured' ) )|raw}'>
					<a data-imageLightbox href='{$image->url()->setQueryString( 'context', 'featured' )}'><img src='{file="$image->small_file_name" extension="gallery_Images"}' alt="{$image->caption}" class='ipsJS_hide'></a>
				</li>
			{{endforeach}}
		</ul>
	</div>
</div>
{{endif}}

{{if !empty( $new )}}
<div class='ipsBox'>
	<h2 class='ipsType_sectionTitle ipsType_reset'>{lang="new_images"}</h2>
	<div data-controller='gallery.front.browse.imageLightbox' data-ipsPhotoLayout data-ipsPhotoLayout-itemTemplate='gallery.patchwork.indexItem' data-ipsPhotoLayout-maxRows='3' class='ipsPad ipsClearfix cGalleryPatchwork_index'>
		<ul class='ipsList_inline'>
			{{foreach $new as $image}}
				<li data-role='patchworkImage' data-json='{$image->json( array( 'context' => 'new' ) )|raw}'>
					<a data-imageLightbox href='{$image->url()->setQueryString( 'context', 'new' )}'><img src='{file="$image->small_file_name" extension="gallery_Images"}' alt="{$image->caption}" class='ipsJS_hide'></a>
				</li>
			{{endforeach}}
		</ul>
	</div>
</div>
{{endif}}]]></template>
 <template template_group="browse" template_name="indexSidebar" template_data="$canSubmitImages, $currentCategory=NULL, $currentAlbum=NULL" template_location="front" template_app="gallery"></template>
 <template template_group="browse" template_name="miniAlbum" template_data="$album" template_location="front" template_app="gallery"><![CDATA[
<ol class='ipsGrid ipsList_reset cGalleryMiniAlbum ipsClearfix' data-ipsGrid data-ipsGrid-minItemSize='60' data-ipsGrid-maxItemSize='100'>
	{{foreach $album->_latestImages as $image}}
		{{if $image->small_file_name}}
			<li style='background-image: url( "{backgroundimage="\IPS\File::get( 'gallery_Images', $image->small_file_name )->url"}" );' class='ipsGrid_span3 cGalleryTrimmedImage' data-grid-ratio='100' data-imageID='{$image->id}'>
				<a href='{$image->url()->setQueryString( 'browse', 1 )}' title='{$image->caption}'>
					<img src='{file="$image->small_file_name" extension="gallery_Images"}' alt="{$image->caption}">
				</a>
			</li>
		{{else}}
			<li class='ipsGrid_span3 ipsNoThumb ipsNoThumb_video'>&nbsp;</li>
		{{endif}}
	{{endforeach}}
</ol>
<a href='{$album->url()}' class='ipsType_small'>{lang="view_entire_album" sprintf="$album->name"}</a>]]></template>
 <template template_group="browse" template_name="noImages" template_data="$container" template_location="front" template_app="gallery"><![CDATA[
<div class='ipsType_center ipsPad'>
	<p class='ipsType_large'>{{if $container instanceof \IPS\gallery\Album}}{lang="no_images_in_album"}{{else}}{lang="no_images_in_cat"}{{endif}}</p>
	{{if $container->can('add')}}
		<a href='{url="app=gallery&module=gallery&controller=submit&_new=1" seoTemplate="gallery_submit"}{{if $container instanceof \IPS\gallery\Album}}&category={$container->category_id}&album={$container->id}{{else}}&category={$container->id}{{endif}}' class='ipsButton ipsButton_primary ipsButton_medium' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-extraClass='cGalleryDialog_outer' data-ipsDialog-close='false' data-ipsDialog-destructOnClose='true' data-ipsDialog-remoteSubmit='true'>{lang="submit_first_image"}</a>
	{{endif}}
</div>]]></template>
 <template template_group="browse" template_name="tableRowsLarge" template_data="$table, $headers, $images" template_location="front" template_app="gallery"><![CDATA[{{foreach $images as $image}}
	<div class='{{if $image->hidden()}}ipsModerated{{else}}ipsAreaBackground_reset{{endif}} ipsBox ipsPad ipsType_center cGalleryImageItem' data-imageId="{$image->id}">
		{{if $image->media }}
			<a data-imageLightbox href='{$image->url()}' title='{lang="view_this_video" sprintf="$image->caption"}' class='ipsThumb ipsNoThumb ipsNoThumb_video cGalleryNoThumb_full'>
				<video data-role="video" class="ipsPos_center" preload="metadata" width="100%" height="100%"{{if $image->masked_file_name }} poster="{file="$image->masked_file_name" extension="gallery_Images"}"{{endif}}>
					<source src="{file="$image->original_file_name" extension="gallery_Images"}" type='{$image->file_type}' />
				</video>
			</a>
		{{else}}
			<a data-imageLightbox href='{$image->url()}' title='{lang="view_this_image" sprintf="$image->caption"}'>
				<img src='{file="$image->masked_file_name" extension="gallery_Images"}' alt="{$image->caption}" class='ipsImage'>
			</a>
		{{endif}}
		<h2 class='ipsType_sectionHead ipsType_normal ipsTruncate ipsTruncate_line ipsContained_container'>
			{{if $image->unread()}}<span class='ipsItemStatus ipsItemStatus_small'><i class="fa fa-circle"></i></span>{{endif}}
			{{if $image->prefix()}}
				{template="prefix" group="global" app="core" params="$image->prefix( TRUE ), $image->prefix()"}
			{{endif}}
			<a data-imageLightbox href='{$image->url()}' title='{lang="view_this_image" sprintf="$image->caption"}'>
				{{if $image->unread()}}<strong>{$image->caption}</strong>{{else}}{$image->caption}{{endif}}
			</a>
			{{if $table->canModerate()}}
				<input type='checkbox' data-role='moderation' name="moderate[{$image->id}]" data-actions="{{if $image->mapped('featured')}}unfeature{{else}}feature{{endif}} {{if $image->mapped('pinned')}}unpin{{else}}pin{{endif}} {{if $image->hidden() === -1}}unhide{{elseif $image->hidden() === 1}}approve{{else}}hide{{endif}} {{if $image->mapped('locked')}}unlock{{else}}lock{{endif}} move delete" data-state='{{if $image->tableStates()}}{$image->tableStates()}{{endif}}'>
			{{endif}}
		</h2>
		<ul class='ipsList_inline'>
			{{if $image->directContainer()->allow_comments}}
				<li class='{{if $image->comments == 0}}ipsFaded{{endif}}' data-ipsTooltip title='{lang="num_comments" pluralize="$image->comments"}'><i class='fa fa-comment'></i> {$image->comments}</li>
			{{endif}}
			<li class='{{if $image->views == 0}}ipsFaded{{endif}}' data-ipsTooltip title='{lang="num_views_with_number" pluralize="$image->views"}'><i class='fa fa-eye'></i> {$image->views}</li>
		</ul>
		{{if $image->mapped('pinned') || $image->mapped('featured') || $image->hidden() === -1 || $image->hidden() === 1}}
			<br>
			<ul class='ipsList_inline'>
				<li>
					{{if $image->hidden() === -1}}
						<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$image->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
					{{elseif $image->hidden() === 1}}
						<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
					{{endif}}							
					{{if $image->mapped('pinned')}}
						<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span>
					{{endif}}
					{{if $image->mapped('featured')}}
						<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
					{{endif}}
				</li>
			</ul>
		{{endif}}
	</div>
{{endforeach}}
]]></template>
 <template template_group="browse" template_name="tableRowsRows" template_data="$table, $headers, $images" template_location="front" template_app="gallery"><![CDATA[{{if count( $images )}}
	{{foreach $images as $image}}
		<div class='ipsDataItem cGalleryImageItem {{if $image->unread()}}ipsDataItem_unread{{endif}} {{if method_exists( $image, 'tableClass' ) && $image->tableClass()}}ipsDataItem_{$image->tableClass()}{{endif}} {{if $image->hidden()}}ipsModerated{{endif}}' data-imageId="{$image->id}">
			<div class='ipsDataItem_generic ipsDataItem_size3'>
				{{if $image->media }}
					<a data-imageLightbox href='{$image->url()}' title='{lang="view_this_video" sprintf="$image->caption"}' class='ipsThumb ipsNoThumb ipsNoThumb_video ipsThumb_medium'>
						<video data-role="video" class="ipsPos_center" preload="metadata" width="100%" height="100%"{{if $image->masked_file_name }} poster="{file="$image->masked_file_name" extension="gallery_Images"}"{{endif}}>
							<source src="{file="$image->original_file_name" extension="gallery_Images"}" type='{$image->file_type}' />
						</video>
					</a>
				{{else}}
					<a data-imageLightbox href='{$image->url()}' title='{lang="view_this_image" sprintf="$image->caption"}' class='ipsThumb ipsThumb_medium ipsThumb_bg' style='background-image: url( "{expression="str_replace( array( '(', ')' ), array( '\(', '\)' ), \IPS\File::get( 'gallery_Images', $image->small_file_name )->url )"}" );'>
						<img src='{file="$image->small_file_name" extension="gallery_Images"}' alt="{$image->caption}" class='ipsHide'>
					</a>
				{{endif}}
			</div>
			<div class='ipsDataItem_main'>
				<h4 class='ipsDataItem_title ipsType_large ipsContained_container'>
					{{if $image->unread()}}
						<span>
							<span class='ipsItemStatus' data-ipsTooltip title='{{if $image->unread() === -1}}{lang="new"}{{else}}{lang="updated"}{{endif}}'>
								<i class="fa fa-circle"></i>
							</span>
						</span>
					{{endif}}

					{{if $image->hidden() === -1}}
						<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$image->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
					{{elseif $image->hidden() === 1}}
						<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span>
					{{endif}}
					{{if $image->mapped('pinned')}}
						<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span></span>
					{{endif}}
					{{if $image->mapped('featured')}}
						<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span>
					{{endif}}

					{{if $image->prefix()}}
						<span>{template="prefix" group="global" app="core" params="$image->prefix( TRUE ), $image->prefix()"}</span>
					{{endif}}

					<span class='ipsContained ipsType_break'>
						<a data-imageLightbox href='{$image->url()}' title='{lang="view_this_image" sprintf="$image->caption"} {{if $image->canEdit()}}{lang="click_hold_edit"}{{endif}}' {{if $image->canEdit()}}data-role="editableTitle"{{endif}}>
							{$image->caption}
						</a>
					</span>
				</h4>
				<p class='ipsType_reset ipsType_light ipsType_blendLinks'>{lang="byline_nodate" htmlsprintf="$image->author()->link()"}</p>			
				<div class='ipsType_medium ipsType_richText ipsType_break' data-ipsTruncate data-ipsTruncate-type="remove" data-ipsTruncate-size="2 lines">
					{$image->truncated()|raw}
				</div>

				{{if count( $image->tags() )}}
					<ul class='ipsList_inline'>
						<li>{template="tags" group="global" app="core" params="$image->tags()"}</li>
					</ul>
				{{endif}}
			</div>
			<div class='ipsDataItem_generic ipsDataItem_size8 ipsPos_top'>
				{{if $image->directContainer()->allow_comments}}
					<p class='ipsType_normal ipsType_reset'>
						{{if $image->comments}}
							<a data-imageLightbox href='{$image->url()->setFragment('replies')}'>
						{{endif}}
						{lang="num_comments" pluralize="$image->comments"}
						{{if $image->comments}}
							</a>
						{{endif}}
					</p>
				{{endif}}
				<p class='ipsType_medium ipsType_reset'><strong>{{if $image->updated == $image->date}}{lang="uploaded"}{{else}}{lang="updated"}{{endif}} {datetime="$image->updated"}</strong></p>
			</div>
			{{if $table->canModerate()}}
				<div class='ipsDataItem_modCheck ipsPos_top'>
					<span class='ipsCustomInput'>
						<input type='checkbox' data-role='moderation' name="moderate[{$image->id}]" data-actions="{expression="implode( ' ', $table->multimodActions( $image ) )"}" data-state='{{if $image->unread() === -1 or $image->unread() === 1}}unread{{else}}read{{endif}} {{if $image->hidden() === -1}}hidden{{elseif $image->hidden === 1}}unapproved{{endif}} {{if $image->mapped('pinned')}}pinned{{endif}} {{if $image->mapped('featured')}}featured{{endif}} {{if $image->mapped('locked')}}locked{{endif}}'>
						<span></span>
					</span>
				</div>
			{{endif}}
		</div>
	{{endforeach}}
{{endif}}]]></template>
 <template template_group="browse" template_name="tableRowsThumbs" template_data="$table, $headers, $images" template_location="front" template_app="gallery"><![CDATA[{{foreach $images as $image}}
	<div class='ipsGrid_span4 {{if $image->hidden()}}ipsModerated{{else}}ipsAreaBackground_light{{endif}} cGalleryImageItem' data-role='patchworkImage' data-json='{$image->json()|raw}' data-imageId="{$image->id}">
		<div data-grid-ratio='65'>
			<a data-imageLightbox href='{$image->url()}' title='{lang="view_this_image" sprintf="$image->caption"}' {{if $image->small_file_name}}style='background-image: url( "{backgroundimage="\IPS\File::get( 'gallery_Images', $image->small_file_name )->url"}" )'{{endif}} class='cGalleryImageItem_image cGalleryTrimmedImage{{if !$image->small_file_name}} ipsNoThumb ipsNoThumb_video{{endif}}'>
				<img src='{file="$image->small_file_name" extension="gallery_Images"}' alt="{$image->caption}" class='cGalleryThumb'>&nbsp;
			</a>
			{{if $table->canModerate()}}
				<input type='checkbox' data-role='moderation' name="moderate[{$image->id}]" data-actions="{{if $image->mapped('featured')}}unfeature{{else}}feature{{endif}} {{if $image->mapped('pinned')}}unpin{{else}}pin{{endif}} {{if $image->hidden() === -1}}unhide{{elseif $image->hidden() === 1}}approve{{else}}hide{{endif}} {{if $image->mapped('locked')}}unlock{{else}}lock{{endif}} move delete" data-state='{{if $image->tableStates()}}{$image->tableStates()}{{endif}}'>
			{{endif}}
		</div>
		<ul class='ipsList_inline ipsType_medium ipsClearfix'>
			{{if $image->unread()}}
				<li class='ipsPos_left'>
					<span class='ipsItemStatus ipsItemStatus_small' data-ipsTooltip title='{{if $image->unread() === -1}}{lang="new"}{{else}}{lang="updated"}{{endif}}'><i class="fa fa-circle"></i></span>
				</li>
			{{endif}}
			{{if $image->mapped('pinned') || $image->mapped('featured') || $image->hidden() === -1 || $image->hidden() === 1}}
				<li class='ipsPos_left'>
					{{if $image->hidden() === -1}}
						<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$image->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
					{{elseif $image->hidden() === 1}}
						<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
					{{endif}}							
					{{if $image->mapped('pinned')}}
						<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span>
					{{endif}}
					{{if $image->mapped('featured')}}
						<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
					{{endif}}
				</li>
			{{endif}}
			
			{{if $image->directContainer()->allow_comments}}
				<li class='ipsPos_right {{if $image->comments == 0}}ipsFaded{{endif}}' data-ipsTooltip title='{lang="num_comments" pluralize="$image->comments"}'><i class='fa fa-comment'></i> {$image->comments}</li>
			{{endif}}
		</ul>
	</div>
{{endforeach}}]]></template>
 <template template_group="dashboard" template_name="overview" template_data="$data" template_location="admin" template_app="gallery"><![CDATA[<ul class="ipsDataList">
	{{foreach $data as $k => $v}}
		<li class="ipsDataItem">
			<span class="ipsDataItem_generic ipsDataItem_size6">
				<strong>{lang="$k"}</strong>
			</span>
			<span class="ipsDataItem_generic">
				{{if $k === 'total_disk_spaceg'}}
					{filesize="$v"}
				{{elseif $k === 'largest_image'}}
					<a href='{$v->url()}' target='_blank'>{$v->caption}</a> <span class="ipsType_light">({filesize="$v->file_size"})</span>
				{{elseif $k === 'most_viewed_image'}}
					<a href='{$v->url()}' target='_blank'>{$v->caption}</a> <span class="ipsType_light">({lang="num_views_with_number" pluralize="$v->views"})</span>
				{{else}}
					{$v}
				{{endif}}
			</span>
		</li>
	{{endforeach}}
</ul>]]></template>
 <template template_group="forms" template_name="commentTemplate" template_data="$id, $action, $elements, $hiddenValues, $actionButtons, $uploadField, $class=''" template_location="front" template_app="gallery"><![CDATA[{{$minimized = false;}}
<form accept-charset='utf-8' class="ipsForm {$class}" action="{$action}" method="post" {{if $uploadField}}enctype="multipart/form-data"{{endif}}>
	<input type="hidden" name="{$id}_submitted" value="1">
	{{foreach $hiddenValues as $k => $v}}
		<input type="hidden" name="{$k}" value="{$v}">
	{{endforeach}}
	{{if $uploadField}}
		<input type="hidden" name="MAX_FILE_SIZE" value="{$uploadField}">
		<input type="hidden" name="plupload" value="{expression="md5( mt_rand() )"}">
	{{endif}}
	<div class='ipsComposeArea ipsClearfix ipsContained'>
		<div class='ipsComposeArea_editor'>
			{{if !\IPS\Member::loggedIn()->member_id}}
				<div data-ipsEditor-toolList class='ipsMessage ipsMessage_info'>
					{lang="commenting_as_guest"}
				</div>
			{{endif}}
			{{foreach $elements as $collection}}
				{{foreach $collection as $input}}
					{{if $input->name == 'guest_name'}}
						<ul class='ipsForm ipsForm_horizontal' data-ipsEditor-toolList>
							<li class='ipsFieldRow ipsFieldRow_fullWidth'>
								{$input->html()|raw}
								{{if $input->error}}
									<div class="ipsType_warning ipsSpacer_top" data-role="commentFormError">{lang="$input->error"}</div>
								{{endif}}
							</li>
						</ul>
					{{endif}}
				{{endforeach}}
			{{endforeach}}
			{{foreach $elements as $collection}}
				{{foreach $collection as $input}}
					{{if $input instanceof \IPS\Helpers\Form\Editor}}
						{{if $input->options['minimize'] !== NULL}}
							{{$minimized = true;}}
						{{endif}}
						{$input->html( TRUE )|raw}
						{{if $input->error}}
							<div class="ipsType_warning ipsSpacer_top" data-role="commentFormError">{lang="$input->error"}</div>
						{{endif}}
					{{endif}}
				{{endforeach}}
			{{endforeach}}
			<ul class='ipsToolList ipsToolList_horizontal ipsClear ipsClearfix {{if $minimized}}ipsJS_hide{{endif}}' data-ipsEditor-toolList>
				{{foreach $elements as $collection}}
					{{foreach $collection as $input}}
						{{if !($input instanceof \IPS\Helpers\Form\Editor) && $input->name != 'guest_name'}}
							<li class='ipsPos_left ipsResponsive_noFloat {{if !($input instanceof \IPS\Helpers\Form\Captcha)}}ipsComposeArea_formControl{{endif}} ipsType_small'>
								{$input->html()|raw}
								{{if $input->error}}
									<div class="ipsType_warning ipsSpacer_top" data-role="commentFormError">{lang="$input->error"}</div>
								{{endif}}
							</li>
						{{endif}}
					{{endforeach}}
				{{endforeach}}
				{{foreach $actionButtons as $button}}
					<li>{$button|raw}</li>
				{{endforeach}}
			</ul>
		</div>
	</div>
</form>]]></template>
 <template template_group="forms" template_name="commentUnavailable" template_data="$lang, $warnings=array(), $ends=NULL" template_location="front" template_app="gallery"><![CDATA[<div class='ipsComposeArea ipsComposeArea_unavailable ipsClearfix'>
	<div class='ipsComposeArea_editor'>
		<div class="ipsComposeArea_dummy">
			<span class='ipsType_warning'><i class="fa fa-warning"></i> {lang="$lang"} {{if $ends !== NULL AND $ends > 0}}{lang="restriction_ends" sprintf="\IPS\DateTime::ts( $ends )->relative()"}{{endif}}</span>
		
			{{if count( $warnings) }}
				{{foreach $warnings as $idx => $warning}}
					{{if $idx === 0}}
						<br><br>
						<a href="{$warning->url()}" data-ipsDialog data-ipsDialog-size='narrow' class='ipsButton ipsButton_verySmall ipsButton_light'>{lang="view_warning_details"}</a>
					{{endif}}
				{{endforeach}}
			{{endif}}
		</div>
	</div>
</div>]]></template>
 <template template_group="forms" template_name="reviewTemplate" template_data="$id, $action, $elements, $hiddenValues, $actionButtons, $uploadField, $class=''" template_location="front" template_app="gallery"><![CDATA[<div class='ipsClearfix' data-controller='core.front.core.reviewForm'>
	<div>
		<form accept-charset='utf-8' class="ipsForm" action="{$action->setQueryString( '_review', 1 )}" method="post" {{if $uploadField}}enctype="multipart/form-data"{{endif}}>
			<input type="hidden" name="{$id}_submitted" value="1">
			{{foreach $hiddenValues as $k => $v}}
				<input type="hidden" name="{$k}" value="{$v}">
			{{endforeach}}
			{{if $uploadField}}
				<input type="hidden" name="MAX_FILE_SIZE" value="{$uploadField}">
				<input type="hidden" name="plupload" value="{expression="md5( mt_rand() )"}">
			{{endif}}
			{{if !isset( \IPS\Request::i()->_review )}}
				<div data-role='reviewIntro' class="ipsPad">
					<h3 class='ipsType_reset'>{lang="review_intro_1" sprintf="\IPS\Member::loggedIn()->name"} <span class='ipsType_unbold'>{lang="review_intro_2"}</span></h3>
					<br>
					<a href='#' class='ipsButton ipsButton_primary ipsButton_small ipsJS_show' data-action='writeReview'>{lang="write_a_review"}</a>
				</div>
			{{endif}}
			<ul class='ipsForm ipsForm_vertical {{if !isset( \IPS\Request::i()->_review )}}ipsJS_hide{{endif}} ipsPad' data-role='reviewForm'>
				{{foreach $elements as $collection}}
					{{foreach $collection as $input}}
						{$input|raw}
					{{endforeach}}
				{{endforeach}}
				<li class='ipsFieldRow ipsClearfix'>
					<div class='ipsFieldRow_content'>
						<button type='submit' class='ipsButton ipsButton_primary'>{lang="add_review"}</button>
					</div>
				</li>
			</ul>
		</form>
	</div>
</div>]]></template>
 <template template_group="forms" template_name="reviewUnavailable" template_data="$lang, $warnings=array(), $ends=NULL" template_location="front" template_app="gallery"><![CDATA[
<div class='ipsClearfix'>
	<div>
		<strong class='ipsType_warning'><i class="fa fa-warning"></i> {lang="$lang"} {{if $ends !== NULL AND $ends > 0}}{lang="restriction_ends" sprintf="\IPS\DateTime::ts( $ends )->relative()"}{{endif}}</strong>
		{{if count( $warnings) }}
			{{foreach $warnings as $idx => $warning}}
				{{if $idx === 0}}
					<br><br>
					<a href="{$warning->url()}" data-ipsDialog data-ipsDialog-size='narrow' class='ipsButton ipsButton_verySmall ipsButton_light'>{lang="view_warning_details"}</a>
				{{endif}}
			{{endforeach}}
		{{endif}}
	</div>
</div>
<hr class='ipsHr'>]]></template>
 <template template_group="global" template_name="approvalQueueItem" template_data="$item, $ref, $container, $title" template_location="front" template_app="gallery"><![CDATA[<div id="elApprovePanel" class='ipsBox'>
	<article class="ipsClearfix ipsClear">
		<div class='ipsPad'>
			<p class="ipsPos_right ipsPad_half">
				<a href='{$item->url()}' class='ipsType_normal ipsType_light'>
					<i class='fa fa-{$item::$icon}'></i> {lang="$item::$title"}
				</a>
			</p>
			<div class="ipsPhotoPanel ipsPhotoPanel_small ipsClearfix"> 
				{template="userPhoto" group="global" params="$item->author()"}
				<div>
					<a href="#user{$item->author()->member_id}_menu" id="user{$item->author()->member_id}" class="ipsType_sectionHead" data-ipsmenu="">{$item->author()->name} &nbsp;<i class="fa fa-caret-down"></i></a>
					<ul class="ipsMenu ipsMenu_auto ipsMenu_withStem ipsHide" id="user{$item->author()->member_id}_menu">
						{{if \IPS\Member::loggedIn()->modPermission('mod_can_warn')}}
							<li class='ipsMenu_item'><a href='{url="app=core&module=system&controller=warnings&do=warn&id={$item->author()->member_id}&ref={$ref}" seoTemplate="warn_add" seoTitle="$item->author()->members_seo_name"}' data-ipsDialog data-ipsDialog-title="{lang="warn_member" sprintf="$item->author()->name"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="warning_issued"}" data-role="warnUserDialog">{lang="warn_user"}</a></li>
						{{endif}}
						{{if $item->author()->member_id != \IPS\Member::loggedIn()->member_id}}
							{{if $item->author()->members_bitoptions['bw_is_spammer']}}
								<li class='ipsMenu_item' data-ipsMenuValue='spamFlagButton'><a href='{url="app=core&module=system&controller=moderation&do=flagAsSpammer&id={$item->author()->member_id}&s=0" seoTemplate="flag_as_spammer" seoTitle="$item->author()->members_seo_name" csrf="true"}' data-confirm data-confirmSubMessage="{lang="spam_unflag_confirm"}">{lang="spam_unflag"}</a></li>
							{{else}}
								<li class='ipsMenu_item' data-ipsMenuValue='spamFlagButton'><a href='{url="app=core&module=system&controller=moderation&do=flagAsSpammer&id={$item->author()->member_id}&s=1" seoTemplate="flag_as_spammer" seoTitle="$item->author()->members_seo_name" csrf="true"}' data-confirm>{lang="spam_flag"}</a></li>
							{{endif}}
						{{endif}}
						<li class="ipsMenu_item"><a href='{url="app=core&module=messaging&controller=messenger&do=compose&to={$item->author()->member_id}" seoTemplate="messenger_compose"}' data-ipsDialog data-ipsDialog-title='{lang="compose_new"}' data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="message_sent"}">{lang="message_send"}</a></li>
					</ul>
					{{if $container}}
						<p class='ipsType_reset'>{lang="posted_in_container"} <a href="{$container->url()}">{$container->_title}</a></p>
					{{endif}}
					<p class="ipsType_light ipsType_reset">{lang="date_replied" htmlsprintf="\IPS\DateTime::ts( $item->mapped('date') )->html(FALSE)"}</p>
				</p></div>
			</div>
		</div>
		<div class='ipsAreaBackground_light ipsPad'>
			<div class='ipsBox'>
				<h2 class="ipsType_sectionTitle ipsType_blendLinks"><a href="{$item->url()}">{$title}</a></h2>
				<div class="ipsType_richText ipsPost ipsType_normal ipsPad">
					{{if $item->masked_file_name}}
						<a href='{$item->url()}'>
							<img src='{file="$item->masked_file_name" extension="gallery_Images"}' alt="{$item->caption}">
						</a>
					{{else}}
						<a href='{$item->url()}'>
							<div class='ipsNoThumb ipsNoThumb_video cSearchActivity_image'></div>
						</a>
					{{endif}}
				</div>
			</div>
		</div>
	</article>
</div>
]]></template>
 <template template_group="global" template_name="comment" template_data="$item, $comment, $editorName, $app, $type, $class=''" template_location="front" template_app="gallery"><![CDATA[{{$idField = $comment::$databaseColumnId;}}
<div id='comment-{$comment->$idField}_wrap' data-controller='core.front.core.comment' data-commentApp='{$app}' data-commentType='{$type}' data-commentID="{$comment->$idField}" data-quoteData='{expression="json_encode( array('userid' => $comment->author()->member_id, 'username' => $comment->author()->name, 'timestamp' => $comment->mapped('date'), 'contentapp' => $app, 'contenttype' => $type, 'contentclass' => $class, 'contentid' => $item->id, 'contentcommentid' => $comment->$idField) )"}' class='ipsComment_content ipsType_medium'>
	{{if ( settings.reputation_enabled and \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and settings.reputation_highlight and $comment->reactionCount() >= settings.reputation_highlight ) OR $comment->isFeatured()}}
		{{if $comment->isFeatured()}}
			<strong class='ipsComment_popularFlag' data-ipsTooltip title='{lang="this_is_a_featured_post"}'><i class='fa fa-star'></i></strong>
		{{else}}
			<strong class='ipsComment_popularFlag' data-ipsTooltip title='{lang="this_is_a_popular_comment"}'><i class='fa fa-heart'></i></strong>
		{{endif}}
	{{endif}}

	<div class='ipsComment_header ipsPhotoPanel ipsPhotoPanel_mini'>
		{template="userPhoto" app="core" group="global" params="$comment->author(), 'mini', $comment->warningRef()"}
		<div>
			<div class='ipsPos_right ipsType_reset ipsType_light ipsType_blendLinks'>
				<ul class='ipsList_inline ipsComment_tools'>
					{{if $comment->canReportOrRevoke() === TRUE}}
						<li><a href='{$comment->url('report')}' data-ipsDialog data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-ipsDialog-flashMessage='{lang="report_submit_success"}' data-ipsDialog-title="{lang="report"}" data-action='reportComment' title='{lang="report_content"}'><span class='ipsResponsive_showPhone ipsResponsive_inline'><i class='fa fa-flag'></i></span><span class='ipsResponsive_hidePhone ipsResponsive_inline'>{lang="report_reply"}</span></a></li>
					{{endif}}
					{{if count( $comment->sharelinks() )}}
						<li><a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->id ) )}' data-ipsTooltip title='{lang="share_this_comment"}' data-ipsMenu data-ipsMenu-closeOnClick='false' id='elShareComment_{$comment->id}' data-role='shareComment'><i class='fa fa-share-alt'></i></a></li>
					{{endif}}
					{{if count( $item->commentMultimodActions() )}}
						<li><span class='ipsCustomInput'>
							<input type="checkbox" name="multimod[{$comment->$idField}]" value="1" data-role="moderation" data-actions="{{if $comment->canSplit()}}split merge{{endif}} {{if $comment->hidden() === -1 AND $comment->canUnhide()}}unhide{{elseif $comment->hidden() === 1 AND $comment->canUnhide()}}approve{{elseif $comment->canHide()}}hide{{endif}} {{if $comment->canDelete()}}delete{{endif}}" data-state='{{if $comment->tableStates()}}{$comment->tableStates()}{{endif}}'>
							<span></span>
						</span></li>
					{{endif}}
				</ul>
				{{if \IPS\Member::loggedIn()->modPermission('can_use_ip_tools') and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'modcp' ) )}}
					<div class='ipsResponsive_hidePhone ipsType_small cGalleryComment_ipTools'>(<a href="{url="app=core&module=modcp&controller=modcp&tab=ip_tools&ip=$comment->ip_address" seoTemplate="modcp_ip_tools"}">{lang="ip_prefix" sprintf="$comment->ip_address"}</a>)</div>
				{{endif}}
			</div>
			<h3 class='ipsComment_author ipsType_blendLinks'>
				<strong class='ipsType_normal'>{template="userLink" app="core" group="global" params="$comment->author(), $comment->warningRef()"}</strong>
				{template="reputationBadge" group="global" app="core" params="$comment->author()"}
			</h3>
			<p class='ipsComment_meta ipsType_light ipsType_medium'>
				<a href='{$comment->url()}' class='ipsType_blendLinks'>{$comment->dateLine()|raw}</a>
				{{if $comment->editLine()}}
					({lang="edited_lc"})
				{{endif}}
				{{if $comment->hidden() AND $comment->hidden() != -2}}
					&middot; {$comment->hiddenBlurb()}
				{{elseif $comment->hidden() == -2}}
					&middot; {$comment->deletedBlurb()}
				{{endif}}
			</p>

			{{if member.modPermission('mod_see_warn') and $comment->warning}}
				{template="commentWarned" group="global" app="core" params="$comment"}
			{{endif}}
		</div>
	</div>
	<div class='ipsPad'>
		
		<div data-role='commentContent' class='ipsType_normal ipsType_richText ipsContained' data-controller='core.front.core.lightboxedImages'>
			{{if $comment->hidden() === 1 && $comment->author()->member_id == \IPS\Member::loggedIn()->member_id}}
				<strong class='ipsType_medium ipsType_warning'><i class='fa fa-info-circle'></i> {lang="comment_awaiting_approval"}</strong>
			{{endif}}
			{$comment->content()|raw}
			
			{{if $comment->editLine()}}
				{$comment->editLine()|raw}
			{{endif}}
		</div>

		<div class='ipsItemControls'>
			<ul class='ipsComment_controls ipsClearfix ipsItemControls_left ipsFaded_withHover' data-role="commentControls">
				{{if $comment->hidden() === 1 && ( $comment->canUnhide() || $comment->canDelete() )}}
					{{if $comment->canUnhide()}}
						<li><a href='{$comment->url('unhide')->csrf()}' class='ipsButton ipsButton_verySmall ipsButton_positive' data-action='approveComment'><i class='fa fa-check'></i> {lang="approve"}</a></li>
					{{endif}}
					{{if $comment->canDelete()}}
						<li><a href='{$comment->url('delete')->csrf()->setQueryString('page',\IPS\Request::i()->page)}' data-confirm data-action='deleteComment' data-updateOnDelete="#commentCount" class='ipsButton ipsButton_verySmall ipsButton_negative'><i class='fa fa-times'></i> {lang="delete"}</a></li>
					{{endif}}
					{{if $comment->canEdit() || $comment->canSplit() || $comment->canHide()}}
						<li>
							<a href='#elControls_{$comment->$idField}_menu' id='elControls_{$comment->$idField}' data-ipsMenu data-ipsMenu-appendTo='#comment-{$comment->$idField}_wrap'>{lang="options"} &nbsp;<i class='fa fa-caret-down'></i></a>
							<ul id='elControls_{$comment->$idField}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
								{{if $comment->canEdit()}}
									{{if $comment->mapped('first') and $comment->item()->canEdit()}}
										<li class='ipsMenu_item'><a href='{$comment->item()->url()->setQueryString( 'do', 'edit' )}'>{lang="edit"}</a></li>
									{{else}}
										<li class='ipsMenu_item'><a href='{$comment->url('edit')}' data-action='editComment'>{lang="edit"}</a></li>
									{{endif}}
								{{endif}}
								{{if $comment->canSplit()}}
									<li class='ipsMenu_item'><a href='{$comment->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}">{lang="split"}</a></li>
								{{endif}}
								{{if $comment instanceof \IPS\Content\Hideable and $comment->canHide()}}
									<li class='ipsMenu_item'><a href='{$comment->url('hide')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
								{{endif}}
							</ul>
						</li>
					{{endif}}
				{{else}}
					{{if $comment->hidden() !== 1 && \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
						<li>{template="reputationMini" group="global" app="core" params="$comment"}</li>
					{{endif}}

					{{if $comment->hidden() === 0 and $item->canComment() and $editorName}}
						<li data-ipsQuote-editor='{$editorName}' data-ipsQuote-target='#comment-{$comment->$idField}' class='ipsJS_show'>
							<button class='ipsButton ipsButton_light ipsButton_verySmall ipsButton_narrow cMultiQuote ipsHide' data-action='multiQuoteComment' data-ipsTooltip data-ipsQuote-multiQuote data-mqId='mq{$comment->$idField}' title='{lang="multiquote"}'><i class='fa fa-plus'></i></button>
						</li>
						<li data-ipsQuote-editor='{$editorName}' data-ipsQuote-target='#comment-{$comment->$idField}' class='ipsJS_show'>
							<a href='#' data-action="quoteComment" data-ipsQuote-singleQuote>{lang="quote"}</a>
						</li>
					{{endif}}
					{{if $comment->canEdit()}}
						{{if $comment->mapped('first') and $comment->item()->canEdit()}}
							<li><a href='{$comment->item()->url()->setQueryString( 'do', 'edit' )}'>{lang="edit"}</a></li>
						{{else}}
							<li><a href='{$comment->url('edit')}' data-action='editComment'>{lang="edit"}</a></li>
						{{endif}}
					{{endif}}
					{{if $comment->canPromoteToSocialMedia() || $comment->canDelete() || $comment->canSplit() || ( $comment instanceof \IPS\Content\Hideable AND ( ( !$comment->hidden() and $comment->canHide() ) || ( $comment->hidden() and $comment->canUnhide() ) ) ) || ( $comment->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}
						<li>
							<a href='#elControls_{$comment->$idField}_menu' id='elControls_{$comment->$idField}' data-ipsMenu data-ipsMenu-appendTo='#comment-{$comment->$idField}_wrap'>{lang="options"} &nbsp;<i class='fa fa-caret-down'></i></a>
							<ul id='elControls_{$comment->$idField}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
								{{if $comment->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content')}}
									<li class='ipsMenu_item'><a href='{$comment->url('restore')->csrf()}' data-confirm data-confirmSubMessage='{lang="restore_as_visible_desc"}'>{lang="restore_as_visible"}</a></li>
									<li class='ipsMenu_item'><a href='{$comment->url('restore')->csrf()->setQueryString( 'restoreAsHidden', 1 )}' data-confirm data-confirmSubMessage='{lang="restore_as_hidden_desc"}'>{lang="restore_as_hidden"}</a></li>
									<li class='ipsMenu_item'><a href='{$comment->url('delete')->csrf()->setQueryString( 'immediately', 1 )}' data-confirm data-confirmSubMessage='{lang="delete_immediately_desc"}'>{lang="delete_immediately"}</a></li>
								{{else}}
									{{if $comment instanceof \IPS\Content\Hideable}}
										{{if !$comment->hidden() and $comment->canHide()}}
											<li class='ipsMenu_item'><a href='{$comment->url('hide')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
										{{elseif $comment->hidden() and $comment->canUnhide()}}
											<li class='ipsMenu_item'><a href='{$comment->url('unhide')->csrf()}'>{lang="unhide"}</a></li>
										{{endif}}
									{{endif}}
									{{if $comment->canSplit()}}
										<li class='ipsMenu_item'><a href='{$comment->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}">{lang="split"}</a></li>
									{{endif}}
									{{if $comment->canDelete()}}
										<li class='ipsMenu_item'><a href='{$comment->url('delete')->csrf()->setQueryString('page',\IPS\Request::i()->page)}' data-action='deleteComment' data-updateOnDelete="#commentCount">{lang="delete"}</a></li>
									{{endif}}
									{{if $comment->isFeatured() AND $item->canUnfeatureComment()}}
										<li class='ipsMenu_item'><a href='{$comment->url('unfeature')->csrf()->setQueryString('page',\IPS\Request::i()->page)}' data-action="unrecommendComment">{lang="unrecommend_content"}</a></li>
									{{endif}}
									{{if !$comment->isFeatured() AND $item->canFeatureComment()}}
										<li class='ipsMenu_item'><a href='{$comment->url('feature')->csrf()->setQueryString('page', \IPS\Request::i()->page)}' data-ipsDialog data-ipsDialog-title='{lang="recommend_comment"}' data-ipsDialog-remoteSubmit data-ipsDialog-size='narrow' data-action="recommendComment">{lang="recommend_content"}</a></li>
									{{endif}}
									{{if $comment->canPromoteToSocialMedia()}}
										<li class='ipsMenu_item'>{template="promoteLink" app="core" group="global" params="$comment"}</li>
									{{endif}}
								{{endif}}
							</ul>
						</li>
					{{endif}}
				{{endif}}
				<li class='ipsHide' data-role='commentLoading'>
					<span class='ipsLoading ipsLoading_tiny ipsLoading_noAnim'></span>
				</li>
			</ul>
		</div>
	</div>

	<div class='ipsMenu ipsMenu_wide ipsHide cPostShareMenu' id='elShareComment_{$comment->id}_menu'>
		<div class='ipsPad'>
			<h4 class='ipsType_sectionHead'>{lang="share_this_comment"}</h4>
			<hr class='ipsHr'>
			<h5 class='ipsType_normal ipsType_reset'>{lang="link_to_comment"}</h5>
			<input type='text' value='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->id ) )}' class='ipsField_fullWidth'>
			{{if count( $comment->sharelinks() )}}
			<h5 class='ipsType_normal ipsType_reset ipsSpacer_top'>{lang="share_externally"}</h5>
			{template="sharelinks" group="global" app="core" params="$comment"}
			{{endif}}
		</div>
	</div>
</div>]]></template>
 <template template_group="global" template_name="commentContainer" template_data="$item, $comment" template_location="front" template_app="gallery"><![CDATA[{{$idField = $comment::$databaseColumnId;}}
{{$itemClassSafe = str_replace( '\\', '_', mb_substr( $comment::$itemClass, 4 ) );}}
{{if $comment->isIgnored()}}
	<div class='ipsComment ipsComment_ignored ipsPad_half ipsType_light' id='elIgnoreComment_{$comment->$idField}' data-ignoreCommentID='elComment_{$comment->$idField}' data-ignoreUserID='{$comment->author()->member_id}'>
		{lang="ignoring_content" sprintf="$comment->author()->name"} <a href='#elIgnoreComment_{$comment->$idField}_menu' data-ipsMenu data-ipsMenu-menuID='elIgnoreComment_{$comment->$idField}_menu' data-ipsMenu-appendTo='#elIgnoreComment_{$comment->$idField}' data-action="ignoreOptions" title='{lang="see_post_ignore_options"}' class='ipsType_blendLinks'>{lang="options"} <i class='fa fa-caret-down'></i></a>
		<ul class='ipsMenu ipsHide' id='elIgnoreComment_{$comment->$idField}_menu'>
			<li class='ipsMenu_item' data-ipsMenuValue='showPost'><a href='#'>{lang="show_this_comment"}</a></li>
			<li class='ipsMenu_sep'><hr></li>
			<li class='ipsMenu_item' data-ipsMenuValue='stopIgnoring'><a href='{url="app=core&module=system&controller=ignore&do=remove&id={$comment->author()->member_id}" seoTemplate="ignore"}'>{lang="stop_ignoring_posts_by" sprintf="$comment->author()->name"}</a></li>
			<li class='ipsMenu_item'><a href='{url="app=core&module=system&controller=ignore" seoTemplate="ignore"}'>{lang="change_ignore_preferences"}</a></li>
		</ul>
	</div>
{{endif}}

<a id='comment-{$comment->$idField}'></a>
<article {{if $comment->author()->hasHighlightedReplies()}}data-memberGroup="{$comment->author()->member_group_id}" {{endif}} id='elComment_{$comment->$idField}' class='ipsComment {{if ( settings.reputation_enabled and \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and settings.reputation_highlight and $comment->reactionCount() >= settings.reputation_highlight ) OR $comment->isFeatured()}}ipsComment_popular{{endif}} ipsComment_parent ipsClearfix ipsClear {{if $comment->isIgnored()}}ipsHide{{endif}} {{if $comment->author()->hasHighlightedReplies()}}ipsComment_highlighted{{endif}} {{if $comment->hidden() OR $item->hidden() == -2}}ipsModerated{{endif}}'>
	{template="comment" group="global" app="gallery" params="$item, $comment, $item::$formLangPrefix . 'comment', $item::$application, $item::$module, $itemClassSafe"}
</article>]]></template>
 <template template_group="global" template_name="commentTableHeader" template_data="$comment, $image" template_location="front" template_app="gallery"><![CDATA[
<div class='ipsDataList ipsAreaBackground_light ipsClearfix'>
	<div class='ipsDataItem'>
		<div class='ipsDataItem_generic ipsDataItem_size2'>
			{template="thumbImage" group="global" app="core" params="$image->small_file_name, $image->caption, 'small', '', 'view_this', $image->url(), 'gallery_Images'"}
		</div>
		<div class='ipsDataItem_main ipsType_break'>
			<h3 class='ipsType_sectionHead'><a href='{$image->url()}' title='{lang="view_this_image" sprintf="$image->caption"}'>{$image->caption}</a></h3>
			<p class='ipsType_normal ipsType_light ipsType_blendLinks ipsType_reset'>{lang="in"} <a href='{$image->container()->url()}'>{$image->container()->_title}</a></p>
			{{if $image->container()->allow_rating}}
				{template="rating" group="global" location="front" app="core" params="'large', $image->rating"} &nbsp;&nbsp;
			{{endif}}

			<span class='ipsType_medium ipsType_reset'>{{if $image->container()->allow_comments}}&nbsp;&nbsp;{{if !$image->comments}}<span class='ipsType_light'>{{endif}}<i class='fa fa-comment'></i> {$image->comments}{{endif}}{{if !$image->comments}}</span>{{endif}}</span>
		</div>
	</div>
</div>]]></template>
 <template template_group="global" template_name="embedAlbumComment" template_data="$comment, $item, $url" template_location="front" template_app="gallery"><![CDATA[
<div data-embedInfo-maxSize='500' class='ipsRichEmbed'>
	{template="embedHeader" group="embed" app="core" params="$comment, \IPS\Member::loggedIn()->language()->addToStack( 'x_commented_album', FALSE, array( 'sprintf' => array( $comment->author()->name ) ) ), $comment->mapped('date'), $url"}
	<div class='ipsPad_double'>
		<div class='ipsRichEmbed_originalItem ipsAreaBackground_reset ipsSpacer_bottom ipsType_blendLinks'>
			<div>
				{{$images = \IPS\Gallery\Image::getItemsWithPermission( array( array( 'image_album_id=?', $item->asNode()->id ) ), ( $item->asNode()->sort_options == 'title' ) ? 'image_caption ASC' : \IPS\gallery\Image::$databasePrefix . \IPS\gallery\Image::$databaseColumnMap[ $item->asNode()->sort_options ] . ' DESC', 19 );}}

				{{if count( $images )}}
					<ul class='ipsList_reset cGalleryEmbed_albumStrip cGalleryEmbed_albumStrip_mini ipsAreaBackground_reset ipsClearfix'>
						{{foreach $images as $albumImage}}
							<li>
								<a href='{$albumImage->url()}' style='background-image: url( "{backgroundimage="\IPS\File::get( 'gallery_Images', $albumImage->small_file_name )->url"}") '>
									<img src='{file="$albumImage->small_file_name" extension="gallery_Images"}' class='ipsHide'>
								</a>
							</li>
						{{endforeach}}

						{{if $item->asNode()->count_imgs > 19}}
							<li class='cGalleryEmbed_albumStrip_last ipsAreaBackground'>
								<a href='{$item->asNode()->url()}'><span>+{expression="$item->asNode()->count_imgs - 19"}</span></a>
							</li>
						{{endif}}
					</ul>
				{{endif}}
				<div class='ipsPad'>
					{template="embedOriginalItem" group="embed" app="core" params="$item"}
				</div>
			</div>
		</div>

		<div class='ipsType_richText ipsType_medium' data-truncate='3'>
			{$comment->truncated(TRUE)|raw}
		</div>

		{{if settings.reputation_enabled and \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and count( $comment->reactions() )}}
			<ul class='ipsList_inline ipsSpacer_top ipsSpacer_half'>
				<li>
					{template="reactionOverview" app="core" group="global" params="$comment, TRUE, 'small'"}
				</li>
			</ul>
		{{endif}}
	</div>
</div>]]></template>
 <template template_group="global" template_name="embedAlbumReview" template_data="$comment, $item, $url" template_location="front" template_app="gallery"><![CDATA[
<div data-embedInfo-maxSize='500' class='ipsRichEmbed'>
	{template="embedHeader" group="embed" app="core" params="$comment, \IPS\Member::loggedIn()->language()->addToStack( 'x_reviewed_album', FALSE, array( 'sprintf' => array( $comment->author()->name ) ) ), $comment->mapped('date'), $url"}
	<div class='ipsPad_double'>
		<div class='ipsRichEmbed_originalItem ipsAreaBackground_reset ipsSpacer_bottom ipsType_blendLinks'>
			<div>
				{{$images = \IPS\Gallery\Image::getItemsWithPermission( array( array( 'image_album_id=?', $item->asNode()->id ) ), ( $item->asNode()->sort_options == 'title' ) ? 'image_caption ASC' : \IPS\gallery\Image::$databasePrefix . \IPS\gallery\Image::$databaseColumnMap[ $item->asNode()->sort_options ] . ' DESC', 19 );}}

				{{if count( $images )}}
					<ul class='ipsList_reset cGalleryEmbed_albumStrip cGalleryEmbed_albumStrip_mini ipsAreaBackground_reset ipsClearfix'>
						{{foreach $images as $albumImage}}
							<li>
								<a href='{$albumImage->url()}' style='background-image: url( "{backgroundimage="\IPS\File::get( 'gallery_Images', $albumImage->small_file_name )->url"}") '>
									<img src='{file="$albumImage->small_file_name" extension="gallery_Images"}' class='ipsHide'>
								</a>
							</li>
						{{endforeach}}

						{{if $item->asNode()->count_imgs > 19}}
							<li class='cGalleryEmbed_albumStrip_last ipsAreaBackground'>
								<a href='{$item->asNode()->url()}'><span>+{expression="$item->asNode()->count_imgs - 19"}</span></a>
							</li>
						{{endif}}
					</ul>
				{{endif}}
				<div class='ipsPad'>
					{template="embedOriginalItem" group="embed" app="core" params="$item"}
				</div>
			</div>
		</div>

		{template="rating" app="core" params="'veryLarge', $comment->mapped('rating')" group="global"} 
		{{if $comment->mapped('votes_total')}}
			<p class='ipsType_reset ipsType_medium'>{$comment->helpfulLine()|raw}</p>
		{{endif}}
		<hr class='ipsHr'>
		<div class='ipsType_richText ipsType_medium ipsSpacer_top ipsSpacer_half' data-truncate='3'>
			{$comment->truncated(TRUE)|raw}
		</div>

		{{if settings.reputation_enabled and \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and count( $comment->reactions() )}}
			<ul class='ipsList_inline ipsSpacer_top ipsSpacer_half'>
				<li>
					{template="reactionOverview" app="core" group="global" params="$comment, TRUE, 'small'"}
				</li>
			</ul>
		{{endif}}
	</div>
</div>]]></template>
 <template template_group="global" template_name="embedAlbums" template_data="$albumItem, $albumNode, $url" template_location="front" template_app="gallery"><![CDATA[
<div data-embedInfo-maxSize='500' class='ipsRichEmbed'>
	{template="embedHeader" group="embed" app="core" params="$albumItem, \IPS\Member::loggedIn()->language()->addToStack( 'x_added_album_in', FALSE, array( 'sprintf' => array( $albumItem->author()->name, $albumNode->category()->_title ) ) ), $albumItem->mapped('date'), $url"}
	{{if $albumNode->coverPhoto('small')}}
		<div class='ipsRichEmbed_masthead ipsRichEmbed_mastheadBg cGalleryEmbed ipsType_center'>
			<a href='{$albumNode->url()}' style='background-image: url( "{backgroundimage="$albumNode->coverPhoto('small')"}" )'>
				<img src='{$albumNode->coverPhoto('small')}' class='ipsHide' alt="{$album->name}">
			</a>
		</div>
	{{endif}}

	{{$images = \IPS\Gallery\Image::getItemsWithPermission( array( array( 'image_album_id=?', $albumNode->id ) ), ( $albumNode->sort_options == 'title' ) ? 'image_caption ASC' : \IPS\gallery\Image::$databasePrefix . \IPS\gallery\Image::$databaseColumnMap[ $albumNode->sort_options ] . ' DESC', 9 );}}

	{{if count( $images )}}
		<ul class='ipsList_reset cGalleryEmbed_albumStrip ipsAreaBackground_reset ipsClearfix'>
			{{foreach $images as $albumImage}}
				<li>
					<a href='{$albumImage->url()}' style='background-image: url( "{backgroundimage="\IPS\File::get( 'gallery_Images', $albumImage->small_file_name )->url"}") '>
						<img src='{file="$albumImage->small_file_name" extension="gallery_Images"}' class='ipsHide'>
					</a>
				</li>
			{{endforeach}}

			{{if $albumNode->count_imgs > 9}}
				<li class='cGalleryEmbed_albumStrip_last ipsAreaBackground'>
					<a href='{$albumNode->url()}'><span>+{expression="$albumNode->count_imgs - 9"}</span></a>
				</li>
			{{endif}}
		</ul>
	{{endif}}

	<div class='ipsPad_double ipsClearfix'>
		<h3 class='ipsRichEmbed_itemTitle ipsTruncate ipsTruncate_line ipsType_blendLinks'>
			<a href='{$url}' title="{$albumItem->mapped('title')}">{$albumItem->mapped('title')}</a>
		</h3>
		{{if $desc = $albumItem->truncated(TRUE)}}
			<div class='ipsType_richText ipsType_medium ipsSpacer_top ipsSpacer_half' data-truncate='3'>
				{$desc|raw}
			</div>
		{{endif}}
		{template="embedItemStats" group="embed" app="core" params="$albumItem, $albumNode->use_comments"}
	</div>
</div>]]></template>
 <template template_group="global" template_name="embedImage" template_data="$item, $url, $image=NULL" template_location="front" template_app="gallery"><![CDATA[
<div data-embedInfo-maxSize='500' class='ipsRichEmbed'>
	{template="embedHeader" group="embed" app="core" params="$item, \IPS\Member::loggedIn()->language()->addToStack( $item->media ? 'x_added_video_in' : 'x_added_image_in', FALSE, array( 'sprintf' => array( $item->author()->name, $item->directContainer()->_title ) ) ), $item->mapped('date'), $url"}
	{{if $item->media }}
		<span class='ipsThumb ipsNoThumb ipsNoThumb_video ipsThumb_embed'>
			<video data-role="video" class="ipsPos_center" controls preload="metadata" width="100%" height="100%"{{if $item->masked_file_name }} poster="{file="$item->masked_file_name" extension="gallery_Images"}"{{endif}}>
				<source src="{file="$item->original_file_name" extension="gallery_Images"}" type='{$item->file_type}' />
			</video>
		</span>
	{{else}}
		<a href='{$item->url()}' title='{lang="view_this_image" sprintf="$item->caption"}' class='ipsThumb ipsThumb_embed ipsThumb_bg' style='background-image: url( "{backgroundimage="\IPS\File::get( 'gallery_Images', $item->small_file_name )->url"}" );'>
			<img src='{file="$item->small_file_name" extension="gallery_Images"}' alt="{$item->caption}" class='ipsHide'>
		</a>
	{{endif}}
	<div class='ipsPad_double ipsClearfix'>
		<p class='ipsRichEmbed_itemTitle ipsType_reset ipsTruncate ipsTruncate_line ipsType_blendLinks'>
			<a href='{$url}'>{$item->caption}</a>
		</p>
		{{if $desc = $item->truncated(TRUE)}}
			<div class='ipsType_richText ipsType_medium ipsSpacer_top ipsSpacer_half' data-truncate='3'>
				{$desc|raw}
			</div>
		{{endif}}
		{{if $item->copyright}}
			<p class='ipsType_reset ipsType_light ipsType_medium ipsSpacer_top ipsSpacer_half'>
				&copy; {$item->copyright}
			</p>
		{{endif}}
		{template="embedItemStats" group="embed" app="core" params="$item"}
	</div>

	{{if $item->directContainer() instanceof \IPS\gallery\Album}}
		<div class='ipsAreaBackground_light ipsPad_double ipsClearfix ipsRichEmbed_moreInfo'>
			<h3 class='ipsType_minorHeading ipsTruncate ipsTruncate_line ipsType_blendLinks'>{lang="from_the_album"} "<a href='{$item->directContainer()->url()}'>{$item->directContainer()->_title}</a>"</h3>
			{{$images = \IPS\Gallery\Image::getItemsWithPermission( array( array( 'image_album_id=?', $item->album_id ) ), ( $item->directContainer()->sort_options == 'title' ) ? 'image_caption ASC' : $item::$databasePrefix . $item::$databaseColumnMap[ $item->directContainer()->sort_options ] . ' DESC', 9 );}}

			{{if count( $images )}}
				<ul class='ipsList_reset cGalleryEmbed_albumStrip cGalleryEmbed_albumStrip_mini ipsSpacer_top ipsSpacer_half'>
					{{foreach $images as $albumImage}}
						<li>
							<a href='{$albumImage->url()}' style='background-image: url( "{backgroundimage="\IPS\File::get( 'gallery_Images', $albumImage->small_file_name )->url"}") '>
								<img src='{file="$albumImage->small_file_name" extension="gallery_Images"}' class='ipsHide'>
							</a>
						</li>
					{{endforeach}}

					{{if $item->directContainer()->count_imgs > 9}}
						<li class='cGalleryEmbed_albumStrip_last ipsAreaBackground'>
							<a href='{$item->directContainer()->url()}'><span>+{expression="$item->directContainer()->count_imgs - 9"}</span></a>
						</li>
					{{endif}}
				</ul>
			{{endif}}
		</div>
	{{endif}}
</div>]]></template>
 <template template_group="global" template_name="embedImageComment" template_data="$comment, $item, $url" template_location="front" template_app="gallery"><![CDATA[
<div data-embedInfo-maxSize='500' class='ipsRichEmbed'>
	{template="embedHeader" group="embed" app="core" params="$comment, \IPS\Member::loggedIn()->language()->addToStack( 'x_commented_photo', FALSE, array( 'sprintf' => array( $comment->author()->name ) ) ), $comment->mapped('date'), $url"}
	<div class='ipsPad_double'>
		<div class='ipsRichEmbed_originalItem ipsAreaBackground_reset ipsSpacer_bottom ipsType_blendLinks'>
			<div>
				{{if $item->media }}
					<a href='{$item->url()}' title='{lang="view_this_video" sprintf="$item->caption"}' class='ipsThumb ipsNoThumb ipsNoThumb_video ipsThumb_medium'>
						<video data-role="video" class="ipsPos_center" preload="metadata" width="100%" height="100%"{{if $item->masked_file_name }} poster="{file="$item->masked_file_name" extension="gallery_Images"}"{{endif}}>
							<source src="{file="$item->original_file_name" extension="gallery_Images"}" type='{$item->file_type}' />
						</video>
					</a>
				{{else}}
					<div class='ipsRichEmbed_masthead ipsRichEmbed_mastheadBg cGalleryEmbed_imageComment ipsType_center'>
						<a href='{$item->url()}' title='{lang="view_this_image" sprintf="$item->caption"}' class='ipsThumb ipsThumb_medium ipsThumb_bg' style='background-image: url( "{backgroundimage="\IPS\File::get( 'gallery_Images', $item->small_file_name )->url"}" );'>
							<img src='{file="$item->small_file_name" extension="gallery_Images"}' alt="{$item->caption}" class='ipsHide'>
						</a>
					</div>
				{{endif}}

				<div class='ipsPad'>
					{template="embedOriginalItem" group="embed" app="core" params="$item"}
				</div>
			</div>
		</div>

		<div class='ipsType_richText ipsType_medium' data-truncate='3'>
			{$comment->truncated(TRUE)|raw}
		</div>

		{{if settings.reputation_enabled and \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and count( $comment->reactions() )}}
			<ul class='ipsList_inline ipsSpacer_top ipsSpacer_half'>
				<li>
					{template="reactionOverview" app="core" group="global" params="$comment, TRUE, 'small'"}
				</li>
			</ul>
		{{endif}}
	</div>
</div>]]></template>
 <template template_group="global" template_name="embedImageReview" template_data="$comment, $item, $url" template_location="front" template_app="gallery"><![CDATA[
<div data-embedInfo-maxSize='500' class='ipsRichEmbed'>
	{template="embedHeader" group="embed" app="core" params="$comment, \IPS\Member::loggedIn()->language()->addToStack( 'x_reviewed_photo', FALSE, array( 'sprintf' => array( $comment->author()->name ) ) ), $comment->mapped('date'), $url"}
	<div class='ipsPad_double'>
		<div class='ipsRichEmbed_originalItem ipsAreaBackground_reset ipsSpacer_bottom ipsType_blendLinks'>
			<div>
				{{if $item->media }}
					<a href='{$item->url()}' title='{lang="view_this_video" sprintf="$item->caption"}' class='ipsThumb ipsNoThumb ipsNoThumb_video ipsThumb_medium'>
						<video data-role="video" class="ipsPos_center" preload="metadata" width="100%" height="100%"{{if $item->masked_file_name }} poster="{file="$item->masked_file_name" extension="gallery_Images"}"{{endif}}>
							<source src="{file="$item->original_file_name" extension="gallery_Images"}" type='{$item->file_type}' />
						</video>
					</a>
				{{else}}
					<div class='ipsRichEmbed_masthead ipsRichEmbed_mastheadBg cGalleryEmbed_imageComment ipsType_center'>
						<a href='{$item->url()}' title='{lang="view_this_image" sprintf="$item->caption"}' class='ipsThumb ipsThumb_medium ipsThumb_bg' style='background-image: url( "{backgroundimage="\IPS\File::get( 'gallery_Images', $item->small_file_name )->url"}" );'>
							<img src='{file="$item->small_file_name" extension="gallery_Images"}' alt="{$item->caption}" class='ipsHide'>
						</a>
					</div>
				{{endif}}
				<div class='ipsPad'>
					{template="embedOriginalItem" group="embed" app="core" params="$item"}
				</div>
			</div>
		</div>

		{template="rating" app="core" params="'veryLarge', $comment->mapped('rating')" group="global"} 
		{{if $comment->mapped('votes_total')}}
			<p class='ipsType_reset ipsType_medium'>{$comment->helpfulLine()|raw}</p>
		{{endif}}
		<hr class='ipsHr'>
		<div class='ipsType_richText ipsType_medium ipsSpacer_top ipsSpacer_half' data-truncate='3'>
			{$comment->truncated(TRUE)|raw}
		</div>

		{{if settings.reputation_enabled and \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and count( $comment->reactions() )}}
			<ul class='ipsList_inline ipsSpacer_top ipsSpacer_half'>
				<li>
					{template="reactionOverview" app="core" group="global" params="$comment, TRUE, 'small'"}
				</li>
			</ul>
		{{endif}}
	</div>
</div>]]></template>
 <template template_group="global" template_name="featuredComment" template_data="$comment, $id, $commentLang='__defart_comment'" template_location="front" template_app="gallery"><![CDATA[{{if isset( $comment['comment'] )}}
	{{$idField = $comment['comment']::$databaseColumnId;}}
	<div class='ipsBox ipsPad ipsClearfix ipsComment_recommended ipsSpacer_bottom' data-commentID='{$id}'>
		{{if \IPS\IPS::classUsesTrait( $comment['comment'], 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
			<div class='ipsPos_right'>{template="reactionOverview" group="global" app="core" params="$comment['comment']"}</div>
		{{endif}}
		<span class='ipsComment_recommendedFlag'><i class='fa fa-star'></i><span class='ipsResponsive_hidePhone'> {lang="recommended"}</span></span>
		<div class='ipsComment_header ipsPhotoPanel ipsPhotoPanel_mini ipsSpacer_top'>
			{template="userPhoto" app="core" group="global" params="$comment['comment']->author(), 'mini', $comment['comment']->warningRef()"}
			<div>
				<h3 class='ipsComment_author ipsType_blendLinks'>
					<strong class='ipsType_normal'>{template="userLink" app="core" group="global" params="$comment['comment']->author(), $comment['comment']->warningRef()"}</strong>
					{template="reputationBadge" group="global" app="core" params="$comment['comment']->author()"}
				</h3>
				<p class='ipsComment_meta ipsType_light ipsType_small'>
					<a href='{$comment['comment']->url()}' class='ipsType_blendLinks'>{$comment['comment']->dateLine()|raw}</a>
					{{if $comment['comment']->editLine()}}
						({lang="edited_lc"})
					{{endif}}
				</p>
			</div>
		</div>

		<div class='ipsType_richText ipsType_normal' data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='2 lines'>{$comment['comment']->truncated( TRUE )|raw}</div>

		{{if $comment['note']}}
			<div class='ipsComment_recommendedNote ipsType_medium'>
				<p class='ipsType_reset ipsType_richText'>{$comment['note']}</p>
				{{if isset( $comment['featured_by'] )}}
					<p class='ipsType_reset ipsType_light'>{lang="recommended_by" htmlsprintf="$comment['featured_by']->link()"}</p>
				{{endif}}
			</div>
		{{elseif isset( $comment['featured_by'] )}}
			{lang="recommended_by" htmlsprintf="$comment['featured_by']->link()"}
		{{endif}}

		<hr class='ipsHr'>
		<div>
			<a href='{$comment['comment']->url()}' data-action='goToComment' class='ipsButton ipsButton_link ipsButton_verySmall ipsButton_fullWidth'>{lang="go_to_this_comment" sprintf="\IPS\Member::loggedIn()->language()->get( $commentLang )"} <i class='fa fa-angle-right'></i></a>
		</div>
	</div>
{{endif}}]]></template>
 <template template_group="global" template_name="featuredComments" template_data="$comments, $url, $titleLang='recommended_replies', $commentLang='__defart_comment'" template_location="front" template_app="gallery"><![CDATA[
<div data-controller='core.front.core.recommendedComments' data-url='{$url}' class='ipsAreaBackground ipsPad ipsBox ipsBox_transparent ipsSpacer_bottom ipsRecommendedComments {{if !count( $comments )}}ipsHide{{endif}}'>
	<div data-role="recommendedComments">
		<h2 class='ipsType_sectionHead ipsType_large'>{lang="$titleLang"}</h2>
		{{if count( $comments )}}
			{{foreach $comments AS $id => $comment}}
				{template="featuredComment" group="global" app="gallery" params="$comment, $id, $commentLang"}
			{{endforeach}}
		{{endif}}
	</div>
</div>]]></template>
 <template template_group="global" template_name="link" template_data="$image" template_location="global" template_app="gallery"><![CDATA[<div class='ipsContained ipsType_break'><a href="{$image->url()}" class="ipsType_blendLinks" target="_blank">{$image->caption}</a></div>]]></template>
 <template template_group="global" template_name="manageFollowNodeRow" template_data="$table, $headers, $rows" template_location="front" template_app="gallery"><![CDATA[{{foreach $rows as $row}}
	{{$contentItemClass = $row::$contentItemClass;}}
	<li class="ipsDataItem {{if $contentItemClass::containerUnread( $row )}}ipsDataItem_unread{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}}" data-controller='core.front.system.manageFollowed' data-followID='{$row->_followData['follow_area']}-{$row->_followData['follow_rel_id']}'>
		<div class='ipsDataItem_generic ipsDataItem_size3'>
			{{if $coverImage = $row->coverPhoto('small') }}
				<span class='ipsThumb_bg ipsThumb_small ipsPos_left' style='background-image: url("{backgroundimage="$coverImage"}")'>
					<img src='{$coverImage}' alt="{$row->_title}" class="">
				</span>
			{{else}}
				<span class='ipsNoThumb ipsThumb_small ipsPos_left'></span>
			{{endif}}
		</div>
		<div class='ipsDataItem_main'>
			<h4 class='ipsType_sectionHead'>
				{{if $row->_locked}}
					<i class="fa fa-lock"></i>
				{{endif}}
				
				<a href='{$row->url()}'>
					{$row->_title}
				</a>
			</h4>
			<div class='ipsDataItem_meta ipsType_light' data-ipsTruncate data-ipsTruncate-size='2 lines' data-ipsTruncate-type='remove'>
				{$row->_description}
			</div>
			<ul class='ipsList_inline ipsType_light'>
				{{if $row->_items}}
					<li>{lang="node_content_items" pluralize="$row->_items"}</li>
				{{endif}}
				{{if $row->_commentsForDisplay}}
					<li>{lang="node_content_comments" pluralize="$row->_commentsForDisplay"}</li>
				{{endif}}
				{{if $row->_reviews}}
					<li>{lang="node_content_reviews" pluralize="$row->_reviews"}</li>
				{{endif}}
			</ul>

			{{if count( $row->_latestImages )}}
				<ul class='ipsList_inline cGalleryManagedAlbumThumbs'>
					{{foreach array_slice( iterator_to_array( $row->_latestImages ), 0, 10, true ) as $image }}
						<li>
							<a href='{$image->url()}'>
								<span class='ipsThumb_bg ipsThumb_small ipsPos_left' style='background-image: url("{backgroundimage="\IPS\File::get( 'gallery_Images', $image->small_file_name )->url"}")'>
									<img src='{file="$image->small_file_name" extension="gallery_Images"}' alt="{$image->caption}" class="">
								</span>
							</a>
						</li>
					{{endforeach}}
				</ul>
			{{endif}}
		</div>
		
		<div class='ipsDataItem_generic ipsDataItem_size1 ipsType_center ipsType_large'>
			<span class='ipsBadge ipsBadge_icon ipsBadge_new {{if !$row->_followData['follow_is_anon']}}ipsHide{{endif}}' data-role='followAnonymous' data-ipsTooltip title='{lang="follow_is_anon"}'><i class='fa fa-eye-slash'></i></span>
		</div>

		<div class='ipsDataItem_generic ipsDataItem_size6'>
			<ul class='ipsList_reset'>
				<li title='{lang="follow_when"}' data-role='followDate'><i class='fa fa-clock-o'></i> {datetime="$row->_followData['follow_added']"}</li>
				<li title='{lang="follow_how"}' data-role='followFrequency'>
					{{if $row->_followData['follow_notify_freq'] == 'none'}}
						<i class='fa fa-bell-slash-o'></i>
					{{else}}
						<i class='fa fa-bell'></i>
					{{endif}} {lang="follow_freq_{$row->_followData['follow_notify_freq']}"}
				</li>
			</ul>
		</div>

		<div class='ipsDataItem_generic ipsDataItem_size6 ipsType_center'>
			{template="manageFollow" group="system" app="core" params="$row->_followData['follow_app'], $row->_followData['follow_area'], $row->_followData['follow_rel_id']"}
		</div>

		{{if $table->canModerate()}}
			<div class='ipsDataItem_modCheck'>
				<span class='ipsCustomInput'>
					<input type='checkbox' data-role='moderation' name="moderate[{$row->_id}]" data-actions="{expression="implode( ' ', $table->multimodActions( $row ) )"}" data-state=''>
					<span></span>
				</span>
			</div>
		{{endif}}
	</li>
{{endforeach}}]]></template>
 <template template_group="global" template_name="manageFollowRow" template_data="$table, $headers, $rows, $includeFirstCommentInCommentCount=TRUE" template_location="front" template_app="gallery"><![CDATA[{{if count( $rows )}}
	{{foreach $rows as $row}}
	{{$idField = $row::$databaseColumnId;}}
		<li class="ipsDataItem ipsDataItem_responsivePhoto {{if $row->unread()}}ipsDataItem_unread{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden()}}ipsModerated{{endif}}" data-controller='core.front.system.manageFollowed' data-followID='{$row->_followData['follow_area']}-{$row->_followData['follow_rel_id']}'>
			<div class='ipsDataItem_generic ipsDataItem_size2 ipsDataItem_imageColumn'>
				<div class='ipsThumb ipsThumb_bg ipsThumb_small' style='background-image: url( {backgroundimage="\IPS\File::get( 'gallery_Images', $row->small_file_name )->url"} )'></div>
			</div>
			<div class='ipsDataItem_main ipsPos_middle'>
				<h4 class='ipsDataItem_title ipsContained_container'>
					{{if $row->mapped('locked')}}
						<span><i class="fa fa-lock"></i></span>
					{{endif}}

					{{if $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
						<span>
							{{if $row->hidden() === -1}}
								<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
							{{elseif $row->hidden() === 1}}
								<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
							{{endif}}							
							{{if $row->mapped('pinned')}}
								<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span>
							{{endif}}
							{{if $row->mapped('featured')}}
								<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
							{{endif}}
						</span>
					{{endif}}
					
					{{if $row->prefix()}}
						<span>{template="prefix" group="global" app="core" params="$row->prefix( TRUE ), $row->prefix()"}</span>
					{{endif}}
					
					<span class='ipsContained ipsType_break'>
						<a href='{$row->url()}'>
							{{if $row->mapped('title')}}{$row->mapped('title')}{{else}}<em class="ipsType_light">{lang="content_deleted"}</em>{{endif}}
						</a>
					</span>
				</h4>
				<div class='ipsDataItem_meta ipsType_light ipsType_blendLinks' data-ipsTruncate data-ipsTruncate-size='2 lines' data-ipsTruncate-type='remove'>
					{{if method_exists( $row, 'tableDescription' )}}
						{$row->tableDescription()|raw}
					{{else}}
                        {lang="byline" htmlsprintf="$row->author()->link( $row->warningRef() )"}{datetime="$row->__get( $row::$databaseColumnMap['date'] )"}
						{lang="in"} <a href="{$row->container()->url()}">{$row->container()->_title}</a>
					{{endif}}
				</div>				
			</div>

			<div class='ipsDataItem_generic ipsDataItem_size1 ipsType_center ipsType_large cFollowedContent_anon'>
				<span class='ipsBadge ipsBadge_icon ipsBadge_new {{if !$row->_followData['follow_is_anon']}}ipsHide{{endif}}' data-role='followAnonymous' data-ipsTooltip title='{lang="follow_is_anon"}'><i class='fa fa-eye-slash'></i></span>
			</div>

			<div class='ipsDataItem_generic ipsDataItem_size6 cFollowedContent_info'>
				<ul class='ipsList_reset'>
					<li title='{lang="follow_when"}' data-role='followDate'><i class='fa fa-clock-o'></i> {datetime="$row->_followData['follow_added']"}</li>
					<li title='{lang="follow_how"}' data-role='followFrequency'>
						{{if $row->_followData['follow_notify_freq'] == 'none'}}
							<i class='fa fa-bell-slash-o'></i>
						{{else}}
							<i class='fa fa-bell'></i>
						{{endif}} {lang="follow_freq_{$row->_followData['follow_notify_freq']}"}
					</li>
				</ul>
			</div>

			<div class='ipsDataItem_generic ipsDataItem_size6 ipsType_center cFollowedContent_manage'>
				{template="manageFollow" group="system" app="core" params="$row->_followData['follow_app'], $row->_followData['follow_area'], $row->_followData['follow_rel_id']"}
			</div>

			{{if $table->canModerate()}}
				<div class='ipsDataItem_modCheck'>
					<span class='ipsCustomInput'>
						<input type='checkbox' data-role='moderation' name="moderate[{$row->$idField}]" data-actions="{expression="implode( ' ', $table->multimodActions( $row ) )"}" data-state='{{if $row->tableStates()}}{$row->tableStates()}{{endif}}'>
						<span></span>
					</span>
				</div>
			{{endif}}

		</li>
	{{endforeach}}
{{endif}}
]]></template>
 <template template_group="global" template_name="profileAlbumTable" template_data="$table, $headers, $rows, $quickSearch" template_location="front" template_app="gallery"><![CDATA[
<div data-baseurl='{$table->baseUrl}' data-resort='{$table->resortKey}' data-pageParam='albumPage' data-controller='core.global.core.table{{if $table->canModerate()}},core.front.core.moderation{{endif}}'>
	{{if $table->pages > 1}}
		<div data-role="tablePagination">
			{template="pagination" group="global" app="core" location="global" params="$table->baseUrl, $table->pages, $table->page, $table->limit, TRUE, 'albumPage'"}
		</div>
		<br>
	{{endif}}

	<ol class='ipsList_reset ipsClear ipsGrid ipsGrid_collapsePhone' data-role='tableRows' data-controller='gallery.front.browse.list' id='elTable_{$table->uniqueId}'>
		{template="$table->rowsTemplate[1]" params="$table, $headers, $rows" object="$table->rowsTemplate[0]"}
	</ol>
</div>]]></template>
 <template template_group="global" template_name="review" template_data="$item, $review, $editorName, $app, $type" template_location="front" template_app="gallery"><![CDATA[<div id='review-{$review->id}_wrap' data-controller='core.front.core.comment' data-commentApp='{$app}' data-commentType='{$type}-review' data-commentID="{$review->id}" data-quoteData='{expression="json_encode( array('userid' => $review->author()->member_id, 'username' => $review->author()->name, 'timestamp' => $review->mapped('date'), 'contentapp' => $app, 'contenttype' => $type, 'contentid' => $item->id, 'contentcommentid' => $review->id) )"}' class='ipsComment_content ipsType_medium'>
	<div class='ipsComment_header ipsPhotoPanel ipsPhotoPanel_small ipsPhotoPanel_notPhone'>
		{template="userPhoto" app="core" group="global" params="$review->author(), 'small', $review->warningRef(), 'ipsPos_left'"}
		<div>
			<p class='ipsPos_right ipsType_reset'>
				{{if $review->canReportOrRevoke() === TRUE}}
					<a href='{$review->url('report')}' data-ipsDialog data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-ipsDialog-flashMessage='{lang="report_submit_success"}' data-ipsDialog-title="{lang="report"}" data-action='reportComment' title='{lang="report"}'>{lang="report"}</a> &middot; 
				{{endif}}

				<a class='ipsType_blendLinks' href='{$review->item()->url()->setQueryString( array( 'do' => 'findReview', 'review' => $review->id ) )}' data-ipsTooltip title='{lang="share_this_review"}' data-ipsMenu data-ipsMenu-closeOnClick='false' id='elShareComment_{$review->id}' data-role='shareComment'><i class='fa fa-share-alt'></i></a>
				{{if count( $item->reviewMultimodActions() )}}
					<span class='ipsCustomInput'>
						<input type="checkbox" name="multimod[{$review->id}]" value="1" data-role="moderation" data-actions="{{if $review->hidden() === -1 AND $review->canUnhide()}}unhide{{elseif $review->hidden() === 1 AND $review->canUnhide()}}approve{{elseif $review->canHide()}}hide{{endif}} {{if $review->canDelete()}}delete{{endif}}" data-state='{{if $review->tableStates()}}{$review->tableStates()}{{endif}}'>
						<span></span>
					</span>
				{{endif}}
			</p>
			<h3 class="ipsComment_author ipsType_blendLinks">
				<strong class='ipsType_normal'>{template="userLink" app="core" group="global" params="$review->author(), $review->warningRef()"}</strong>
				{template="reputationBadge" group="global" app="core" params="$review->author()"}
			</h3>
			<p class="ipsComment_meta ipsType_medium ipsType_light">
				{{if $review->mapped('date')}}
					{datetime="$review->mapped('date')"}
				{{else}}
					{lang="unknown_date"}
				{{endif}}

				{{if $review->editLine()}}
					&middot; {$review->editLine()|raw}
				{{endif}}
				{{if $review->hidden() AND $review->hidden() != -2}}
					&middot; {$review->hiddenBlurb()}
				{{elseif $review->hidden() == -2}}
					&middot; {$review->deletedBlurb()}
				{{endif}}
			</p>
			<ul class='ipsList_inline ipsClearfix ipsRating ipsRating_large'>
				{{foreach range( 1, intval( \IPS\Settings::i()->reviews_rating_out_of ) ) as $i}}
					<li class='{{if $review->mapped('rating') >= $i}}ipsRating_on{{else}}ipsRating_off{{endif}}'>
						<i class='fa fa-star'></i>
					</li>
				{{endforeach}}
			</ul>&nbsp;&nbsp; {{if $review->mapped('votes_total')}}<strong class='ipsType_medium'>{$review->helpfulLine()|raw}</strong><br>{{endif}}
		</div>
	</div>
	<div class='ipsPad'>
		<div id="review-{$review->id}" data-role="commentContent" class="ipsType_richText ipsType_normal ipsContained" data-controller='core.front.core.lightboxedImages'>
			{$review->content()|raw}
		</div>

		{{if $review->hidden() !== 1}}
			{{if member.member_id and ( !$review->mapped('votes_data') or !array_key_exists( member.member_id, json_decode( $review->mapped('votes_data'), TRUE ) ) ) and $review->author()->member_id != \IPS\Member::loggedIn()->member_id}}
				<span class='ipsType_small'><strong>{lang="did_you_find_this_helpful"}</strong> &nbsp;&nbsp;&nbsp;<a href='{$review->url('rate')->setQueryString( 'helpful', TRUE )->csrf()}' class='ipsButton ipsButton_veryVerySmall ipsButton_light' data-action="rateReview"><i class='fa fa-check'></i> {lang="yes"}</a> <a href='{$review->url('rate')->setQueryString( 'helpful', FALSE )->csrf()}' class='ipsButton ipsButton_veryVerySmall ipsButton_light' data-action="rateReview"><i class='fa fa-times'></i> {lang="no"}</a></span>
				<br class='ipsClear'>
			{{endif}}
		{{endif}}

		{{if ( member.member_id and ( !$review->mapped('votes_data') or !array_key_exists( member.member_id, json_decode( $review->mapped('votes_data'), TRUE ) ) ) ) || $review->canEdit() || $review->canDelete() || $review->canHide() || $review->canUnhide() || ( $review->hidden() !== 1 && \IPS\IPS::classUsesTrait( $review, 'IPS\Content\Reactable' ) and settings.reputation_enabled )}}
			<div class='ipsItemControls'>
				{{if $review->hidden() !== 1 && \IPS\IPS::classUsesTrait( $review, 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
					{template="reputation" group="global" app="core" params="$review"}
				{{endif}}
				{{if $review->canEdit() || $review->canDelete() || $review->canHide() || $review->canUnhide()}}
					<ul class='ipsComment_controls ipsClearfix ipsItemControls_left' data-role="commentControls">
						{{if $review->hidden() === 1 && ( $review->canUnhide() || $review->canDelete() )}}
							{{if $review->canUnhide()}}
								<li><a href='{$review->url('unhide')->csrf()}' class='ipsButton ipsButton_verySmall ipsButton_positive' data-action='approveComment'><i class='fa fa-check'></i> {lang="approve"}</a></li>
							{{endif}}
							{{if $review->canDelete()}}
								<li><a href='{$review->url('delete')->csrf()->setQueryString('page',\IPS\Request::i()->page)}' data-confirm data-action='deleteComment' data-updateOnDelete="#commentCount" class='ipsButton ipsButton_verySmall ipsButton_negative'><i class='fa fa-times'></i> {lang="delete"}</a></li>
							{{endif}}
							{{if $review->canEdit() || $review->canSplit()}}
								<li>
									<a href='#elControls_{$review->id}_menu' id='elControls_{$review->id}' data-ipsMenu data-ipsMenu-appendTo='#review-{$review->id}_wrap'>{lang="options"} &nbsp;<i class='fa fa-caret-down'></i></a>
									<ul id='elControls_{$review->id}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
										{{if $review->canEdit()}}
											{{if $review->mapped('first') and $review->item()->canEdit()}}
												<li class='ipsMenu_item'><a href='{$review->item()->url()->setQueryString( 'do', 'edit' )}'>{lang="edit"}</a></li>
											{{else}}
												<li class='ipsMenu_item'><a href='{$review->url('edit')}' data-action='editComment'>{lang="edit"}</a></li>
											{{endif}}
										{{endif}}
										{{if $review->canSplit()}}
											<li class='ipsMenu_item'><a href='{$review->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}">{lang="split"}</a></li>
										{{endif}}
									</ul>
								</li>
							{{endif}}
						{{else}}
							{{if $review->canEdit()}}
								<li><a href='{$review->url('edit')}' data-action='editComment'>{lang="edit"}</a></li>
							{{endif}}	
							{{if $review->canDelete() || $review->canHide() || $review->canUnhide() || ( $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}
								<li>
									<a href='#elControls_review{$review->id}_menu' id='elControls_review{$review->id}' data-ipsMenu data-ipsMenu-appendTo='#review-{$review->id}_wrap'>{lang="options"} &nbsp;<i class='fa fa-caret-down'></i></a>
									<ul id='elControls_review{$review->id}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
										{{if $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content')}}
											<li class='ipsMenu_item'><a href='{$review->url('restore')->csrf()}' data-confirm data-confirmSubMessage='{lang="restore_as_visible_desc"}'>{lang="restore_as_visible"}</a></li>
											<li class='ipsMenu_item'><a href='{$review->url('restore')->csrf()-setQueryString( 'restoreAsHidden', 1 )}' data-confirm data-confirmSubMessage='{lang="restore_as_hidden_desc"}'>{lang="restore_as_hidden"}</a></li>
											<li class='ipsMenu_item'><a href='{$review->url('delete')->csrf()->setQueryString( 'immediately', 1 )}' data-confirm data-confirmSubMessage='{lang="delete_immediately_desc"}'>{lang="delete_immediately"}</a></li>
										{{else}}
											{{if $review instanceof \IPS\Content\Hideable}}
												{{if !$review->hidden() and $review->canHide()}}
													<li class='ipsMenu_item'><a href='{$review->url('hide')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
												{{elseif $review->hidden() and $review->canUnhide()}}
													<li class='ipsMenu_item'><a href='{$review->url('unhide')->csrf()}'>{lang="unhide"}</a></li>
												{{endif}}
											{{endif}}
											{{if $review->canDelete()}}
												<li class='ipsMenu_item'><a href='{$review->url('delete')->csrf()->setQueryString('page',\IPS\Request::i()->page)}' data-confirm data-action='deleteComment' data-updateOnDelete="#reviewCount">{lang="delete"}</a></li>
											{{endif}}
										{{endif}}
									</ul>
								</li>
							{{endif}}
						{{endif}}
						<li class='ipsHide' data-role='commentLoading'>
							<span class='ipsLoading ipsLoading_tiny ipsLoading_noAnim'></span>
						</li>
					</ul>
				{{endif}}
			</div>
		{{endif}}
	</div>
	
	<div class='ipsMenu ipsMenu_wide ipsHide cPostShareMenu' id='elShareComment_{$review->id}_menu'>
		<div class='ipsPad'>
			<h4 class='ipsType_sectionHead'>{lang="share_this_review"}</h4>
			<hr class='ipsHr'>
			<h5 class='ipsType_normal ipsType_reset'>{lang="link_to_review"}</h5>
			<input type='text' value='{$review->item()->url()->setQueryString( array( 'do' => 'findReview', 'review' => $review->id ) )}' class='ipsField_fullWidth'>
		</div>
	</div>
</div>]]></template>
 <template template_group="global" template_name="reviewContainer" template_data="$item, $review" template_location="front" template_app="gallery"><![CDATA[{{$idField = $review::$databaseColumnId;}}
{{if $review->isIgnored()}}
	<div class='ipsComment ipsComment_ignored ipsPad_half ipsType_light'>
		{lang="ignoring_content" sprintf="$review->author()->name"}
	</div>
{{else}}
	<a id='review-{$review->$idField}'></a>
	<article id="elReview_{$review->$idField}" class="ipsComment ipsComment_parent ipsClearfix ipsClear {{if $review->hidden() OR $item->hidden() == -2}}ipsModerated{{endif}}">
		{template="review" group="global" app="gallery" params="$item, $review, $item::$formLangPrefix . 'review', $item::$application, $item::$module"}
	</article>
{{endif}}]]></template>
 <template template_group="global" template_name="searchResultAlbumCommentSnippet" template_data="$indexData, $itemData, $images, $url, $reviewRating, $condensed" template_location="front" template_app="gallery"><![CDATA[{{if $condensed}}
	{{if count( $images )}}
		{{$firstImage = array_shift( $images );}}
		<span class='ipsThumb_bg ipsThumb_small ipsPos_left cGallerySearchAlbumThumb' style='background-image: url("{backgroundimage="\IPS\File::get( 'gallery_Images', $firstImage->small_file_name )->url"}")'>
			<img src='{file="$firstImage->small_file_name" extension="gallery_Images"}' alt="{$firstImage->caption}" class="">
		</span>
		<ul class='ipsList_inline cGallerySearchAlbumThumbs ipsType_noBreak'>
			{{foreach $images as $image }}
				<li>
					<a href='{$image->url()}'>
						<span class='ipsThumb_bg ipsThumb_small ipsPos_left' style='background-image: url("{backgroundimage="\IPS\File::get( 'gallery_Images', $image->small_file_name )->url"}")'>
							<img src='{file="$image->small_file_name" extension="gallery_Images"}' alt="{$image->caption}" class="">
						</span>
					</a>
				</li>
			{{endforeach}}
		</ul>
	{{else}}
		<span class='ipsNoThumb ipsThumb_small ipsPos_left'></span>
	{{endif}}
{{else}}
	<div class='ipsColumns ipsColumns_collapsePhone ipsColumns_noSpacing'>
		<div class='ipsColumn ipsColumn_narrow ipsType_center'>
			<a href='{$url}' title='{lang="view_this_album" sprintf="$itemData['album_name']"}'>
				{{if count( $images )}}
					{{$firstImage = array_shift( $images );}}
					<img src='{file="$firstImage->small_file_name" extension="gallery_Images"}' alt="{$firstImage->caption}" class="ipsImage ipsStream_thumbnail ipsStream_thumbnailSmall">
				{{else}}
					<div class='ipsThumb_small ipsNoThumb'></div>
				{{endif}}
			</a>
		</div>
		<div class='ipsColumn ipsColumn_fluid'>
			<div class='ipsStream_comment ipsPad'>
				{{if $reviewRating !== NULL}}
					{template="rating" app="core" params="'medium', $reviewRating" group="global"}
				{{endif}}
				{{if trim( $indexData['index_content'] ) !== ''}}
					<div class='ipsType_richText ipsType_break ipsType_medium' {{if !( \IPS\Dispatcher::i()->application->directory == 'core' and \IPS\Dispatcher::i()->module and \IPS\Dispatcher::i()->module->key == 'search' )}}data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='3 lines' data-ipsTruncate-watch='false'{{else}}data-searchable data-findTerm{{endif}}>
						{expression="\IPS\Content\Search\Result::preDisplay( $indexData['index_content'] )" raw="true"}
					</div>
				{{endif}}
			</div>
			<ul class='ipsList_inline cGallerySearchAlbumThumbs cGallerySearchExpanded ipsType_noBreak ipsSpacer_top'>
				{{foreach $images as $image }}
					<li>
						<a href='{$image->url()}'>
							<span class='ipsThumb_bg ipsThumb_small ipsPos_left' style='background-image: url("{backgroundimage="\IPS\File::get( 'gallery_Images', $image->small_file_name )->url"}")'>
								<img src='{file="$image->small_file_name" extension="gallery_Images"}' alt="{$image->caption}" class="">
							</span>
						</a>
					</li>
				{{endforeach}}
			</ul>
		</div>
	</div>
{{endif}}]]></template>
 <template template_group="global" template_name="searchResultAlbumSnippet" template_data="$indexData, $itemData, $images, $url, $condensed" template_location="front" template_app="gallery"><![CDATA[{{if $condensed}}
	{{if count( $images )}}
		{{$firstImage = array_shift( $images );}}
		<a href='{$firstImage->url()}'>
			<span class='ipsThumb_bg ipsThumb_small ipsPos_left' style='background-image: url("{backgroundimage="\IPS\File::get( 'gallery_Images', $firstImage->small_file_name )->url"}")'>
				<img src='{file="$firstImage->small_file_name" extension="gallery_Images"}' alt="{$firstImage->caption}" class="">
			</span>
		</a>
		<ul class='ipsList_inline cGallerySearchAlbumThumbs ipsType_noBreak'>
			{{foreach $images as $image }}
				<li>
					<a href='{$image->url()}'>
						<span class='ipsThumb_bg ipsThumb_small ipsPos_left' style='background-image: url("{backgroundimage="\IPS\File::get( 'gallery_Images', $image->small_file_name )->url"}")'>
							<img src='{file="$image->small_file_name" extension="gallery_Images"}' alt="{$image->caption}" class="">
						</span>
					</a>
				</li>
			{{endforeach}}
		</ul>
	{{else}}
		<span class='ipsNoThumb ipsThumb_small ipsPos_left'></span>
	{{endif}}
{{else}}
	<div class='ipsColumns ipsColumns_collapsePhone'>
		<div class='ipsColumn ipsColumn_fluid ipsStream_snippetInfo'>
			{{if trim( $indexData['index_content'] ) !== ''}}
				<div class='ipsType_richText ipsType_break ipsType_medium' {{if !( \IPS\Dispatcher::i()->application->directory == 'core' and \IPS\Dispatcher::i()->module and \IPS\Dispatcher::i()->module->key == 'search' )}}data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='3 lines' data-ipsTruncate-watch='false'{{else}}data-searchable data-findTerm{{endif}}>
					{expression="\IPS\Content\Search\Result::preDisplay( $indexData['index_content'] )" raw="true"}
				</div>
			{{endif}}

			{{if count($images)}}
				<div class='cGalleryAlbums_recent'>
					<ul class='ipsList_reset'>
						{{foreach $images as $k => $image}}
							<li style='background-image: url( "{backgroundimage="\IPS\File::get( 'gallery_Images', $image->small_file_name )->url"}" );' class='cGalleryTrimmedImage'>
								<a href='{$image->url()}'>
									<img src='{file="$image->small_file_name" extension="gallery_Images"}' alt="{$image->caption}">
								</a>
							</li>
						{{endforeach}}
					</ul>
				</div>
			{{endif}}
		</div>
	</div>
{{endif}}]]></template>
 <template template_group="global" template_name="searchResultCommentSnippet" template_data="$indexData, $itemData, $image, $url, $reviewRating, $condensed" template_location="front" template_app="gallery"><![CDATA[{{if $condensed}}
	{{if $image}}
		<span class='ipsThumb_bg ipsThumb_small ipsPos_left' style='background-image: url("{backgroundimage="$image"}")'>
			<img src='{file="$image" extension="gallery_Images"}' alt="{$itemData['image_caption']}" class="">
		</span>
	{{else}}
		<span class='ipsNoThumb ipsThumb_small ipsPos_left'></span>
	{{endif}}
{{else}}
	<div class='ipsColumns ipsColumns_collapsePhone ipsColumns_noSpacing'>
		<div class='ipsColumn ipsColumn_narrow ipsType_center'>
			<a href='{$url}' title='{lang="view_this_image" sprintf="$itemData['image_caption']"}'>
				{{if $image}}
					<img src='{file="$image" extension="gallery_Images"}' alt="{$itemData['image_caption']}" class="ipsImage ipsStream_thumbnail ipsStream_thumbnailSmall">
				{{else}}
					<div class='ipsNoThumb_medium ipsNoThumb'></div>
				{{endif}}
			</a>
		</div>
		<div class='ipsColumn ipsColumn_fluid'>
			<div class='ipsStream_comment ipsPad'>
				{{if $reviewRating !== NULL}}
					{template="rating" app="core" params="'medium', $reviewRating" group="global"}
				{{endif}}
				{{if trim( $indexData['index_content'] ) !== ''}}
					<div class='ipsType_richText ipsType_break ipsType_medium' {{if !( \IPS\Dispatcher::i()->application->directory == 'core' and \IPS\Dispatcher::i()->module and \IPS\Dispatcher::i()->module->key == 'search' )}}data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='3 lines' data-ipsTruncate-watch='false'{{else}}data-searchable data-findTerm{{endif}}>
						{expression="\IPS\Content\Search\Result::preDisplay( $indexData['index_content'] )" raw="true"}
					</div>
				{{endif}}
			</div>
		</div>
	</div>
{{endif}}]]></template>
 <template template_group="global" template_name="searchResultImageSnippet" template_data="$indexData, $itemData, $albumData, $image, $url, $condensed" template_location="front" template_app="gallery"><![CDATA[{{if $condensed}}
	{{if $image}}
		<span class='ipsThumb_bg ipsThumb_small ipsPos_left' style='background-image: url("{backgroundimage="(string) \IPS\File::get( 'gallery_Images', $image )->url"}")'>
			<img src='{file="$image" extension="gallery_Images"}' alt="{$indexData['index_title']}" class="">
		</span>
	{{else}}
		<span class='ipsNoThumb ipsThumb_small ipsPos_left'></span>
	{{endif}}
{{else}}
	<div class='ipsColumns ipsColumns_collapsePhone'>
		<div class='ipsColumn ipsColumn_wide ipsType_center cGalleryStreamPreview'>
			<a href='{$url}' title='{lang="view_this_image" sprintf="$indexData['index_title']"}'>
				{{if $image}}
					<img src='{file="$image" extension="gallery_Images"}' alt="{$indexData['index_title']}" class="ipsImage ipsStream_thumbnail">
				{{else}}
					<div class='ipsNoThumb'></div>
				{{endif}}
			</a>
		</div>
		<div class='ipsColumn ipsColumn_fluid ipsStream_snippetInfo'>
			{{if $albumData}}
				<p class='ipsType_reset ipsType_normal ipsType_light ipsSpacer_bottom ipsSpacer_half'>
					{lang="from_the_album"} <a href='{url="app=gallery&module=gallery&controller=browse&album={$albumData['album_id']}" seoTemplate="gallery_album" seoTitle="$albumData['album_name_seo']"}'>{$albumData['album_name']}</a>
				</p>
			{{endif}}
			{{if trim( $indexData['index_content'] ) !== ''}}
				<div class='ipsType_richText ipsType_break ipsType_medium' {{if !( \IPS\Dispatcher::i()->application->directory == 'core' and \IPS\Dispatcher::i()->module and \IPS\Dispatcher::i()->module->key == 'search' )}}data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='3 lines' data-ipsTruncate-watch='false'{{else}}data-searchable data-findTerm{{endif}}>
					{expression="\IPS\Content\Search\Result::preDisplay( $indexData['index_content'] )" raw="true"}
				</div>
			{{endif}}

			{{if $itemData['image_copyright']}}
				<p class='ipsSpacer_top ipsType_light ipsType_medium ipsType_reset'>
					&copy; {$itemData['image_copyright']}
				</p>
			{{endif}}
		</div>
	</div>
{{endif}}]]></template>
 <template template_group="livesearch" template_name="category" template_data="$category" template_location="admin" template_app="gallery"><![CDATA[<li class='ipsPad_half ipsClearfix' data-role='result'>
	<a href='{url="app=gallery&module=gallery&controller=categories&do=form&id="}{$category->id}' class='ipsPos_left'>{$category->_title}</a>
</li>

]]></template>
 <template template_group="stats" template_name="bandwidthButton" template_data="$member" template_location="admin" template_app="gallery"><![CDATA[
&nbsp;&nbsp;<a href="{url="app=core&module=members&controller=members&do=editBlock&block=IPS\\gallery\\extensions\\core\\MemberACPProfileContentTab\\Gallery&id={$member->member_id}"}" data-ipsDialog data-ipsDialog-title="{lang="bandwidth_use"}">({lang="bandwidth_use"})</a>]]></template>
 <template template_group="stats" template_name="graphs" template_data="$graph" template_location="admin" template_app="gallery"><![CDATA[{$graph|raw}
<div class="ipsPad_half ipsAreaBackground">
	{lang="gallery_graph_disclaimer"}
</div>]]></template>
 <template template_group="stats" template_name="information" template_data="$member, $table" template_location="admin" template_app="gallery"><![CDATA[{$table|raw}
<div class="ipsPad_half ipsType_light ipsType_small">
	{lang="gallery_stats_disclaimer"}
</div>
]]></template>
 <template template_group="stats" template_name="uploadersTable" template_data="$select, $pagination, $members" template_location="admin" template_app="gallery"><![CDATA[
{{if trim( $pagination )}}
	{$pagination|raw}
	<br><br>
{{endif}}

{{if count( $select )}}
	<table class="ipsTable ipsTable_zebra acpBlock">
		<thead>
			<tr>
				<th>{lang="member"}</th>
				<th>{lang="gallery_images"}</th>
			</tr>
		</thead>
		<tbody>
			{{foreach $select as $row}}
				{{if isset( $members[ $row['image_member_id'] ] )}}
					{{$member = \IPS\Member::constructFromData( $members[ $row['image_member_id'] ] );}}
				{{else}}
					{{$member = new \IPS\Member;}}
				{{endif}}
				<tr>
					<td>{template="userPhoto" app="core" group="global" params="$member"} {$member->name}</td>
					<td><a href='{$member->url()->setQueryString( array( 'do' => 'content', 'type' => 'gallery_image' ) )}' target='_blank'>{$row['images']}</a></td>
				</tr>
			{{endforeach}}
		</tbody>
	</table>
	<br>

	{$pagination|raw}
{{else}}
	<p class="ipsPad">{lang="no_results"}</p>
{{endif}}]]></template>
 <template template_group="submit" template_name="categorySelector" template_data="$form" template_location="front" template_app="gallery"><![CDATA[
{{if !\IPS\Request::i()->isAjax()}}
	{template="pageHeader" group="global" app="core" params="\IPS\Member::loggedIn()->language()->addToStack('choose_category')"}
{{else}}
	<div class='ipsPad'>
{{endif}}
	{$form|raw}
{{if \IPS\Request::i()->isAjax()}}
	</div>
{{endif}}]]></template>
 <template template_group="submit" template_name="chooseAlbum" template_data="$category, $createAlbumForm, $canCreateAlbum, $maximumAlbums, $existingAlbumForm" template_location="front" template_app="gallery"><![CDATA[
<div class='cGalleryChooseAlbum_wrap' data-controller='gallery.front.submit.chooseCategory'>
	<div data-role='chooseAlbumType' class='cGalleryChooseAlbum_list'>
		<ul class='ipsList_reset'>
			{{if $category->allow_albums != 2}}
				<li>
					<a href='#' class='cGalleryChooseAlbum_listItem' data-type='category'>
						<h2 class='ipsType_sectionHead'>{lang="use_no_album"}</h2>
						<p class='ipsType_reset ipsType_light ipsTruncate ipsTruncate_line'>{lang="submit_directly_to" sprintf="$category->_title"}</p>
					</a>
					<form action="{url="app=gallery&module=gallery&controller=submit&category={$category->_id}&noAlbum=1" seoTemplate="gallery_submit"}" class='ipsHide'>
						<button type="submit" class="ipsButton ipsButton_primary">{lang="use_no_album"} <i class='fa fa-caret-right'></i></button>	
					</form>
				</li>
			{{endif}}
			<li>
				<a href='#' class='cGalleryChooseAlbum_listItem' data-type='createAlbum' {{if !$canCreateAlbum || !$createAlbumForm}}data-disabled{{endif}}>
					<h2 class='ipsType_sectionHead'>{lang="create_new_album"}</h2>
					<p class='ipsType_reset ipsType_light'>
						{{if $createAlbumForm}}
							{lang="submit_new_album"}
						{{elseif !$canCreateAlbum}}
							{lang="cannot_create_album"}
						{{else}}
							{lang="used_max_albums" sprintf="$maximumAlbums"}
						{{endif}}
					</p>
				</a>
			</li>
			<li>
				<a href='#' class='cGalleryChooseAlbum_listItem' data-type='existingAlbum' {{if !$existingAlbumForm}}data-disabled{{endif}}>
					<h2 class='ipsType_sectionHead'>{lang="choose_existing_album"}</h2>
					<p class='ipsType_reset ipsType_light'>
						{{if $existingAlbumForm}}
							{lang="choose_existing_album_desc"}
						{{else}}
							{lang="no_existing_albums"}
						{{endif}}
					</p>
				</a>
			</li>
		</ul>
	</div>

	{{if $createAlbumForm}}
		<div data-role='createAlbumForm' class='ipsHide'>
			{$createAlbumForm|raw}
		</div>
	{{endif}}
	{{if $existingAlbumForm}}
		<div data-role='existingAlbumForm' class='ipsHide'>
			{$existingAlbumForm|raw}
		</div>
	{{endif}}
</div>]]></template>
 <template template_group="submit" template_name="chooseCategory" template_data="$id, $action, $elements, $hiddenValues, $actionButtons, $uploadField, $class='', $attributes=array(), $sidebar, $form=NULL" template_location="front" template_app="gallery"><![CDATA[<div data-controller='gallery.front.submit.chooseCategory' data-preselected-album="{expression="\IPS\Request::i()->album"}" class='cGallerySubmit_chooseCategory'>
	<form accept-charset='utf-8' class="ipsForm {$class}" action="{$action}" method="post" {{if $uploadField}}enctype="multipart/form-data"{{endif}} {{foreach $attributes as $k => $v}}{$k}="{$v}"{{endforeach}} data-ipsForm data-role='categoryForm'>
		<input type="hidden" name="{$id}_submitted" value="1">
		{{foreach $hiddenValues as $k => $v}}
			{{if is_array($v)}}
				{{foreach $v as $_k => $_v}}
					<input type="hidden" name="{$k}[{$_k}]" value="{$_v}">
				{{endforeach}}
			{{else}}
				<input type="hidden" name="{$k}" value="{$v}">
			{{endif}}
		{{endforeach}}
		<div class='ipsGrid ipsGrid_collapsePhone ipsPad cGallerySubmit_albumChoice ipsSpacer_top ipsSpacer_double'>
			<div class='ipsGrid_span12'>
				{$elements['']['image_category']->html()|raw}
			</div>
		</div>
		<div class="ipsAreaBackground_light ipsClearfix ipsPad ipsType_center ipsJS_hide" data-role="continueCategory">
			{{foreach $actionButtons as $button}}
				{$button|raw}
			{{endforeach}}
		</div>
	</form>
</div>]]></template>
 <template template_group="submit" template_name="container" template_data="$container" template_location="front" template_app="gallery"><![CDATA[<div class='ipsType_medium'>
	{{if $container['album']}}
		{lang="gallery_submit_prefix_album" sprintf="$container['album']->_title"}
	{{else}}
		{lang="gallery_submit_prefix_cat" sprintf="$container['category']->_title"}
	{{endif}}
</div>]]></template>
 <template template_group="submit" template_name="createAlbum" template_data="$id, $action, $elements, $hiddenValues, $actionButtons, $uploadField, $class='', $attributes=array(), $sidebar, $form=NULL" template_location="front" template_app="gallery"><![CDATA[<form accept-charset='utf-8' class="ipsForm {$class}" action="{$action}" method="post" {{if $uploadField}}enctype="multipart/form-data"{{endif}} {{foreach $attributes as $k => $v}}{$k}="{$v}"{{endforeach}} data-ipsForm>
	<input type="hidden" name="{$id}_submitted" value="1">
	{{foreach $hiddenValues as $k => $v}}
		{{if is_array($v)}}
			{{foreach $v as $_k => $_v}}
				<input type="hidden" name="{$k}[{$_k}]" value="{$_v}">
			{{endforeach}}
		{{else}}
			<input type="hidden" name="{$k}" value="{$v}">
		{{endif}}
	{{endforeach}}
	{{if $uploadField}}
		<input type="hidden" name="MAX_FILE_SIZE" value="{$uploadField}">
		<input type="hidden" name="plupload" value="{expression="md5( mt_rand() )"}">
	{{endif}}
	<ul class='ipsList_reset cGalleryDialog_formPanel'>
		{{foreach $elements as $collection}}
			{{foreach $collection as $inputName => $input}}
				{{if in_array( $inputName, array( 'album_name', 'album_description' ) )}}
					{{if is_object( $input ) }}
						{$input->rowHtml($form)|raw}
					{{else}}
						{$input|raw}
					{{endif}}
				{{endif}}
			{{endforeach}}
		{{endforeach}}
		<li class='ipsFieldRow' id='elAlbumExtrasRow'>
			<ul class='ipsList_inline ipsSpacer_top ipsType_medium'>
				{{if isset( $elements['']['set_album_owner'] ) && count( $elements['']['set_album_owner']->options['options'] ) > 1}}
					<li>
						<a href='#elAlbumCreate_owner_menu' id='elAlbumCreate_owner' data-ipsMenu data-ipsMenu-appendTo='#elAlbumExtrasRow' data-ipsMenu-closeOnClick='false'>{lang="album_create_owner"} <i class='fa fa-caret-down'></i></a>
					</li>
				{{endif}}
				{{if ( isset( $elements['']['album_type'] ) && count( $elements['']['album_type']->options['options'] ) > 1 ) OR ( isset( $elements['']['album_submit_type'] ) && count( $elements['']['album_submit_type']->options['options'] ) > 1 )}}
					<li>
						<a href='#elAlbumCreate_privacy_menu' id='elAlbumCreate_privacy' data-ipsMenu data-ipsMenu-appendTo='#elAlbumExtrasRow' data-ipsMenu-closeOnClick='false'>{lang="album_create_privacy"} <i class='fa fa-caret-down'></i></a>
					</li>
				{{endif}}
				{{if isset( $elements['']['album_sort_options'] ) || isset( $elements['']['album_allow_comments'] ) || isset( $elements['']['album_allow_reviews'] ) || isset( $elements['']['album_use_comments'] ) || isset( $elements['']['album_use_reviews'] )}}
					<li><a href='#elAlbumCreate_features_menu' id='elAlbumCreate_features' data-ipsMenu data-ipsMenu-appendTo='#elAlbumExtrasRow' data-ipsMenu-closeOnClick='false'>{lang="album_create_features"} <i class='fa fa-caret-down'></i></a></li>
				{{endif}}
			</ul>
		</li>
	</ul>
	<div class='ipsType_right cGalleryDialog_submitBar ipsPad ipsAreaBackground_dark'>
		<button type='submit' class='ipsButton ipsButton_medium ipsButton_light'>{lang="create_album"}</button>
	</div>
	<div id='elAlbumCreate_features_menu' class='ipsMenu ipsMenu_wide ipsHide'>
		<div class='ipsPad'>
			<ul class='ipsForm ipsForm_horizontal'>
				{{foreach array( 'album_sort_options', 'album_allow_comments', 'album_allow_reviews', 'album_use_comments', 'album_use_reviews' ) as $inputName}}
					{{if isset( $elements[''][ $inputName ] )}}
						{{if is_object( $elements[''][ $inputName ] ) }}
							{$elements[''][ $inputName ]->rowHtml($form)|raw}
						{{else}}
							{$elements[''][ $inputName ]|raw}
						{{endif}}
					{{endif}}
				{{endforeach}}
			</ul>
		</div>
	</div>
	<div id='elAlbumCreate_privacy_menu' class='ipsMenu ipsMenu_wide ipsHide'>
		<div class='ipsPad'>
			<ul class='ipsForm ipsForm_vertical'>
				{{foreach array( 'album_type', 'album_allowed_access', 'album_submit_type', 'album_submit_access_members', 'album_submit_access_groups' ) as $inputName}}
					{{if isset( $elements[''][ $inputName ] )}}
						{{if is_object( $elements[''][ $inputName ] ) }}
							{$elements[''][ $inputName ]->rowHtml($form)|raw}
						{{else}}
							{$elements[''][ $inputName ]|raw}
						{{endif}}
					{{endif}}
				{{endforeach}}
			</ul>
		</div>
	</div>
	<div id='elAlbumCreate_owner_menu' class='ipsMenu ipsMenu_wide ipsHide'>
		<div class='ipsPad'>
			<ul class='ipsForm ipsForm_vertical'>
				{{foreach array( 'set_album_owner', 'album_owner' ) as $inputName}}
					{{if isset( $elements[''][ $inputName ] )}}
						{$elements[''][ $inputName ]->rowHtml()|raw}
					{{endif}}
				{{endforeach}}
			</ul>
		</div>
	</div>
</form>]]></template>
 <template template_group="submit" template_name="existingAlbumForm" template_data="$category, $id, $action, $elements, $hiddenValues, $actionButtons, $uploadField, $class='', $attributes=array(), $sidebar, $form=NULL" template_location="front" template_app="gallery"><![CDATA[
{{$existingAlbums = \IPS\gallery\Album::loadForSubmit( $category );}}

<form accept-charset='utf-8' class="ipsForm {$class}" action="{$action}" method="post" {{if $uploadField}}enctype="multipart/form-data"{{endif}} {{foreach $attributes as $k => $v}}{$k}="{$v}"{{endforeach}} data-ipsForm data-ipsFormSubmit data-controller='gallery.front.submit.existingAlbums'>
	<input type="hidden" name="{$id}_submitted" value="1">
	{{foreach $hiddenValues as $k => $v}}
		{{if is_array($v)}}
			{{foreach $v as $_k => $_v}}
				<input type="hidden" name="{$k}[{$_k}]" value="{$_v}">
			{{endforeach}}
		{{else}}
			<input type="hidden" name="{$k}" value="{$v}">
		{{endif}}
	{{endforeach}}
	<ul id='elGallerySubmit_albumChooser' class='ipsScrollbar cGalleryDialog_formPanel ipsList_reset ipsSpacer_bottom'>
		{{foreach $elements['']['existing_album']->options['options'] as $optionID => $option}}
			{{$album = $existingAlbums[ $optionID ];}}
			<li>
				<input type='radio' name='existing_album' value='{$optionID}' class='ipsJS_hide' {{if $optionID == $elements['']['existing_album']->value}}checked{{endif}}>
				<div class='ipsAreaBackground_light ipsPad_half ipsClearfix {{if $elements['']['existing_album']->value == $optionID}}cAlbumSelected{{endif}}'>
					<div style='background-image: url( {backgroundimage="$album->coverPhoto('small')"} );' class='cGallerySubmit_albumImage cGalleryTrimmedImage {{if \IPS\Member::loggedIn()->group['g_img_album_limit'] && $album->count_imgs >= \IPS\Member::loggedIn()->group['g_img_album_limit']}}ipsFaded{{endif}}'>
						<img src='{$album->coverPhoto( 'small' )}' alt="{$album->_title}">
					</div>
					<div class='cGallerySubmit_albumInfo'>
						<p class='ipsType_reset ipsType_normal ipsContained_container'><strong class="ipsContained ipsType_break">{$album->_title}</strong></p>
						<ul class='ipsList_inline ipsType_medium ipsType_light'>
							<li><i class='fa fa-camera'></i> {lang="num_images" pluralize="$album->count_imgs"}</li>
							{{if \IPS\Member::loggedIn()->group['g_img_album_limit']}}
								<li>
									{{if $album->count_imgs >= \IPS\Member::loggedIn()->group['g_img_album_limit']}}
										{lang="album_full_desc"}
									{{else}}
										{lang="x_more_images_album" pluralize="( \IPS\Member::loggedIn()->group['g_img_album_limit'] - $album->count_imgs )"}
									{{endif}}
								</li>
							{{endif}}
						</ul>
					</div>
				</div>
			</li>
		{{endforeach}}
	</ul>
	<div class='ipsType_right cGalleryDialog_submitBar ipsPad ipsAreaBackground_dark'>
		<button type='submit' class='ipsButton ipsButton_medium ipsButton_light'>{lang="choose_selected_album"}</button>
	</div>
</form>
]]></template>
 <template template_group="submit" template_name="processing" template_data="$redirector" template_location="front" template_app="gallery"><![CDATA[
<div class='ipsPad ipsPad_double'>
	<p class='ipsType_large ipsType_center ipsSpacer_bottom'>{lang="saving_images_desc"}</p>

	{$redirector|raw}
</div>]]></template>
 <template template_group="submit" template_name="uploadImages" template_data="$form, $category" template_location="front" template_app="gallery"><![CDATA[
<form accept-charset='utf-8' method="post" action="{$form->action}" id='elGallerySubmit' enctype="multipart/form-data">
	<div class='cGallerySubmit_uploadImages' data-controller='gallery.front.submit.uploadImages'>
	{{if $form->error}}
		<div class="ipsMessage ipsMessage_error ipsSpacer_bottom">
			{$form->error}
		</div>
	{{endif}}
		<div class='cGallerySubmit_uploadForm'>
			<input type="hidden" name="{$form->id}_submitted" value="1">
			{{foreach $form->hiddenValues as $k => $v}}
				<input type="hidden" name="{$k}" value="{$v}">
			{{endforeach}}

			<div class='ipsHide'>
				{$form->elements['']['credit_all']->html()|raw}
				{$form->elements['']['copyright_all']->html()|raw}
				{$form->elements['']['tags_all']->html()|raw}
				{$form->elements['']['prefix_all']->html()|raw}
				{$form->elements['']['images_order']->html()|raw}
				{$form->elements['']['images_info']->html()|raw}
				{$form->elements['']['images_autofollow_all']->html()|raw}
			</div>

			<div id='elGallerySubmit_imageUploader' class='ipsClear'>
				{$form->elements['']['images']->html( $form )|raw}
				{{if $form->elements['']['images']->error}}
					<br>
					<span class="ipsType_warning">{lang="$form->elements['']['images']->error"}</span>
				{{endif}}
			</div>
		</div>
	</div>
</form>]]></template>
 <template template_group="submit" template_name="wrapper" template_data="$container, $images, $club, $moderated, $allImagesForm" template_location="front" template_app="gallery"><![CDATA[
{{if $club AND is_array( $container ) AND !\IPS\Request::i()->isAjax()}}
	{template="header" group="clubs" app="core" params="$club, $container['category']"}
{{endif}}

{{if $moderated}}
	{template="modQueueMessage" group="forms" app="core" params="\IPS\Member::loggedIn()->warnings( 5, NULL, 'mq' ), \IPS\Member::loggedIn()->mod_posts"}
{{endif}}

<div data-controller='gallery.front.submit.wrapper' data-role="submitWrapper" class='{{if !\IPS\Request::i()->isAjax()}}ipsBox_alt{{endif}}'>
	<a href='#' data-action='closeDialog' class='cGalleryDialog_close'>&times;</a>
	<div class='cGalleryDialog'>
		<div class='cGalleryDialog_inner'>
			<div class='cGalleryDialog_titleAndUpload'>
				<div class='ipsPad'>
					<h1 class='ipsDialog_title'>
						<span data-role='dialogTitle'>{lang="add_gallery_image"}</span>
						<div class='ipsType_medium' data-role="containerInfo">
							{{if is_array( $container )}}
								{template="container" group="submit" app="gallery" params="$container"}
							{{endif}}
						</div>
					</h1>
				</div>
				<div class='cGalleryDialog_content'>
					<div class='cGalleryDialog_container {{if is_array( $container )}}ipsHide{{endif}}' data-role="container">
						{{if !is_array( $container )}}
							{$container|raw}
						{{endif}}
					</div>

					<div class='cGalleryDialog_imageForm ipsPad {{if is_string( $container )}} ipsHide{{endif}}{{if \IPS\gallery\Image::moderateNewItems( \IPS\Member::loggedIn() )}} cGalleryDialog_content_moderated{{endif}}' data-role="images">
						<div id='elGallerySubmit_toolBar'>
							<a href='#' id='elFileTypes' class='ipsPos_right ipsSpacer_top ipsSpacer_half ipsResponsive_hidePhone ipsType_light ipsType_small' data-ipsMenu>
								<i class='fa fa-info-circle'></i> {lang="allowed_file_types_link"} <i class='fa fa-caret-down'></i>
							</a>
							<div id='elFileTypes_menu' class='ipsMenu ipsMenu_auto ipsPad ipsHide'>
								<h3 class='ipsType_sectionHead'>{lang="attach_allowed_types"}</h3>
								<div class='ipsSpacer_top ipsSpacer_half ipsResponsive_hidePhone ipsType_light ipsType_small' data-role="allowedTypes"></div>
							</div>

							<ul class='ipsList_inline ipsClearfix'>
								<li>
									<a href='#' class='ipsButton ipsButton_light ipsButton_verySmall ipsTruncate ipsTruncate_line' id='elCopyrightMenu' data-ipsMenu data-ipsMenu-appendTo='#elGallerySubmit_toolBar' data-ipsMenu-closeOnClick='false'>{lang="set_copyright_all"} <i class='fa fa-caret-down'></i></a>
								</li>
								<li>
									<a href='#' class='ipsButton ipsButton_light ipsButton_verySmall ipsTruncate ipsTruncate_line' id='elCreditMenu' data-ipsMenu data-ipsMenu-appendTo='#elGallerySubmit_toolBar' data-ipsMenu-closeOnClick='false'>{lang="set_credit_all"} <i class='fa fa-caret-down'></i></a>
								</li>
								<li class='{{if !isset( $allImagesForm->elements['']['image_tags'] )}}ipsHide{{endif}} cGalleryTagsButton'>
									<a href='#' class='ipsButton ipsButton_light ipsButton_verySmall ipsTruncate ipsTruncate_line' id='elTagsMenu' data-ipsMenu data-ipsMenu-appendTo='#elGallerySubmit_toolBar' data-ipsMenu-closeOnClick='false'>{lang="set_tags_all"} <i class='fa fa-caret-down'></i></a>
								</li>
								<li>
									<a href='#' class='ipsButton ipsButton_light ipsButton_verySmall ipsTruncate ipsTruncate_line' id='elNotifyOption' data-ipsMenu data-ipsMenu-appendTo='#elGallerySubmit_toolBar' data-ipsMenu-closeOnClick='false'>{lang="gal_notification_options"} <i class='fa fa-caret-down'></i></a>
								</li>
							</ul>
							<hr class='ipsHr'>
						</div>
						<div data-role='imageForm' class='ipsPad'>
							{{if is_array( $container )}}
								{$images|raw}
							{{endif}}
						</div>
					</div>
				</div>
			</div>
			<div class='cGallerySubmit_imageDetails ipsAreaBackground_light ipsPad' data-role="imageDetails">
				<form id='form_imageDetails' accept-charset='utf-8' method="post" action="{$allImagesForm->action}" enctype="multipart/form-data">
					<div class='ipsType_center ipsType_light ipsType_large ipsFaded ipsSpacer_top ipsSpacer_double' data-role='submitHelp'>
						<i class='fa fa-photo ipsType_huge ipsType_light'></i>
						<br><br> {lang="submit_help_info"}
					</div>
				</form>
			</div>
		</div>
		<div class='cGallerySubmit_bottomBar ipsAreaBackground_dark ipsPad ipsClearfix ipsType_right {{if !is_array( $container )}}ipsHide{{endif}}'>
			<span data-role='imageErrors' class='ipsHide ipsType_negative'><i class='fa fa-warning'></i> {lang="files_had_errors"}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
			<button type='submit' class='ipsButton ipsButton_medium ipsButton_veryLight' data-role='submitForm' form="elGallerySubmit" disabled>{lang="submit_all_images"}</button>
		</div>
	</div>

	<div class='ipsMenu ipsMenu_wide ipsPad ipsHide' id='elCopyrightMenu_menu'>
		<h3 class='ipsType_sectionHead ipsSpacer_bottom ipsSpacer_half'>{lang="copyright"}</h3>
		<p class='ipsType_reset ipsSpacer_bottom ipsType_neutral'>{lang="set_copyright_desc"}</p>
		{$allImagesForm->elements['']['image_copyright']->html()|raw}
		<button class='ipsButton ipsButton_light ipsButton_small ipsButton_fullWidth ipsSpacer_top' data-role='saveInfo'>{lang="save"}</button>
	</div>

	<div class='ipsMenu ipsMenu_wide ipsPad ipsHide' id='elCreditMenu_menu'>
		<h3 class='ipsType_sectionHead ipsSpacer_bottom ipsSpacer_half'>{lang="credit"}</h3>
		<p class='ipsType_reset ipsSpacer_bottom ipsType_neutral'>{lang="credit_desc"}</p>
		{$allImagesForm->elements['']['image_credit_info']->html()|raw}
		<button class='ipsButton ipsButton_light ipsButton_small ipsButton_fullWidth ipsSpacer_top' data-role='saveInfo'>{lang="save"}</button>
	</div>

	<div class='ipsMenu ipsMenu_wide ipsPad ipsHide' id='elTagsMenu_menu'>
		<h3 class='ipsType_sectionHead ipsSpacer_bottom ipsSpacer_half'>{lang="tags"}</h3>
		<p class='ipsType_reset ipsSpacer_bottom ipsType_neutral'>{lang="tags_all_desc"}</p>
		<div data-role="globalTagsField">{{if isset( $allImagesForm->elements['']['image_tags'] )}}{$allImagesForm->elements['']['image_tags']->html()|raw}{{endif}}</div>
		<button class='ipsButton ipsButton_light ipsButton_small ipsButton_fullWidth ipsSpacer_top' data-role='saveInfo'>{lang="save"}</button>
	</div>

	<div class='ipsMenu ipsMenu_auto ipsPad ipsHide' id='elNotifyOption_menu'>
		{$allImagesForm->elements['']['image_auto_follow']->html()|raw} <label for='check_image_auto_follow'>{lang="new_image_comments_notification"}</label>
		<button class='ipsButton ipsButton_light ipsButton_small ipsButton_fullWidth ipsSpacer_top' data-role='saveInfo'>{lang="save"}</button>
	</div>

	<div data-role="defaultImageDetailsForm" class='ipsHide'>
		<div class='cGallerySubmit_details'>
			<div class='cGallerySubmit_preview ipsBox ipsSpacer_bottom'></div>
			<ul class='ipsForm ipsForm_vertical'>
				<li class='ipsFieldRow ipsClearfix'>
					<label class='ipsFieldRow_label' for='image_details_DEFAULT'>{lang="image_title"}</label>
					<div class='ipsFieldRow_content'>
						{$allImagesForm->elements['']['image_title_DEFAULT']->html()|raw}
						<p class='ipsType_reset ipsType_warning ipsHide' data-errorField='image_title'></p>
					</div>
				</li>
				<li class='ipsFieldRow ipsClearfix'>
					<label class='ipsFieldRow_label' for='image_description_DEFAULT'>{lang="image_description"}</label>
					<div class='ipsFieldRow_content'>
						<div data-role="imageDescriptionEditor" class='ipsHide'>
							{$allImagesForm->elements['']['image_description_DEFAULT']->html()|raw}
							<div class='ipsType_right ipsType_small'><a href='#' data-role="imageDescriptionUseTextarea">{lang="use_plain_editor"}</a></div>
							<p class='ipsType_reset ipsType_warning ipsHide' data-errorField='image_description'></p>
						</div>
						<div data-role="imageDescriptionTextarea">
							{$allImagesForm->elements['']['image_textarea_DEFAULT']->html()|raw}
							<div class='ipsType_right ipsType_small'><a href='#' data-role="imageDescriptionUseEditor">{lang="use_rte_editor"}</a></div>
							<p class='ipsType_reset ipsType_warning ipsHide' data-errorField='image_textarea'></p>
						</div>
					</div>
				</li>

				<li class='ipsFieldRow ipsClearfix cGalleryTagsField {{if !isset( $allImagesForm->elements['']['image_tags_DEFAULT'] )}}ipsHide{{endif}}'>
					<a href='#' data-role='addCopyrightCredit'><i class='fa fa-plus'></i> {lang="specify_image_tags"}</a>
					<div class='ipsHide'>
						<label class='ipsFieldRow_label' for='image_tags_default'>{lang="image_tags"}</label>
						<div class='ipsFieldRow_content'>
							{{if isset( $allImagesForm->elements['']['image_tags_DEFAULT'] )}}{expression="preg_replace( '/data-ipsAutocomplete(?!\-)/', '', $allImagesForm->elements['']['image_tags_DEFAULT']->html() )" raw="true"}{{endif}}
							<p class='ipsType_reset ipsType_warning ipsHide' data-errorField='image_tags'></p>
						</div>
					</div>
				</li>

				<li class='ipsFieldRow ipsClearfix'>
					<a href='#' data-role='addCopyrightCredit'><i class='fa fa-plus'></i> {lang="add_credit"}</a>
					<div class='ipsHide'>
						<label class='ipsFieldRow_label' for='image_credit_DEFAULT'>{lang="image_credit_info"}</label>
						<div class='ipsFieldRow_content'>
							{$allImagesForm->elements['']['image_credit_info_DEFAULT']->html()|raw}
							<p class='ipsType_reset ipsType_warning ipsHide' data-errorField='image_credit'></p>
						</div>
					</div>
				</li>
				<li class='ipsFieldRow ipsClearfix'>
					<a href='#' data-role='addCopyrightCredit'><i class='fa fa-plus'></i> {lang="add_copyright"}</a>
					<div class='ipsHide'>
						<label class='ipsFieldRow_label' for='image_copyright_DEFAULT'>{lang="image_copyright"}</label>
						<div class='ipsFieldRow_content'>
							{$allImagesForm->elements['']['image_copyright_DEFAULT']->html()|raw}
							<p class='ipsType_reset ipsType_warning ipsHide' data-errorField='image_copyright'></p>
						</div>
					</div>
				</li>
				<li class='ipsFieldRow ipsClearfix ipsHide cGalleryMapField'>
					<label class='ipsFieldRow_label' for='image_gps_show_DEFAULT'>{lang="image_gps_show"}</label>
					<div class='ipsFieldRow_content'>
						{$allImagesForm->elements['']['image_gps_show_DEFAULT']->html()|raw}
						<span class='ipsFieldRow_desc'>{lang="image_gps_show_desc"}</span>
						<p class='ipsType_reset ipsType_warning ipsHide' data-errorField='image_gps_show'></p>
					</div>
				</li>
				<li class='ipsFieldRow ipsClearfix ipsHide cGalleryThumbField'>
					<label class='ipsFieldRow_label' for='image_thumbnail_DEFAULT'>{lang="image_thumbnail"}</label>
					<div class='ipsFieldRow_content'>
						{$allImagesForm->elements['']['image_thumbnail_DEFAULT']->html()|raw}
						<p class='ipsType_reset ipsType_warning ipsHide' data-errorField='image_thumbnail'></p>
					</div>
				</li>
				{{foreach $allImagesForm->elements[''] as $k => $v}}
					{{if !in_array( $k, array( 'image_title_DEFAULT', 'image_tags_DEFAULT', 'image_gps_show_DEFAULT', 'image_thumbnail_DEFAULT', 'image_textarea_DEFAULT', 'image_description_DEFAULT', 'image_credit_info_DEFAULT', 'image_copyright_DEFAULT', 'image_auto_follow_DEFAULT', 'image_credit_info', 'image_copyright', 'image_auto_follow', 'image_tags' ) )}}
						<li class='ipsFieldRow ipsClearfix'>
							{{$langString = str_replace( '_DEFAULT', '', $k );}}
							<label class='ipsFieldRow_label' for='{$k}'>{lang="$langString"}</label>
							<div class='ipsFieldRow_content'>
								{$v->html()|raw}
							</div>
						</li>
					{{endif}}
				{{endforeach}}
				<li class='ipsFieldRow ipsClearfix'>
					<button type='button' class='ipsButton ipsButton_light ipsButton_fullWidth ipsButton_medium' data-role='saveDetails'>{lang="submit_go_back"}</button>
					<p class='ipsType_light ipsType_medium ipsType_right ipsSpacer_top ipsSpacer_half ipsHide' data-role='savedMessage'>
						<i class='fa fa-check'></i> {lang="image_info_saved"}
					</p>
				</li>
			</ul>
		</div>
	</div>
	<div data-role="editedImageDetailsForm" class='ipsHide'></div>
</div>]]></template>
 <template template_group="view" template_name="comments" template_data="$image" template_location="front" template_app="gallery"><![CDATA[<div data-controller='core.front.core.commentFeed, core.front.core.ignoredComments' {{if settings.auto_polling_enabled}}data-autoPoll{{endif}} data-baseURL='{$image->url()}' {{if $image->isLastPage()}}data-lastPage{{endif}} data-feedID='image-{$image->id}' id='comments'>
	{{if $image->commentPageCount() > 1}}
		{$image->commentPagination( array('tab') )|raw}
		<br><br>
	{{endif}}

	{template="featuredComments" group="global" app="gallery" params="$image->featuredComments(), $image->url()->setQueryString('tab', 'comments')->setQueryString('recommended', 'comments')"}
	{template="commentMultimodHeader" app="core" group="global" params="$image, '#comments'"}

	<div data-role='commentFeed' data-controller='core.front.core.moderation'>
		{{if count( $image->comments( NULL, NULL, 'date', 'asc', NULL, NULL, NULL, NULL, FALSE, isset( \IPS\Request::i()->showDeleted ) ) )}}
			<form action="{$image->url()->csrf()->setQueryString( 'do', 'multimodComment' )}" method="post" data-ipsPageAction data-role='moderationTools'>
				{{$commentCount=0; $timeLastRead = $image->timeLastRead(); $lined = FALSE;}}
				{{foreach $image->comments( NULL, NULL, 'date', 'asc', NULL, NULL, NULL, NULL, FALSE, isset( \IPS\Request::i()->showDeleted ) ) as $comment}}
					{{if !$lined and $timeLastRead and $timeLastRead->getTimestamp() < $comment->mapped('date')}}
						{{if $lined = TRUE and $commentCount}}
							<hr class="ipsCommentUnreadSeperator">
						{{endif}}
					{{endif}}
					{{$commentCount++;}}
					{$comment->html()|raw}
				{{endforeach}}
				{template="commentMultimod" app="core" group="global" params="$image"}
			</form>
		{{else}}
			<p class='ipsType_normal ipsType_light ipsType_reset ipsPad' data-role='noComments'>{lang="no_comments"}</p>
		{{endif}}
	</div>			
	{{if $image->commentPageCount() > 1}}
		<hr class='ipsHr'>
		{$image->commentPagination( array('tab') )|raw}
	{{endif}}

	{{if $image->commentForm() || $image->locked() || \IPS\Member::loggedIn()->restrict_post || \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings'] || !\IPS\Member::loggedIn()->checkPostsPerDay()}}
	<a id='replyForm'></a>
	<div data-role='replyArea' class='ipsAreaBackground ipsPad ipsPad_half {{if !$image->canComment()}}cTopicPostArea_noSize{{endif}} ipsSpacer_top'>
		{{if $image->commentForm()}}
			{{if $image->locked()}}
				<p class='ipsType_reset ipsType_warning ipsComposeArea_warning ipsSpacer_bottom ipsSpacer_half'><i class='fa fa-info-circle'></i> {lang="image_locked_can_comment"}</p>
			{{endif}}
				{$image->commentForm()|raw}
			{{else}}
			{{if $image->locked()}}
				{template="commentUnavailable" group="forms" location="front" app="gallery" params="'image_locked_cannot_comment'"}
			{{elseif \IPS\Member::loggedIn()->restrict_post}}
				{template="commentUnavailable" group="forms" location="front" app="gallery" params="'restricted_cannot_comment', \IPS\Member::loggedIn()->warnings(5,NULL,'rpa'), \IPS\Member::loggedIn()->restrict_post"}
			{{elseif \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings']}}
				{template="commentUnavailable" group="forms" location="front" app="gallery" params="'unacknowledged_warning_cannot_post', \IPS\Member::loggedIn()->warnings( 1, FALSE )"}
			{{elseif !\IPS\Member::loggedIn()->checkPostsPerDay()}}
				{template="commentUnavailable" group="forms" location="front" app="gallery" params="'member_exceeded_posts_per_day'"}
			{{endif}}
		{{endif}}
	</div>
	{{endif}}
</div>
]]></template>
 <template template_group="view" template_name="image" template_data="$image, $commentsAndReviews=FALSE" template_location="front" template_app="gallery"><![CDATA[
{{if $club = $image->container()->club()}}
	{{if settings.clubs and settings.clubs_header == 'full'}}
		{template="header" app="core" group="clubs" params="$club, $image->container()"}
	{{endif}}
	<div id='elClubContainer'>
{{endif}}

<div data-controller='gallery.front.view.image,gallery.front.browse.imageLightbox' data-launchLightbox data-lightboxURL='{$image->url()}'>
	<div class='cGalleryLightbox_inner ipsSpacer_bottom' data-role="imageSizer">
		<div class='elGalleryHeader'>
			{template="imageFrame" group="view" app="gallery" params="$image"}
		</div>
	</div>

	<section data-role='imageInfo'>
		{template="imageInfo" group="view" params="$image"}
	</section>

	<div data-role='imageComments'>
	{{if $commentsAndReviews}}
		<br>
		{{if ( $image->directContainer()->allow_reviews && $image->container()->allow_reviews ) && ( $image->directContainer()->allow_comments && $image->container()->allow_comments ) }}
			<a id="replies"></a>
			<h2 class='ipsHide'>{lang="user_feedback"}</h2>
		{{endif}}
		{$commentsAndReviews|raw}
	{{endif}}
	</div>

</div> 

{{if $image->container()->club()}}
	</div>
{{endif}}]]></template>
 <template template_group="view" template_name="imageFrame" template_data="$image" template_location="front" template_app="gallery"><![CDATA[
<div id='elGalleryImage' class='elGalleryImage' data-role="imageFrame" {{if $image->data}}data-imageSizes='{$image->data}'{{endif}}>
	{{if $image->media }}
		<div class='cGallery_videoContainer'>
			<video data-controller="core.global.core.embeddedvideo" id="elGalleryVideo" data-role="video" class="ipsPos_center" controls preload="auto" width="100%" height="100%"{{if $image->masked_file_name }} poster="{file="$image->masked_file_name" extension="gallery_Images"}"{{endif}}>
				<source src="{file="$image->original_file_name" extension="gallery_Images"}" type='{$image->file_type}' />
				<embed wmode="opaque" autoplay="true" showcontrols="true" showstatusbar="true" showtracker="true" src="{file="$image->original_file_name" extension="gallery_Images"}" width="480" height="360" type='{$image->file_type}' />
			</video>
		</div>
	{{else}}
		<div class='cGalleryViewImage' data-role='notesWrapper' data-controller='gallery.front.view.notes' data-imageID='{$image->id}' {{if $image->canEdit()}}data-editable{{endif}} data-notesData='{$image->_notes_json}'>
			
			<div>
				<img src='{file="$image->masked_file_name" extension="gallery_Images"}' alt="{$image->caption}" title='{$image->caption}' data-role='theImage' class='ipsHide'>
			</div>
			<noscript>
				<img src='{file="$image->masked_file_name" extension="gallery_Images"}' alt="{$image->caption}" title='{$image->caption}' data-role='theImage'>
			</noscript>
			{{if count( $image->_notes )}}
				<noscript>
					{{foreach $image->_notes as $note}}
						<div class='cGalleryNote' style='left: {$note['LEFT']}%; top: {$note['TOP']}%; width: {$note['WIDTH']}%; height: {$note['HEIGHT']}%'>
							<div class='cGalleryNote_border'></div>
							<div class='cGalleryNote_note'><div>{$note['NOTE']}</div></div>
						</div>
					{{endforeach}}
				</noscript>
			{{endif}}
		</div>
		
		<div class='cGalleryImageFade'>
			{{if !$image->media }}
				<div class='cGalleryImageTopBar'>
					<div class='cGalleryImageTitle'>&nbsp;</div>
					<ul class='cGalleryControls ipsList_inline ipsResponsive_hidePhone'>
						<li>
							<a href='{$image->url()}' title='{lang="view_in_lightbox"}' class='ipsButton ipsButton_narrow ipsButton_link ipsButton_verySmall ipsButton_veryLight' data-ipsTooltip data-imageLightbox><i class='fa fa-expand'></i></a>
						</li>
						<li>
							<a href='{file="$image->masked_file_name" extension="gallery_Images"}' title='{lang="view_fullsize_image"}' class='ipsButton ipsButton_narrow ipsButton_link ipsButton_verySmall ipsButton_veryLight' data-ipsTooltip target='_blank'><i class='fa fa-external-link'></i></a>
						</li>
					</ul>
				</div>
			{{endif}}
			<div class='cGalleryImageBottomBar'>
				<div class='cGalleryCreditInfo ipsType_normal'>
					{{if $image->copyright}}
						<div>
							&copy; {$image->copyright}
						</div>
					{{endif}}

					{{if $image->credit_info}}
						<div>
							<strong>{lang="image_credit_info"}</strong> {$image->credit_info}
						</div>
					{{endif}}
				</div>
				<a href='#' data-ipsMenu data-ipsMenu-above='true' id='elImageTools' class='ipsButton ipsButton_link ipsButton_verySmall ipsJS_show cGalleryViewImage_controls'>{lang="image_tools"} <i class='fa fa-caret-down'></i></a>
				<ul class='ipsMenu ipsMenu_auto ipsHide' id='elImageTools_menu'>
					{{if $image->canEdit()}}
						<li class='ipsMenu_item'><a href='#' title='{lang="add_image_note"}' data-action='addNote'>
							<i class='fa fa-fw fa-pencil-square-o'></i> {lang="add_image_note"}</a>
						</li>
						<li class='ipsMenu_item ipsMenu_subItems'>
							<a href='#' title='{lang="rotate_image"}' id='elImage_rotate' data-ipsMenu data-ipsMenu-appendTo='#elGalleryImage'>
								<i class='fa fa-fw fa-rotate-right'></i> {lang="rotate_image"}
							</a>
							<ul class='ipsMenu ipsMenu_auto ipsHide' id='elImage_rotate_menu'>
								<li class='ipsMenu_item'>
									<a href='{$image->url( 'rotate' )->csrf()->setQueryString( 'direction', 'right' )}' title='{lang="rotate_right"}'>
										<i class='fa fa-fw fa-rotate-right'></i> &nbsp;{lang="rotate_right"}
									</a>
								</li>
								<li class='ipsMenu_item'>
									<a href='{$image->url( 'rotate' )->csrf()->setQueryString( 'direction', 'left' )}' title="{lang="rotate_left"}">
										<i class='fa fa-fw fa-rotate-left'></i> &nbsp;{lang="rotate_left"}
									</a>
								</li>
							</ul>
						</li>
					{{endif}}
					{{if \IPS\Member::loggedIn()->member_id}}
						<li class='ipsMenu_item{{if $image->canSetAsAlbumCover() OR $image->canSetAsCategoryCover()}} ipsMenu_subItems{{endif}}'>
							{{if $image->canSetAsAlbumCover() OR $image->canSetAsCategoryCover()}}
								<a href='#' title='{lang="set_image_as"}' id='elImageSetAs' data-ipsMenu data-ipsMenu-appendTo='#elGalleryImage'>
									<i class='fa fa-fw fa-object-group'></i> {lang="set_image_as"}
								</a>
								<ul class='ipsMenu ipsMenu_auto ipsHide' id='elImageSetAs_menu'>
									{{if $image->canSetAsAlbumCover() AND $image->canSetAsCategoryCover()}}
										<li class='ipsMenu_item'><a data-action='setAsCover' href='{$image->url()->setQueryString( 'do', 'cover' )->setQueryString( 'set', 'category')->csrf()}'>{lang="cover_category_only"}</a></li>
										<li class='ipsMenu_item'><a data-action='setAsCover' href='{$image->url()->setQueryString( 'do', 'cover' )->setQueryString( 'set', 'album')->csrf()}'>{lang="cover_album_only"}</a></li>
										<li class='ipsMenu_item'><a data-action='setAsCover' href='{$image->url()->setQueryString( 'do', 'cover' )->setQueryString( 'set', 'both')->csrf()}'>{lang="cover_both"}</a></li>
									{{elseif $image->canSetAsCategoryCover()}}
										<li class='ipsMenu_item'><a data-action='setAsCover' href='{$image->url()->setQueryString( 'do', 'cover' )->setQueryString( 'set', 'category')->csrf()}'>{lang="cover_category"}</a></li>
									{{elseif $image->canSetAsAlbumCover()}}
										<li class='ipsMenu_item'><a data-action='setAsCover' href='{$image->url()->setQueryString( 'do', 'cover' )->setQueryString( 'set', 'album')->csrf()}'>{lang="cover_album"}</a></li>
									{{endif}}
									{{if \IPS\Member::loggedIn()->member_id}}
										<li class='ipsMenu_sep'><hr></li>
										<li class='ipsMenu_item'>
											<a href='{$image->url('setAsPhoto')->csrf()}' data-action='setAsProfile' title="{lang="set_gallery_image_photo"}">{lang="set_gallery_image_photo"}</a>
										</li>
									{{endif}}
								</ul>
							{{elseif \IPS\Member::loggedIn()->member_id}}
								<a href='{$image->url('setAsPhoto')->csrf()}' title='{lang="set_gallery_image_photo"}'>
									{lang="set_gallery_image_photo"}
								</a>
							{{endif}}
						</li>
					{{endif}}
					<li class='ipsMenu_item'>
						<a href='{$image->url('download')}' title='{lang="download"}'><i class='fa fa-fw fa-download'></i> {lang="download"}</a>
					</li>
				</ul>
			</div>
		</div>
	{{endif}}
	<span class='elGalleryImageNav'>
		{{if $prev = $image->prevItem()}}
			<a href='{$prev->url()->setQueryString( 'browse', 1 )}' class='elGalleryImageNav_prev' data-action='prevImage' data-imageID='{$prev->id}' title='{$prev->caption}'><i class='fa fa-angle-left'></i></a>
		{{endif}}
		{{if $next = $image->nextItem()}}
			<a href='{$next->url()->setQueryString( 'browse', 1 )}' class='elGalleryImageNav_next' data-action='nextImage' data-imageID='{$next->id}' title='{$next->caption}'><i class='fa fa-angle-right'></i></a>
		{{endif}}
	</span>
</div>]]></template>
 <template template_group="view" template_name="imageInfo" template_data="$image" template_location="front" template_app="gallery"><![CDATA[
{template="contentItemMessages" group="global" app="core" params="$image->getMessages(), $image"}

<div class='ipsColumns ipsColumns_collapsePhone ipsSpacer_bottom'>
	<div class='ipsColumn ipsColumn_fluid'>
		{{if $image->hidden() === 1 and $image->canUnhide()}}
			<div class="ipsBox ipsPad ipsAreaBackground_light ipsSpacer_bottom">
				<p class="ipsType_reset ipsType_normal"><i class='fa fa-warning'></i> {lang="image_pending_approval"}</p>
				<br>
				<ul class='ipsList_inline'>
					<li><a href="{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unhide' ) )}" class="ipsButton ipsButton_small ipsButton_positive" title='{lang="approve_title_image"}'><i class="fa fa-check-circle"></i> &nbsp;{lang="approve"}</a></li>
					{{if $image->canDelete()}}				
						<li><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'delete' ) )}' data-confirm title='{lang="delete_title_image"}' class="ipsButton ipsButton_small ipsButton_negative"><i class='fa fa-times'></i> &nbsp;{lang="delete"}</a></li>
					{{endif}}
				</ul>
			</div>
		{{endif}}

		<div class='ipsBox ipsPad' data-role='imageDescription'>
			<h1 class='ipsType_pageTitle ipsContained_container'>
				{{if $image->prefix() OR ( $image->canEdit() AND $image::canTag( NULL, $image->container() ) AND $image::canPrefix( NULL, $image->container() ) )}}
					<span {{if !$image->prefix()}}class='ipsHide'{{endif}} {{if ( $image->canEdit() AND $image::canTag( NULL, $image->container() ) AND $image::canPrefix( NULL, $image->container() ) )}}data-editablePrefix{{endif}}>
						{template="prefix" group="global" app="core" params="$image->prefix( TRUE ), $image->prefix()"}
					</span>
				{{endif}}
				{{if $image->hidden() === 1}}
					<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span>
				{{elseif $image->hidden() === -1}}
					<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$image->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
				{{elseif $image->hidden() === -2}}
					<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$image->deletedBlurb()}'><i class='fa fa-trash'></i></span></span>
				{{endif}}
				{{if $image->mapped('pinned')}}
					<span><span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span></span>
				{{endif}}
				{{if $image->mapped('featured')}}
					<span><span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span>
				{{endif}}
				{{if $image->canEdit()}}
					<span class='ipsContained ipsType_break' data-controller="core.front.core.moderation">{{if $image->locked()}}<i class='fa fa-lock'></i> {{endif}}
						<span data-role="editableTitle" title='{lang="click_hold_edit"}'>{$image->caption}</span>
					</span>
				{{else}}
					<span class='ipsContained ipsType_break'>{{if $image->locked()}}<i class='fa fa-lock'></i> {{endif}}{$image->caption}</span>
				{{endif}}
			</h1>
			<div class='ipsPhotoPanel ipsPhotoPanel_mini ipsClearfix ipsSpacer_bottom ipsSpacer_top'>
				{template="userPhoto" app="core" group="global" params="$image->author(), 'mini', $image->warningRef()"}
				<div>
					<div class='ipsPos_right ipsResponsive_noFloat ipsResponsive_hidePhone'>
						{template="follow" app="core" group="global" params="'gallery', 'image', $image->id, $image->followers()->count( TRUE )"}
					</div>
					<p class='ipsType_reset ipsType_normal ipsType_blendLinks'>
						{lang="byline_nodate_itemprop" htmlsprintf="$image->author()->link( $image->warningRef() )"}
					</p>
					<ul class='ipsList_inline'>
						<li class='ipsType_light'>{datetime="$image->date"}</li>
						<li class='ipsType_light'>{lang="num_views_with_number" pluralize="$image->views"}</li>
						{{if $image->author()->member_id}}
							<li><a href='{url="app=core&module=members&controller=profile&id={$image->author()->member_id}&do=content&type=gallery_image" base="front" seoTitles="$image->author()->members_seo_name" seoTemplate="profile_content"}'>{lang="find_users_images" sprintf="$image->author()->name"}</a></li>
						{{endif}}
					</ul>
				</div>
			</div>

			{{if $image->description}}
				<div class='ipsType_medium ipsType_richText ipsType_break ipsSpacer_both' data-controller="core.front.core.lightboxedImages">
					{$image->content()|raw}
				</div>
			{{endif}}

			{{if count( $image->tags() ) OR ( $image->canEdit() AND $image::canTag( NULL, $image->container() ) )}}
				{template="tags" group="global" app="core" params="$image->tags(), FALSE, FALSE, ( $image->canEdit() AND $image::canTag( NULL, $image->container() ) ) ? $image->url() : NULL"}
				<br>
			{{endif}}

			{{if $image->credit_info && $image->copyright}}
				<div class='ipsGrid ipsGrid_collapsePhone'>
					<div class='ipsGrid_span6'>
			{{endif}}

				{{if $image->credit_info}}
					<h3 class='ipsType_minorHeading'>{lang="image_credit_info"}</h3>
					<div class='ipsType_richText ipsType_medium'>
						{$image->credit_info}
					</div>
				{{endif}}

			{{if $image->credit_info && $image->copyright}}
					</div>
					<div class='ipsGrid_span6'>
			{{endif}}

				{{if $image->copyright}}
					<h3 class='ipsType_minorHeading'>{lang="image_copyright"}</h3>
					<div class='ipsType_richText'>
						&copy; {$image->copyright}
					</div>
				{{endif}}

			{{if $image->credit_info && $image->copyright}}
					</div>
				</div>
			{{endif}}

			
			<div class='ipsItemControls'>
				{{if \IPS\IPS::classUsesTrait( $image, 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
					{template="reputation" app="core" group="global" params="$image"}
				{{endif}}
				<ul class='ipsToolList ipsToolList_horizontal ipsPos_left ipsClearfix ipsResponsive_noFloat ipsItemControls_left'>
					{{if ( $image->canEdit() or $image->canFeature() or $image->canPin() or $image->canUnfeature() or $image->canHide() or $image->canUnhide() or $image->canMove() or $image->canLock() or $image->canUnlock() or $image->canDelete() or $image->canChangeAuthor() ) or ( $image->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}
						<li>
							<a href='#elImageActions_menu' id='elImageActions' class='ipsButton ipsButton_light ipsButton_verySmall ipsButton_fullWidth' data-ipsMenu>{lang="manage_image"} <i class='fa fa-caret-down'></i></a>
							<ul id='elImageActions_menu' class='ipsMenu ipsMenu_auto ipsHide'>
								{{if \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') AND $image->hidden() == -2}}
									<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'restore' ) )}' data-confirm data-confirmSubMessage='{lang="restore_as_visible_desc"}'>{lang="restore_as_visible"}</a></li>
									<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'restoreAsHidden' ) )}' data-confirm data-confirmSubMessage='{lang="restore_as_hidden_desc"}'>{lang="restore_as_hidden"}</a></li>
									<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'delete', 'immediate' => 1 ) )}' data-confirm data-confirmSubMessage='{lang="delete_immediately_desc"}'>{lang="delete_immediately"}</a></li>
								{{else}}
									{{if $image->canChangeAuthor()}}
										<li class='ipsMenu_item'><a href='{$image->url()->setQueryString( array( 'do' => 'changeAuthor' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="change_author"}" title='{lang="change_author_ititle"}'>{lang="change_author"}</a></li>
									{{endif}}
									{{if $image->canEdit()}}				
										<li class='ipsMenu_item'><a href='{$image->url()->setQueryString( array( 'do' => 'edit' ) )}' title="{lang="gallery_edit_details_title"}">{lang="gallery_edit_details"}</a></li>
									{{endif}}
									{{if $image->canFeature()}}				
										<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'feature' ) )}' title="{lang="feature_title_image"}">{lang="feature"}</a></li>
									{{endif}}
									{{if $image->canUnfeature()}}				
										<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unfeature' ) )}' title="{lang="unfeature_title_image"}">{lang="unfeature"}</a></li>
									{{endif}}
									{{if $image->canPin()}}
										<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'pin' ) )}' title="{lang="pin_title_image"}">{lang="pin"}</a></li>
									{{endif}}
									{{if $image->canUnpin()}}
										<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unpin' ) )}' title="{lang="unpin_title_image"}">{lang="unpin"}</a></li>
									{{endif}}
									{{if $image->canHide()}}				
										<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'hide' ) )}' title="{lang="hide_title_image"}" data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
									{{endif}}
									{{if $image->canUnhide()}}				
										<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unhide' ) )}' title="{{if $image->hidden() === 1}}{lang="approve_title_image"}{{else}}{lang="unhide_title_image"}{{endif}}">{{if $image->hidden() === 1}}{lang="approve"}{{else}}{lang="unhide"}{{endif}}</a></li>
									{{endif}}
									{{if $image->canLock()}}				
										<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'lock' ) )}' title="{lang="lock_title_image"}">{lang="lock"}</a></li>
									{{endif}}
									{{if $image->canUnlock()}}				
										<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unlock' ) )}' title="{lang="unlock_title_image"}">{lang="unlock"}</a></li>
									{{endif}}
									{{if $image->canMove()}}				
										<li class='ipsMenu_item'><a href='{$image->url()->setQueryString( array( 'do' => 'move' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="move"}"  title="{lang="gallery_move_title"}">{lang="move"}</a></li>
									{{endif}}
									{{if $image->canDelete()}}				
										<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'delete' ) )}' data-confirm  title="{lang="delete_title_image"}">{lang="delete"}</a></li>
									{{endif}}
									{{if $image->canOnMessage( 'add' )}}
										<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'messageForm' ) )}' data-ipsDialog data-ipsDialog-title='{lang="add_message"}'>{lang="add_message"}</a></li>
									{{endif}}
									{{if \IPS\Member::loggedIn()->modPermission('can_view_moderation_log')}}
										<li class='ipsMenu_sep'><hr></li>
										<li class="ipsMenu_item"><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'modLog' ) )}' data-ipsDialog data-ipsDialog-title='{lang="moderation_history"}'>{lang="moderation_history"}</a></li>
									{{endif}}
								{{endif}}
							</ul>
						</li>
					{{endif}}

					{{if $image->canReportOrRevoke() === TRUE}}
						<li>
							<a href='{$image->url('report')}' class='ipsButton ipsButton_link ipsButton_verySmall ipsButton_fullWidth' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="report_image"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="report_submit_success"}" title="{lang="report_image"}">{lang="report_image"}</a>
						</li>
					{{endif}}
				</ul>
			</div>

			<div class='ipsResponsive_showPhone ipsResponsive_block ipsSpacer_both'>
				{template="follow" app="core" group="global" params="'gallery', 'image', $image->id, $image->followers()->count( TRUE )"}
			</div>
			{{if count( $image->shareLinks() )}}
				<div class='ipsSpacer_top'>
					{template="sharelinks" app="core" group="global" params="$image"}
				</div>
			{{endif}}	
		</div>
	</div>
	<div class='ipsColumn ipsColumn_wide' id='elGalleryImageStats'>
		<div class='ipsBox ipsPad' data-role="imageStats">
			{{if $image->directContainer()->allow_rating}}
				<div class='ipsType_center'>
					{$image->rating()|raw}
				</div>
				<hr class='ipsHr'>
			{{endif}}

			{{if \IPS\GeoLocation::enabled() AND $image->gps_show}}
				{$image->map( 240, 100 )|raw}
				<div class='ipsType_small'>
					{$image->loc_short}
					{{if $image->canEdit() }}
						<br><br>
						<a href='#' id='elMapForm' data-ipsMenu data-ipsMenu-closeOnClick='false'>{lang="map_privacy"} <i class='fa fa-caret-down'></i></a>
						<div class='ipsMenu ipsMenu_auto ipsHide ipsPad' id='elMapForm_menu'>
							{$image->enableMapForm()|raw}
						</div>
					{{endif}}
				</div>
				<hr class='ipsHr'>
			{{elseif \IPS\GeoLocation::enabled() AND $image->canEdit() AND $image->gps_raw}}
				<div class='ipsFaded'>
					{$image->map( 240, 100 )|raw}
					<div class='ipsType_small'>
						{$image->loc_short}
					</div>
				</div>
				<div class='ipsType_small ipsSpacer_top'>
					<strong>{lang="map_not_being_shown"}</strong>
					<a href='#' id='elMapForm' data-ipsMenu data-ipsMenu-closeOnClick='false'>{lang="map_privacy"} <i class='fa fa-caret-down'></i></a>
					<div class='ipsMenu ipsMenu_auto ipsHide ipsPad' id='elMapForm_menu'>
						{$image->enableMapForm()|raw}
					</div>
				</div>

				<hr class='ipsHr'>
			{{endif}}

			{{if $image->directContainer() instanceof \IPS\gallery\Album}}
				<div>
					<strong class='ipsType_minorHeading'>{lang="from_the_album"}</strong>
					<br>
					<h3 class='ipsType_sectionHead'><span class='ipsContained ipsType_break'><a href='{$image->directContainer()->url()}' class='ipsType_normal ipsTruncate ipsTruncate_line'>{$image->directContainer()->_title}</a></span></h3>
					<ul class='ipsList_inline ipsType_medium'>
						<li><i class='fa fa-camera'></i> <strong>{lang="num_images" pluralize="$image->directContainer()->count_imgs"}</strong></li>
						{{if $image->container()->allow_comments and $image->directContainer()->use_comments}}
							<li><i class='fa fa-comment'></i> <strong>{lang="num_comments" pluralize="$image->directContainer()->comments"}</strong></li>
						{{endif}}
						{{if $image->container()->allow_comments and $image->directContainer()->allow_comments}}
							<li><i class='fa fa-comment'></i> <strong>{lang="gallery_image_comments_s" pluralize="$image->directContainer()->count_comments"}</strong></li>
						{{endif}}
					</ul>
				</div>
				<hr class='ipsHr'>
			{{endif}}

			{{if count($image->metadata)}}
				<h2 class='ipsType_minorHeading ipsType_break'>{lang="gallery_metadata" sprintf="$image->caption"}</h2>
				<div class='cGalleryExif'>
					{{if isset( $image->metadata['EXIF.FocalLength'] ) || ( isset( $image->metadata['IFD0.Make'] ) AND isset( $image->metadata['IFD0.Model'] ) ) || isset( $image->metadata['EXIF.ShutterSpeedValue'] ) || isset( $image->metadata['COMPUTED.ApertureFNumber'] ) || isset( $image->metadata['Exif.Photo.ISOSpeed'] )}}
						<h3 class='ipsType_reset ipsType_small'>
							{{if isset( $image->metadata['IFD0.Make'] ) AND isset( $image->metadata['IFD0.Model'] )}}
								<strong>{lang="gallery_exif_camera"} {$image->metadata['IFD0.Make']} {$image->metadata['IFD0.Model']}</strong>
							{{else}}
								<strong>{lang="camera_information"}</strong>
							{{endif}}
						</h3>
						<ul class='ipsList_inline cGalleryExif_data'>
							{{if isset( $image->metadata['EXIF.FocalLength'] )}}
								<li data-ipsTooltip title='{lang="EXIF.FocalLength"}'>
									<span><i class='fa fa-arrows-h'></i></span>
									{$image->focallength}
								</li>
							{{endif}}
							{{if isset( $image->metadata['EXIF.ExposureTime'] )}}
								<li data-ipsTooltip title='{lang="EXIF.ExposureTime"}'>
									<span><i class='fa fa-clock-o'></i></span>
									{$image->metadata['EXIF.ExposureTime']}
								</li>
							{{endif}}
							{{if isset( $image->metadata['COMPUTED.ApertureFNumber'] )}}
								<li data-ipsTooltip title='{lang="COMPUTED.ApertureFNumber"}'>
									<span class='cGalleryExif_f'>f</span>
									{$image->metadata['COMPUTED.ApertureFNumber']}
								</li>
							{{endif}}
							{{if isset( $image->metadata['Exif.Photo.ISOSpeed'] ) || isset( $image->metadata['EXIF.ISOSpeedRatings'] )}}
								<li data-ipsTooltip title='{lang="gallery_exif_isospeed"}'>
									<span class='cGalleryExif_iso'>{lang="gallery_exif_iso"}</span>
									{{if isset( $image->metadata['Exit.Photo.ISOSpeed'] )}}
										{$image->metadata['Exif.Photo.ISOSpeed']}
									{{else}}
										{{if is_array( $image->metadata['EXIF.ISOSpeedRatings'] )}}
											{expression="implode( '/', $image->metadata['EXIF.ISOSpeedRatings'] )"}
										{{else}}
											{$image->metadata['EXIF.ISOSpeedRatings']}
										{{endif}}
									{{endif}}
								</li>
							{{endif}}
						</ul>
						<a href='{$image->url( 'metadata' )}' data-ipsDialog data-ipsDialog-title='{lang="view_all_photo_info"}'>{lang="view_all_photo_info"}</a>
					{{else}}
						<a href='{$image->url( 'metadata' )}' data-ipsDialog data-ipsDialog-title='{lang="view_all_photo_info"}'>{lang="view_photo_info"}</a>
					{{endif}}
				</div>
			{{endif}}
		</div>
	</div>
</div>]]></template>
 <template template_group="view" template_name="imageLightbox" template_data="$image, $commentsAndReviews=FALSE" template_location="front" template_app="gallery"><![CDATA[
<div data-controller='gallery.front.view.image' class='cGalleryLightbox' data-role='lightbox'>
	<div class='cGalleryLightbox_inner' data-role="imageSizer">
		<div class='elGalleryHeader' class='cGalleryLightbox_image'>
			{template="imageLightboxFrame" group="view" app="gallery" params="$image"}
		</div>

		<div class='cGalleryLightbox_info'>
			<section data-role='imageInfo'>
				{template="imageLightboxInfo" group="view" params="$image, $commentsAndReviews"}	
			</section>
		</div>
	</div>
</div> ]]></template>
 <template template_group="view" template_name="imageLightboxFrame" template_data="$image" template_location="front" template_app="gallery"><![CDATA[
<div id='elGalleryImageLightbox' class='elGalleryImage' data-role="imageFrame" data-setHeight {{if $image->data}}data-imageSizes='{$image->data}'{{endif}}>
	{{if $image->media }}
		<div class='cGallery_videoContainer'>
			<video data-controller="core.global.core.embeddedvideo" id="elGalleryVideo" data-role="video" data-imageID='{$image->id}' {{if $image->canEdit()}}data-editable{{endif}} class="ipsPos_center" controls preload="auto" width="100%" height="100%"{{if $image->masked_file_name }} poster="{file="$image->masked_file_name" extension="gallery_Images"}"{{endif}}>
				<source src="{file="$image->original_file_name" extension="gallery_Images"}" type='{$image->file_type}' />
				<embed wmode="opaque" autoplay="true" showcontrols="true" showstatusbar="true" showtracker="true" src="{file="$image->original_file_name" extension="gallery_Images"}" width="480" height="360" type='{$image->file_type}' />
			</video>
		</div>
	{{else}}
		<div class='cGalleryViewImage' data-role='notesWrapper' data-controller='gallery.front.view.notes' data-imageID='{$image->id}' {{if $image->canEdit()}}data-editable{{endif}} data-notesData='{$image->_notes_json}'>
			<div>
				<img src='{file="$image->masked_file_name" extension="gallery_Images"}' alt="{$image->caption}" title='{$image->caption}' data-role='theImage' class='ipsHide'>
			</div>
			{{if count( $image->_notes )}}
				<noscript>
					{{foreach $image->_notes as $note}}
						<div class='cGalleryNote' style='left: {$note['LEFT']}%; top: {$note['TOP']}%; width: {$note['WIDTH']}%; height: {$note['HEIGHT']}%'>
							<div class='cGalleryNote_border'></div>
							<div class='cGalleryNote_note'><div>{$note['NOTE']}</div></div>
						</div>
					{{endforeach}}
				</noscript>
			{{endif}}
		</div>
	{{endif}}

		<div class='cGalleryImageFade'>
			<div class='cGalleryImageTopBar'>
				<div class='cGalleryImageTitle'>
					<h1 class='ipsType_pageTitle ipsContained_container'>
						{{if $image->prefix() OR ( $image->canEdit() AND $image::canTag( NULL, $image->container() ) AND $image::canPrefix( NULL, $image->container() ) )}}
							<span {{if !$image->prefix()}}class='ipsHide'{{endif}} {{if ( $image->canEdit() AND $image::canTag( NULL, $image->container() ) AND $image::canPrefix( NULL, $image->container() ) )}}data-editablePrefix{{endif}}>
								{template="prefix" group="global" app="core" params="$image->prefix( TRUE ), $image->prefix()"}
							</span>
						{{endif}}
						{{if $image->hidden() === 1}}
							<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span>
						{{elseif $image->hidden() === -1}}
							<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$image->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
						{{elseif $image->hidden() === -2}}
							<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$image->deletedBlurb()}'><i class='fa fa-trash'></i></span></span>
						{{endif}}
						{{if $image->mapped('pinned')}}
							<span><span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span></span>
						{{endif}}
						{{if $image->mapped('featured')}}
							<span><span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span>
						{{endif}}
						{{if $image->canEdit()}}
							<span class='ipsContained ipsType_break' data-controller="core.front.core.moderation">{{if $image->locked()}}<i class='fa fa-lock'></i> {{endif}}
								<span data-role="editableTitle" title='{lang="click_hold_edit"}'>{$image->caption}</span>
							</span>
						{{else}}
							<span class='ipsContained ipsType_break'>{{if $image->locked()}}<i class='fa fa-lock'></i> {{endif}}{$image->caption}</span>
						{{endif}}
					</h1>
					{{if $image->album_id}}
						<div class='ipsType_desc ipsTruncate ipsTruncate_line'>
							<strong class='ipsType_minorHeading'>{lang="from_the_album"}</strong> <em><a href='{$image->directContainer()->url()}'>{$image->directContainer()->name}</a></em>
							({lang="num_images" pluralize="$image->directContainer()->count_imgs"})
						</div>
					{{endif}}
				</div>

				<ul class='cGalleryControls ipsList_inline ipsResponsive_hidePhone'>
					<li>
						{template="promote" app="core" group="global" params="$image"}
					</li>
					<li>
						{template="follow" app="core" group="global" params="'gallery', 'image', $image->id, $image->followers()->count( TRUE )"}
					</li>
					{{if !$image->media }}
						<li>
							<a href='{file="$image->masked_file_name" extension="gallery_Images"}' title='{lang="view_fullsize_image"}' class='ipsButton ipsButton_narrow ipsButton_link ipsButton_verySmall ipsButton_veryLight' data-ipsTooltip target='_blank' data-role="toggleFullscreen"></a>
						</li>
					{{endif}}
				</ul>
			</div>

			<div class='cGalleryImageBottomBar'>
				<div class='cGalleryCreditInfo ipsType_normal'>
					{{if $image->copyright}}
						<div>
							&copy; {$image->copyright}
						</div>
					{{endif}}

					{{if $image->credit_info}}
						<div>
							<strong>{lang="image_credit_info"}</strong> {$image->credit_info}
						</div>
					{{endif}}
				</div>

				<ul class='ipsList_inline'>
					<li>
						<a href='#' data-ipsMenu data-ipsMenu-above='true' data-ipsMenu-appendTo='.elGalleryHeader' id='elImageToolsLightbox' class='ipsButton ipsButton_link ipsButton_verySmall ipsJS_show cGalleryViewImage_controls'>{lang="image_tools"} <i class='fa fa-caret-down'></i></a>
						<ul class='ipsMenu ipsMenu_auto ipsHide' id='elImageToolsLightbox_menu'>
							{{if $image->canEdit()}}
								<li class='ipsMenu_item'><a href='#' title='{lang="add_image_note"}' data-action='addNote'>
									<i class='fa fa-fw fa-pencil-square-o'></i> {lang="add_image_note"}</a>
								</li>
								{{if !$image->media}}
									<li class='ipsMenu_item ipsMenu_subItems'>
										<a href='#' title='{lang="rotate_image"}' id='elImageLightbox_rotate' data-ipsMenu>
											<i class='fa fa-fw fa-rotate-right'></i> {lang="rotate_image"}
										</a>
										<ul class='ipsMenu ipsMenu_auto ipsHide' id='elImageLightbox_rotate_menu'>
											<li class='ipsMenu_item'>
												<a href='{$image->url( 'rotate' )->csrf()->setQueryString( 'direction', 'right' )}' title='{lang="rotate_right"}' data-action="rotateImage">
													<i class='fa fa-fw fa-rotate-right'></i> &nbsp;{lang="rotate_right"}
												</a>
											</li>
											<li class='ipsMenu_item'>
												<a href='{$image->url( 'rotate' )->csrf()->setQueryString( 'direction', 'left' )}' title="{lang="rotate_left"}" data-action="rotateImage">
													<i class='fa fa-fw fa-rotate-left'></i> &nbsp;{lang="rotate_left"}
												</a>
											</li>
										</ul>
									</li>
								{{endif}}
							{{endif}}
                            {{if \IPS\Member::loggedIn()->member_id}}
								<li class='ipsMenu_item{{if $image->canSetAsAlbumCover() OR $image->canSetAsCategoryCover()}} ipsMenu_subItems{{endif}}'>
									{{if $image->canSetAsAlbumCover() OR $image->canSetAsCategoryCover()}}
										<a href='#' title='{lang="set_image_as"}' id='elImageLightboxSetAs' data-ipsMenu>
											<i class='fa fa-fw fa-object-group'></i> {lang="set_image_as"}
										</a>
										<ul class='ipsMenu ipsMenu_auto ipsHide' id='elImageLightboxSetAs_menu'>
											{{if $image->canSetAsAlbumCover() AND $image->canSetAsCategoryCover()}}
												<li class='ipsMenu_item'><a data-action='setAsCover' href='{$image->url()->setQueryString( 'do', 'cover' )->setQueryString( 'set', 'category')->csrf()}'>{lang="cover_category_only"}</a></li>
												<li class='ipsMenu_item'><a data-action='setAsCover' href='{$image->url()->setQueryString( 'do', 'cover' )->setQueryString( 'set', 'album')->csrf()}'>{lang="cover_album_only"}</a></li>
												<li class='ipsMenu_item'><a data-action='setAsCover' href='{$image->url()->setQueryString( 'do', 'cover' )->setQueryString( 'set', 'both')->csrf()}'>{lang="cover_both"}</a></li>
											{{elseif $image->canSetAsCategoryCover()}}
												<li class='ipsMenu_item'><a data-action='setAsCover' href='{$image->url()->setQueryString( 'do', 'cover' )->setQueryString( 'set', 'category')->csrf()}'>{lang="cover_category"}</a></li>
											{{elseif $image->canSetAsAlbumCover()}}
												<li class='ipsMenu_item'><a data-action='setAsCover' href='{$image->url()->setQueryString( 'do', 'cover' )->setQueryString( 'set', 'album')->csrf()}'>{lang="cover_album"}</a></li>
											{{endif}}
											{{if \IPS\Member::loggedIn()->member_id}}
												<li class='ipsMenu_sep'><hr></li>
												<li class='ipsMenu_item'>
													<a href='{$image->url('setAsPhoto')->csrf()}' data-action='setAsProfile' title="{lang="set_gallery_image_photo"}">{lang="set_gallery_image_photo"}</a>
												</li>
											{{endif}}
										</ul>
									{{elseif \IPS\Member::loggedIn()->member_id}}
										<a href='{$image->url('setAsPhoto')->csrf()}' title='{lang="set_gallery_image_photo"}' data-action="setAsProfile">
											{lang="set_gallery_image_photo"}
										</a>
									{{endif}}
								</li>
							{{endif}}
							<li class='ipsMenu_item'>
								<a href='{$image->url('download')}' title='{lang="download"}'><i class='fa fa-fw fa-download'></i> {lang="download"}</a>
							</li>
						</ul>
					</li>
					{{if count( $image->shareLinks() )}}
						<li>
							<a href='#' data-ipsMenu data-ipsMenu-above='true' id='elImageLightboxShare' class='ipsButton ipsButton_link ipsButton_verySmall ipsJS_show'><i class='fa fa-share-alt'></i> &nbsp;{lang="image_share"} <i class='fa fa-caret-down'></i></a>
							<div id='elImageLightboxShare_menu' class='ipsMenu ipsMenu_auto ipsPad ipsHide'>
								{template="sharelinks" app="core" group="global" params="$image"}
							</div>
						</li>
					{{endif}}
				</ul>
			</div>
		</div>

	<span class='elGalleryImageNav'>
		{{if $prev = $image->prevItem( \IPS\Request::i()->context )}}
			<a href='{$prev->url()->setQueryString( array( 'browse' => 1, 'lightbox' => 1, 'context' => \IPS\Request::i()->context ) )}' class='elGalleryImageNav_prev' data-action='prevImage' data-imageID='{$prev->id}' title='{$prev->caption}'><i class='fa fa-angle-left'></i></a>
		{{endif}}
		{{if $next = $image->nextItem( \IPS\Request::i()->context )}}
			<a href='{$next->url()->setQueryString( array( 'browse' => 1, 'lightbox' => 1, 'context' => \IPS\Request::i()->context ) )}' class='elGalleryImageNav_next' data-action='nextImage' data-imageID='{$next->id}' title='{$next->caption}'><i class='fa fa-angle-right'></i></a>
		{{endif}}
	</span>
</div>]]></template>
 <template template_group="view" template_name="imageLightboxInfo" template_data="$image, $commentsAndReviews" template_location="front" template_app="gallery"><![CDATA[<div data-role='imageDescription' {{if $image->hidden() === -1}}class='ipsModerated'{{endif}}>
	{template="contentItemMessages" group="global" app="core" params="$image->getMessages(), $image"}

	{{if $image->hidden() === 1 and $image->canUnhide()}}
		<div class="ipsModerated ipsPad">
			<p class="ipsType_reset ipsType_normal"><i class='fa fa-warning'></i> {lang="image_pending_approval"}</p>
			<br>
			<ul class='ipsList_inline'>
				<li><a href="{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unhide' ) )}" class="ipsButton ipsButton_small ipsButton_positive" title='{lang="approve_title_image"}'><i class="fa fa-check-circle"></i> &nbsp;{lang="approve"}</a></li>
				{{if $image->canDelete()}}				
					<li><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'delete' ) )}' data-confirm title='{lang="delete_title_image"}' class="ipsButton ipsButton_small ipsButton_negative"><i class='fa fa-times'></i> &nbsp;{lang="delete"}</a></li>
				{{endif}}
			</ul>
		</div>
	{{endif}}

	<div class='ipsPhotoPanel ipsPhotoPanel_mini ipsClearfix ipsAreaBackground_light ipsPad'>
		{template="userPhoto" app="core" group="global" params="$image->author(), 'mini', $image->warningRef()"}
		<div>
			{{if ( $image->canEdit() or $image->canFeature() or $image->canPin() or $image->canUnfeature() or $image->canHide() or $image->canUnhide() or $image->canMove() or $image->canLock() or $image->canUnlock() or $image->canDelete() or $image->canChangeAuthor() ) or ( $image->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}
				<a href='#elImageActions_menu' id='elImageLightboxActions' class='ipsButton ipsButton_light ipsButton_small ipsButton_narrow ipsSpacer_top ipsSpacer_half ipsPos_right' title='{lang="manage_image"}' data-ipsTooltip data-ipsMenu><i class='fa fa-cog ipsType_large'></i> <i class='fa fa-caret-down'></i></a>
				<ul id='elImageLightboxActions_menu' class='ipsMenu ipsMenu_auto ipsHide'>
					{{if \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') AND $image->hidden() == -2}}
						<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'restore' ) )}' data-confirm data-confirmSubMessage='{lang="restore_as_visible_desc"}'>{lang="restore_as_visible"}</a></li>
						<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'restoreAsHidden' ) )}' data-confirm data-confirmSubMessage='{lang="restore_as_hidden_desc"}'>{lang="restore_as_hidden"}</a></li>
						<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'delete', 'immediate' => 1 ) )}' data-confirm data-confirmSubMessage='{lang="delete_immediately_desc"}'>{lang="delete_immediately"}</a></li>
					{{else}}
						{{if $image->canChangeAuthor()}}
							<li class='ipsMenu_item'><a href='{$image->url()->setQueryString( array( 'do' => 'changeAuthor' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="change_author"}" title='{lang="change_author_ititle"}'>{lang="change_author"}</a></li>
						{{endif}}
						{{if $image->canEdit()}}				
							<li class='ipsMenu_item'><a href='{$image->url()->setQueryString( array( 'do' => 'edit' ) )}' title="{lang="gallery_edit_details_title"}" data-ipsDialog data-action="editImage">{lang="gallery_edit_details"}</a></li>
						{{endif}}
						{{if $image->canFeature()}}				
							<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'feature' ) )}' title="{lang="feature_title_image"}">{lang="feature"}</a></li>
						{{endif}}
						{{if $image->canUnfeature()}}				
							<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unfeature' ) )}' title="{lang="unfeature_title_image"}">{lang="unfeature"}</a></li>
						{{endif}}
						{{if $image->canPin()}}
							<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'pin' ) )}' title="{lang="pin_title_image"}">{lang="pin"}</a></li>
						{{endif}}
						{{if $image->canUnpin()}}
							<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unpin' ) )}' title="{lang="unpin_title_image"}">{lang="unpin"}</a></li>
						{{endif}}
						{{if $image->canHide()}}				
							<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'hide' ) )}' title="{lang="hide_title_image"}" data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
						{{endif}}
						{{if $image->canUnhide()}}				
							<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unhide' ) )}' title="{{if $image->hidden() === 1}}{lang="approve_title_image"}{{else}}{lang="unhide_title_image"}{{endif}}">{{if $image->hidden() === 1}}{lang="approve"}{{else}}{lang="unhide"}{{endif}}</a></li>
						{{endif}}
						{{if $image->canLock()}}				
							<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'lock' ) )}' title="{lang="lock_title_image"}">{lang="lock"}</a></li>
						{{endif}}
						{{if $image->canUnlock()}}				
							<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unlock' ) )}' title="{lang="unlock_title_image"}">{lang="unlock"}</a></li>
						{{endif}}
						{{if $image->canMove()}}				
							<li class='ipsMenu_item'><a href='{$image->url()->setQueryString( array( 'do' => 'move' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="move"}"  title="{lang="gallery_move_title"}">{lang="move"}</a></li>
						{{endif}}
						{{if $image->canDelete()}}				
							<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'delete' ) )}' data-confirm  title="{lang="delete_title_image"}">{lang="delete"}</a></li>
						{{endif}}
						{{if $image->canOnMessage( 'add' )}}
							<li class='ipsMenu_item'><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'messageForm' ) )}' data-ipsDialog data-ipsDialog-title='{lang="add_message"}'>{lang="add_message"}</a></li>
						{{endif}}
						{{if \IPS\Member::loggedIn()->modPermission('can_view_moderation_log')}}
							<li class='ipsMenu_sep'><hr></li>
							<li class="ipsMenu_item"><a href='{$image->url()->csrf()->setQueryString( array( 'do' => 'modLog' ) )}' data-ipsDialog data-ipsDialog-title='{lang="moderation_history"}'>{lang="moderation_history"}</a></li>
						{{endif}}
					{{endif}}
				</ul>
			{{endif}}
			<p class='ipsType_reset ipsType_sectionHead ipsType_blendLinks'>
				{$image->author()->link( $image->warningRef() )|raw}
			</p>
			<ul class='ipsList_inline ipsType_medium ipsType_blendLinks ipsType_light'>
				<li>{datetime="$image->date"}</li>
				<li>{lang="num_views_with_number" pluralize="$image->views"}</li>
				{{if $image->canReportOrRevoke() === TRUE}}
					<li>
						<a href='{$image->url('report')}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="report_image"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="report_submit_success"}" title="{lang="report_image"}">{lang="report_image"}</a>
					</li>
				{{endif}}
			</ul>
		</div>
	</div>

	<div class='ipsPad'>
		{{if $image->directContainer()->allow_rating}}
			<div class='ipsClearfix ipsSpacer_bottom ipsSpacer_half'>{$image->rating('small')|raw}</div>
		{{endif}}

		{{if count( $image->tags() ) OR ( $image->canEdit() AND $image::canTag( NULL, $image->container() ) )}}
			<div class='ipsClear'>
				{template="tags" group="global" app="core" params="$image->tags(), FALSE, FALSE, ( $image->canEdit() AND $image::canTag( NULL, $image->container() ) ) ? $image->url() : NULL"}
			</div>
		{{endif}}

		{{if $image->description}}
			<div class='ipsType_medium ipsType_richText ipsSpacer_both ipsClear' data-controller="core.front.core.lightboxedImages"  data-ipsTruncate data-ipsTruncate-size='10 lines'>
				{$image->content()|raw}
			</div>
		{{endif}}

		{{if \IPS\IPS::classUsesTrait( $image, 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
			{template="reputation" app="core" group="global" params="$image"}
		{{endif}}
	</div>

	{advertisement="ad_image_lightbox"}

	<div class='cGalleryExif ipsAreaBackground_light ipsPad'>
		{{if count($image->metadata)}}
			{{if isset( $image->metadata['EXIF.FocalLength'] ) || ( isset( $image->metadata['IFD0.Make'] ) AND isset( $image->metadata['IFD0.Model'] ) ) || isset( $image->metadata['EXIF.ShutterSpeedValue'] ) || isset( $image->metadata['COMPUTED.ApertureFNumber'] ) || isset( $image->metadata['Exif.Photo.ISOSpeed'] )}}
				<h3 class='ipsType_reset ipsType_small'>
					{{if isset( $image->metadata['IFD0.Make'] ) AND isset( $image->metadata['IFD0.Model'] )}}
						<strong>{lang="gallery_exif_camera"} {{if mb_strpos( $image->metadata['IFD0.Model'], $image->metadata['IFD0.Make'] ) !== 0}}{$image->metadata['IFD0.Make']}{{endif}} {$image->metadata['IFD0.Model']}</strong>
					{{else}}
						<strong>{lang="camera_information"}</strong>
					{{endif}}
				</h3>
				<ul class='ipsList_inline cGalleryExif_data'>
					{{if isset( $image->metadata['EXIF.FocalLength'] )}}
						<li data-ipsTooltip title='{lang="EXIF.FocalLength"}'>
							<span><i class='fa fa-arrows-h'></i></span>
							{$image->focallength}
						</li>
					{{endif}}
					{{if isset( $image->metadata['EXIF.ExposureTime'] )}}
						<li data-ipsTooltip title='{lang="EXIF.ExposureTime"}'>
							<span><i class='fa fa-clock-o'></i></span>
							{$image->metadata['EXIF.ExposureTime']}
						</li>
					{{endif}}
					{{if isset( $image->metadata['COMPUTED.ApertureFNumber'] )}}
						<li data-ipsTooltip title='{lang="COMPUTED.ApertureFNumber"}'>
							<span class='cGalleryExif_f'>f</span>
							{$image->metadata['COMPUTED.ApertureFNumber']}
						</li>
					{{endif}}
					{{if isset( $image->metadata['Exif.Photo.ISOSpeed'] ) || isset( $image->metadata['EXIF.ISOSpeedRatings'] )}}
						<li data-ipsTooltip title='{lang="gallery_exif_isospeed"}'>
							<span class='cGalleryExif_iso'>{lang="gallery_exif_iso"}</span>
							{{if isset( $image->metadata['Exit.Photo.ISOSpeed'] )}}
								{$image->metadata['Exif.Photo.ISOSpeed']}
							{{else}}
								{{if is_array( $image->metadata['EXIF.ISOSpeedRatings'] )}}
									{expression="implode( '/', $image->metadata['EXIF.ISOSpeedRatings'] )"}
								{{else}}
									{$image->metadata['EXIF.ISOSpeedRatings']}
								{{endif}}
							{{endif}}
						</li>
					{{endif}}
				</ul>
				<a href='{$image->url( 'metadata' )}' data-ipsDialog data-ipsDialog-fixed="true" data-ipsDialog-title='{lang="view_all_photo_info"}' class='ipsType_small'>{lang="view_all_photo_info"}</a>
			{{else}}
				<a href='{$image->url( 'metadata' )}' data-ipsDialog data-ipsDialog-fixed="true" data-ipsDialog-title='{lang="view_all_photo_info"}' class='ipsType_small'>{lang="view_photo_info"}</a>
			{{endif}}
		{{endif}}

		{{if \IPS\GeoLocation::enabled() AND $image->gps_show}}
			<div class='ipsSpacer_top ipsSpacer_half'>
				{$image->map( 400, 100 )|raw}
				<div class='ipsType_small ipsSpacer_top ipsSpacer_half'>
					{$image->loc_short}
					{{if $image->canEdit() }}
						<a href='#' id='elMapLightboxForm' data-ipsMenu data-ipsMenu-closeOnClick='false'>{lang="map_privacy"} <i class='fa fa-caret-down'></i></a>
						<div class='ipsMenu ipsMenu_auto ipsHide ipsPad' id='elMapLightboxForm_menu'>
							{$image->enableMapForm()|raw}
						</div>
					{{endif}}
				</div>
			</div>
		{{elseif $image->canEdit() AND \IPS\GeoLocation::enabled() AND $image->gps_raw}}
			<div class='ipsSpacer_top ipsSpacer_half'>
				<div class='ipsFaded'>
					{$image->map( 400, 100 )|raw}
					<div class='ipsType_small ipsSpacer_top ipsSpacer_half'>
						{$image->loc_short}
					</div>
				</div>
				<div class='ipsType_small ipsSpacer_top'>
					<strong>{lang="map_not_being_shown"}</strong>
					<a href='#' id='elMapLightboxForm' data-ipsMenu data-ipsMenu-closeOnClick='false'>{lang="map_privacy"} <i class='fa fa-caret-down'></i></a>
					<div class='ipsMenu ipsMenu_auto ipsHide ipsPad' id='elMapLightboxForm_menu'>
						{$image->enableMapForm()|raw}
					</div>
				</div>
			</div>
		{{endif}}
	</div>

	<div data-role='imageComments'>
		{{if $commentsAndReviews}}
			{{if ( $image->directContainer()->allow_reviews && $image->container()->allow_reviews ) && ( $image->directContainer()->allow_comments && $image->container()->allow_comments ) }}
				<a id="replies"></a>
				<h2 class='ipsHide'>{lang="user_feedback"}</h2>
			{{endif}}
			{$commentsAndReviews|raw}
		{{endif}}
	</div>
</div>]]></template>
 <template template_group="view" template_name="metadata" template_data="$image" template_location="front" template_app="gallery"><![CDATA[{template="pageHeader" if="!\IPS\Request::i()->isAjax()" group="global" app="core" params="\IPS\Member::loggedIn()->language()->addToStack('gallery_metadata', FALSE, array( 'sprintf' => array( $image->caption ) ) )"}
<div class='ipsPad'>
	{{if count( $image->metadata )}}
		<ol class='ipsDataList'>
			{{foreach $image->metadata as $key => $value}}
				{{if !is_array( $value ) AND ( $image->gps_show OR mb_strpos( $key, 'GPS.' ) === FALSE ) AND mb_strpos( $key, 'UndefinedTag' ) === FALSE AND ( !\IPS\Member::loggedIn()->language()->checkKeyExists( $key ) OR ( \IPS\Member::loggedIn()->language()->checkKeyExists( $key ) AND \IPS\Member::loggedIn()->language()->get( $key ) ) )}}
					<li class='ipsDataItem ipsClearfix'>
						<div class='ipsDataItem_generic ipsDataItem_size7'><strong class='ipsPos_right'>{lang="$key"}</strong></div>
						<div class='ipsDataItem_main'>{{if \IPS\Member::loggedIn()->language()->checkKeyExists( $key . '_map_' . $value )}}{lang="{$key}_map_{$value}"}{{else}}{$value}{{endif}}</div>
					</li>
				{{endif}}
			{{endforeach}}
		</ol>
	{{else}}
		<p class='ipsType ipsType_light'>{lang="gallery_no_metadata"}</p>
	{{endif}}
</div>]]></template>
 <template template_group="view" template_name="reviews" template_data="$image" template_location="front" template_app="gallery"><![CDATA[<div data-controller='core.front.core.commentFeed' {{if settings.auto_polling_enabled}}data-autoPoll{{endif}} data-commentsType='reviews' data-baseURL='{$image->url()}' {{if $image->isLastPage('reviews')}}data-lastPage{{endif}} data-feedID='image-{$image->id}-reviews' id='reviews'>
	{{if count( $image->reviews( NULL, NULL, NULL, 'desc', NULL, NULL, NULL, NULL, isset( \IPS\Request::i()->showDeleted ) ) )}}
		{{if !$image->hasReviewed()}}<hr class='ipsHr'>{{endif}}
		<div class="ipsClearfix ipsSpacer_bottom">
			{template="commentMultimodHeader" app="core" group="global" params="$image, '#reviews', 'review'"}
			{{if $image->reviewPageCount() > 1}}
				<div class="ipsPos_left ipsResponsive_noFloat">
					{$image->reviewPagination( array( 'tab', 'sort' ) )|raw}
				</div>
			{{endif}}
			<div class="ipsClearfix ipsPos_right ipsResponsive_hidePhone">
				<ul class="ipsButtonRow ipsClearfix">
					<li data-action="tableFilter">
						<a href="{$image->url()->setQueryString( array( 'tab' => 'reviews', 'page' => 1, 'sort' => 'helpful' ) )}" class="{{if !isset( request.sort ) or request.sort != 'newest'}}ipsButtonRow_active{{endif}}" data-action="filterClick">{lang="most_helpful"}</a>
					</li>
					<li data-action="tableFilter">
						<a href="{$image->url()->setQueryString( array( 'tab' => 'reviews', 'page' => 1, 'sort' => 'newest' ) )}" class="{{if isset( request.sort ) and request.sort == 'newest'}}ipsButtonRow_active{{endif}}" data-action="filterClick">{lang="newest"}</a>
					</li>
				</ul>
			</div>
		</div>

		<div data-role='commentFeed' data-controller='core.front.core.moderation'>
			<form action="{$image->url()->csrf()->setQueryString( 'do', 'multimodReview' )}" method="post" data-ipsPageAction data-role='moderationTools'>
				{{$reviewCount=0; $timeLastRead = $image->timeLastRead(); $lined = FALSE;}}
				{{foreach $image->reviews( NULL, NULL, NULL, 'desc', NULL, NULL, NULL, NULL, isset( \IPS\Request::i()->showDeleted ) ) as $review}}
					{{if !$lined and $timeLastRead and $timeLastRead->getTimestamp() < $review->mapped('date')}}
						{{if $lined = TRUE and $reviewCount}}
							<hr class="ipsCommentUnreadSeperator">
						{{endif}}
					{{endif}}
					{{$reviewCount++;}}
					{$review->html()|raw}
				{{endforeach}}
				{template="commentMultimod" app="core" group="global" params="$image, 'review'"}
			</form>
		</div>
		{{if $image->reviewPageCount() > 1}}
			<div>
				{$image->reviewPagination( array( 'tab', 'sort' ) )|raw}
			</div>
		{{endif}}
	{{elseif !$image->canReview()}}
		<p class="ipsType_normal ipsType_light ipsType_reset" data-role="noReviews">{lang="no_reviews"}</p>
	{{endif}}
	
	{{if $image->reviewForm()}}
		{{if $image->locked()}}
			<strong class='ipsType_warning'><i class='fa fa-info-circle'></i> {lang="item_locked_can_review"}</strong>
		{{endif}}
		<div id='elImageReviewForm'>
			{$image->reviewForm()|raw}
		</div>
	{{else}}
		{{if $image->hasReviewed()}}
			<!-- Already reviewed -->
		{{elseif $image->locked()}}
			{template="commentUnavailable" group="forms" location="front" app="gallery" params="'item_locked_cannot_review'"}
		{{elseif \IPS\Member::loggedin()->restrict_post}}
			{{if \IPS\Member::loggedIn()->restrict_post == -1}}
				{template="reviewUnavailable" group="forms" location="front" app="gallery" params="'restricted_cannot_comment'"}
			{{else}}
				{template="reviewUnavailable" group="forms" location="front" app="gallery" params="'restricted_cannot_comment', \IPS\Member::loggedIn()->warnings(5,NULL,'rpa'), \IPS\Member::loggedIn()->restrict_post"}
			{{endif}}
		{{elseif \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings']}}
			{template="reviewUnavailable" group="forms" location="front" app="gallery" params="'unacknowledged_warning_cannot_post', \IPS\Member::loggedIn()->warnings( 1, FALSE )"}
		{{endif}}
	{{endif}}
</div>]]></template>
 <template template_group="view" template_name="rssContent" template_data="$image" template_location="front" template_app="gallery"><![CDATA[{$image->description|raw}
<p>
	<a href='{$image->url()}' title='{$image->caption}'><img src='{file="$image->masked_file_name" extension="gallery_Images"}' title="{$image->caption}" alt="{$image->caption}"></a>
</p>]]></template>
 <template template_group="widgets" template_name="albums" template_data="$albums, $title, $orientation='vertical'" template_location="front" template_app="gallery"><![CDATA[{{if !empty( $albums ) }}
	<h3 class='ipsType_reset ipsWidget_title'>{$title}</h3>
		{{if $orientation == 'horizontal'}}
			<div class='ipsWidget_inner ipsPad'>
				<div class='ipsCarousel ipsClearfix' data-ipsCarousel data-ipsCarousel-showDots>
					<div class='ipsCarousel_inner'>
						<ul class='cGalleryCarousel ipsGrid ipsGrid_collapsePhone' data-role="carouselItems">
		{{else}}
			<div class='ipsWidget_inner'>
				<div class='ipsPad_half'>
					<ul class='ipsList_reset cGalleryWidgetList'>
        {{endif}}

		{{foreach $albums as $album}}
			<li class='cGalleryWidget cGalleryWidget_album {{if $orientation == 'horizontal'}}ipsCarousel_item{{endif}}'>
				<a href='{$album->url()}' {{if $album->asNode()->coverPhoto('small')}}style='background-image: url( "{backgroundimage="$album->asNode()->coverPhoto('small')"}" );'{{endif}} class='ipsThumb ipsThumb_bg{{if $orientation == 'vertical'}} cGalleryWidget_verticalThumb{{else}} cGalleryAlbumThumb{{endif}} cGalleryTrimmedImage{{if !$album->asNode()->coverPhoto('small') AND $album->asNode()->lastImage() AND $album->asNode()->lastImage()->media}} ipsNoThumb ipsNoThumb_video cGalleryNoThumb_full ipsType_left{{endif}}'>
					<h2 class='ipsType_sectionHead ipsTruncate ipsTruncate_line'>
						{$album->name}
					</h2>
					{{if $album->asNode()->coverPhoto('small')}}<img src='{$album->asNode()->coverPhoto('small')}' alt="{$album->name}">{{endif}}
					<ul class='ipsList_inline ipsType_left cGalleryWidget_albumInfo'>
						<li>
							<span>{lang="byline" sprintf="$album->author()->name"}</span>
							{datetime="$album->mapped('updated')"}
						</li>
						{{if $album->use_comments}}
							<li class='ipsPos_right' data-ipsTooltip title='{lang="num_comments" pluralize="$album->comments"}'><i class='fa fa-comment'></i> {$album->comments}</li>
						{{endif}}
						{{if $album->allow_comments}}
							<li class='ipsPos_right' data-ipsTooltip title='{lang="gallery_image_comments_s" pluralize="$album->count_comments"}'><i class='fa fa-comment'></i> {$album->count_comments}</li>
						{{endif}}
						<li class='ipsPos_right' data-ipsTooltip title='{lang="cat_img_count" pluralize="$album->count_imgs"}'><i class='fa fa-camera'></i> {$album->count_imgs}</li>
					</ul>
				</a>
			</li>
		{{endforeach}}

		{{if $orientation == 'vertical'}}
					</ul>
				</div>
		{{else}}
						</ul>
					</div>
					<span class='ipsCarousel_shadow ipsCarousel_shadowLeft'></span>
					<span class='ipsCarousel_shadow ipsCarousel_shadowRight'></span>
					<a href='#' class='ipsCarousel_nav ipsHide' data-action='prev'><i class='fa fa-chevron-left'></i></a>
					<a href='#' class='ipsCarousel_nav ipsHide' data-action='next'><i class='fa fa-chevron-right'></i></a>
				</div>
		{{endif}}
			</div>
{{endif}}]]></template>
 <template template_group="widgets" template_name="galleryStats" template_data="$stats, $latestImage, $orientation='vertical'" template_location="front" template_app="gallery"><![CDATA[<h3 class='ipsType_reset ipsWidget_title'>{lang="block_galleryStats"}</h3>
<div class='ipsWidget_inner'>
	{{if $orientation == 'vertical'}}
		<div class='ipsPad_half'>		
			<ul class='ipsDataList' id='elGalleryStats'>
				<li class='ipsDataItem'>
					<div class='ipsDataItem_main ipsPos_middle'>
						<strong>{lang="total_images_front_v" pluralize="$stats['totalImages']"}</strong>
					</div>
					<div class='ipsDataItem_stats ipsDataItem_statsLarge'>
						<span class='ipsDataItem_stats_number'>{number="$stats['totalImages']"}</span>
					</div>
				</li>
				{{if $stats['totalComments']}}
					<li class='ipsDataItem'>
						<div class='ipsDataItem_main ipsPos_middle'>
							<strong>{lang="stats_total_comments_v" pluralize="$stats['totalComments']"}</strong>
						</div>
						<div class='ipsDataItem_stats ipsDataItem_statsLarge'>
							<span class='ipsDataItem_stats_number'>{number="$stats['totalComments']"}</span>
						</div>
					</li>
				{{endif}}
				{{if $stats['totalAlbums']}}
					<li class='ipsDataItem'>
						<div class='ipsDataItem_main ipsPos_middle'>
							<strong>{lang="total_albums_v" pluralize="$stats['totalAlbums']"}</strong>
						</div>
						<div class='ipsDataItem_stats ipsDataItem_statsLarge'>
							<span class='ipsDataItem_stats_number'>{number="$stats['totalAlbums']"}</span>
						</div>
					</li>
				{{endif}}
			</ul>
			{{if $latestImage}}
				<hr class='ipsHr'>
				{template="latestImage" group="widgets" app="gallery" params="$latestImage, $orientation"}
			{{endif}}
		</div>
	{{else}}
		{{$columns = 1;}}
		{{$columns += ( $stats['totalComments'] ) ? 1 : 0;}}
		{{$columns += ( $stats['totalAlbums'] ) ? 1 : 0;}}
		{{$span = 12 / $columns;}}
		<div class='ipsGrid ipsGrid_collapsePhone ipsWidget_stats'>
			<div class='ipsGrid_span{$span} ipsType_center'>
				<span class='ipsType_large ipsWidget_statsCount'>{number="$stats['totalImages']"}</span><br>
				<span class='ipsType_light ipsType_medium'>{lang="total_images_front_h" pluralize="$stats['totalImages']"}</span>
			</div>
			{{if $stats['totalComments']}}
				<div class='ipsGrid_span{$span} ipsType_center'>
					<span class='ipsType_large ipsWidget_statsCount'>{number="$stats['totalComments']"}</span><br>
					<span class='ipsType_light ipsType_medium'>{lang="stats_total_comments_h" pluralize="$stats['totalComments']"}</span>
				</div>
			{{endif}}
			{{if $stats['totalAlbums']}}
				<div class='ipsGrid_span{$span} ipsType_center'>
					<span class='ipsType_large ipsWidget_statsCount'>{number="$stats['totalAlbums']"}</span><br>
					<span class='ipsType_light ipsType_medium'>{lang="total_albums_h" pluralize="$stats['totalAlbums']"}</span>
				</div>
			{{endif}}
		</div>
	{{endif}}
</div>]]></template>
 <template template_group="widgets" template_name="imageFeed" template_data="$images, $title, $orientation='vertical'" template_location="front" template_app="gallery"><![CDATA[{{if !empty( $images ) }}
	<h3 class='ipsType_reset ipsWidget_title'>{$title}</h3>
        {{if $orientation == 'horizontal'}}
            <div class='ipsWidget_inner ipsPad'>
        {{else}}
            <div class='ipsWidget_inner'>
        {{endif}}
		{{if $orientation == 'vertical'}}
			<div class='ipsPad_half'>
				<ul class='ipsList_reset cGalleryWidgetList' data-controller='gallery.front.browse.imageLightbox'>
					{{foreach $images as $image}}
						{template="imageRow" group="widgets" app="gallery" params="$image, $orientation"}
					{{endforeach}}
				</ul>
			</div>
		{{else}}
	        <div class='ipsCarousel ipsClearfix' data-ipsCarousel data-ipsCarousel-showDots>
	        	<div class='ipsCarousel_inner'>
					<ul class='cGalleryCarousel ipsGrid ipsGrid_collapsePhone' data-role="carouselItems" data-controller='gallery.front.browse.imageLightbox'>
						{{foreach $images as $idx => $image}}
							{template="imageRow" group="widgets" app="gallery" params="$image, $orientation"}
						{{endforeach}}
					</ul>
				</div>
	            <span class='ipsCarousel_shadow ipsCarousel_shadowLeft'></span>
	            <span class='ipsCarousel_shadow ipsCarousel_shadowRight'></span>
	            <a href='#' class='ipsCarousel_nav ipsHide' data-action='prev'><i class='fa fa-chevron-left'></i></a>
	            <a href='#' class='ipsCarousel_nav ipsHide' data-action='next'><i class='fa fa-chevron-right'></i></a>
	        </div>
		{{endif}}
	</div>
{{endif}}]]></template>
 <template template_group="widgets" template_name="imageRow" template_data="$image, $orientation='vertical'" template_location="front" template_app="gallery"><![CDATA[<li class='cGalleryWidget {{if $orientation == 'horizontal'}}ipsCarousel_item{{endif}}' {{if $image->small_file_name}}data-lazyLoad='{file="$image->small_file_name" extension="gallery_Images"}'{{endif}}>
	{{if $image->small_file_name}}
		<a href='{$image->url()}' title='{lang="view_this_image" sprintf="$image->caption"}' class='ipsThumb ipsThumb_bg{{if $orientation == 'vertical'}} cGalleryWidget_verticalThumb{{else}} ipsThumb_large{{endif}}' {{if $orientation == 'vertical'}}style='background-image: url("{backgroundimage="\IPS\File::get( 'gallery_Images', $image->small_file_name )->url"}");'{{else}}data-srcBg{{endif}} data-imageLightbox>
			<img {{if $orientation == 'vertical'}}src='{file="$image->small_file_name" extension="gallery_Images"}'{{else}}data-src{{endif}} alt="{$image->caption}">
		</a>
	{{else}}
		<a href='{$image->url()}' title='{lang="view_this_video" sprintf="$image->caption"}' class='ipsNoThumb ipsNoThumb_video ipsThumb_bg {{if $orientation == 'vertical'}} cGalleryWidget_verticalThumb{{else}} ipsThumb_large{{endif}}' data-imageLightbox></a>
	{{endif}}
	{{if $image->directContainer()->allow_comments}}
		<div class="cGalleryWidget_comments {{if $image->comments === 0}}ipsFaded{{endif}}" data-ipsTooltip title='{lang="num_comments" pluralize="$image->comments"}'>
			<i class='fa fa-comment'></i> {$image->comments}
		</div>
	{{endif}}
	<div class='ipsSpacer_top ipsSpacer_half cGalleryWidgetInfo'>
		{{if $image->unread()}}
			<div class='ipsTruncate ipsTruncate_line'>
				<a href="{$image->url()}" title='{lang="view_this_image" sprintf="$image->caption"}' class='cGalleryWidget_title ipsType_medium'>
					<span class="ipsItemStatus ipsItemStatus_small"><i class="fa fa-circle"></i></span>
					<strong>{$image->caption}</strong>
				</a>
			</div>
		{{else}}
			<div class='ipsTruncate ipsTruncate_line'>
				<a href="{$image->url()}" title='{lang="view_this_image" sprintf="$image->caption"}' class='cGalleryWidget_title ipsType_medium'>
					{$image->caption}
				</a>
			</div>
		{{endif}}
		<span class='ipsType_medium ipsType_blendLinks ipsTruncate ipsTruncate_line'>
			{lang="byline" htmlsprintf="$image->author()->link()"}
			{datetime="$image->mapped('date')"}
		</span>
	</div>
</li>]]></template>
 <template template_group="widgets" template_name="latestImage" template_data="$latestImage, $orientation='vertical'" template_location="front" template_app="gallery"><![CDATA[<div id='elGalleryStatsLatest' class='ipsClearfix cGalleryWidget'>
	<strong class='ipsType_minorHeading'>{lang="latest_image"}</strong><br>
	{{if $latestImage->small_file_name}}
		<a href='{$latestImage->url()}' title='{lang="view_this_image" sprintf="$latestImage->caption"}' class='ipsThumb ipsThumb_bg{{if $orientation == 'vertical'}} cGalleryWidget_verticalThumb{{endif}}' style='background-image: url("{backgroundimage="\IPS\File::get( 'gallery_Images', $latestImage->small_file_name )->url"}");'>
			<img src='{file="$latestImage->small_file_name" extension="gallery_Images"}' alt="{$latestImage->caption}">
		</a>
	{{else}}
		<a href='{$latestImage->url()}' title='{lang="view_this_video" sprintf="$latestImage->caption"}' class='ipsNoThumb ipsNoThumb_video ipsThumb_bg{{if $orientation == 'vertical'}} cGalleryWidget_verticalThumb{{endif}}'></a>
	{{endif}}
	{{if $latestImage->directContainer()->allow_comments}}
		<div class="cGalleryWidget_comments {{if $latestImage->comments === 0}}ipsFaded{{endif}}" data-ipsTooltip title='{lang="num_comments" pluralize="$latestImage->comments"}'>
			<i class='fa fa-comment'></i> {$latestImage->comments}
		</div>
	{{endif}}
	<div class='ipsSpacer_top ipsSpacer_half cGalleryWidgetInfo'>
		{{if $latestImage->unread()}}
		<div class='ipsTruncate ipsTruncate_line'>
			<a href="{$latestImage->url()}" title='{lang="view_this_image" sprintf="$latestImage->caption"}' class='cGalleryWidget_title ipsType_medium'>
				<span class="ipsItemStatus ipsItemStatus_small"><i class="fa fa-circle"></i></span>
				<strong>{$latestImage->caption}</strong>
			</a>
		</div>
		{{else}}
		<div class='ipsTruncate ipsTruncate_line'>
			<a href="{$latestImage->url()}" title='{lang="view_this_image" sprintf="$latestImage->caption"}' class='cGalleryWidget_title ipsType_medium'>
				{$latestImage->caption}
			</a>
		</div>
		{{endif}}
		<span class='ipsType_medium ipsType_blendLinks'>
			{lang="byline" htmlsprintf="$latestImage->author()->link()"}
			{datetime="$latestImage->mapped('date')"}
		</span>
	</div>
</div>
]]></template>
 <template template_group="widgets" template_name="recentComments" template_data="$comments, $title, $orientation='vertical'" template_location="front" template_app="gallery"><![CDATA[{{if !empty( $comments ) }}
	<h3 class='ipsType_reset ipsWidget_title'>{$title}</h3>
	<div class='ipsPad_half ipsWidget_inner'>
		<ul class='ipsDataList ipsDataList_reducedSpacing'>
			{{foreach $comments as $comment}}
				<li class='ipsDataItem'>
					<div class='ipsDataItem_icon ipsPos_top'>
						{template="thumbImage" group="global" app="core" params="$comment->item()->small_file_name, $comment->item()->caption, 'tiny', '', 'view_this', '', 'gallery_Images'"}
					</div>
					<div class='ipsDataItem_main'>
						<div class='ipsContained ipsType_break'><a href="{$comment->url()}" title='{lang="view_this_image" sprintf="$comment->item()->caption"}' class='ipsType_medium ipsTruncate ipsTruncate_line'>{$comment->item()->caption}</a></div>
						<p class='ipsType_reset ipsType_light ipsType_medium ipsType_blendLinks'>{lang="byline_nodate" htmlsprintf="$comment->author()->link()"} &middot; <a href="{$comment->url()}" class='ipsDataItem_title ipsType_break ipsType_blendLinks'>{$comment->dateLine()|raw}</a></p>
						<div class='ipsType_richText ipsType_medium ipsSpacer_top ipsSpacer_half ipsType_break' data-ipsTruncate data-ipsTruncate-type="remove" data-ipsTruncate-size="2 lines">
							{$comment->truncated()|raw}
						</div>
					</div>
				</li>
			{{endforeach}}
		</ul>
	</div>
{{endif}}]]></template>
 <template template_group="widgets" template_name="recentImageReviews" template_data="$comments, $title, $orientation='vertical'" template_location="front" template_app="gallery"><![CDATA[{{if !empty( $comments ) }}
	<h3 class='ipsType_reset ipsWidget_title'>{$title}</h3>
	<div class='ipsPad_half ipsWidget_inner'>
		<ul class='ipsDataList ipsDataList_reducedSpacing'>
			{{foreach $comments as $comment}}
				<li class='ipsDataItem'>
					<div class='ipsDataItem_generic ipsDataItem_size1'>
						{template="thumbImage" group="global" app="core" params="$comment->item()->small_file_name, $comment->item()->caption, 'tiny', '', 'view_this', '', 'gallery_Images'"}
					</div>
					<div class='ipsDataItem_main'>
						<div class='ipsContained ipsType_break'><a href="{$comment->url()}" title='{lang="view_this_image" sprintf="$comment->item()->caption"}' class='ipsType_medium ipsTruncate ipsTruncate_line'>{$comment->item()->caption}</a></div>
						<p class='ipsType_reset ipsType_light ipsType_medium ipsType_blendLinks'>{lang="byline_nodate" htmlsprintf="$comment->author()->link()"}</p>
						{template="rating" group="global" location="front" app="core" params="'small', $comment->rating, \IPS\Settings::i()->reviews_rating_out_of"}
						<div class='ipsType_richText ipsType_medium ipsSpacer_top ipsSpacer_half' data-ipsTruncate data-ipsTruncate-type="remove" data-ipsTruncate-size="2 lines">
							{$comment->truncated()|raw}
						</div>
					</div>
				</li>
			{{endforeach}}
		</ul>
	</div>
{{endif}}]]></template>
 <css css_location="front" css_app="gallery" css_attributes="" css_path="." css_name="embed.css">/* NEW EMBED */
.cGalleryEmbed a {
	display: block;
}

..cGalleryEmbed_albumStrip {
	white-space: nowrap;
}

.cGalleryEmbed_albumStrip li {
	width: 20%;
	min-width: 40px;
	float: left;
	position: relative;
}
	
	.cGalleryEmbed_albumStrip_mini li {
		width: 10%;
		min-width: 40px;
	}

	.cGalleryEmbed_albumStrip li:after {
		content: '';
		display: block;
		padding-bottom: 100%;
	}

.cGalleryEmbed_albumStrip li a {
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	position: absolute;
	top: 0;
	left: 0;
	right: 1px;
	bottom: 1px;
	line-height: 90px;
	font-size: 20px;
	text-align: center;
	color: #000;
	display: block;
}

	.cGalleryEmbed_albumStrip_mini li a {
		line-height: 48px;
		font-size: 15px;
	}

	.cGalleryEmbed_albumStrip li a span {
		opacity: 0.3;
	}

.cGalleryEmbed_albumStrip:not( .cGalleryEmbed_albumStrip_mini ) {
	margin: -30px 15px 0;
	border: 1px solid rgba(0,0,0,0.05);
}

.ipsRichEmbed_mastheadBg.cGalleryEmbed_imageComment a {
	height: 220px;
}

/* OLD EMBED */
.ipsEmbedded .cGalleryTrimmedImage {
	background-color: #333;
	background-size: cover;
	background-position: 50%;
	background-repeat: no-repeat;
	overflow: hidden;
}

	.ipsEmbedded .cGalleryTrimmedImage img {
		display: none;
	}

	.ipsEmbedded .cGalleryTrimmedImage a {
		width: 120px;
		height: 120px;
		display: block;
	}

.ipsEmbedded .cGallery_albumImages {
	margin-top: 5px;
}

.ipsEmbedded .cGallery_albumImage a {
	width: 40px;
	height: 40px;
	border: 2px solid #fff;
}

.ipsEmbedded .cGallery_albumStats {
	color: #fff;
	font-weight: bold;
	position: absolute;
	bottom: 5px;
	text-shadow: 0px 1px 0px rgba(0,0,0,0.5);
}
html[dir=&quot;ltr&quot;] .ipsEmbedded .cGallery_albumStats {
	right: 5px;
}
html[dir=&quot;rtl&quot;] .ipsEmbedded .cGallery_albumStats {
	left: 5px;
}</css>
 <css css_location="front" css_app="gallery" css_attributes="" css_path="." css_name="gallery_responsive.css"><![CDATA[/* PHONES */
@media screen and (max-width: 767px) {
	.ipsApp .cGalleryAlbums_recent {
		padding: 0;
		margin-bottom: 3px;
	}

	.cGalleryAlbums_recent > ul {
		height: 134px;
	}
	html[dir="ltr"] .cGalleryAlbums_recent > ul {
		padding-left: 138px;
	}
	html[dir="rtl"] .cGalleryAlbums_recent > ul {
		padding-right: 138px;
	}

	.cGalleryAlbums_recent > ul > li:first-child,
	.cGalleryAlbums_recent > ul > li:first-child a {
		width: 134px;
		height: 134px;
	}

	.cGalleryAlbums_recent > ul > li,
	.cGalleryAlbums_recent > ul > li a {
		width: 65px;
		height: 65px;
	}

	.cGalleryAlbums_recent + ul.ipsList_inline {
		padding-left: 4px;
	}

	.cGalleryUpdated {
		margin-left: 6px;
	}

	/* IMAGE VIEW */
	#elGalleryImage {
		padding: 2px;
	}

	body[data-pageapp="gallery"][data-pagecontroller="view"] .cWidgetContainer:not( .ipsHide ) + div .elGalleryHeader {
		margin-top: 10px;
	}

	.ipsStreamItem_condensed.ipsStreamItem.ipsStreamItem_contentBlock.cGalleryAlbumSearchResult {
		padding-bottom: 40px;
	}

	.cGalleryRowsList .ipsThumb.ipsThumb_medium.ipsThumb_bg {
		max-width: 100%;
		width: 100%;
		margin-bottom: 7px;
	}

	html[dir="ltr"] .cGalleryRowsList .ipsDataItem_main {
		padding-left: 0;
	}
	html[dir="rtl"] .cGalleryRowsList .ipsDataItem_main {
		padding-right: 0;
	}

	html[dir="ltr"] .cGalleryRowsList .ipsDataItem_modCheck {
		right: 10px;
		left: auto;
		top: 150px;
	}
	html[dir="rtl"] .cGalleryRowsList .ipsDataItem_modCheck {
		left: 10px;
		right: auto;
		top: 150px;
	}
	
	html[dir="ltr"] ul.cGallerySearchAlbumThumbs.ipsList_inline {
		margin-left: 0px;
	}
	html[dir="rtl"] ul.cGallerySearchAlbumThumbs.ipsList_inline {
		margin-right: 0px;
	}


	/* Lightbox */
	#cLightbox {
		overflow: auto;
	}

	.cGalleryLightbox .elGalleryImage {
		position: relative;
		top: auto;
		left: auto;
		right: auto;
		bottom: auto;
		width: 100%;
	}

	.cGalleryLightbox {
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		display: block;
	}

	.cGalleryLightbox_inner {
		position: relative;
		display: block;
	}

	.cGalleryLightbox_info {
		width: 100%;
		min-width: 0;
		overflow: visible;
	}

	.cGalleryImageTitle {
		top: 11px;
	}
	html[dir="ltr"] .cGalleryImageTitle {
		left: 15px;
	}
	html[dir="rtl"] .cGalleryImageTitle {
		right: 15px;
	}

	html[dir="ltr"] .elGalleryImage .elGalleryImageNav_prev,
	html[dir="rtl"] .elGalleryImage .elGalleryImageNav_next,
	html[dir="rtl"] .elGalleryImage .elGalleryImageNav_prev,
	html[dir="ltr"] .elGalleryImage .elGalleryImageNav_next {
		transform: translateX(0);
	}

	.cGalleryLightbox_info a.ipsReact_reaction:after {
		width: 60px;
		height: 60px;
	}
}]]></css>
 <css css_location="front" css_app="gallery" css_attributes="" css_path="." css_name="gallery.css"><![CDATA[/* Gallery rework */
.elGalleryHeader {
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 100%;
}

.elGalleryImage {
	background: transparent;
	min-height: 550px;
	width: 100%;
	padding: 0px;
	text-align: center;
	z-index: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

	.cGalleryLightbox .elGalleryImage {
		min-height: 300px;
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		overflow: hidden;
	}

.cGalleryImageFade {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	{prefix="transition" value="opacity 0.3s ease-in-out"};
	opacity: 0;
	pointer-events: none;
}

.cGalleryImageFade:before,
.cGalleryImageFade:after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	pointer-events: none;
	z-index: -1;
}

.cGalleryImageFade:before {
	top: 0;
	min-height: 150px;
	background: linear-gradient(rgba(0, 0, 0, .7), rgba(0,0,0,0));
}

.cGalleryImageFade:after {
	bottom: 0;
	min-height: 80px;
	background: linear-gradient(rgba(0,0,0,0), rgba(0, 0, 0, .7));
}

.elGalleryImage:hover .cGalleryImageFade,
.elGalleryImage.cGalleryImageHover .cGalleryImageFade {
	opacity: 1;
}

.cGalleryMiniAlbum li {
	position: relative;
}

	.cGalleryMiniAlbum li a {
		position: absolute;
		top: 0;
		left: 0;
		bottom: 0;
		right: 0;
	}

#elGalleryImageStats [data-ipsRating] > .ipsRating {
	float: none;
}

.elGalleryImageNav {
	overflow: hidden !important;
}

.elGalleryImageNav a {
	position: absolute;
	color: #fff;
	font-size: 60px;
	top: 50%;
	margin-top: -30px;
	padding: 0 15px;
	opacity: 0.2;
	{prefix="transition" value="all 0.2s ease-in-out"}
	z-index: 100;
}
	.elGalleryImage:hover .elGalleryImageNav a {
		opacity: 1;
		background: rgba(0,0,0,0.2);
	}
		.elGalleryImage:hover .elGalleryImageNav a:after {
			content: "";
			top: -70%;
			bottom: -10px;
			position: absolute;
			left: -150px;
			right: -150px;
		}

	html[dir="ltr"] .elGalleryImageNav_prev,
	html[dir="rtl"] .elGalleryImageNav_next {
		left: 0px;
	}
		html[dir="ltr"] .cGalleryLightbox .elGalleryImageNav_prev,
		html[dir="rtl"] .cGalleryLightbox .elGalleryImageNav_next {
			transform: translateX(-80px);
		}

	html[dir="ltr"] .elGalleryImageNav_next,
	html[dir="rtl"] .elGalleryImageNav_prev {
		right: 0px;
	}
		html[dir="ltr"] .cGalleryLightbox .elGalleryImageNav_next,
		html[dir="rtl"] .cGalleryLightbox .elGalleryImageNav_prev {
			transform: translateX(80px);
		}

	html[dir="ltr"] .elGalleryImage:hover .elGalleryImageNav_prev,
	html[dir="rtl"] .elGalleryImage:hover .elGalleryImageNav_next,
	html[dir="rtl"] .elGalleryImage:hover .elGalleryImageNav_prev,
	html[dir="ltr"] .elGalleryImage:hover .elGalleryImageNav_next {
		transform: translateX(0);
	}

/* PATCHWORK */
.cGalleryPatchwork_item {
	display: block;
	float: left;
	background-size: cover;
	background-color: #333;
	position: relative;
	overflow: hidden;
	text-shadow: 1px 1px 0px rgba(0,0,0,0.8);
	text-align: left;
	transition: 0.1s transform ease-in-out;
}
html[dir="rtl"] .cGalleryPatchwork_item {
	float: right;
	text-align: right;
}
	
	.cGalleryPatchwork_item > a {
		position: absolute;
		display: block;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
	}

	.cGalleryPatchwork_item [data-role='moderation'] {
		position: absolute;
		top: 5px;
	}
	html[dir="ltr"] .cGalleryPatchwork_item [data-role='moderation'] {
		right: 5px;
	}
	html[dir="rtl"] .cGalleryPatchwork_item [data-role='moderation'] {
		left: 5px;
	}

	.cGalleryPatchwork_item [data-commentCount='0'] {
		opacity: 0.3;
	}

	.cGalleryPatchwork_item.ipsNoThumb {
		text-shadow: none;
	}

.cGalleryPatchwork_image {
	position: relative;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
html[dir="ltr"] .cGalleryPatchwork_image {
	left: 0;
}
html[dir="rtl"] .cGalleryPatchwork_image {
	right: 0;
}

.cGalleryPatchwork_item .ipsPhotoPanel {
	position: absolute;
	background: rgba(0,0,0,0.8);
	width: 100%;
	top: 0;
	line-height: 1.2;
	height: 42px;
	color: #fff;
	{prefix="transition" value="opacity 0.1s linear"}
}
html[dir="ltr"] .cGalleryPatchwork_item .ipsPhotoPanel {
	left: 0;
	padding: 7px 7px 0 7px;
}
html[dir="rtl"] .cGalleryPatchwork_item .ipsPhotoPanel {
	right: 0;
	padding: 7px 7px 0 7px;
}

	.cGalleryPatchwork_item .ipsPhotoPanel span {
		line-height: inherit;
		display: block;
		width: 100%;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.cGalleryPatchwork_item .ipsPhotoPanel span + span {
		opacity: 0.7;
	}

	.cGalleryPatchwork_item:hover {
		transform: scale(1.05);
		z-index: 2000;
	}

/* Image list patchwork */
.cGalleryPatchwork_list .cGalleryPatchwork_stats {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	font-size: 13px;
	color: #fff;
	padding: 7px;
	background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.6)));
	background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.6) 100%);
	background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.6) 100%);
	background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.6) 100%);
	background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.6) 100%);
}

/* Featured/New patchwork */
ol.cGalleryPatchwork_index.ipsPad, ol.cGalleryPatchwork_list.ipsPad {
	padding-top: 11px;
	padding-bottom: 11px;
}

.cGalleryPatchwork_index .cGalleryPatchwork_item .cGalleryPatchwork_comments {
	position: absolute;
	bottom: 7px;
	color: #fff;
	font-size: 12px;
}
html[dir="ltr"] .cGalleryPatchwork_index .cGalleryPatchwork_item .cGalleryPatchwork_comments {
	right: 7px;
}
html[dir="rtl"] .cGalleryPatchwork_index .cGalleryPatchwork_item .cGalleryPatchwork_comments {
	left: 7px;
}

/* CATEGORIES */	
.cGalleryCats > .ipsGrid {
	margin-bottom: -15px;
}

.cGalleryCat > a {
	display: block;
	height: 150px;
	position: relative;
	color: #fff;
}
	
	.cGalleryCat > a:before {
		content: '';
		display: block;
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		height: 53px;
		background: rgba(0,0,0,0.8);
	}
	
	.cGalleryCat .ipsType_sectionHead,
	.cGalleryCat .cGalleryCat_info {
		position: absolute;
		left: 7px;
		right: 7px;
		text-shadow: 1px 1px 1px rgba(0,0,0,1);
	}

		.cGalleryCat .cGalleryCat_info > li:first-child {
			position: absolute;
			top: 0;
		}

	.cGalleryCat .ipsType_sectionHead {
		bottom: 23px;
		color: #fff;
		font-size: 15px;
	}

	.cGalleryCat .cGalleryCat_info {
		bottom: 7px;
		font-size: 11px;
	}

html[dir="ltr"] .ipsToolList.ipsToolList_horizontal.ipsPos_left.cGalleryAlbumControls > li:last-child {
	margin-right: 0px;
}

/* ALBUM LIST IN A CATEGORY */
.cGalleryAlbums > li:not( :last-child ) {
	margin-bottom: 7px;
}

.cGalleryAlbums_recent > ul {
	height: 204px;
	position: relative;
	overflow: hidden;
}
html[dir="ltr"] .cGalleryAlbums_recent > ul {
	padding-left: 208px;
}
html[dir="rtl"] .cGalleryAlbums_recent > ul {
	padding-right: 208px;
}

.cGalleryAlbums_recent > ul > li {
	width: 100px;
	height: 100px;
	float: left;
	position: relative;
	margin: 0 0 4px 4px;
}
html[dir="rtl"] .cGalleryAlbums_recent > ul > li {
	float: right;
	margin: 0 4px 4px 0;
}
	
	.cGalleryAlbums_recent > ul > li a {
		display: block;
		width: 100px;
		height: 100px;
	}

	.cGalleryAlbums_recent > ul > li span {
		padding-right: 7px;
		text-align: right;
		font-size: 11px;
		font-weight: bold;
		color: #fff;
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		line-height: 26px;
		text-shadow: 1px 1px 0px rgba(0,0,0,0.8);
		background-image: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
		background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.6)));
		background-image: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.6) 100%);
		background-image: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.6) 100%);
		background-image: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.6) 100%);
		background-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.6) 100%);
	}
	html[dir="rtl"] .cGalleryAlbums_recent > ul > li span {
		text-align: left;
	}

	.cGalleryAlbums_recent > ul > li img {
		display: none;
	}

	.cGalleryAlbums_recent > ul > li:first-child {
		width: 204px;
		height: 204px;
		overflow: hidden;
		position: absolute;
	}
	html[dir="ltr"] .cGalleryAlbums_recent > ul > li:first-child {
		left: 0;
	}
	html[dir="rtl"] .cGalleryAlbums_recent > ul > li:first-child {
		right: 0;
	}

		.cGalleryAlbums_recent > ul > li:first-child a {
			width: 204px;
			height: 204px;
		}

html[dir="ltr"] .cGalleryEvents .ipsDataList .ipsDataItem,
html[dir="ltr"] .cGalleryEvents .ipsDataList .ipsDataItem_icon {
	padding-left: 0 !important;
}
html[dir="rtl"] .cGalleryEvents .ipsDataList .ipsDataItem,
html[dir="rtl"] .cGalleryEvents .ipsDataList .ipsDataItem_icon {
	padding-right: 0 !important;
}

.cGalleryImageList > li {
	padding: 7px;
	border: 1px solid rgba(0,0,0,0.05);
}

	.cGalleryImageList > li > div {
		width: 100%;
		margin-bottom: 5px;
	}

		/* For non-js, we need a fixed height because the JS won't be handling it */
		.ipsJS_none .cGalleryImageList > li > div {
			height: 180px;
		}

		.cGalleryImageList > li > div + ul {
			height: 26px;
			line-height: 24px;
		}

.cGalleryImageItem.cGalleryImageItem_selected {
	background-color: {theme="selected"};
}

.cGalleryImageItem_image {
	display: block;
	position: relative;
	max-width: 100%;
	height: 100%;
}

.cGalleryLargeList > li {
	margin-bottom: 15px;
	border: 1px solid rgba(0,0,0,0.05);
}

	.cGalleryLargeList > li img {
		display: block;
		margin: 0 auto 10px auto;
	}

/* IMAGE VIEW PAGE */
.cGalleryViewImage {
	display: inline-block;
	position: relative;
	background: #222;
	z-index: -3;
	/*width: 100% !important;*/
}

	.cGalleryViewImage img[data-role="theImage"] {
		z-index: -2;
		position: relative;
	}

	.cGalleryImageTitle {
		text-align: left;
		z-index: 100;
		pointer-events: auto;
	}

		.cGalleryImageTitle , .cGalleryImageTitle .ipsType_pageTitle, .cGalleryImageTitle .ipsType_pageTitle a,
		.cGalleryImageTitle .ipsType_minorHeading, .cGalleryImageTitle a {
			color: #fff;
			font-weight: 300;
		}

		.cGalleryImageTitle .ipsType_pageTitle {
			font-size: 20px;
		}

	.cGalleryCreditInfo {
		text-align: left;
		color: #fff;
		text-shadow: 2px 2px 5px #000;
		pointer-events: auto;
	}
	
	.cGalleryViewImage_controls {
		z-index: 100;
		pointer-events: auto;
	}

	[data-role="imageComments"] .ipsTabs_panels.ipsTabs_contained .ipsTabs_panel {
		margin: 15px 0px 0px 0px;
		padding: 0px 0px 0px 0px;
	}

.cGalleryViewImage_options {
	margin-bottom: 5px;
}

.cGalleryComment_ipTools {
	text-align: right;
}

[data-role="imageComments"] .ipsTabs_panel .ipsRecommendedComments {
	margin: -15px 0px 5px 0px;
}

.elGalleryImage .ipsButton.ipsButton_link {
	background: rgba(0,0,0,0.1) !important;
	color: #d0d0d0;
	border: 1px solid #d0d0d0 !important;
}

.elGalleryImage .ipsButton.ipsButton_primary {
	background: #fff !important;
	color: #000;
	border: 1px solid #fff !important;
}
	
	html[dir="ltr"] .elGalleryImage .ipsButton.ipsButton_link,
	html[dir="ltr"] .elGalleryImage .ipsButton.ipsButton_primary {
		margin-left: 3px;
	}
	html[dir="rtl"] .elGalleryImage .ipsButton.ipsButton_link,
	html[dir="rtl"] .elGalleryImage .ipsButton.ipsButton_primary {
		margin-right: 3px;
	}

	.elGalleryImage .ipsPromote .ipsPromote_icon {
		background: transparent;
	}

	
.cGalleryExif .fa-camera {
	font-size: 42px;
	line-height: 58px;
}

.cGalleryExif_data {}

	.cGalleryExif_data li {
		border: 1px solid #5d5d5d;
		background: #fff;
		border-radius: 3px;
		line-height: 19px;
		height: 20px;
		font-size: 10px;
		font-weight: bold;
		margin: 2px 2px;
	}
	html[dir="ltr"] .cGalleryExif_data li {
		padding-right: 6px;
		margin-right: 0px;
	}
	html[dir="rtl"] .cGalleryExif_data li {
		padding-left: 6px;
		margin-left: 0px;
	}

		.cGalleryExif_data li span {
			background: #5d5d5d;
			color: #fff;
			width: 30px;
			font-size: 15px;
			display: inline-block;
			text-align: center;
		}
		html[dir="ltr"] .cGalleryExif_data li span {
			float: left;
			padding: 0 8px 0 6px;
			margin-right: 6px;
			border-radius: 2px 0 0 2px;
		}
		html[dir="rtl"] .cGalleryExif_data li span {
			float: right;
			padding: 0 6px 0 8px;
			margin-left: 6px;
			border-radius: 0 3px 3px 0;
		}

	.cGalleryExif .cGalleryExif_f {
		font-family: 'Palatino', 'Times New Roman';
		font-style: italic;
		font-weight: bold;
	}

	.cGalleryExif .cGalleryExif_iso {
		font-size: 11px;
		padding: 0;
	}

/* NOTES */
.cGalleryViewImage_addNote {
	cursor: crosshair;
}

.cGalleryViewImage:hover .cGalleryNote {
	opacity: 1;
}

.cGalleryNote {
	position: absolute;
	opacity: 0;
}

.cGalleryNote_border {
	border: 1px solid #000;
	height: 100%;
	background: rgba(255,255,255,0.0001);
}

	.cGalleryNote_border:after {
		position: absolute;
		left: 1px;
		right: 1px;
		top: 1px;
		bottom: 1px;
		content: '';
		display: block;
		border: 1px solid #ccc;
	}

	.cGalleryNote_editing .cGalleryNote_border,
	.cGalleryNote_editing .cGalleryNote_border:after {
		border-style: dashed;
		opacity: 1;
	}

.cGalleryNote_editing {
	opacity: 1 !important;
}

	.cGalleryNote_editing .cGalleryNote_note {
		opacity: 1 !important;
		display: block !important;
		max-width: 220px;
		width: 220px;
		padding: 4px;
		pointer-events: auto;
		z-index: 1000;
	}

		.cGalleryNote_editing .cGalleryNote_note ul {
			text-align: left;
			margin-top: 5px;
		}
		html[dir="rtl"] .cGalleryNote_editing .cGalleryNote_note ul {
			text-align: right;
		}

		.cGalleryNote_editing .cGalleryNote_note a {
			color: #fff;
		}

		.cGalleryNote_editing .cGalleryNote_note textarea {
			font-size: 11px;
			color: #000;
		}

.cGalleryNote_note {
	width: -webkit-max-content;
	width: -moz-max-content;
	width: max-content;
	position: absolute;
	top: 100%;
	margin-top: 5px;
	background: #2a2a2a;
	color: #fff;
	font-size: 12px;
	border-radius: 2px;
	pointer-events: none;
}
	.cGalleryNote_note > div {
		width: 100%;
		max-width: 200px;
		padding: 4px 8px;
	}

html[dir="ltr"] .cGalleryNote_note {
	left: 0px;
}
html[dir="rtl"] .cGalleryNote_note {
	right: 0px;
}

.cGalleryNote_delete { 
	position: absolute;
	top: -10px;
	width: 24px;
	height: 24px;
	line-height: 19px;
	border-radius: 12px;
	background: #000;
	border: 1px solid #fff;
	color: #fff;
	font-size: 17px;
}
html[dir="ltr"] .cGalleryNote_delete {
	right: -10px;
}
html[dir="rtl"] .cGalleryNote_delete {
	left: -10px;
}

/* jQuery resizable styles */
.ui-resizable-handle { position: absolute; font-size: 0.1px; display: block; }
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize;	height: 7px; width: 100%; top: -5px; left: 0; }
.ui-resizable-s { cursor: s-resize;	height: 7px; width: 100%; bottom: -5px;	left: 0; }
.ui-resizable-e { cursor: e-resize; width: 7px;	right: -5px; top: 0; height: 100%; }
.ui-resizable-w { cursor: w-resize;	width: 7px;	left: -5px;	top: 0;	height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px;	top: -5px; }
.ui-icon-gripsmall-diagonal-se {
	background: url( "{resource="resizable.png" app="core" location="global"}" );
}
.ui-draggable { cursor: move;}

/* General style which creates the square thumb container */
.cGalleryTrimmedImage {
	background-color: #333;
	background-size: cover;
	background-position: 50%;
	background-repeat: no-repeat;
	overflow: hidden;
	border: .5px solid #333;
}

	.cGalleryTrimmedImage img {
		display: none;
	}

.cGalleryThumb {
	max-width: 170px;
	max-height: 170px;
}

.cGalleryAlbumThumb {
	width: 280px;
	height: 235px;
}

/* This is to make the video responsive in size
	See: http://3strandsmarketing.com/video-fluid-2.php */
/* top/bottom adjusted to avoid the 'fade' area */
.cGallery_videoContainer {
	position: absolute;
	top: 50px;
	left: 0;
	right: 0;
	bottom: 70px;
}

	.cGallery_videoContainer video {
		position: absolute;
		top: 0;
		width: 100%;
		height: 100%;
	}
	html[dir="ltr"] .cGallery_videoContainer video {
		left: 0;
	}
	html[dir="rtl"] .cGallery_videoContainer video {
		right: 0;
	}

ul.cGallerySearchAlbumThumbs.ipsList_inline,
ul.cGalleryManagedAlbumThumbs.ipsList_inline {
	position: absolute;
	bottom: 10px;
	overflow: hidden;
	width: 95%; /* Needs to account for margins added */
}
	ul.cGallerySearchAlbumThumbs.cGallerySearchExpanded.ipsList_inline,
	ul.cGalleryManagedAlbumThumbs.cGallerySearchExpanded.ipsList_inline {
		position: inherit;
	}
	
html[dir="ltr"] ul.cGallerySearchAlbumThumbs.ipsList_inline {
	margin-left: 85px;
}
html[dir="rtl"] ul.cGallerySearchAlbumThumbs.ipsList_inline {
	margin-right: 85px;
}

	html[dir="ltr"] ul.cGallerySearchAlbumThumbs.cGallerySearchExpanded.ipsList_inline {
		margin-left: 30px;
	}

	html[dir="rtl"] ul.cGallerySearchAlbumThumbs.cGallerySearchExpanded.ipsList_inline {
		margin-right: 30px;
	}

	html[dir="ltr"] ul.cGallerySearchAlbumThumbs.ipsList_inline > li,
	html[dir="ltr"] ul.cGalleryManagedAlbumThumbs.ipsList_inline > li {
		margin-right: 4px;
	}
	html[dir="rtl"] ul.cGallerySearchAlbumThumbs.ipsList_inline > li,
	html[dir="rtl"] ul.cGalleryManagedAlbumThumbs.ipsList_inline > li {
		margin-left: 4px;
	}
	 
		ul.cGallerySearchAlbumThumbs li span,
		ul.cGalleryManagedAlbumThumbs li span
		{
			max-width: 25px;
			max-height: 25px;
		}


/* Lightbox */
#cLightbox {} 

	#cLightbox .cLightboxBack {
		background-color: #000;
		opacity: 1.0;
	}

.cLightboxClose {
	background-color: #000;
	color: #fff;
	font-family: Arial, sans-serif;
	font-size: 28px;
	width: 40px;
	height: 40px;
	border-radius: 40px;
	line-height: 40px;
	text-align: center;
	position: absolute;
	top: 10px;
	z-index: 10;
	cursor: pointer;
}

	html[dir="ltr"] .cLightboxClose {
		right: 10px;
	}
	html[dir="rtl"] .cLightboxClose {
		left: 10px;
	}

.cGalleryLightbox {
	position: absolute;
	top: 20px;
	left: 20px;
	right: 20px;
	bottom: 20px;
	display: flex;
	align-items: center;
	justify-content: center;	
}

	.cGalleryLightbox_inner {
		display: flex;
		align-items: stretch;
		background: #111;
	}

		.cGalleryLightbox .cGalleryLightbox_inner {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			box-shadow: 0px 5px 55px rgba(0,0,0,0.4);
		}


.cGalleryLightbox_image {
	flex-grow: 1;
}

.cGalleryLightbox_info {
	width: 445px;
	min-width: 445px;
	background: #fff;
	overflow: auto;
}

.cGalleryImageTopBar,
.cGalleryImageBottomBar {
	position: absolute;
	left: 0;
	right: 0;
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	pointer-events: auto;
}

.cGalleryImageTopBar {
	top: 0;
	align-items: flex-start;
	padding: 20px 20px 0 20px;
}
.cGalleryImageBottomBar {
	bottom: 0;
	align-items: flex-end;
	padding: 0 20px 20px 20px;
}

.cGalleryControls {
	white-space: nowrap;
}

/* Customized styles for comments area inside lightbox */
.cGalleryLightbox_info [data-role="noComments"] {
	display: none;
}

.cGalleryLightbox_info [data-role="replyArea"] {
	padding: 4px;
	margin-top: 0;
}

.cGalleryLightbox_info .ipsComposeArea_dummy {
	padding: 7px 15px;
	font-size: 14px;
}

.cGalleryLightbox_info .ipsItemControls {
	border-top: 0;
	margin-top: 0;
}

.cGalleryLightbox_info .ipsComment [data-role="commentContent"] {
	margin-bottom: 10px;
}

.cGalleryLightbox_info .ipsTabs {
	background: {theme="area_background"};
	border-top: 1px solid rgba(0,0,0,0.1);
}

.cGalleryLightbox_info .ipsTabs_item,
.cGalleryLightbox_info .ipsTabs_item:hover {
	color: #333;
}

.cGalleryLightbox_info .cGuestTeaser .ipsGrid_span6 {
	float: none;
	width: 100%;
}

.cGalleryLightbox_info .cGuestTeaser_right {
	margin-top: 15px;
}

.cGalleryLightbox_info .cGuestTeaser .ipsType_pageTitle {
	font-size: 20px;
}

.cGalleryLightbox_info .ipsButtonRow {
	padding: 5px;
}

/* And lightbox comment editor stuff */
/* Todo: remove this when a 'slim' editor variant is available */
.cGalleryLightbox_info .ipsToolList.ipsToolList_horizontal .ipsToggle {
	transform: scale(0.8);
}

.cGalleryLightbox_info .ipsToolList.ipsToolList_horizontal label {
	font-size: 13px;
}

html[dir] .cGalleryLightbox_info .ipsToolList.ipsToolList_horizontal > li {
	margin-top: 2px;
}

html[dir] .cGalleryLightbox_info .ipsToolList.ipsToolList_horizontal > li:not( .ipsPos_left ) {
	margin: 0;
	float: none;
}

.cGalleryLightbox_info button[type="submit"][accesskey="s"] {
	width: 100%;
	margin-top: 10px;
}

.cGalleryLightbox_info .ipsComposeArea_dropZoneSmall .ipsList_inline > li.ipsPos_right {
	float: none;
}

.cGalleryLightbox_info .ipsComposeArea_dropZoneSmall .ipsList_inline > li.ipsPos_right .ipsButton_verySmall {
	line-height: 22px;
	margin-top: 7px;
	padding: 0 10px;
}

.cGalleryLightbox_info .ipsComposeArea_dropZone .fa-paperclip {
	font-size: 20px;
}

html[dir="ltr"] .cGalleryLightbox_info .ipsComposeArea_dropZone > div {
	margin-left: 25px;
}
html[dir="rtl"] .cGalleryLightbox_info .ipsComposeArea_dropZone > div {
	margin-right: 25px;
}

.cGalleryLightbox_info .ipsComposeArea_dropZone > div {
	margin-top: -3px;
}

.cGalleryNoThumb_full {
	width: 100%;
	height: 400px;
}
	.cGalleryNoThumb_full:after {
		font-size: 50px;
	}

.cGalleryLightbox_info .ipsRecommendedComments .ipsComment_recommendedFlag {
	z-index: 100;
}

.cGalleryLightbox_info .ipsRecommendedComments .ipsComment_recommendedFlag .ipsResponsive_hidePhone,
.cGalleryLightbox_info .ipsRecommendedComments .ipsComment_recommended > .ipsPos_right {
	display: none;
}

.cGalleryLightbox_info .ipsRecommendedComments .ipsColumn {
	display: block !important;
}

.cGalleryLightbox_info .ipsRecommendedComments .ipsColumn.ipsColumn_narrow {
	float: left;
	width: 70px;
}

.cGalleryLightbox_info .ipsRecommendedComments .ipsComment_header {
	padding: 0;
	margin: 0 0 15px 0;
}

html[dir] .cGalleryLightbox_info .ipsRecommendedComments .ipsComment_recommendedNote {
	margin-left: 0;
	margin-right: 0;
}

/* Full size image lightbox */
#cLightbox[data-fullScreen] .cLightboxClose,
#cLightbox[data-fullScreen] .cGalleryLightbox_info {
	display: none !important; /* Navigating in the lightbox will call elem.show() which sets an inline display: block style we want to ignore */
}

#cLightbox[data-fullScreen] .cGalleryLightbox {
	top: 0;
	bottom: 0;
	right: 0;
	left: 0;
}

#cLightbox[data-fullScreen] .cGalleryImageFade {
	-webkit-transition: none;
	transition: none;
	opacity: 1;
}

[data-role="toggleFullscreen"]:after {
	font-family: FontAwesome;
	content: "\f065";
}

	#cLightbox[data-fullScreen] [data-role="toggleFullscreen"]:after {
		content: "\f066";
	}]]></css>
 <css css_location="front" css_app="gallery" css_attributes="" css_path="." css_name="profile.css"><![CDATA[/* Styles used to display albums in profiles */

.cProfileAlbum {
	position: relative;
	z-index: 1;
}
	
	/*.cProfileAlbum:before, .cProfileAlbum:after {
		display: inline-block;
		content: '';
		width: 90%;
		height: 90%;
		position: absolute;
		background: #bbbbbb;
		z-index: -1;
		top: 0;
		left: 5%;
	}

		.cProfileAlbum:before {
			background: #dbdbdb;
			{prefix="transform" value="rotate(-3deg)"}
		}

		.cProfileAlbum:after {
			background: #ababab;
			{prefix="transform" value="rotate(4deg)"}
		}*/

	.cProfileAlbum > div {
		width: 100%;
		height: 100%;
		margin: 0 auto;
		border: 1px solid rgba(0,0,0,0.05);
	}

	.cProfileAlbum_image {
		display: block;
		position: relative;
		max-width: 100%;
		height: 100%;
		background-color: #333;
		background-size: cover;
		background-position: 50%;
		background-repeat: no-repeat;
		overflow: hidden;
	}

	.cProfileAlbum_image img {
		display: none;
	}

.cProfileAlbum .ipsType_sectionHead {
	font-size: 14px;
	text-align: left;
	display: block;
	padding: 7px;
	overflow: hidden;
	text-overflow: ellipsis;
	top: 0px;
	background: rgba(0,0,0,0.5);
	color: #fff;
}
]]></css>
 <css css_location="front" css_app="gallery" css_attributes="" css_path="." css_name="submit_responsive.css"><![CDATA[/* PHONES */
@media screen and (max-width: 767px) {

	.cGalleryDialog_inner {
		bottom: 0;
	}

	.cGalleryDialog .cGalleryDialog_titleAndUpload {
		right: 0 !important;
		padding-bottom: 30px;
	}

	#elGallerySubmit_imageUploader .ipsAttachment_dropZone {
		width: 100% !important;
		height: 150px !important;
	}

	#elGallerySubmit_imageUploader .ipsAttachment_dropZone:not( .ipsAttachment_dropZoneSmall ) > i:first-child {
		font-size: 70px;
	}

	#elGallerySubmit_imageUploader .ipsAttachment_fileList {
		padding-bottom: 80px;
	}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach {
			margin-right: 0;
			margin-bottom: 10px !important;
			width: 48%;
		}

			#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach:nth-child(odd) {
				margin-right: 4%;
			}

			#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach:first-child {
				margin-left: 0;
			}

			#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach:first-child,
			#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach:first-child + .ipsImageAttach {
				margin-top: 160px;
			}

	.cGallerySubmit_preview {
		height: 120px
	}

	.cGalleryDialog_close {
		width: 30px;
		height: 30px;
		line-height: 30px;
		border-radius: 30px;
		font-size: 22px;
		top: 5px;
		right: 5px;
	}

	.cGalleryDialog_content {
		top: 65px;
	}

	.cGalleryDialog_imageForm [data-role="imageForm"] {
		top: 105px;
	}

	/* Image details area on mobile is fixed */
	.cGallerySubmit_imageDetails {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 10000;
		padding: 15px;
	}

	/* Step 1: Choose album */
	.cGallerySubmit_albumChoice {
		margin-top: 0;
	}

		.cGallerySubmit_albumChoice > .ipsGrid_span6:first-child {
			margin-bottom: 30px;
		}

		#elGallerySubmit_albumChooser {
			min-height: none;
		}

	/* Step 2: Upload images */
	.cGallerySubmit_bottomBar {
		height: auto;
	}

		.cGallerySubmit_bottomBar button[type="submit"] {
			width: 100%;
		}

	/* Info panel */
	.cGallerySubmit_strip, .cGallerySubmit_infoForm, .cGallerySubmit_bottomBar, .cGallerySubmit_infoPanel {
		position: absolute;
	}

	html[dir] .cGallerySubmit_strip {
		top: 0;
		left: 0;
		right: 0;
		width: auto;
		height: 100px;
		white-space: nowrap;
		overflow-y: hidden;
	}

		.cGallerySubmit_strip ul {
			white-space: nowrap;
			overflow: visible;
		}

		.cGallerySubmit_strip li {
			white-space: nowrap;
			margin-bottom: 0;
			margin-right: 15px;
			display: inline-block;
		}

		.cGallerySubmit_strip .cGalleryTrimmedImage {
			width: 70px;
			height: 70px;
			border-width: 3px;
		}

			.cGallerySubmit_strip .cGalleryTrimmedImage a {
				width: 70px;
				height: 70px;
			}

		.cGallerySubmit_strip .cGallerySubmit_current:after {
			display: none;	
		}
	html[dir] .cGallerySubmit_infoForm {
		position: absolute;
		top: 100px;
		bottom: 0;
		left: 0;
		right: 0;
		padding-left: 20px;
		padding-right: 20px;
	}

	#elGallerySubmit_toolBar > ul {
		display: block;
	}

		/* Reset all items so they're blocks */
		#elGallerySubmit_toolBar > ul > li {
			display: block;
			margin: 0;
		}

		/* Make buttons a bit smaller */
		#elGallerySubmit_toolBar > ul > li .ipsButton {
			width: 100%;
			line-height: 32px;
			font-size: 12px;
		}

		/* Copyright/credit buttons - half-width so they share a line */
		#elGallerySubmit_toolBar > ul > li {
			width: 48%;
		}

		#elGallerySubmit_toolBar > ul > li:nth-child(odd) {
			float: left; /* Copyright - move left */
		}
		#elGallerySubmit_toolBar > ul > li:nth-child(even) {
			float: right; /* Credit - move right */
		}

		#elGallerySubmit_toolBar > ul > li:nth-child(3),
		#elGallerySubmit_toolBar > ul > li:nth-child(4) {
			margin-top: 7px; /* Tags and notify */
		}

			/* Notify option - make toggle a bit smaller (and the text) */
			#elGallerySubmit_toolBar > ul > li:first-child + li + li .ipsToggle {
				zoom: 0.8;
			}
			#elGallerySubmit_toolBar > ul > li:first-child + li + li label {
				font-size: 12px;
			}
}]]></css>
 <css css_location="front" css_app="gallery" css_attributes="" css_path="." css_name="submit.css"><![CDATA[.cGalleryDialog {
	display: flex;
	flex-direction: column;
	position: relative;
	min-height: 550px;
}

.ipsDialog .cGalleryDialog_inner {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	/*bottom: 75px;*/
}

.ipsDialog .cGalleryDialog_titleAndUpload {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	/*overflow: hidden;*/
}

	.cGalleryDialog.cGalleryDialog_uploadStep .cGalleryDialog_titleAndUpload {
		right: 380px;
	}

.cGallerySubmit_imageDetails {
	width: 380px;
	min-width: 380px;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	overflow: auto;
	display: none;
}

	.cGalleryDialog.cGalleryDialog_uploadStep .cGallerySubmit_imageDetails {
		display: block;
	}

	.cGallerySubmit_imageDetails .ipsAttachment_dropZone [data-action="uploadFile"] {
		margin: 0 0 10px 0;
		float: none;
		width: 100%;
	}

	.cGallerySubmit_imageDetails .ipsAttachment_dropZone.ipsAttachment_dropZoneSmall {
		padding: 5px;
	}

.cGallerySubmit_preview {
	width: 100%;
	height: 190px;
	text-align: center;
}
	.cGallerySubmit_preview:not(.ipsNoThumb) {
		background: #fff;
	}

	.cGallerySubmit_preview .ipsImage {
		max-height: 100%;
	}

.cGalleryDialog .ipsDialog_title {
	padding: 0;
}

.cGalleryDialog_close {
	background-color: #000;
	color: #fff;
	font-family: Arial, sans-serif;
	font-size: 20px;
	width: 28px;
	height: 28px;
	border-radius: 28px;
	line-height: 28px;
	text-align: center;
	position: absolute;
	right: 4px;
	top: 4px;
	z-index: 10;
	cursor: pointer;
	display: none;
}

	.ipsDialog_content .cGalleryDialog_close {
		display: block;
	}
	
	.cGalleryDialog_close:hover {
		color: #fff;
	}


#elFileTypes_menu strong {
	display: none;
}

/* Step 1: Choose album */
.ipsDialog .cGalleryChooseAlbum_wrap {
	position: absolute;
	top: 0;
	lefT: 0;
	right: 0;
	bottom: 0;
}

	.cGalleryChooseAlbum_list {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.cGalleryChooseAlbum_list > ul {
		max-width: 450px;
		width: 100%;
		padding: 0 15px;
	}

.cGalleryChooseAlbum_listItem {
	display: block;
	background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(242,242,242,1) 100%);
	border: 1px solid #b3b3b3;
	padding: 15px;
	border-radius: 6px;
	margin-bottom: 20px;
	padding-right: 40px;
	position: relative;
	transition: 0.075s all ease-in-out;
}
	
	.cGalleryChooseAlbum_listItem[data-disabled] {
		opacity: 0.7;
		cursor: not-allowed;
	}

		.cGalleryChooseAlbum_listItem[data-disabled] .ipsType_sectionHead {
			color: {theme="text_light"};
		}

	.cGalleryChooseAlbum_listItem:not([data-disabled]):after {
		font-family: 'FontAwesome';
		content: '\f105';
		position: absolute;
		right: 10px;
		top: 50%;
		margin-top: -10px;
		font-size: 36px;
		color: #000;
	}

	.cGalleryChooseAlbum_listItem:not([data-disabled]):hover {
		border-color: rgba(82, 168, 236, 0.8);
		transform: scale(1.05);
	}

.cGalleryChooseAlbum_listItem .ipsType_sectionHead {
	font-size: 16px;
}

.ipsDialog .cGalleryDialog_submitBar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
}

.cGallerySubmit_albumChoice {
	max-width: 1100px;
	margin: 20px auto 0;
}

	.cGallerySubmit_albumChoice .ipsSelectTree {
		margin: 0 auto;
	}

.cGalleryDialog_formPanel {
	padding: 0 15px;
}

	#elGallerySubmit_albumChooser > li > div {
		position: relative;
		border: 1px solid rgba(0,0,0,0.1);
		border-radius: 3px;
		margin-bottom: 7px;
	}

		#elGallerySubmit_albumChooser > li > div ul.ipsType_medium {
			line-height: 1;
		}

	#elGallerySubmit_albumChooser > li > div:hover {
		background: #e4eff7;
		cursor: pointer;
	}

	#elGallerySubmit_albumChooser > li > input[type="radio"]:checked + div {
		background: #5490c0;
		color: #fff;
	}

		#elGallerySubmit_albumChooser > li > input[type="radio"]:checked + div:before {
			content: '\f00c';
			font-family: "FontAwesome";
			font-size: 36px;
			position: absolute;
			top: 17px;
			opacity: 0.6;
			color: #fff;
		}

			html[dir="ltr"] #elGallerySubmit_albumChooser > li > input[type="radio"]:checked + div:before {
				right: 17px;
			}
			html[dir="rtl"] #elGallerySubmit_albumChooser > li > input[type="radio"]:checked + div:before {
				left: 17px;
			}

		#elGallerySubmit_albumChooser > li > input[type="radio"]:checked + div .ipsType_light {
			color: #fff;
			opacity: 0.7;
		}

.cGallerySubmit_albumImage {
	width: 40px;
	height: 40px;
	background-color: rgba(0,0,0,0.3);
}

	html[dir="ltr"] .cGallerySubmit_albumImage {
		float: left;
	}
	html[dir="rtl"] .cGallerySubmit_albumImage {
		float: right;
	}

html[dir="ltr"] .cGallerySubmit_albumInfo {
	margin-left: 47px;
}
html[dir="rtl"] .cGallerySubmit_albumInfo {
	margin-right: 47px;
}

.cGallerySubmit_chooseCategory {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}

/* Step 2: Upload files */
.cGallerySubmit_uploadImages,
.cGallerySubmit_details {
	overflow-y: auto;
}
	.cGallerySubmit_details {
		padding-bottom: 20px;
	}


.cGallerySubmit_uploadImages .ipsAttachment_dropZone {
	border-width: 3px;
	border-style: dashed;
	{prefix="transition" value="none"}
}

.cGallerySubmit_uploadImages .ipsAttachment_dropZone:not( .ipsDragging ) {
	background: transparent;
	border-color: #e0e0e0;
}

/* Positioning required to make the dialog full screen */
.cGalleryDialog_content {
	/*overflow: auto;*/
	position: absolute;
	top: 80px;
	bottom: 0;
	right: 0;
	left: 0;
}
.ipsDialog_content .cGalleryDialog_content.cGalleryDialog_content_moderated {
	top: 150px;
}

.cGalleryDialog_imageForm {
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
}

	.cGalleryDialog_imageForm [data-role="imageForm"] {
		position: absolute;
		top: 80px;
		left: 0;
		right: 0;
		bottom: 60px;
		overflow: auto;
	}

#elGallerySubmit > .ipsGrid {
	position: absolute;
	top: 30px;
	left: 30px;
	bottom: 70px;
	right: 30px;
}

/* Step 3: Image info */
.cGallerySubmit_bottomBar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 75px;
	border-top: 1px solid rgba(0,0,0,0.075);
	z-index: 100;
}

.ipsApp button.cGallerySubmit_button {
	font-size: 66px;
	background: transparent;
	color: #555;
	opacity: 0.4;
	text-align: center;
	position: absolute;
	top: 50%;
	margin-top: -20px;
	border: 0;
	height: 150px; /* Make the clickable area bigger for ease */
	width: 60px;
	outline: 0;
}

/* Style the uploader */
#elGallerySubmit_imageUploader {
	position: relative;
	min-height: 200px;
}

#elGallerySubmit_imageUploader .ipsAttachment_dropZone {
	position: absolute !important;
	top: 0;
	left: 0;
	height: 190px !important;
	width: 100%;
	padding: 10px;
	float: left;
	cursor: pointer;
}

	.cGalleryDialog.cGalleryDialog_uploadStep #elGallerySubmit_imageUploader .ipsAttachment_dropZone {
		width: 200px;
	}

	#elGallerySubmit_imageUploader .ipsAttachment_dropZone:not( .ipsAttachment_dropZoneSmall ) > i:first-child {
		font-size: 100px;
		margin-top: 20px;
		color: {theme="primary_button"};
	}
		#elGallerySubmit_imageUploader .fa-cloud-upload:before {
			content: "\f055";
		}

	#elGallerySubmit_imageUploader .ipsAttachment_supportDrag {
		font-size: 12px;
		color: {theme="primary_button"};
	}

	#elGallerySubmit_imageUploader a[data-action="uploadFile"] {
		display: none;
	}

	#elGallerySubmit_imageUploader .moxie-shim.moxie-shim-html5, 
	#elGallerySubmit_imageUploader .moxie-shim.moxie-shim-html5 > input[type="file"]  {
		top: 0 !important;
		left: 0 !important;
		width: 0.1px !important;
		height: 0.1px !important;
	}

/* Media thumbnail upload area */
.cGalleryThumbField .ipsAttachment_dropZoneSmall_info {
	clear: left;
	margin-left: auto !important;
}

.cGalleryThumbField h2[data-role="title"] {
	width: 150px;
	max-width: 150px;
}

.cGalleryThumbField p.ipsDataItem_meta {
	width: 100px;
}

.cGalleryThumbField .ipsDataItem_generic {
	padding-top: 55px;
}

.cGalleryThumbField .ipsDataItem_size5,
.cGalleryThumbField .ipsDataItem_size8 {
	width: 83px;
	min-width: 83px;
	padding-left: 0px !important;
	padding-right: 0px;
}

.cGalleryThumbField .ipsDataItem_size8 {
	text-align: left !important;
	padding-left: 80px;
}

/* This is a bit messy, but we need to overwrite styles from the uploader for this page */
#elGallerySubmit_imageUploader .ipsAttachment_fileList {
	margin-top: 0;
}

	#elGallerySubmit_imageUploader .ipsAttachment_fileList .cGallerySubmit_fileList {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach {
		height: 190px;
		width: 200px;
		background-color: #fff;
		border: 1px solid #e0e0e0;
		margin-bottom: 30px !important;
		margin-right: 30px;
		cursor: move;
	}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach .cGalleryImageAttach_info {
			padding-right: 30px;
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach:hover {
			border-color: #b3b3b3;
			background-color: #fafafa;
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_activeFile {
			border-color: #8ec2ed #8bbee8 #84b4db #8ec2ed;
			box-shadow: 0 1px 1px rgba(0,0,0,0.075), 0px 1px 5px rgba(82,168,236,0.6);
			background: {theme="selected"};
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_imageSaved:before,
		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_imageError:before {
			width: 28px;
			height: 28px;
			border-radius: 28px;
			line-height: 28px;
			color: #fff;
			font-family: 'FontAwesome';
			font-size: 14px;
			position: absolute;
			bottom: 8px;
			right: 8px;
			text-align: center;
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_imageSaved:before {
			content: '\f00c';
			background: #558B2F;
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_imageError:not( .cGallerySubmit_activeFile ) {
			border-color: #a72f35;
			box-shadow: 0 1px 1px rgba(0,0,0,0.075), 0px 1px 5px rgba(167,47,53,0.6);
		}

			#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_imageError:before {
				content: '\f071';
				background: #a72f35;
			}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach:first-child {
			margin-left: 230px;
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach .ipsImageAttach_thumb {
			height: 135px;
		}

		#elGallerySubmit_imageUploader .ipsAttach.ipsAttach_done [data-action="insertFile"] {
			cursor: move;
		}

#elInput_image_copyright,
#elInput_image_tags_wrapper {
	max-width: 100%;
}]]></css>
 <css css_location="front" css_app="gallery" css_attributes="" css_path="." css_name="widgets.css"><![CDATA[.cGalleryWidget {
	margin-bottom: 5px;
	position: relative;
}

html[dir="ltr"] .ipsWidget .cGalleryWidget .cGalleryWidgetInfo {
	padding-left: 2px;
}

	.ipsWidget.ipsWidget_horizontal .cGalleryWidget .cGalleryWidgetInfo	{
		max-width: 175px;
	}

	.cGalleryWidget > div:first-child {
		margin-bottom: 5px;
		background: #fff;
	}

	.ipsWidget.ipsWidget_vertical .cGalleryWidget .ipsImage {
		max-height: 175px;
	}

	.ipsWidget.ipsWidget_horizontal .cGalleryWidget .ipsImage {
		max-height: 145px;
		margin-bottom: 5px;
	}

	.cGalleryWidget .ipsNoThumb {
		display: block;
	}

	.cGalleryWidget_verticalThumb {
		height: 150px;
	}

.cGalleryWidgetList > li {
	border-bottom: 1px solid #ebebeb;
	padding-bottom: 10px;
	margin-bottom: 10px;
}

	.cGalleryWidgetList > li:last-child {
		padding-bottom: 0;
		margin-bottom: 0;
		border: 0;
	}

.cGalleryWidget_comments {
	position: absolute;
	top: 122px;
	color: #fff;
	background: {theme="area_background_dark"};
	padding: 0px 4px;
	border-radius: 2px;
	font-size: 11px;
}
html[dir="ltr"] .cGalleryWidget_comments {
	right: 7px;
}
html[dir="rtl"] .cGalleryWidget_comments {
	left: 7px;
}
	#elGalleryStatsLatest .cGalleryWidget_comments {
		top: 140px;
	}

	.cGalleryWidget_comments.ipsFaded {
		opacity: 0.7;
	}

	.ipsCarousel_item .cGalleryWidget_comments {
		top: 150px;
	}

.cGalleryWidget_album > a {
	display: block;
	height: 235px;
	position: relative;
	color: #fff;
}

	.cGalleryWidget_album > a:before {
		content: '';
		display: block;
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		height: 53px;
		background: rgba(0,0,0,0.8);
	}
	
	.cGalleryWidget_album .ipsType_sectionHead,
	.cGalleryWidget_album .cGalleryWidget_albumInfo {
		position: absolute;
		left: 7px;
		right: 7px;
		text-shadow: 1px 1px 1px rgba(0,0,0,1);
	}

		.cGalleryWidget_album .cGalleryWidget_albumInfo > li:first-child {
			position: absolute;
			top: 0;
		}

	.cGalleryWidget_album .ipsType_sectionHead {
		bottom: 23px;
		color: #fff;
		font-size: 15px;
	}

	.cGalleryWidget_album .cGalleryWidget_albumInfo {
		bottom: 7px;
		font-size: 11px;
	}]]></css>
</theme>
