1255 lines
29 KiB
Smarty
1255 lines
29 KiB
Smarty
|
|
|
|
{* $Id: group_album_file.tpl 247 2009-11-14 03:30:43Z phil $ *}
|
|
|
|
|
|
|
|
{* SET GROUP OWNER *}
|
|
|
|
<script type="text/javascript">
|
|
|
|
// User - Owner
|
|
|
|
SocialEngine.Owner = new SocialEngineAPI.User();
|
|
|
|
SocialEngine.Owner.ImportUserInfo({$se_javascript->generateUserInfo($groupowner)});
|
|
|
|
SocialEngine.RegisterModule(SocialEngine.Owner);
|
|
|
|
|
|
|
|
</script>
|
|
|
|
{literal}<script type="text/javascript">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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}
|
|
|
|
{* SET PAGE WIDTH *}
|
|
|
|
{assign var='page_width' value=$group->groupowner_level_info.level_group_album_width}
|
|
|
|
{assign var='menu_width' value=$page_width+32}
|
|
|
|
|
|
|
|
<div style='margin-left: auto; margin-right: auto;'>
|
|
|
|
|
|
|
|
<div class='page_header'>
|
|
|
|
<a href='{$url->url_create("group", $smarty.const.NULL, $group->group_info.group_id)}'>{$group->group_info.group_title}</a>
|
|
|
|
» {lang_print id=2000232}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{* SET MEDIA PATH *}
|
|
|
|
{assign var='media_dir' value=$group->group_dir($group->group_info.group_id)}
|
|
{if $media_info.cloud==1}
|
|
{assign var='media_path' value="`$imagecdn1``$media_dir``$media_info.groupmedia_id`.`$media_info.groupmedia_ext`"}
|
|
{assign var='thumb_path' value="`$imagecdn1``$media_dir``$media_info.groupmedia_id`_thumb.`$media_info.groupmedia_ext`"}
|
|
{else}
|
|
{assign var='media_path' value="`$imagecdn``$media_dir``$media_info.groupmedia_id`.`$media_info.groupmedia_ext`"}
|
|
{assign var='thumb_path' value="`$imagecdn``$media_dir``$media_info.groupmedia_id`_thumb.`$media_info.groupmedia_ext`"}
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
|
|
{* DISPLAY IMAGE *}
|
|
|
|
{if $media_info.groupmedia_ext == "jpg" ||
|
|
|
|
$media_info.groupmedia_ext == "jpeg" ||
|
|
|
|
$media_info.groupmedia_ext == "gif" ||
|
|
|
|
$media_info.groupmedia_ext == "png" ||
|
|
|
|
$media_info.groupmedia_ext == "bmp" ||
|
|
|
|
$media_info.groupmedia_ext == "JPG" ||
|
|
|
|
$media_info.groupmedia_ext == "JPEG" ||
|
|
|
|
$media_info.groupmedia_ext == "GIF" ||
|
|
|
|
$media_info.groupmedia_ext == "PNG" ||
|
|
|
|
$media_info.groupmedia_ext == "BMP"
|
|
|
|
}
|
|
|
|
{*assign var='file_src' value="<img src='`$media_path`' id='media_photo' border='0' onerror="this.src='`$imagecdn`/images/nophoto.png';" class='img-responsive center-block' />"*}
|
|
{*assign var='file_src' value="<img src='`$media_path`' id='media_photo' border='0' onerror='this.src="`$imagecdn`images/nophoto.png;"' class='img-responsive center-block' />" *}
|
|
{assign var='file_src' value="<img src='`$media_path`' id='media_photo' border='0' onerror='imageerror(this, \"`$thumb_path`\", \"`$imagecdn`images/nophoto.png\")' class='img-responsive center-block' />"}
|
|
|
|
{assign var='is_image' value=true}
|
|
|
|
|
|
|
|
{* DISPLAY AUDIO *}
|
|
|
|
{elseif $media_info.groupmedia_ext == "mp3" ||
|
|
|
|
$media_info.groupmedia_ext == "mp4" ||
|
|
|
|
$media_info.groupmedia_ext == "wav"}
|
|
|
|
{capture assign='media_download'}[ <a href='{$media_path}'>{lang_print id=2000268}</a> ]{/capture}
|
|
|
|
{assign var='file_src' value="<a href='`$media_path`'><!--<img src='./images/icons/audio_big.gif' border='0' />--></a>"}
|
|
|
|
{assign var='is_image' value=false}
|
|
|
|
|
|
|
|
{* DISPLAY WINDOWS VIDEO *}
|
|
|
|
{elseif $media_info.groupmedia_ext == "mpeg" ||
|
|
|
|
$media_info.groupmedia_ext == "mpg" ||
|
|
|
|
$media_info.groupmedia_ext == "mpa" ||
|
|
|
|
$media_info.groupmedia_ext == "avi" ||
|
|
|
|
$media_info.groupmedia_ext == "ram" ||
|
|
|
|
$media_info.groupmedia_ext == "rm"}
|
|
|
|
{capture assign='media_download'}[ <a href='{$media_path}'>{lang_print id=2000269}</a> ]{/capture}
|
|
|
|
{assign var='file_src' value="
|
|
|
|
<object id='video'
|
|
|
|
classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'
|
|
|
|
type='application/x-oleobject'>
|
|
|
|
<param name='url' value='`$media_path`' />
|
|
|
|
<param name='sendplaystatechangeevents' value='True' />
|
|
|
|
<param name='autostart' value='true' />
|
|
|
|
<param name='autosize' value='true' />
|
|
|
|
<param name='uimode' value='mini' />
|
|
|
|
<param name='playcount' value='9999' />
|
|
|
|
</OBJECT>
|
|
|
|
"}
|
|
|
|
{assign var='is_image' value=false}
|
|
|
|
|
|
|
|
{* DISPLAY QUICKTIME FILE *}
|
|
|
|
{elseif $media_info.groupmedia_ext == "mov" ||
|
|
|
|
$media_info.groupmedia_ext == "moov" ||
|
|
|
|
$media_info.groupmedia_ext == "movie" ||
|
|
|
|
$media_info.groupmedia_ext == "qtm" ||
|
|
|
|
$media_info.groupmedia_ext == "qt"}
|
|
|
|
{capture assign='media_download'}[ <a href='{$media_path}'>{lang_print id=2000269}</a> ]{/capture}
|
|
|
|
{assign var='file_src' value="
|
|
|
|
<embed src='`$media_path`' controller='true' autosize='1' scale='1' width='550' height='350'>
|
|
|
|
"}
|
|
|
|
{assign var='is_image' value=false}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{* DISPLAY UNKNOWN FILETYPE *}
|
|
|
|
{else}
|
|
|
|
{capture assign='media_download'}[ <a href='{$media_path}'>{lang_print id=2000270}</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.groupmedia_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;'>
|
|
|
|
<table cellpadding='0' cellspacing='0' width='100%'>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
{assign var=group_back_link value=$url->url_create("group", $smarty.const.NULL, $group->group_info.group_id)}
|
|
|
|
{lang_sprintf id=2000271 1=$thismediaid 2=$totalnum 3="`$group_back_link`&v=photos" 4=$group->group_info.group_title}
|
|
|
|
|
|
|
|
{* lang_sprintf id=2000271 1=$current_num 2=$media|@count 3="group.php?group_id=`$group->group_info.group_id`&v=photos" 4=$group->group_info.group_title *}
|
|
|
|
</td>
|
|
|
|
<td style='text-align: right;'>
|
|
|
|
<a href='javascript:void(0);' onclick="loadalbumfile('{$group->group_info.group_id}', '{$media_keys.$previous_index}');" id="prevlink">Previous</a>
|
|
|
|
|
|
|
|
<a href='javascript:void(0);' onclick="loadalbumfile('{$group->group_info.group_id}', '{$media_keys.$next_index}');" id="nextlink">{lang_print id=1000147}</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{* SHOW IMAGE *}
|
|
|
|
<div class='media'>
|
|
<div style="text-align:center;">
|
|
|
|
|
|
|
|
|
|
{* 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('{$group->group_info.group_id}', '{$media_keys.$next_index}');" 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></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='album_media_date pull-left'>
|
|
|
|
{assign var="uploaddate_vars" value=$datetime->time_since($media_info.groupmedia_date)}
|
|
|
|
{capture assign="uploaddate"}{lang_sprintf id=$uploaddate_vars[0] 1=$uploaddate_vars[1]}{/capture}
|
|
|
|
{if $media_info.uploader->user_exists}
|
|
|
|
{lang_sprintf id=2000276 1=$uploaddate 2=$url->url_create("profile", $media_info.uploader->user_info.user_username) 3=$media_info.uploader->user_displayname}
|
|
|
|
{else}
|
|
|
|
{lang_sprintf id=2000277 1=$uploaddate}
|
|
|
|
{/if} by <a href="profile.php?user={$owner->user_info.user_username}">{$owner->user_info.user_username}</a><br>
|
|
|
|
{$media_info.views} views
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class='album_media_date pull-right text-right'>
|
|
|
|
{if $media_info.groupmedia_user_id != $user->user_info.user_id}
|
|
|
|
|
|
|
|
<a data-toggle="modal" data-target="#myModal" href="/user_report.php?return_url={$url->url_current()|escape:url}&user={$owner->user_info.user_username}&item=media&objectid={$media_info.groupmedia_id}" style="font-size:15px;">⚑</a>
|
|
|
|
{*<a data-toggle="modal" data-target="#myModal" href="user_report.php?return_url={$url->url_current()|escape:url}">{lang_print id=1221}</a>*}{/if}<br>
|
|
|
|
|
|
|
|
|
|
|
|
{if $group->user_rank == 2}<a href="group.php?group_id={$group->group_info.group_id}&task=make_photo&media_id={$media_info.groupmedia_id}">Make Group Photo</a> - {/if}
|
|
|
|
{if $group->user_rank == 2 || $group->user_rank == 1 || ($media_info.groupmedia_user_id == $user->user_info.user_id)}
|
|
|
|
|
|
<a href='/user_group_photos.php?task=edit&media_id={$media_info.groupmedia_id}&group_id={$group->group_info.group_id}' data-toggle="modal" data-target="#myModal">{lang_print id=2000285}</a>
|
|
|
|
|
|
{*<a href='javascript:void(0);' onclick="editVideo('{$media_info.groupmedia_id}', '{$media_info.groupmedia_title|replace:"'":"\'"}', '{$media_info.groupmedia_desc|replace:"'":"\'"}','{$tags1}'); " data-toggle="modal" data-target="#myModal">{lang_print id=2000285}</a>*}
|
|
|
|
- <a href='javascript:void(0);' onClick="opendivmodal('confirmdelete');">{lang_print id=2000286}</a>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
|
|
|
{if $media_info.groupmedia_title != ""}<div class='album_media_title'>{$media_info.groupmedia_title}</div>{/if}
|
|
|
|
{if $media_info.groupmedia_desc != ""}<div>{$media_info.groupmedia_desc}</div>{/if}
|
|
|
|
<div id='media_tags' style='display: none; margin-top: 10px;'>{lang_print id=2000274}</div>
|
|
|
|
{if $is_image && $allowed_to_tag}
|
|
|
|
<a href='javascript:void(0);' onClick="SocialEngine.GroupMediaTag.addTag();">{lang_print id=2000275}</a>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
|
|
|
<div class="pull-left"><a href="javascript:void(0);" onclick="likecontent('groupmedia', '{$media_info.groupmedia_id}', 'blogomedia', '{$owner->user_info.user_id}', '{$owner->user_info.user_username}');" class="hoverme">
|
|
|
|
<img id="blogomedia" class="blogo {if $likedmedia==1}liked{/if}" src="images/clearblogo.png"> <span id="liketext">Like{if $likedmedia==1}d{/if}</span></a></div><div class="pull-right">
|
|
|
|
<a href="javascript:void(0);" onclick="showthelikes();" data-toggle="modal" data-target="#myModal"><span id="blogomedialikes">{$total_likes|default:0}</span> Likes</a> | <a href="#"><span class="tc" id="totalcomments">{$media_info.groupmedia_totalcomments|default:0}</span> Comments</a>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>{if $tagged!=""}Members in this photo: {$tagged}{/if}</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{if $group->user_rank == 2 || $group->user_rank == 1 || ($media_info.groupmedia_user_id== $user->user_info.user_id)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{* JAVASCRIPT FOR CONFIRMING DELETION *}
|
|
|
|
{literal}
|
|
|
|
<script type="text/javascript">
|
|
|
|
<!--
|
|
|
|
function deleteTopic() {
|
|
|
|
window.location = '{/literal}{$url->url_create("group_media", $smarty.const.NULL, $group->group_info.group_id, $media_info.groupmedia_id)}{literal}&task=media_delete';
|
|
|
|
}
|
|
|
|
//-->
|
|
|
|
</script>
|
|
|
|
{/literal}
|
|
|
|
|
|
|
|
{* HIDDEN DIV TO DISPLAY CONFIRMATION MESSAGE *}
|
|
|
|
<div style='display: none;' id='confirmdelete'>
|
|
|
|
<div style='margin-top: 10px;'>
|
|
|
|
{lang_print id=2000287}
|
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<input type='button' class='button' value='{lang_print id=175}' onClick='parent.deleteTopic();closemodal();'> <input type='button' class='button' value='{lang_print id=39}' onClick='closemodal();'>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{* HIDDEN DIV TO DISPLAY EDIT DETAILS *}
|
|
|
|
<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='{$url->url_create("group_media", $smarty.const.NULL, $group->group_info.group_id, $media_info.groupmedia_id)}' method='post' target='_parent'>
|
|
|
|
<div style='margin-top: 10px;'>{lang_print id=2000288}</div>
|
|
|
|
<br />
|
|
|
|
{lang_print id=2000289}
|
|
|
|
<br />
|
|
|
|
<input type='text' class='text' name='groupmedia_title' value='{$media_info.groupmedia_title|escape:quotes}' maxlength='20' />
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
{lang_print id=2000290}
|
|
|
|
<br />
|
|
|
|
<textarea name='groupmedia_desc' id='groupmedia_desc' rows='5' cols='35'>{$media_info.groupmedia_desc}</textarea>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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=''>
|
|
|
|
|
|
|
|
</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='task' value='media_edit' />
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
|
|
{* DIV FOR SHARE THIS WINDOW *}
|
|
|
|
<div style='display: none;' id='sharethis'>
|
|
|
|
<div style='margin: 10px 0px 10px 0px;'>{lang_print id=2000279}</div>
|
|
|
|
<div style='margin: 10px 0px 10px 0px; font-weight: bold;'>{lang_print id=2000280}</div>
|
|
|
|
<textarea readonly='readonly' onClick='this.select()' class='text' rows='2' cols='30' style='width: 95%; font-size: 9px;'>{$url->url_base}{$media_path|replace:"./":""}</textarea>
|
|
|
|
<div style='margin: 10px 0px 10px 0px; font-weight: bold;'>{lang_print id=2000281}</div>
|
|
|
|
<textarea readonly='readonly' onClick='this.select()' class='text' rows='2' cols='30' style='width: 95%; font-size: 9px;'><a href='{$url->url_base}{$media_path|replace:"./":""}'><img src='{$url->url_base}{$media_path|replace:"./":""}' border='0'></a></textarea>
|
|
|
|
<div style='margin: 10px 0px 10px 0px; font-weight: bold;'>{lang_print id=2000282}</div>
|
|
|
|
<textarea readonly='readonly' onClick='this.select()' class='text' rows='2' cols='30' style='width: 95%; font-size: 9px;'><a href='{$url->url_base}{$media_path|replace:"./":""}'>{if $media_info.groupmedia_title != ""}{$media_info.groupmedia_title}{else}{lang_print id=589}{/if}</a></textarea>
|
|
|
|
<div style='margin: 10px 0px 10px 0px; font-weight: bold;'>{lang_print id=2000283}</div>
|
|
|
|
<textarea readonly='readonly' onClick='this.select()' class='text' rows='2' cols='30' style='width: 95%; font-size: 9px;'>[url={$url->url_base}{$media_path|replace:"./":""}][img]{$url->url_base}{$media_path|replace:"./":""}[/img][/url]</textarea>
|
|
|
|
<div style='margin-top: 10px;'>
|
|
|
|
<input type='button' class='button' value='{lang_print id=2000284}' onClick='closemodal();'>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{* TAGGING *}
|
|
|
|
{lang_javascript ids=39,1212,1213,1214,1215,1228}
|
|
|
|
{*
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
SocialEngine.GroupMediaTag = new SocialEngineAPI.Tags({ldelim}
|
|
|
|
'canTag' : {if $allowed_to_tag}true{else}false{/if},
|
|
|
|
|
|
|
|
'type' : 'group',
|
|
|
|
'media_id' : {$media_info.groupmedia_id},
|
|
|
|
'media_dir' : '{$media_dir}',
|
|
|
|
|
|
|
|
'object_owner' : 'group',
|
|
|
|
'object_owner_id' : {$group->group_info.group_id}
|
|
|
|
|
|
|
|
{rdelim});
|
|
|
|
|
|
|
|
SocialEngine.RegisterModule(SocialEngine.GroupMediaTag);
|
|
|
|
|
|
|
|
{section name=tag_loop loop=$tags}
|
|
|
|
SocialEngine.GroupMediaTag.insertTag('{$tags[tag_loop].groupmediatag_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].groupmediatag_text}{/if}', '{$tags[tag_loop].groupmediatag_x}', '{$tags[tag_loop].groupmediatag_y}', '{$tags[tag_loop].groupmediatag_width}', '{$tags[tag_loop].groupmediatag_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.GroupMediaTag.insertTag(tag_id, tag_link, tag_text, tag_x, tag_y, tag_width, tag_height, tagged_user);
|
|
|
|
{rdelim}
|
|
|
|
|
|
|
|
</script>
|
|
*}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style="overflow:hidden;">
|
|
|
|
<table class="newalbumcarousel"><tr>
|
|
|
|
|
|
|
|
{foreach name=media_loop from=$media key=k item=v}
|
|
|
|
|
|
|
|
{* IF IMAGE, GET THUMBNAIL *}
|
|
|
|
{if $v.groupmedia_ext == "jpeg" || $v.groupmedia_ext == "jpg" || $v.groupmedia_ext == "gif" || $v.groupmedia_ext == "png" || $v.groupmedia_ext == "bmp"||$media_info.groupmedia_ext == "JPG" ||
|
|
|
|
$v.groupmedia_ext == "JPEG" ||
|
|
|
|
$v.groupmedia_ext == "GIF" ||
|
|
|
|
$v.groupmedia_ext == "PNG" ||
|
|
|
|
$v.groupmedia_ext == "BMP"}
|
|
|
|
{assign var='file_dir' value=$group->group_dir($v.groupalbum_group_id)}
|
|
|
|
{assign var='file_src' value="`$file_dir``$v.groupmedia_id`_thumb.`$v.groupmedia_ext`}
|
|
{if $v.cloud==1}
|
|
{assign var='file_src' value="`$imagecdn1``$file_dir``$v.groupmedia_id`_thumb.`$v.groupmedia_ext`}
|
|
{assign var='fallback' value="`$imagecdn1``$file_dir``$v.groupmedia_id`.`$v.groupmedia_ext`}
|
|
|
|
{else}
|
|
{assign var='file_src' value="`$imagecdn``$file_dir``$v.groupmedia_id`_thumb.`$v.groupmedia_ext`}
|
|
{assign var='fallback' value="`$imagecdn``$file_dir``$v.groupmedia_id`.`$v.groupmedia_ext`}
|
|
{/if}
|
|
|
|
|
|
|
|
{* SET THUMB PATH FOR AUDIO *}
|
|
|
|
{elseif $v.groupmedia_ext == "mp3" || $v.groupmedia_ext == "mp4" || $v.groupmedia_ext == "wav"}
|
|
|
|
{assign var='file_src' value='./images/icons/audio_big.gif'}
|
|
|
|
{* SET THUMB PATH FOR VIDEO *}
|
|
|
|
{elseif $v.groupmedia_ext == "mpeg" || $v.groupmedia_ext == "mpg" || $v.groupmedia_ext == "mpa" || $v.groupmedia_ext == "avi" || $v.groupmedia_ext == "swf" || $v.groupmedia_ext == "mov" || $v.groupmedia_ext == "ram" || $v.groupmedia_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.groupmedia_id == $media_info.groupmedia_id}_active{/if}'>
|
|
|
|
<a href="javascript:void(0);" onclick="loadalbumfile('{$group->group_info.group_id}', '{$v.groupmedia_id}');">
|
|
|
|
<img src='{$file_src}' onerror="this.src='{$imagecdn}images/nophoto.png';" border='0' style="width: 70px; height: 70px; object-fit: cover;" onClick='this.blur();' />
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
{/foreach}
|
|
|
|
|
|
|
|
</tr></table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{* SHOW FILES IN THIS ALBUM *}
|
|
|
|
{php}/*
|
|
|
|
<table cellpadding='0' cellspacing='0' align='center' style='margin-top: 20px;'>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a href='javascript:void(0);' onClick='moveLeft();this.blur()'>
|
|
|
|
<!--<img src='./images/icons/media_moveleft.gif' border='0' onMouseOver="this.src='./images/icons/media_moveleft2.gif';" onMouseOut="this.src='./images/icons/media_moveleft.gif';" />-->
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
|
|
|
|
<div id='album_carousel' style='width: 562px; margin: 0px 5px 0px 5px; text-align: center; overflow: hidden;'>
|
|
|
|
|
|
|
|
<table cellpadding='0' cellspacing='0'>
|
|
|
|
<tr>
|
|
|
|
<td id='thumb-2' style='padding: 0px 5px 0px 5px;'><img src='./images/media_placeholder.gif' border='0' width='70' /></td>
|
|
|
|
<td id='thumb-1' style='padding: 0px 5px 0px 5px;'><img src='./images/media_placeholder.gif' border='0' width='70' /></td>
|
|
|
|
<td id='thumb0' style='padding: 0px 5px 0px 5px;'><img src='./images/media_placeholder.gif' border='0' width='70' /></td>
|
|
|
|
{foreach name=media_loop from=$media key=k item=v}
|
|
|
|
|
|
|
|
{* IF IMAGE, GET THUMBNAIL *}
|
|
|
|
{if $v.groupmedia_ext == "jpeg" || $v.groupmedia_ext == "jpg" || $v.groupmedia_ext == "gif" || $v.groupmedia_ext == "png" || $v.groupmedia_ext == "bmp"}
|
|
|
|
{assign var='file_dir' value=$group->group_dir($v.groupalbum_group_id)}
|
|
{if $v.cloud==1}
|
|
{assign var='file_src' value="`$imagecdn1``$file_dir``$v.groupmedia_id`_thumb.`$v.groupmedia_ext`}
|
|
{assign var='fallback' value="`$imagecdn1``$file_dir``$v.groupmedia_id`.`$v.groupmedia_ext`}
|
|
|
|
{else}
|
|
{assign var='file_src' value="`$imagecdn``$file_dir``$v.groupmedia_id`_thumb.`$v.groupmedia_ext`}
|
|
{assign var='file_src' value="`$imagecdn``$file_dir``$v.groupmedia_id`.`$v.groupmedia_ext`}
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
{* SET THUMB PATH FOR AUDIO *}
|
|
|
|
{elseif $v.groupmedia_ext == "mp3" || $v.groupmedia_ext == "mp4" || $v.groupmedia_ext == "wav"}
|
|
|
|
{assign var='file_src' value='./images/icons/audio_big.gif'}
|
|
|
|
{* SET THUMB PATH FOR VIDEO *}
|
|
|
|
{elseif $v.groupmedia_ext == "mpeg" || $v.groupmedia_ext == "mpg" || $v.groupmedia_ext == "mpa" || $v.groupmedia_ext == "avi" || $v.groupmedia_ext == "swf" || $v.groupmedia_ext == "mov" || $v.groupmedia_ext == "ram" || $v.groupmedia_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.groupmedia_id == $media_info.groupmedia_id}_active{/if}'>
|
|
|
|
<a href="javascript:void(0);" onclick="loadalbumfile('{$group->group_info.group_id}', '{$v.groupmedia_id}');">
|
|
|
|
|
|
|
|
|
|
|
|
<img src='{$file_src}' onerror="this.src='{$fallback}'; " border='0' onClick='this.blur();' />
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
{/foreach}
|
|
|
|
<td id='thumb{math equation="x+1" x=$media|@count}' class='carousel_item'><img src='./images/media_placeholder.gif' border='0' width='70' /></td>
|
|
|
|
<td id='thumb{math equation="x+2" x=$media|@count}' class='carousel_item'><img src='./images/media_placeholder.gif' border='0' width='70' /></td>
|
|
|
|
<td id='thumb{math equation="x+3" x=$media|@count}' class='carousel_item'><img src='./images/media_placeholder.gif' border='0' width='70' /></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href='javascript:void(0);' onClick='moveRight();this.blur();'>
|
|
|
|
<!--<img src='./images/icons/media_moveright.gif' border='0' onMouseOver="this.src='./images/icons/media_moveright2.gif';" onMouseOut="this.src='./images/icons/media_moveright.gif';" />-->
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
<div style='margin-left: auto; margin-right: auto;'>
|
|
|
|
|
|
|
|
|
|
|
|
{* JAVASCRIPT FOR CAROUSEL *}
|
|
|
|
{literal}
|
|
|
|
<script type='text/javascript'>
|
|
|
|
<!--
|
|
|
|
|
|
|
|
var visiblePhotos = 7;
|
|
|
|
var current_id = 0;
|
|
|
|
var myFx;
|
|
|
|
|
|
|
|
window.addEvent('domready', function() {
|
|
|
|
myFx = new Fx.Scroll('album_carousel');
|
|
|
|
current_id = parseInt({/literal}{math equation="x-2" x=$current_index}{literal});
|
|
|
|
var position = $('thumb'+current_id).getPosition($('album_carousel'));
|
|
|
|
myFx.set(position.x, position.y);
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function moveLeft() {
|
|
|
|
if($('thumb'+(current_id-1))) {
|
|
|
|
myFx.toElement('thumb'+(current_id-1));
|
|
|
|
myFx.toLeft();
|
|
|
|
current_id = parseInt(current_id-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function moveRight() {
|
|
|
|
if($('thumb'+(current_id+visiblePhotos))) {
|
|
|
|
myFx.toElement('thumb'+(current_id+1));
|
|
|
|
myFx.toRight();
|
|
|
|
current_id = parseInt(current_id+1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//-->
|
|
|
|
</script>
|
|
|
|
{/literal}*/{/php}
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
{* DISPLAY POST COMMENT BOX *}
|
|
|
|
<div style='margin-left: auto; margin-right: auto;'>
|
|
|
|
|
|
|
|
{* COMMENTS *}
|
|
|
|
{if $allowed_to_comment}
|
|
|
|
<div id="profile_{$video_info.video_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="groupmedia"><input type="hidden" name="iden" id="iden" value="groupmedia_id"><input type="hidden" name="value" id="value" value="{$media_info.groupmedia_id}"><input type="hidden" name="object_owner" id="object_owner" value="group"><input type="hidden" name="object_owner_id" id="object_owner_id" value="{$group->group_info.group_id}"><input type="hidden" name="tab" id="tab" value="groupmedia"><input type="hidden" name="col" id="col" value="groupmedia"><input type="hidden" name="tab_parent" id="tab_parent" value="groupalbums"><input type="hidden" name="col_parent" id="col_parent" value="groupalbum"><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="group_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}
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="/js/jquery.autogrow-textarea.js"></script>
|
|
|
|
<script>
|
|
|
|
mediaid={$media_info.groupmedia_id};
|
|
|
|
{literal}
|
|
|
|
jQuery(function() {
|
|
|
|
jQuery('#comment_body').autogrow();
|
|
|
|
});
|
|
|
|
jQuery(document).ready(function() {
|
|
|
|
console.log("WWWW");
|
|
|
|
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}
|
|
|
|
|
|
|
|
</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>
|
|
|