258 lines
8.1 KiB
Smarty
258 lines
8.1 KiB
Smarty
{include file='header.tpl'}
|
|
|
|
|
|
{* $Id: video.tpl 236 2009-11-13 05:29:23Z phil $ *}
|
|
{if $video.approved==10}We are getting ready for the new season of The Bator Training Series, meanwhile you can watch the archive <a href="bator_training_archive2.php">here</a><br>
|
|
<br>
|
|
{else}
|
|
<div class='page_header'>
|
|
{capture assign="owner_url"}{$url->url_create('profile', $owner->user_info.user_username)}&v=video{/capture}
|
|
{* lang_sprintf id=5500076 1=$owner_url 2=$owner->user_displayname *}
|
|
<h1>{lang_print id=bator_training_title}</h1><br>
|
|
{* if $user->user_info.user_level_id!=2&&$user->user_info.user_level_id!=7}<h2>You are watching a preview of the Bator Training Series.<br>
|
|
Become a <a href="https://bateworld.com/premium.php">Premium Member</a> to see the whole thing.</h2>{/if *}
|
|
{lang_print id=bator_training_content}<br>
|
|
</div>
|
|
|
|
|
|
{* LEFT COLUMN - VIDEO PLAYER AND COMMENTS *}
|
|
<div>
|
|
|
|
{* VIDEO HEADER - TITLE AND TEXT *}
|
|
<div style='padding:2px;border:1px solid #534741;'>
|
|
<div class='videoHeader'>
|
|
<div class='inner' style='cursor:default'>
|
|
<h1>{$video.title}</h1>
|
|
|
|
|
|
{$video.body|html_entity_decode}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{* LOAD FLASH PLAYER *}
|
|
<br>
|
|
|
|
|
|
|
|
<select onchange="window.location.href='/bator_training.php?id='+this.value" style="width:100%" class="mb10 form-control form-custom tabdropdown open">
|
|
<option value="">View Previous Videos ↓</option>
|
|
{$select}</select><br>
|
|
<br>
|
|
|
|
|
|
{php}videoplay();{/php}
|
|
|
|
|
|
{* DISPLAY FLASH PLAYER *}
|
|
|
|
</div> <br>
|
|
<a href="bator_training_archive2.php">Watch season 2 here</a><br>
|
|
<br>
|
|
|
|
<a href="bator_training_archive.php">Watch season 1 here</a>
|
|
|
|
{* SHOW VIDEO DETAILS *}
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
{* COMMENTS *}
|
|
|
|
|
|
|
|
|
|
|
|
{* RIGHT COLUMN - USER'S OTHER VIDEOS *}
|
|
</div>
|
|
|
|
|
|
{/if}
|
|
|
|
|
|
<div class="col-sm-12 center-text">{include_php file='/home/bateworld/public_html/ads/batortraining2.php'}</div>
|
|
<div class="clearfix"></div><br>
|
|
{if $video.is_converted==0}{else}
|
|
{*if $allowed_to_comment*}
|
|
<div id="profile_{$video_info.video_id}_postcomment"><div class="comment_headline">Comments (<span class="tc" id="totalcomments">{$commentcount|default:0}</span>)</div>
|
|
|
|
<form action="comments.php" method="post" onsubmit="return updatecount1();"><div class="profile_postcomment"><textarea name="comment" 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="object_id" id="object_id" value="{$video.id}">
|
|
<input type="hidden" name="user" id="user" value="{$user->user_info.user_id}">
|
|
<input type="hidden" name="object" id="object" value="batortrainingcomments">
|
|
|
|
<input type="hidden" name="task" id="task" value="comment_post">
|
|
<input type="hidden" name="type" id="type" value="batortraining">
|
|
<input type="hidden" name="iden" id="iden" value="id">
|
|
<input type="hidden" name="value" id="value" value="{$video.id}">
|
|
<input type="hidden" name="object_owner" id="object_owner" value="batortraining">
|
|
<input type="hidden" name="object_owner_id" id="object_owner_id" value="{$video.id}">
|
|
<input type="hidden" name="tab" id="tab" value="batortraining">
|
|
<input type="hidden" name="col" id="col" value="batortraining">
|
|
<input type="hidden" name="child" id="child" value="1"></div><div id="comment_error" style="color: #FF0000; display: none;"></div></div></form>
|
|
|
|
|
|
</div>{*/if*}
|
|
|
|
<div id="batortraining_profile_comments" style='margin-left: auto; margin-right: auto;'></div>
|
|
{/if}
|
|
{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>
|
|
|
|
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}batortraining_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=batortraining&tab=batortraining&child=1&col=batortraining&focus=id&object_owner=batortraining&object_owner_id={$video.id}&id={$video.id}{literal}",true);
|
|
|
|
xmlhttp.send();
|
|
|
|
}
|
|
|
|
function editVideo(id, title, desc, search, privacy, comments)
|
|
{
|
|
|
|
$('video_id').value = id;
|
|
|
|
$('video_title').defaultValue = title;
|
|
|
|
$('video_title').value = title;
|
|
|
|
$('video_desc').defaultValue = desc;
|
|
|
|
$('video_desc').value = desc;
|
|
|
|
if( $('video_search_'+search) )
|
|
|
|
{
|
|
|
|
$('video_search_'+search).checked = true;
|
|
|
|
$('video_search_'+search).defaultChecked = true;
|
|
|
|
}
|
|
|
|
if( $('privacy_'+privacy) )
|
|
|
|
{
|
|
|
|
$('privacy_'+privacy).checked = true;
|
|
|
|
$('privacy_'+privacy).defaultChecked = true;
|
|
|
|
}
|
|
|
|
if( $('comments_'+comments) )
|
|
|
|
{
|
|
|
|
$('comments_'+comments).checked = true;
|
|
|
|
$('comments_'+comments).defaultChecked = true;
|
|
|
|
}
|
|
opendivmodal('editvideo');
|
|
|
|
}
|
|
|
|
</script>
|
|
<script type="text/javascript">
|
|
var video_id = 0;
|
|
|
|
jQuery(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 = $('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='comments.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='object_id' value='{$video.id}'><input type='hidden' name='user' value='{$user->user_info.user_id}'><input type='hidden' name='object' value='batortrainingcomments'>";
|
|
innerHTML += "<input type='hidden' name='type' value='batortraining'>";
|
|
innerHTML += "<input type='hidden' name='iden' value='id'>";
|
|
innerHTML += "<input type='hidden' name='value' value='{/literal}{$video.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();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
{/literal}
|
|
{include file='footer.tpl'} |