diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index dfe0770..0000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto diff --git a/README.md b/README.md deleted file mode 100644 index a527c90..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# Horriblesubs diff --git a/css/fansub-plugin-admin.css b/css/fansub-plugin-admin.css new file mode 100644 index 0000000..e69de29 diff --git a/css/fansub-plugin-admin.min.css b/css/fansub-plugin-admin.min.css new file mode 100644 index 0000000..e69de29 diff --git a/css/fansub-plugin.css b/css/fansub-plugin.css new file mode 100644 index 0000000..318b1e9 --- /dev/null +++ b/css/fansub-plugin.css @@ -0,0 +1,728 @@ +.fansub-new-release { + clear: both; + color: #333; + font-size: 16px; + line-height: 24px; + padding: 12px 0 0; +} + +.fansub-new-release > h2.box-title { + border-bottom: 1px solid #ccc; + color: #000; + font-size: 22px; + font-weight: 400; + line-height: 1.5em; + margin: 0 0 20px; +} + +.fansub-new-release .box-content a { + border: medium none; + text-decoration: none; +} + +.fansub-new-release .list-qualities > li > .quality, +.fansub-new-release a:link { + -webkit-transition: all 0.2s ease-in-out 0s; + -moz-transition: all 0.2s ease-in-out 0s; + -ms-transition: all 0.2s ease-in-out 0s; + -o-transition: all 0.2s ease-in-out 0s; + transition: all 0.2s ease-in-out 0s; +} + +.fansub-new-release .search-form { + font-weight: 700; + margin-bottom: 4px; + margin-top: -10px; + padding: 4px; + position: relative; +} + +.fansub-new-release .search-form .searchcontainer { + margin: 0 auto; + width: 230px; +} + +.fansub-new-release .search-form .search-field { + background-color: rgba(220, 220, 220, 0.7); + border: 0 solid #ccc; + font-family: Open Sans; + font-size: 14px !important; + height: 22px; + margin-bottom: 0 !important; + padding: 0 10px; + text-align: center; + width: 260px; +} + +.fansub-new-release .search-form .btn-refresh { + display: inline-block; + font-weight: 400; + position: absolute; + right: 0; + top: 6px; +} + +.fansub-new-release .search-form .btn-refresh a { + cursor: pointer; +} + +.fansub-new-release .search-form .btn-refresh a:hover { + color: #777; +} + +.entry-content .fansub-new-release ul, +.fansub-new-release ul { + list-style: outside none none; + margin: 0; + padding: 0; +} + +.fansub-new-release ul.list-releases > li:after, +.fansub-new-release ul.list-releases > li:before, +.fansub-new-release ul:before, +.fansub-new-release ul:after { + clear: both; + content: " "; + display: table; +} + +.fansub-new-release ul li { + box-shadow: none; + float: left; + margin: 0; + padding: 2px 0; +} + +.fansub-new-release .list-releases > li { + display: block; + float: none; + margin: 0; + padding: 0; + position: relative; +} + +.fansub-new-release .list-servers { + display: none; +} + +.fansub-new-release .list-cols .col-date { + margin-right: 5px; +} + +.fansub-new-release .list-cols .col-date, +.fansub-new-release .list-cols .suffix { + color: #707070; +} + +.fansub-new-release .list-cols .col-title { + +} + +.fansub-new-release .list-cols .col-download { + float: right; +} + +.fansub-new-release .list-cols .post-title-link { + border-bottom: 1px dotted #000; +} + +.fansub-new-release .list-releases > li .list-servers > li a:hover, +.fansub-new-release .list-qualities > li > .quality.has-link:hover, +.fansub-new-release .list-cols .post-title-link:hover { + background-color: #aaa; + color: #fff; +} + +.fansub-new-release .list-qualities > li { + margin-left: 5px; + padding: 0 2px; +} + +.fansub-new-release .list-qualities > li > .quality.has-link { + cursor: pointer; +} + +.fansub-new-release .morebox { + font-weight: 700; + margin-bottom: 4px; + margin-top: 4px; + padding: 4px; + text-align: center; +} + +.fansub-new-release .morebox:hover { + background-color: #fee; +} + +.fansub-new-release .morebox:hover a { + color: #333; +} + +.fansub-new-release .list-qualities .quality-item .list-servers { + position: absolute; + right: 0; + text-align: right; + top: 100%; + width: 100%; + z-index: 499; +} + +.fansub-new-release .list-qualities .quality-item .list-servers > li { + clear: none; + display: inline-block; + float: none; + padding: 0 2px; +} + +.fansub-new-release .list-qualities .quality-item .list-servers > li.file-name { + color: #333; + float: left; + padding-left: 0; +} + +.fansub-new-release .list-qualities .quality-item .list-servers > li span { + padding: 0 2px; +} + +.fansub-new-release .list-releases > li.active { + margin-bottom: 25px; +} + +.fansub-new-release .list-releases > li .list-servers > li { + color: #ddd; +} + +.fansub-new-release .list-qualities .quality-item .quality { + color: #ddd; +} + +.fansub-new-release .list-qualities .quality-item .quality.has-link { + color: #333; +} + +.fansub-new-release a { + color: #333; +} + +.fansub-new-release .series-image img { + float: left; + margin-bottom: 12px; + margin-right: 24px; +} + +.fansub-new-release.single-box h2 { + border-bottom: 1px solid #ccc; + font-size: 25px; + font-weight: 400; +} + +.fansub-new-release.single-box .tips { + background-color: rgba(220, 220, 220, 0.7); + display: block; + margin-bottom: 10px; + padding: 5px 10px; +} + +.fansub-new-release .noselect { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.fansub-new-release .series-info { + overflow: hidden; +} + +.fansub-new-release .comments-area li { + float: none; +} + +.fansub-new-release .comments-area li .children { + margin-left: 50px; + margin-top: 20px; +} + +.fansub-new-release .comments-area li .avatar { + vertical-align: top; +} + +.fansub-new-release .comments-area li p { + margin-bottom: 10px; +} + +.fansub-new-release .comments-area li p:last-of-type { + margin-bottom: 0; +} + +.fansub-new-release .comments-area li .comment-body { + border-bottom: 1px solid #ddd; + padding-bottom: 10px; +} + +.fansub-new-release.anime-list > h2 { + margin-bottom: 10px; + margin-top: 0; +} + +.fansub-new-release.anime-list .pagination { + margin: 10px 0; + text-align: center; +} + +.fansub-new-release.anime-list .pagination .item { + color: #3d3d3d; + font-size: 18px; + margin: 0 2px; + padding: 2px 10px; + text-decoration: none; +} + +.fansub-new-release.anime-list .pagination .item.link-item:hover, +.fansub-new-release.anime-list .pagination .item.current-item { + background-color: #0075c1; + border-radius: 3px; + color: #fff; +} + +.fansub-new-release .list-animes .fansub-post { + border-bottom: 2px solid #e2e2e2; + float: none; + overflow: hidden; + padding: 0; +} + +.fansub-new-release .list-animes .fansub-post .entry-summary { + margin-left: 0; +} + +.fansub-new-release .list-animes .fansub-post:last-child { + border-bottom: medium none; +} + +.fansub-new-release .list-animes .fansub-post .anime-thumb { + float: left; + height: 196px; + margin-right: 20px; + position: relative; + width: 140px; +} + +.fansub-new-release .list-animes .fansub-post .wp-post-image { + border-radius: 0; + box-shadow: none; + height: 32px; + width: 32px; +} + +.fansub-new-release .anime-thumb .wp-post-image.lazyload { + height: 32px; + left: 50%; + margin: -16px 0 0 -16px; + position: absolute; + top: 50%; + width: 32px; +} + +.fansub-new-release .list-animes .fansub-post .anime-thumb .wp-post-image.lazyloaded { + height: 100%; + width: 100%; +} + +.fansub-new-release .list-animes .fansub-post .anime-thumb { + background: rgba(0, 0, 0, 0) url("../images/loading.gif") no-repeat scroll center center; +} + +.fansub-new-release .list-animes .fansub-post .entry-title { + clear: none; + font-size: 21px; + margin-bottom: 5px; + margin-top: 0; +} + +.fansub-new-release .list-animes .fansub-post .entry-title a { + color: #333; + text-decoration: none; +} + +.fansub-new-release .list-animes .fansub-post .entry-title a:hover { + text-decoration: underline; +} + +.fansub-new-release .list-animes .fansub-post .entry-summary { + color: #666; + font-size: 14px; +} + +.fansub-new-release .list-animes .fansub-post .entry-summary p:last-child { + margin-bottom: 0; +} + +.fansub-new-release .list-animes .fansub-post .more-link { + display: none; +} + +.fansub-new-release.advanced-search .search-form { + margin: 0 auto; + max-width: 768px; + min-width: 400px; + overflow: hidden; + width: 80%; +} + +.fansub-new-release.advanced-search .search-form .search-submit { + background: rgba(0, 0, 0, 0) url("../images/icon-search.png") no-repeat scroll center center / 32px auto; + border-radius: 0 8px 8px 0; + border-width: 1px 1px 1px 0; + float: left; + height: 48px; + min-width: 70px; + text-indent: -9999px; + width: 10%; +} + +.fansub-new-release.advanced-search .search-form label { + display: inline-block; + float: left; + width: 80%; +} + +.fansub-new-release.advanced-search .search-form .search-field { + background: rgba(0, 0, 0, 0) none repeat scroll 0 0; + border: 1px solid #ddd; + border-radius: 8px 0 0 8px; + color: #323232; + height: 48px; + text-align: left; + width: 100%; +} + +.fansub-new-release.advanced-search .search-form .search-field { + box-sizing: border-box; + height: 48px; +} + +.fansub-new-release.advanced-search .search-form .search-submit { + padding-bottom: 10px; + padding-top: 10px; +} + +.fansub-new-release.advanced-search .search-form .search-field:hover, +.fansub-new-release.advanced-search .search-form .search-submit:hover { + border-color: #ddd; +} + +.fansub-new-release.advanced-search .search-form .search-submit:hover { + background-color: #eee; +} + +.ui-widget-content { + background-color: #ffffff; + border: 1px solid #bebebe !important; + border-radius: 0 0 6px 6px; + box-shadow: 0 10px 15px 5px rgba(0, 0, 0, 0.2); + display: none; + left: 0; + position: absolute; + top: 25px; + width: 277px; + z-index: 100; +} + +.ui-widget-content .ui-menu-item { + background-color: #ffffff; + border-bottom: 1px solid #ebebeb; + overflow: hidden; + padding: 2px !important; + text-align: left; +} + +.ui-widget-content .ui-menu-item.ui-sate-focus, +.ui-widget-content .ui-menu-item.focus, +.ui-widget-content .ui-menu-item:hover { + background-color: #e1e7f5; + background-image: none !important; +} + +.ui-widget-content .ui-menu-item .list a > span { + display: none; + float: left; + margin-right: 5px; +} + +.ui-widget-content .ui-menu-item .list a > span.thumb { + display: inline-block; +} + +.ui-widget-content .ui-menu-item:hover .list a > span.thumb { + display: none; +} + +.ui-widget-content .ui-menu-item:hover .list a > span.image { + display: inline-block; +} + +.ui-widget-content .ui-menu-item .list a > span.thumb img { + height: 50px; + width: 70px; +} + +.ui-widget-content .ui-menu-item .list a > span.image img { + height: 90px; + width: 70px; +} + +.ui-widget-content .ui-menu-item .list a { + line-height: 22px; + text-decoration: none; +} + +.ui-widget-content .ui-menu-item:last-child { + padding-bottom: 0 !important; +} + +.fansub-new-release.advanced-search .module-body .search-results { + margin-top: 10px; +} + +.fansub-new-release.advanced-search .module-body .search-results > h4 { + border-bottom: 1px solid #bebebe; + margin: 0 0 10px; +} + +.fansub-new-release.single-box .video-box .fansub-post { + border: medium none; + display: inline-block; + height: 146px; + margin-bottom: 8px; + margin-right: 8px; + padding: 0; + position: relative; + vertical-align: top; + width: 260px; +} + +.fansub-new-release.single-box .video-box .fansub-post .post-thumbnail { + display: block; + position: relative; +} + +.fansub-new-release.single-box .video-box .fansub-post .wp-post-image { + border-radius: 0; + box-shadow: none; + height: 146px; + width: 260px; +} + +.fansub-new-release.single-box .video-box .fansub-post .entry-title { + background-color: rgba(0, 0, 0, 0.5); + bottom: 0; + font-size: 13px; + left: 0; + margin: 0 !important; + padding: 5px; + position: absolute; + right: 0; +} + +.fansub-new-release.single-box .video-box .fansub-post .entry-title a { + color: #fff; + text-decoration: none; +} + +.fansub-new-release.single-box .video-box .fansub-post .icon-play { + border-radius: 8px; + height: 38px; + left: 50%; + margin-left: -45px; + margin-top: -19px; + position: absolute; + top: 50%; + width: 90px; + z-index: 399; +} + +.fansub-new-release.single-box .video-box .fansub-post:hover { + opacity: 0.7; +} + +.fansub-new-release.single-box .video-box .fansub-post { + -webkit-transition: all 0.3s ease-in-out; + -moz-transition: all 0.3s ease-in-out; + -ms-transition: all 0.3s ease-in-out; + -o-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; +} + +.fancybox-inner .wp-video .wp-video-shortcode, +.fancybox-inner .wp-video { + height: 480px !important; + margin: 0 auto; + width: 100% !important; +} + +.fancybox-inner .wp-video .mejs-controls { + width: 100% !important; +} + +.fancybox-inner iframe, +.fancybox-inner .wp-video .wp-video-shortcode { + background-color: #000; +} + +.fancybox-inner iframe { + height: 60%; + width: 100%; +} + +.fansub-new-release.fansub-single .series-releases .video-box .bx-controls .bx-pager { + display: none; +} + +.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper { + margin-bottom: 10px; +} + +.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper .bx-viewport { + box-shadow: none; +} + +.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper .bx-viewport .module-body { +} + +.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper .bx-controls .bx-controls-direction a { + background-image: url("../images/btn-slider-control.png"); + background-position: 0 0; + background-repeat: no-repeat; + background-size: 80px auto; + cursor: pointer; + display: inline-block; + height: 80px; + margin-top: -40px; + opacity: 0; + overflow: hidden; + position: absolute; + top: 50%; + transition-duration: 0.3s; + transition-property: all; + transition-timing-function: ease-in-out; + width: 40px; + z-index: 10; +} + +.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper .bx-controls .bx-controls-direction a.bx-prev { + background-position: -40px 0; + left: -40px; + opacity: 0; +} + +.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper .bx-controls .bx-controls-direction a.bx-next { + background-position: 0 0; + opacity: 0; + right: -40px; +} + +.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper:hover .bx-controls .bx-controls-direction a.bx-prev { + left: 0; + opacity: 1; +} + +.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper:hover .bx-controls .bx-controls-direction a.bx-next { + opacity: 1; + right: 0; +} + +.fancybox-wrap .video-js, +.fancybox-wrap p video, +.video-box .video-js, +.video-box video { + height: 100%; + width: 100%; +} + +.fancybox-inner > div > div:not(.center), .fancybox-inner > div > div > .jwplayer { + height: 480px !important; + margin: 0 !important; + width: 100% !important; +} + +.fancybox-inner > div > div > .jwplayer.jw-flag-fullscreen .jw-stretch-uniform, +.fancybox-inner > div > div > .jwplayer.jw-flag-fullscreen { + height: 100% !important; +} + +@media only screen and (max-width: 640px) { + +} + +@media only screen and (max-width: 620px) { + .fansub-new-release .list-cols > li { + display: inline-block; + float: none; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .fansub-new-release .list-cols > li:nth-child(2) { + max-width: 50%; + } + + .fansub-new-release .list-qualities .quality-item .list-servers > li.file-name { + display: none; + } +} + +@media only screen and (max-width: 600px) { + +} + +@media only screen and (max-width: 568px) { + +} + +@media only screen and (max-width: 563px) { + +} + +@media only screen and (max-width: 549px) { + +} + +@media only screen and (max-width: 534px) { + +} + +@media only screen and (max-width: 480px) { + .fansub-new-release .list-qualities > li { + padding: 0; + } + + .fansub-new-release .list-cols > li:nth-child(2) { + max-width: 35%; + } +} + +@media only screen and (max-width: 360px) { + .fansub-new-release .list-cols .col-date { + display: none; + } + + .fansub-new-release .list-cols > li:nth-child(2) { + max-width: 45%; + } +} + +@media only screen and (max-width: 338px) { + +} + +@media only screen and (max-width: 330px) { + +} + +@media only screen and (max-width: 320px) { + +} \ No newline at end of file diff --git a/css/fansub-plugin.min.css b/css/fansub-plugin.min.css new file mode 100644 index 0000000..49aaac8 --- /dev/null +++ b/css/fansub-plugin.min.css @@ -0,0 +1 @@ +.fansub-new-release .list-qualities>li>.quality.has-link,.fansub-new-release .search-form .btn-refresh a{cursor:pointer}.fansub-new-release{clear:both;color:#333;font-size:16px;line-height:24px;padding:12px 0 0}.fansub-new-release>h2.box-title{border-bottom:1px solid #ccc;color:#000;font-size:22px;font-weight:400;line-height:1.5em;margin:0 0 20px}.fansub-new-release .box-content a{border:none;text-decoration:none}.fansub-new-release .list-qualities>li>.quality,.fansub-new-release a:link{-webkit-transition:all .2s ease-in-out 0s;-moz-transition:all .2s ease-in-out 0s;-ms-transition:all .2s ease-in-out 0s;-o-transition:all .2s ease-in-out 0s;transition:all .2s ease-in-out 0s}.fansub-new-release .search-form{font-weight:700;margin-bottom:4px;margin-top:-10px;padding:4px;position:relative}.fansub-new-release .search-form .searchcontainer{margin:0 auto;width:230px}.fansub-new-release .search-form .search-field{background-color:rgba(220,220,220,.7);border:0 solid #ccc;font-family:Open Sans;font-size:14px!important;height:22px;margin-bottom:0!important;padding:0 10px;text-align:center;width:260px}.fansub-new-release .search-form .btn-refresh{display:inline-block;font-weight:400;position:absolute;right:0;top:6px}.fansub-new-release .search-form .btn-refresh a:hover{color:#777}.entry-content .fansub-new-release ul,.fansub-new-release ul{list-style:none;margin:0;padding:0}.fansub-new-release ul.list-releases>li:after,.fansub-new-release ul.list-releases>li:before,.fansub-new-release ul:after,.fansub-new-release ul:before{clear:both;content:" ";display:table}.fansub-new-release ul li{box-shadow:none;float:left;margin:0;padding:2px 0}.fansub-new-release .list-releases>li{display:block;float:none;margin:0;padding:0;position:relative}.fansub-new-release .list-servers{display:none}.fansub-new-release .list-cols .col-date{margin-right:5px}.fansub-new-release .list-cols .col-date,.fansub-new-release .list-cols .suffix{color:#707070}.fansub-new-release .list-cols .col-download{float:right}.fansub-new-release .list-cols .post-title-link{border-bottom:1px dotted #000}.fansub-new-release .list-cols .post-title-link:hover,.fansub-new-release .list-qualities>li>.quality.has-link:hover,.fansub-new-release .list-releases>li .list-servers>li a:hover{background-color:#aaa;color:#fff}.fansub-new-release .list-qualities>li{margin-left:5px;padding:0 2px}.fansub-new-release .morebox{font-weight:700;margin-bottom:4px;margin-top:4px;padding:4px;text-align:center}.fansub-new-release .morebox:hover{background-color:#fee}.fansub-new-release .morebox:hover a{color:#333}.fansub-new-release .list-qualities .quality-item .list-servers{position:absolute;right:0;text-align:right;top:100%;width:100%;z-index:499}.fansub-new-release .list-qualities .quality-item .list-servers>li{clear:none;display:inline-block;float:none;padding:0 2px}.fansub-new-release .list-qualities .quality-item .list-servers>li.file-name{color:#333;float:left;padding-left:0}.fansub-new-release .list-qualities .quality-item .list-servers>li span{padding:0 2px}.fansub-new-release .list-releases>li.active{margin-bottom:25px}.fansub-new-release .list-qualities .quality-item .quality,.fansub-new-release .list-releases>li .list-servers>li{color:#ddd}.fansub-new-release .list-qualities .quality-item .quality.has-link,.fansub-new-release a{color:#333}.fansub-new-release .series-image img{float:left;margin-bottom:12px;margin-right:24px}.fansub-new-release.single-box h2{border-bottom:1px solid #ccc;font-size:25px;font-weight:400}.fansub-new-release.single-box .tips{background-color:rgba(220,220,220,.7);display:block;margin-bottom:10px;padding:5px 10px}.fansub-new-release .noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fansub-new-release .series-info{overflow:hidden}.fansub-new-release .comments-area li{float:none}.fansub-new-release .comments-area li .children{margin-left:50px;margin-top:20px}.fansub-new-release .comments-area li .avatar{vertical-align:top}.fansub-new-release .comments-area li p{margin-bottom:10px}.fansub-new-release .comments-area li p:last-of-type{margin-bottom:0}.fansub-new-release .comments-area li .comment-body{border-bottom:1px solid #ddd;padding-bottom:10px}.fansub-new-release.anime-list>h2{margin-bottom:10px;margin-top:0}.fansub-new-release.anime-list .pagination{margin:10px 0;text-align:center}.fansub-new-release.anime-list .pagination .item{color:#3d3d3d;font-size:18px;margin:0 2px;padding:2px 10px;text-decoration:none}.fansub-new-release.anime-list .pagination .item.current-item,.fansub-new-release.anime-list .pagination .item.link-item:hover{background-color:#0075c1;border-radius:3px;color:#fff}.fansub-new-release .list-animes .fansub-post{border-bottom:2px solid #e2e2e2;float:none;overflow:hidden;padding:0}.fansub-new-release .list-animes .fansub-post .entry-summary{margin-left:0}.fansub-new-release .list-animes .fansub-post:last-child{border-bottom:medium none}.fansub-new-release .list-animes .fansub-post .anime-thumb{float:left;height:196px;margin-right:20px;position:relative;width:140px;background:url(../images/loading.gif) center center no-repeat rgba(0,0,0,0)}.fansub-new-release .list-animes .fansub-post .wp-post-image{border-radius:0;box-shadow:none;height:32px;width:32px}.fansub-new-release .anime-thumb .wp-post-image.lazyload{height:32px;left:50%;margin:-16px 0 0 -16px;position:absolute;top:50%;width:32px}.fansub-new-release .list-animes .fansub-post .anime-thumb .wp-post-image.lazyloaded{height:100%;width:100%}.fansub-new-release .list-animes .fansub-post .entry-title{clear:none;font-size:21px;margin-bottom:5px;margin-top:0}.fansub-new-release .list-animes .fansub-post .entry-title a{color:#333;text-decoration:none}.fansub-new-release .list-animes .fansub-post .entry-title a:hover{text-decoration:underline}.fansub-new-release .list-animes .fansub-post .entry-summary{color:#666;font-size:14px}.fansub-new-release .list-animes .fansub-post .entry-summary p:last-child{margin-bottom:0}.fansub-new-release .list-animes .fansub-post .more-link{display:none}.fansub-new-release.advanced-search .search-form{margin:0 auto;max-width:768px;min-width:400px;overflow:hidden;width:80%}.fansub-new-release.advanced-search .search-form .search-submit{background:url(../images/icon-search.png) center center/32px auto no-repeat rgba(0,0,0,0);border-radius:0 8px 8px 0;border-width:1px 1px 1px 0;float:left;height:48px;min-width:70px;text-indent:-9999px;width:10%;padding-bottom:10px;padding-top:10px}.fansub-new-release.advanced-search .search-form label{display:inline-block;float:left;width:80%}.fansub-new-release.advanced-search .search-form .search-field{background:rgba(0,0,0,0);border:1px solid #ddd;border-radius:8px 0 0 8px;color:#323232;text-align:left;width:100%;box-sizing:border-box;height:48px}.fansub-new-release.advanced-search .search-form .search-field:hover,.fansub-new-release.advanced-search .search-form .search-submit:hover{border-color:#ddd}.fansub-new-release.advanced-search .search-form .search-submit:hover{background-color:#eee}.ui-widget-content{background-color:#fff;border:1px solid #bebebe!important;border-radius:0 0 6px 6px;box-shadow:0 10px 15px 5px rgba(0,0,0,.2);display:none;left:0;position:absolute;top:25px;width:277px;z-index:100}.ui-widget-content .ui-menu-item{background-color:#fff;border-bottom:1px solid #ebebeb;overflow:hidden;padding:2px!important;text-align:left}.ui-widget-content .ui-menu-item.focus,.ui-widget-content .ui-menu-item.ui-sate-focus,.ui-widget-content .ui-menu-item:hover{background-color:#e1e7f5;background-image:none!important}.ui-widget-content .ui-menu-item .list a>span{display:none;float:left;margin-right:5px}.ui-widget-content .ui-menu-item .list a>span.thumb{display:inline-block}.ui-widget-content .ui-menu-item:hover .list a>span.thumb{display:none}.ui-widget-content .ui-menu-item:hover .list a>span.image{display:inline-block}.ui-widget-content .ui-menu-item .list a>span.thumb img{height:50px;width:70px}.ui-widget-content .ui-menu-item .list a>span.image img{height:90px;width:70px}.ui-widget-content .ui-menu-item .list a{line-height:22px;text-decoration:none}.ui-widget-content .ui-menu-item:last-child{padding-bottom:0!important}.fansub-new-release.advanced-search .module-body .search-results{margin-top:10px}.fansub-new-release.advanced-search .module-body .search-results>h4{border-bottom:1px solid #bebebe;margin:0 0 10px}.fansub-new-release.single-box .video-box .fansub-post{border:none;display:inline-block;height:146px;margin-bottom:8px;margin-right:8px;padding:0;position:relative;vertical-align:top;width:260px;-webkit-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.fansub-new-release.single-box .video-box .fansub-post .post-thumbnail{display:block;position:relative}.fansub-new-release.single-box .video-box .fansub-post .wp-post-image{border-radius:0;box-shadow:none;height:146px;width:260px}.fansub-new-release.single-box .video-box .fansub-post .entry-title{background-color:rgba(0,0,0,.5);bottom:0;font-size:13px;left:0;margin:0!important;padding:5px;position:absolute;right:0}.fansub-new-release.single-box .video-box .fansub-post .entry-title a{color:#fff;text-decoration:none}.fansub-new-release.single-box .video-box .fansub-post .icon-play{border-radius:8px;height:38px;left:50%;margin-left:-45px;margin-top:-19px;position:absolute;top:50%;width:90px;z-index:399}.fansub-new-release.single-box .video-box .fansub-post:hover{opacity:.7}.fancybox-inner .wp-video,.fancybox-inner .wp-video .wp-video-shortcode{height:480px!important;margin:0 auto;width:100%!important}.fancybox-inner .wp-video .mejs-controls{width:100%!important}.fancybox-inner .wp-video .wp-video-shortcode,.fancybox-inner iframe{background-color:#000}.fancybox-inner iframe{height:60%;width:100%}.fansub-new-release.fansub-single .series-releases .video-box .bx-controls .bx-pager{display:none}.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper{margin-bottom:10px}.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper .bx-viewport{box-shadow:none}.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper .bx-controls .bx-controls-direction a{background-image:url(../images/btn-slider-control.png);background-position:0 0;background-repeat:no-repeat;background-size:80px auto;cursor:pointer;display:inline-block;height:80px;margin-top:-40px;opacity:0;overflow:hidden;position:absolute;top:50%;transition-duration:.3s;transition-property:all;transition-timing-function:ease-in-out;width:40px;z-index:10}.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper .bx-controls .bx-controls-direction a.bx-prev{background-position:-40px 0;left:-40px;opacity:0}.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper .bx-controls .bx-controls-direction a.bx-next{background-position:0 0;opacity:0;right:-40px}.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper:hover .bx-controls .bx-controls-direction a.bx-prev{left:0;opacity:1}.fansub-new-release.fansub-single .series-releases .video-box .bx-wrapper:hover .bx-controls .bx-controls-direction a.bx-next{opacity:1;right:0}.fancybox-wrap .video-js,.fancybox-wrap p video,.video-box .video-js,.video-box video{height:100%;width:100%}.fancybox-inner>div>div:not(.center),.fancybox-inner>div>div>.jwplayer{height:480px!important;margin:0!important;width:100%!important}.fancybox-inner>div>div>.jwplayer.jw-flag-fullscreen,.fancybox-inner>div>div>.jwplayer.jw-flag-fullscreen .jw-stretch-uniform{height:100%!important}@media only screen and (max-width:620px){.fansub-new-release .list-cols>li{display:inline-block;float:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fansub-new-release .list-cols>li:nth-child(2){max-width:50%}.fansub-new-release .list-qualities .quality-item .list-servers>li.file-name{display:none}}@media only screen and (max-width:480px){.fansub-new-release .list-qualities>li{padding:0}.fansub-new-release .list-cols>li:nth-child(2){max-width:35%}}@media only screen and (max-width:360px){.fansub-new-release .list-cols .col-date{display:none}.fansub-new-release .list-cols>li:nth-child(2){max-width:45%}} \ No newline at end of file diff --git a/css/index.php b/css/index.php new file mode 100644 index 0000000..cf879a5 --- /dev/null +++ b/css/index.php @@ -0,0 +1,2 @@ +set_parent_slug('hocwp_plugin_option'); + $option->set_use_style_and_script(true); + $option->set_use_media_upload(true); + + $options = $option->get(); + + $option->add_field(array('id' => 'test_upload', 'title' => 'Test upload', 'field_callback' => 'hocwp_field_media_upload')); + $option->add_field(array('id' => 'single_page', 'title' => 'Single Page', 'default' => $defaults['single_page'], 'field_callback' => 'hocwp_field_select_page')); + $option->add_field(array('id' => 'posts_per_page', 'title' => 'Post Number', 'default' => $defaults['posts_per_page'], 'field_callback' => 'hocwp_field_input_number')); + $option->add_field(array('id' => 'date_format', 'title' => 'Date Format', 'default' => $defaults['date_format'])); + $option->add_field(array('id' => 'loading_text', 'title' => 'Loading Text', 'default' => $defaults['loading_text'])); + $option->add_field(array('id' => 'search_none_text', 'title' => 'No Result Text', 'default' => $defaults['search_none_text'])); + $option->add_field(array('id' => 'show_more_text', 'title' => 'Show More Text', 'default' => $defaults['show_more_text'])); + $option->add_field(array('id' => 'reached_end_text', 'title' => 'Reached End Text', 'default' => $defaults['reached_end_text'])); + $option->add_field(array('id' => 'clear_text', 'title' => 'Clear Text', 'default' => $defaults['clear_text'])); + $option->add_field(array('id' => 'refresh_text', 'title' => 'Refresh Text', 'default' => $defaults['refresh_text'])); + $option->add_field(array('id' => 'qualities', 'title' => 'Qualities', 'default' => $defaults['qualities'], 'description' => 'Separate qualities with commas.')); + $option->add_field(array('id' => 'servers', 'title' => 'Servers', 'default' => $defaults['servers'], 'description' => 'Separate servers with commas.')); + + $option->add_section(array('id' => 'post_type', 'title' => 'Post Type', 'description' => 'Post type informations, if all fields are empty, the default post type will be used.')); + $option->add_field(array('id' => 'post_type_name', 'title' => 'Name', 'default' => $defaults['post_type_name'], 'section' => 'post_type')); + $option->add_field(array('id' => 'post_type_label_name', 'title' => 'Label Name', 'default' => $defaults['post_type_label_name'], 'section' => 'post_type')); + $option->add_field(array('id' => 'post_type_label_singular_name', 'title' => 'Label Singular Name', 'default' => $defaults['post_type_label_singular_name'], 'section' => 'post_type')); + + $option->add_section(array('id' => 'release_box', 'title' => 'Release Box', 'description' => 'All settings for release box.')); + $option->add_field(array('id' => 'release_box_title', 'title' => 'Title', 'default' => $defaults['release_box_title'], 'section' => 'release_box')); + $option->add_field(array('id' => 'release_box_search_placeholder', 'title' => 'Search Placeholder', 'default' => $defaults['release_box_search_placeholder'], 'section' => 'release_box')); + + $option->add_section(array('id' => 'single_box', 'title' => 'Single Box', 'description' => 'All settings for post box on single page.')); + $option->add_field(array('id' => 'single_batch_title', 'title' => 'Batch Title', 'default' => $defaults['single_batch_title'], 'section' => 'single_box')); + $option->add_field(array('id' => 'single_batch_tip', 'title' => 'Batch Tips', 'default' => $defaults['single_batch_tip'], 'section' => 'single_box')); + $option->add_field(array('id' => 'single_batch_none', 'title' => 'No Batch Text', 'default' => $defaults['single_batch_none'], 'section' => 'single_box')); + $option->add_field(array('id' => 'single_search_placeholder', 'title' => 'Search Placeholder', 'default' => $defaults['single_search_placeholder'], 'section' => 'single_box')); + $option->add_field(array('id' => 'single_episode_none', 'title' => 'No Episode Text', 'default' => $defaults['single_episode_none'], 'section' => 'single_box')); + + $option->add_section(array('id' => 'facebook', 'title' => 'Facebook', 'description' => 'Provide your information to connect with Facebook.')); + + $post_type = isset($options['fb_post_type']) ? $options['fb_post_type'] : ''; + $post_type = hocwp_json_string_to_array($post_type); + if (!hocwp_array_has_value($post_type)) { + $post_type = array(); + } + $lists = get_post_types(array('_builtin' => false, 'public' => true), 'objects'); + + if (!array_key_exists('post', $lists)) { + $lists[] = get_post_type_object('post'); + } + //$lists[] = get_post_type_object('episode'); + //$lists[] = get_post_type_object('batch'); + $all_option = ''; + foreach ($lists as $lvalue) { + $selected = ''; + foreach ($post_type as $ptvalue) { + $ptype = isset($ptvalue['value']) ? $ptvalue['value'] : ''; + if ($lvalue->name == $ptype) { + $selected = $lvalue->name; + break; + } + } + $args = array( + 'value' => $lvalue->name, + 'text' => $lvalue->labels->singular_name, + 'selected' => $selected + ); + $all_option .= hocwp_field_get_option($args); + } + $args = array( + 'id' => 'fb_post_type', + 'name' => 'fb_post_type', + 'all_option' => $all_option, + 'value' => $post_type, + 'title' => 'Post type', + 'placeholder' => 'Choose post types', + 'multiple' => true, + 'field_callback' => 'hocwp_field_select_chosen', + 'section' => 'facebook' + ); + $option->add_field($args); + + $option->add_field(array('id' => 'fb_app_id', 'title' => 'App ID', 'section' => 'facebook')); + $option->add_field(array('id' => 'fb_app_secret', 'title' => 'App Secret', 'section' => 'facebook')); + $option->add_field(array('id' => 'fb_redirect_uri', 'title' => 'Redirect Uri', 'section' => 'facebook')); + $option->add_field(array('id' => 'fb_access_token', 'title' => 'Access Token', 'section' => 'facebook')); + + $option->add_option_tab($hocwp_pos_tabs); + $option->set_page_header_callback('hocwp_plugin_option_page_header'); + $option->set_page_footer_callback('hocwp_plugin_option_page_footer'); + $option->set_page_sidebar_callback('hocwp_plugin_option_page_sidebar'); + $option->init(); + + hocwp_option_add_object_to_list($option); +} + +add_action('init', 'hocwp_ph_admin_option'); \ No newline at end of file diff --git a/custom/fansub-plugin-ajax.php b/custom/fansub-plugin-ajax.php new file mode 100644 index 0000000..01a5da2 --- /dev/null +++ b/custom/fansub-plugin-ajax.php @@ -0,0 +1,485 @@ + fansub_kntl_get_post_type(), + 's' => $term, + 'posts_per_page' => 10 + ); + $query = fansub_query($args); + $defaults = fansub_kntl_get_option_defaults(); + $option_data = fansub_kntl_get_option(); + $option_data = wp_parse_args($option_data, $defaults); + $single_page = fansub_get_value_by_key($option_data, 'single_page'); + while ($query->have_posts()) { + $query->the_post(); + $thumbnail_url = fansub_get_post_thumbnail_url(); + $image_url = bfi_thumb($thumbnail_url, array('width' => 70, 'height' => 90, 'crop' => true)); + $thumb_url = bfi_thumb($thumbnail_url, array('width' => 70, 'height' => 50, 'crop' => true)); + $permalink = fansub_kntl_build_single_url($single_page, get_the_ID()); + ob_start(); + ?> +
+ + + + +
+ +
+
+
+ get_the_title(), + 'link' => get_permalink(), + 'html' => $post_html + ); + $suggestions[] = $suggestion; + } + wp_reset_postdata(); + if ($query->have_posts()) { + $suggestion = array( + 'label' => 'View more', + 'link' => get_search_link($term) + ); + $suggestions[] = $suggestion; + } + echo json_encode($suggestions); + exit; +} + +add_action('wp_ajax_fansub_search_autocomplete', 'fansub_search_autocomplete_ajax_callback'); +add_action('wp_ajax_nopriv_fansub_search_autocomplete', 'fansub_search_autocomplete_ajax_callback'); + +function fansub_kntl_video_list_ajax_callback() +{ + $post_id = isset($_POST['post_id']) ? $_POST['post_id'] : 0; + $jwplayer = isset($_POST['jwplayer']) ? $_POST['jwplayer'] : false; + $result = array( + 'have_posts' => false, + 'has_data' => false + ); + $html_data = ''; + if (!(bool)$jwplayer) { + $video = fansub_query_post_by_meta('animation', $post_id, array('post_type' => 'video', 'posts_per_page' => -1), 'numeric'); + $result['have_posts'] = $video->have_posts(); + while ($video->have_posts()) { + $video->the_post(); + $id = get_the_ID(); + $fancy_id = 'videoBox' . $id; + $jwplayer_video_url = get_post_meta($id, '_jwppp-video-url-1', true); + ob_start(); + $article = '