feat(deployed): add YouTubeR plugin (no-source, vetted live)
YouTubeR (ZyX): system plugin 1.49 + editors-xtd button 1.41; unmapped -> deployed files. Signed-off-by: LÁZÁR Imre <imre@illusion.hu> Assisted-by: claude-code@claude-opus-4-8
This commit is contained in:
parent
8c86275abf
commit
a6cf67c9d6
@ -0,0 +1,157 @@
|
|||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'fl';
|
||||||
|
src: url('../font/fl.eot?42052763');
|
||||||
|
src: url('../font/fl.eot?42052763#iefix') format('embedded-opentype'),
|
||||||
|
url('../font/fl.woff?42052763') format('woff'),
|
||||||
|
url('../font/fl.ttf?42052763') format('truetype'),
|
||||||
|
url('../font/fl.svg?42052763#fl') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
.yicon-fl{
|
||||||
|
font-family: "fl";
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
speak: none;
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: inherit;
|
||||||
|
width: 1em;
|
||||||
|
margin-right: .2em;
|
||||||
|
text-align: center;
|
||||||
|
font-variant: normal;
|
||||||
|
text-transform: none;
|
||||||
|
line-height: 1em;
|
||||||
|
margin-left: .2em;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yicon-youtube-squared:before { content: '\e813'; }
|
||||||
|
.yicon-youtube-play:before { content: '\e812'; }
|
||||||
|
.yicon-logout:before { content: '\e811'; }
|
||||||
|
.yicon-upload:before { content: '\e810'; }
|
||||||
|
.yicon-plus:before { content: '\E80F'; }
|
||||||
|
.yicon-th-list:before { content: '\E80E'; }
|
||||||
|
.yicon-cancel:before { content: '\E806'; }
|
||||||
|
.yicon-eye:before { content: '\e807'; }
|
||||||
|
.yicon-heart:before { content: '\e808'; }
|
||||||
|
.yicon-comment:before { content: '\e809'; }
|
||||||
|
#insert-mxyoutube-shortcode{padding-left:4px;}
|
||||||
|
#insert-mxyoutube-shortcode .yicon-fl{font-size:130%;vertical-align: text-bottom;}
|
||||||
|
|
||||||
|
.wzYoutubeShade{position:fixed;left:0;top:0;right:0;bottom:0;background:#000;opacity:0.6;z-index:7777;}
|
||||||
|
.wzYoutubeWrapper{position:absolute;left:50%;top:100px;width:500px;overflow:hidden;margin-left:-250px;background:#f5f5f5;z-index:7778;box-shadow:0 5px 25px rgba(0,0,0,0.2);}
|
||||||
|
.wzYoutubePages{overflow:auto;width:2000px;margin-left:0px;transition:margin 300ms ease;}
|
||||||
|
.wzYoutubeApp.noTrans .wzYoutubePages{transition:none;}
|
||||||
|
.wzYoutubeApp.currentPage-2 .wzYoutubePages{margin-left:-500px;}
|
||||||
|
.wzYoutubeApp.currentPage-3 .wzYoutubePages{margin-left:-1000px;}
|
||||||
|
.page{float:left;width:470px;padding:0 15px 5px;}
|
||||||
|
.page-1{text-align:center;}
|
||||||
|
.wzYTAuthBtn{color:#CC181E;text-decoration:underline;margin-top:40%;cursor:pointer;display:inline-block;font-size:16px;}
|
||||||
|
.wzYTAuthBtn i{font-size: 2em;vertical-align: middle;}
|
||||||
|
|
||||||
|
.wzYoutubeClose{position:absolute;top:98px;left:50%;margin-left:253px;font-size:22px;color:#fff;cursor:pointer;z-index:7779;}
|
||||||
|
.wzYoutubeClose:hover{color:#bbb;}
|
||||||
|
|
||||||
|
.wzYoutubeSignOut{cursor:pointer;margin-left:5px;color:#fff; opacity:0.8;}
|
||||||
|
.wzYoutubeSignOut:hover{opacity:1;}
|
||||||
|
|
||||||
|
.wzYTHead{margin:0 -15px 15px;padding:10px 15px;background:#f21400 url(../images/header.png) no-repeat 0 0;color:#fff; text-shadow:1px 1px 1px rgba(0,0,0,0.4);}
|
||||||
|
.wzYTHeadLink{float:right;cursor: pointer;margin-top:7px;}
|
||||||
|
.wzYTChannel{font-size:16px;width:70%;line-height:30px;}
|
||||||
|
.wzYTChannel img{width:30px;margin-right:5px; vertical-align: middle;}
|
||||||
|
.wzYTChannel b{font-weight:bold;}
|
||||||
|
|
||||||
|
.wzYTVideos{padding:0 8px;margin:0 -8px;list-style: none;overflow:hidden; overflow-y: auto; max-height: 430px;}
|
||||||
|
.wzYTVideoItem, .wzYTMoreBtn{margin:0 0 10px;cursor:pointer;overflow: auto;background:#fff;}
|
||||||
|
.wzYTVideoItem{box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);}
|
||||||
|
.wzYTVideoItem:hover{box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);}
|
||||||
|
.wzYTVideoItem img{ display: inline-block;width:120px;float: left;height:90px;margin:0 10px 0 0;}
|
||||||
|
.wzYTVideoItem div{overflow:hidden;padding:7px 10px 3px 3px;height:80px;}
|
||||||
|
.wzYTVideoItem b{color:#444;font-size:1.1em;}
|
||||||
|
.wzYTVideoItem:hover b{text-decoration:underline;}
|
||||||
|
.wzYTVideoItem p{margin:3px 0 0;padding:0;color:#444;font-size:0.9em;line-height: 1.3em;}
|
||||||
|
|
||||||
|
.wzYTVideoItem.loading{position:relative;}
|
||||||
|
.wzYTVideoItem.loading:before{ content:' ';left:55px;top:40px;font-size:10px;width:1em;height:1em;border-radius:50%;position: absolute;-webkit-animation: load4 1.3s infinite linear;animation: load4 1.3s infinite linear;}
|
||||||
|
|
||||||
|
.wzYTVideoItem.error{border-color:#cc0000;}
|
||||||
|
.wzYTNoVideoItems{text-align:center;}
|
||||||
|
|
||||||
|
.wzYTMoreBtn{margin:0 8px 5px 0;padding:5px;text-align:center;background:#999;color:#fff;cursor:pointer;}
|
||||||
|
.wzYTMoreBtn:hover{background: #f21400;}
|
||||||
|
|
||||||
|
.wzYTUploadForm{display:block;width:330px;margin:20px auto;box-sizing:border-box;}
|
||||||
|
.wzYTUploadForm p{margin: 0 0 10px;}
|
||||||
|
.wzYTUploadForm label{display: block;}
|
||||||
|
.wzYTUploadForm label i{color:#CC181E;}
|
||||||
|
.wzYTUploadForm input[type="text"], .wzYTUploadForm textarea{padding:5px 10px 6px;width:100%;box-sizing:border-box;border:1px solid #D3D3D3;}
|
||||||
|
.wzYTUploadForm input[type="text"]:focus, .wzYTUploadForm textarea:focus{border-color:#167AC6;}
|
||||||
|
.wzYTUploadForm .wzYTUploadDescr{height:70px;}
|
||||||
|
|
||||||
|
.wzLoader{position:absolute;left:0;top:0;right:0;bottom:0;z-index:7779;}
|
||||||
|
.wzLoader .wzShade{width:100%;height:100%;background:#fff;opacity:0.5;}
|
||||||
|
.wzLoader .wzLoadbar{position:absolute;left:50%;top:50%;height:15px;width:200px;margin-top:-7px;margin-left:-100px;}
|
||||||
|
.wzLoader .wzLoadbar progress{height:100%;width:100%;}
|
||||||
|
|
||||||
|
.vc_mx_youtuber{background:url(../images/youtuber.png) no-repeat 50% 50% !important;}
|
||||||
|
.mx_youtuber_ext_vc .wpb_vc_param_value{margin-right:7px;border-right:1px solid #ccc;padding-right:7px; font-style:italic;}
|
||||||
|
.mx_youtuber_ext_vc .wpb_vc_param_value:last-child{border:none;}
|
||||||
|
|
||||||
|
|
||||||
|
@-webkit-keyframes load4 {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
box-shadow: 0em -3em 0em 0.2em #ffffff, 2em -2em 0 0em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 0em #ffffff;
|
||||||
|
}
|
||||||
|
12.5% {
|
||||||
|
box-shadow: 0em -3em 0em 0em #ffffff, 2em -2em 0 0.2em #ffffff, 3em 0em 0 0em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 0em #ffffff, 3em 0em 0 0.2em #ffffff, 2em 2em 0 0em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
|
||||||
|
}
|
||||||
|
37.5% {
|
||||||
|
box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 0em #ffffff, 2em 2em 0 0.2em #ffffff, 0em 3em 0 0em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 0em #ffffff, 0em 3em 0 0.2em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
|
||||||
|
}
|
||||||
|
62.5% {
|
||||||
|
box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 0em #ffffff, -2em 2em 0 0.2em #ffffff, -3em 0em 0 0em #ffffff, -2em -2em 0 -0.5em #ffffff;
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 0.2em #ffffff, -2em -2em 0 0em #ffffff;
|
||||||
|
}
|
||||||
|
87.5% {
|
||||||
|
box-shadow: 0em -3em 0em 0em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 0em #ffffff, -2em -2em 0 0.2em #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes load4 {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
box-shadow: 0em -3em 0em 0.2em #ffffff, 2em -2em 0 0em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 0em #ffffff;
|
||||||
|
}
|
||||||
|
12.5% {
|
||||||
|
box-shadow: 0em -3em 0em 0em #ffffff, 2em -2em 0 0.2em #ffffff, 3em 0em 0 0em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 0em #ffffff, 3em 0em 0 0.2em #ffffff, 2em 2em 0 0em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
|
||||||
|
}
|
||||||
|
37.5% {
|
||||||
|
box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 0em #ffffff, 2em 2em 0 0.2em #ffffff, 0em 3em 0 0em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 0em #ffffff, 0em 3em 0 0.2em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
|
||||||
|
}
|
||||||
|
62.5% {
|
||||||
|
box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 0em #ffffff, -2em 2em 0 0.2em #ffffff, -3em 0em 0 0em #ffffff, -2em -2em 0 -0.5em #ffffff;
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 0.2em #ffffff, -2em -2em 0 0em #ffffff;
|
||||||
|
}
|
||||||
|
87.5% {
|
||||||
|
box-shadow: 0em -3em 0em 0em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 0em #ffffff, -2em -2em 0 0.2em #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,484 @@
|
|||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'fl';
|
||||||
|
src: url('../font/fl.eot?42052768');
|
||||||
|
src: url('../font/fl.eot?42052768#iefix') format('embedded-opentype'),
|
||||||
|
url('../font/fl.woff?42052768') format('woff'),
|
||||||
|
url('../font/fl.ttf?42052768') format('truetype'),
|
||||||
|
url('../font/fl.svg?42052768#fl') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
.mxyt-icon{
|
||||||
|
font-family: "fl";
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
speak: none;
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: inherit;
|
||||||
|
width: 1em;
|
||||||
|
margin-right: .2em;
|
||||||
|
text-align: center;
|
||||||
|
font-variant: normal;
|
||||||
|
text-transform: none;
|
||||||
|
line-height: 1em;
|
||||||
|
margin-left: .2em;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mxyt-icon-youtube-squared:before { content: '\E813'; }
|
||||||
|
.mxyt-icon-youtube-play:before { content: '\E812'; }
|
||||||
|
.mxyt-icon-logout:before { content: '\E811'; }
|
||||||
|
.mxyt-icon-upload:before { content: '\E810'; }
|
||||||
|
.mxyt-icon-plus:before { content: '\E80F'; }
|
||||||
|
.mxyt-icon-th-list:before { content: '\E812'; }
|
||||||
|
.mxyt-icon-cancel:before { content: '\e806'; }
|
||||||
|
.mxyt-icon-views:before { content: '\e807'; }
|
||||||
|
.mxyt-icon-favs:before { content: '\e808'; }
|
||||||
|
.mxyt-icon-comments:before { content: '\e809'; }
|
||||||
|
.mxyt-icon-likes:before { content: '\e80a'; }
|
||||||
|
.mxyt-icon-dislikes:before { content: '\e80b'; }
|
||||||
|
.mxyt-icon-play:before { content: '\e80c'; }
|
||||||
|
.mxyt-icon-spinner{-moz-animation: mxyt-spin 2s infinite linear;
|
||||||
|
-o-animation: mxyt-spin 2s infinite linear;
|
||||||
|
-webkit-animation: mxyt-spin 2s infinite linear;
|
||||||
|
animation: mxyt-spin 2s infinite linear;}
|
||||||
|
.mxyt-icon-spinner:before { content: '\e80d'; }
|
||||||
|
.mxyt-icon-angle-down:before { content: "\f107"; }
|
||||||
|
|
||||||
|
.mxyt-row{margin:0 -10px; display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-flex-wrap: wrap;
|
||||||
|
-ms-flex-wrap: wrap;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
-webkit-box-align: stretch;
|
||||||
|
-webkit-align-items: stretch;
|
||||||
|
-ms-flex-align: stretch;
|
||||||
|
align-items: stretch;}
|
||||||
|
.mxyt-brow{margin:0 -10px;}
|
||||||
|
.mxyt-brow::after{content:" "; display:block; clear:left;}
|
||||||
|
.mxyt-col-1,
|
||||||
|
.mxyt-bcol-1{padding:0 10px;width:100%;box-sizing: border-box;}
|
||||||
|
.mxyt-col-2, .mxyt-col-3, .mxyt-col-4, .mxyt-col-5, .mxyt-col-6, .mxyt-col-7, .mxyt-col-8{box-sizing:border-box;padding:0 10px; display: flex;}
|
||||||
|
.mxyt-bcol-2, .mxyt-bcol-3, .mxyt-bcol-4, .mxyt-bcol-5, .mxyt-bcol-6, .mxyt-bcol-7, .mxyt-bcol-8{box-sizing:border-box;padding:0 10px;float:left;}
|
||||||
|
.mxyt-col-2,.mxyt-bcol-2{width:50%;}
|
||||||
|
.mxyt-col-3,.mxyt-bcol-3{width:33.33%;}
|
||||||
|
.mxyt-col-4,.mxyt-bcol-4{width:25%;}
|
||||||
|
.mxyt-col-5,.mxyt-bcol-5{width:20%;}
|
||||||
|
.mxyt-col-6,.mxyt-bcol-6{width:16.66%;}
|
||||||
|
.mxyt-col-7,.mxyt-bcol-7{width:14.28%;}
|
||||||
|
.mxyt-col-8,.mxyt-bcol-8{width:12.5%;}
|
||||||
|
|
||||||
|
.mxyt-nospace .mxyt-row, .mxyt-nospace .mxyt-brow{margin:0;}
|
||||||
|
.mxyt-nospace .mxyt-col-1,
|
||||||
|
.mxyt-nospace .mxyt-col-2,
|
||||||
|
.mxyt-nospace .mxyt-col-3,
|
||||||
|
.mxyt-nospace .mxyt-col-4,
|
||||||
|
.mxyt-nospace .mxyt-col-5,
|
||||||
|
.mxyt-nospace .mxyt-col-6,
|
||||||
|
.mxyt-nospace .mxyt-col-7,
|
||||||
|
.mxyt-nospace .mxyt-col-8,
|
||||||
|
|
||||||
|
.mxyt-nospace .mxyt-bcol-1,
|
||||||
|
.mxyt-nospace .mxyt-bcol-2,
|
||||||
|
.mxyt-nospace .mxyt-bcol-3,
|
||||||
|
.mxyt-nospace .mxyt-bcol-4,
|
||||||
|
.mxyt-nospace .mxyt-bcol-5,
|
||||||
|
.mxyt-nospace .mxyt-bcol-6,
|
||||||
|
.mxyt-nospace .mxyt-bcol-7,
|
||||||
|
.mxyt-nospace .mxyt-bcol-8{ padding:0;}
|
||||||
|
|
||||||
|
.mxyt-more{text-align:center;}
|
||||||
|
.mxyt-more .mxyt-button{ border-top:1px solid #999; color:#666; padding:2px 40px 0; cursor:pointer;}
|
||||||
|
|
||||||
|
.mxYouTubeR{font:13px/100% Roboto, sans-serif;}
|
||||||
|
|
||||||
|
|
||||||
|
.mxYouTubeR_video, .mxyt-playlist-item{margin:0 0 20px !important;background:#fff;box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);}
|
||||||
|
|
||||||
|
.mxyt-title, .mxyt-description{border-bottom:1px solid #e2e2e2;}
|
||||||
|
.mxyt-title, .mxyt-date, .mxyt-description, .mxyt-meta{padding:13px 15px 15px;}
|
||||||
|
.mxyt-video img, .mxyt-channel-feat-video img{width:100% !important;}
|
||||||
|
.mxyt-video iframe{ margin:0; padding:0;}
|
||||||
|
.mxyt-date{font-size:12px; color:#808080;padding-bottom:0;}
|
||||||
|
.mxyt-title{padding-top:13px;}
|
||||||
|
.mxyt-title h1, .mxyt-title h3{margin:0!important; padding:0; font-size:24px; font-weight:normal; clear:none; line-height:1.2;color:#222;}
|
||||||
|
.mxyt-videolink{display:block; position:relative;text-decoration:none!important; border:none!important;}
|
||||||
|
.mxyt-videolink .mxyt-play, .mxyt-videolink .mxyt-time{color:#fff;position:absolute;transition: opacity .3s;opacity:0.7;line-height: 100%;}
|
||||||
|
.mxyt-videolink .mxyt-play{ font-size:65px;left:50%;top:50%;transform: translate(-50%, -50%);-webkit-transform: translate(-50%, -50%);-ms-transform: translate(-50%, -50%);text-shadow:2px 2px 2px rgba(0,0,0,0.6);}
|
||||||
|
.mxyt-videolink .mxyt-time{bottom:5px; right:5px;font-size:12px;background:#000;padding: 6px 8px 7px; }
|
||||||
|
.mxyt-videolink:hover .mxyt-play, .mxyt-videolink:hover .mxyt-time{opacity:1;}
|
||||||
|
.mxyt-channel{text-align:center; margin:15px 0 0;}
|
||||||
|
.mxyt-channel img{width:45px;}
|
||||||
|
.mxyt-channel h3{margin:0!important; padding:0!important; font-size:16px!important; font-weight:normal!important;color:#333;}
|
||||||
|
.mxyt-description{font-size:13px;line-height:18px; color:#222;}
|
||||||
|
.mxyt-meta{ margin:0 -15px; padding:0 15px; font-size:12px; line-height:1;}
|
||||||
|
.mxyt-meta > div{box-sizing:border-box; width:20%;padding:13px 10px; float:left; text-align:center;color:#aaa;transition: color .2s; cursor:default; white-space:nowrap;}
|
||||||
|
.mxyt-meta > div:hover{color:#666;}
|
||||||
|
.mxyt-meta::after{content:" "; display:block; clear:left;}
|
||||||
|
.mxyt-meta i{display:block; margin:0 auto 5px; font-size:16px;}
|
||||||
|
.mxYouTubeR_playlist .mxyt-meta > div{width:33.33%;}
|
||||||
|
|
||||||
|
.mxyt-video-frame{position:relative;width: 100%;padding-top:59%;}
|
||||||
|
.mxyt-video-frame iframe{position: absolute;left: 0;top: 0;width: 100%;height: 100%;}
|
||||||
|
|
||||||
|
.mxYouTubeR_video .mxyt-date{float:right;padding:0;margin: 5px 0 0 20px;}
|
||||||
|
|
||||||
|
.mxYouTubeR_playlist{margin:0 0 20px;}
|
||||||
|
.mxyt-playlist .mxyt-title{ padding-bottom:10px;}
|
||||||
|
.mxyt-playlist .mxyt-title h1, .mxyt-playlist .mxyt-title h3{font-size:14px; font-weight:bold;}
|
||||||
|
|
||||||
|
|
||||||
|
.mxyt-row .mxyt-playlist-item{flex-grow: 1;display: flex;flex-direction: column;width:100%;}
|
||||||
|
.mxyt-playlist .mxyt-row .mxyt-description{display: flex; flex-grow:1;}
|
||||||
|
.mxyt-row .mxyt-description{flex-direction: column;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.mxYouTubeR_channel{background:#fff;box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); padding-bottom:25px;}
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist-item{box-shadow:none;}
|
||||||
|
.mxYouTubeR_channel .mxyt-bcol-1{margin-bottom:40px;}
|
||||||
|
.mxYouTubeR_channel .mxyt-title, .mxYouTubeR_channel .mxyt-description{border:none;}
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-bcol-1 .mxyt-video{float:left;width:196px;}
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-video.mxyt-single{float:none; width:auto;}
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-bcol-1 .mxyt-title,
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-bcol-1 .mxyt-date{padding-top:0;}
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-bcol-1 .mxyt-description{padding-bottom:7px;}
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-bcol-1 .mxyt-title,
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-bcol-1 .mxyt-date,
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-bcol-1 .mxyt-description,
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-bcol-1 .mxyt-meta{margin-left:196px;}
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist-item::after{content:" "; display:block; clear:left;}
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-bcol-1 .mxyt-meta{padding-top:0;}
|
||||||
|
.mxYouTubeR_channel .mxyt-meta > div{width:auto; margin-right:25px;padding:0;}
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-meta > div{width:33%;margin:0;}
|
||||||
|
|
||||||
|
.mxyt-channel-head{position:relative;margin-bottom:15px;}
|
||||||
|
.mxyt-channel-head-cover{background-size:cover;height:200px;position:relative; background-position:50% 50%; margin-bottom:15px;}
|
||||||
|
.mxyt-channel-logo{ position:absolute; left:15px; top:0;box-shadow: 0 1px 1px rgba(0,0,0,.4);background-color:rgba(0,0,0,.2);}
|
||||||
|
.mxyt-channel-logo img{width:100px;}
|
||||||
|
.mxyt-channel-info{position:absolute; left:15px; bottom:15px; color:#fff; font-size:14px; font-weight:500;text-shadow:1px 1px 2px rgba(0,0,0,1);}
|
||||||
|
.mxyt-channel-info > span{margin-right:15px;}
|
||||||
|
.mxyt-channel-title{font-weight:500;font-size:20px; padding-left:15px;padding-right:150px;margin-bottom:15px;position:relative;}
|
||||||
|
.mxyt-channel-descr{padding:0 15px;}
|
||||||
|
.mxyt-channel-subscr-btn{ position:absolute; right:15px; margin-top:-6px;}
|
||||||
|
.mxyt-channel-feat-video{ padding-bottom:15px;}
|
||||||
|
.mxyt-channel-feat-video::after{content:" "; display:block; clear:left;}
|
||||||
|
.mxyt-channel-feat-video-player{float:left;width:50%;}
|
||||||
|
.mxyt-channel-feat-video-descr{margin-left:50%;padding-left:15px; line-height:1.3;}
|
||||||
|
.mxyt-channel-feat-video,
|
||||||
|
.mxyt-channel-videos{padding:0 15px;}
|
||||||
|
.mxyt-channel-feat-video-title{font-size:14px; font-weight:bold; margin:0 0 10px;}
|
||||||
|
.mxyt-channel-videos{ padding-top:15px; }
|
||||||
|
|
||||||
|
|
||||||
|
.mxyt-channel-playlist-chooser{border-bottom:3px solid #e2e2e2;position:relative;margin:0 -15px 15px; padding:0 15px;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-channel-playlist-chooser{border-color:#333;}
|
||||||
|
.mxyt-playlist-select{display:inline-block;position:relative;padding:0 5px 10px 10px;/*margin-left:-15px;*/ color:#222;border-bottom:3px solid #e62117;margin-bottom:-3px; }
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-playlist-select{color:#ccc;}
|
||||||
|
.mxyt-playlist-select b{cursor:pointer;font-size:120%;}
|
||||||
|
.mxyt-playlist-select ul{display:none;position:absolute;top:100%;left:0;z-index:99999;color:#222;background:#f5f5f5;margin:0!important;padding:0;border:1px solid #c5c5c5; list-style:none!important;box-shadow: 0 0 15px rgba(0,0,0,.18);}
|
||||||
|
.mxyt-playlist-select:hover ul{display:block;}
|
||||||
|
.mxyt-playlist-select ul li{margin:0!important; padding:0; list-style:none!important;}
|
||||||
|
.mxyt-playlist-select ul span{display:block; white-space:nowrap; padding:10px 15px;border-bottom:1px solid #c5c5c5; font-size:100%; cursor:pointer;}
|
||||||
|
.mxyt-playlist-select ul li:last-of-type span{border:none;}
|
||||||
|
.mxyt-playlist-select ul span:hover{background:#eee;}
|
||||||
|
|
||||||
|
|
||||||
|
.mxyt-tooltip{position:absolute;display:none;color:#fff;background:#222;font-family:Roboto;line-height:120%;font-size:12px;padding:5px 10px; border-radius:5px; pointer-events:none;margin-top:-15px;margin-left:-11px; white-space:nowrap;z-index:999;}
|
||||||
|
.mxyt-tooltip.active{display:block;}
|
||||||
|
.mxyt-tooltip div{position:absolute;left:50%;top:100%;margin-left:-3px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #222;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.mxYouTubeR_theme_dark.mxYouTubeR_video,
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-playlist-item,
|
||||||
|
.mxYouTubeR_theme_dark.mxYouTubeR_channel{background:#191919;box-shadow:none; color:#999;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-title, .mxYouTubeR_theme_dark .mxyt-description{border-bottom:1px solid #141414; background:#191919;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-playlist-item .mxyt-title{border:none;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-title h1,
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-title h3,
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-channel-feat-video-title,
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-channel-title{color:#ccc;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-channel h3{color:#ddd;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-description{color:#999;padding-top:0;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-meta > div{color:#555;background:#1b1b1b;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-meta > div:hover{color:#888;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-channel-videos{border-color:#444;}
|
||||||
|
.mxYouTubeR_theme_dark.mxYouTubeR_channel .mxyt-description{border:none;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-channel-head,
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-channel-feat-video{background:rgba(0,0,0,0.1);}
|
||||||
|
.mxYouTubeR_theme_dark.mxyt-tooltip{background:#fff;color:#000;}
|
||||||
|
.mxYouTubeR_theme_dark.mxyt-tooltip div{border-top-color:#fff;}
|
||||||
|
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-more .mxyt-button{border-color:#444;color:#666;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-more .mxyt-button:hover{color:#999;}
|
||||||
|
|
||||||
|
|
||||||
|
.mxYouTubeR_theme_tiles .mxyt-playlist{ margin-bottom:10px;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.mxyt-flipcards-playlist-item{position:relative;padding-bottom:70%;perspective: 600px;margin-bottom:20px;}
|
||||||
|
.mxyt-flipcards-front,
|
||||||
|
.mxyt-flipcards-back{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;}
|
||||||
|
.mxyt-flipcards-front a,
|
||||||
|
.mxyt-flipcards-back a{position:absolute;top:0;left:0;right:0;bottom:0;}
|
||||||
|
.mxyt-flipcards-front a img{display:none !important;}
|
||||||
|
.mxyt-flipcards-playlist-item img.mxyt-img{position:absolute;top:50%;left:50%;width:auto;max-width:none;min-height:100%;transform:translate(-50%,-50%);}
|
||||||
|
.mxyt-flipcards-front{ z-index: 900;transform: rotateX(0deg) rotateY(0deg);transform-style: preserve-3d;backface-visibility: hidden;transition: all .4s ease-in-out;box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);}
|
||||||
|
.mxyt-flipcards-playlist-item:hover .mxyt-flipcards-front{z-index: 900;transform: rotateY(180deg);box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);}
|
||||||
|
.mxyt-flipcards-playlist-item a,
|
||||||
|
.mxyt-flipcards-playlist-item a:hover{text-decoration:none;color:#fff;}
|
||||||
|
|
||||||
|
.mxyt-flipcards-back{z-index: 800;transform: rotateY(-179deg);transform-style: preserve-3d;backface-visibility: hidden;transition: all .4s ease-in-out;}
|
||||||
|
.mxyt-flipcards-playlist-item:hover .mxyt-flipcards-back{z-index: 1000;transform: rotateX(0deg) rotateY(0deg);box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);}
|
||||||
|
.mxyt-flipcards-link{background-color:rgba(29,134,239,0.9); padding:15px; text-shadow:1px 1px 0 rgba(0,0,0,0.2);}
|
||||||
|
.mxyt-flipcards-link h3{margin:0 0 10px !important; padding:0 !important; font-size:18px !important; font-weight:normal !important; line-height:1.1 !important;color:#fff !important;}
|
||||||
|
.mxyt-flipcards-description{white-space:pre-wrap;}
|
||||||
|
.mxyt-flipcards-meta{position:absolute; left:0; bottom:0; right:0;padding-bottom:10px;}
|
||||||
|
.mxyt-flipcards-meta > div{ float:left; width:33%; text-align:center;}
|
||||||
|
.mxyt-flipcards-meta i{display:block; font-size:18px; margin:0 auto 5px;}
|
||||||
|
.mxyt-flipcards-limit{position:absolute; top:15px; left:15px; right:15px; bottom:60px;overflow:hidden; }
|
||||||
|
.mxyt-flipcards-limit-fade{position:absolute;top:100%;left:-5px;right:-5px;height:10px;box-shadow:0 -3px 10px 3px rgba(29,134,239,.9);}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.mxyt-playlist-item-blank{padding-top:100%;position: relative;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.mxYouTubeR_theme_circles1{}
|
||||||
|
.mxYouTubeR_theme_circles1 .mxyt-playlist-item-blank{margin-bottom:20px;}
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-item {border-radius: 50%;position: absolute;left:0;top:0;right:0;bottom:0;cursor: default;box-shadow: inset 0 0 0 16px rgba(255,255,255,0.6), 0 1px 2px rgba(0,0,0,0.1);transition: all 0.4s ease-in-out;background-size:cover;background-repeat:no-repeat;background-position:50% 50%;text-align:center;}
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-info {position: absolute;background: rgba(0,0,0, 0.7);width: 100%;height: 100%;border-radius: 50%;opacity: 0;transition: all 0.4s ease-in-out;transform: scale(0.01);}
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-info h3 {position:absolute;left:20px;top:45%;right:20px;overflow:hidden;color: #fff;text-transform: uppercase;letter-spacing: 2px;font-size: 17px;line-height: 1.1;text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0,0,0,0.3);margin:0;transform:translateY(-50%);}
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-info a{position:absolute; bottom:15px; left:50%;transform:translateX(-50%);font-size:50px;color:#fff; text-decoration:none; border:none;text-shadow:0 0 10px #000;}
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-item:hover,
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-item:active,
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-item:focus,
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-item.mx-active{box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 1px 2px rgba(0,0,0,0.1);}
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-item:hover .ch-info ,
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-item:active .ch-info,
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-item:focus .ch-info,
|
||||||
|
.mxYouTubeR_theme_circles1 .ch-item.mx-active .ch-info{transform: scale(1);opacity: 1;}
|
||||||
|
.mxYouTubeR_theme_circles1 .mxyt-more{margin-top:30px;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.mxYouTubeR_theme_circles2{}
|
||||||
|
.mxYouTubeR_theme_circles2 .mxyt-playlist-item-blank{margin-bottom:20px;}
|
||||||
|
.mxYouTubeR_theme_circles2 .ch-item{left:0;top:0;right:0;bottom:0;border-radius: 50%;position: absolute;cursor: default;box-shadow: 0 1px 3px rgba(0,0,0,0.2);}
|
||||||
|
.mxYouTubeR_theme_circles2 .ch-thumb {left:0;top:0;width:100%;height:100%;border-radius: 50%;overflow: hidden;position: absolute;box-shadow: inset 0 0 0 15px rgba(255,255,255, 0.5);-webkit-transform-origin: 95% 40%;-moz-transform-origin: 95% 40%;-o-transform-origin: 95% 40%;-ms-transform-origin: 95% 40%;transform-origin: 95% 40%;-webkit-transition: all 0.3s ease-in-out;-moz-transition: all 0.3s ease-in-out;-o-transition: all 0.3s ease-in-out;-ms-transition: all 0.3s ease-in-out;transition: all 0.3s ease-in-out;background-size:cover; background-position:50% 50%; background-repeat:no-repeat;}
|
||||||
|
.mxYouTubeR_theme_circles2 .ch-thumb:after {content: '';width: 8px;height: 8px;position: absolute;border-radius: 50%;top: 40%;left: 95%;margin: -4px 0 0 -4px;background: rgb(14,14,14);background: -moz-radial-gradient(center, ellipse cover, rgba(14,14,14,1) 0%, rgba(125,126,125,1) 100%);background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(14,14,14,1)), color-stop(100%,rgba(125,126,125,1)));background: -webkit-radial-gradient(center, ellipse cover, rgba(14,14,14,1) 0%,rgba(125,126,125,1) 100%);background: -o-radial-gradient(center, ellipse cover, rgba(14,14,14,1) 0%,rgba(125,126,125,1) 100%);background: -ms-radial-gradient(center, ellipse cover, rgba(14,14,14,1) 0%,rgba(125,126,125,1) 100%);background: radial-gradient(ellipse at center, rgba(14,14,14,1) 0%,rgba(125,126,125,1) 100%);box-shadow: 0 0 1px rgba(255,255,255,0.9);}
|
||||||
|
.mxYouTubeR_theme_circles2 .ch-info {left:0;top:0;position: absolute;width: 100%;height: 100%;border-radius: 50%;overflow: hidden;background:#222;box-shadow: inset 0 0 15px rgba(0,0,0,0.7);}
|
||||||
|
.mxYouTubeR_theme_circles2 .ch-info h3 {position:absolute;left:20px;top:45%;right:20px;overflow:hidden;color: #fff;text-transform: uppercase;letter-spacing: 2px;font-size: 17px;line-height: 1.1;text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0,0,0,0.3);margin:0;transform:translateY(-50%); text-align:center;}
|
||||||
|
.mxYouTubeR_theme_circles2 .ch-info a{position:absolute; bottom:15px; left:50%;transform:translateX(-50%);font-size:50px;color:#fff; text-decoration:none; border:none;text-shadow:0 0 10px #000;}
|
||||||
|
.mxYouTubeR_theme_circles2 .ch-item:hover .ch-thumb,
|
||||||
|
.mxYouTubeR_theme_circles2 .ch-item:active .ch-thumb,
|
||||||
|
.mxYouTubeR_theme_circles2 .ch-item:focus .ch-thumb,
|
||||||
|
.mxYouTubeR_theme_circles2 .ch-item.mx-active .ch-thumb{box-shadow: inset 0 0 0 15px rgba(255,255,255, 0.5), 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);transform: rotate(-150deg); }
|
||||||
|
|
||||||
|
.mxyt-text-description{position:relative; white-space:pre-wrap;word-wrap:break-word;}
|
||||||
|
.mxyt-text-description.mxyt-less{height:100px; overflow:hidden;}
|
||||||
|
.mxyt-text-description.mxyt-less.hasMore{ height:100px; overflow:hidden;}
|
||||||
|
.mxyt-text-description.mxyt-less.noMore{height:auto; overflow:visible;}
|
||||||
|
.mxyt-text-description.mxyt-less.hasMore::after{content: '';position: absolute;left:0;right:0;bottom:0;height:40px;background: linear-gradient(to bottom, rgba(255,255,255, 0.2), #fff 100%);}
|
||||||
|
.mxyt-text-description-btn{display:block; text-align:center;text-transform: uppercase;color: #aaa;border-top: 1px solid #e2e2e2;line-height: 28px;margin: 7px 0 0; cursor:pointer;transition: color .2s;}
|
||||||
|
.mxyt-text-description-btn:hover{color:#666;}
|
||||||
|
|
||||||
|
.mxyt-text-description-full a{text-decoration:none;border:none;}
|
||||||
|
.mxyt-text-description-full:hover a{text-decoration:underline;}
|
||||||
|
|
||||||
|
.mxYouTubeR_playlist .mxyt-text-description-btn,
|
||||||
|
.mxYouTubeR_video .mxyt-text-description-btn{margin-bottom:-13px;}
|
||||||
|
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-text-description.mxyt-less::after{background: linear-gradient(to bottom, rgba(25,25,25, 0.2), #191919 100%);}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-text-description-btn{border-top: 1px solid #333;color:#555;}
|
||||||
|
.mxYouTubeR_theme_dark .mxyt-text-description-btn:hover{color:#888;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@media (max-width: 1200px) {
|
||||||
|
.mxyt-cols-lg .mxyt-col-2,
|
||||||
|
.mxyt-cols-lg .mxyt-col-3,
|
||||||
|
.mxyt-cols-lg .mxyt-col-4,
|
||||||
|
.mxyt-cols-lg .mxyt-col-5,
|
||||||
|
.mxyt-cols-lg .mxyt-col-6,
|
||||||
|
.mxyt-cols-lg .mxyt-col-7,
|
||||||
|
.mxyt-cols-lg .mxyt-col-8,
|
||||||
|
|
||||||
|
.mxyt-cols-lg .mxyt-bcol-2,
|
||||||
|
.mxyt-cols-lg .mxyt-bcol-3,
|
||||||
|
.mxyt-cols-lg .mxyt-bcol-4,
|
||||||
|
.mxyt-cols-lg .mxyt-bcol-5,
|
||||||
|
.mxyt-cols-lg .mxyt-bcol-6,
|
||||||
|
.mxyt-cols-lg .mxyt-bcol-7,
|
||||||
|
.mxyt-cols-lg .mxyt-bcol-8{width:100%;}
|
||||||
|
}
|
||||||
|
@media (max-width: 992px) {
|
||||||
|
.mxyt-cols-md .mxyt-col-2,
|
||||||
|
.mxyt-cols-md .mxyt-col-3,
|
||||||
|
.mxyt-cols-md .mxyt-col-4,
|
||||||
|
.mxyt-cols-md .mxyt-col-5,
|
||||||
|
.mxyt-cols-md .mxyt-col-6,
|
||||||
|
.mxyt-cols-md .mxyt-col-7,
|
||||||
|
.mxyt-cols-md .mxyt-col-8,
|
||||||
|
|
||||||
|
.mxyt-cols-md .mxyt-bcol-2,
|
||||||
|
.mxyt-cols-md .mxyt-bcol-3,
|
||||||
|
.mxyt-cols-md .mxyt-bcol-4,
|
||||||
|
.mxyt-cols-md .mxyt-bcol-5,
|
||||||
|
.mxyt-cols-md .mxyt-bcol-6,
|
||||||
|
.mxyt-cols-md .mxyt-bcol-7,
|
||||||
|
.mxyt-cols-md .mxyt-bcol-8{width:100%;}
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.mxyt-cols-sm .mxyt-col-2,
|
||||||
|
.mxyt-cols-sm .mxyt-col-3,
|
||||||
|
.mxyt-cols-sm .mxyt-col-4,
|
||||||
|
.mxyt-cols-sm .mxyt-col-5,
|
||||||
|
.mxyt-cols-sm .mxyt-col-6,
|
||||||
|
.mxyt-cols-sm .mxyt-col-7,
|
||||||
|
.mxyt-cols-sm .mxyt-col-8,
|
||||||
|
|
||||||
|
.mxyt-cols-sm .mxyt-bcol-2,
|
||||||
|
.mxyt-cols-sm .mxyt-bcol-3,
|
||||||
|
.mxyt-cols-sm .mxyt-bcol-4,
|
||||||
|
.mxyt-cols-sm .mxyt-bcol-5,
|
||||||
|
.mxyt-cols-sm .mxyt-bcol-6,
|
||||||
|
.mxyt-cols-sm .mxyt-bcol-7,
|
||||||
|
.mxyt-cols-sm .mxyt-bcol-8{width:100%;}
|
||||||
|
}
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.mxyt-cols-xs .mxyt-col-2,
|
||||||
|
.mxyt-cols-xs .mxyt-col-3,
|
||||||
|
.mxyt-cols-xs .mxyt-col-4,
|
||||||
|
.mxyt-cols-xs .mxyt-col-5,
|
||||||
|
.mxyt-cols-xs .mxyt-col-6,
|
||||||
|
.mxyt-cols-xs .mxyt-col-7,
|
||||||
|
.mxyt-cols-xs .mxyt-col-8,
|
||||||
|
|
||||||
|
.mxyt-cols-xs .mxyt-bcol-2,
|
||||||
|
.mxyt-cols-xs .mxyt-bcol-3,
|
||||||
|
.mxyt-cols-xs .mxyt-bcol-4,
|
||||||
|
.mxyt-cols-xs .mxyt-bcol-5,
|
||||||
|
.mxyt-cols-xs .mxyt-bcol-6,
|
||||||
|
.mxyt-cols-xs .mxyt-bcol-7,
|
||||||
|
.mxyt-cols-xs .mxyt-bcol-8{width:100%;}
|
||||||
|
.mxyt-channel-feat-video-player{float:none;width:auto;}
|
||||||
|
.mxyt-channel-feat-video-descr{margin-left:0;padding-left:0;padding-top:15px;}
|
||||||
|
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-video{float:none;width:auto;margin-bottom:15px;}
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-title,
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-description,
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-meta{margin-left:0;padding-left:0;padding-right:0;}
|
||||||
|
.mxYouTubeR_channel .mxyt-meta > div{width:20%; margin:0;}
|
||||||
|
.mxYouTubeR_channel .mxyt-playlist .mxyt-meta{margin:0 -15px;}
|
||||||
|
|
||||||
|
.mxYouTubeR_theme_circles1,
|
||||||
|
.mxYouTubeR_theme_circles2{overflow: hidden;}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@-moz-keyframes mxyt-spin {
|
||||||
|
0% {
|
||||||
|
-moz-transform: rotate(0deg);
|
||||||
|
-o-transform: rotate(0deg);
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
-moz-transform: rotate(359deg);
|
||||||
|
-o-transform: rotate(359deg);
|
||||||
|
-webkit-transform: rotate(359deg);
|
||||||
|
transform: rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-webkit-keyframes mxyt-spin {
|
||||||
|
0% {
|
||||||
|
-moz-transform: rotate(0deg);
|
||||||
|
-o-transform: rotate(0deg);
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
-moz-transform: rotate(359deg);
|
||||||
|
-o-transform: rotate(359deg);
|
||||||
|
-webkit-transform: rotate(359deg);
|
||||||
|
transform: rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-o-keyframes mxyt-spin {
|
||||||
|
0% {
|
||||||
|
-moz-transform: rotate(0deg);
|
||||||
|
-o-transform: rotate(0deg);
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
-moz-transform: rotate(359deg);
|
||||||
|
-o-transform: rotate(359deg);
|
||||||
|
-webkit-transform: rotate(359deg);
|
||||||
|
transform: rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-ms-keyframes mxyt-spin {
|
||||||
|
0% {
|
||||||
|
-moz-transform: rotate(0deg);
|
||||||
|
-o-transform: rotate(0deg);
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
-moz-transform: rotate(359deg);
|
||||||
|
-o-transform: rotate(359deg);
|
||||||
|
-webkit-transform: rotate(359deg);
|
||||||
|
transform: rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes mxyt-spin {
|
||||||
|
0% {
|
||||||
|
-moz-transform: rotate(0deg);
|
||||||
|
-o-transform: rotate(0deg);
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
-moz-transform: rotate(359deg);
|
||||||
|
-o-transform: rotate(359deg);
|
||||||
|
-webkit-transform: rotate(359deg);
|
||||||
|
transform: rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* IE 11 fix */
|
||||||
|
@media all and (-ms-high-contrast:none){
|
||||||
|
*::-ms-backdrop, .mxyt-col-2, .mxyt-col-3, .mxyt-col-4, .mxyt-col-5, .mxyt-col-6, .mxyt-col-7, .mxyt-col-8 {display:block!important;}
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
1
deployed/youtuber/media/plg_system_youtuber/assets/fancybox/jquery.fancybox.min.css
vendored
Normal file
1
deployed/youtuber/media/plg_system_youtuber/assets/fancybox/jquery.fancybox.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
13
deployed/youtuber/media/plg_system_youtuber/assets/fancybox/jquery.fancybox.min.js
vendored
Normal file
13
deployed/youtuber/media/plg_system_youtuber/assets/fancybox/jquery.fancybox.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
deployed/youtuber/media/plg_system_youtuber/assets/font/fl.eot
Normal file
BIN
deployed/youtuber/media/plg_system_youtuber/assets/font/fl.eot
Normal file
Binary file not shown.
@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
|
||||||
|
<defs>
|
||||||
|
<font id="fl" horiz-adv-x="1000" >
|
||||||
|
<font-face font-family="fl" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||||
|
<missing-glyph horiz-adv-x="1000" />
|
||||||
|
<glyph glyph-name="file-code" unicode="" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 16-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 15t-16 38v233h-429v-858h715z m-518 500q4 7 12 7t13-3l28-21q7-5 7-12t-3-14l-102-135 102-136q4-6 3-13t-7-12l-28-21q-6-4-13-4t-12 7l-126 168q-8 11 0 21z m447-168q8-10 0-21l-126-168q-4-6-11-7t-14 4l-28 21q-6 5-7 12t3 13l102 136-102 135q-4 7-3 14t7 12l28 21q6 4 14 3t11-7z m-346-257q-7 1-11 7t-3 14l77 464q1 7 7 11t14 3l35-5q7-2 11-8t3-13l-77-464q-1-7-7-11t-13-3z" horiz-adv-x="857.1" />
|
||||||
|
|
||||||
|
<glyph glyph-name="upload-1" unicode="" d="M714 29q0 14-10 25t-25 10-26-10-10-25 10-26 26-10 25 10 10 26z m143 0q0 14-10 25t-26 10-25-10-10-25 10-26 25-10 26 10 10 26z m72 125v-179q0-22-16-38t-38-16h-821q-23 0-38 16t-16 38v179q0 22 16 38t38 15h238q12-31 39-51t62-20h143q34 0 61 20t40 51h238q22 0 38-15t16-38z m-182 361q-9-22-33-22h-143v-250q0-15-10-25t-25-11h-143q-15 0-25 11t-11 25v250h-143q-23 0-33 22-9 22 8 39l250 250q10 10 25 10t25-10l250-250q18-17 8-39z" horiz-adv-x="928.6" />
|
||||||
|
|
||||||
|
<glyph glyph-name="video" unicode="" d="M1360 849v-1000h-1360v1000h1360z m-200-160h120v80h-120v-80z m-200 0h120v80h-120v-80z m-240 0h120v80h-120v-80z m240-600h320v520h-320v-520z m-440 600h120v80h-120v-80z m640-760h120v80h-120v-80z m-880 760h120v80h-120v-80z m240-600h320v520h-320v-520z m440-160h120v80h-120v-80z m-880 760h120v80h-120v-80z m640-760h120v80h-120v-80z m-640 160h320v520h-320v-520z m440-160h120v80h-120v-80z m-240 0h120v80h-120v-80z m-200 0h120v80h-120v-80z" horiz-adv-x="1360" />
|
||||||
|
|
||||||
|
<glyph glyph-name="file-video" unicode="" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 16-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 15t-16 38v233h-429v-858h715z m-357 500q29 0 50-21t21-50v-214q0-29-21-50t-50-22h-215q-29 0-50 22t-21 50v214q0 29 21 50t50 21h215z m274-1q11-4 11-16v-322q0-12-11-17-4-1-7-1-7 0-12 5l-148 149v50l148 148q5 5 12 5 3 0 7-1z" horiz-adv-x="857.1" />
|
||||||
|
|
||||||
|
<glyph glyph-name="infinity" unicode="" d="M0 350q0 93 66 159t159 66 159-66l72-69 73 70q65 65 157 65 92 0 158-66t67-159-67-159-158-66q-92 0-158 66l-72 69-73-70q-65-65-158-65t-159 66-66 159z m225 95q-39 0-67-28t-28-67q0-40 28-67t67-28 68 28l68 67-68 66q-29 29-68 29z m529-162q27 27 27 67t-27 68-67 27-67-27l-70-68 69-66q27-28 67-28t68 27z" horiz-adv-x="911" />
|
||||||
|
|
||||||
|
<glyph glyph-name="gauge" unicode="" d="M406 178q34 56 214 284t194 220q12-6-96-278t-138-326q-50-86-136-36t-38 136z m94 380q-168 0-284-127t-116-311q0-30 2-46 2-22-12-37t-34-17-36 12-18 34q0 8-1 26t-1 28q0 226 145 382t355 156q72 0 134-18l-70-86q-40 4-64 4z m362-62q138-154 138-376 0-38-2-56-2-20-16-33t-34-13l-4 0q-22 4-35 20t-11 36q2 14 2 46 0 150-80 268 6 14 20 51t22 57z" horiz-adv-x="1000" />
|
||||||
|
|
||||||
|
<glyph glyph-name="cancel" unicode="" d="M724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
|
||||||
|
|
||||||
|
<glyph glyph-name="eye" unicode="" d="M0 350q0 30 15 67t44 77 70 78 92 68 115 49 133 18 132-18 115-49 92-68 70-78 44-77 15-67q0-30-15-67t-44-77-70-78-92-68-115-48-132-18-133 18-115 48-92 68-70 78-44 77-15 67z m234 0q0-64 32-117t85-85 118-32 117 32 85 85 32 117-32 117-85 86-117 31-118-31-85-86-32-117z m136 0q0-41 29-70t70-28 69 28 29 70q0 41-29 70t-69 29-70-29-29-70z" horiz-adv-x="937.5" />
|
||||||
|
|
||||||
|
<glyph glyph-name="heart" unicode="" d="M508-66q-17 0-29 9-26 17-85 58t-154 112-134 110q-106 106-106 264 0 116 82 198t198 82q143 0 228-118 38 55 99 86t129 32q117 0 198-82t81-198q0-158-106-264-38-38-133-110t-155-113-83-57q-13-9-30-9z m-228 729q-72 0-124-51t-52-125q0-114 76-190 79-79 328-248 248 169 327 248 76 76 76 190 0 73-51 125t-124 51q-73 0-125-51t-51-125q0-22-16-37t-36-15-37 15-15 37q0 73-52 125t-124 51z" horiz-adv-x="1015" />
|
||||||
|
|
||||||
|
<glyph glyph-name="comment" unicode="" d="M576 629l-278 0q-70 0-119-49t-49-119l0-278q0-58 44-90 68 90 179 90l223 0q92 0 158 65t65 158-65 157-158 66z m0 112q139 0 237-99t98-236-98-237-237-98l-223 0q-46 0-79-33t-33-79q-92 0-157 66t-66 158l0 278q0 115 82 197t198 83l278 0z" horiz-adv-x="928" />
|
||||||
|
|
||||||
|
<glyph glyph-name="thumbs-up" unicode="" d="M811 470q38-13 58-51t15-77l-35-312q-6-39-32-70t-58-44q-5-1-26-9t-29-11-30-7-45-6-56-2q-83 0-174 26t-130 56q-1 1-3 2t-4 4-3 4q-46-40-103-40-65 0-110 45t-46 111l0 313q0 65 46 110t110 46q77 0 124-63 44 44 64 85t21 108q0 54 38 92t92 39 92-39 38-92q0-94-16-188 170-17 202-30z m-655-432q22 0 37 15t16 36l0 313q0 21-16 36t-37 16-37-16-15-36l0-313q0-21 15-36t37-15z m590 7l35 312q3 12-6 16-15 4-107 15t-119 14l-69-10 16 73q25 117 25 223 0 10-8 18t-18 8-18-8-8-18q0-54-11-98t-32-78-37-51-40-43q-36-36-36-69l0-260q0-30 18-44 24-17 99-38t143-22q26 0 45 2t35 4 23 6 23 8 24 9q6 3 14 13t9 18z" horiz-adv-x="885" />
|
||||||
|
|
||||||
|
<glyph glyph-name="thumbs-down" unicode="" d="M729 768q65 0 111-46t45-110l0-313q0-65-45-111t-111-45q-76 0-124 62-42-42-63-84t-21-109q0-54-38-92t-92-39-92 39-39 92q0 95 16 188-173 19-201 29-37 14-59 52t-15 78l35 311q7 38 32 70t58 44q5 1 26 9t29 11 30 8 45 6 57 1q82 0 174-26t131-55q2-2 5-5t3-5q47 40 103 40z m-313-755q0 54 11 97t33 78 36 52 40 43q37 36 37 69l0 260q0 11-7 25t-12 18q-24 18-99 39t-142 21q-27 0-46-1t-35-4-23-6-23-9-23-8q-7-3-15-13t-9-19l-34-311q-2-12 5-16 15-4 108-15t118-14l69 10-15-74q-25-122-25-222 0-10 8-18t17-8 18 8 8 18z m365 286l0 313q0 21-15 36t-37 15-36-15-15-36l0-313q0-21 15-37t36-15 37 15 15 37z" horiz-adv-x="885" />
|
||||||
|
|
||||||
|
<glyph glyph-name="play" unicode="" d="M486 376q14-10 14-26 0-14-14-24l-428-266q-24-16-41-6t-17 40l0 514q0 30 17 40t41-6z" horiz-adv-x="500" />
|
||||||
|
|
||||||
|
<glyph glyph-name="spin2" unicode="" d="M46 144l0 0c0 0-1 0-1 0-8 18-15 37-21 55-6 19-11 38-15 58-19 99-8 203 35 298 3 6 10 8 15 5 1 0 2 0 2-1l0 0 80-59c5-3 6-9 4-14-5-12-9-25-12-38-4-12-7-26-9-39-11-67-3-137 23-201 2-5 0-10-4-13l0 0-80-56c-5-4-12-3-16 3-1 0-1 1-1 2l0 0z m120 574l0 0c0 1 0 1 0 1 15 13 30 25 46 37 16 11 33 22 51 31 89 50 192 72 297 60 6-1 10-6 10-13 0-1-1-1-1-2l0 0-31-94c-2-5-8-8-13-7-13 0-27 0-40 0-14-1-27-2-40-4-68-11-133-40-186-84-4-3-10-3-14 0l0 0-79 58c-5 3-6 11-2 16 0 0 1 1 2 1l0 0z m588 65l0 0c0 0 1 0 1 0 17-10 34-21 50-32 16-12 31-25 46-38 74-69 127-160 148-262 2-6-2-12-9-13-1 0-1 0-2 0l0 0-100 1c-5 0-10 4-11 9-3 13-8 26-12 38-5 12-10 25-17 36-31 61-78 113-137 150-5 3-6 8-5 13l0 0 31 92c2 6 9 9 15 7 1 0 2-1 2-1l0 0z m244-535l0 0c0 0 0 0 0 0-4-20-9-39-15-57-7-19-14-37-22-55-44-92-114-170-205-221-6-3-13-1-16 4 0 1-1 2-1 2l0 0-30 94c-2 6 1 12 6 14 11 7 22 15 32 23 11 9 21 18 30 27 49 48 84 109 101 176 2 5 6 8 11 8l0 0 98-1c6 0 11-5 11-11 0-1 0-2 0-3l0 0z m-438-395l0 0c0 0 0 0 0 0-20-2-40-3-60-3-20 0-40 1-59 4-102 12-198 54-276 125-5 4-5 11 0 16 0 0 1 1 1 1l0 0 81 58c5 3 12 2 16-2 10-8 20-16 32-23 11-7 22-14 34-20 62-31 131-45 200-41 6 0 10-3 12-8l0 0 29-92c2-6-1-12-7-14-1-1-2-1-3-1l0 0z" horiz-adv-x="1000" />
|
||||||
|
|
||||||
|
<glyph glyph-name="th-list" unicode="" d="M860 90q43 0 73-31t31-74q0-43-31-73t-73-31l-365 0q-44 0-74 31t-31 73 31 74 74 31l365 0z m0 364q43 0 73-31t31-73-31-73-73-31l-365 0q-44 0-74 31t-31 73 31 73 74 31l365 0z m0 365q43 0 73-31t31-73q0-44-31-74t-73-31l-365 0q-42 0-74 31t-31 74 31 73 74 31l365 0z m-860-834q0 130 130 130t130-130-130-130-130 130z m0 365q0 130 130 130t130-130-130-130-130 130z m0 365q0 130 130 130t130-130-130-130-130 130z" horiz-adv-x="964" />
|
||||||
|
|
||||||
|
<glyph glyph-name="plus" unicode="" d="M786 439v-107q0-22-16-38t-38-15h-232v-233q0-22-16-37t-38-16h-107q-22 0-38 16t-15 37v233h-232q-23 0-38 15t-16 38v107q0 23 16 38t38 16h232v232q0 22 15 38t38 16h107q23 0 38-16t16-38v-232h232q22 0 38-16t16-38z" horiz-adv-x="785.7" />
|
||||||
|
|
||||||
|
<glyph glyph-name="upload" unicode="" d="M0 84v73q0 33 24 56t57 24 56-24 24-56v-73q0-17 12-29t30-13h531q18 0 30 13t12 29v73q0 33 24 56t56 24 57-24 24-56v-73q0-84-59-143t-144-60h-531q-84 0-143 59t-60 144z m155 407q0 33 24 57l247 247q23 23 57 23 33 0 56-23l243-242q23-24 23-57t-23-57q-24-23-57-23t-57 23l-105 105v-344q0-33-24-57t-56-24q-33 0-57 24t-24 57v344l-110-110q-24-23-57-23t-56 23-24 57z" horiz-adv-x="937.5" />
|
||||||
|
|
||||||
|
<glyph glyph-name="logout" unicode="" d="M357 46q0-2 1-11t0-14-2-14-5-11-12-3h-178q-67 0-114 47t-47 114v392q0 67 47 114t114 47h178q8 0 13-5t5-13q0-2 1-11t0-15-2-13-5-11-12-3h-178q-37 0-63-27t-27-63v-392q0-37 27-63t63-27h174t6 0 7-2 4-3 4-5 1-8z m518 304q0-14-11-25l-303-304q-11-10-25-10t-25 10-11 25v161h-250q-14 0-25 11t-11 25v214q0 15 11 25t25 11h250v161q0 14 11 25t25 10 25-10l303-304q11-10 11-25z" horiz-adv-x="928.6" />
|
||||||
|
|
||||||
|
<glyph glyph-name="youtube-play" unicode="" d="M714 350q0 21-16 30l-286 179q-17 11-36 1-19-10-19-31v-358q0-21 19-31 9-4 17-4 11 0 19 5l286 179q16 9 16 30z m286 0q0-54-1-84t-4-76-13-82q-9-41-38-69t-70-32q-123-14-374-14t-374 14q-40 4-70 32t-39 69q-7 36-12 82t-4 76-1 84 1 84 4 76 13 82q9 41 38 69t70 32q123 14 374 14t374-14q40-4 70-32t39-69q8-36 12-82t4-76 1-84z" horiz-adv-x="1000" />
|
||||||
|
|
||||||
|
<glyph glyph-name="youtube-squared" unicode="" d="M513 123v88q0 27-16 27-10 0-19-9v-125q9-8 19-8 16 0 16 27z m103 68h36v19q0 28-18 28t-18-28v-19z m-319 148v-39h-45v-236h-41v236h-44v39h130z m112-70v-205h-37v23q-22-25-43-25-18 0-23 15-4 9-4 30v162h37v-151q0-13 1-14 0-8 8-8 11 0 24 17v156h37z m141-62v-81q0-29-4-41-7-23-30-23-19 0-38 22v-20h-37v275h37v-89q18 22 38 22 23 0 30-24 4-11 4-41z m140-72v-5q0-16-1-24-2-12-9-22-15-22-44-22-29 0-46 21-11 15-11 48v72q0 33 11 48 16 21 44 21t44-21q12-16 12-48v-43h-74v-36q0-28 18-28 14 0 17 14 0 1 1 4t0 9v12h38z m-252 460v-87q0-29-18-29t-18 29v87q0 29 18 29t18-29z m297-398q0 99-10 145-6 25-24 41t-43 19q-75 9-229 9-154 0-230-9-24-2-42-19t-24-41q-11-48-11-145 0-98 11-145 5-24 24-41t42-19q76-9 230-9t229 9q24 2 43 19t23 41q11 47 11 145z m-421 363l50 166h-41l-29-109-29 109h-44l13-39t13-38q20-58 26-89v-112h41v112z m161-45v73q0 32-11 48-16 21-44 21-28 0-43-21-12-16-12-48v-73q0-32 12-48 15-22 43-22 28 0 44 22 11 15 11 48z m101-67h38v207h-38v-158q-12-18-23-18-8 0-9 9 0 1 0 15v152h-38v-164q0-21 4-31 6-15 23-15 21 0 43 25v-22z m281 170v-536q0-66-47-113t-114-48h-535q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535q67 0 114-48t47-113z" horiz-adv-x="857.1" />
|
||||||
|
|
||||||
|
<glyph glyph-name="angle-left" unicode="" d="M350 546q0-7-6-12l-219-220 219-219q6-6 6-13t-6-13l-28-28q-5-5-12-5t-13 5l-260 260q-6 6-6 13t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13z" horiz-adv-x="357.1" />
|
||||||
|
|
||||||
|
<glyph glyph-name="angle-right" unicode="" d="M332 314q0-7-6-13l-260-260q-5-5-12-5t-13 5l-28 28q-6 6-6 13t6 13l219 219-219 220q-6 5-6 12t6 13l28 28q5 6 13 6t12-6l260-260q6-5 6-13z" horiz-adv-x="357.1" />
|
||||||
|
|
||||||
|
<glyph glyph-name="angle-up" unicode="" d="M600 189q0-7-6-13l-28-27q-5-6-12-6t-13 6l-220 219-219-219q-5-6-13-6t-13 6l-27 27q-6 6-6 13t6 13l260 260q5 6 12 6t13-6l260-260q6-5 6-13z" horiz-adv-x="642.9" />
|
||||||
|
|
||||||
|
<glyph glyph-name="angle-down" unicode="" d="M600 439q0-7-6-13l-260-260q-5-5-13-5t-12 5l-260 260q-6 6-6 13t6 13l27 28q6 6 13 6t13-6l219-219 220 219q5 6 13 6t12-6l28-28q6-5 6-13z" horiz-adv-x="642.9" />
|
||||||
|
|
||||||
|
<glyph glyph-name="brush" unicode="" d="M901 850q39 0 69-26t29-65q0-35-25-84-185-351-260-420-54-51-121-51-71 0-121 52t-51 122q0 72 52 119l356 323q33 30 72 30z m-507-577q22-42 59-73t84-42l1-40q2-119-72-193t-195-75q-68 0-121 26t-86 71-48 102-16 123q4-3 23-17t35-25 32-20 26-9q23 0 31 20 14 37 32 63t39 42 49 27 57 14 70 6z" horiz-adv-x="1000" />
|
||||||
|
</font>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 12 KiB |
BIN
deployed/youtuber/media/plg_system_youtuber/assets/font/fl.ttf
Normal file
BIN
deployed/youtuber/media/plg_system_youtuber/assets/font/fl.ttf
Normal file
Binary file not shown.
BIN
deployed/youtuber/media/plg_system_youtuber/assets/font/fl.woff
Normal file
BIN
deployed/youtuber/media/plg_system_youtuber/assets/font/fl.woff
Normal file
Binary file not shown.
BIN
deployed/youtuber/media/plg_system_youtuber/assets/font/fl.woff2
Normal file
BIN
deployed/youtuber/media/plg_system_youtuber/assets/font/fl.woff2
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
@ -0,0 +1,245 @@
|
|||||||
|
(function($){
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var dummyTip = null;
|
||||||
|
|
||||||
|
function reBindScripts(){
|
||||||
|
var lightBoxParams = {
|
||||||
|
iframe: {'allowfullscreen':true},
|
||||||
|
};
|
||||||
|
if(window.mxYouTubeR_lightboxParams !== undefined){
|
||||||
|
lightBoxParams = $.extend(lightBoxParams,mxYouTubeR_lightboxParams);
|
||||||
|
}
|
||||||
|
if($('a.mxyt-lightbox').length){
|
||||||
|
$('a.mxyt-lightbox').fancybox(lightBoxParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.mxyt-tip').each(function(index, element) {
|
||||||
|
var $this = $(this);
|
||||||
|
var mainContainer = $this.closest('.mxYouTubeR');
|
||||||
|
var _class = '';
|
||||||
|
if(mainContainer.attr('class')){
|
||||||
|
var matches = mainContainer.attr('class').match(/(mxYouTubeR_theme_[a-z0-9\-_]+)/);
|
||||||
|
if(matches && matches.length>0){
|
||||||
|
_class = matches[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this.off('mouseenter');
|
||||||
|
$this.on('mouseenter',function(){
|
||||||
|
if(!dummyTip.hasClass(_class)){
|
||||||
|
dummyTip.addClass(_class);
|
||||||
|
}
|
||||||
|
dummyTip.children('span').html($this.attr('title'));
|
||||||
|
var pos = $this.offset();
|
||||||
|
dummyTip.css('left',pos.left+$this.innerWidth()/2-dummyTip.width()/2);
|
||||||
|
dummyTip.css('top',pos.top);
|
||||||
|
|
||||||
|
dummyTip.addClass('active');
|
||||||
|
dummyTip.stop().css('opacity',0).animate({
|
||||||
|
'opacity': 0.9,
|
||||||
|
'margin-top': -25
|
||||||
|
},200,'swing',function(){
|
||||||
|
//console.info(tip,this);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$this.off('mouseleave');
|
||||||
|
$this.on('mouseleave',function(){
|
||||||
|
dummyTip.removeClass(_class);
|
||||||
|
dummyTip.removeClass('active');
|
||||||
|
dummyTip.css('margin-top',-15);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.mxyt-text-description.mxyt-less').each(function(index, element){
|
||||||
|
var $this = $(this);
|
||||||
|
if($this.next().is('.mxyt-text-description-btn')){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var moreBtn = $('<div class="mxyt-text-description-btn">'+window.mxYouTubeR.lang.more+'</div>');
|
||||||
|
var fullHeight = $this.children().height();
|
||||||
|
if($this.height()<fullHeight){
|
||||||
|
$this.addClass('hasMore');
|
||||||
|
moreBtn.insertAfter($this);
|
||||||
|
moreBtn.off('click');
|
||||||
|
moreBtn.on('click',function(){
|
||||||
|
var btn = $(this);
|
||||||
|
if($this.hasClass('mxyt-less')){
|
||||||
|
$this.removeClass('mxyt-less');
|
||||||
|
btn.html(window.mxYouTubeR.lang.less);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this.addClass('mxyt-less');
|
||||||
|
btn.html(window.mxYouTubeR.lang.more);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this.removeClass('hasMore');
|
||||||
|
$this.addClass('noMore');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.mxyt-playlist-select span').off('click');
|
||||||
|
$('.mxyt-playlist-select span').on('click',function(){
|
||||||
|
var $this = $(this);
|
||||||
|
playlistLoader.loadPlaylist($this.closest('.mxyt-channel-videos'),$this.attr('data-mxyt-cfg'),'');
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.mxyt-load-more').each(function(index, element) {
|
||||||
|
var $this = $(this);
|
||||||
|
if($this.attr('data-checked')){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this.attr('data-checked','true');
|
||||||
|
if($this.hasClass('mxyt-infinite-scroll')){
|
||||||
|
$(window).on('scroll',function(){
|
||||||
|
var top = $(window).scrollTop() + $(window).height();
|
||||||
|
if(top>$this.offset().top){
|
||||||
|
playlistLoader.loadMore($this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this.off('click');
|
||||||
|
$this.on('click',function(){
|
||||||
|
playlistLoader.loadMore($(this));
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('.ch-item').on('mouseenter',function(){
|
||||||
|
$(this).addClass('mx-active');
|
||||||
|
});
|
||||||
|
$('.ch-item').on('mouseleave',function(){
|
||||||
|
$(this).removeClass('mx-active');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var playlistLoader = {
|
||||||
|
loading: false,
|
||||||
|
pageToken: '',
|
||||||
|
button: null,
|
||||||
|
loadingBar: null,
|
||||||
|
params: {},
|
||||||
|
target: null,
|
||||||
|
|
||||||
|
bind: function(jqBtn){
|
||||||
|
this.button = jqBtn;
|
||||||
|
this.pageToken = jqBtn.attr('data-mxyt-pagetoken');
|
||||||
|
this.params = jqBtn.attr('data-mxyt-cfg');
|
||||||
|
this.target = jqBtn.closest('.mxYouTubeR').find('.mxyt-playlist');
|
||||||
|
},
|
||||||
|
loadMore: function(jqBtn){
|
||||||
|
if(this.loading){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.bind(jqBtn);
|
||||||
|
if(this.pageToken==''){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.loading = true;
|
||||||
|
this.loadingBar = $('<i class="mxyt-icon mxyt-icon-spinner"></i>');
|
||||||
|
this.button.hide();
|
||||||
|
this.button.parent().append(this.loadingBar);
|
||||||
|
|
||||||
|
var loader = this;
|
||||||
|
$.ajax({
|
||||||
|
url: window.mxYouTubeR.ajax_url,
|
||||||
|
type: 'post',
|
||||||
|
dataType: "json",
|
||||||
|
data:{
|
||||||
|
action: 'youtuber',
|
||||||
|
pageToken: loader.pageToken,
|
||||||
|
params: loader.params,
|
||||||
|
},
|
||||||
|
success: function( result ){
|
||||||
|
if(result && result.success){
|
||||||
|
loader.loaded(result);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
alert('mxYouTubeR ajax error.');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('mxYouTubeR ajax error.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
loadPlaylist: function(_container,_params,_pageToken){
|
||||||
|
if(this.loading){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.loading = true;
|
||||||
|
var loadingBar = $('<p align="center"><i class="mxyt-icon mxyt-icon-spinner"></i></p>');
|
||||||
|
_container.html(loadingBar);
|
||||||
|
|
||||||
|
var loader = this;
|
||||||
|
$.ajax({
|
||||||
|
url: window.mxYouTubeR.ajax_url,
|
||||||
|
type: 'post',
|
||||||
|
dataType: "json",
|
||||||
|
data:{
|
||||||
|
action: 'youtuber',
|
||||||
|
pageToken: _pageToken,
|
||||||
|
params: _params,
|
||||||
|
},
|
||||||
|
success: function( result ){
|
||||||
|
if(result.success){
|
||||||
|
loader.loading = false;
|
||||||
|
loadingBar.remove();
|
||||||
|
var items = $($(result.html).find('.mxyt-channel-videos').html());
|
||||||
|
_container.append(items);
|
||||||
|
reBindScripts();
|
||||||
|
items.css('opacity',0);
|
||||||
|
items.stop().animate({
|
||||||
|
'opacity': 1
|
||||||
|
},300);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
alert('mxYouTubeR ajax error.');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('mxYouTubeR ajax error.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
loaded: function(result){
|
||||||
|
this.pageToken = result.pageToken;
|
||||||
|
this.loading = false;
|
||||||
|
this.loadingBar.remove();
|
||||||
|
this.button.attr('data-mxyt-pagetoken',this.pageToken);
|
||||||
|
if(this.pageToken){
|
||||||
|
this.button.show();
|
||||||
|
}
|
||||||
|
var items = $(result.html).find('.mxyt-row, .mxyt-brow');
|
||||||
|
this.target.append(items);
|
||||||
|
reBindScripts();
|
||||||
|
items.css('opacity',0);
|
||||||
|
items.stop().animate({
|
||||||
|
'opacity': 1
|
||||||
|
},300);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.mxYouTuberInit = function(){
|
||||||
|
if(!dummyTip){
|
||||||
|
dummyTip = $('<div id="mxyt-tooltip" class="mxyt-tooltip"><span></span><div></div></div>');
|
||||||
|
$('body').append(dummyTip);
|
||||||
|
}
|
||||||
|
reBindScripts();
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function(e) {
|
||||||
|
window.mxYouTuberInit();
|
||||||
|
});
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
@ -0,0 +1,270 @@
|
|||||||
|
|
||||||
|
|
||||||
|
var DRIVE_UPLOAD_URL = 'https://www.googleapis.com/upload/drive/v2/files/';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper for implementing retries with backoff. Initial retry
|
||||||
|
* delay is 1 second, increasing by 2x (+jitter) for subsequent retries
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
var RetryHandler = function() {
|
||||||
|
this.interval = 1000; // Start at one second
|
||||||
|
this.maxInterval = 60 * 1000; // Don't wait longer than a minute
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoke the function after waiting
|
||||||
|
*
|
||||||
|
* @param {function} fn Function to invoke
|
||||||
|
*/
|
||||||
|
RetryHandler.prototype.retry = function(fn) {
|
||||||
|
setTimeout(fn, this.interval);
|
||||||
|
this.interval = this.nextInterval_();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the counter (e.g. after successful request.)
|
||||||
|
*/
|
||||||
|
RetryHandler.prototype.reset = function() {
|
||||||
|
this.interval = 1000;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate the next wait time.
|
||||||
|
* @return {number} Next wait interval, in milliseconds
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
RetryHandler.prototype.nextInterval_ = function() {
|
||||||
|
var interval = this.interval * 2 + this.getRandomInt_(0, 1000);
|
||||||
|
return Math.min(interval, this.maxInterval);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a random int in the range of min to max. Used to add jitter to wait times.
|
||||||
|
*
|
||||||
|
* @param {number} min Lower bounds
|
||||||
|
* @param {number} max Upper bounds
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
RetryHandler.prototype.getRandomInt_ = function(min, max) {
|
||||||
|
return Math.floor(Math.random() * (max - min + 1) + min);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper class for resumable uploads using XHR/CORS. Can upload any Blob-like item, whether
|
||||||
|
* files or in-memory constructs.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* var content = new Blob(["Hello world"], {"type": "text/plain"});
|
||||||
|
* var uploader = new MediaUploader({
|
||||||
|
* file: content,
|
||||||
|
* token: accessToken,
|
||||||
|
* onComplete: function(data) { ... }
|
||||||
|
* onError: function(data) { ... }
|
||||||
|
* });
|
||||||
|
* uploader.upload();
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
* @param {object} options Hash of options
|
||||||
|
* @param {string} options.token Access token
|
||||||
|
* @param {blob} options.file Blob-like item to upload
|
||||||
|
* @param {string} [options.fileId] ID of file if replacing
|
||||||
|
* @param {object} [options.params] Additional query parameters
|
||||||
|
* @param {string} [options.contentType] Content-type, if overriding the type of the blob.
|
||||||
|
* @param {object} [options.metadata] File metadata
|
||||||
|
* @param {function} [options.onComplete] Callback for when upload is complete
|
||||||
|
* @param {function} [options.onProgress] Callback for status for the in-progress upload
|
||||||
|
* @param {function} [options.onError] Callback if upload fails
|
||||||
|
*/
|
||||||
|
var MediaUploader = function(options) {
|
||||||
|
var noop = function() {};
|
||||||
|
this.file = options.file;
|
||||||
|
this.contentType = options.contentType || this.file.type || 'application/octet-stream';
|
||||||
|
this.metadata = options.metadata || {
|
||||||
|
'title': this.file.name,
|
||||||
|
'mimeType': this.contentType
|
||||||
|
};
|
||||||
|
this.token = options.token;
|
||||||
|
this.onComplete = options.onComplete || noop;
|
||||||
|
this.onProgress = options.onProgress || noop;
|
||||||
|
this.onError = options.onError || noop;
|
||||||
|
this.offset = options.offset || 0;
|
||||||
|
this.chunkSize = options.chunkSize || 0;
|
||||||
|
this.retryHandler = new RetryHandler();
|
||||||
|
|
||||||
|
this.url = options.url;
|
||||||
|
if (!this.url) {
|
||||||
|
var params = options.params || {};
|
||||||
|
params.uploadType = 'resumable';
|
||||||
|
this.url = this.buildUrl_(options.fileId, params, options.baseUrl);
|
||||||
|
}
|
||||||
|
this.httpMethod = options.fileId ? 'PUT' : 'POST';
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initiate the upload.
|
||||||
|
*/
|
||||||
|
MediaUploader.prototype.upload = function() {
|
||||||
|
var self = this;
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
|
||||||
|
xhr.open(this.httpMethod, this.url, true);
|
||||||
|
xhr.setRequestHeader('Authorization', 'Bearer ' + this.token);
|
||||||
|
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||||
|
xhr.setRequestHeader('X-Upload-Content-Length', this.file.size);
|
||||||
|
xhr.setRequestHeader('X-Upload-Content-Type', this.contentType);
|
||||||
|
|
||||||
|
xhr.onload = function(e) {
|
||||||
|
if (e.target.status < 400) {
|
||||||
|
var location = e.target.getResponseHeader('Location');
|
||||||
|
this.url = location;
|
||||||
|
this.sendFile_();
|
||||||
|
} else {
|
||||||
|
this.onUploadError_(e);
|
||||||
|
}
|
||||||
|
}.bind(this);
|
||||||
|
xhr.onerror = this.onUploadError_.bind(this);
|
||||||
|
xhr.send(JSON.stringify(this.metadata));
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send the actual file content.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
MediaUploader.prototype.sendFile_ = function() {
|
||||||
|
var content = this.file;
|
||||||
|
var end = this.file.size;
|
||||||
|
|
||||||
|
if (this.offset || this.chunkSize) {
|
||||||
|
// Only bother to slice the file if we're either resuming or uploading in chunks
|
||||||
|
if (this.chunkSize) {
|
||||||
|
end = Math.min(this.offset + this.chunkSize, this.file.size);
|
||||||
|
}
|
||||||
|
content = content.slice(this.offset, end);
|
||||||
|
}
|
||||||
|
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('PUT', this.url, true);
|
||||||
|
xhr.setRequestHeader('Content-Type', this.contentType);
|
||||||
|
xhr.setRequestHeader('Content-Range', 'bytes ' + this.offset + '-' + (end - 1) + '/' + this.file.size);
|
||||||
|
xhr.setRequestHeader('X-Upload-Content-Type', this.file.type);
|
||||||
|
if (xhr.upload) {
|
||||||
|
xhr.upload.addEventListener('progress', this.onProgress);
|
||||||
|
}
|
||||||
|
xhr.onload = this.onContentUploadSuccess_.bind(this);
|
||||||
|
xhr.onerror = this.onContentUploadError_.bind(this);
|
||||||
|
xhr.send(content);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Query for the state of the file for resumption.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
MediaUploader.prototype.resume_ = function() {
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('PUT', this.url, true);
|
||||||
|
xhr.setRequestHeader('Content-Range', 'bytes */' + this.file.size);
|
||||||
|
xhr.setRequestHeader('X-Upload-Content-Type', this.file.type);
|
||||||
|
if (xhr.upload) {
|
||||||
|
xhr.upload.addEventListener('progress', this.onProgress);
|
||||||
|
}
|
||||||
|
xhr.onload = this.onContentUploadSuccess_.bind(this);
|
||||||
|
xhr.onerror = this.onContentUploadError_.bind(this);
|
||||||
|
xhr.send();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extract the last saved range if available in the request.
|
||||||
|
*
|
||||||
|
* @param {XMLHttpRequest} xhr Request object
|
||||||
|
*/
|
||||||
|
MediaUploader.prototype.extractRange_ = function(xhr) {
|
||||||
|
var range = xhr.getResponseHeader('Range');
|
||||||
|
if (range) {
|
||||||
|
this.offset = parseInt(range.match(/\d+/g).pop(), 10) + 1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle successful responses for uploads. Depending on the context,
|
||||||
|
* may continue with uploading the next chunk of the file or, if complete,
|
||||||
|
* invokes the caller's callback.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {object} e XHR event
|
||||||
|
*/
|
||||||
|
MediaUploader.prototype.onContentUploadSuccess_ = function(e) {
|
||||||
|
if (e.target.status == 200 || e.target.status == 201) {
|
||||||
|
this.onComplete(e.target.response);
|
||||||
|
} else if (e.target.status == 308) {
|
||||||
|
this.extractRange_(e.target);
|
||||||
|
this.retryHandler.reset();
|
||||||
|
this.sendFile_();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles errors for uploads. Either retries or aborts depending
|
||||||
|
* on the error.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {object} e XHR event
|
||||||
|
*/
|
||||||
|
MediaUploader.prototype.onContentUploadError_ = function(e) {
|
||||||
|
if (e.target.status && e.target.status < 500) {
|
||||||
|
this.onError(e.target.response);
|
||||||
|
} else {
|
||||||
|
this.retryHandler.retry(this.resume_.bind(this));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles errors for the initial request.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {object} e XHR event
|
||||||
|
*/
|
||||||
|
MediaUploader.prototype.onUploadError_ = function(e) {
|
||||||
|
this.onError(e.target.response); // TODO - Retries for initial upload
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct a query string from a hash/object
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {object} [params] Key/value pairs for query string
|
||||||
|
* @return {string} query string
|
||||||
|
*/
|
||||||
|
MediaUploader.prototype.buildQuery_ = function(params) {
|
||||||
|
params = params || {};
|
||||||
|
return Object.keys(params).map(function(key) {
|
||||||
|
return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
|
||||||
|
}).join('&');
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the drive upload URL
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} [id] File ID if replacing
|
||||||
|
* @param {object} [params] Query parameters
|
||||||
|
* @return {string} URL
|
||||||
|
*/
|
||||||
|
MediaUploader.prototype.buildUrl_ = function(id, params, baseUrl) {
|
||||||
|
var url = baseUrl || DRIVE_UPLOAD_URL;
|
||||||
|
if (id) {
|
||||||
|
url += id;
|
||||||
|
}
|
||||||
|
var query = this.buildQuery_(params);
|
||||||
|
if (query) {
|
||||||
|
url += '?' + query;
|
||||||
|
}
|
||||||
|
return url;
|
||||||
|
};
|
||||||
|
|
||||||
@ -0,0 +1,460 @@
|
|||||||
|
var wzYoutube;
|
||||||
|
(function($){
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
wzYoutube = {
|
||||||
|
youtubeConnector: null,
|
||||||
|
channelID: null,
|
||||||
|
wrapper: null,
|
||||||
|
pages: null,
|
||||||
|
currentPage: null,
|
||||||
|
moreBtn: null,
|
||||||
|
templates: {
|
||||||
|
channelTitle: '<img src="{img}"> <b>{channel_name}</b> <i class="yicon-fl yicon-logout wzYoutubeSignOut"></i>',
|
||||||
|
videoItem: '<li class="wzYTVideoItem" data-id="{video_id}"><img src="{img}"><div><b>{video_title}</b><p>{video_descr}</p></div></li>',
|
||||||
|
noVideosItem: '<li class="wzYTNoVideoItems">No video</li>',
|
||||||
|
loader: '<div class="wzLoader"><div class="wzShade"></div><div class="wzLoadbar"><progress value="50" max="100"></progress></div></div>'
|
||||||
|
},
|
||||||
|
loader: null,
|
||||||
|
onVideoSelect: function(_videoID){
|
||||||
|
alert(_videoID);
|
||||||
|
},
|
||||||
|
lang: {
|
||||||
|
authorize_account: 'Authorize YouTube account',
|
||||||
|
upload_video: 'Upload video',
|
||||||
|
list_videos: 'Videos list',
|
||||||
|
more_videos: 'More videos',
|
||||||
|
title: 'Title',
|
||||||
|
video_title: 'Video title',
|
||||||
|
description: 'Description',
|
||||||
|
video_description: 'Video description',
|
||||||
|
tags: 'Tags',
|
||||||
|
video_tags: 'Tags, separated by comma',
|
||||||
|
privacy_status: 'Privacy Status',
|
||||||
|
upload: 'Upload',
|
||||||
|
privacy_public: 'Public',
|
||||||
|
privacy_ulnisted: 'Unlisted',
|
||||||
|
privacy_private: 'Private',
|
||||||
|
youtube_terms: 'By uploading a video, you certify that you own all rights to the content or that you are authorized by the owner to make the content publicly available on YouTube, and that it otherwise complies with the YouTube Terms of Service located at <a href="http://www.youtube.com/t/terms" target="_blank">http://www.youtube.com/t/terms</a>',
|
||||||
|
enter_video_title: 'Please enter video title',
|
||||||
|
choose_video_file: 'Please choose video file',
|
||||||
|
},
|
||||||
|
init: function(_appID,_onVideoSelectCallback){
|
||||||
|
if(_appID==''){
|
||||||
|
|
||||||
|
}
|
||||||
|
var self = this;
|
||||||
|
if(this.wrapper){
|
||||||
|
this.close(true);
|
||||||
|
this.open();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var html = '<div class="wzYoutubeApp"><div class="wzYoutubeWrapper">';
|
||||||
|
html+= '<div class="wzYoutubePages">';
|
||||||
|
html+= '<div class="page page-1"><span class="wzYTAuthBtn"><i class="yicon-fl yicon-youtube-squared"></i> '+self.lang.authorize_account+'</span></div>';
|
||||||
|
html+= '<div class="page page-2"><div class="wzYTHead"><span class="wzYTHeadLink wzYTVideoAddItem"><i class="yicon-fl yicon-upload fa-fw"></i> '+self.lang.upload_video+'</span><div class="wzYTChannel"> </div></div><ul class="wzYTVideos"></ul><div class="wzYTMoreBtn"><i class="yicon-fl yicon-plus fa-fw"></i> '+self.lang.more_videos+'</div></div>';
|
||||||
|
html+= '<div class="page page-3"><div class="wzYTHead"><span class="wzYTHeadLink wzYTVideoListLink"><i class="yicon-fl yicon-th-list fa-fw"></i> '+self.lang.list_videos+'</span><div class="wzYTChannel"> </div></div>';
|
||||||
|
html+= '<form class="wzYTUploadForm">';
|
||||||
|
html+= '<p><label>'+self.lang.title+'<i>*</i> :</label><input type="text" class="wzYTUploadTitle" placeholder="'+self.lang.video_title+'"/></p>';
|
||||||
|
html+= '<p><label>'+self.lang.description+':</label><textarea class="wzYTUploadDescr" placeholder="'+self.lang.video_description+'"></textarea></p>';
|
||||||
|
html+= '<p><label>'+self.lang.tags+':</label><input type="text" class="wzYTUploadTags" placeholder="'+self.lang.video_tags+'"/></p>';
|
||||||
|
html+= '<p><label>'+self.lang.privacy_status+':</label><select class="wzYTUploadPrivacy"><option value="public">'+self.lang.privacy_public+'</option><option value="unlisted">'+self.lang.privacy_ulnisted+'</option><option value="private">'+self.lang.privacy_private+'</option></select></p>';
|
||||||
|
html+= '<p><input type="file" class="wzYTUploadFile" accept="video/*"><button class="wzYTUploadButton button button-primary"><i class="yicon-fl yicon-upload fa-fw"></i> '+self.lang.upload+'</button></p>';
|
||||||
|
html+= '</form>';
|
||||||
|
html+= '<p class="wzYTUploadTerms">'+self.lang.youtube_terms+'</p>';
|
||||||
|
html+= '</div>';
|
||||||
|
html+= '</div>';
|
||||||
|
html+= '</div><div class="wzYoutubeShade"></div><div class="wzYoutubeClose"><i class="yicon-fl yicon-cancel"></i></div></div>';
|
||||||
|
this.wrapper = $(html).hide();
|
||||||
|
$('body').append(this.wrapper);
|
||||||
|
|
||||||
|
this.pages = this.wrapper.find('.page');
|
||||||
|
this.loader = $(this.templates.loader).hide();
|
||||||
|
this.wrapper.find('.wzYoutubeWrapper').append(this.loader);
|
||||||
|
|
||||||
|
$(this.wrapper.find('.wzYTVideoAddItem')).on('click',function(){
|
||||||
|
self.setCurrentPage(3);
|
||||||
|
});
|
||||||
|
$(this.wrapper.find('.wzYTVideoListLink')).on('click',function(){
|
||||||
|
self.setCurrentPage(2);
|
||||||
|
});
|
||||||
|
self.moreBtn = this.wrapper.find('.wzYTMoreBtn').on('click',function(){
|
||||||
|
self.showLoading();
|
||||||
|
self.loadVideos($(this).attr('data-token'),function(){
|
||||||
|
self.hideLoading();
|
||||||
|
self.setCurrentPage(2);
|
||||||
|
});
|
||||||
|
}).hide();
|
||||||
|
|
||||||
|
this.wrapper.find('form.wzYTUploadForm').on('submit',function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
var form = $(this);
|
||||||
|
var file = form.find('.wzYTUploadFile').get(0).files[0];
|
||||||
|
//console.info(file);
|
||||||
|
var metadata = {
|
||||||
|
snippet: {
|
||||||
|
title: form.find('.wzYTUploadTitle').val(),
|
||||||
|
description: form.find('.wzYTUploadDescr').val(),
|
||||||
|
tags: form.find('.wzYTUploadTags').val(),
|
||||||
|
categoryId: 22
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
privacyStatus: form.find('.wzYTUploadPrivacy').val()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if(!metadata.snippet.title || metadata.snippet.title==''){
|
||||||
|
alert(self.lang.enter_video_title);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!file){
|
||||||
|
alert(self.lang.choose_video_file);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var progressBar = self.loader.find('progress');
|
||||||
|
progressBar.attr({value:0});
|
||||||
|
self.showLoading();
|
||||||
|
|
||||||
|
self.youtubeConnector.uploadVideo(metadata,file
|
||||||
|
,function(_videoID){
|
||||||
|
//console.log('done uploading');
|
||||||
|
progressBar.attr({value:99});
|
||||||
|
self.wrapper.find('.wzYTVideos .wzYTVideoItem').remove();
|
||||||
|
self.loadVideos(null,function(){
|
||||||
|
self.hideLoading();
|
||||||
|
self.setCurrentPage(2);
|
||||||
|
self.wrapper.find('.wzYTVideos .wzYTVideoItem[data-id="'+_videoID+'"]').addClass('loading');
|
||||||
|
|
||||||
|
self.youtubeConnector.pollForVideoStatus(_videoID,function(_vID){
|
||||||
|
self.wrapper.find('.wzYTVideos .wzYTVideoItem[data-id="'+_vID+'"]').removeClass('loading');
|
||||||
|
},function(_vID,errorMsg){
|
||||||
|
self.wrapper.find('.wzYTVideos .wzYTVideoItem[data-id="'+_vID+'"]').removeClass('loading').addClass('error');
|
||||||
|
alert(errorMsg);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
,function(_bytesUploaded,_totalBytes,_bytesPerSecond){
|
||||||
|
var estimatedSecondsRemaining = Math.ceil((_totalBytes - _bytesUploaded) / _bytesPerSecond);
|
||||||
|
var percentageComplete = Math.floor(_bytesUploaded / _totalBytes * 100);
|
||||||
|
//console.log('Uploaded: '+percentageComplete+'%, est. seconds: '+estimatedSecondsRemaining);
|
||||||
|
progressBar.attr({value:percentageComplete});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
if(_onVideoSelectCallback){
|
||||||
|
this.onVideoSelect = _onVideoSelectCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setCurrentPage(1);
|
||||||
|
|
||||||
|
this.showLoading();
|
||||||
|
|
||||||
|
this.youtubeConnector = new wzYoutubeConnector(_appID,{
|
||||||
|
onAuthSuccess: function(){
|
||||||
|
this.loadChannels(function(channels){
|
||||||
|
var channel = channels[0];
|
||||||
|
var channelContainer = self.wrapper.find('.wzYTChannel');
|
||||||
|
channelContainer.html(self.templates.channelTitle.replace('{channel_name}',channel.snippet.title).replace('{img}',channel.snippet.thumbnails.default.url));
|
||||||
|
/*channelContainer.on('click',function(){
|
||||||
|
self.setCurrentPage(2);
|
||||||
|
});*/
|
||||||
|
self.wrapper.find('.wzYoutubeSignOut').on('click',function(){
|
||||||
|
self.showLoading();
|
||||||
|
self.youtubeConnector.signOut(function(){
|
||||||
|
self.setCurrentPage(1);
|
||||||
|
self.hideLoading();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
self.channelID = channel.contentDetails.relatedPlaylists.uploads;
|
||||||
|
self.wrapper.find('.wzYTVideos').html(' ');
|
||||||
|
self.loadVideos(null,function(){
|
||||||
|
self.hideLoading();
|
||||||
|
self.setCurrentPage(2);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onAuthFail: function(){
|
||||||
|
self.hideLoading();
|
||||||
|
self.setCurrentPage(1);
|
||||||
|
},
|
||||||
|
onError: function(error){
|
||||||
|
alert(error);
|
||||||
|
self.close();
|
||||||
|
}
|
||||||
|
}).checkAuth();
|
||||||
|
|
||||||
|
this.wrapper.find('.wzYTAuthBtn').on('click',this.youtubeConnector.showAuthWin);
|
||||||
|
this.wrapper.find('.wzYoutubeShade, .wzYoutubeClose').on('click',function(){
|
||||||
|
self.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.open();
|
||||||
|
},
|
||||||
|
loadVideos: function(_pageToken,_doneCallback){
|
||||||
|
var self = this;
|
||||||
|
this.youtubeConnector.loadVideos(this.channelID,_pageToken,function(videos,nextPageToken){
|
||||||
|
var videoList = self.wrapper.find('.wzYTVideos');
|
||||||
|
var videoItem;
|
||||||
|
for(var i=0;i<videos.length;i++){
|
||||||
|
//console.info(videos[i]);
|
||||||
|
videoItem = $(self.templates.videoItem
|
||||||
|
.replace('{video_title}',videos[i].snippet.title)
|
||||||
|
.replace('{video_descr}',videos[i].snippet.description)
|
||||||
|
.replace('{img}',videos[i].snippet.thumbnails.default.url)
|
||||||
|
.replace('{video_id}',videos[i].snippet.resourceId.videoId)
|
||||||
|
).on('click',function(){
|
||||||
|
self.onVideoSelect.call(this,$(this).attr('data-id'));
|
||||||
|
});
|
||||||
|
videoList.append(videoItem);
|
||||||
|
}
|
||||||
|
if(nextPageToken){
|
||||||
|
self.moreBtn.attr('data-token',nextPageToken).show();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
self.moreBtn.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!_pageToken && !videos.length){
|
||||||
|
videoList.append(self.templates.noVideosItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(_doneCallback){
|
||||||
|
_doneCallback.call(self);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
setCurrentPage: function(_pageNum){
|
||||||
|
this.currentPage = _pageNum;
|
||||||
|
this.wrapper.addClass('noTrans');
|
||||||
|
this.wrapper.removeClass('currentPage-1 currentPage-2 currentPage-3');
|
||||||
|
this.wrapper.removeClass('noTrans');
|
||||||
|
this.wrapper.addClass('currentPage-'+this.currentPage);
|
||||||
|
if(_pageNum==1){
|
||||||
|
this.wrapper.find('.wzYTVideos').html(this.templates.noVideosItem);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showLoading: function(){
|
||||||
|
this.loader.show();
|
||||||
|
},
|
||||||
|
hideLoading: function(){
|
||||||
|
this.loader.hide();
|
||||||
|
},
|
||||||
|
open: function(){
|
||||||
|
this.wrapper.show();
|
||||||
|
this.wrapper.find('.wzYoutubeWrapper').hide().fadeIn();
|
||||||
|
},
|
||||||
|
close:function(_force){
|
||||||
|
var self = this;
|
||||||
|
if(_force){
|
||||||
|
this.wrapper.hide();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.wrapper.find('.wzYoutubeWrapper').fadeOut(400,function(){
|
||||||
|
self.wrapper.hide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var wzYoutubeConnector = function(_appID,_callbacks){
|
||||||
|
var self = this;
|
||||||
|
this.googleAppID = _appID;
|
||||||
|
this.authScopes = [
|
||||||
|
'https://www.googleapis.com/auth/youtube.upload',
|
||||||
|
'https://www.googleapis.com/auth/youtube'
|
||||||
|
];
|
||||||
|
this.googleAPI = gapi;
|
||||||
|
this.authenticated = false;
|
||||||
|
this.accessToken = '';
|
||||||
|
this.callbacks = {
|
||||||
|
onAuthSuccess: function(){
|
||||||
|
|
||||||
|
},
|
||||||
|
onAuthFail: function(){
|
||||||
|
|
||||||
|
},
|
||||||
|
onError: function(error){
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//console.info(_callbacks,typeof(_callbacks));
|
||||||
|
if(typeof(_callbacks)=='object'){
|
||||||
|
$.extend(true,this.callbacks,_callbacks);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.signOut = function(_callback){
|
||||||
|
$.ajax({
|
||||||
|
url: 'https://accounts.google.com/o/oauth2/revoke?token='+self.accessToken,
|
||||||
|
type:'get',
|
||||||
|
complete: function(jqXHR, textStatus){
|
||||||
|
_callback();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.showAuthWin = function(){
|
||||||
|
self.googleAPI.auth.authorize({
|
||||||
|
client_id: self.googleAppID,
|
||||||
|
scope: self.authScopes,
|
||||||
|
immediate: false
|
||||||
|
}, self.handleAuthResult);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.checkAuth = function(){
|
||||||
|
self.googleAPI.auth.authorize({
|
||||||
|
client_id: self.googleAppID,
|
||||||
|
scope: self.authScopes,
|
||||||
|
immediate: true
|
||||||
|
}, self.handleAuthResult);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.handleAuthResult = function(authResult){
|
||||||
|
//console.info('handleAuthResult:',authResult);
|
||||||
|
if(authResult && !authResult.error){
|
||||||
|
console.info('Auth result: ',authResult);
|
||||||
|
self.accessToken = authResult.access_token;
|
||||||
|
self.googleAPI.client.load('youtube', 'v3', function(){
|
||||||
|
self.callbacks.onAuthSuccess.apply(self);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
self.callbacks.onAuthFail.apply(self);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.loadChannels = function(_callback){
|
||||||
|
self.googleAPI.client.youtube.channels.list({
|
||||||
|
mine: true,
|
||||||
|
part: 'contentDetails'
|
||||||
|
}).execute(function(response) {
|
||||||
|
if(response.error) {
|
||||||
|
self.callbacks.onError(response.error.message);
|
||||||
|
} else {
|
||||||
|
var channel = response.result.items[0];
|
||||||
|
self.googleAPI.client.youtube.channels.list({
|
||||||
|
mine: true,
|
||||||
|
part: 'snippet'
|
||||||
|
}).execute(function(response) {
|
||||||
|
if(response.error) {
|
||||||
|
self.callbacks.onError(response.error.message);
|
||||||
|
} else {
|
||||||
|
$.extend(true,channel,response.result.items[0]);
|
||||||
|
response.result.items[0] = channel;
|
||||||
|
_callback.call(self,response.result.items);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.loadVideos = function(_channelID,_pageToken,_callback,_maxResults){
|
||||||
|
if(!_maxResults){
|
||||||
|
_maxResults = 15;
|
||||||
|
}
|
||||||
|
var requestOptions = {
|
||||||
|
playlistId: _channelID,
|
||||||
|
part: 'snippet',
|
||||||
|
maxResults: _maxResults
|
||||||
|
};
|
||||||
|
if (_pageToken) {
|
||||||
|
requestOptions.pageToken = _pageToken;
|
||||||
|
}
|
||||||
|
self.googleAPI.client.youtube.playlistItems.list(requestOptions).execute(function(response){
|
||||||
|
if(response.error) {
|
||||||
|
self.callbacks.onError(response.error.message);
|
||||||
|
} else {
|
||||||
|
_callback.call(self,response.result.items,response.result.nextPageToken);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
nextPageToken = response.result.nextPageToken;
|
||||||
|
prevPageToken = response.result.prevPageToken
|
||||||
|
*/
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.uploadVideo = function(_metadata,_file,_doneCallback,_processCallback){
|
||||||
|
var uploader = new MediaUploader({
|
||||||
|
baseUrl: 'https://www.googleapis.com/upload/youtube/v3/videos',
|
||||||
|
file: _file,
|
||||||
|
token: self.accessToken,
|
||||||
|
metadata: _metadata,
|
||||||
|
params: {
|
||||||
|
part: Object.keys(_metadata).join(',')
|
||||||
|
},
|
||||||
|
onError: function(data) {
|
||||||
|
var message = data;
|
||||||
|
try {
|
||||||
|
var errorResponse = JSON.parse(data);
|
||||||
|
message = errorResponse.error.message;
|
||||||
|
} finally {
|
||||||
|
self.callbacks.onError(message);
|
||||||
|
}
|
||||||
|
}.bind(this),
|
||||||
|
onProgress: function(data) {
|
||||||
|
var currentTime = Date.now();
|
||||||
|
var bytesUploaded = data.loaded;
|
||||||
|
var totalBytes = data.total;
|
||||||
|
var bytesPerSecond = bytesUploaded / ((currentTime - uploadStartTime) / 1000);
|
||||||
|
|
||||||
|
bytesUploaded-= bytesUploaded/10;
|
||||||
|
|
||||||
|
_processCallback.call(self,bytesUploaded,totalBytes,bytesPerSecond);
|
||||||
|
}.bind(this),
|
||||||
|
onComplete: function(data) {
|
||||||
|
var uploadResponse = JSON.parse(data);
|
||||||
|
_doneCallback.call(self,uploadResponse.id);
|
||||||
|
}.bind(this)
|
||||||
|
});
|
||||||
|
var uploadStartTime = Date.now();
|
||||||
|
uploader.upload();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.pollForVideoStatus = function(_videoID,_doneCallback,_errorCallback) {
|
||||||
|
self.googleAPI.client.request({
|
||||||
|
path: '/youtube/v3/videos',
|
||||||
|
params: {
|
||||||
|
part: 'status,player',
|
||||||
|
id: _videoID
|
||||||
|
},
|
||||||
|
callback: function(response) {
|
||||||
|
if(response.error) {
|
||||||
|
//console.log(response.error.message);
|
||||||
|
setTimeout(self.pollForVideoStatus.bind(this,_videoID,_doneCallback,_errorCallback), 60000);
|
||||||
|
} else {
|
||||||
|
var uploadStatus = response.items[0].status.uploadStatus;
|
||||||
|
switch (uploadStatus) {
|
||||||
|
case 'uploaded':
|
||||||
|
setTimeout(self.pollForVideoStatus.bind(this,_videoID,_doneCallback,_errorCallback), 60000);
|
||||||
|
break;
|
||||||
|
case 'processed':
|
||||||
|
_doneCallback.call(self,_videoID);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
_errorCallback.call(self,_videoID,'Transcoding failed.');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.bind(this)
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined( '_JEXEC' ) or die;
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="mxyt-playlist-item-blank">
|
||||||
|
<div class="ch-item ch-img-1" style="background-image:url(<?php echo $this->getThumbURL($this->_item,$this->attribs['size']);?>);">
|
||||||
|
<div class="ch-info">
|
||||||
|
<h3><?php echo $this->_item->snippet->title;?></h3>
|
||||||
|
<a href="<?php echo $this->getVideoHref($this->_item,$this->attribs);?>" class="mxyt-lightbox" data-fancybox="<?php echo $this->attribs['rel'];?>" target="_blank"><span class="mxyt-icon mxyt-icon-play"></span></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined( '_JEXEC' ) or die;
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="mxyt-playlist-item-blank">
|
||||||
|
<div class="ch-item">
|
||||||
|
<div class="ch-info">
|
||||||
|
<h3><?php echo $this->_item->snippet->title;?></h3>
|
||||||
|
<a href="<?php echo $this->getVideoHref($this->_item,$this->attribs);?>" class="mxyt-lightbox" data-fancybox="<?php echo $this->attribs['rel'];?>" target="_blank"><span class="mxyt-icon mxyt-icon-play"></span></a>
|
||||||
|
</div>
|
||||||
|
<div class="ch-thumb" style="background-image:url(<?php echo $this->getThumbURL($this->_item,$this->attribs['size']);?>);z-index:<?php echo $this->_total+100-$this->_tick;?>"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined('_JEXEC') or die(':)');
|
||||||
|
|
||||||
|
$isVideoSingle = (!$this->showTitle && !$this->showDescription && !$this->showMeta);
|
||||||
|
?>
|
||||||
|
<div class="mxyt-playlist-item">
|
||||||
|
<div class="mxyt-video <?php echo ($isVideoSingle?'mxyt-single':'');?>">
|
||||||
|
<?php
|
||||||
|
echo $this->getVideoHTML($this->_item,$this->attribs);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if($this->showTitle){
|
||||||
|
?>
|
||||||
|
<div class="mxyt-title">
|
||||||
|
<?php
|
||||||
|
echo '<h3>'.$this->_item->snippet->title.'</h3>';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if($this->showDate){
|
||||||
|
?>
|
||||||
|
<div class="mxyt-date">
|
||||||
|
<?php
|
||||||
|
echo $this->getVideoDate($this->_item->snippet->publishedAt);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if($this->showDescription){
|
||||||
|
?>
|
||||||
|
<div class="mxyt-description">
|
||||||
|
<div class="mxyt-text-description mxyt-less"><div class="mxyt-text-description-full"><?php echo $this->getFullVideoDescr($this->_item->snippet->description);?></div></div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if($this->showMeta){
|
||||||
|
?>
|
||||||
|
<div class="mxyt-meta">
|
||||||
|
<div class="mxyt-views mxyt-tip" title="<?php echo JText::_('PLG_SYSTEM_YOUTUBER_NUMBER_OF_VIEWS');?>"><i class="mxyt-icon mxyt-icon-views"></i> <?php echo (int)@$this->_item->statistics->viewCount;?></div>
|
||||||
|
<div class="mxyt-likes mxyt-tip" title="<?php echo JText::_('PLG_SYSTEM_YOUTUBER_NUMBER_OF_LIKES');?>"><i class="mxyt-icon mxyt-icon-likes"></i> <?php echo (int)@$this->_item->statistics->likeCount;?></div>
|
||||||
|
<div class="mxyt-comments mxyt-tip" title="<?php echo JText::_('PLG_SYSTEM_YOUTUBER_NUMBER_OF_COMMENTS');?>"><i class="mxyt-icon mxyt-icon-comments"></i> <?php echo (int)@$this->_item->statistics->commentCount;?></div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,99 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined('_JEXEC') or die(':)');
|
||||||
|
|
||||||
|
$isVideoSingle = (!$this->showTitle && !$this->showDescription && !$this->showMeta);
|
||||||
|
?>
|
||||||
|
<section class="mxYouTubeR mxYouTubeR_channel mxYouTubeR_theme_<?php echo $this->attribs['theme'];?>">
|
||||||
|
<?php
|
||||||
|
if($this->showHeader){
|
||||||
|
?>
|
||||||
|
<div class="mxyt-channel-head">
|
||||||
|
<div class="mxyt-channel-head-cover" style="background-image: url('<?php echo $this->channel->brandingSettings->image->bannerImageUrl; ?>');">
|
||||||
|
<div class="mxyt-channel-logo"><img src="<?php echo $this->channel->snippet->thumbnails->medium->url;?>" alt="<?php echo $this->channel->snippet->title;?>" /></div>
|
||||||
|
<div class="mxyt-channel-info">
|
||||||
|
<span><?php printf( JText::_('PLG_SYSTEM_YOUTUBER_SVIDEOS'), $this->channel->statistics->videoCount ); ?></span>
|
||||||
|
<span><?php printf( JText::_('PLG_SYSTEM_YOUTUBER_SVIEWS'), $this->channel->statistics->viewCount ); ?></span>
|
||||||
|
<span><?php printf( JText::_('PLG_SYSTEM_YOUTUBER_SSUBSCRIBERS'), $this->channel->statistics->subscriberCount ); ?></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mxyt-channel-title">
|
||||||
|
<div class="mxyt-channel-subscr-btn">
|
||||||
|
<script src="https://apis.google.com/js/platform.js"></script>
|
||||||
|
<div class="g-ytsubscribe" data-channelid="<?php echo $this->channel->id; ?>" data-layout="default" data-count="default"></div>
|
||||||
|
</div>
|
||||||
|
<?php echo $this->channel->snippet->title;?>
|
||||||
|
</div>
|
||||||
|
<div class="mxyt-channel-descr">
|
||||||
|
<div class="mxyt-text-description mxyt-less"><div class="mxyt-text-description-full"><?php echo $this->getFullVideoDescr($this->channel->snippet->description);?></div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="mxyt-channel-videos">
|
||||||
|
<?php
|
||||||
|
if($this->showPlaylists){
|
||||||
|
?>
|
||||||
|
<div class="mxyt-channel-playlist-chooser">
|
||||||
|
<div class="mxyt-playlist-select">
|
||||||
|
<?php
|
||||||
|
$cfg = $this->cfg;
|
||||||
|
$list = '<ul>';
|
||||||
|
$totalPls = count($this->playlists);
|
||||||
|
foreach($this->playlists as $plID=>$plTitle){
|
||||||
|
$cfg['playlist_id'] = $plID;
|
||||||
|
if($plID==$this->attribs['playlist_id']){
|
||||||
|
echo '<b>'.$plTitle.($totalPls>1?' <i class="mxyt-icon mxyt-icon-angle-down" aria-hidden="true"></i>':'').'</b>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$list.= '<li><span data-mxyt-cfg="'.http_build_query($cfg).'">'.$plTitle.'</span></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$list.= '</ul>';
|
||||||
|
echo $list;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="mxyt-playlist mxyt-cols-<?php echo $this->attribs['responsive_limit'];?>">
|
||||||
|
<?php
|
||||||
|
$i=0;
|
||||||
|
$this->_total = count($this->videos);
|
||||||
|
if($this->_total==0){
|
||||||
|
echo '<p align="center">'.JText::_('PLG_SYSTEM_YOUTUBER_NO_VIDEOS_IN_PLAYLIST').'</p>';
|
||||||
|
}
|
||||||
|
echo '<div class="mxyt-brow">';
|
||||||
|
foreach($this->videos as $video){
|
||||||
|
$i++;
|
||||||
|
echo '<div class="mxyt-bcol-'.$this->attribs['cols'].'">';
|
||||||
|
|
||||||
|
$this->_item = $video;
|
||||||
|
$this->_tick = $i;
|
||||||
|
echo $this->loadTemplate('_item');
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
if($i%(int)$this->attribs['cols']==0 && $i<$this->_total){
|
||||||
|
echo '</div><div class="mxyt-brow">';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '</div>';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($this->attribs['load_more']=='true' && isset($this->playlist->nextPageToken)){
|
||||||
|
echo '<div class="mxyt-more"><span class="mxyt-button mxyt-load-more'.($this->attribs['infinite_scroll']=='true'?' mxyt-infinite-scroll':'').'" data-mxyt-pagetoken="'.$this->playlist->nextPageToken.'" data-mxyt-cfg="'.http_build_query($this->cfg).'">'.$this->attribs['load_more_text'].'...</span></div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined('_JEXEC') or die(':)');
|
||||||
|
?>
|
||||||
|
<section class="mxYouTubeR mxYouTubeR_playlist mxYouTubeR_theme_<?php echo $this->attribs['theme'];?>">
|
||||||
|
<div class="mxyt-playlist mxyt-cols-<?php echo $this->attribs['responsive_limit'];?>">
|
||||||
|
<div class="mxyt-brow">
|
||||||
|
<?php
|
||||||
|
$i=0;
|
||||||
|
$this->_total = count($this->videos);
|
||||||
|
foreach($this->videos as $video){
|
||||||
|
$i++;
|
||||||
|
$this->_item = $video;
|
||||||
|
?>
|
||||||
|
<div class="mxyt-bcol-<?php echo $this->attribs['cols'];?>">
|
||||||
|
<?php
|
||||||
|
$this->_item = $video;
|
||||||
|
$this->_tick = $i;
|
||||||
|
echo $this->loadTemplate('_item');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if($i%(int)$this->attribs['cols']==0 && $i<$this->_total){
|
||||||
|
echo '</div><div class="mxyt-brow">';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($this->attribs['load_more']=='true' && isset($this->playlist->nextPageToken)){
|
||||||
|
echo '<div class="mxyt-more"><span class="mxyt-button mxyt-load-more'.($this->attribs['infinite_scroll']=='true'?' mxyt-infinite-scroll':'').'" data-mxyt-pagetoken="'.$this->playlist->nextPageToken.'" data-mxyt-cfg="'.http_build_query($this->cfg).'">'.$this->attribs['load_more_text'].'...</span></div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</section>
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined('_JEXEC') or die(':)');
|
||||||
|
?>
|
||||||
|
<section class="mxYouTubeR mxYouTubeR_video mxYouTubeR_theme_<?php echo $this->attribs['theme'];?>">
|
||||||
|
<div class="mxyt-video">
|
||||||
|
<?php
|
||||||
|
echo $this->getVideoHTML($this->video,$this->attribs);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if($this->showTitle || $this->showChannel || $this->showDate){
|
||||||
|
?>
|
||||||
|
<div class="mxyt-title">
|
||||||
|
<?php
|
||||||
|
if($this->showDate) echo '<div class="mxyt-date">'.$this->getVideoDate($this->video->snippet->publishedAt).'</div>';
|
||||||
|
if($this->showTitle) echo '<h1>'.($this->attribs['title']!=''?$this->attribs['title']:$this->video->snippet->title).'</h1>';
|
||||||
|
if($this->showChannel){
|
||||||
|
?>
|
||||||
|
<div class="mxyt-channel">
|
||||||
|
<img src="<?php echo $this->channel->snippet->thumbnails->default->url;?>" alt="<?php echo $this->channel->snippet->title;?>">
|
||||||
|
<h3><?php echo $this->channel->snippet->title;?></h3>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if($this->showDescription){
|
||||||
|
?>
|
||||||
|
<div class="mxyt-description">
|
||||||
|
<div class="mxyt-text-description mxyt-less"><div class="mxyt-text-description-full"><?php echo $this->getFullVideoDescr($this->attribs['description']?$this->attribs['description']:$this->video->snippet->description);?></div></div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if($this->showMeta){
|
||||||
|
?>
|
||||||
|
<div class="mxyt-meta">
|
||||||
|
<div class="mxyt-views mxyt-tip" title="<?php echo JText::_('PLG_SYSTEM_YOUTUBER_NUMBER_OF_VIEWS');?>"><i class="mxyt-icon mxyt-icon-views"></i> <?php echo $this->video->statistics->viewCount;?></div>
|
||||||
|
<div class="mxyt-likes mxyt-tip" title="<?php echo JText::_('PLG_SYSTEM_YOUTUBER_NUMBER_OF_LIKES');?>"><i class="mxyt-icon mxyt-icon-likes"></i> <?php echo $this->video->statistics->likeCount;?></div>
|
||||||
|
<div class="mxyt-dislikes mxyt-tip" title="<?php echo JText::_('PLG_SYSTEM_YOUTUBER_NUMBER_OF_DISLIKES');?>"><i class="mxyt-icon mxyt-icon-dislikes"></i> <?php echo $this->video->statistics->dislikeCount;?></div>
|
||||||
|
<div class="mxyt-favs mxyt-tip" title="<?php echo JText::_('PLG_SYSTEM_YOUTUBER_ADDED_TO_FAVORITES');?>"><i class="mxyt-icon mxyt-icon-favs"></i> <?php echo $this->video->statistics->favoriteCount;?></div>
|
||||||
|
<div class="mxyt-comments mxyt-tip" title="<?php echo JText::_('PLG_SYSTEM_YOUTUBER_NUMBER_OF_COMMENTS');?>"><i class="mxyt-icon mxyt-icon-comments"></i> <?php echo $this->video->statistics->commentCount;?></div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</section>
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined( '_JEXEC' ) or die;
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="mxyt-flipcards-playlist-item">
|
||||||
|
<div class="mxyt-flipcards-front">
|
||||||
|
<img class="mxyt-img" src="<?php echo $this->getThumbURL($this->_item,$this->attribs['size']);?>">
|
||||||
|
<?php
|
||||||
|
echo $this->getVideoHTML($this->_item,$this->attribs);
|
||||||
|
$rel = $this->attribs['rel'].'_';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="mxyt-flipcards-back">
|
||||||
|
<img class="mxyt-img" src="<?php echo $this->getThumbURL($this->_item,$this->attribs['size']);?>">
|
||||||
|
<a href="<?php echo $this->getVideoHref($this->_item,$this->attribs);?>" class="mxyt-flipcards-link mxyt-lightbox" data-fancybox="<?php echo $rel;?>" target="_blank">
|
||||||
|
<div class="mxyt-flipcards-limit">
|
||||||
|
<div class="mxyt-flipcards-title">
|
||||||
|
<?php
|
||||||
|
if($this->showTitle) echo '<h3>'.$this->_item->snippet->title.'</h3>';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="mxyt-flipcards-description"><?php echo $this->getLimitVideoDescr($this->_item->snippet->description,(int)$this->attribs['max_words']);?></div>
|
||||||
|
<div class="mxyt-flipcards-limit-fade"></div>
|
||||||
|
</div>
|
||||||
|
<div class="mxyt-flipcards-meta">
|
||||||
|
<div class="mxyt-views" title="<?php echo JText::_('PLG_SYSTEM_YOUTUBER_NUMBER_OF_VIEWS');?>"><i class="mxyt-icon mxyt-icon-views"></i> <?php echo $this->_item->statistics->viewCount;?></div>
|
||||||
|
<div class="mxyt-likes" title="<?php echo JText::_('PLG_SYSTEM_YOUTUBER_NUMBER_OF_LIKES');?>"><i class="mxyt-icon mxyt-icon-likes"></i> <?php echo (int)@$this->_item->statistics->likeCount;?></div>
|
||||||
|
<div class="mxyt-comments" title="<?php echo JText::_('PLG_SYSTEM_YOUTUBER_NUMBER_OF_COMMENTS');?>"><i class="mxyt-icon mxyt-icon-comments"></i> <?php echo $this->_item->statistics->commentCount;?></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
class PlgButtonyoutuber_btn extends JPlugin{
|
||||||
|
|
||||||
|
protected $autoloadLanguage = true;
|
||||||
|
|
||||||
|
public function onDisplay($name){
|
||||||
|
$doc = JFactory::getDocument();
|
||||||
|
|
||||||
|
$getContent = $this->_subject->getContent($name);
|
||||||
|
$js = "
|
||||||
|
function mxYouTubeRBtnClick(editor){
|
||||||
|
window.wzYoutube.init(window.wzYoutube.appID,function(_videoID){
|
||||||
|
jInsertEditorText('[mx_youtuber type=\"video\" id=\"' + _videoID + '\" display=\"title,date,channel,description,meta\"]', editor);
|
||||||
|
window.wzYoutube.close();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
";
|
||||||
|
|
||||||
|
$doc->addScriptDeclaration($js);
|
||||||
|
|
||||||
|
$button = new JObject;
|
||||||
|
$button->modal = false;
|
||||||
|
$button->class = 'btn mxYouTuberBtn';
|
||||||
|
$button->onclick = 'mxYouTubeRBtnClick(\'' . $name . '\');return false;';
|
||||||
|
$button->text = 'YouTubeR';
|
||||||
|
$button->name = 'youtube';
|
||||||
|
|
||||||
|
$button->link = '#';
|
||||||
|
|
||||||
|
return $button;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<extension version="3.1" type="plugin" group="editors-xtd" method="upgrade">
|
||||||
|
<name>Button - YouTubeR</name>
|
||||||
|
<author>Oleg Micriucov (ZyX)</author>
|
||||||
|
<creationDate>June 2016</creationDate>
|
||||||
|
<authorEmail>info@allforjoomla.com</authorEmail>
|
||||||
|
<authorUrl>https://allforjoomla.com</authorUrl>
|
||||||
|
<copyright>Copyright (c) 2018 Oleg Micriucov</copyright>
|
||||||
|
<license>https://allforjoomla.com/license</license>
|
||||||
|
<version>1.41</version>
|
||||||
|
<description><![CDATA[<p>This plugin displays a button for uploading videos to YouTube</p>]]></description>
|
||||||
|
<files>
|
||||||
|
<filename plugin="youtuber_btn">youtuber_btn.php</filename>
|
||||||
|
<filename>index.html</filename>
|
||||||
|
</files>
|
||||||
|
</extension>
|
||||||
147
deployed/youtuber/plugins/system/youtuber/data.php
Normal file
147
deployed/youtuber/plugins/system/youtuber/data.php
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined( '_JEXEC' ) or die;
|
||||||
|
|
||||||
|
class mxYouTuberData{
|
||||||
|
|
||||||
|
private $_browser_key = '';
|
||||||
|
private $_caching = 1;
|
||||||
|
private $_cache_lifetime = 3600;
|
||||||
|
private $_controller;
|
||||||
|
const YOUTUBE_API_HOST = 'https://www.googleapis.com/youtube/v3/';
|
||||||
|
const CACHE_KEY = 'plg_system_youtuber';
|
||||||
|
|
||||||
|
public function __construct($controller){
|
||||||
|
$this->_controller = $controller;
|
||||||
|
$this->_browser_key = $controller->params->get('googleBrowserKey');
|
||||||
|
$this->_caching = (int)$controller->params->get('caching');
|
||||||
|
$this->_cache_lifetime = (int)$controller->params->get('cache_lifetime');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVideo($id){
|
||||||
|
$response = $this->getData( 'videos' , array(
|
||||||
|
'part' => 'snippet,statistics,contentDetails',
|
||||||
|
'maxResults' => (is_array($id)?count($id):1),
|
||||||
|
'id' => (is_array($id)?implode(',',$id):$id)
|
||||||
|
));
|
||||||
|
|
||||||
|
if( !isset($response->items[0]) ) {
|
||||||
|
if(is_array($id)){
|
||||||
|
throw new Exception(sprintf(JText::_('PLG_SYSTEM_YOUTUBER_VIDEOS_IDS_NOT_FOUND'), implode(' ,',$id)));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
throw new Exception(sprintf(JText::_('PLG_SYSTEM_YOUTUBER_VIDEO_ID_NOT_FOUND'), $id));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (is_array($id)?$response->items:$response->items[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getChannelIDByUser($user){
|
||||||
|
$response = $this->getData( 'channels' , array(
|
||||||
|
'part' => 'id',
|
||||||
|
'forUsername' => $user
|
||||||
|
));
|
||||||
|
if( !isset($response->items[0]) ) {
|
||||||
|
throw new Exception(sprintf(JText::_('PLG_SYSTEM_YOUTUBER_CHANNEL_FOR_USER_NOT_FOUND'), $user));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $response->items[0]->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getChannel($id){
|
||||||
|
$response = $this->getData( 'channels' , array(
|
||||||
|
'part' => 'snippet,contentDetails,brandingSettings,statistics',
|
||||||
|
'id' => $id
|
||||||
|
));
|
||||||
|
|
||||||
|
if( !isset($response->items[0]) ) {
|
||||||
|
throw new Exception(sprintf(JText::_('PLG_SYSTEM_YOUTUBER_CHANNEL_ID_NOT_FOUND'), $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $response->items[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPlaylistItems($id,$limit=20,$pageToken='',$strict=true){
|
||||||
|
$params = array(
|
||||||
|
'part' => 'snippet',
|
||||||
|
'maxResults' => $limit,
|
||||||
|
'playlistId' => $id
|
||||||
|
);
|
||||||
|
if($pageToken != '') {
|
||||||
|
$params['pageToken'] = $pageToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = $this->getData( 'playlistItems' , $params);
|
||||||
|
|
||||||
|
if( $strict && !isset($response->items[0]) ) {
|
||||||
|
throw new Exception(sprintf(JText::_('PLG_SYSTEM_YOUTUBER_PLAYLIST_ID_NOT_FOUND'), $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPlaylists($channelID){
|
||||||
|
$params = array(
|
||||||
|
'part' => 'snippet',
|
||||||
|
'channelId' => $channelID,
|
||||||
|
'maxResults' => 50
|
||||||
|
);
|
||||||
|
$response = $this->getData( 'playlists' , $params);
|
||||||
|
|
||||||
|
if(isset($response->items) && is_array($response->items) && count($response->items)==0){
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
if( !isset($response->items[0]) ) {
|
||||||
|
throw new Exception(sprintf(JText::_('PLG_SYSTEM_YOUTUBER_PLAYLIST_FOR_CHANNEL_ID_NOT_FOUND'), $channelID));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $response->items;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getRequestURI( $type,$data ){
|
||||||
|
$data['key'] = $this->_browser_key;
|
||||||
|
return self::YOUTUBE_API_HOST.$type.'?'.http_build_query( $data );
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getData($type,$data){
|
||||||
|
$cache = JFactory::getCache(self::CACHE_KEY, '');
|
||||||
|
$cache->setCaching((bool)$this->_caching);
|
||||||
|
$cache->setLifeTime($this->_cache_lifetime);
|
||||||
|
$URI = $this->getRequestURI($type,$data);
|
||||||
|
$qID = md5($URI);
|
||||||
|
$cached = $cache->get( $qID );
|
||||||
|
|
||||||
|
if($this->_caching && $cached){
|
||||||
|
return json_decode(base64_decode($cached));
|
||||||
|
}
|
||||||
|
|
||||||
|
$request = JHttpFactory::getHttp();
|
||||||
|
$responce = $request->get($URI,array(
|
||||||
|
'Accept' => 'application/json',
|
||||||
|
'Referer' => JURI::base(false)
|
||||||
|
),10);
|
||||||
|
|
||||||
|
if( (int)$responce->code != 200 ) {
|
||||||
|
throw new Exception(JText::_('PLG_SYSTEM_YOUTUBER_SERVER_RESPONCE_ERROR').(!empty($responce->body)?'<pre>'.print_r($responce->body,true).'</pre>':''));
|
||||||
|
}
|
||||||
|
$result = $responce->body;
|
||||||
|
|
||||||
|
if($this->_caching){
|
||||||
|
$cache->store(base64_encode($result), $qID);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$cache->remove($qID);
|
||||||
|
}
|
||||||
|
|
||||||
|
return json_decode($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1
deployed/youtuber/plugins/system/youtuber/index.html
Normal file
1
deployed/youtuber/plugins/system/youtuber/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
217
deployed/youtuber/plugins/system/youtuber/views/base.php
Normal file
217
deployed/youtuber/plugins/system/youtuber/views/base.php
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined( '_JEXEC' ) or die;
|
||||||
|
|
||||||
|
class mxYouTuberView_base{
|
||||||
|
|
||||||
|
private $_tmpl = '';
|
||||||
|
private $_controller;
|
||||||
|
|
||||||
|
public function __construct($attribs,$controller){
|
||||||
|
$this->_controller = $controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getDataModel(){
|
||||||
|
static $model;
|
||||||
|
if(!is_object($model)){
|
||||||
|
$model = new mxYouTuberData($this->_controller);
|
||||||
|
}
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render(){
|
||||||
|
$tmpl = $this->getTemplate();
|
||||||
|
return $this->loadTemplate($tmpl);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function loadTemplate($tmpl){
|
||||||
|
$theme = $this->attribs['theme'];
|
||||||
|
$path = '';
|
||||||
|
foreach($this->_controller->getTemplatePaths($theme) as $tp){
|
||||||
|
if(is_file($tp.'/'.$tmpl.'.php')){
|
||||||
|
$path = $tp.'/'.$tmpl.'.php';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($path==''){
|
||||||
|
throw new Exception(sprintf(JText::_('PLG_SYSTEM_YOUTUBER_TMPL_FOR_THEME_NOT_FOUND'), $tmpl, $theme));
|
||||||
|
}
|
||||||
|
ob_start();
|
||||||
|
include($path);
|
||||||
|
$result = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function staticVar($name,$value=null,$default=null){
|
||||||
|
static $vars;
|
||||||
|
if(is_null($vars)){
|
||||||
|
$vars = array();
|
||||||
|
}
|
||||||
|
if(is_null($value)){
|
||||||
|
if(isset($vars[$name])){
|
||||||
|
return $vars[$name];
|
||||||
|
}
|
||||||
|
else if(!is_null($default)){
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
else return null;
|
||||||
|
}
|
||||||
|
$vars[$name] = $value;
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function orderVideos(&$videos,$orderBy,$orderDir){
|
||||||
|
if($orderBy!='default'){
|
||||||
|
self::staticVar('videosOrderBy',$orderBy);
|
||||||
|
uasort($videos,array($this,'_sortVideos'));
|
||||||
|
}
|
||||||
|
if($orderDir=='desc'){
|
||||||
|
$videos = array_reverse($videos);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function _sortVideos($a,$b){
|
||||||
|
$orderBy = mxYouTuberView_base::staticVar("videosOrderBy");
|
||||||
|
$varA = 0;
|
||||||
|
$varB = 0;
|
||||||
|
switch($orderBy){
|
||||||
|
case "date":
|
||||||
|
$varA = strtotime($a->snippet->publishedAt);
|
||||||
|
$varB = strtotime($b->snippet->publishedAt);
|
||||||
|
break;
|
||||||
|
case "views":
|
||||||
|
$varA = (int)@$a->statistics->viewCount;
|
||||||
|
$varB = (int)@$b->statistics->viewCount;
|
||||||
|
break;
|
||||||
|
case "likes":
|
||||||
|
$varA = (int)@$a->statistics->likeCount;
|
||||||
|
$varB = (int)@$b->statistics->likeCount;
|
||||||
|
break;
|
||||||
|
case "comments":
|
||||||
|
$varA = (int)@$a->statistics->commentCount;
|
||||||
|
$varB = (int)@$b->statistics->commentCount;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if ($varA == $varB) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return ($varA < $varB) ? -1 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVideoHref($video,$attribs,$iframe=false){
|
||||||
|
parse_str($attribs['ytp_params'],$ytPlayerAttribs);
|
||||||
|
if($attribs['suggested_videos']=='false'){
|
||||||
|
$ytPlayerAttribs['rel'] = '0';
|
||||||
|
}
|
||||||
|
if($attribs['mode']=='embed' && !isset($ytPlayerAttribs['autoplay'])){
|
||||||
|
$ytPlayerAttribs['autoplay'] = 0;
|
||||||
|
}
|
||||||
|
else if(!isset($ytPlayerAttribs['autoplay'])) $ytPlayerAttribs['autoplay'] = 1;
|
||||||
|
if(!isset($ytPlayerAttribs['showinfo'])) $ytPlayerAttribs['showinfo'] = 0;
|
||||||
|
if($iframe){
|
||||||
|
return 'https://www.youtube.com/embed/'.$video->id.'?'.http_build_query($ytPlayerAttribs);
|
||||||
|
}
|
||||||
|
return 'https://youtu.be/'.$video->id.'?'.http_build_query($ytPlayerAttribs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVideoHTML($video,$attribs){
|
||||||
|
$size = $attribs['size'];
|
||||||
|
if(isset($attribs['rel'])){
|
||||||
|
$attribs['rel'] = preg_replace('~[^a-z0-9]~i','_',$attribs['rel']);
|
||||||
|
}
|
||||||
|
$thumbnail = $this->getVideoThumbnail($video,$size);
|
||||||
|
$ratio = round($thumbnail->width/$thumbnail->height,2);
|
||||||
|
switch($attribs['mode']){
|
||||||
|
case 'embed':
|
||||||
|
$html = '<div class="mxyt-video-frame"><iframe width="'.$attribs['width'].'" height="'.$attribs['height'].'" src="'.$this->getVideoHref($video,$attribs,true).'" frameborder="0" allowfullscreen></iframe></div>';
|
||||||
|
break;
|
||||||
|
case 'lightbox':
|
||||||
|
case 'link':
|
||||||
|
default:
|
||||||
|
$html = '<a href="'.$this->getVideoHref($video,$attribs).'" data-ratio="'.$ratio.'" class="mxyt-img-placeholder mxyt-videolink '.($attribs['mode']=='lightbox'?' mxyt-lightbox':'').'" '.(isset($attribs['rel'])?'data-fancybox="'.$attribs['rel'].'" data-fancybox-group="'.$attribs['rel'].'"':'').' target="_blank">';
|
||||||
|
$html.= '<img src="'.$this->getThumbURL($video,$size).'" alt="'.htmlentities($video->snippet->title,ENT_QUOTES,'UTF-8').'" />';
|
||||||
|
$html.= '<span class="mxyt-play">';
|
||||||
|
$html.= '<i class="mxyt-icon mxyt-icon-play"></i>';
|
||||||
|
$html.= '</span>';
|
||||||
|
$html.= (isset($video->contentDetails->duration)?'<span class="mxyt-time">'.$this->getVideoDuration($video->contentDetails->duration).'</span>':'');
|
||||||
|
$html.= '</a>';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVideoThumbnail($video,$size){
|
||||||
|
if(isset($video->snippet->thumbnails->$size)){
|
||||||
|
$thumbnail = $video->snippet->thumbnails->$size;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$thumbnail = $video->snippet->thumbnails->default;
|
||||||
|
}
|
||||||
|
return $thumbnail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getThumbURL($video,$size){
|
||||||
|
return $this->getVideoThumbnail($video,$size)->url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVideoDate($timestamp){
|
||||||
|
return date($this->_controller->params->get('date_format'),strtotime($timestamp));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVideoDuration($str){
|
||||||
|
$int = new DateInterval($str);
|
||||||
|
|
||||||
|
if($int->h != 0){
|
||||||
|
$duration = $int->format('%h:%I:%S');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$duration = $int->format('%i:%S');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLimitVideoDescr($text,$num_words){
|
||||||
|
$words_array = preg_split( "/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY );
|
||||||
|
$sep = ' ';
|
||||||
|
if ( count( $words_array ) > $num_words ) {
|
||||||
|
array_pop( $words_array );
|
||||||
|
$text = implode( $sep, $words_array );
|
||||||
|
}
|
||||||
|
$text = implode( $sep, $words_array );
|
||||||
|
$text = preg_replace_callback('~([^\s]{24})([^\s])~is',array($this,'_breakWords_re_callback'),$text);
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFullVideoDescr($str){
|
||||||
|
$str = preg_replace_callback('~(https?://[^\s]+)~i',array($this,'_links_re_callback'),$str);
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function _links_re_callback($matches){
|
||||||
|
$title = (JString::strlen($matches[1])>35?JString::substr($matches[1],0,35).'...':$matches[1]);
|
||||||
|
return '<a href="'.$matches[1].'" target="_blank" rel="nofollow">'.$title.'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function _breakWords_re_callback($match){
|
||||||
|
return $match[1].' '.$match[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTemplate($tmpl){
|
||||||
|
$this->_tmpl = $tmpl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTemplate(){
|
||||||
|
return $this->_tmpl;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
109
deployed/youtuber/plugins/system/youtuber/views/channel.php
Normal file
109
deployed/youtuber/plugins/system/youtuber/views/channel.php
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined( '_JEXEC' ) or die;
|
||||||
|
require_once(dirname(__FILE__).'/base.php');
|
||||||
|
|
||||||
|
class mxYouTuberView_channel extends mxYouTuberView_base{
|
||||||
|
|
||||||
|
public function __construct($attribs,$controller){
|
||||||
|
parent::__construct($attribs,$controller);
|
||||||
|
|
||||||
|
$this->setTemplate('channel');
|
||||||
|
$dataModel = $this->getDataModel();
|
||||||
|
|
||||||
|
if($attribs['id']=='' && $attribs['user']!=''){
|
||||||
|
$attribs['id'] = $dataModel->getChannelIDByUser( $attribs['user'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->channel = $dataModel->getChannel( $attribs['id'] );
|
||||||
|
$this->playlists = array();
|
||||||
|
$defaultPL_ID = '';
|
||||||
|
$activePlaylists = array();
|
||||||
|
if(isset($attribs['playlists']) && $attribs['playlists']!=''){
|
||||||
|
foreach(explode(',',$attribs['playlists']) as $plListID){
|
||||||
|
$plListID = trim($plListID);
|
||||||
|
if($plListID!=''){
|
||||||
|
$activePlaylists[] = $plListID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($activePlaylists)){
|
||||||
|
if(isset($this->channel->contentDetails->relatedPlaylists) && isset($this->channel->contentDetails->relatedPlaylists->uploads) && in_array($this->channel->contentDetails->relatedPlaylists->uploads,$activePlaylists)){
|
||||||
|
$this->playlists[$this->channel->contentDetails->relatedPlaylists->uploads] = JText::_('PLG_SYSTEM_YOUTUBER_UPLOADS');
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($dataModel->getPlaylists($attribs['id']) as $dPlaylist){
|
||||||
|
if(in_array($dPlaylist->id,$activePlaylists)){
|
||||||
|
$this->playlists[$dPlaylist->id] = $dPlaylist->snippet->title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(isset($this->channel->contentDetails->relatedPlaylists) && isset($this->channel->contentDetails->relatedPlaylists->uploads)){
|
||||||
|
$this->playlists[$this->channel->contentDetails->relatedPlaylists->uploads] = JText::_('PLG_SYSTEM_YOUTUBER_UPLOADS');
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($dataModel->getPlaylists($attribs['id']) as $dPlaylist){
|
||||||
|
$this->playlists[$dPlaylist->id] = $dPlaylist->snippet->title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!isset($attribs['playlist_id']) || !isset($this->playlists[$attribs['playlist_id']])){
|
||||||
|
$plIDs = array_keys($this->playlists);
|
||||||
|
$attribs['playlist_id'] = ($defaultPL_ID!=''?$defaultPL_ID:reset($plIDs));
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->playlist = $dataModel->getPlaylistItems( $attribs['playlist_id'], $attribs['limit'], $attribs['pageToken'], false);
|
||||||
|
$ids = array();
|
||||||
|
if(isset($this->playlist->items)){
|
||||||
|
foreach($this->playlist->items as $item){
|
||||||
|
$ids[] = $item->snippet->resourceId->videoId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->videos = array();
|
||||||
|
$this->featVideo = new stdClass;
|
||||||
|
if(count($ids)){
|
||||||
|
$this->videos = $dataModel->getVideo($ids);
|
||||||
|
$this->orderVideos($this->videos,$attribs['order_by'],$attribs['order_dir']);
|
||||||
|
}
|
||||||
|
$attribs['rel'] = 'mxYouTubeR'.md5($attribs['id'].$attribs['theme']);
|
||||||
|
|
||||||
|
$this->featVideoAttribs = array_merge($attribs,array(
|
||||||
|
'mode' => 'lightbox',
|
||||||
|
));
|
||||||
|
|
||||||
|
if($attribs['size']==''){
|
||||||
|
$attribs['size'] = 'medium';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->featVideoAttribs['size']==''){
|
||||||
|
$this->featVideoAttribs['size'] = 'default';
|
||||||
|
if(isset($this->featVideo->snippet->thumbnails->medium)) $this->featVideoAttribs['size'] = 'medium';
|
||||||
|
else if(isset($this->featVideo->snippet->thumbnails->maxres)) $this->featVideoAttribs['size'] = 'maxres';
|
||||||
|
else if(isset($this->featVideo->snippet->thumbnails->standard)) $this->featVideoAttribs['size'] = 'standard';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$this->showHeader = strpos($attribs['display'],'header')!==false;
|
||||||
|
$this->showPlaylists = strpos($attribs['display'],'playlists')!==false;
|
||||||
|
$this->showTitle = strpos($attribs['display'],'title')!==false;
|
||||||
|
$this->showDescription = strpos($attribs['display'],'description')!==false;
|
||||||
|
$this->showMeta = strpos($attribs['display'],'meta')!==false;
|
||||||
|
$this->showDate = strpos($attribs['display'],'date')!==false;
|
||||||
|
|
||||||
|
$this->cfg = $attribs;
|
||||||
|
unset($this->cfg['pageToken']);
|
||||||
|
unset($this->cfg['infinite_scroll']);
|
||||||
|
|
||||||
|
$this->attribs = $attribs;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
82
deployed/youtuber/plugins/system/youtuber/views/playlist.php
Normal file
82
deployed/youtuber/plugins/system/youtuber/views/playlist.php
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined( '_JEXEC' ) or die;
|
||||||
|
require_once(dirname(__FILE__).'/base.php');
|
||||||
|
|
||||||
|
class mxYouTuberView_playlist extends mxYouTuberView_base{
|
||||||
|
|
||||||
|
public function __construct($attribs,$controller){
|
||||||
|
parent::__construct($attribs,$controller);
|
||||||
|
|
||||||
|
$this->setTemplate('playlist');
|
||||||
|
$dataModel = $this->getDataModel();
|
||||||
|
$this->playlist = new stdclass;
|
||||||
|
$ids = array();
|
||||||
|
if(isset($attribs['videos'])&&trim($attribs['videos'])!=''){
|
||||||
|
$tmp = explode(',',$attribs['videos']);
|
||||||
|
foreach($tmp as $tm){
|
||||||
|
$id = trim($tm);
|
||||||
|
if($id!=''){
|
||||||
|
$ids[] = $id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if($attribs['id']){
|
||||||
|
$this->playlist = $dataModel->getPlaylistItems( $attribs['id'], $attribs['limit'], $attribs['pageToken']);
|
||||||
|
foreach($this->playlist->items as $item){
|
||||||
|
$ids[] = $item->snippet->resourceId->videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($attribs['except_videos'])&&trim($attribs['except_videos'])!=''){
|
||||||
|
$exIDs = explode(',',preg_replace('~\s~','',$attribs['except_videos']));
|
||||||
|
$diff = array_intersect($ids,$exIDs);
|
||||||
|
if(count($diff)){
|
||||||
|
$ids = array();
|
||||||
|
$this->playlist = $dataModel->getPlaylistItems( $attribs['id'], $attribs['limit']+count($diff), $attribs['pageToken']);
|
||||||
|
foreach($this->playlist->items as $item){
|
||||||
|
$ids[] = $item->snippet->resourceId->videoId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$filteredIDs = array();
|
||||||
|
foreach($ids as $id){
|
||||||
|
if(!in_array($id,$exIDs)){
|
||||||
|
$filteredIDs[] = $id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$ids = $filteredIDs;
|
||||||
|
unset($filteredIDs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
throw new Exception(JText::_('PLG_SYSTEM_YOUTUBER_NO_PLAYLIST_AND_VIDEO_ID'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->videos = $dataModel->getVideo($ids);
|
||||||
|
$this->orderVideos($this->videos,$attribs['order_by'],$attribs['order_dir']);
|
||||||
|
|
||||||
|
$attribs['rel'] = 'mxYouTubeR'.md5($attribs['id'].$attribs['theme']);
|
||||||
|
|
||||||
|
if($attribs['size']==''){
|
||||||
|
$attribs['size'] = 'medium';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->showTitle = strpos($attribs['display'],'title')!==false;
|
||||||
|
$this->showDate = strpos($attribs['display'],'date')!==false;
|
||||||
|
$this->showDescription = strpos($attribs['display'],'description')!==false;
|
||||||
|
$this->showMeta = strpos($attribs['display'],'meta')!==false;
|
||||||
|
|
||||||
|
$this->cfg = $attribs;
|
||||||
|
unset($this->cfg['pageToken']);
|
||||||
|
unset($this->cfg['infinite_scroll']);
|
||||||
|
|
||||||
|
$this->attribs = $attribs;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
42
deployed/youtuber/plugins/system/youtuber/views/video.php
Normal file
42
deployed/youtuber/plugins/system/youtuber/views/video.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined( '_JEXEC' ) or die;
|
||||||
|
require_once(dirname(__FILE__).'/base.php');
|
||||||
|
|
||||||
|
class mxYouTuberView_video extends mxYouTuberView_base{
|
||||||
|
|
||||||
|
public function __construct($attribs,$controller){
|
||||||
|
parent::__construct($attribs,$controller);
|
||||||
|
|
||||||
|
$this->setTemplate('video');
|
||||||
|
$dataModel = $this->getDataModel();
|
||||||
|
|
||||||
|
$this->video = $dataModel->getVideo( $attribs['id'] );
|
||||||
|
$this->channel = $dataModel->getChannel( $this->video->snippet->channelId );
|
||||||
|
|
||||||
|
if($attribs['size']==''){
|
||||||
|
$attribs['size'] = 'default';
|
||||||
|
if(isset($this->video->snippet->thumbnails->medium)) $attribs['size'] = 'medium';
|
||||||
|
else if(isset($this->video->snippet->thumbnails->maxres)) $attribs['size'] = 'maxres';
|
||||||
|
else if(isset($this->video->snippet->thumbnails->high)) $attribs['size'] = 'high';
|
||||||
|
else if(isset($this->video->snippet->thumbnails->standard)) $attribs['size'] = 'standard';
|
||||||
|
}
|
||||||
|
$this->showTitle = strpos($attribs['display'],'title')!==false;
|
||||||
|
$this->showChannel = strpos($attribs['display'],'channel')!==false;
|
||||||
|
$this->showDescription = strpos($attribs['display'],'description')!==false;
|
||||||
|
$this->showMeta = strpos($attribs['display'],'meta')!==false;
|
||||||
|
$this->showDate = strpos($attribs['display'],'date')!==false;
|
||||||
|
|
||||||
|
$attribs['rel'] = 'mxYouTubeR:'.md5($attribs['id'].$attribs['theme']);
|
||||||
|
|
||||||
|
$this->attribs = $attribs;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
252
deployed/youtuber/plugins/system/youtuber/youtuber.php
Normal file
252
deployed/youtuber/plugins/system/youtuber/youtuber.php
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package YouTubeR
|
||||||
|
* @license https://allforjoomla.ru/license
|
||||||
|
*
|
||||||
|
* Created by Oleg Micriucov for Joomla! 3.x
|
||||||
|
* https://allforjoomla.ru
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
defined( '_JEXEC' ) or die(':)');
|
||||||
|
|
||||||
|
class plgSystemYoutuber extends JPlugin{
|
||||||
|
|
||||||
|
protected $autoloadLanguage = true;
|
||||||
|
private static $scriptsLoaded = false;
|
||||||
|
|
||||||
|
public function onAfterInitialise(){
|
||||||
|
$app = JFactory::getApplication();
|
||||||
|
$input = $app->input;
|
||||||
|
$action = $input->get('action','');
|
||||||
|
if($action!='youtuber'){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
try{
|
||||||
|
$this->_loadLang();
|
||||||
|
JResponse::setHeader('Content-Type', 'application/json', true);
|
||||||
|
parse_str(urldecode($input->getString('params','')),$attribs);
|
||||||
|
$attribs = $this->shortcodeAttribs($attribs);
|
||||||
|
$attribs['pageToken'] = $input->getString('pageToken','');
|
||||||
|
|
||||||
|
$view = $this->getView($attribs);
|
||||||
|
|
||||||
|
$result = new stdclass;
|
||||||
|
$result->success = 1;
|
||||||
|
$result->pageToken = (isset($view->playlist->nextPageToken)?$view->playlist->nextPageToken:'');
|
||||||
|
$result->html = $view->render();
|
||||||
|
|
||||||
|
echo json_encode($result);
|
||||||
|
}
|
||||||
|
catch(Exception $e){
|
||||||
|
JResponse::setHeader('Content-Type', 'text/html', true);
|
||||||
|
echo '<p><strong>YouTubeR '.JText::_('PLG_SYSTEM_YOUTUBER_ERROR').':</strong> '.$e->getMessage().'</p>';
|
||||||
|
}
|
||||||
|
$app->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onAfterRender(){
|
||||||
|
$app = JFactory::getApplication();
|
||||||
|
if($app->isAdmin()) return;
|
||||||
|
$doc = JFactory::getDocument();
|
||||||
|
if($doc->getType()!='html') return;
|
||||||
|
$html = JResponse::getBody();
|
||||||
|
if(strpos($html,'[mx_youtuber')===false){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$html = preg_replace_callback('~\[(mx_youtube[^ ]+)([^\]]+)]~',array($this,'renderShortcode'),$html);
|
||||||
|
JResponse::setBody($html);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onBeforeCompileHead(){
|
||||||
|
$app = JFactory::getApplication();
|
||||||
|
$doc = JFactory::getDocument();
|
||||||
|
if($doc->getType()!='html') return;
|
||||||
|
$this->_loadLang();
|
||||||
|
$mediaURI = JURI::root().'media/plg_system_youtuber/';
|
||||||
|
JHtml::_('jquery.framework');
|
||||||
|
if(self::$scriptsLoaded){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$loadFancybox = (int)$this->params->get('load_fancybox', 1);
|
||||||
|
self::$scriptsLoaded = true;
|
||||||
|
if($app->isAdmin() && $this->params->get('googleOAuthKey')!=''){
|
||||||
|
JHtml::script($mediaURI.'assets/js/media-uploader.js',false,true);
|
||||||
|
JHtml::script($mediaURI.'assets/js/mxyoutube.js',false,true);
|
||||||
|
JHtml::script('https://apis.google.com/js/client.js',false,true);
|
||||||
|
JHtml::stylesheet($mediaURI.'assets/css/backend.css',array(),true);
|
||||||
|
$doc->addScriptDeclaration('
|
||||||
|
jQuery(document).ready(function(){
|
||||||
|
if(typeof mxYouTubeRBtnClick !="function"){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(window.wzYoutube==undefined){
|
||||||
|
alert("'.JText::_('PLG_SYSTEM_YOUTUBER_ACTIVATE_PLUGIN').'");
|
||||||
|
jQuery(".mxYouTuberBtn").attr("onclick","return false;").css("opacity","0.5");
|
||||||
|
}
|
||||||
|
if("'.$this->params->get('googleOAuthKey').'"==""){
|
||||||
|
alert("'.JText::_('PLG_SYSTEM_YOUTUBER_SET_OAUTH_ID').'");
|
||||||
|
jQuery(".mxYouTuberBtn").attr("onclick","return false;").css("opacity","0.5");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
window.wzYoutube.lang.authorize_account = "'.JText::_('PLG_SYSTEM_YOUTUBER_AUTHORIZE_YOUTUBE_ACCOUNT').'";
|
||||||
|
window.wzYoutube.lang.upload_video = "'.JText::_('PLG_SYSTEM_YOUTUBER_UPLOAD_VIDEO').'";
|
||||||
|
window.wzYoutube.lang.list_videos = "'.JText::_('PLG_SYSTEM_YOUTUBER_VIDEOS_LIST').'";
|
||||||
|
window.wzYoutube.lang.more_videos = "'.JText::_('PLG_SYSTEM_YOUTUBER_MORE_VIDEOS').'";
|
||||||
|
window.wzYoutube.lang.title = "'.JText::_('PLG_SYSTEM_YOUTUBER_TITLE').'";
|
||||||
|
window.wzYoutube.lang.video_title = "'.JText::_('PLG_SYSTEM_YOUTUBER_VIDEO_TITLE').'";
|
||||||
|
window.wzYoutube.lang.description = "'.JText::_('PLG_SYSTEM_YOUTUBER_DESCRIPTION').'";
|
||||||
|
|
||||||
|
window.wzYoutube.lang.tags = "'.JText::_('PLG_SYSTEM_YOUTUBER_TAGS').'";
|
||||||
|
window.wzYoutube.lang.video_tags = "'.JText::_('PLG_SYSTEM_YOUTUBER_TAGS_SEPARATED_BY_COMMA').'";
|
||||||
|
window.wzYoutube.lang.privacy_status = "'.JText::_('PLG_SYSTEM_YOUTUBER_PRIVACY_STATUS').'";
|
||||||
|
window.wzYoutube.lang.upload = "'.JText::_('PLG_SYSTEM_YOUTUBER_UPLOAD').'";
|
||||||
|
window.wzYoutube.lang.privacy_public = "'.JText::_('PLG_SYSTEM_YOUTUBER_PUBLIC').'";
|
||||||
|
window.wzYoutube.lang.privacy_ulnisted = "'.JText::_('PLG_SYSTEM_YOUTUBER_UNLISTED').'";
|
||||||
|
window.wzYoutube.lang.privacy_private = "'.JText::_('PLG_SYSTEM_YOUTUBER_PRIVATE').'";
|
||||||
|
window.wzYoutube.lang.enter_video_title = "'.JText::_('PLG_SYSTEM_YOUTUBER_PLEASE_ENTER_VIDEO_TITLE').'";
|
||||||
|
window.wzYoutube.lang.choose_video_file = "'.JText::_('PLG_SYSTEM_YOUTUBER_PLEASE_CHOOSE_VIDEO_FILE').'";
|
||||||
|
window.wzYoutube.appID = "'.$this->params->get('googleOAuthKey').'";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
');
|
||||||
|
}
|
||||||
|
else if(!$app->isAdmin()){
|
||||||
|
if($loadFancybox==1){
|
||||||
|
JHtml::script($mediaURI.'assets/fancybox/jquery.fancybox.min.js',false,true);
|
||||||
|
JHtml::stylesheet($mediaURI.'assets/fancybox/jquery.fancybox.min.css',array(),true);
|
||||||
|
}
|
||||||
|
if((int)$this->params->get('load_gfont', 1)){
|
||||||
|
JHtml::stylesheet('https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic&subset=latin,cyrillic');
|
||||||
|
}
|
||||||
|
JHtml::stylesheet($mediaURI.'assets/css/frontend.css',array(),true);
|
||||||
|
$doc->addScriptDeclaration('
|
||||||
|
window.mxYouTubeR = {ajax_url:"'.JURI::root().'",lang:{"more":"'.JText::_('PLG_SYSTEM_YOUTUBER_MORE').'","less":"'.JText::_('PLG_SYSTEM_YOUTUBER_LESS').'"}};
|
||||||
|
');
|
||||||
|
JHtml::script($mediaURI.'assets/js/frontend.js',false,true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getView($attribs){
|
||||||
|
$viewPath = JPATH_ROOT.'/plugins/system/youtuber/';
|
||||||
|
$viewName = 'mxYouTuberView_'.$attribs['type'];
|
||||||
|
$classFile = $viewPath.'views/'.$attribs['type'].'.php';
|
||||||
|
if(is_file($classFile)){
|
||||||
|
require_once($viewPath.'/data.php');
|
||||||
|
require_once($classFile);
|
||||||
|
$view = new $viewName($attribs,$this);
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
throw new Exception('Incorrect shortcode attribute type "'.$attribs['type'].'".');
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function shortcodeAttribs($rawAttribs){
|
||||||
|
$attribs = array();
|
||||||
|
if(is_array($rawAttribs)){
|
||||||
|
$attribs = $rawAttribs;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
preg_match_all('~([a-zA-Z0-9_\-]+)=\"(.*?)(?=\")\"~',$rawAttribs,$mchs);
|
||||||
|
foreach($mchs[1] as $k=>$v){
|
||||||
|
$attribs[$v] = $mchs[2][$k];
|
||||||
|
}
|
||||||
|
preg_match_all('~([a-zA-Z0-9_\-]+)="([^"]+)"~',$rawAttribs,$mchs);
|
||||||
|
foreach($mchs[1] as $k=>$v){
|
||||||
|
$attribs[$v] = $mchs[2][$k];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$defaults = array(
|
||||||
|
'type' => 'video',
|
||||||
|
'id' => '',
|
||||||
|
'videos' => '',
|
||||||
|
'display' => 'header,title,date,channel,description,meta,header,playlists',
|
||||||
|
'mode' => $this->params->get('mode'),
|
||||||
|
'theme' => $this->params->get('theme'),
|
||||||
|
'ytp_params' => '',
|
||||||
|
'size' => '',
|
||||||
|
'width' => '100%',
|
||||||
|
'height' => '300',
|
||||||
|
'cols' => ((isset($attribs['type'])&&$attribs['type']=='channel')?1:(int)$this->params->get('cols')),
|
||||||
|
'rows' => (int)$this->params->get('rows'),
|
||||||
|
'responsive_limit' => $this->params->get('responsive_limit'),
|
||||||
|
'max_words' => (int)$this->params->get('max_words'),
|
||||||
|
'infinite_scroll' => 'false',
|
||||||
|
'load_more' => 'true',
|
||||||
|
'load_more_text' => JText::_('PLG_SYSTEM_YOUTUBER_LOAD_MORE'),
|
||||||
|
'pageToken' => '',
|
||||||
|
'suggested_videos' => 'false',
|
||||||
|
'order_by' => $this->params->get('order_by','default'),
|
||||||
|
'order_dir' => $this->params->get('order_dir','asc'),
|
||||||
|
'playlist_id' => '',
|
||||||
|
'playlists' => '',
|
||||||
|
'user' => '',
|
||||||
|
'except_videos' => '',
|
||||||
|
'title' => '',
|
||||||
|
'description' => '',
|
||||||
|
);
|
||||||
|
$result = array_merge($defaults,$attribs);
|
||||||
|
$result['limit'] = (int)$result['cols']*(int)$result['rows'];
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function renderShortcode($matches){
|
||||||
|
$this->_loadLang();
|
||||||
|
$shortCode = $matches[1];
|
||||||
|
$attribs = $this->shortcodeAttribs($matches[2]);
|
||||||
|
if($shortCode=='mx_youtuber_video'){
|
||||||
|
$attribs['type'] = 'video';
|
||||||
|
}
|
||||||
|
else if($shortCode=='mx_youtuber_playlist'){
|
||||||
|
$attribs['type'] = 'playlist';
|
||||||
|
}
|
||||||
|
else if($shortCode=='mx_youtuber_channel'){
|
||||||
|
$attribs['type'] = 'channel';
|
||||||
|
}
|
||||||
|
try{
|
||||||
|
$view = $this->getView($attribs);
|
||||||
|
return $view->render();
|
||||||
|
}
|
||||||
|
catch( Exception $e){
|
||||||
|
if(JDEBUG || (int)$this->params->get('debug',0)==1){
|
||||||
|
return '<p><strong>YouTubeR '.JText::_('PLG_SYSTEM_YOUTUBER_ERROR').':</strong> '.$e->getMessage().'</p>';
|
||||||
|
}
|
||||||
|
else return '<p><strong>YouTubeR '.JText::_('PLG_SYSTEM_YOUTUBER_ERROR_NO_DEBUG').'</strong>.</p>';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onExtensionAfterSave($context, $table, $isNew=true){
|
||||||
|
if($context!='com_plugins.plugin' || !isset($table->type) || !isset($table->element) || $table->type!='plugin' || $table->element!='youtuber'){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$params = new JRegistry($table->params);
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->update('#__update_sites')
|
||||||
|
->set('extra_query='.$db->quote('purchase_code='.$params->get('purchase_code','')))
|
||||||
|
->where('name='.$db->quote('YouTubeR'));
|
||||||
|
$db->setQuery($query);
|
||||||
|
$db->execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTemplatePaths($theme=''){
|
||||||
|
$app = JFactory::getApplication();
|
||||||
|
$mainThemePath = JPATH_ROOT.'/templates/'.$app->getTemplate().'/html/plg_system_youtuber/';
|
||||||
|
$mediaPath = JPATH_ROOT.'/media/plg_system_youtuber/';
|
||||||
|
$theme = ($theme!=''?$theme:$this->params->get('theme'));
|
||||||
|
$paths = array();
|
||||||
|
$paths[] = $mainThemePath.$theme;
|
||||||
|
$paths[] = $mainThemePath.'default';
|
||||||
|
$paths[] = $mediaPath.'themes/'.$theme;
|
||||||
|
$paths[] = $mediaPath.'themes/default';
|
||||||
|
return $paths;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function _loadLang(){
|
||||||
|
$lang = JFactory::getLanguage();
|
||||||
|
$lang->load('plg_system_youtuber', JPATH_ADMINISTRATOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
78
deployed/youtuber/plugins/system/youtuber/youtuber.xml
Normal file
78
deployed/youtuber/plugins/system/youtuber/youtuber.xml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<extension version="3.1" type="plugin" group="system" method="upgrade">
|
||||||
|
<name>System - YouTubeR</name>
|
||||||
|
<author>Oleg Micriucov (ZyX)</author>
|
||||||
|
<creationDate>June 2016</creationDate>
|
||||||
|
<authorEmail>info@allforjoomla.com</authorEmail>
|
||||||
|
<authorUrl>https://allforjoomla.com</authorUrl>
|
||||||
|
<copyright>Copyright (c) 2017 Oleg Micriucov</copyright>
|
||||||
|
<license>https://allforjoomla.com/license</license>
|
||||||
|
<version>1.49</version>
|
||||||
|
<description>PLG_SYSTEM_YOUTUBER_DESCR</description>
|
||||||
|
<files>
|
||||||
|
<filename plugin="youtuber">youtuber.php</filename>
|
||||||
|
<filename>index.html</filename>
|
||||||
|
<filename>data.php</filename>
|
||||||
|
<folder>views</folder>
|
||||||
|
</files>
|
||||||
|
<media folder="media" destination="plg_system_youtuber">
|
||||||
|
<folder>assets</folder>
|
||||||
|
<folder>themes</folder>
|
||||||
|
</media>
|
||||||
|
<languages folder="languages">
|
||||||
|
<language tag="en-GB">en-GB.plg_system_youtuber.ini</language>
|
||||||
|
<language tag="en-GB">en-GB.plg_system_youtuber.sys.ini</language>
|
||||||
|
<language tag="hu-HU">hu-HU.plg_system_youtuber.ini</language>
|
||||||
|
<language tag="hu-HU">hu-HU.plg_system_youtuber.sys.ini</language>
|
||||||
|
</languages>
|
||||||
|
<config>
|
||||||
|
<fields name="params">
|
||||||
|
<fieldset name="basic">
|
||||||
|
<field name="purchase_code" type="text" default="" label="PLG_SYSTEM_YOUTUBER_PURCHASE_CODE_LABEL" description="PLG_SYSTEM_YOUTUBER_PURCHASE_CODE_DESCR" />
|
||||||
|
<field name="googleOAuthKey" type="text" default="" label="PLG_SYSTEM_YOUTUBER_GOAUTH_ID_LABEL" description="PLG_SYSTEM_YOUTUBER_GOAUTH_ID_DESCR" />
|
||||||
|
<field name="googleBrowserKey" type="text" default="" label="PLG_SYSTEM_YOUTUBER_BROWSER_KEY_LABEL" description="PLG_SYSTEM_YOUTUBER_BROWSER_KEY_DESCR" />
|
||||||
|
|
||||||
|
<field type="spacer" label="PLG_SYSTEM_YOUTUBER_SHORTCODE_ATTRIBS" />
|
||||||
|
|
||||||
|
<field name="theme" type="text" default="default" label="PLG_SYSTEM_YOUTUBER_THEME" description="PLG_SYSTEM_YOUTUBER_THEME_DESCR" />
|
||||||
|
<field name="mode" type="list" label="PLG_SYSTEM_YOUTUBER_MODE" default="lightbox">
|
||||||
|
<option value="lightbox">PLG_SYSTEM_YOUTUBER_LIGHTBOX</option>
|
||||||
|
<option value="embed">PLG_SYSTEM_YOUTUBER_EMBED</option>
|
||||||
|
<option value="link">PLG_SYSTEM_YOUTUBER_LINK</option>
|
||||||
|
</field>
|
||||||
|
<field name="cols" type="number" default="3" label="PLG_SYSTEM_YOUTUBER_PLAYLIST_COLS" />
|
||||||
|
<field name="rows" type="number" default="4" label="PLG_SYSTEM_YOUTUBER_PLAYLIST_ROWS" />
|
||||||
|
<field name="responsive_limit" type="list" default="sm" label="PLG_SYSTEM_YOUTUBER_COLS_LIMIT" description="PLG_SYSTEM_YOUTUBER_COLS_LIMIT_DESCR">
|
||||||
|
<option value="lg">PLG_SYSTEM_YOUTUBER_COLS_LIMIT_LG</option>
|
||||||
|
<option value="md">PLG_SYSTEM_YOUTUBER_COLS_LIMIT_MD</option>
|
||||||
|
<option value="sm">PLG_SYSTEM_YOUTUBER_COLS_LIMIT_SM</option>
|
||||||
|
<option value="xs">PLG_SYSTEM_YOUTUBER_COLS_LIMIT_XS</option>
|
||||||
|
</field>
|
||||||
|
<field name="max_words" type="number" default="20" label="PLG_SYSTEM_YOUTUBER_WORDS_LIMIT" description="PLG_SYSTEM_YOUTUBER_WORDS_LIMIT_DESCR" />
|
||||||
|
<field name="date_format" type="text" default="d.m.Y" label="PLG_SYSTEM_YOUTUBER_DATE_FORMAT" description="PLG_SYSTEM_YOUTUBER_DATE_FORMAT_DESCR" />
|
||||||
|
|
||||||
|
<field type="spacer" label="PLG_SYSTEM_YOUTUBER_ADV_CONFIG" />
|
||||||
|
|
||||||
|
<field name="load_gfont" type="list" label="PLG_SYSTEM_YOUTUBER_LOAD_GFONT" default="1" class="chzn-color-state">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
<field name="load_fancybox" type="list" label="PLG_SYSTEM_YOUTUBER_LOAD_FANCYBOX" default="1" class="chzn-color-state">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="caching" type="list" label="PLG_SYSTEM_YOUTUBER_CACHING" default="1" class="chzn-color-state">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
<field name="cache_lifetime" type="number" default="3600" label="PLG_SYSTEM_YOUTUBER_CACHE_LIFETIME" description="PLG_SYSTEM_YOUTUBER_CACHE_LIFETIME_DESCR" />
|
||||||
|
|
||||||
|
<field name="debug" type="list" label="PLG_SYSTEM_YOUTUBER_DEBUG" default="0" class="chzn-color-state">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
</fieldset>
|
||||||
|
</fields>
|
||||||
|
</config>
|
||||||
|
</extension>
|
||||||
Loading…
Reference in New Issue
Block a user