580 lines
24 KiB
Smarty
580 lines
24 KiB
Smarty
{include file='header.tpl'}
|
|
|
|
{* $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>
|
|
|
|
{* 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='width: {$menu_width}px; 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)}
|
|
{assign var='media_path' value="`$media_dir``$media_info.groupmedia_id`.`$media_info.groupmedia_ext`"}
|
|
|
|
|
|
{* 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"}
|
|
{assign var='file_src' value="<img src='`$media_path`' id='media_photo' border='0' />"}
|
|
{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}
|
|
|
|
{* EMBED FLASH FILE *}
|
|
{elseif $media_info.groupmedia_ext == "swf"}
|
|
{assign var='file_src' value="
|
|
<object width='350' height='250' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0' id='myMovieName'>
|
|
<param name=movie value=$media_path />
|
|
<param name=quality value=high />
|
|
<param name=bgcolor value=#FFFFFF />
|
|
<embed src=$media_path quality=high bgcolor=#FFFFFF width='350' height='250' name='myMovieName' align='' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>
|
|
</embed>
|
|
</object>
|
|
"}
|
|
{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=$current_num 2=$media|@count 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='{$url->url_create("group_media", $smarty.const.NULL, $group->group_info.group_id, $media_keys.$previous_index)}'>{lang_print id=2000272}</a>
|
|
|
|
<a href='{$url->url_create("group_media", $smarty.const.NULL, $group->group_info.group_id, $media_keys.$next_index)}'>{lang_print id=2000273}</a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
{* SHOW IMAGE *}
|
|
<div class='media'>
|
|
<table cellpadding='0' cellspacing='0' align='center'>
|
|
<tr>
|
|
<td style='text-align: center;'>
|
|
|
|
{* CREATE WRAPPER DIV *}
|
|
<div id='media_photo_div' class='media_photo_div' style='{if $is_image}width:{$media_info.groupmedia_width}px;height:{$media_info.groupmedia_height}px;{/if}'>
|
|
|
|
{* DISPLAY FILE/IMAGE *}
|
|
<a href='{$url->url_create("group_media", $smarty.const.NULL, $group->group_info.group_id, $media_keys.$next_index)}'>{$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' style='width: {if $media_info.groupmedia_width > 300}{$media_info.groupmedia_width}{else}300{/if}px;'>
|
|
{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}
|
|
<div class='album_media_date'>
|
|
{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}
|
|
<br />
|
|
<!--
|
|
<a href="javascript:TB_show('{lang_print id=2000278}', '#TB_inline?height=400&width=400&inlineId=sharethis', '', '../images/trans.gif');">{lang_print id=2000278}</a>
|
|
-
|
|
-->
|
|
<a href="javascript:TB_show('{lang_print id=1221}', 'user_report.php?return_url={$url->url_current()|escape:url}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');">{lang_print id=1221}</a>
|
|
{if $group->user_rank == 2 || $group->user_rank == 1 || ($media_info.uploader->user_exists && $media_info.uploader->user_info.user_id == $user->user_info.user_id)}
|
|
- <a href='javascript:void(0);' onClick="TB_show('{lang_print id=2000285}', '#TB_inline?height=250&width=300&inlineId=editdetails', '', '../images/trans.gif');">{lang_print id=2000285}</a>
|
|
- <a href='javascript:void(0);' onClick="TB_show('{lang_print id=2000286}', '#TB_inline?height=150&width=300&inlineId=confirmdelete', '', '../images/trans.gif');">{lang_print id=2000286}</a>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
{if $group->user_rank == 2 || $group->user_rank == 1 || ($media_info.uploader->user_exists && $media_info.uploader->user_info.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.TB_remove();parent.deleteTopic();'> <input type='button' class='button' value='{lang_print id=39}' onClick='parent.TB_remove();'>
|
|
</div>
|
|
|
|
{* HIDDEN DIV TO DISPLAY EDIT DETAILS *}
|
|
<div style='display: none;' id='editdetails'>
|
|
<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 />
|
|
<input type='submit' class='button' value='{lang_print id=173}' />
|
|
<input type='button' class='button' value='{lang_print id=39}' onClick='parent.TB_remove();' />
|
|
<input type='hidden' name='task' value='media_edit' />
|
|
</form>
|
|
</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='parent.TB_remove();'>
|
|
</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>
|
|
|
|
|
|
{* SHOW FILES IN THIS ALBUM *}
|
|
<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)}
|
|
{assign var='file_src' value="`$file_dir``$v.groupmedia_id`_thumb.`$v.groupmedia_ext`}
|
|
|
|
{if $file_src|file_exists eq ''}
|
|
{assign var='file_src' value="`$file_dir``$v.groupmedia_id`_thumb.`$v.groupmedia_ext`"}
|
|
{/if}
|
|
{if $file_src|file_exists eq ''}
|
|
{assign var='file_src' value="`$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='{$url->url_create("group_media", $smarty.const.NULL, $group->group_info.group_id, $v.groupmedia_id)}'>
|
|
<img src='{$file_src}' border='0' width='{$misc->photo_size($file_src,"70","70","w")}' 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='width: {$menu_width}px; 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}
|
|
|
|
<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"><div class="comment_headline">Comments (<span class="tc" id="totalcomments">{$total_comments|default:0}</span>)</div>
|
|
|
|
<form action="misc_js.php" method="post" target="ajaxframe" onsubmit="updatecount();"><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, img, 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" value="comment_post"><input type="hidden" name="type" value="groupmedia"><input type="hidden" name="iden" value="groupmedia_id"><input type="hidden" name="value" value="{$media_info.groupmedia_id}"><input type="hidden" name="object_owner" value="group"><input type="hidden" name="object_owner_id" value="{$group->group_info.group_id}"><input type="hidden" name="tab" value="groupmedia"><input type="hidden" name="col" value="groupmedia"><input type="hidden" name="tab_parent" value="groupalbums"><input type="hidden" name="col_parent" value="groupalbum"><input type="hidden" name="child" value="1"></div><div id="comment_error" style="color: #FF0000; display: none;"></div></div></form>
|
|
|
|
|
|
</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}
|
|
|
|
{literal}
|
|
<script type="text/javascript" src="/js/jquery.autogrow-textarea.js"></script>
|
|
<script>
|
|
jQuery(function() {
|
|
jQuery('#comment_body').autogrow();
|
|
});
|
|
jQuery(document).ready(function() {
|
|
|
|
|
|
loadXMLDoc(1);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
<script>
|
|
function subtractcount(){
|
|
total=document.getElementById('totalcomments').innerHTML;
|
|
total=total*1;
|
|
document.getElementById('totalcomments').innerHTML=total-1;}
|
|
function updatecount()
|
|
{
|
|
if(document.getElementById('comment_body').value!=""){
|
|
total=document.getElementById('totalcomments').innerHTML;
|
|
total=total*1;
|
|
document.getElementById('totalcomments').innerHTML=total+1;
|
|
}
|
|
}
|
|
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}{$owner->user_info.user_username}_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=groupmedia&tab=groupmedia&tab_parent=groupalbums&col_parent=groupalbum&child=1&col=groupmedia&focus=groupmedia_id&object_owner=group&object_owner_id={$group->group_info.group_id}&groupmedia_id={$media_info.groupmedia_id}{literal}",true);
|
|
|
|
|
|
xmlhttp.send();
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
<script type="text/javascript">
|
|
var video_id = 0;
|
|
|
|
jQuery('#ajaxframe').load(function(){
|
|
loadXMLDoc(1);
|
|
|
|
document.getElementById('comment_body').value="";
|
|
});
|
|
|
|
|
|
function lepconfirmprofDelete(id) {
|
|
|
|
video_id = id;
|
|
document.getElementById('del_comment_id1').value=id;
|
|
|
|
TB_show('Delete Comment', '#TB_inline?height=150&width=300&inlineId=confirmdelete1', '', '../images/trans.gif');
|
|
|
|
document.getElementById('del_comment_id1').value=id;
|
|
|
|
}
|
|
function lepremovecomment()
|
|
{
|
|
id=document.getElementById('del_comment_id1').value;
|
|
document.getElementById('comment_'+id).style.display='none';
|
|
}
|
|
|
|
function editComment1(commentID)
|
|
{
|
|
|
|
|
|
|
|
|
|
//var commentContainerElement = $(this.options.type + '_' + this.options.typeID + '_comments');
|
|
//var commentElement = commentContainerElement.getElement('profile_comment_body_' + commentID);
|
|
var commentElement = $('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' target='ajaxframe' name='editCommentForm' id='editCommentForm'>";
|
|
innerHTML += "<textarea name='comment_edit' id='comment_edit_" + commentID + "' style='height: " + height +" px; width: 100%;' onblur='doCommentEdit("+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='groupmedia'>";
|
|
innerHTML += "<input type='hidden' name='iden' value='groupmedia_id'>";
|
|
innerHTML += "<input type='hidden' name='value' value='{/literal}{$media_info.groupmedia_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);
|
|
$('comment_edit_' + commentID).focus();
|
|
|
|
|
|
|
|
}
|
|
|
|
function doCommentEdit(commentid)
|
|
{
|
|
//var event = new Event(e);
|
|
|
|
document.getElementById("editCommentForm").submit();
|
|
|
|
commentElement = $('profile_comment_body_' + commentid);
|
|
commentElement.innerHTML=document.getElementById("comment_edit_" + commentid).value;
|
|
|
|
|
|
// stop form submission
|
|
//event.stop();
|
|
}
|
|
|
|
|
|
</script>
|
|
{/literal}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{include file='footer.tpl'} |