475 lines
7.3 KiB
Smarty
475 lines
7.3 KiB
Smarty
{include file='header.tpl'}
|
|
|
|
|
|
|
|
{* $Id: event_album_file.tpl 243 2009-11-14 02:58:23Z phil $ *}
|
|
|
|
|
|
|
|
{* SET EVENT OWNER *}
|
|
|
|
<script type="text/javascript">
|
|
|
|
// User - Owner
|
|
|
|
SocialEngine.Owner = new SocialEngineAPI.User();
|
|
|
|
SocialEngine.Owner.ImportUserInfo({$se_javascript->generateUserInfo($eventowner)});
|
|
|
|
SocialEngine.RegisterModule(SocialEngine.Owner);
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<div id="albumimagecontainer">
|
|
|
|
|
|
|
|
</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}
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="/js/jquery.autogrow-textarea.js"></script>
|
|
|
|
<script>
|
|
|
|
mediaid={$media_info.eventmedia_id};{literal}
|
|
|
|
jQuery(function() {
|
|
|
|
jQuery('#comment_body').autogrow();
|
|
|
|
});
|
|
|
|
jQuery(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/literal}
|
|
|
|
loadalbumfile({$event->event_info.event_id}, mediaid, 0)
|
|
|
|
//loadXMLDoc(1);
|
|
|
|
{literal}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
function loadXMLDoc(page)
|
|
|
|
{/*
|
|
|
|
var xmlhttp;
|
|
|
|
|
|
|
|
if (window.XMLHttpRequest)
|
|
|
|
{// code for IE7+, Firefox, Chrome, Opera, Safari
|
|
|
|
xmlhttp=new XMLHttpRequest();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{// code for IE6, IE5
|
|
|
|
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
|
|
|
}
|
|
|
|
xmlhttp.onreadystatechange=function()
|
|
|
|
{
|
|
|
|
|
|
|
|
if (xmlhttp.readyState==4 && xmlhttp.status==200)
|
|
|
|
{
|
|
|
|
|
|
|
|
document.getElementById("{/literal}event_profile_comments{literal}").innerHTML=xmlhttp.responseText;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xmlhttp.open("GET","{/literal}grabprofilecomments.php?user={$owner->user_info.user_username}&url={$smarty.server.PHP_SELF}{if $smarty.server.QUERY_STRING!=""}?{$smarty.server.QUERY_STRING|urlencode}{/if}&p="+page+"&type=eventmedia&tab=eventmedia&tab_parent=eventalbums&col_parent=eventalbum&child=1&col=eventmedia&focus=eventmedia_id&object_owner=event&object_owner_id={$event->event_info.event_id}&eventmedia_id="+mediaid{literal},true);
|
|
|
|
|
|
|
|
|
|
|
|
xmlhttp.send();
|
|
|
|
*/
|
|
|
|
jQuery("#{/literal}event_profile_comments{literal}").load("{/literal}grabprofilecomments.php?user={$user->user_info.user_username}&url={$smarty.server.PHP_SELF}{if $smarty.server.QUERY_STRING!=""}?{$smarty.server.QUERY_STRING|urlencode}{/if}&p="+page+"&type=eventmedia&tab=eventmedia&tab_parent=eventalbums&col_parent=eventalbum&child=1&col=eventmedia&focus=eventmedia_id&object_owner=event&object_owner_id={$event->event_info.event_id}&eventmedia_id="+mediaid{literal}, function(responseTxt, statusTxt, xhr){
|
|
|
|
if(xhr.state() == "resolved"){
|
|
|
|
// alert(statusTxt);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
e.preventdefault();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var media_id = 0;
|
|
|
|
queryString="";
|
|
|
|
urlParams="";
|
|
|
|
window.addEventListener('popstate', function(e) {
|
|
|
|
// e.state is equal to the data-attribute of the last image we clicked
|
|
|
|
queryString = window.location.search;
|
|
|
|
|
|
|
|
urlParams = new URLSearchParams(queryString);
|
|
|
|
|
|
|
|
loadalbumfile(urlParams.get('event_id'), urlParams.get('eventmedia_id'), 0);
|
|
|
|
return;
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
jQuery(document).keydown(function (e) {
|
|
|
|
var focussedTag = document.activeElement && document.activeElement.nodeName;
|
|
|
|
if( focussedTag === 'INPUT' || focussedTag === 'TEXTAREA' ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (e.which === 37) {
|
|
|
|
jQuery("#prevlink").trigger("click");
|
|
|
|
}
|
|
|
|
else if (e.which === 39) {
|
|
|
|
jQuery("#nextlink").trigger("click");
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
|
|
|
|
|
|
|
function loadalbumfile(eventid, eventmedia_id, push=1)
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if(eventmedia_id==0||eventmedia_id==undefined){
|
|
|
|
location.href="/event_album_file.php?event_id="+eventid+"&eventmedia_id="+eventmedia_id;
|
|
|
|
return
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
|
|
|
|
|
|
|
|
if(push==1){history.pushState("", "BateWorld Album", 'event_album_file.php?event_id='+eventid+'&eventmedia_id='+eventmedia_id);}
|
|
|
|
jQuery("#albumimagecontainer").load('homestorage/event_file_load.php?event_id='+eventid+'&eventmedia_id='+eventmedia_id, function(responseTxt, statusTxt, xhr){
|
|
|
|
if(xhr.state() == "resolved"){
|
|
|
|
// alert(statusTxt);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
e.preventdefault();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//alert(xhr.state());
|
|
|
|
});
|
|
|
|
}}
|
|
|
|
|
|
|
|
|
|
|
|
/*jQuery('#ajaxframe').load(function(){
|
|
|
|
loadXMLDoc(1);
|
|
|
|
|
|
|
|
document.getElementById('comment_body').value="";
|
|
|
|
});
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function editComment1(commentID)
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var commentContainerElement = $(this.options.type + '_' + this.options.typeID + '_comments');
|
|
|
|
//var commentElement = commentContainerElement.getElement('profile_comment_body_' + commentID);
|
|
|
|
var commentElement = document.getElementById('profile_comment_body_' + commentID);
|
|
|
|
|
|
|
|
var height = commentElement.offsetHeight + 10;
|
|
|
|
var commentText = commentElement.innerHTML.replace(/<br>/gi, '\r\n').replace(/>/gi, '>');
|
|
|
|
|
|
|
|
var innerHTML = '';
|
|
|
|
innerHTML += "<form action='misc_js.php' method='post' name='editCommentForm' id='editCommentForm'>";
|
|
|
|
innerHTML += "<textarea name='comment_edit' id='comment_edit_" + commentID + "' style='height: " + height +" px; width: 100%;' onblur='doCommentEditNew("+commentID+")'>" + commentText + "</textarea>";
|
|
|
|
innerHTML += "<input type='hidden' name='task' value='comment_edit'>";
|
|
|
|
innerHTML += "<input type='hidden' name='comment_id' value='" + commentID + "'>";
|
|
|
|
|
|
|
|
innerHTML += "<input type='hidden' name='type' value='eventmedia'>";
|
|
|
|
innerHTML += "<input type='hidden' name='iden' value='eventmedia_id'>";
|
|
|
|
innerHTML += "<input type='hidden' name='value' value='{/literal}{$media_info.eventmedia_id}{literal}'>";
|
|
|
|
|
|
|
|
innerHTML +=
|
|
|
|
'<input type="hidden" name="tab" value="users">';
|
|
|
|
|
|
|
|
innerHTML +=
|
|
|
|
'<input type="hidden" name="col" value="user">';
|
|
|
|
|
|
|
|
/* if( this.options.typeTabParent ) innerHTML +=
|
|
|
|
'<input type="hidden" name="tab_parent" value="' + this.options.typeTabParent + '">';
|
|
|
|
|
|
|
|
if( this.options.typeColParent ) innerHTML +=
|
|
|
|
'<input type="hidden" name="col_parent" value="' + this.options.typeColParent + '">';
|
|
|
|
|
|
|
|
if( this.options.typeChild ) innerHTML +=
|
|
|
|
'<input type="hidden" name="child" value="1">';
|
|
|
|
*/
|
|
|
|
|
|
|
|
innerHTML += "</form>";
|
|
|
|
|
|
|
|
|
|
|
|
// Inject
|
|
|
|
commentElement.innerHTML = innerHTML;
|
|
|
|
textarea_autogrow('comment_edit_' + commentID);
|
|
|
|
jQuery('#comment_edit_' + commentID).focus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
{/literal}
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
|
|
{include file='footer.tpl'} |