Files
Testing/templates/album_file_load.tpl
sean 0e8a8b3028
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-17 16:15:01 -05:00

1030 lines
23 KiB
Smarty

{* $Id: album_file.tpl 240 2009-11-14 02:42:57Z phil $ *}
{* SET PAGE WIDTH *}
{assign var='page_width' value=$owner->level_info.level_album_width}
{assign var='menu_width' value=$page_width+32}
{literal}
<style>
.pull-right-ad{float:right; margin-top:-50px}
@media (max-width: 587px){
.pull-right-ad{float:left; text-aliogn:center; margin-top:-20px}
}
.blogo1{width:25px !important;}
@media (min-width: 992px) {
.pull-right-lg {
float: right;
}
}
@media (max-width: 1050px) {
{/literal}#{$owner->user_info.user_username}_profile_comments{literal} {
scroll-margin-top: 80px;
}
}
.jffthumb{
height:75px;
margin:auto;
}
@media (max-width: 477px) {
.jffthumb{
height: 100px;
margin: auto;
width: 100%;
object-fit: cover;
}}
@media (max-width: 367px) {
.jffthumb{
height: 120px;
margin: auto;
width: 100%;
object-fit: cover;
}}
.blogofloat1{float: left; padding-left: 5px; padding-top: 5px;}
.blogocomment1float{float: left; padding-left: 35px; padding-top: 5px;}
.jffusername{margin-top:12px; margin-left:152px;}
.albums_browse_item1_margin{border-bottom:2px solid #3F3F3F; margin-bottom:10px; padding-bottom:5px;}
.albums_browse_item1_img img {
position: relative;
left: 50%;
transform: translate(-50%, -50%);
height: auto;
top: 50%;
width: 100%;
min-height: 183.86px;
/* object-fit: cover; */
min-width: 262px;
}
.albums_browse_item1_img{overflow:hidden;
height:183.86px;
}
@media (max-width: 776px){
.blogofloat{float: right; padding-top: 5px;}
/*.blogocommentfloat{float: left;padding-top: 5px; padding-left:0; clear:both; margin-top:20px;}*/
/*.flag1report{margin-top:20px;}*/
.right-full{width: 100%; padding-left:0;}
.albums_browse_item1_img{width:100%;}
.albums_browse_item1{width: 100%; padding-right:0px;padding-left:0;}
}
#video_rating{font-size:15px;}
.videoratingbar a{color:white; font-weight:normal;}
.videoratingbar img{height:25px; font-size:15px; color:white; margin-bottom: 5px;}
.jffinfo{margin-top:10px; background:#0D0D0D; border:1px solid #3F3F3F; padding:10px; font-size:15px;}
.videoratingbar{
margin-top:10px; background:#0D0D0D; border-radius: 0 0 10px 10px; border:1px solid #3F3F3F; padding:10px 20px 10px 20px; font-size:15px;
}
.photoabout{background: #0D0D0D; padding: 15px 10px 15px 22px; border-radius: 10px 10px 0 0; border:1px solid #3F3F3F; margin-bottom: 10px; color: #bbbbbb;}
.videoaboutheader{font-size:15px; margin-bottom: 10px; color:white;}
.mvp-playlist-title{font-size:13px;}
.mvp-skin-sirius .mvp-solo-progress-level::-webkit-progress-value{
background-color:#fa3200;
}
.mvp-skin-sirius .mvp-solo-progress-level::-moz-progress-bar{
background-color:#fa3200;
}
.mvp-skin-sirius .mvp-contr-btn:hover svg{
color:#fa3200;
}
.mvp-skin-sirius .mvp-input-progress {
color: #fa3200;
}
.mvp-skin-sirius .mvp-input-volume {
color: #fa3200;
}
</style>
<script type="text/javascript">
function myFunction() {
var img = document.getElementById("blogo");
img.classList.add("rotated-image");
}
function selectUsertotag(val) {
who=jQuery(".tags").val();
whoarray=who.split(",");
alreadyin=0;
for(var i = 0; i < whoarray.length; i++){
if(val==whoarray[i]){alreadyin=1;}
}
if(alreadyin==0){
if(who==""){
jQuery(".tags").val(val);
}else{
jQuery(".tags").val(who+","+val);
}
jQuery(".toshowusers").append(val+"<br>");
}
who=jQuery(".tags").val();
whoarray1=who.split(",");
jQuery(".usersuggestions").hide();
jQuery(".tag").val("");
}
function showlikes(){
content=jQuery("#wholiked").html();
jQuery("#myModal").html(content);
jQuery(".modal-content").css("background", "black")
}
function editVideo(id, title, desc, tags)
{
content=jQuery("#editvideo").html();
jQuery("#myModal").html(content);
jQuery(".modal-content").css("background", "black")
jQuery('form input').keydown(function (e) {
if (e.keyCode == 13) {
selectUsertotag(jQuery(".usersuggestions").val());
e.preventDefault();
return false;
}
});
jQuery(".tag").keyup(function(){
jQuery.ajax({
type: "POST",
url: "misc_js.php?task=find_users_to_tag&input="+jQuery(this).val(),
data:'input='+jQuery(this).val(),
beforeSend: function(){
//jQuery("#usersuggestions").css("background","#FFF url(LoaderIcon.gif) no-repeat 165px");
},
success: function(data){
//alert(jQuery(this).parent(".tagscontainer").);
jQuery(".usersuggestions").show();
jQuery(".usersuggestions").html(data);
//jQuery("tag").css("background","#FFF");
}
});
});
}
</script>{/literal}
<div class='page_header' style="margin-bottom:25px;">
<span style="font-size:20pt; font-weight:bold;text-transform:uppercase;">
Photos &#9656; <a href="/profile.php?user={$owner->user_info.user_username}">{$owner->user_info.user_username}</a> &#9656; <a href="/albums.php?user={$owner->user_info.user_username}">Albums</a> &#9656; <a href="{$url->url_create('albums', $owner->user_info.user_username)}">{$album_info.album_title}</a>{* lang_sprintf id=1000141 1=$url->url_create('profile', $owner->user_info.user_username) 2=$owner->user_displayname 3=$url->url_create('albums', $owner->user_info.user_username)}
&#187; <a href='{$url->url_create('album', $owner->user_info.user_username, $album_info.album_id)}'>{$album_info.album_title}</a>*}
</span>
</div>
<div class="clearfix"></div>
<div class='albumimagecontainer' >
{* SET MEDIA PATH *}
{assign var='media_dir' value=$url->url_userdir($owner->user_info.user_id)}
{assign var='media_path' value="`$media_dir``$media_info.media_id`.`$media_info.media_ext`"}
{* DISPLAY IMAGE *}
{if $media_info.media_ext == "jpg" ||
$media_info.media_ext == "jpeg" ||
$media_info.media_ext == "gif" ||
$media_info.media_ext == "png" ||
$media_info.media_ext == "bmp"||
$media_info.media_ext == "JPG" ||
$media_info.media_ext == "JPEG" ||
$media_info.media_ext == "GIF" ||
$media_info.media_ext == "PNG" ||
$media_info.media_ext == "BMP"}
{if $media_info.cloud==1}
{assign var='file_src' value="<img src='`$imagecdn1`$media_path' id='media_photo' border='0' class='img-responsive center-block'>"}
{else}
{assign var='file_src' value="<img src='`$imagecdn`$media_path' id='media_photo' border='0' class='img-responsive center-block'>"}
{/if}
{assign var='is_image' value=true}
{* DISPLAY UNKNOWN FILETYPE *}
{else}
{capture assign='media_download'}[ <a href='{$media_path}'>{lang_print id=1000144}</a> ]{/capture}
{assign var='file_src' value="<a href='`$media_path`'><!--<img src='./images/icons/file_big.gif' border='0'>--></a>"}
{assign var='is_image' value=false}
{/if}
{* ASSIGN INDICES *}
{*assign var="current_index" value=$media_info.media_id|array_search:$media_keys}
{capture assign="previous_index"}{if $current_index == 0}{math equation="x-1" x=$media|@count}{else}{math equation="x-1" x=$current_index}{/if}{/capture}
{capture assign="next_index"}{if $current_index+1 == $media|@count}0{else}{math equation="x+1" x=$current_index}{/if}{/capture}
{capture assign="current_num"}{math equation="x+1" x=$current_index}{/capture*}
<br>
{* SHOW PAGE NAVIGATION *}
<div style='margin-bottom: 6px;' id="media_file">
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td>
{lang_sprintf id=1000145 1=$thismediaid 2=$totalnum 3=$url->url_create('album', $owner->user_info.user_username, $album_info.album_id) 4=$album_info.album_title} {*lang_sprintf id=1000145 1=$current_num 2=$media|@count 3=$url->url_create('album', $owner->user_info.user_username, $album_info.album_id) 4=$album_info.album_title*}
</td>
<td style='text-align: right;'>
<a href='javascript:void(0);' onclick="loadalbumfile('{$owner->user_info.user_username}', '{$album_info.album_id}', '{$nextid}');" id="prevlink">Previous</a>
&nbsp;&nbsp;&nbsp;
<a href='javascript:void(0);' onclick="loadalbumfile('{$owner->user_info.user_username}', '{$album_info.album_id}', '{$previd}');" id="nextlink">{lang_print id=1000147}</a>
</td>
</tr>
</table>
</div>
{* SHOW IMAGE *}
<div class='media' style="padding:0px;">
{if $media_info.media_title!=""}
<div class="videoHeader">
<div class="inner" style="cursor:default; padding:10px; text-align:left;">
<h1>{$media_info.media_title}</h1>
</div>
</div>
{/if}
<div style="text-align:center; padding:10px;">
{* CREATE WRAPPER DIV *}
<div id='media_photo_div' class='media_photo_div' style="display:inline-block">
{* DISPLAY FILE/IMAGE *}
<figure class="showfullimage">
<a href='javascript:void(0);' onclick="loadalbumfile('{$owner->user_info.user_username}', '{$album_info.album_id}', '{$previd}');" id="nextlink">{$file_src}</a>
{if $media_info.ai==1}<figcaption class="aigenerated"><table><tr><td style="width:15px; vertical-align:top;"><i class="fa-light fa-microchip-ai" style="font-size:15px; margin-right:10px;"></i></td><td>This media may have been generated or manipulated using AI, and may not depict a real person or event.</td></tr></table></figcaption>{/if}
</figure>
<!--
<a href='{$url->url_create('album_file', $owner->user_info.user_username, $album_info.album_id, $media_keys.$next_index)}' rel='nofollow'>{$file_src}</a>
//-->
</div>
{* SHOW MEDIA DOWNLOAD LINK FOR NON-IMAGES *}
{if $media_download != ""}
<div style='font-weight: bold; margin-left: auto; margin-right: auto;'>{$media_download}</div>
{/if}
{* SHOW DIV WITH TITLE, DESC, TAGS, ETC *}
<div class='album_media_caption'>
<div class="pull-right album_media_date">
{if $user->user_info.user_id==$owner->user_info.user_id}
{* if !SE_DEBUG1}
<a href='javascript:void(0)' onClick="editVideo('{$files[files_loop].media_id}', '{$files[files_loop].media_title|replace:"&#039;":"\&#039;"}', '{$files[files_loop].media_desc|replace:"&#039;":"\&#039;"}','{$files[files_loop].media_tags}'); " data-toggle="modal" data-target="#myModal">Edit Photo</a>
{else *}
<a href='user_album_update.php?album_id={$album_info.album_id}&media_id={$media_info.media_id}&task=edit' data-toggle="modal" data-target="#myModal">Edit Photo</a>
{* /if *}
{else}
{* <a data-toggle="modal" data-target="#myModal" href="/user_report.php?return_url={$urlencoded}&user={$owner->user_info.user_username}&item=media&objectid={$media_info.media_id}" style="font-size:15px;">&#9873;</a>*}
{/if}
</div><div class="clearfix"></div>
{* if $media_info.media_title != ""}<div class='album_media_title'>{$media_info.media_title}</div>{/if *}
<div id='media_tags' style='display: none; margin-top: 10px;'>{lang_print id=1000162}</div>
{if $is_image && $allowed_to_tag}
<a href='javascript:void(0);' onClick="SocialEngine.MediaTag.addTag();">{lang_print id=1000163}</a>
{/if}<br>
<div class="clearfix"></div>
</div>
</div>
</div>
{* TAGGING *}
{lang_javascript ids=39,1212,1213,1214,1215,1228}
{*
<script type="text/javascript">
SocialEngine.MediaTag = new SocialEngineAPI.Tags({ldelim}
'canTag' : {if $allowed_to_tag}true{else}false{/if},
'type' : '',
'media_id' : {$media_info.media_id},
'media_dir' : '{$media_dir}'
{rdelim});
SocialEngine.RegisterModule(SocialEngine.MediaTag);
{section name=tag_loop loop=$tags}
insertTag('{$tags[tag_loop].mediatag_id}', '{if $tags[tag_loop].tagged_user->user_exists}{$url->url_create("profile", $tags[tag_loop].tagged_user->user_info.user_username)}{/if}', '{if $tags[tag_loop].tag_user->user_exists}{$tags[tag_loop].tagged_user->user_displayname}{else}{$tags[tag_loop].mediatag_text}{/if}', '{$tags[tag_loop].mediatag_x}', '{$tags[tag_loop].mediatag_y}', '{$tags[tag_loop].mediatag_width}', '{$tags[tag_loop].mediatag_height}', '{$tags[tag_loop].tagged_user->user_info.user_username}')
{/section}
// Backwards
function insertTag(tag_id, tag_link, tag_text, tag_x, tag_y, tag_width, tag_height, tagged_user)
{ldelim}
SocialEngine.MediaTag.insertTag(tag_id, tag_link, tag_text, tag_x, tag_y, tag_width, tag_height, tagged_user);
{rdelim}
</script>
*}
<div class="videoratingbar">
<div class="videoInfo">
<div id="tab">
<div class="blogofloat1">
<a href="javascript:void(0);" onclick="likecontent('media', '{$media_info.media_id}', 'blogomedia', '{$owner->user_info.user_id}', '{$owner->user_info.user_username}');" class="hoverme">
<img id="blogomedia" class="blogo blogo1 {if $likedmedia==1}liked{/if}" src="{$imagecdn}images/clearblogo.png"><br>
<span id="liketext">Like{if $likedmedia==1}d{/if}</span></a>
</div>
<div class="blogocomment1float"><a href="#{$owner->user_info.user_username}_profile_comments">
<img src="{$imagecdn}images/icons/jff/Comment_Bubble_FULL.png"><br>Comment</a></div>
<div class="blogocomment1float"><a data-toggle="modal" data-target="#myModal" href="user_list.php?{$smarty.server.QUERY_STRING}&type=photo">
<img src="{$imagecdn}images/icons/jff/AddToList.png"><br>Add to List</a></div>
<div class="pull-right flag1report" style="padding-top: 5px;">
<a style="font-size:15px;" data-toggle="modal" data-target="#myModal" href="/user_report.php?return_url={$urlencoded}&user={$owner->user_info.user_username}&item=media&objectid={$media_info.media_id}"><img src="{$imagecdn}images/icons/jff/Report_Flag_FULL.png" border="0"></a><br>
Report
</div>
<div style="clear: both; height: 0px;"></div>
</div>
</div>
</div>
<div class="photoabout" style="margin-top:10px;">
<div class="videoaboutheader">About</div>
<div>
<div style="margin-bottom:20px;">{$media_info.media_desc}</div>
{if SE_DEBUG1 || SE_DEBUG2}
<div class="tags-input " style="margin-bottom:20px;">
{foreach from=$interests item=item}
<a href="interests.php?tag={$item.name}" class="tag">{$item.name}</a>
{/foreach}
</div>
{/if}
Uploaded by <a href="profile.php?user={$owner->user_info.user_username}">{$owner->user_info.user_username}</a>
{assign var="uploaddate" value=$datetime->time_since($media_info.media_date)}{lang_sprintf id=$uploaddate[0] 1=$uploaddate[1]}<br>
Views: <b>{$media_info.views}</b><br>
Comments:
<span class="tc" id="totalcomments">{$total_comments|default:0}</span><br>
<a href="javascript:void(0);" onclick="showthelikes();" data-toggle="modal" data-target="#myModal">Likes: <span id="blogomedialikes">{$total_likes|default:0}</span></a>
<br>
{if $tagged!=""}Members in this photo: {$tagged}{/if}
</div>
</div>
<div style="overflow:hidden;">
<table class="newalbumcarousel"><tr>
{foreach name=media_loop from=$media key=k item=v}
{if $v.media_ext!=''}
{* IF IMAGE, GET THUMBNAIL *}
{if $v.media_ext == "jpeg" || $v.media_ext == "jpg" || $v.media_ext == "gif" || $v.media_ext == "png" || $v.media_ext == "bmp"||$v.media_ext == "JPEG" || $v.media_ext == "JPG" || $v.media_ext == "GIF" || $v.media_ext == "PNG" || $v.media_ext == "BMP"}
{assign var='file_dir' value=$url->url_userdir($v.album_user_id)}
{if $v.cloud==1}
{assign var='file_src' value="`$imagecdn1``$file_dir``$v.media_id`_thumb.`$v.media_ext`"}
{assign var='fallback' value="`$imagecdn1``$file_dir``$v.media_id`.`$v.media_ext`"}
{else}
{assign var='file_src' value="`$imagecdn``$file_dir``$v.media_id`_thumb.`$v.media_ext`"}
{assign var='fallback' value="`$imagecdn``$file_dir``$v.media_id`.`$v.media_ext`"}
{/if}
{* SET THUMB PATH FOR AUDIO *}
{elseif $v.media_ext == "mp3" || $v.media_ext == "mp4" || $v.media_ext == "wav"}
{assign var='file_src' value='./images/icons/audio_big.gif'}
{* SET THUMB PATH FOR VIDEO *}
{elseif $v.media_ext == "mpeg" || $v.media_ext == "mpg" || $v.media_ext == "mpa" || $v.media_ext == "avi" || $v.media_ext == "swf" || $v.media_ext == "mov" || $v.media_ext == "ram" || $v.media_ext == "rm"}
{assign var='file_src' value='./images/icons/video_big.gif'}
{* SET THUMB PATH FOR UNKNOWN *}
{else}
{assign var='file_src' value='./images/icons/file_big.gif'}
{/if}
{* SHOW THUMBNAILS *}
<td id='thumb{$smarty.foreach.media_loop.iteration}' class='carousel_item{if $v.media_id == $media_info.media_id}_active{/if}'>
<a href="javascript:void(0);" onclick="loadalbumfile('{$owner->user_info.user_username}', '{$album_info.album_id}', '{$v.media_id}');"><img src='{$file_src}' onerror="this.src='{$fallback}';" border='0' style="width: 70px; height: 70px; object-fit: cover;" onClick='this.blur()'></a></td>
{/if}
{/foreach}
</tr></table></div>
{* DISPLAY POST COMMENT BOX *}
<div style='margin-left: auto; margin-right: auto; margin-top:25px'>
{* COMMENTS *}
{if $allowed_to_comment}
<div id="profile_{$media_info.media_id}_postcomment">
{if $user->user_points > 3}
<form action="#" method="post" onsubmit="submitcommentform(); return updatecount();" id="commentform"><div class="profile_postcomment"><textarea name="comment_body" id="comment_body" cols="25" class="comment_area" style="overflow: hidden; height: 70px;" placeholder="Write Something..."></textarea><div style="margin-top: 5px;">Allowed HTML Tags: b, a, br</div><div style="text-align: right; margin-top: 5px;">
<input type="submit" id="comment_submit" class="button" value="Post Comment" />
<input type="hidden" name="task" id="task" value="comment_post"><input type="hidden" name="type" id="type" value="media"><input type="hidden" name="col" id="col" value="media"><input type="hidden" name="iden" id="iden" value="media_id"><input type="hidden" name="value" id="value" value="{$media_info.media_id}"><input type="hidden" name="user" id="user" value="{$owner->user_info.user_username}"><input type="hidden" name="tab" id="tab" value="media"><input type="hidden" name="tab_parent" id="tab_parent" value="albums"><input type="hidden" name="col_parent" id="col_parent" value="album"><input type="hidden" name="child" id="child" value="1"></div><div id="comment_error" style="color: #FF0000; display: none;"></div></div></form>
{/if}
</div>{/if}
<div id="{$owner->user_info.user_username}_profile_comments" style='margin-left: auto; margin-right: auto;'></div>
{lang_javascript ids=39,155,175,182,183,184,185,187,784,787,829,830,831,832,833,834,835,854,856,891,1025,1026,1032,1034,1071}
</div>
</div>
</div>
{literal}
<script>
{/literal}
mediaid={$media_info.media_id};
{literal}
jQuery(function() {
jQuery('#comment_body').autogrow();
});
jQuery(document).ready(function() {
loadXMLDoc(1);
{/literal}{if $user->user_info.user_level_id > 1&& $favorites==1&&$list==1}{literal}
jQuery(".addtofavorites").html({/literal}'<a data-toggle="modal" data-target="#myModal" href="user_list.php?{$smarty.server.QUERY_STRING}&type={$type}">Add to List</a>'{literal});
{/literal}{/if}{literal}
});
</script>
{/literal}
{if $user->user_info.user_id==$owner->user_info.user_id}
<div id='editvideo' style="display:none;">
<div class="modal-dialog"><button type="button" class="close main-bg-color alt-text-color orangebg" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button><div class="modal-content" style="text-align:left;">
<form action='album_file.php?user={$user->user_info.user_username}&album_id={$album_info.album_id}&media_id={$media_info.media_id}' name='editForm' method='post' target='_parent' autocomplete="off">
<div style='margin-top: 10px;'>To edit your picture's title, description, and tags, complete the form below and click "Save Changes".
</div>
<br />
<b>Title</b><br>
<input name='media_title' id='media_title' type='text' class='text' maxlength='50' size='30' value='{$media_info.media_title|replace:"&#039;":"\&#039;"}'>
<br />
<br />
<b>Caption</b><br>
<textarea name='media_desc' id='media_desc' rows='6' cols='50'>{$media_info.media_desc|replace:"&#039;":"\&#039;"}</textarea>
<br /><br>
<strong>Move To</strong><br>
<select name='media_album_id' ><option value='{$media_info.media_album_id}'></option>
{section name=album_loop loop=$albums}
<option value='{$albums[album_loop].album_id}'>{$albums[album_loop].album_title|truncate:28:"...":true}</option>
{/section}</select>
<div class="tagscontainer">
<div class="toshowusers">{$media_info.media_tags}</div>
<div class="tagcontainer">Tag other members appearing in this photo:</div><div><input type="text" name="tag" id="tag" class="tag"><div class="usersuggestions"></div>
</div>
<input type='hidden' name='tags' id='tags' class="tags" value=''>
<input type='hidden' name='task' value='updatemedia'>
</div>
<br>
<input type='submit' class='button' value='{lang_print id=173}' />
<input type='button' class='button' value='{lang_print id=39}' onClick='closemodal();' />
<input type='hidden' name='media_id' id='media_id' value='{$media_info.media_id}' />
</form>
<br />
<br />
</div></div>
</div>
{/if}
<div id='wholiked' style="display:none;">
<div class="modal-dialog"><button type="button" class="close main-bg-color alt-text-color orangebg" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button><div class="modal-content" style="text-align:left;">
Users who liked this photo:<br>
{section name=like_loop loop=$likes}
<a href="profile.php?user={$likes[like_loop].user_username}">{$likes[like_loop].user_username}</a><br>
{/section}
<br />
<br />
</div></div>
</div>