feat: Add comprehensive documentation suite and reorganize project structure
- Created complete documentation in docs/ directory - Added PROJECT_OVERVIEW.md with feature highlights and getting started guide - Added ARCHITECTURE.md with system design and technical details - Added SECURITY.md with comprehensive security implementation guide - Added DEVELOPMENT.md with development workflows and best practices - Added DEPLOYMENT.md with production deployment instructions - Added API.md with complete REST API documentation - Added CONTRIBUTING.md with contribution guidelines - Added CHANGELOG.md with version history and migration notes - Reorganized all documentation files into docs/ directory for better organization - Updated README.md with proper documentation links and quick navigation - Enhanced project structure with professional documentation standards
This commit is contained in:
55
f_templates/tpl_frontend/tpl_file/tpl_addplaylist.tpl
Normal file
55
f_templates/tpl_frontend/tpl_file/tpl_addplaylist.tpl
Normal file
@@ -0,0 +1,55 @@
|
||||
<div id="add-new-label">
|
||||
<div id="add-new-label-in" class="lb-margins">
|
||||
<form id="add-new-label-form" method="post" action="" class="entry-form-class">
|
||||
<article>
|
||||
<h3 class="content-title"><i class="icon-list"></i>{lang_entry key="files.action.new"}</h3>
|
||||
<div class="line"></div>
|
||||
</article>
|
||||
<div id="add-new-label-response" class=""></div>
|
||||
|
||||
{if $smarty.get.s eq "file-menu-entry6"}
|
||||
<div class="selector">
|
||||
<label>{lang_entry key="files.action.new.type"} {lang_entry key="frontend.global.required"}</label>
|
||||
<select name="add_new_type" class="select-input">
|
||||
{if $live_module eq 1}<option value="live"{if $smarty.get.t eq "live"} selected{/if}>{lang_entry key="frontend.global.l"}</option>{/if}
|
||||
{if $video_module eq 1}<option value="video"{if $smarty.get.t eq "" or $smarty.get.t eq "video"} selected{/if}>{lang_entry key="frontend.global.v"}</option>{/if}
|
||||
{if $short_module eq 1}<option value="short"{if $smarty.get.t eq "short"} selected{/if}>{lang_entry key="frontend.global.s"}</option>{/if}
|
||||
{if $image_module eq 1}<option value="image"{if $smarty.get.t eq "image"} selected{/if}>{lang_entry key="frontend.global.i"}</option>{/if}
|
||||
{if $audio_module eq 1}<option value="audio"{if $smarty.get.t eq "audio"} selected{/if}>{lang_entry key="frontend.global.a"}</option>{/if}
|
||||
{if $document_module eq 1}<option value="doc"{if $smarty.get.t eq "doc"} selected{/if}>{lang_entry key="frontend.global.d"}</option>{/if}
|
||||
{if $blog_module eq 1}<option value="blog"{if $smarty.get.t eq "blog"} selected{/if}>{lang_entry key="frontend.global.b"}</option>{/if}
|
||||
</select>
|
||||
</div>
|
||||
{/if}
|
||||
<label>{lang_entry key="files.action.new.title"} {lang_entry key="frontend.global.required"}</label>
|
||||
<input type="text" name="add_new_title" id="add-new-title-input" class="login-input wd300" />
|
||||
<label>{lang_entry key="files.action.new.descr"}</label>
|
||||
<textarea name="add_new_descr" id="add-new-descr-input" rows="1" cols="1" class="ta-input wd300"></textarea>
|
||||
<label>{lang_entry key="files.action.new.tags"} {lang_entry key="frontend.global.required"}</label>
|
||||
<input type="text" name="add_new_tags" id="add-new-tags-input" class="login-input wd300" />
|
||||
<div class="row" id="save-button-row">
|
||||
<button name="add_new_pl_btn" id="add-new-pl-btn" class="save-entry-button button-grey search-button form-button" type="button" value="1"><span>{lang_entry key="files.action.new.create"}</span></button>
|
||||
<a class="link cancel-trigger" href="#"><span>{lang_entry key="frontend.global.cancel"}</span></a>
|
||||
</div>
|
||||
<label id="nl">{lang_entry key="frontend.global.required.items"}</label>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {ldelim}
|
||||
SelectList.init("add_new_type");
|
||||
{rdelim});
|
||||
|
||||
$(document).ready(function() {ldelim}
|
||||
//var lb_url = current_url + menu_section + '?s={$smarty.get.s}&m=1&for=sort-'+$(".view-mode-type.active").attr("id").replace("view-mode-", "")+'&a=pl-add';
|
||||
//var lb_url = current_url + menu_section + '?s={$smarty.get.s}&m=1&a=pl-add';
|
||||
//var lb_url = current_url + menu_section + '?s='+$(".menu-panel-entry-active").attr("id")+'&m=1&a=pl-add';
|
||||
//var lb_url = current_url + menu_section + '?s=file-menu-entry6&m=1&a=pl-add';
|
||||
|
||||
//$(".new-label").click(function(){ldelim} simpleReverseDiv("add-new-label"); $("#add-new-title-input").focus(); if($(this).hasClass("form-button-active")){ldelim}$(this).removeClass("form-button-active");{rdelim}else{ldelim}$(this).addClass("form-button-active");{rdelim} {rdelim});
|
||||
|
||||
$(".link").click(function(){ldelim} $.fancybox.close(); {rdelim});
|
||||
|
||||
enterSubmit("#add-new-label-form input", "#add-new-pl-btn");
|
||||
{rdelim});
|
||||
</script>
|
||||
2
f_templates/tpl_frontend/tpl_file/tpl_blogs.tpl
Normal file
2
f_templates/tpl_frontend/tpl_file/tpl_blogs.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
{generate_html type="blogs_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="browse" bb="0"}
|
||||
|
||||
140
f_templates/tpl_frontend/tpl_file/tpl_browse.tpl
Normal file
140
f_templates/tpl_frontend/tpl_file/tpl_browse.tpl
Normal file
@@ -0,0 +1,140 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Browse {if $type_display eq "video"}Videos{elseif $type_display eq "live"}Live Streams{elseif $type_display eq "image"}Images{elseif $type_display eq "audio"}Music{elseif $type_display eq "document"}Documents{elseif $type_display eq "blog"}Blogs{elseif $type_display eq "short"}Shorts{else}Content{/if} - EasyStream</title>
|
||||
<link rel="stylesheet" href="{$main_url}/f_templates/tpl_frontend/css/browse.css">
|
||||
<style>
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; margin: 0; background: #f8f9fa; }
|
||||
.header { background: #fff; border-bottom: 1px solid #e1e5e9; padding: 1rem 0; }
|
||||
.header-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
|
||||
.logo { font-size: 1.5rem; font-weight: bold; color: #007bff; text-decoration: none; }
|
||||
.nav { display: flex; gap: 2rem; }
|
||||
.nav a { color: #495057; text-decoration: none; padding: 0.5rem 1rem; border-radius: 4px; transition: all 0.2s; }
|
||||
.nav a:hover, .nav a.active { background: #007bff; color: white; }
|
||||
.container { max-width: 1200px; margin: 0 auto; padding: 2rem 20px; }
|
||||
.browse-header { margin-bottom: 2rem; }
|
||||
.browse-title { font-size: 2rem; margin: 0 0 0.5rem 0; color: #212529; }
|
||||
.browse-subtitle { color: #6c757d; margin: 0; }
|
||||
.filters { background: white; padding: 1.5rem; border-radius: 8px; margin-bottom: 2rem; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
|
||||
.filter-tabs { display: flex; gap: 1rem; flex-wrap: wrap; }
|
||||
.filter-tab { padding: 0.5rem 1rem; border: 1px solid #dee2e6; border-radius: 20px; background: white; color: #495057; text-decoration: none; transition: all 0.2s; }
|
||||
.filter-tab:hover, .filter-tab.active { background: #007bff; color: white; border-color: #007bff; }
|
||||
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
|
||||
.video-card { background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: transform 0.2s; }
|
||||
.video-card:hover { transform: translateY(-2px); }
|
||||
.video-thumbnail { width: 100%; height: 160px; background: #f8f9fa; position: relative; overflow: hidden; }
|
||||
.video-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
|
||||
.video-duration { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.8); color: white; padding: 2px 6px; border-radius: 3px; font-size: 0.75rem; }
|
||||
.video-info { padding: 1rem; }
|
||||
.video-title { font-weight: 600; margin: 0 0 0.5rem 0; color: #212529; line-height: 1.3; }
|
||||
.video-title a { color: inherit; text-decoration: none; }
|
||||
.video-title a:hover { color: #007bff; }
|
||||
.video-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
|
||||
.channel-avatar { width: 24px; height: 24px; border-radius: 50%; }
|
||||
.channel-name { color: #6c757d; font-size: 0.875rem; }
|
||||
.video-stats { color: #6c757d; font-size: 0.875rem; }
|
||||
.loading { text-align: center; padding: 3rem; color: #6c757d; }
|
||||
.no-content { text-align: center; padding: 3rem; }
|
||||
.no-content h3 { color: #495057; margin: 0 0 1rem 0; }
|
||||
.no-content p { color: #6c757d; margin: 0; }
|
||||
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; }
|
||||
.pagination a, .pagination span { padding: 0.5rem 1rem; border: 1px solid #dee2e6; border-radius: 4px; color: #495057; text-decoration: none; }
|
||||
.pagination a:hover { background: #f8f9fa; }
|
||||
.pagination .current { background: #007bff; color: white; border-color: #007bff; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="header">
|
||||
<div class="header-content">
|
||||
<a href="{$main_url}" class="logo">🎬 EasyStream</a>
|
||||
<nav class="nav">
|
||||
<a href="{$main_url}">Home</a>
|
||||
<a href="{$main_url}/videos" {if $type_display eq "video"}class="active"{/if}>Videos</a>
|
||||
<a href="{$main_url}/broadcasts" {if $type_display eq "live"}class="active"{/if}>Live</a>
|
||||
<a href="{$main_url}/shorts" {if $type_display eq "short"}class="active"{/if}>Shorts</a>
|
||||
<a href="{$main_url}/pictures" {if $type_display eq "image"}class="active"{/if}>Images</a>
|
||||
<a href="{$main_url}/music" {if $type_display eq "audio"}class="active"{/if}>Music</a>
|
||||
<a href="{$main_url}/documents" {if $type_display eq "document"}class="active"{/if}>Documents</a>
|
||||
<a href="{$main_url}/blogs" {if $type_display eq "blog"}class="active"{/if}>Blogs</a>
|
||||
<a href="{$main_url}/upload">Upload</a>
|
||||
{if $smarty.session.USER_ID}
|
||||
<a href="{$main_url}/account">Account</a>
|
||||
{else}
|
||||
<a href="{$main_url}/signin">Sign In</a>
|
||||
{/if}
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
<div class="browse-header">
|
||||
<h1 class="browse-title">
|
||||
{if $type_display eq "video"}📹 Videos
|
||||
{elseif $type_display eq "live"}📺 Live Streams
|
||||
{elseif $type_display eq "image"}🖼️ Images
|
||||
{elseif $type_display eq "audio"}🎵 Music
|
||||
{elseif $type_display eq "document"}📄 Documents
|
||||
{elseif $type_display eq "blog"}📝 Blogs
|
||||
{elseif $type_display eq "short"}🎬 Shorts
|
||||
{else}📂 Browse Content
|
||||
{/if}
|
||||
</h1>
|
||||
<p class="browse-subtitle">
|
||||
{if $type_display eq "video"}Discover amazing videos from creators around the world
|
||||
{elseif $type_display eq "live"}Watch live streams and interact with creators
|
||||
{elseif $type_display eq "image"}Browse beautiful images and photography
|
||||
{elseif $type_display eq "audio"}Listen to music, podcasts, and audio content
|
||||
{elseif $type_display eq "document"}Access documents, PDFs, and written content
|
||||
{elseif $type_display eq "blog"}Read blogs and articles from our community
|
||||
{elseif $type_display eq "short"}Quick, engaging short-form content
|
||||
{else}Explore all types of content on EasyStream
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="filters">
|
||||
<div class="filter-tabs">
|
||||
<a href="?sort=" class="filter-tab {if !$smarty.get.sort}active{/if}">Latest</a>
|
||||
<a href="?sort=featured" class="filter-tab {if $smarty.get.sort eq 'featured'}active{/if}">Featured</a>
|
||||
<a href="?sort=views" class="filter-tab {if $smarty.get.sort eq 'views'}active{/if}">Most Viewed</a>
|
||||
{if $file_rating eq "1"}
|
||||
<a href="?sort=likes" class="filter-tab {if $smarty.get.sort eq 'likes'}active{/if}">Most Liked</a>
|
||||
{/if}
|
||||
{if $file_comments eq "1"}
|
||||
<a href="?sort=comments" class="filter-tab {if $smarty.get.sort eq 'comments'}active{/if}">Most Commented</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="content-area">
|
||||
{generate_html type="browse_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="browse" bb="0"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Simple AJAX loading for pagination and filters
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Add loading states and smooth transitions
|
||||
const contentArea = document.getElementById('content-area');
|
||||
|
||||
// Lazy loading for images
|
||||
const images = document.querySelectorAll('img[data-src]');
|
||||
const imageObserver = new IntersectionObserver((entries, observer) => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
const img = entry.target;
|
||||
img.src = img.dataset.src;
|
||||
img.removeAttribute('data-src');
|
||||
observer.unobserve(img);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
images.forEach(img => imageObserver.observe(img));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
226
f_templates/tpl_frontend/tpl_file/tpl_files.tpl
Normal file
226
f_templates/tpl_frontend/tpl_file/tpl_files.tpl
Normal file
@@ -0,0 +1,226 @@
|
||||
{assign var=c_section value="{href_entry key="files"}"}
|
||||
<script type="text/javascript">var current_url='{$main_url}/';var menu_section='{$c_section}';var fe_mask='on';function thisresizeDelimiter(){ldelim}{rdelim}</script>
|
||||
{insert name="getCurrentSection" assign=s}
|
||||
{if $s eq "file-menu-entry6" or $smarty.post.do_reload eq "1"}
|
||||
{generate_html type="playlist_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="files" bb="1"}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {ldelim}
|
||||
var lb_url = current_url + menu_section + '?s=file-menu-entry6&m=1&a=pl-add';
|
||||
$(".link").click(function(){ldelim} $.fancybox.close(); {rdelim});
|
||||
$(document).on("click","#add-new-pl-btn",function(e) {ldelim}
|
||||
e.stopImmediatePropagation();
|
||||
$("#add-new-label-in").mask(" ");
|
||||
$.post(lb_url, $("#add-new-label-form").serialize(), function(data){ldelim}
|
||||
$("#add-new-label-response").html(data);
|
||||
$("#add-new-label-in").unmask();
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
//enterSubmit("#add-new-label-form input", "#add-new-pl-btn");
|
||||
{rdelim});
|
||||
</script>
|
||||
{elseif $s eq "file-menu-entry7" or $s eq "file-menu-entry8"}
|
||||
{if $s eq "file-menu-entry7"}
|
||||
{generate_html type="file_comments_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="files" bb="1"}
|
||||
{else}
|
||||
{generate_html type="file_responses_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="files" bb="1"}
|
||||
{/if}
|
||||
{if $smarty.get.s eq ""}
|
||||
<script type="text/javascript">$(function(){ldelim}$('#entry-action-buttons').dlmenu({ldelim}animationClasses:{ldelim}classin:'dl-animate-in-5',classout:'dl-animate-out-5'{rdelim}{rdelim});{rdelim});</script>
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
// if (typeof CBPFWTabs == "undefined") {ldelim}
|
||||
// var script = document.createElement('script');
|
||||
// script.setAttribute('src','{$javascript_url}/fwtabs.js');
|
||||
// $("#siteContent").prepend(script);
|
||||
// {rdelim}
|
||||
// (function(){ldelim}[].slice.call(document.querySelectorAll('.tabs:not(#t-nav)')).forEach(function(el){ldelim}new CBPFWTabs(el);{rdelim});{rdelim})();
|
||||
{literal}
|
||||
$(document).ready(function(){
|
||||
$(".list-cr-tabs .mp-sort-by li").on("click", function(){
|
||||
event.preventDefault();
|
||||
event.stopPropagation ? event.stopPropagation() : (event.cancelBubble=true);
|
||||
var _t = $(this);
|
||||
var t=_t.parent();
|
||||
var f=0;
|
||||
var h=_t.find("a").attr("href").replace("#section-", "");
|
||||
//var vm=$(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
$(".list-cr-tabs .mp-sort-by li").each(function(){
|
||||
var tt=$(this);
|
||||
if(tt.hasClass("iss")) {
|
||||
f+=1;
|
||||
}
|
||||
});
|
||||
if (f == 0) {
|
||||
t.addClass("issm");
|
||||
$("body").addClass("hissm");
|
||||
t.find("li").addClass("iss").stop().slideDown("fast");
|
||||
} else {
|
||||
t.find("li").removeClass("iss").stop().slideUp("fast");
|
||||
t.removeClass("issm");
|
||||
$("body").removeClass("hissm");
|
||||
$(".loadmask, .loadmask-msg").detach();
|
||||
t.find("li:first-of-type").stop().slideDown(10, function(){
|
||||
var tc=$("#main-content li.tab-current a").attr("href").replace("#section-", "");
|
||||
|
||||
if (h !== tc) {
|
||||
//$(".list-cr-tabs section").removeClass("content-current");
|
||||
//$("#section-"+h).addClass("content-current");
|
||||
|
||||
$("#main-content.content-wrap>nav").find("a[href=#section-"+h+"]").parent().click();
|
||||
}
|
||||
});
|
||||
|
||||
$(".list-cr-tabs .mp-sort-by li").each(function(){
|
||||
var t=$(this);
|
||||
t.prepend(t.find("a[href=#section-"+h+"]").parent());
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
jQuery(document).on({
|
||||
click: function(event) {
|
||||
//var vm=$(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
var t = $(".list-cr-tabs .mp-sort-by");
|
||||
//var t = $("#"+vm+"-content .content-current .mp-sort-by");
|
||||
|
||||
t.find("li").removeClass("iss").stop().slideUp("fast");
|
||||
t.removeClass("issm");
|
||||
$("body").removeClass("hissm");
|
||||
t.find("li:first-of-type").stop().slideDown(10);
|
||||
}}, "body.hissm");
|
||||
|
||||
{/literal}
|
||||
</script>
|
||||
{else}
|
||||
{generate_html type="files_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="files" bb="1"}
|
||||
|
||||
{if $smarty.get.s ne ""}
|
||||
<script type="text/javascript">
|
||||
(function() {ldelim}[].slice.call(document.querySelectorAll('.tabs')).forEach(function (el) {ldelim}new CBPFWTabs(el);{rdelim});{rdelim})();
|
||||
$(function() {ldelim}$('#entry-action-buttons').dlmenu({ldelim}animationClasses : {ldelim} classin : 'dl-animate-in-5', classout : 'dl-animate-out-5' {rdelim} {rdelim}); {rdelim});
|
||||
SizeSetFunctions();
|
||||
</script>
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {ldelim}
|
||||
const listItems = document.querySelectorAll('#entry-action-buttons ul.dl-menu > li:not(.hidden)');
|
||||
const lastNonHiddenItem = listItems[listItems.length - 1];
|
||||
lastNonHiddenItem.classList.add('this-last');
|
||||
$(".file-action").click(function() {ldelim}
|
||||
var paging_link = '';
|
||||
{if $smarty.get.page ne ""}paging_link = '&page={$smarty.get.page|sanitize}&ipp={$smarty.get.ipp|sanitize}';{/if}
|
||||
var t = $(this);
|
||||
var a = t.attr("id");
|
||||
view_mode_type = $(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
id = jQuery(".content-current .main-view-mode-"+view_mode_type+".active").attr("id");
|
||||
type = jQuery(".content-current .main-view-mode-"+view_mode_type+".active").val();
|
||||
type_all = type + "-" + view_mode_type;
|
||||
nr = id.split("-");
|
||||
idnr = nr[3];
|
||||
c_url = current_url + menu_section + '?s=' + $(".menu-panel-entry-active").attr("id");
|
||||
c_url+= "&p=0&m="+idnr+"&sort="+type+"&t="+view_mode_type;
|
||||
p_str = "#main-view-mode-" + idnr + "-" + type_all + "-list ul:not(.playlist-entries):not(#pag-list)";
|
||||
var page = parseInt(jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list .pag-wrap a.current").html());
|
||||
$("#main-view-mode-" + idnr + "-" + type_all + "-list #pag-list").detach();
|
||||
if (page > 1) {ldelim}
|
||||
paging_link = "&page=" + page;
|
||||
{rdelim}
|
||||
if ($("#sq").val().length > 3) {ldelim}
|
||||
c_url += "&sq=" + $("#sq").val();
|
||||
{rdelim}
|
||||
var post_url = c_url + "&a=" + a + paging_link;
|
||||
$('#cb-response').replaceWith(''); $('#cb-response-wrap').replaceWith('');
|
||||
$("#siteContent").mask(" ");
|
||||
$("#entry-action-buttons .dl-trigger").click();
|
||||
var searchIDs = [];
|
||||
$("#main-view-mode-" + idnr + "-" + type_all + "-list input:checkbox:checked").map(function(){ldelim} searchIDs.push($(this).val()); {rdelim});
|
||||
$.post(post_url, { 'fileid[]': searchIDs }, function(data) {ldelim}
|
||||
jQuery(p_str).replaceWith(data);
|
||||
$("#cb-response-wrap").insertBefore("#view-type-content");
|
||||
//more_clone.appendTo("#main-view-mode-" + idnr + "-" + type_all + "-list").find(".more-button").attr("rel-page", page + 1);
|
||||
$("#siteContent").unmask();
|
||||
if ($("div[id=paging-bottom]").length > 1) {ldelim}
|
||||
$(".content-current #paging-bottom:last").detach();
|
||||
{rdelim}
|
||||
$("#edit-mode, #select-mode").removeClass("active");
|
||||
setTimeout(function () {ldelim}
|
||||
ViewModeSizeSetFunctions();
|
||||
{rdelim}, 300);
|
||||
setTimeout(function () {ldelim}
|
||||
thumbFade();
|
||||
{rdelim}, 100);
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
{if $smarty.get.s eq ""}
|
||||
{literal}
|
||||
jQuery(document).on({
|
||||
click: function(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation ? event.stopPropagation() : (event.cancelBubble=true);
|
||||
var _t = $(this);
|
||||
var t=_t.parent();
|
||||
var f=0;
|
||||
var h=_t.find("a").attr("href").replace("#section-", "");
|
||||
var vm=$(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
$("#"+vm+"-content .content-current .mp-sort-by li").each(function(){
|
||||
var tt=$(this);
|
||||
if(tt.hasClass("iss")) {
|
||||
f+=1;
|
||||
}
|
||||
});
|
||||
if (f == 0) {
|
||||
t.addClass("issm");
|
||||
$("body").addClass("hissm");
|
||||
t.find("li").addClass("iss").stop().slideDown("fast");
|
||||
} else {
|
||||
t.find("li").removeClass("iss").stop().slideUp("fast");
|
||||
t.removeClass("issm");
|
||||
$("body").removeClass("hissm");
|
||||
$(".loadmask, .loadmask-msg").detach();
|
||||
t.find("li:first-of-type").stop().slideDown(10, function(){
|
||||
var tc=$("#main-content li.tab-current a").attr("href").replace("#section-", "");
|
||||
if (h !== tc) {
|
||||
$("#"+vm+"-content section").removeClass("content-current");
|
||||
$("#section-"+h).addClass("content-current");
|
||||
|
||||
$("#main-content.tabs>nav").find("a[href=#section-"+h+"]").parent().click();
|
||||
} else if (h.startsWith('plpublic')) {
|
||||
$("#"+vm+"-content section").removeClass("content-current");
|
||||
$("#section-"+h).addClass("content-current");
|
||||
}
|
||||
});
|
||||
$("#"+vm+"-content .mp-sort-by").each(function(){
|
||||
var t=$(this);
|
||||
t.prepend(t.find("a[href=#section-"+h+"]").parent());
|
||||
});
|
||||
}
|
||||
}}, ".content-current .mp-sort-by li");
|
||||
jQuery(document).on({
|
||||
click: function(event) {
|
||||
var vm=$(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
var t = $("#"+vm+"-content .content-current .mp-sort-by");
|
||||
t.find("li").removeClass("iss").stop().slideUp("fast");
|
||||
t.removeClass("issm");
|
||||
$("body").removeClass("hissm");
|
||||
t.find("li:first-of-type").stop().slideDown(10);
|
||||
}}, "body.hissm");
|
||||
{/literal}
|
||||
{/if}
|
||||
$('.tpl_files #t-nav nav>ul>li>a').on('click',function(e){ldelim}e.preventDefault();window.location=$(this).attr("href");return false;{rdelim});
|
||||
{if $s ne "file-menu-entry1" and $s ne ""}$(document).ready(function(){ldelim}$("#t-nav li:first").removeClass("tab-current");{rdelim});{/if}
|
||||
</script>
|
||||
{if !$smarty.get or $s|strpos:"file-menu-entry6"!== false}
|
||||
{insert name="swiperJS" for="tnav"}
|
||||
{if $video_module}{insert name="swiperJS" for="video"}{/if}
|
||||
{if $short_module}{insert name="swiperJS" for="short"}{/if}
|
||||
{if $live_module}{insert name="swiperJS" for="live"}{/if}
|
||||
{if $image_module}{insert name="swiperJS" for="image"}{/if}
|
||||
{if $audio_module}{insert name="swiperJS" for="audio"}{/if}
|
||||
{if $document_module}{insert name="swiperJS" for="doc"}{/if}
|
||||
{if $blog_module}{insert name="swiperJS" for="blog"}{/if}
|
||||
{/if}
|
||||
44
f_templates/tpl_frontend/tpl_file/tpl_files_edit.tpl
Normal file
44
f_templates/tpl_frontend/tpl_file/tpl_files_edit.tpl
Normal file
@@ -0,0 +1,44 @@
|
||||
{assign var=c_section value="{href_entry key="files"}"}{insert name="currentMenuEntry" assign=menu_entry for=$smarty.get.s}{insert name="fileCount" for="file-menu-entry1" assign="count1"}{insert name="fileCount" for="file-menu-entry2" assign="count2"}{insert name="fileCount" for="file-menu-entry3" assign="count3"}{insert name="fileCount" for="file-menu-entry4" assign="count4"}{insert name="fileCount" for="file-menu-entry5" assign="count5"}
|
||||
<script type="text/javascript">
|
||||
var current_url = '{$main_url}/';
|
||||
var menu_section = '{$c_section}';
|
||||
var fe_mask = 'on';
|
||||
</script>
|
||||
|
||||
<div id="edit-wrapper">
|
||||
{generate_html type="files_edit_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="files" bb="1"}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {ldelim}
|
||||
$(".save-entry-button").click(function() {ldelim}
|
||||
var t = $(this);
|
||||
var form = $(".entry-form-class").serialize();
|
||||
var upd_url = window.location.href;
|
||||
|
||||
if (typeof($("#blog-edit").html()) != "undefined") {ldelim}
|
||||
form += "&blog_html="+encodeURIComponent($("#blog-edit").html());
|
||||
{rdelim}
|
||||
|
||||
$(".content-current").mask(" ");
|
||||
t.removeClass("new-entry").addClass("new-entry-loading");
|
||||
|
||||
$.post(upd_url, form, function(data) {ldelim}
|
||||
$(".content-current").unmask();
|
||||
t.addClass("new-entry").removeClass("new-entry-loading");
|
||||
$("#submit-response").html(data).find("#cb-response").css("padding-top", "10px");
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
|
||||
$('.icheck-box input').each(function () {ldelim}
|
||||
var self = $(this);
|
||||
self.iCheck({ldelim}
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
radioClass: 'iradio_square-blue',
|
||||
increaseArea: '20%'
|
||||
//insert: '<div class="icheck_line-icon"></div><label>' + label_text + '</label>'
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
// $('.icheck-box input').on('ifChecked', function(event){ldelim} var _id = $(this).val(); $("#hcs-id" + _id).prop('checked', true); {rdelim});
|
||||
// $('.icheck-box input').on('ifUnchecked', function(event){ldelim} var _id = $(this).val(); $("#hcs-id" + _id).prop('checked', false); {rdelim});
|
||||
{rdelim});
|
||||
</script>
|
||||
34
f_templates/tpl_frontend/tpl_file/tpl_playlist.tpl
Normal file
34
f_templates/tpl_frontend/tpl_file/tpl_playlist.tpl
Normal file
@@ -0,0 +1,34 @@
|
||||
{if $smarty.get.l ne ""}
|
||||
{assign var=file_type value="l"}
|
||||
{assign var=u_key value="{$smarty.get.l|sanitize}"}
|
||||
{assign var=f_key value="sort-live"}
|
||||
{elseif $smarty.get.v ne ""}
|
||||
{assign var=file_type value="v"}
|
||||
{assign var=u_key value="{$smarty.get.v|sanitize}"}
|
||||
{assign var=f_key value="sort-video"}
|
||||
{elseif $smarty.get.i ne ""}
|
||||
{assign var=file_type value="i"}
|
||||
{assign var=u_key value="{$smarty.get.i|sanitize}"}
|
||||
{assign var=f_key value="sort-image"}
|
||||
{elseif $smarty.get.a ne ""}
|
||||
{assign var=file_type value="a"}
|
||||
{assign var=u_key value="{$smarty.get.a|sanitize}"}
|
||||
{assign var=f_key value="sort-audio"}
|
||||
{elseif $smarty.get.d ne ""}
|
||||
{assign var=file_type value="d"}
|
||||
{assign var=u_key value="{$smarty.get.d|sanitize}"}
|
||||
{assign var=f_key value="sort-doc"}
|
||||
{elseif $smarty.get.b ne ""}
|
||||
{assign var=file_type value="b"}
|
||||
{assign var=u_key value="{$smarty.get.b|sanitize}"}
|
||||
{assign var=f_key value="sort-blog"}
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
var current_url = '{$main_url}/';
|
||||
var menu_section = '{href_entry key="playlist"}?{$file_type}={$u_key}&for={$f_key}';
|
||||
var fe_mask = 'on';
|
||||
</script>
|
||||
{include file="tpl_backend/tpl_settings/ct-save-top.tpl"}
|
||||
<div class="wdmax" id="ct-wrapper">
|
||||
{generate_html type="playlist_details_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="files" bb="1"}
|
||||
</div>
|
||||
8
f_templates/tpl_frontend/tpl_file/tpl_playlists.tpl
Normal file
8
f_templates/tpl_frontend/tpl_file/tpl_playlists.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
<script type="text/javascript">
|
||||
var current_url = '{$main_url}/';
|
||||
var menu_section = '{href_entry key="playlists"}';
|
||||
var fe_mask = 'on';
|
||||
</script>
|
||||
<div class="wdmax" id="playlists-wrapper">
|
||||
{generate_html type="playlists_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="files" bb="1"}
|
||||
</div>
|
||||
9
f_templates/tpl_frontend/tpl_file/tpl_respond.tpl
Normal file
9
f_templates/tpl_frontend/tpl_file/tpl_respond.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
<script type="text/javascript">
|
||||
var current_url = '{$main_url}/';
|
||||
var menu_section = '{href_entry key="respond"}';
|
||||
var fe_mask = 'on';
|
||||
</script>
|
||||
|
||||
<div id="respond-page">
|
||||
{generate_html type="response_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="response" bb="0"}
|
||||
</div>
|
||||
10
f_templates/tpl_frontend/tpl_file/tpl_respond_extra.tpl
Normal file
10
f_templates/tpl_frontend/tpl_file/tpl_respond_extra.tpl
Normal file
@@ -0,0 +1,10 @@
|
||||
<script type="text/javascript">
|
||||
var current_url = '{$main_url}/';
|
||||
var menu_section = '{href_entry key="see_responses"}';
|
||||
var fe_mask = 'on';
|
||||
</script>
|
||||
|
||||
<div class="wdmax" id="ct-wrapper">
|
||||
{generate_html type="responses_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="view" bb="0"}
|
||||
</div>
|
||||
{include file="tpl_backend/tpl_settings/ct-save-top-js.tpl"}
|
||||
79
f_templates/tpl_frontend/tpl_file/tpl_search_inner.tpl
Normal file
79
f_templates/tpl_frontend/tpl_file/tpl_search_inner.tpl
Normal file
@@ -0,0 +1,79 @@
|
||||
<div class="search_holder_fe">
|
||||
<div id="sb-search-fe" class="sb-search-fe{if $is_mobile} sb-search-open{/if}">
|
||||
<form name="file_search_form" id="file-search-form" method="get" action="">
|
||||
<input class="sb-search-input" placeholder="{lang_entry key="frontend.global.searchtext"}" type="text" value="{$smarty.get.sq|sanitize}" name="sq" id="sq" onclick="this.select()">
|
||||
<input class="sb-search-submit file-search" id="file-search-button" type="button" value="">
|
||||
<i class="icon icon-search no-display"></i>
|
||||
<span title="{lang_entry key="frontend.global.searchtext"}" rel="tooltip" class="sb-icon-search-fe icon-search">
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){ldelim}
|
||||
new UISearch(document.getElementById('sb-search-fe'));
|
||||
$("#sq").keydown(function(){ldelim}
|
||||
$("#sq").autocomplete({ldelim}
|
||||
type: "post",
|
||||
params: {ldelim}"t": $(".view-mode-type.active").attr("id").replace("view-mode-", "") {rdelim},
|
||||
serviceUrl: current_url + menu_section +"?s=" + $(".menu-panel-entry-active").attr("id") +"&do=autocomplete&m=0",
|
||||
onSearchStart: function() {ldelim}{rdelim},
|
||||
onSelect: function (suggestion) {ldelim}
|
||||
$(".file-search").trigger("click");
|
||||
{rdelim}
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
|
||||
$(".file-search").click(function(){ldelim}
|
||||
var paging_link = '';
|
||||
{if $smarty.get.page ne ""}paging_link = '&page={$smarty.get.page|sanitize}&ipp={$smarty.get.ipp|sanitize}';{/if}
|
||||
var t = $(this);
|
||||
var a = t.attr("id");
|
||||
view_mode_type = $(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
id = jQuery(".content-current .main-view-mode-"+view_mode_type+".active").attr("id");
|
||||
type = jQuery(".content-current .main-view-mode-"+view_mode_type+".active").val();
|
||||
type_all = type + "-" + view_mode_type;
|
||||
nr = id.split("-");
|
||||
idnr = nr[3];
|
||||
c_url = current_url + menu_section + '?s=' + $(".menu-panel-entry-active").attr("id");
|
||||
c_url+= "&p=0&m="+idnr+"&sort="+type+"&t="+view_mode_type;
|
||||
p_str = "#main-view-mode-" + idnr + "-" + type_all + "-list ul:not(.playlist-entries):not(#pag-list)";
|
||||
var page = parseInt(jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list .pag-wrap a.current").html());
|
||||
|
||||
$("#main-view-mode-" + idnr + "-" + type_all + "-list #paging-bottom").detach();
|
||||
|
||||
if (page > 1) {
|
||||
paging_link = "&page=" + page;
|
||||
}
|
||||
|
||||
var post_url = c_url + "&a=" + a + paging_link;
|
||||
|
||||
$('#cb-response').replaceWith(''); $('#cb-response-wrap').replaceWith('');
|
||||
|
||||
|
||||
|
||||
// var u_url = (typeof($("#p-user-key").val()) != 'undefined') ? "&u="+$("#p-user-key").val() : "";
|
||||
// var c_url = current_url + menu_section +"?s={$smarty.request.s|sanitize}"+u_url+"&do="+$("#file-sort-div-val").val()+"&for="+$("#file-type-div-val").val();
|
||||
|
||||
$("#file-search-form").attr("action", c_url);
|
||||
$("#main-content").mask("");
|
||||
$.get(c_url, $("#file-search-form").serialize(), function(data){ldelim};
|
||||
jQuery(p_str).replaceWith(data);
|
||||
$("#cb-response-wrap").insertBefore("#view-type-content");
|
||||
//$(".container").html(data);
|
||||
|
||||
$("#main-content").unmask();
|
||||
resizeDelimiter();
|
||||
|
||||
setTimeout(function () {ldelim}
|
||||
ViewModeSizeSetFunctions();
|
||||
{rdelim}, 100);
|
||||
setTimeout(function () {ldelim}
|
||||
thumbFade();
|
||||
{rdelim}, 200);
|
||||
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
enterSubmit("#file-search-form input", "#file-search-button");
|
||||
{rdelim});
|
||||
</script>
|
||||
38
f_templates/tpl_frontend/tpl_file/tpl_search_inner_be.tpl
Normal file
38
f_templates/tpl_frontend/tpl_file/tpl_search_inner_be.tpl
Normal file
@@ -0,0 +1,38 @@
|
||||
<div id="sb-search" class="sb-search">
|
||||
<form name="file_search_form" id="file-search-form" method="get" action="">
|
||||
<input class="sb-search-input" placeholder="{lang_entry key="frontend.global.searchtext"}" type="text" value="{$smarty.get.sq|sanitize}" name="sq" id="sq" onclick="this.select()">
|
||||
<input class="sb-search-submit file-search" id="file-search-button" type="button" value="">
|
||||
<span title="{lang_entry key="frontend.global.searchtext"}" rel="tooltip" class="sb-icon-search">
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){ldelim}
|
||||
new UISearch(document.getElementById('sb-search'));
|
||||
{if $page_display eq "backend_tpl_members" or $page_display eq "backend_tpl_files" or $page_display eq "backend_tpl_servers"}
|
||||
$("#sq").autocomplete({ldelim}
|
||||
type: "post",
|
||||
serviceUrl: current_url + menu_section +"?s={$smarty.request.s|sanitize}&do=autocomplete",
|
||||
onSearchStart: function() {ldelim}
|
||||
{rdelim},
|
||||
onSelect: function (suggestion) {ldelim}
|
||||
$(".file-search").trigger("click");
|
||||
{rdelim}
|
||||
{rdelim});
|
||||
|
||||
{/if}
|
||||
$(".file-search").click(function(){ldelim}
|
||||
var u_url = (typeof($("#p-user-key").val()) != 'undefined') ? "&u="+$("#p-user-key").val() : "";
|
||||
var c_url = current_url + menu_section +"?s={$smarty.request.s|sanitize}"+u_url+"&do="+$("#file-sort-div-val").val()+"&for="+$("#file-type-div-val").val();
|
||||
|
||||
$("#file-search-form").attr("action", c_url);
|
||||
$(".container").mask("");
|
||||
$.get(c_url, $("#file-search-form").serialize(), function(data){ldelim};
|
||||
$(".container").html(data);
|
||||
$(".container").unmask();
|
||||
resizeDelimiter();
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
enterSubmit("#file-search-form input", "#file-search-button");
|
||||
{rdelim});
|
||||
</script>
|
||||
1
f_templates/tpl_frontend/tpl_file/tpl_search_main.tpl
Normal file
1
f_templates/tpl_frontend/tpl_file/tpl_search_main.tpl
Normal file
@@ -0,0 +1 @@
|
||||
<div id="ct-wrapper" class="lb-margins">{generate_html type="search_layout" bullet_id="ct-search" entry_id="ct-search-details" section="search" bb="0"}</div>
|
||||
1
f_templates/tpl_frontend/tpl_file/tpl_shorts.tpl
Normal file
1
f_templates/tpl_frontend/tpl_file/tpl_shorts.tpl
Normal file
@@ -0,0 +1 @@
|
||||
{generate_html type="view_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="shorts" bb="0"}
|
||||
38
f_templates/tpl_frontend/tpl_file/tpl_thumbnail.tpl
Normal file
38
f_templates/tpl_frontend/tpl_file/tpl_thumbnail.tpl
Normal file
@@ -0,0 +1,38 @@
|
||||
<form id="fedit-image-form" class="entry-form-class" method="post" action="" enctype="multipart/form-data">
|
||||
<div id="intabdiv">
|
||||
<article>
|
||||
<h3 class="content-title"><i class="icon-{if $smarty.get.v ne ""}video{elseif $smarty.get.i ne ""}image{elseif $smarty.get.a ne ""}audio{elseif $smarty.get.d ne ""}file{elseif $smarty.get.b ne ""}pencil2{/if}"></i>{lang_entry key="files.text.edit.thumb"}</h3>
|
||||
<div class="line"></div>
|
||||
</article>
|
||||
|
||||
<div class="left-float left-align wdmax row" id="thumb-change-response"></div>
|
||||
<div class="left-float left-align wdmax">
|
||||
<div class="row">
|
||||
<div class="icheck-box up"><input type="radio" name="fedit_image_action" id="fedit-image-upload" value="new" /><label>{lang_entry key="files.text.edit.thumb.text"}</label></div>
|
||||
</div>
|
||||
<div class="row" id="overview-userinfo-file">
|
||||
<div class="left-float left-padding25 hiddenfile">
|
||||
<input type="file" name="fedit_image" id="fedit-image" size="30" onchange="$('#fedit-image-form').submit();" />
|
||||
</div>
|
||||
<br>
|
||||
<center>
|
||||
<button class="save-entry-button button-grey search-button form-button new-image" type="button" onclick="$('.icheck-box.up input').iCheck('check');$('#fedit-image').trigger('click');"><span>{lang_entry key="frontend.global.upload.image"}</span></button>
|
||||
<br><br>
|
||||
<label>{lang_entry key="files.text.thumb.sizes"}</label>
|
||||
</center>
|
||||
<br><br>
|
||||
</div>
|
||||
{if $src eq "local"}
|
||||
<div class="row">
|
||||
<div class="icheck-box"><input type="radio" name="fedit_image_action" id="fedit-image-default" value="default" /><label>{if $smarty.get.v eq ""}{lang_entry key="account.image.upload.default"}{else}{lang_entry key="account.image.upload.grab"}{/if}</label></div>
|
||||
</div>
|
||||
<br>
|
||||
{/if}
|
||||
<div class="row" id="save-button-row">
|
||||
<button name="save_changes_btn" id="save-image-btn" class="save-entry-button button-grey search-button form-button" type="button" value="1"><span>{lang_entry key="files.text.save.thumb"}</span></button>
|
||||
<a class="link cancel-trigger" href="#"><span>{lang_entry key="frontend.global.cancel"}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{include file="tpl_frontend/tpl_file/tpl_thumbnail_js.tpl"}
|
||||
|
||||
1
f_templates/tpl_frontend/tpl_file/tpl_thumbnail_js.tpl
Normal file
1
f_templates/tpl_frontend/tpl_file/tpl_thumbnail_js.tpl
Normal file
@@ -0,0 +1 @@
|
||||
<script type="text/javascript">$(document).ready(function(){ldelim}var c_url="{$main_url}/{href_entry key="files_edit"}?fe=1&{$for}={$smarty.get.$for|sanitize}";var options={ldelim}target:"#thumb-change-response",beforeSubmit:showRequest,success:showResponse,url:c_url+"&do=upload"{rdelim};function showRequest(){ldelim}$('#intabdiv').mask(' ');$("p.thumb-text").removeClass("hiden");$("#save-button-row").addClass("hidden");{rdelim}function showResponse(){ldelim}$('#intabdiv').unmask();$("p.thumb-text").addClass("hidden");$("#save-button-row").removeClass("hidden");$(".fancybox-inner").css("height","auto");$(".fancybox-opened").css("top","25%");{rdelim}$(document).on("submit","#fedit-image-form",function(){ldelim}$(this).ajaxSubmit(options);return false;{rdelim});$("#save-image-btn").click(function(){ldelim}$("#intabdiv").mask(" ");$.post(c_url+'&do=save',$("#fedit-image-form").serialize(),function(data){ldelim}$("#thumb-change-response").html(data);$("#intabdiv").unmask();{rdelim});{rdelim});$("#fedit-image").click(function(){ldelim}$("#fedit-image-upload").attr("checked","checked");{rdelim});$(document).one("click",".link",function(){ldelim}$("#fedit-image").replaceWith('<input type="file" name="fedit_image" id="fedit-image" size="30" />');$("#intabdiv").mask(" ");$.post(c_url+'&do=cancel',$("#fedit-image-form").serialize(),function(data){ldelim}$("#intabdiv").unmask();$.fancybox.close(true);$(".fancybox-overlay.fancybox-overlay-fixed").hide().detach();{rdelim});return false;{rdelim});$('.icheck-box input').each(function(){ldelim}var self=$(this);self.iCheck({ldelim}checkboxClass:'icheckbox_square-blue',radioClass:'iradio_square-blue',increaseArea:'20%'{rdelim});{rdelim});{rdelim});</script>
|
||||
58
f_templates/tpl_frontend/tpl_file/tpl_thumbnail_js_unmin.tpl
Normal file
58
f_templates/tpl_frontend/tpl_file/tpl_thumbnail_js_unmin.tpl
Normal file
@@ -0,0 +1,58 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {ldelim}
|
||||
var c_url = "{$main_url}/{href_entry key="files_edit"}?fe=1&{$for}={$smarty.get.$for|sanitize}";
|
||||
var options = {ldelim}
|
||||
target: "#thumb-change-response",
|
||||
beforeSubmit: showRequest,
|
||||
success: showResponse,
|
||||
url: c_url + "&do=upload"
|
||||
{rdelim}
|
||||
|
||||
function showRequest() {ldelim} $('#intabdiv').mask(' '); $("p.thumb-text").removeClass("hiden"); $("#save-button-row").addClass("hidden"); {rdelim}
|
||||
function showResponse() {ldelim}
|
||||
$('#intabdiv').unmask();
|
||||
$("p.thumb-text").addClass("hidden");
|
||||
$("#save-button-row").removeClass("hidden");
|
||||
$(".fancybox-inner").css("height", "auto");
|
||||
$(".fancybox-opened").css("top", "25%");
|
||||
{rdelim}
|
||||
|
||||
$(document).on("submit", "#fedit-image-form", function() {ldelim}
|
||||
$(this).ajaxSubmit(options);
|
||||
return false;
|
||||
{rdelim});
|
||||
|
||||
$("#save-image-btn").click(function() {ldelim}
|
||||
$("#intabdiv").mask(" ");
|
||||
$.post(c_url + '&do=save', $("#fedit-image-form").serialize(), function(data) {
|
||||
$("#thumb-change-response").html(data);
|
||||
$("#intabdiv").unmask();
|
||||
});
|
||||
{rdelim});
|
||||
|
||||
$("#fedit-image").click(function() {ldelim}
|
||||
$("#fedit-image-upload").attr("checked", "checked");
|
||||
{rdelim});
|
||||
|
||||
$(document).one("click", ".link", function() {ldelim}
|
||||
$("#fedit-image").replaceWith('<input type="file" name="fedit_image" id="fedit-image" size="30" />');
|
||||
$("#intabdiv").mask(" ");
|
||||
$.post(c_url + '&do=cancel', $("#fedit-image-form").serialize(), function(data) {
|
||||
$("#intabdiv").unmask();
|
||||
$.fancybox.close(true);
|
||||
$(".fancybox-overlay.fancybox-overlay-fixed").hide().detach();
|
||||
});
|
||||
|
||||
return false;
|
||||
{rdelim});
|
||||
|
||||
$('.icheck-box input').each(function () {ldelim}
|
||||
var self = $(this);
|
||||
self.iCheck({ldelim}
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
radioClass: 'iradio_square-blue',
|
||||
increaseArea: '20%'
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
</script>
|
||||
253
f_templates/tpl_frontend/tpl_file/tpl_upload.tpl
Normal file
253
f_templates/tpl_frontend/tpl_file/tpl_upload.tpl
Normal file
@@ -0,0 +1,253 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Upload {if $smarty.get.t eq "video"}Videos{elseif $smarty.get.t eq "short"}Shorts{elseif $smarty.get.t eq "image"}Images{elseif $smarty.get.t eq "audio"}Audio{elseif $smarty.get.t eq "document"}Documents{else}Content{/if} - EasyStream</title>
|
||||
<link rel="stylesheet" href="{$main_url}/f_templates/tpl_frontend/css/upload.css">
|
||||
<style>
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; margin: 0; background: #f8f9fa; }
|
||||
.header { background: #fff; border-bottom: 1px solid #e1e5e9; padding: 1rem 0; }
|
||||
.header-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
|
||||
.logo { font-size: 1.5rem; font-weight: bold; color: #007bff; text-decoration: none; }
|
||||
.nav { display: flex; gap: 2rem; }
|
||||
.nav a { color: #495057; text-decoration: none; padding: 0.5rem 1rem; border-radius: 4px; transition: all 0.2s; }
|
||||
.nav a:hover, .nav a.active { background: #007bff; color: white; }
|
||||
.container { max-width: 1200px; margin: 0 auto; padding: 2rem 20px; }
|
||||
.upload-header { text-align: center; margin-bottom: 3rem; }
|
||||
.upload-title { font-size: 2.5rem; margin: 0 0 1rem 0; color: #212529; }
|
||||
.upload-subtitle { color: #6c757d; margin: 0 0 2rem 0; font-size: 1.1rem; }
|
||||
.upload-types { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
|
||||
.upload-type { padding: 0.75rem 1.5rem; border: 2px solid #dee2e6; border-radius: 25px; background: white; color: #495057; text-decoration: none; transition: all 0.2s; display: flex; align-items: center; gap: 0.5rem; }
|
||||
.upload-type:hover, .upload-type.active { background: #007bff; color: white; border-color: #007bff; }
|
||||
.upload-area { background: white; border-radius: 12px; padding: 3rem; box-shadow: 0 4px 16px rgba(0,0,0,0.1); margin-bottom: 2rem; }
|
||||
.verification-notice { background: #fff3cd; border: 1px solid #ffeaa7; border-radius: 8px; padding: 2rem; margin-bottom: 2rem; text-align: center; }
|
||||
.verification-form { max-width: 400px; margin: 0 auto; }
|
||||
.form-group { margin-bottom: 1.5rem; }
|
||||
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: #495057; }
|
||||
.form-input { width: 100%; padding: 0.75rem; border: 1px solid #dee2e6; border-radius: 4px; font-size: 1rem; }
|
||||
.form-button { background: #007bff; color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 4px; cursor: pointer; font-size: 1rem; transition: all 0.2s; }
|
||||
.form-button:hover { background: #0056b3; }
|
||||
.captcha-group { display: flex; gap: 1rem; align-items: center; }
|
||||
.error-message, .notice-message { padding: 1rem; border-radius: 8px; margin-bottom: 1rem; cursor: pointer; }
|
||||
.error-message { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }
|
||||
.notice-message { background: #d1ecf1; border: 1px solid #bee5eb; color: #0c5460; }
|
||||
.upload-stats { background: white; border-radius: 8px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
|
||||
.stats-title { margin: 0 0 1rem 0; color: #495057; display: flex; align-items: center; gap: 0.5rem; }
|
||||
.info-message { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; padding: 1rem; border-radius: 8px; margin-bottom: 1rem; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="header">
|
||||
<div class="header-content">
|
||||
<a href="{$main_url}" class="logo">🎬 EasyStream</a>
|
||||
<nav class="nav">
|
||||
<a href="{$main_url}">Home</a>
|
||||
<a href="{$main_url}/videos">Videos</a>
|
||||
<a href="{$main_url}/broadcasts">Live</a>
|
||||
<a href="{$main_url}/upload" class="active">Upload</a>
|
||||
{if $smarty.session.USER_ID}
|
||||
<a href="{$main_url}/account">Account</a>
|
||||
{else}
|
||||
<a href="{$main_url}/signin">Sign In</a>
|
||||
{/if}
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
{if $usr_verified eq "0"}
|
||||
<div class="upload-header">
|
||||
<h1 class="upload-title">📧 Email Verification Required</h1>
|
||||
<p class="upload-subtitle">Please verify your email address to start uploading content</p>
|
||||
</div>
|
||||
|
||||
<div class="verification-notice">
|
||||
<h3 style="margin: 0 0 1rem 0; color: #856404;">Verification needed for: {$usr_mail}</h3>
|
||||
<p style="margin: 0 0 1.5rem 0; color: #856404;">{lang_entry key="upload.err.mail.ver1"}</p>
|
||||
<p style="margin: 0; color: #856404;">{lang_entry key="upload.err.mail.ver2"}</p>
|
||||
</div>
|
||||
|
||||
<div id="verify-response"></div>
|
||||
|
||||
<div class="verification-form">
|
||||
<form id="verify-form" name="verify_form" method="post" action="">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="verification-captcha">{lang_entry key="upload.text.ver.code"}</label>
|
||||
<div class="captcha-group">
|
||||
<input type="text" id="verification-captcha" name="verification_captcha" class="form-input" style="flex: 1;" />
|
||||
<img id="c-image" src="{$main_url}/{href_entry key="captcha"}?t={$c_rand}" alt="Captcha" style="border-radius: 4px;" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="button" class="form-button resend-verification" name="send_verification" style="width: 100%;">
|
||||
{lang_entry key="upload.text.ver.send"}
|
||||
</button>
|
||||
</div>
|
||||
<input type="hidden" name="verify_email" value="{$usr_mail}" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){ldelim}
|
||||
$(".resend-verification").click(function(){ldelim}
|
||||
$(".container").css('opacity', '0.6');
|
||||
$.post("{$main_url}/{href_entry key="upload"}{if $smarty.get.t eq ""}?do=reverify{else}?t={$smarty.get.t|sanitize}&do=reverify{/if}", $("#verify-form").serialize(), function(data){ldelim}
|
||||
$("#verify-response").html(data);
|
||||
$(".container").css('opacity', '1');
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
</script>
|
||||
{else}
|
||||
{if $perm_err eq "" and $smarty.session.USER_KEY ne ""}
|
||||
<div class="upload-header">
|
||||
<h1 class="upload-title">
|
||||
{if $smarty.get.t eq "video"}📹 Upload Videos
|
||||
{elseif $smarty.get.t eq "short"}🎬 Upload Shorts
|
||||
{elseif $smarty.get.t eq "image"}🖼️ Upload Images
|
||||
{elseif $smarty.get.t eq "audio"}🎵 Upload Audio
|
||||
{elseif $smarty.get.t eq "document"}📄 Upload Documents
|
||||
{else}📤 Upload Content
|
||||
{/if}
|
||||
</h1>
|
||||
<p class="upload-subtitle">
|
||||
{if $smarty.get.t eq "video"}Share your videos with the world
|
||||
{elseif $smarty.get.t eq "short"}Create engaging short-form content
|
||||
{elseif $smarty.get.t eq "image"}Share your photos and artwork
|
||||
{elseif $smarty.get.t eq "audio"}Upload music, podcasts, and audio content
|
||||
{elseif $smarty.get.t eq "document"}Share documents and written content
|
||||
{else}Choose what type of content you want to upload
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="upload-types">
|
||||
{if $video_module eq 1 and $video_uploads eq 1}
|
||||
<a href="{$main_url}/{href_entry key="upload"}?t=video" class="upload-type {if $smarty.get.t eq "video"}active{/if}">
|
||||
📹 <span>Videos</span>
|
||||
</a>
|
||||
{/if}
|
||||
{if $video_module eq 1 and $video_uploads eq 1}
|
||||
<a href="{$main_url}/{href_entry key="upload"}?t=short" class="upload-type {if $smarty.get.t eq "short"}active{/if}">
|
||||
🎬 <span>Shorts</span>
|
||||
</a>
|
||||
{/if}
|
||||
{if $image_module eq 1 and $image_uploads eq 1}
|
||||
<a href="{$main_url}/{href_entry key="upload"}?t=image" class="upload-type {if $smarty.get.t eq "image"}active{/if}">
|
||||
🖼️ <span>Images</span>
|
||||
</a>
|
||||
{/if}
|
||||
{if $audio_module eq 1 and $audio_uploads eq 1}
|
||||
<a href="{$main_url}/{href_entry key="upload"}?t=audio" class="upload-type {if $smarty.get.t eq "audio"}active{/if}">
|
||||
🎵 <span>Audio</span>
|
||||
</a>
|
||||
{/if}
|
||||
{if $document_module eq 1 and $document_uploads eq 1}
|
||||
<a href="{$main_url}/{href_entry key="upload"}?t=document" class="upload-type {if $smarty.get.t eq "document"}active{/if}">
|
||||
📄 <span>Documents</span>
|
||||
</a>
|
||||
{/if}
|
||||
{if $import_yt eq 1 or $import_dm eq 1 or $import_vi eq 1}
|
||||
<a href="{$main_url}/{href_entry key="import"}?t=video" class="upload-type">
|
||||
🔗 <span>Import</span>
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if $smarty.get.r ne ""}{insert name="uploadResponse"}{/if}
|
||||
|
||||
{if $error_message ne ""}
|
||||
<div class="error-message" id="error-message" onclick="$(this).fadeOut();">
|
||||
<p>{$error_message}</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $smarty.get.t eq "short"}
|
||||
<div class="info-message">
|
||||
<p>{lang_entry key="upload.text.info.shorts"}</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="upload-area">
|
||||
<div id="cb-response-wrap" style="display: none;">
|
||||
<div id="cb-response">
|
||||
<div class="notice-message" id="notice-message" onclick="$(this).parent().parent().fadeOut();">
|
||||
<p>{lang_entry key="upload.text.public"}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="upload-form" method="post" action="{href_entry key="be_submit"}?t={$smarty.get.t|sanitize}{if $smarty.get.r ne ""}&r={$smarty.get.r|sanitize}{/if}">
|
||||
<div id="uploader" class="frontend">
|
||||
<p style="text-align: center; color: #6c757d; padding: 2rem;">Loading Upload Panel...</p>
|
||||
</div>
|
||||
|
||||
<div id="options-wrapper" style="display: none;">
|
||||
<div class="upload-options">
|
||||
<span>{$file_category}</span>
|
||||
<span id="upload-category">{$upload_category}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="UFSUID" value="{$smarty.session.USER_KEY}" />
|
||||
<input type="hidden" name="UFUID" value="{$smarty.session.USER_ID}" />
|
||||
<input type="hidden" name="UFNAME" id="UFNAME" value="" />
|
||||
<input type="hidden" name="UFSIZE" id="UFSIZE" value="" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{if $paid_memberships eq "1"}
|
||||
<div class="upload-stats" id="fsUploadStats" style="display: none;">
|
||||
<h3 class="stats-title">
|
||||
👤 {lang_entry key="upload.text.mem.limit"}
|
||||
</h3>
|
||||
<div id="the-stats">
|
||||
{$the_stats}
|
||||
</div>
|
||||
<div style="display: none;">
|
||||
<input type="hidden" id="total-uploads" name="total_uploads" value="0" />
|
||||
<input type="hidden" id="type-uploads" name="type_uploads" value="{$smarty.get.t[0]|sanitize}" />
|
||||
<span id="replace-uploads">{lang_entry key="upload.err.msg.9.1"}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{elseif $error_message ne ""}
|
||||
<div class="upload-header">
|
||||
<h1 class="upload-title">⚠️ Access Restricted</h1>
|
||||
</div>
|
||||
<div class="error-message">
|
||||
<p>{$error_message}</p>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Enhanced upload UI interactions
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Smooth transitions for upload types
|
||||
const uploadTypes = document.querySelectorAll('.upload-type');
|
||||
uploadTypes.forEach(type => {
|
||||
type.addEventListener('mouseenter', function() {
|
||||
this.style.transform = 'translateY(-2px)';
|
||||
});
|
||||
type.addEventListener('mouseleave', function() {
|
||||
this.style.transform = 'translateY(0)';
|
||||
});
|
||||
});
|
||||
|
||||
// Auto-hide messages after 5 seconds
|
||||
setTimeout(() => {
|
||||
const messages = document.querySelectorAll('.error-message, .notice-message');
|
||||
messages.forEach(msg => {
|
||||
if (msg.style.display !== 'none') {
|
||||
msg.style.opacity = '0.7';
|
||||
}
|
||||
});
|
||||
}, 5000);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
1
f_templates/tpl_frontend/tpl_file/tpl_uploadjs.tpl
Normal file
1
f_templates/tpl_frontend/tpl_file/tpl_uploadjs.tpl
Normal file
@@ -0,0 +1 @@
|
||||
<script type="text/javascript">$(window).resize(function(){ldelim}dinamicSizeSetFunction_menu();{rdelim});$(function(){ldelim}dinamicSizeSetFunction_menu();$("#uploader").pluploadQueue({ldelim}runtimes:'html5,html4',url:'{$main_url}/{href_entry key="uploader"}?u={$user_key}&t={$smarty.get.t|sanitize}{if $smarty.get.r ne ""}&r={$smarty.get.r|sanitize}{/if}',multipart: true,multipart_params: {ldelim}'UFUID': '{$smarty.session.USER_ID}','UFSUID': '{$user_key}'{rdelim},max_files: {$multiple_file_uploads},chunk_size: '1024kb',rename : false,prevent_duplicates: true,dragdrop: true,max_file_size : '{if $paid_memberships eq "1"}{if $subscription_bw lt $subscription_space and $subscription_bw gt 0}{$subscription_bw}{elseif $subscription_space gt 0}{$subscription_space}{else}{$file_limit}{/if}{else}{$file_limit}{/if}mb',filters : [{ldelim}title : "{lang_entry key="frontend.global.v.p.c"}", extensions : "{$allowed_file_cfg}"{rdelim}],views : {ldelim}list: true,thumbs: true,active: 'thumbs'{rdelim}{rdelim});var uploader = $('#uploader').pluploadQueue();uploader.bind('Init', function() {ldelim}{rdelim});uploader.bind('UploadComplete', function() {ldelim}$.post("?t={$smarty.get.t}&do=form-update", $('.c-entry-form-edit').serialize(), function(data){ldelim}$('#cb-response-wrap-no').html(data);{rdelim});uploader.splice();$('#cb-response-wrap').show();$("#dobrowse .start").addClass("off");$("#uploader_browse").removeClass("set");$(document).keyup(function(e) {ldelim}if(e.keyCode === 27)return{rdelim});{rdelim});uploader.bind('FilesAdded', function(up, files) {ldelim}if (up.settings.max_files > 0 && up.files.length >= up.settings.max_files) {ldelim}up.splice(up.settings.max_files);{rdelim}if (up.files.length > 0) {ldelim}$(".plupload_filelist_header").show();$("#dobrowse .start").removeClass("off").addClass("set");{rdelim}{rdelim});uploader.bind('FilesRemoved', function(up, files) {ldelim}if (up.files.length < up.settings.max_files) {ldelim}{rdelim}if (up.files.length == 0) {ldelim}$(".plupload_filelist_header").hide();$("#dobrowse .start").addClass("off");$("#uploader_browse").removeClass("set");{rdelim}{rdelim});uploader.bind('BeforeUpload', function(up, files) {ldelim}var uploader = $('#uploader').pluploadQueue();$("#UFNAME").val(files.name);$("#UFSIZE").val(files.size);$(document).keyup(function(e) {ldelim}if(e.keyCode === 27)uploader.stop();{rdelim});{rdelim});uploader.bind('Error', function(up, err) {ldelim}$("#notice-message").detach();var ht = '<div class="error-message" id="error-message"><p class="error-message-text">Error #' + err.code + ': ' + err.message + '</p></div>';$(ht).insertBefore("#upload-wrapper");var uploader = $('#uploader').pluploadQueue();uploader.stop();uploader.splice();{rdelim});uploader.bind('UploadProgress', function(up) {ldelim}$(".plupload_total_file_size").html(parseFloat(up.total.bytesPerSec/(1024)).toFixed(2) + " (KiB/s)");{rdelim});uploader.bind('FileUploaded', function(up,file) {ldelim}var the_form = "#upload-form";var the_url = $(the_form).attr("action");$.post(the_url, $(the_form).serialize(), function(data) {ldelim}$("#form-response").html(data);if($("#total-uploads").val() == '0'){ldelim}$("#fsUploadStats").load(the_url+"&do=reload-stats");{rdelim}{rdelim});{rdelim});SelectList.init("file_category_sel");{rdelim});window.addEventListener("offline",function(){ldelim}uploader.stop();{rdelim},false);window.addEventListener("online",function(){ldelim}uploader.start();{rdelim},false);</script>
|
||||
44
f_templates/tpl_frontend/tpl_file/tpl_uploadprogress.tpl
Normal file
44
f_templates/tpl_frontend/tpl_file/tpl_uploadprogress.tpl
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
<div class="row no-display left-padding5" id="progress-stats">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" width="400" border="1">
|
||||
<tr>
|
||||
<td class="wd130 bottom-border-dotted grayText">{lang_entry key="upload.stat.progress"}</td>
|
||||
<td id="tdPercentUploaded" class="right-align bottom-border-dotted"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bottom-border-dotted grayText">{lang_entry key="upload.stat.size"}</td>
|
||||
<td id="tdSizeUploaded" class="right-align bottom-border-dotted"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bottom-border-dotted grayText">{lang_entry key="upload.stat.elapsed"}</td>
|
||||
<td id="tdTimeElapsed" class="right-align bottom-border-dotted"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bottom-border-dotted grayText">{lang_entry key="upload.stat.remain"}</td>
|
||||
<td id="tdTimeRemaining" class="right-align bottom-border-dotted"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bottom-border-dotted grayText">{lang_entry key="upload.stat.current"}</td>
|
||||
<td id="tdCurrentSpeed" class="right-align bottom-border-dotted"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bottom-border-dotted grayText">{lang_entry key="upload.stat.average"}</td>
|
||||
<td id="tdAverageSpeed" class="right-align bottom-border-dotted"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
256
f_templates/tpl_frontend/tpl_file/tpl_view.tpl
Normal file
256
f_templates/tpl_frontend/tpl_file/tpl_view.tpl
Normal file
@@ -0,0 +1,256 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{if $file_title}{$file_title} - EasyStream{else}Watch Video - EasyStream{/if}</title>
|
||||
<link rel="stylesheet" href="{$main_url}/f_templates/tpl_frontend/css/player.css">
|
||||
<style>
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; margin: 0; background: #0f0f0f; color: #fff; }
|
||||
.header { background: #212121; border-bottom: 1px solid #333; padding: 1rem 0; }
|
||||
.header-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
|
||||
.logo { font-size: 1.5rem; font-weight: bold; color: #ff0000; text-decoration: none; }
|
||||
.nav { display: flex; gap: 2rem; }
|
||||
.nav a { color: #fff; text-decoration: none; padding: 0.5rem 1rem; border-radius: 4px; transition: all 0.2s; }
|
||||
.nav a:hover { background: #333; }
|
||||
.player-container { max-width: 1200px; margin: 0 auto; padding: 20px; }
|
||||
.video-player { background: #000; border-radius: 8px; overflow: hidden; margin-bottom: 1rem; position: relative; }
|
||||
.video-info { background: #212121; padding: 1.5rem; border-radius: 8px; margin-bottom: 1rem; }
|
||||
.video-title { font-size: 1.5rem; font-weight: 600; margin: 0 0 1rem 0; line-height: 1.3; }
|
||||
.video-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
|
||||
.video-stats { display: flex; align-items: center; gap: 1rem; color: #aaa; }
|
||||
.video-actions { display: flex; gap: 0.5rem; }
|
||||
.action-btn { background: #333; color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 20px; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; transition: all 0.2s; }
|
||||
.action-btn:hover { background: #555; }
|
||||
.action-btn.liked { background: #065fd4; }
|
||||
.channel-info { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
|
||||
.channel-avatar { width: 40px; height: 40px; border-radius: 50%; }
|
||||
.channel-details h3 { margin: 0; font-size: 1rem; }
|
||||
.channel-details p { margin: 0; color: #aaa; font-size: 0.875rem; }
|
||||
.subscribe-btn { background: #cc0000; color: white; border: none; padding: 0.5rem 1rem; border-radius: 20px; cursor: pointer; font-weight: 500; }
|
||||
.subscribe-btn:hover { background: #aa0000; }
|
||||
.subscribe-btn.subscribed { background: #333; }
|
||||
.video-description { color: #ccc; line-height: 1.5; }
|
||||
.sidebar { background: #212121; border-radius: 8px; padding: 1rem; }
|
||||
.related-videos { display: grid; gap: 1rem; }
|
||||
.related-video { display: flex; gap: 1rem; padding: 0.5rem; border-radius: 4px; transition: background 0.2s; cursor: pointer; }
|
||||
.related-video:hover { background: #333; }
|
||||
.related-thumbnail { width: 120px; height: 68px; border-radius: 4px; object-fit: cover; }
|
||||
.related-info h4 { margin: 0 0 0.25rem 0; font-size: 0.875rem; line-height: 1.2; }
|
||||
.related-info p { margin: 0; color: #aaa; font-size: 0.75rem; }
|
||||
.comments-section { background: #212121; border-radius: 8px; padding: 1.5rem; margin-top: 1rem; }
|
||||
.comments-header { margin-bottom: 1.5rem; }
|
||||
.comment-form { margin-bottom: 2rem; }
|
||||
.comment-input { width: 100%; background: #333; border: 1px solid #555; color: #fff; padding: 0.75rem; border-radius: 4px; resize: vertical; min-height: 80px; }
|
||||
.comment-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
|
||||
.comment-btn { background: #065fd4; color: white; border: none; padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; }
|
||||
.comment-btn:hover { background: #0a5bc4; }
|
||||
.comment-btn.cancel { background: #333; }
|
||||
.comment { margin-bottom: 1rem; }
|
||||
.comment-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
|
||||
.comment-avatar { width: 24px; height: 24px; border-radius: 50%; }
|
||||
.comment-author { font-weight: 500; font-size: 0.875rem; }
|
||||
.comment-time { color: #aaa; font-size: 0.75rem; }
|
||||
.comment-text { color: #ccc; line-height: 1.4; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="header">
|
||||
<div class="header-content">
|
||||
<a href="{$main_url}" class="logo">🎬 EasyStream</a>
|
||||
<nav class="nav">
|
||||
<a href="{$main_url}">Home</a>
|
||||
<a href="{$main_url}/videos">Videos</a>
|
||||
<a href="{$main_url}/broadcasts">Live</a>
|
||||
<a href="{$main_url}/upload">Upload</a>
|
||||
{if $smarty.session.USER_ID}
|
||||
<a href="{$main_url}/account">Account</a>
|
||||
{else}
|
||||
<a href="{$main_url}/signin">Sign In</a>
|
||||
{/if}
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="player-container">
|
||||
<div style="display: grid; grid-template-columns: 1fr 350px; gap: 20px;">
|
||||
<div class="main-content">
|
||||
<!-- Video Player Area -->
|
||||
<div class="video-player">
|
||||
{generate_html type="view_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="view" bb="0"}
|
||||
</div>
|
||||
|
||||
<!-- Video Information -->
|
||||
<div class="video-info">
|
||||
<h1 class="video-title">{if $file_title}{$file_title}{else}Video Title{/if}</h1>
|
||||
|
||||
<div class="video-meta">
|
||||
<div class="video-stats">
|
||||
<span>{if $file_views}{$file_views|number_format} views{else}0 views{/if}</span>
|
||||
<span>•</span>
|
||||
<span>{if $upload_date}{$upload_date|date_format:"%b %d, %Y"}{else}Recently uploaded{/if}</span>
|
||||
</div>
|
||||
|
||||
<div class="video-actions">
|
||||
{if $file_rating eq "1"}
|
||||
<button class="action-btn like-btn" data-action="like">
|
||||
👍 <span class="like-count">{if $file_like}{$file_like|number_format}{else}0{/if}</span>
|
||||
</button>
|
||||
<button class="action-btn dislike-btn" data-action="dislike">
|
||||
👎 <span class="dislike-count">{if $file_dislike}{$file_dislike|number_format}{else}0{/if}</span>
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{if $file_social_sharing eq "1"}
|
||||
<button class="action-btn share-btn">
|
||||
📤 Share
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{if $file_favorites eq "1"}
|
||||
<button class="action-btn save-btn">
|
||||
💾 Save
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{if $file_watchlist eq "1"}
|
||||
<button class="action-btn watchlist-btn">
|
||||
🕒 Watch Later
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Channel Information -->
|
||||
<div class="channel-info">
|
||||
<img src="{if $usr_photo}{$usr_photo}{else}{$main_url}/f_templates/tpl_frontend/img/default-avatar.png{/if}"
|
||||
alt="{if $usr_dname}{$usr_dname}{else}{$usr_user}{/if}" class="channel-avatar">
|
||||
<div class="channel-details">
|
||||
<h3>{if $usr_dname}{$usr_dname}{elseif $ch_title}{$ch_title}{else}{$usr_user}{/if}</h3>
|
||||
<p>{if $usr_subscribers}{$usr_subscribers|number_format} subscribers{else}No subscribers yet{/if}</p>
|
||||
</div>
|
||||
<div style="margin-left: auto;">
|
||||
{if $smarty.session.USER_ID and $smarty.session.USER_ID neq $usr_id}
|
||||
<button class="subscribe-btn" data-user-id="{$usr_id}">
|
||||
{if $user_issub}Subscribed{else}Subscribe{/if}
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Video Description -->
|
||||
{if $file_description}
|
||||
<div class="video-description">
|
||||
<p>{$file_description|nl2br}</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Comments Section -->
|
||||
{if $file_comments eq "1"}
|
||||
<div class="comments-section">
|
||||
<div class="comments-header">
|
||||
<h3>{if $file_comment_count}{$file_comment_count|number_format} Comments{else}0 Comments{/if}</h3>
|
||||
</div>
|
||||
|
||||
{if $smarty.session.USER_ID}
|
||||
<div class="comment-form">
|
||||
<textarea class="comment-input" placeholder="Add a comment..." id="comment-text"></textarea>
|
||||
<div class="comment-actions">
|
||||
<button class="comment-btn cancel" onclick="document.getElementById('comment-text').value=''; this.parentElement.parentElement.style.display='none';">Cancel</button>
|
||||
<button class="comment-btn" onclick="postComment()">Comment</button>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div id="comments-list">
|
||||
<!-- Comments will be loaded here -->
|
||||
<div class="comment">
|
||||
<div class="comment-header">
|
||||
<img src="{$main_url}/f_templates/tpl_frontend/img/default-avatar.png" alt="User" class="comment-avatar">
|
||||
<span class="comment-author">Sample User</span>
|
||||
<span class="comment-time">2 hours ago</span>
|
||||
</div>
|
||||
<div class="comment-text">
|
||||
This is a sample comment to show the layout. Comments will be loaded dynamically.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Sidebar with Related Videos -->
|
||||
<div class="sidebar">
|
||||
<h3 style="margin: 0 0 1rem 0;">Up Next</h3>
|
||||
<div class="related-videos" id="related-videos">
|
||||
<!-- Related videos will be loaded here -->
|
||||
<div class="related-video">
|
||||
<img src="{$main_url}/f_templates/tpl_frontend/img/default-thumb.jpg" alt="Related Video" class="related-thumbnail">
|
||||
<div class="related-info">
|
||||
<h4>Sample Related Video</h4>
|
||||
<p>Channel Name</p>
|
||||
<p>1.2M views • 3 days ago</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Enhanced video player interactions
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Like/Dislike functionality
|
||||
document.querySelectorAll('.like-btn, .dislike-btn').forEach(btn => {
|
||||
btn.addEventListener('click', function() {
|
||||
const action = this.dataset.action;
|
||||
// Add AJAX call to existing EasyStream like system
|
||||
console.log('Action:', action);
|
||||
});
|
||||
});
|
||||
|
||||
// Subscribe functionality
|
||||
const subscribeBtn = document.querySelector('.subscribe-btn');
|
||||
if (subscribeBtn) {
|
||||
subscribeBtn.addEventListener('click', function() {
|
||||
const userId = this.dataset.userId;
|
||||
// Add AJAX call to existing EasyStream subscription system
|
||||
console.log('Subscribe to user:', userId);
|
||||
});
|
||||
}
|
||||
|
||||
// Comment form interactions
|
||||
const commentInput = document.getElementById('comment-text');
|
||||
if (commentInput) {
|
||||
commentInput.addEventListener('focus', function() {
|
||||
this.parentElement.querySelector('.comment-actions').style.display = 'flex';
|
||||
});
|
||||
}
|
||||
|
||||
// Load related videos and comments via existing EasyStream system
|
||||
loadRelatedVideos();
|
||||
loadComments();
|
||||
});
|
||||
|
||||
function loadRelatedVideos() {
|
||||
// Integration with existing EasyStream related videos system
|
||||
// This would call the existing VView::sideColumn() method
|
||||
}
|
||||
|
||||
function loadComments() {
|
||||
// Integration with existing EasyStream comments system
|
||||
// This would call the existing VComments::browseComment() method
|
||||
}
|
||||
|
||||
function postComment() {
|
||||
const text = document.getElementById('comment-text').value;
|
||||
if (text.trim()) {
|
||||
// Integration with existing EasyStream comment posting
|
||||
// This would call the existing VComments::postComment() method
|
||||
console.log('Posting comment:', text);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
9
f_templates/tpl_frontend/tpl_file/tpl_view_extra.tpl
Normal file
9
f_templates/tpl_frontend/tpl_file/tpl_view_extra.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
<script type="text/javascript">
|
||||
var current_url = '{$main_url}/';
|
||||
var menu_section = '{href_entry key="see_comments"}';
|
||||
var fe_mask = 'on';
|
||||
</script>
|
||||
|
||||
<div id="comments-page">
|
||||
{generate_html type="comments_layout" bullet_id="ct-bullet1" entry_id="ct-entry-details1" section="view" bb="0"}
|
||||
</div>
|
||||
Reference in New Issue
Block a user