Version Description
- Optimization of cache use.
- Fixed Playlists order option and added the options allowed by YouTube api 3: Date Order, Rating Order, Relevance Order, Title Order, View Count Order.
- Fixed thumbail link in pages with multiple instances of the plugin.
- Added pagination of thumbnails. Take into account YouTube API does not correctly calculate the total number of videos in channels with a lot of videos.
- Added new video feed types: user's favorites and user's likes.
- JavaScript optimization.
- Link optimization.
- Error message optimization.
- Rows optimization: solution for column numbers that are not multiples between them.
- Added support for grids of 5, 7, 8, 9, 10 and 11.
- Improved interface of widget.
- id in top of styles.css for bigger precedence.
- Redesign system of aligned thumbnails to right or left with a relative thumbnail size to make it responsive and selection of minimum size of alignment.
- Added field and shortcode attribute thumbnail_alignment_width.
- Added field and shortcode attribute thumbnail_alignment_device.
- Control of private videos.
Download this release
Release Info
Developer | javitxu123 |
Plugin | Youtube Channel Gallery |
Version | 2.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.2
- admin-scripts.js +79 -23
- admin-styles.css +1 -1
- img/private.png +0 -0
- languages/youtube-channel-gallery-es_ES.mo +0 -0
- languages/youtube-channel-gallery-es_ES.po +259 -160
- readme.txt +93 -41
- scripts.js +80 -57
- styles.css +1 -1
- templates/admin_tabs.php +240 -155
- templates/search.php +2 -2
- templates/thumb.php +4 -1
- templates/thumbs.php +88 -33
- youtube-channel-gallery.php +248 -74
admin-scripts.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
jQuery(document).ready(function($) {
|
2 |
|
3 |
$(document).ajaxSuccess(function(e, xhr, settings) {
|
4 |
|
@@ -7,7 +7,7 @@ jQuery(document).ready(function($) {
|
|
7 |
$widget = $(e.currentTarget.activeElement).parents('.widget');
|
8 |
ytchg_ActivateChosen();
|
9 |
ytchg_init_tabs();
|
10 |
-
|
11 |
|
12 |
}
|
13 |
|
@@ -24,7 +24,8 @@ jQuery(document).ready(function($) {
|
|
24 |
show_title_description( $(this) );
|
25 |
changeFeedType( $(this) );
|
26 |
changeplayerType( $(this) );
|
27 |
-
|
|
|
28 |
});
|
29 |
}
|
30 |
|
@@ -34,7 +35,7 @@ jQuery(document).ready(function($) {
|
|
34 |
|
35 |
|
36 |
function ytchg_init_tabs() {
|
37 |
-
// hide content but first
|
38 |
$('.ytchgtabs-tabs li:first-child').addClass('active');
|
39 |
$('.ytchgtabs .ytchgtabs-content:not(:first-of-type)').hide();
|
40 |
}
|
@@ -61,6 +62,13 @@ jQuery(document).ready(function($) {
|
|
61 |
return false;
|
62 |
}
|
63 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
//feed
|
66 |
var feedSelect = '.tabs-1 select[id*="ytchag_feed"]';
|
@@ -105,7 +113,7 @@ jQuery(document).ready(function($) {
|
|
105 |
function click_title_description( tit_desc_link ) {
|
106 |
$tit_desc_link = $(tit_desc_link);
|
107 |
$parentWidget = $tit_desc_link.parents('.widget');
|
108 |
-
|
109 |
if(!$('fieldset.ytchg-field-tit-desc', $parentWidget).hasClass('active')){
|
110 |
$('.ytchg-title-and-description', $parentWidget).slideDown('fast',function(){
|
111 |
$('.ytchg-field-tit-desc', $parentWidget).addClass('ytchg-fieldborder active');
|
@@ -120,16 +128,16 @@ jQuery(document).ready(function($) {
|
|
120 |
|
121 |
//checkboxes with associated content
|
122 |
//---------------
|
123 |
-
|
124 |
function show_title_description ( widget ) {
|
125 |
$widget = $(widget);
|
126 |
-
$
|
127 |
|
128 |
-
if( $('.ytchg-tit', $
|
129 |
-
$('.ytchg-title-and-description', $
|
130 |
-
$('fieldset.ytchg-field-tit-desc', $
|
131 |
} else{
|
132 |
-
$('.ytchg-title-and-description', $
|
133 |
}
|
134 |
}
|
135 |
|
@@ -144,28 +152,52 @@ jQuery(document).ready(function($) {
|
|
144 |
var userLabel = 'label[for*="ytchag_user"]';
|
145 |
var feedOrder = 'p[class*="ytchag_feed_order"]';
|
146 |
|
147 |
-
|
|
|
148 |
$('.feed_user_id_label', $widget).show();
|
149 |
$('.feed_playlist_id_label', $widget).hide();
|
150 |
-
$(feedOrder, $widget).slideUp('fast');
|
151 |
}
|
152 |
-
|
153 |
$('.feed_playlist_id_label', $widget).show();
|
154 |
$('.feed_user_id_label', $widget).hide();
|
|
|
|
|
|
|
|
|
155 |
$(feedOrder, $widget).slideDown('fast');
|
156 |
}
|
|
|
|
|
|
|
157 |
}
|
158 |
|
159 |
|
160 |
//Feed label title
|
161 |
//---------------
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
function changeplayerType ( widget ) {
|
164 |
$widget = $(widget);
|
165 |
|
166 |
var playerSelect = '.tabs-2 select[id*="ytchag_player"]';
|
167 |
var player_options = '.tabs-2 .player_options';
|
168 |
-
var thumb_window = '.tabs-
|
169 |
|
170 |
if($(playerSelect + ' option:selected', $widget).val() === '0'){
|
171 |
$(thumb_window, $widget).show();
|
@@ -175,16 +207,33 @@ jQuery(document).ready(function($) {
|
|
175 |
$(thumb_window, $widget).hide();
|
176 |
$(player_options, $widget).slideDown('fast');
|
177 |
}
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
|
180 |
-
$('.ytchgtabs[id^="tabs-youtubechannelgallery_widget-"]:not([id*="__i__"])').each(function() {
|
181 |
|
182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
|
184 |
-
|
|
|
|
|
185 |
|
186 |
var campos = this.value.split('#'),
|
187 |
-
$select = $
|
188 |
restrict = '',
|
189 |
options = '';
|
190 |
|
@@ -194,18 +243,25 @@ jQuery(document).ready(function($) {
|
|
194 |
var tag = c.toLocaleLowerCase().replace(/ /g, '_');
|
195 |
|
196 |
if (c !== '') {
|
197 |
-
restrict += (restrict ? ',' : '') + '
|
198 |
options += '<option value="' + tag + '">' + c + '</option>';
|
199 |
}
|
200 |
});
|
201 |
|
202 |
-
$
|
203 |
$select.find('option:gt(0)').remove();
|
204 |
$select.append(options);
|
205 |
|
206 |
return true;
|
207 |
});
|
208 |
-
});
|
209 |
-
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
});
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
|
3 |
$(document).ajaxSuccess(function(e, xhr, settings) {
|
4 |
|
7 |
$widget = $(e.currentTarget.activeElement).parents('.widget');
|
8 |
ytchg_ActivateChosen();
|
9 |
ytchg_init_tabs();
|
10 |
+
|
11 |
|
12 |
}
|
13 |
|
24 |
show_title_description( $(this) );
|
25 |
changeFeedType( $(this) );
|
26 |
changeplayerType( $(this) );
|
27 |
+
changeAlignThumb( $(this) );
|
28 |
+
//searchTab( $(this) );
|
29 |
});
|
30 |
}
|
31 |
|
35 |
|
36 |
|
37 |
function ytchg_init_tabs() {
|
38 |
+
// hide content but first
|
39 |
$('.ytchgtabs-tabs li:first-child').addClass('active');
|
40 |
$('.ytchgtabs .ytchgtabs-content:not(:first-of-type)').hide();
|
41 |
}
|
62 |
return false;
|
63 |
}
|
64 |
);
|
65 |
+
var alignSelect = '.ytchg-field-tit-desc select[id*="ytchag_thumbnail_alignment"]';
|
66 |
+
$(alignSelect, $widget).change(
|
67 |
+
function (event) {
|
68 |
+
$align_change = event.currentTarget;
|
69 |
+
$current_widget = $(event.currentTarget).parents('.widget');
|
70 |
+
changeAlignThumb ($current_widget);
|
71 |
+
});
|
72 |
|
73 |
//feed
|
74 |
var feedSelect = '.tabs-1 select[id*="ytchag_feed"]';
|
113 |
function click_title_description( tit_desc_link ) {
|
114 |
$tit_desc_link = $(tit_desc_link);
|
115 |
$parentWidget = $tit_desc_link.parents('.widget');
|
116 |
+
|
117 |
if(!$('fieldset.ytchg-field-tit-desc', $parentWidget).hasClass('active')){
|
118 |
$('.ytchg-title-and-description', $parentWidget).slideDown('fast',function(){
|
119 |
$('.ytchg-field-tit-desc', $parentWidget).addClass('ytchg-fieldborder active');
|
128 |
|
129 |
//checkboxes with associated content
|
130 |
//---------------
|
131 |
+
|
132 |
function show_title_description ( widget ) {
|
133 |
$widget = $(widget);
|
134 |
+
$tabs = $('.tabs-4', $widget);
|
135 |
|
136 |
+
if( $('.ytchg-tit', $tabs).is(':checked') || $('.ytchg-desc', $tabs).is(':checked')){
|
137 |
+
$('.ytchg-title-and-description', $tabs).show();
|
138 |
+
$('fieldset.ytchg-field-tit-desc', $tabs).addClass('ytchg-fieldborder active');
|
139 |
} else{
|
140 |
+
$('.ytchg-title-and-description', $tabs).hide();
|
141 |
}
|
142 |
}
|
143 |
|
152 |
var userLabel = 'label[for*="ytchag_user"]';
|
153 |
var feedOrder = 'p[class*="ytchag_feed_order"]';
|
154 |
|
155 |
+
// user / playlist label
|
156 |
+
if(['user', 'favorites', 'likes'].indexOf($(feedSelect + ' option:selected', $widget).val()) !== -1){
|
157 |
$('.feed_user_id_label', $widget).show();
|
158 |
$('.feed_playlist_id_label', $widget).hide();
|
|
|
159 |
}
|
160 |
+
else if(['playlist'].indexOf($(feedSelect + ' option:selected', $widget).val()) !== -1){
|
161 |
$('.feed_playlist_id_label', $widget).show();
|
162 |
$('.feed_user_id_label', $widget).hide();
|
163 |
+
}
|
164 |
+
|
165 |
+
// order
|
166 |
+
if(['user'].indexOf($(feedSelect + ' option:selected', $widget).val()) !== -1){
|
167 |
$(feedOrder, $widget).slideDown('fast');
|
168 |
}
|
169 |
+
else{
|
170 |
+
$(feedOrder, $widget).slideUp('fast');
|
171 |
+
}
|
172 |
}
|
173 |
|
174 |
|
175 |
//Feed label title
|
176 |
//---------------
|
177 |
|
178 |
+
function changeAlignThumb ( widget ) {
|
179 |
+
$widget = $(widget);
|
180 |
+
|
181 |
+
var alignmentSelect = 'select[id*="ytchag_thumbnail_alignment"]';
|
182 |
+
var align_options = '.align-options';
|
183 |
+
|
184 |
+
if($(alignmentSelect + ' option:selected', $widget).val() === 'none'){
|
185 |
+
$(align_options, $widget).slideUp('fast');
|
186 |
+
} else{
|
187 |
+
$(align_options, $widget).slideDown('fast');
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
|
192 |
+
//Player type
|
193 |
+
//---------------
|
194 |
+
|
195 |
function changeplayerType ( widget ) {
|
196 |
$widget = $(widget);
|
197 |
|
198 |
var playerSelect = '.tabs-2 select[id*="ytchag_player"]';
|
199 |
var player_options = '.tabs-2 .player_options';
|
200 |
+
var thumb_window = '.tabs-4 .thumb_window';
|
201 |
|
202 |
if($(playerSelect + ' option:selected', $widget).val() === '0'){
|
203 |
$(thumb_window, $widget).show();
|
207 |
$(thumb_window, $widget).hide();
|
208 |
$(player_options, $widget).slideDown('fast');
|
209 |
}
|
210 |
+
if($(playerSelect + ' option:selected', $widget).val() === '2'){
|
211 |
+
$(thumb_window, $widget).hide();
|
212 |
+
$(player_options, $widget).slideUp('fast');
|
213 |
+
}
|
214 |
}
|
215 |
|
|
|
216 |
|
217 |
+
//Search tab
|
218 |
+
//---------------
|
219 |
+
|
220 |
+
function searchTab(widget) {
|
221 |
+
|
222 |
+
this.llamada = this.llamada || {};
|
223 |
+
|
224 |
+
if (this.llamada[widget[0].id]) {
|
225 |
+
return;
|
226 |
+
}
|
227 |
+
else {
|
228 |
+
this.llamada[widget[0].id] = 1;
|
229 |
+
}
|
230 |
|
231 |
+
$widget = $(widget);
|
232 |
+
|
233 |
+
$widget.on('keyup', '[id$="ytchag_search_playlists"]', function(e) {
|
234 |
|
235 |
var campos = this.value.split('#'),
|
236 |
+
$select = $widget.find('[id$="ytchag_search_restrict"]'),
|
237 |
restrict = '',
|
238 |
options = '';
|
239 |
|
243 |
var tag = c.toLocaleLowerCase().replace(/ /g, '_');
|
244 |
|
245 |
if (c !== '') {
|
246 |
+
restrict += (restrict ? ',' : '') + 'restrict_' + tag;
|
247 |
options += '<option value="' + tag + '">' + c + '</option>';
|
248 |
}
|
249 |
});
|
250 |
|
251 |
+
$widget.find('.restrict').html(restrict);
|
252 |
$select.find('option:gt(0)').remove();
|
253 |
$select.append(options);
|
254 |
|
255 |
return true;
|
256 |
});
|
|
|
|
|
257 |
|
258 |
+
$widget.on('change', '[id$="ytchag_feed"]', function(e) {
|
259 |
+
if ($(this).val() === 'user') {
|
260 |
+
$widget.find('.ytchgtabs-tabs > li:eq(2)').show();
|
261 |
+
}
|
262 |
+
else {
|
263 |
+
$widget.find('.ytchgtabs-tabs > li:eq(2)').hide();
|
264 |
+
}
|
265 |
+
});
|
266 |
+
}
|
267 |
});
|
admin-styles.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.ytchgtabs *{box-sizing:border-box}.ytchgtabs :before,.ytchgtabs :after{box-sizing:border-box}.ytchgtabs .clearfix:before,.ytchgtabs .clearfix:after{content:
|
1 |
+
.ytchg{margin-bottom:13px}.ytchgtabs *{-webkit-box-sizing:border-box;box-sizing:border-box}.ytchgtabs :before,.ytchgtabs :after{-webkit-box-sizing:border-box;box-sizing:border-box}.ytchgtabs .clearfix:before,.ytchgtabs .clearfix:after{content:'';display:table}.ytchgtabs .clearfix:after{clear:both}.ytchgtabs .clearfix{zoom:1}.ytchgtabs ul{margin:0;padding:0}.ytchgtabs li{display:inline-block;margin:1px .2em 0 0;padding:0;list-style:none;white-space:nowrap;position:relative;background:#f3f3f3;border:1px solid #dfdfdf;border-bottom:none;border-radius:5px 5px 0 0}.ytchgtabs li.active{margin-bottom:-1px;padding-bottom:1px;background:#fafafa}.ytchgtabs .ytchgtabs-tabs a{padding:5px;display:inline-block;text-decoration:none;outline:0}.ytchgtabs .ytchgtabs-tabs a:focus{-webkit-box-shadow:none;box-shadow:none}.ytchgtabs .ytchg-tit-desc a:focus{-webkit-box-shadow:none;box-shadow:none}.ytchgtabs input,.ytchgtabs select{margin:3px 1px 1px}.ytchgtabs select{vertical-align:baseline}.ytchgtabs div.ytchgtabs-content{border:1px solid #dfdfdf;padding:15px 12px;background:#fafafa}.ytchgtabs .ytchgtabs-content p:last-child{margin-bottom:0}.ytchgtabs .feed_playlist_id_label{display:none}.ytchgtabs .ytchg-field-tit-desc{margin:13px 0}.ytchgtabs div.ytchg-title-and-description{border:none;background:0 0;display:none}.ytchgtabs fieldset{border:1px solid transparent;border-radius:5px}.ytchgtabs fieldset.ytchg-fieldborder{border-color:#dfdfdf}.ytchgtabs .align-options{display:none}.ytchgtabs .ytchag_info{background:#D7D7D7;border-radius:20px;font-size:11px;width:15px;height:15px;line-height:14px;display:inline-block;text-align:center;cursor:pointer;position:relative;vertical-align:text-top;margin-top:1px}.ytchgtabs .wideinfo{width:100%;margin-right:-25px;padding-right:25px}.ytchgtabs select+.ytchag_info{margin-left:-12px}.ytchgtabs .player_options{width:100%}.ytchgtabs .row{margin:13px -15px}.ytchgtabs .flex{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}.ytchgtabs .clearfix:before,.ytchgtabs .clearfix:after,.ytchgtabs .row:before,.ytchgtabs .row:after{content:' ';display:table}.ytchgtabs .clearfix:after,.ytchgtabs .row:after{clear:both}.ytchgtabs .col-md-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px;width:100%;float:left}.ytchgtabs .col-md-6{position:relative;min-height:1px;padding-left:15px;padding-right:15px;width:50%;float:left}.ytchgtabs .text-right{text-align:right}.ytchgtabs .thumbs-cols .col-md-6{width:auto}.ytchgtabs .no-w{width:auto}.ytchgtabs .table{display:table}.ytchgtabs .table .table-row{display:table-row}.ytchgtabs .table .table-row>div{display:table-cell}.ytchgtabs .table .table-row>div label{margin-right:5px}
|
img/private.png
ADDED
Binary file
|
languages/youtube-channel-gallery-es_ES.mo
CHANGED
Binary file
|
languages/youtube-channel-gallery-es_ES.po
CHANGED
@@ -7,8 +7,8 @@ msgid ""
|
|
7 |
msgstr ""
|
8 |
"Project-Id-Version: youtube-channel-gallery\n"
|
9 |
"Report-Msgid-Bugs-To: \n"
|
10 |
-
"POT-Creation-Date: 2015-06-
|
11 |
-
"PO-Revision-Date: 2015-06-
|
12 |
"Last-Translator: Javier <javierpose@gmail.com>\n"
|
13 |
"Language-Team: PoseLab <javierpose@gmail.com>\n"
|
14 |
"Language: es_ES\n"
|
@@ -22,7 +22,7 @@ msgstr ""
|
|
22 |
"X-Poedit-SourceCharset: utf-8\n"
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
|
25 |
-
#: templates/admin_tabs.php:3 templates/admin_tabs.php:
|
26 |
msgid "Title:"
|
27 |
msgstr "Título:"
|
28 |
|
@@ -36,7 +36,7 @@ msgstr "Reproductor"
|
|
36 |
|
37 |
#: templates/admin_tabs.php:11
|
38 |
msgid "Search"
|
39 |
-
msgstr "
|
40 |
|
41 |
#: templates/admin_tabs.php:12
|
42 |
msgid "Thumbnails"
|
@@ -52,7 +52,7 @@ msgstr "YouTube API Key:"
|
|
52 |
|
53 |
#: templates/admin_tabs.php:28
|
54 |
msgid "Get your own YouTube API Key and put here."
|
55 |
-
msgstr "
|
56 |
|
57 |
#: templates/admin_tabs.php:32
|
58 |
msgid "Video feed type:"
|
@@ -62,35 +62,59 @@ msgstr "Tipo de feed de vídeo:"
|
|
62 |
msgid "Uploaded by a user"
|
63 |
msgstr "Subidos por el usuario"
|
64 |
|
|
|
|
|
|
|
|
|
65 |
#: templates/admin_tabs.php:36
|
|
|
|
|
|
|
|
|
66 |
msgid "Playlist"
|
67 |
msgstr "Lista de reproducción"
|
68 |
|
69 |
-
#: templates/admin_tabs.php:
|
70 |
msgid "YouTube user id:"
|
71 |
msgstr "Id de usuario de Youtube:"
|
72 |
|
73 |
-
#: templates/admin_tabs.php:
|
74 |
msgid "YouTube playlist id:"
|
75 |
msgstr "Id de lista de reproducción de YouTube:"
|
76 |
|
77 |
-
#: templates/admin_tabs.php:
|
78 |
msgid "Playlist order:"
|
79 |
msgstr "Orden de lista de reproducción:"
|
80 |
|
81 |
-
#: templates/admin_tabs.php:50
|
82 |
-
msgid "Ascending Order"
|
83 |
-
msgstr "Ascendente"
|
84 |
-
|
85 |
#: templates/admin_tabs.php:51
|
86 |
-
msgid "
|
87 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
#: templates/admin_tabs.php:56
|
|
|
|
|
|
|
|
|
90 |
msgid "Cache time (hours):"
|
91 |
msgstr "Tiempo de cache (horas):"
|
92 |
|
93 |
-
#: templates/admin_tabs.php:
|
94 |
msgid ""
|
95 |
"Hours that RSS data is saved in database, to not make a request every time "
|
96 |
"the page is displayed. Assign this value according to how often you upgrade "
|
@@ -100,11 +124,11 @@ msgstr ""
|
|
100 |
"solicitud cada vez que se muestra la página. Asigna este valor en función de "
|
101 |
"la frecuencia con que actualizas la lista de reproducción en YouTube."
|
102 |
|
103 |
-
#: templates/admin_tabs.php:
|
104 |
msgid "Activate cache"
|
105 |
msgstr "Activar caché"
|
106 |
|
107 |
-
#: templates/admin_tabs.php:
|
108 |
msgid ""
|
109 |
"If you disable this field the cache will be deleted and will not be used. "
|
110 |
"This is useful to refresh immediately the YouTube RSS used by the plugin. "
|
@@ -116,103 +140,103 @@ msgstr ""
|
|
116 |
"Vuelve a habilitar la caché cuando la galería muestre los cambios que ha "
|
117 |
"realizado en su cuenta de YouTube."
|
118 |
|
119 |
-
#: templates/admin_tabs.php:
|
120 |
msgid "Player:"
|
121 |
msgstr "Reproductor:"
|
122 |
|
123 |
-
#: templates/admin_tabs.php:
|
124 |
msgid "Without player"
|
125 |
msgstr "Sin reproductor"
|
126 |
|
127 |
-
#: templates/admin_tabs.php:
|
128 |
-
msgid "show player
|
129 |
-
msgstr "
|
130 |
|
131 |
-
#: templates/admin_tabs.php:
|
132 |
msgid "show player in Magnific Popup"
|
133 |
-
msgstr "
|
134 |
|
135 |
-
#: templates/admin_tabs.php:
|
136 |
msgid "Width:"
|
137 |
msgstr "Ancho:"
|
138 |
|
139 |
-
#: templates/admin_tabs.php:
|
140 |
msgid "%"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: templates/admin_tabs.php:
|
144 |
msgid "px"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: templates/admin_tabs.php:
|
148 |
msgid "Aspect ratio:"
|
149 |
msgstr "Relación de aspecto:"
|
150 |
|
151 |
-
#: templates/admin_tabs.php:
|
152 |
msgid "Standard (4x3)"
|
153 |
msgstr "Estándar (4x3)"
|
154 |
|
155 |
-
#: templates/admin_tabs.php:
|
156 |
msgid "Widescreen (16x9)"
|
157 |
msgstr "Panorámico (16x9)"
|
158 |
|
159 |
-
#: templates/admin_tabs.php:
|
160 |
msgid "Theme:"
|
161 |
msgstr "Tema:"
|
162 |
|
163 |
-
#: templates/admin_tabs.php:
|
164 |
msgid "Dark"
|
165 |
msgstr "Oscuro"
|
166 |
|
167 |
-
#: templates/admin_tabs.php:
|
168 |
msgid "Light"
|
169 |
msgstr "Claro"
|
170 |
|
171 |
-
#: templates/admin_tabs.php:
|
172 |
msgid "Progress bar color:"
|
173 |
msgstr "Color de barra de progreso:"
|
174 |
|
175 |
-
#: templates/admin_tabs.php:
|
176 |
msgid "Red"
|
177 |
msgstr "Rojo"
|
178 |
|
179 |
-
#: templates/admin_tabs.php:
|
180 |
msgid "White"
|
181 |
msgstr "Blanco"
|
182 |
|
183 |
-
#: templates/admin_tabs.php:
|
184 |
msgid "Video quality:"
|
185 |
msgstr "Calidad del vídeo:"
|
186 |
|
187 |
-
#: templates/admin_tabs.php:
|
188 |
msgid "default"
|
189 |
msgstr "por defecto"
|
190 |
|
191 |
-
#: templates/admin_tabs.php:
|
192 |
msgid "highres"
|
193 |
msgstr "alta resolución"
|
194 |
|
195 |
-
#: templates/admin_tabs.php:
|
196 |
msgid "hd1080"
|
197 |
msgstr "hd1080"
|
198 |
|
199 |
-
#: templates/admin_tabs.php:
|
200 |
msgid "hd720"
|
201 |
msgstr "hd720"
|
202 |
|
203 |
-
#: templates/admin_tabs.php:
|
204 |
msgid "large"
|
205 |
msgstr "largo"
|
206 |
|
207 |
-
#: templates/admin_tabs.php:
|
208 |
msgid "medium"
|
209 |
msgstr "mediano"
|
210 |
|
211 |
-
#: templates/admin_tabs.php:
|
212 |
msgid "small"
|
213 |
msgstr "pequeño"
|
214 |
|
215 |
-
#: templates/admin_tabs.php:
|
216 |
msgid ""
|
217 |
"Default value enables YouTube to select the most appropriate playback "
|
218 |
"quality. If you select a quality level that is not available for the video, "
|
@@ -223,15 +247,15 @@ msgstr ""
|
|
223 |
"disponible para el vídeo, la calidad se ajustará al siguiente nivel más bajo "
|
224 |
"que este disponible."
|
225 |
|
226 |
-
#: templates/admin_tabs.php:
|
227 |
msgid "Autoplay"
|
228 |
msgstr "Autoplay"
|
229 |
|
230 |
-
#: templates/admin_tabs.php:
|
231 |
msgid "Show YouTube logo"
|
232 |
msgstr "Mostrar el logotipo de YouTube"
|
233 |
|
234 |
-
#: templates/admin_tabs.php:
|
235 |
msgid ""
|
236 |
"Activate this field to show the YouTube logo in the control bar. Setting the "
|
237 |
"color parameter to white will show the YouTube logo in the control bar."
|
@@ -240,22 +264,22 @@ msgstr ""
|
|
240 |
"Un ajuste del parámetro de color a blanco mostrará el logotipo de YouTube en "
|
241 |
"la barra de control."
|
242 |
|
243 |
-
#: templates/admin_tabs.php:
|
244 |
msgid "Show related videos"
|
245 |
msgstr "Mostrar los vídeos relacionados"
|
246 |
|
247 |
-
#: templates/admin_tabs.php:
|
248 |
msgid ""
|
249 |
"Activate this field to show related videos when playback of the video ends."
|
250 |
msgstr ""
|
251 |
"Activa este campo para mostrar videos relacionados cuando termine la "
|
252 |
"reproducción del vídeo."
|
253 |
|
254 |
-
#: templates/admin_tabs.php:
|
255 |
msgid "Show info"
|
256 |
msgstr "Mostrar información"
|
257 |
|
258 |
-
#: templates/admin_tabs.php:
|
259 |
msgid ""
|
260 |
"Activate this field to display information like the video title and uploader "
|
261 |
"before the video starts playing."
|
@@ -263,166 +287,208 @@ msgstr ""
|
|
263 |
"Active este campo para mostrar información como el título del vídeo y nombre "
|
264 |
"de usuario antes de que el vídeo comience a reproducirse."
|
265 |
|
266 |
-
#: templates/admin_tabs.php:
|
267 |
-
#: templates/admin_tabs.php:
|
268 |
-
#: templates/admin_tabs.php:
|
269 |
msgid "Order:"
|
270 |
msgstr "Orden:"
|
271 |
|
272 |
-
#: templates/admin_tabs.php:
|
273 |
msgid "Search input text:"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: templates/admin_tabs.php:
|
277 |
msgid "Restrict search to (# separated):"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: templates/admin_tabs.php:
|
281 |
msgid "You must assing this tags to your videos to restrict the search:"
|
282 |
msgstr ""
|
283 |
|
284 |
-
#: templates/admin_tabs.php:
|
285 |
msgid "Restrict search by default: It will overwrite results of feed tab)"
|
286 |
msgstr ""
|
287 |
|
288 |
-
#: templates/admin_tabs.php:
|
289 |
-
|
290 |
-
|
|
|
291 |
|
292 |
-
#: templates/admin_tabs.php:
|
293 |
msgid "Show search box"
|
294 |
-
msgstr ""
|
295 |
|
296 |
-
#: templates/admin_tabs.php:
|
297 |
msgid "Show select with Playlists"
|
298 |
-
msgstr ""
|
299 |
|
300 |
-
#: templates/admin_tabs.php:
|
301 |
msgid "Number of videos to show:"
|
302 |
-
msgstr "
|
303 |
|
304 |
-
#: templates/admin_tabs.php:
|
305 |
-
msgid ""
|
306 |
-
"
|
307 |
-
"a future release."
|
308 |
-
msgstr ""
|
309 |
-
"El plugin puede mostrar un máximo de 50 vídeos. Esta limitación cambiará en "
|
310 |
-
"una futura versión."
|
311 |
|
312 |
-
#: templates/admin_tabs.php:
|
313 |
-
msgid "Thumbnail
|
314 |
-
msgstr "
|
315 |
|
316 |
-
#: templates/admin_tabs.php:
|
317 |
-
msgid ""
|
318 |
-
"
|
319 |
-
|
320 |
-
|
321 |
-
"
|
322 |
-
"
|
323 |
-
|
324 |
-
|
325 |
-
"
|
326 |
-
"
|
327 |
-
|
328 |
-
|
329 |
-
"120, 320, 480 ó 640"
|
330 |
-
|
331 |
-
#: templates/admin_tabs.php:240
|
332 |
msgid "Thumbnail columns:"
|
333 |
msgstr "Columnas de las miniaturas:"
|
334 |
|
335 |
-
#: templates/admin_tabs.php:
|
336 |
msgid "Phones:"
|
337 |
-
msgstr "
|
338 |
|
339 |
-
#: templates/admin_tabs.php:
|
340 |
msgid "Tablets:"
|
341 |
msgstr "Tablet:"
|
342 |
|
343 |
-
#: templates/admin_tabs.php:
|
344 |
msgid "Medium Desktops:"
|
345 |
-
msgstr "
|
346 |
|
347 |
-
#: templates/admin_tabs.php:
|
348 |
msgid "Large Desktops:"
|
349 |
-
msgstr "
|
350 |
|
351 |
-
#: templates/admin_tabs.php:
|
352 |
msgid "Show title or description"
|
353 |
msgstr "Mostrar título y descripción"
|
354 |
|
355 |
-
#: templates/admin_tabs.php:
|
356 |
msgid "Show title"
|
357 |
msgstr "Mostrar Título"
|
358 |
|
359 |
-
#: templates/admin_tabs.php:
|
360 |
msgid "Show description"
|
361 |
msgstr "Mostrar descripción"
|
362 |
|
363 |
-
#: templates/admin_tabs.php:
|
364 |
msgid "Title tag:"
|
365 |
msgstr "Etiqueta de título:"
|
366 |
|
367 |
-
#: templates/admin_tabs.php:
|
368 |
msgid "h1"
|
369 |
-
msgstr ""
|
370 |
|
371 |
-
#: templates/admin_tabs.php:
|
372 |
msgid "h2"
|
373 |
-
msgstr ""
|
374 |
|
375 |
-
#: templates/admin_tabs.php:
|
376 |
msgid "h3"
|
377 |
-
msgstr ""
|
378 |
|
379 |
-
#: templates/admin_tabs.php:
|
380 |
msgid "h4"
|
381 |
msgstr "h4"
|
382 |
|
383 |
-
#: templates/admin_tabs.php:
|
384 |
msgid "h5"
|
385 |
-
msgstr ""
|
386 |
|
387 |
-
#: templates/admin_tabs.php:
|
388 |
msgid "h6"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
msgstr ""
|
|
|
|
|
|
|
390 |
|
391 |
-
#: templates/admin_tabs.php:
|
392 |
msgid "Thumbnail alignment:"
|
393 |
msgstr "Alineación de miniaturas:"
|
394 |
|
395 |
-
#: templates/admin_tabs.php:
|
396 |
msgid "none"
|
397 |
msgstr "Ninguno"
|
398 |
|
399 |
-
#: templates/admin_tabs.php:
|
400 |
msgid "Left"
|
401 |
msgstr "Izquierda"
|
402 |
|
403 |
-
#: templates/admin_tabs.php:
|
404 |
msgid "Right"
|
405 |
msgstr "Derecha"
|
406 |
|
407 |
-
#: templates/admin_tabs.php:
|
408 |
-
msgid "
|
409 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
|
411 |
-
#: templates/admin_tabs.php:
|
412 |
msgid ""
|
413 |
-
"
|
414 |
-
"
|
415 |
-
"different sizes."
|
416 |
msgstr ""
|
417 |
-
"
|
418 |
-
"
|
419 |
-
"diferentes tamaños."
|
420 |
|
421 |
-
#: templates/admin_tabs.php:
|
422 |
msgid "Add \"nofollow\" attribute to links"
|
423 |
msgstr "Añade el atributo \"nofollow\" a los enlaces"
|
424 |
|
425 |
-
#: templates/admin_tabs.php:
|
426 |
msgid ""
|
427 |
"\"nofollow\" attribute provides a way for webmasters to tell search engines "
|
428 |
"\"Don't follow this specific link.\""
|
@@ -430,47 +496,51 @@ msgstr ""
|
|
430 |
"El atributo \"nofollow\" ofrece a los webmasters un modo de indicar a los "
|
431 |
"motores de búsqueda para no seguir un enlace."
|
432 |
|
433 |
-
#: templates/admin_tabs.php:
|
434 |
msgid "Open in a new window or tab"
|
435 |
msgstr "Abrir en una ventana nueva o pestaña"
|
436 |
|
437 |
-
#: templates/admin_tabs.php:
|
438 |
msgid "Show pagination"
|
439 |
msgstr "Mostrar paginación"
|
440 |
|
441 |
-
#: templates/admin_tabs.php:
|
442 |
msgid "Thumbnail:"
|
443 |
-
msgstr "Miniatura"
|
444 |
|
445 |
-
#: templates/admin_tabs.php:
|
446 |
msgid "Description:"
|
447 |
msgstr "Descripción:"
|
448 |
|
449 |
-
#: templates/admin_tabs.php:
|
450 |
msgid "Link text:"
|
451 |
msgstr "Texto del enlace"
|
452 |
|
453 |
-
#: templates/admin_tabs.php:
|
454 |
msgid "Show link to channel"
|
455 |
msgstr "Mostrar enlace al canal"
|
456 |
|
457 |
-
#: templates/admin_tabs.php:
|
458 |
msgid "Show link to thank the developer"
|
459 |
msgstr "Mostrar enlace para agradecer al desarrollador"
|
460 |
|
461 |
#: templates/link.php:9
|
462 |
msgid "By PoseLab"
|
463 |
-
msgstr ""
|
464 |
|
465 |
#: templates/link.php:18
|
466 |
msgid "Show more videos"
|
467 |
-
msgstr "Ver más vídeos
|
|
|
|
|
|
|
|
|
468 |
|
469 |
-
#: templates/thumbs.php:
|
470 |
msgid "«Previous"
|
471 |
msgstr "«Anterior"
|
472 |
|
473 |
-
#: templates/thumbs.php:
|
474 |
msgid "Next»"
|
475 |
msgstr "Siguiente»"
|
476 |
|
@@ -482,26 +552,61 @@ msgstr "Galería de Canal de Youtube"
|
|
482 |
msgid "Show a youtube video and a gallery of thumbnails for a youtube channel"
|
483 |
msgstr "Muestra un vídeo y una galería de miniaturas de una canal de Youtube "
|
484 |
|
485 |
-
#: youtube-channel-gallery.php:
|
486 |
msgid "Show more videos»"
|
487 |
msgstr "Ver más vídeos»"
|
488 |
|
489 |
-
#: youtube-channel-gallery.php:
|
490 |
msgid "There is no video to show."
|
491 |
msgstr "No hay ningún vídeo para mostrar."
|
492 |
|
493 |
-
#: youtube-channel-gallery.php:
|
494 |
#, php-format
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
msgid ""
|
496 |
-
"
|
497 |
-
"
|
498 |
-
"the <a href=\"http://wordpress.org/extend/plugins/youtube-channel-gallery/faq/"
|
499 |
-
"\" target=\"_blank\">FAQ</a> of the plugin."
|
500 |
msgstr ""
|
501 |
-
"
|
502 |
-
"target=\"_blank\"
|
503 |
-
|
504 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
505 |
|
506 |
#~ msgid "Top"
|
507 |
#~ msgstr "Arriba"
|
@@ -521,9 +626,6 @@ msgstr ""
|
|
521 |
#~ msgid "You must insert a valid playlist id."
|
522 |
#~ msgstr "Debes introducir un id válido de lista de reproducción de YouTube."
|
523 |
|
524 |
-
#~ msgid "User's favorites"
|
525 |
-
#~ msgstr "Favoritos del usuario"
|
526 |
-
|
527 |
#~ msgid "Light:"
|
528 |
#~ msgstr "Claro"
|
529 |
|
@@ -577,9 +679,6 @@ msgstr ""
|
|
577 |
#~ "Lista separada por comas de meta campos que no pueden ser copiados cuando "
|
578 |
#~ "se clona una entrada/pagina."
|
579 |
|
580 |
-
#~ msgid "Title prefix"
|
581 |
-
#~ msgstr "Prefijo del titulo"
|
582 |
-
|
583 |
#~ msgid ""
|
584 |
#~ "Prefix to be added before the original title when cloning a post/page, e."
|
585 |
#~ "g. \"Copy of\" (blank for no prefix)"
|
7 |
msgstr ""
|
8 |
"Project-Id-Version: youtube-channel-gallery\n"
|
9 |
"Report-Msgid-Bugs-To: \n"
|
10 |
+
"POT-Creation-Date: 2015-06-29 02:25+0100\n"
|
11 |
+
"PO-Revision-Date: 2015-06-29 02:47+0100\n"
|
12 |
"Last-Translator: Javier <javierpose@gmail.com>\n"
|
13 |
"Language-Team: PoseLab <javierpose@gmail.com>\n"
|
14 |
"Language: es_ES\n"
|
22 |
"X-Poedit-SourceCharset: utf-8\n"
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
|
25 |
+
#: templates/admin_tabs.php:3 templates/admin_tabs.php:406
|
26 |
msgid "Title:"
|
27 |
msgstr "Título:"
|
28 |
|
36 |
|
37 |
#: templates/admin_tabs.php:11
|
38 |
msgid "Search"
|
39 |
+
msgstr "Buscar"
|
40 |
|
41 |
#: templates/admin_tabs.php:12
|
42 |
msgid "Thumbnails"
|
52 |
|
53 |
#: templates/admin_tabs.php:28
|
54 |
msgid "Get your own YouTube API Key and put here."
|
55 |
+
msgstr "Obtén tu propia YouTube API Key e insertada aquí"
|
56 |
|
57 |
#: templates/admin_tabs.php:32
|
58 |
msgid "Video feed type:"
|
62 |
msgid "Uploaded by a user"
|
63 |
msgstr "Subidos por el usuario"
|
64 |
|
65 |
+
#: templates/admin_tabs.php:35
|
66 |
+
msgid "User's favorites"
|
67 |
+
msgstr "Favoritos del usuario"
|
68 |
+
|
69 |
#: templates/admin_tabs.php:36
|
70 |
+
msgid "User's likes"
|
71 |
+
msgstr "Likes de usuario"
|
72 |
+
|
73 |
+
#: templates/admin_tabs.php:37
|
74 |
msgid "Playlist"
|
75 |
msgstr "Lista de reproducción"
|
76 |
|
77 |
+
#: templates/admin_tabs.php:42
|
78 |
msgid "YouTube user id:"
|
79 |
msgstr "Id de usuario de Youtube:"
|
80 |
|
81 |
+
#: templates/admin_tabs.php:43
|
82 |
msgid "YouTube playlist id:"
|
83 |
msgstr "Id de lista de reproducción de YouTube:"
|
84 |
|
85 |
+
#: templates/admin_tabs.php:49
|
86 |
msgid "Playlist order:"
|
87 |
msgstr "Orden de lista de reproducción:"
|
88 |
|
|
|
|
|
|
|
|
|
89 |
#: templates/admin_tabs.php:51
|
90 |
+
msgid "Date Order"
|
91 |
+
msgstr "Ordenar por fecha"
|
92 |
+
|
93 |
+
#: templates/admin_tabs.php:52
|
94 |
+
msgid "Rating Order"
|
95 |
+
msgstr "Ordenar por calificación"
|
96 |
+
|
97 |
+
#: templates/admin_tabs.php:53
|
98 |
+
msgid "Relevance Order"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: templates/admin_tabs.php:54
|
102 |
+
msgid "Title Order"
|
103 |
+
msgstr "Ordenar por título"
|
104 |
+
|
105 |
+
#: templates/admin_tabs.php:55
|
106 |
+
msgid "Video Count Order"
|
107 |
+
msgstr ""
|
108 |
|
109 |
#: templates/admin_tabs.php:56
|
110 |
+
msgid "View Count Order"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: templates/admin_tabs.php:63
|
114 |
msgid "Cache time (hours):"
|
115 |
msgstr "Tiempo de cache (horas):"
|
116 |
|
117 |
+
#: templates/admin_tabs.php:65
|
118 |
msgid ""
|
119 |
"Hours that RSS data is saved in database, to not make a request every time "
|
120 |
"the page is displayed. Assign this value according to how often you upgrade "
|
124 |
"solicitud cada vez que se muestra la página. Asigna este valor en función de "
|
125 |
"la frecuencia con que actualizas la lista de reproducción en YouTube."
|
126 |
|
127 |
+
#: templates/admin_tabs.php:72
|
128 |
msgid "Activate cache"
|
129 |
msgstr "Activar caché"
|
130 |
|
131 |
+
#: templates/admin_tabs.php:73
|
132 |
msgid ""
|
133 |
"If you disable this field the cache will be deleted and will not be used. "
|
134 |
"This is useful to refresh immediately the YouTube RSS used by the plugin. "
|
140 |
"Vuelve a habilitar la caché cuando la galería muestre los cambios que ha "
|
141 |
"realizado en su cuenta de YouTube."
|
142 |
|
143 |
+
#: templates/admin_tabs.php:88
|
144 |
msgid "Player:"
|
145 |
msgstr "Reproductor:"
|
146 |
|
147 |
+
#: templates/admin_tabs.php:90
|
148 |
msgid "Without player"
|
149 |
msgstr "Sin reproductor"
|
150 |
|
151 |
+
#: templates/admin_tabs.php:91
|
152 |
+
msgid "show player"
|
153 |
+
msgstr "mostrar reproductor"
|
154 |
|
155 |
+
#: templates/admin_tabs.php:92
|
156 |
msgid "show player in Magnific Popup"
|
157 |
+
msgstr "mostrar reproductor en Magnific Popup"
|
158 |
|
159 |
+
#: templates/admin_tabs.php:99
|
160 |
msgid "Width:"
|
161 |
msgstr "Ancho:"
|
162 |
|
163 |
+
#: templates/admin_tabs.php:102
|
164 |
msgid "%"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: templates/admin_tabs.php:103
|
168 |
msgid "px"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: templates/admin_tabs.php:107 templates/admin_tabs.php:257
|
172 |
msgid "Aspect ratio:"
|
173 |
msgstr "Relación de aspecto:"
|
174 |
|
175 |
+
#: templates/admin_tabs.php:109 templates/admin_tabs.php:259
|
176 |
msgid "Standard (4x3)"
|
177 |
msgstr "Estándar (4x3)"
|
178 |
|
179 |
+
#: templates/admin_tabs.php:110 templates/admin_tabs.php:260
|
180 |
msgid "Widescreen (16x9)"
|
181 |
msgstr "Panorámico (16x9)"
|
182 |
|
183 |
+
#: templates/admin_tabs.php:117
|
184 |
msgid "Theme:"
|
185 |
msgstr "Tema:"
|
186 |
|
187 |
+
#: templates/admin_tabs.php:119
|
188 |
msgid "Dark"
|
189 |
msgstr "Oscuro"
|
190 |
|
191 |
+
#: templates/admin_tabs.php:120
|
192 |
msgid "Light"
|
193 |
msgstr "Claro"
|
194 |
|
195 |
+
#: templates/admin_tabs.php:124
|
196 |
msgid "Progress bar color:"
|
197 |
msgstr "Color de barra de progreso:"
|
198 |
|
199 |
+
#: templates/admin_tabs.php:126
|
200 |
msgid "Red"
|
201 |
msgstr "Rojo"
|
202 |
|
203 |
+
#: templates/admin_tabs.php:127
|
204 |
msgid "White"
|
205 |
msgstr "Blanco"
|
206 |
|
207 |
+
#: templates/admin_tabs.php:134
|
208 |
msgid "Video quality:"
|
209 |
msgstr "Calidad del vídeo:"
|
210 |
|
211 |
+
#: templates/admin_tabs.php:136
|
212 |
msgid "default"
|
213 |
msgstr "por defecto"
|
214 |
|
215 |
+
#: templates/admin_tabs.php:137
|
216 |
msgid "highres"
|
217 |
msgstr "alta resolución"
|
218 |
|
219 |
+
#: templates/admin_tabs.php:138
|
220 |
msgid "hd1080"
|
221 |
msgstr "hd1080"
|
222 |
|
223 |
+
#: templates/admin_tabs.php:139
|
224 |
msgid "hd720"
|
225 |
msgstr "hd720"
|
226 |
|
227 |
+
#: templates/admin_tabs.php:140
|
228 |
msgid "large"
|
229 |
msgstr "largo"
|
230 |
|
231 |
+
#: templates/admin_tabs.php:141
|
232 |
msgid "medium"
|
233 |
msgstr "mediano"
|
234 |
|
235 |
+
#: templates/admin_tabs.php:142
|
236 |
msgid "small"
|
237 |
msgstr "pequeño"
|
238 |
|
239 |
+
#: templates/admin_tabs.php:144
|
240 |
msgid ""
|
241 |
"Default value enables YouTube to select the most appropriate playback "
|
242 |
"quality. If you select a quality level that is not available for the video, "
|
247 |
"disponible para el vídeo, la calidad se ajustará al siguiente nivel más bajo "
|
248 |
"que este disponible."
|
249 |
|
250 |
+
#: templates/admin_tabs.php:151
|
251 |
msgid "Autoplay"
|
252 |
msgstr "Autoplay"
|
253 |
|
254 |
+
#: templates/admin_tabs.php:155
|
255 |
msgid "Show YouTube logo"
|
256 |
msgstr "Mostrar el logotipo de YouTube"
|
257 |
|
258 |
+
#: templates/admin_tabs.php:156
|
259 |
msgid ""
|
260 |
"Activate this field to show the YouTube logo in the control bar. Setting the "
|
261 |
"color parameter to white will show the YouTube logo in the control bar."
|
264 |
"Un ajuste del parámetro de color a blanco mostrará el logotipo de YouTube en "
|
265 |
"la barra de control."
|
266 |
|
267 |
+
#: templates/admin_tabs.php:163
|
268 |
msgid "Show related videos"
|
269 |
msgstr "Mostrar los vídeos relacionados"
|
270 |
|
271 |
+
#: templates/admin_tabs.php:164
|
272 |
msgid ""
|
273 |
"Activate this field to show related videos when playback of the video ends."
|
274 |
msgstr ""
|
275 |
"Activa este campo para mostrar videos relacionados cuando termine la "
|
276 |
"reproducción del vídeo."
|
277 |
|
278 |
+
#: templates/admin_tabs.php:168
|
279 |
msgid "Show info"
|
280 |
msgstr "Mostrar información"
|
281 |
|
282 |
+
#: templates/admin_tabs.php:169
|
283 |
msgid ""
|
284 |
"Activate this field to display information like the video title and uploader "
|
285 |
"before the video starts playing."
|
287 |
"Active este campo para mostrar información como el título del vídeo y nombre "
|
288 |
"de usuario antes de que el vídeo comience a reproducirse."
|
289 |
|
290 |
+
#: templates/admin_tabs.php:175 templates/admin_tabs.php:227
|
291 |
+
#: templates/admin_tabs.php:402 templates/admin_tabs.php:413
|
292 |
+
#: templates/admin_tabs.php:450
|
293 |
msgid "Order:"
|
294 |
msgstr "Orden:"
|
295 |
|
296 |
+
#: templates/admin_tabs.php:192
|
297 |
msgid "Search input text:"
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: templates/admin_tabs.php:196
|
301 |
msgid "Restrict search to (# separated):"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: templates/admin_tabs.php:200
|
305 |
msgid "You must assing this tags to your videos to restrict the search:"
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: templates/admin_tabs.php:209
|
309 |
msgid "Restrict search by default: It will overwrite results of feed tab)"
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: templates/admin_tabs.php:211 templates/admin_tabs.php:376
|
313 |
+
#: templates/search.php:10
|
314 |
+
msgid "All"
|
315 |
+
msgstr "Todos"
|
316 |
|
317 |
+
#: templates/admin_tabs.php:219
|
318 |
msgid "Show search box"
|
319 |
+
msgstr "Mostrar caja de búsqueda"
|
320 |
|
321 |
+
#: templates/admin_tabs.php:223
|
322 |
msgid "Show select with Playlists"
|
323 |
+
msgstr "Show desplegable con Playlistas"
|
324 |
|
325 |
+
#: templates/admin_tabs.php:241
|
326 |
msgid "Number of videos to show:"
|
327 |
+
msgstr "Vídeos a mostrar:"
|
328 |
|
329 |
+
#: templates/admin_tabs.php:243
|
330 |
+
msgid "The plugin can display a maximum of 50 videos for each page."
|
331 |
+
msgstr "El plugin puede mostrar un máximo de 50 vídeos por página."
|
|
|
|
|
|
|
|
|
332 |
|
333 |
+
#: templates/admin_tabs.php:246
|
334 |
+
msgid "Thumbnail resolution:"
|
335 |
+
msgstr "Resolución de miniaturas:"
|
336 |
|
337 |
+
#: templates/admin_tabs.php:248
|
338 |
+
msgid "Default (120x90 px)"
|
339 |
+
msgstr "Por defecto (120x90 px)"
|
340 |
+
|
341 |
+
#: templates/admin_tabs.php:249
|
342 |
+
msgid "Medium (320x180)"
|
343 |
+
msgstr "Media (320x180)"
|
344 |
+
|
345 |
+
#: templates/admin_tabs.php:250
|
346 |
+
msgid "High (480x360)"
|
347 |
+
msgstr "Alta (480x360)"
|
348 |
+
|
349 |
+
#: templates/admin_tabs.php:267
|
|
|
|
|
|
|
350 |
msgid "Thumbnail columns:"
|
351 |
msgstr "Columnas de las miniaturas:"
|
352 |
|
353 |
+
#: templates/admin_tabs.php:273
|
354 |
msgid "Phones:"
|
355 |
+
msgstr "Móviles:"
|
356 |
|
357 |
+
#: templates/admin_tabs.php:281
|
358 |
msgid "Tablets:"
|
359 |
msgstr "Tablet:"
|
360 |
|
361 |
+
#: templates/admin_tabs.php:293
|
362 |
msgid "Medium Desktops:"
|
363 |
+
msgstr "Escritorios medio:"
|
364 |
|
365 |
+
#: templates/admin_tabs.php:301
|
366 |
msgid "Large Desktops:"
|
367 |
+
msgstr "Escritorios grandes:"
|
368 |
|
369 |
+
#: templates/admin_tabs.php:316
|
370 |
msgid "Show title or description"
|
371 |
msgstr "Mostrar título y descripción"
|
372 |
|
373 |
+
#: templates/admin_tabs.php:324
|
374 |
msgid "Show title"
|
375 |
msgstr "Mostrar Título"
|
376 |
|
377 |
+
#: templates/admin_tabs.php:328
|
378 |
msgid "Show description"
|
379 |
msgstr "Mostrar descripción"
|
380 |
|
381 |
+
#: templates/admin_tabs.php:334
|
382 |
msgid "Title tag:"
|
383 |
msgstr "Etiqueta de título:"
|
384 |
|
385 |
+
#: templates/admin_tabs.php:336
|
386 |
msgid "h1"
|
387 |
+
msgstr "h1"
|
388 |
|
389 |
+
#: templates/admin_tabs.php:337
|
390 |
msgid "h2"
|
391 |
+
msgstr "h2"
|
392 |
|
393 |
+
#: templates/admin_tabs.php:338
|
394 |
msgid "h3"
|
395 |
+
msgstr "h3"
|
396 |
|
397 |
+
#: templates/admin_tabs.php:339
|
398 |
msgid "h4"
|
399 |
msgstr "h4"
|
400 |
|
401 |
+
#: templates/admin_tabs.php:340
|
402 |
msgid "h5"
|
403 |
+
msgstr "h5"
|
404 |
|
405 |
+
#: templates/admin_tabs.php:341
|
406 |
msgid "h6"
|
407 |
+
msgstr "h6"
|
408 |
+
|
409 |
+
#: templates/admin_tabs.php:345
|
410 |
+
msgid "Description words:"
|
411 |
+
msgstr "Palabras en descripción:"
|
412 |
+
|
413 |
+
#: templates/admin_tabs.php:347
|
414 |
+
msgid ""
|
415 |
+
"Set the maximum number of words that will be displayed of the description. "
|
416 |
+
"This field is useful when the descriptions of videos in the gallery have "
|
417 |
+
"different sizes."
|
418 |
msgstr ""
|
419 |
+
"Establece el número máximo de palabras que se mostrarán en la descripción. "
|
420 |
+
"Este campo es útil cuando la descripción de los vídeos de la galería tienen "
|
421 |
+
"diferentes tamaños."
|
422 |
|
423 |
+
#: templates/admin_tabs.php:353
|
424 |
msgid "Thumbnail alignment:"
|
425 |
msgstr "Alineación de miniaturas:"
|
426 |
|
427 |
+
#: templates/admin_tabs.php:355
|
428 |
msgid "none"
|
429 |
msgstr "Ninguno"
|
430 |
|
431 |
+
#: templates/admin_tabs.php:356
|
432 |
msgid "Left"
|
433 |
msgstr "Izquierda"
|
434 |
|
435 |
+
#: templates/admin_tabs.php:357
|
436 |
msgid "Right"
|
437 |
msgstr "Derecha"
|
438 |
|
439 |
+
#: templates/admin_tabs.php:364
|
440 |
+
msgid "Thumbnail width:"
|
441 |
+
msgstr "Ancho de miniaturas:"
|
442 |
+
|
443 |
+
#: templates/admin_tabs.php:366
|
444 |
+
msgid "Extra small"
|
445 |
+
msgstr "Extra pequeño"
|
446 |
+
|
447 |
+
#: templates/admin_tabs.php:367
|
448 |
+
msgid "Small"
|
449 |
+
msgstr "Pequeño"
|
450 |
+
|
451 |
+
#: templates/admin_tabs.php:368
|
452 |
+
msgid "Half"
|
453 |
+
msgstr "Medio"
|
454 |
+
|
455 |
+
#: templates/admin_tabs.php:369
|
456 |
+
msgid "Large"
|
457 |
+
msgstr "Grande"
|
458 |
+
|
459 |
+
#: templates/admin_tabs.php:370
|
460 |
+
msgid "Extra large"
|
461 |
+
msgstr "Extra grande"
|
462 |
+
|
463 |
+
#: templates/admin_tabs.php:374
|
464 |
+
msgid "Min. size with alignment:"
|
465 |
+
msgstr "Mín. tamaño con alineación:"
|
466 |
+
|
467 |
+
#: templates/admin_tabs.php:377
|
468 |
+
msgid "Tablets"
|
469 |
+
msgstr "Tablet:"
|
470 |
+
|
471 |
+
#: templates/admin_tabs.php:378
|
472 |
+
msgid "Medium Desktops"
|
473 |
+
msgstr "Escritorio medio:"
|
474 |
+
|
475 |
+
#: templates/admin_tabs.php:379
|
476 |
+
msgid "Large devices"
|
477 |
+
msgstr "Dispositivos grandes"
|
478 |
|
479 |
+
#: templates/admin_tabs.php:381
|
480 |
msgid ""
|
481 |
+
"Thumbnails will be aligned only from the size of selected device to prevent "
|
482 |
+
"unwanted effects in small sizes."
|
|
|
483 |
msgstr ""
|
484 |
+
"Las miniaturas serán alineadas sólo desde el tamaño del dispositivo "
|
485 |
+
"seleccionado para prevenir efectos no deseados en dispositivos pequeños."
|
|
|
486 |
|
487 |
+
#: templates/admin_tabs.php:388
|
488 |
msgid "Add \"nofollow\" attribute to links"
|
489 |
msgstr "Añade el atributo \"nofollow\" a los enlaces"
|
490 |
|
491 |
+
#: templates/admin_tabs.php:389
|
492 |
msgid ""
|
493 |
"\"nofollow\" attribute provides a way for webmasters to tell search engines "
|
494 |
"\"Don't follow this specific link.\""
|
496 |
"El atributo \"nofollow\" ofrece a los webmasters un modo de indicar a los "
|
497 |
"motores de búsqueda para no seguir un enlace."
|
498 |
|
499 |
+
#: templates/admin_tabs.php:395 templates/admin_tabs.php:440
|
500 |
msgid "Open in a new window or tab"
|
501 |
msgstr "Abrir en una ventana nueva o pestaña"
|
502 |
|
503 |
+
#: templates/admin_tabs.php:400
|
504 |
msgid "Show pagination"
|
505 |
msgstr "Mostrar paginación"
|
506 |
|
507 |
+
#: templates/admin_tabs.php:404
|
508 |
msgid "Thumbnail:"
|
509 |
+
msgstr "Miniatura:"
|
510 |
|
511 |
+
#: templates/admin_tabs.php:408
|
512 |
msgid "Description:"
|
513 |
msgstr "Descripción:"
|
514 |
|
515 |
+
#: templates/admin_tabs.php:429
|
516 |
msgid "Link text:"
|
517 |
msgstr "Texto del enlace"
|
518 |
|
519 |
+
#: templates/admin_tabs.php:435
|
520 |
msgid "Show link to channel"
|
521 |
msgstr "Mostrar enlace al canal"
|
522 |
|
523 |
+
#: templates/admin_tabs.php:445
|
524 |
msgid "Show link to thank the developer"
|
525 |
msgstr "Mostrar enlace para agradecer al desarrollador"
|
526 |
|
527 |
#: templates/link.php:9
|
528 |
msgid "By PoseLab"
|
529 |
+
msgstr "Por PoseLab"
|
530 |
|
531 |
#: templates/link.php:18
|
532 |
msgid "Show more videos"
|
533 |
+
msgstr "Ver más vídeos"
|
534 |
+
|
535 |
+
#: templates/thumb.php:4
|
536 |
+
msgid "Private video"
|
537 |
+
msgstr "Vídeo privado"
|
538 |
|
539 |
+
#: templates/thumbs.php:110
|
540 |
msgid "«Previous"
|
541 |
msgstr "«Anterior"
|
542 |
|
543 |
+
#: templates/thumbs.php:119
|
544 |
msgid "Next»"
|
545 |
msgstr "Siguiente»"
|
546 |
|
552 |
msgid "Show a youtube video and a gallery of thumbnails for a youtube channel"
|
553 |
msgstr "Muestra un vídeo y una galería de miniaturas de una canal de Youtube "
|
554 |
|
555 |
+
#: youtube-channel-gallery.php:603
|
556 |
msgid "Show more videos»"
|
557 |
msgstr "Ver más vídeos»"
|
558 |
|
559 |
+
#: youtube-channel-gallery.php:612
|
560 |
msgid "There is no video to show."
|
561 |
msgstr "No hay ningún vídeo para mostrar."
|
562 |
|
563 |
+
#: youtube-channel-gallery.php:690
|
564 |
#, php-format
|
565 |
+
msgid "Message from server: \"%1$s\". "
|
566 |
+
msgstr "Mensaje del servidor: \"%1$s\". "
|
567 |
+
|
568 |
+
#: youtube-channel-gallery.php:691
|
569 |
+
#, php-format
|
570 |
+
msgid "Check in YouTube if the id %1$s belongs to a %2$s. "
|
571 |
+
msgstr "Comprueba en YouTube si el id %1$s corresponde a un %2$s. "
|
572 |
+
|
573 |
+
#: youtube-channel-gallery.php:693
|
574 |
+
#, php-format
|
575 |
+
msgid ""
|
576 |
+
"If the user id is correct, check that the channel of the user has list of "
|
577 |
+
"\"%1$s\". "
|
578 |
+
msgstr ""
|
579 |
+
"Si el id de usuario es correcto, comprueba que el canal de usuario tiene una "
|
580 |
+
"lista de \"%1$s\". "
|
581 |
+
|
582 |
+
#: youtube-channel-gallery.php:695
|
583 |
msgid ""
|
584 |
+
"Check the <a href=\"http://wordpress.org/extend/plugins/youtube-channel-"
|
585 |
+
"gallery/faq/\" target=\"_blank\">FAQ</a> of the plugin."
|
|
|
|
|
586 |
msgstr ""
|
587 |
+
"Revise el <a href=\"http://wordpress.org/extend/plugins/youtube-channel-"
|
588 |
+
"gallery/faq/\" target=\"_blank\"> FAQ </ a> del plugin."
|
589 |
+
|
590 |
+
#: youtube-channel-gallery.php:768
|
591 |
+
msgid "There are no videos matching selected criteria"
|
592 |
+
msgstr "No hay vídeos que se ajusten al criterio seleccionado"
|
593 |
+
|
594 |
+
#~ msgid "Show player above thumbnails"
|
595 |
+
#~ msgstr "Mostrar reproductor sobre miniaturas"
|
596 |
+
|
597 |
+
#~ msgid ""
|
598 |
+
#~ "This field is used to assign the appropriate quality of thumbnail images "
|
599 |
+
#~ "in top and bottom alignments and to assign width to thumbnails in left and "
|
600 |
+
#~ "right alignments. If the quality of thumbnail images is not enough, insert "
|
601 |
+
#~ "a larger value. If you are unsure you can assign one of the following "
|
602 |
+
#~ "values: 120, 320, 480 or 640"
|
603 |
+
#~ msgstr ""
|
604 |
+
#~ "Este campo se utiliza para asignar la calidad de imagen más adecuada a las "
|
605 |
+
#~ "miniaturas en las alineaciones superior e inferior y para asignar ancho a "
|
606 |
+
#~ "las miniaturas en las alineaciones izquierda y derecha. Si la calidad de "
|
607 |
+
#~ "las imágenes de las miniaturas no es suficiente, introduzca un valor "
|
608 |
+
#~ "mayor. Si no está seguro de que valor usar puede asignar uno de los "
|
609 |
+
#~ "siguientes valores: 120, 320, 480 ó 640"
|
610 |
|
611 |
#~ msgid "Top"
|
612 |
#~ msgstr "Arriba"
|
626 |
#~ msgid "You must insert a valid playlist id."
|
627 |
#~ msgstr "Debes introducir un id válido de lista de reproducción de YouTube."
|
628 |
|
|
|
|
|
|
|
629 |
#~ msgid "Light:"
|
630 |
#~ msgstr "Claro"
|
631 |
|
679 |
#~ "Lista separada por comas de meta campos que no pueden ser copiados cuando "
|
680 |
#~ "se clona una entrada/pagina."
|
681 |
|
|
|
|
|
|
|
682 |
#~ msgid ""
|
683 |
#~ "Prefix to be added before the original title when cloning a post/page, e."
|
684 |
#~ "g. \"Copy of\" (blank for no prefix)"
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://poselab.com/
|
|
4 |
Tags: widget, gallery, youtube, channel, user, sidebar, video, youtube playlist, html5, iframe, Youtube channel, youtube videos, API 3
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.8.8
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -12,9 +12,9 @@ Show a YouTube video and a gallery of thumbnails for a YouTube channel.
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
`WARNING: The name of some Shortcode options has change`
|
16 |
|
17 |
-
Show a YouTube video and a gallery of thumbnails for a YouTube user channel.
|
18 |
|
19 |
|
20 |
= Demo: =
|
@@ -27,13 +27,13 @@ You can see a demo of the plugin in the following URLs:
|
|
27 |
* [Demo with title and description and thumbnail on the left](http://poselab.com/en/youtube-channel-gallery-demo-with-title-description-and-thumbnail-on-the-left/) | [ES](http://poselab.com/youtube-channel-gallery-demo-con-titulo-y-descripcion-y-miniatura-a-la-izquierda)
|
28 |
* [Demo with title and thumbnail at bottom](http://poselab.com/en/youtube-channel-gallery-demo-with-title-and-thumbnail-at-the-bottom/) | [ES](http://poselab.com/youtube-channel-gallery-demo-con-titulo-y-miniatura-abajo)
|
29 |
* [Demo with playlist](http://poselab.com/en/youtube-channel-gallery-demo-with-playlist/) | [ES](http://poselab.com/youtube-channel-gallery-demo-con-lista-de-reproduccion/)
|
30 |
-
* [Demo with changed order](http://poselab.com/en/youtube-channel-gallery-demo-with-changed-order/) | [ES](http://poselab.com/youtube-channel-gallery-demo-con-orden-cambiado/)
|
31 |
|
32 |
|
33 |
= Features: =
|
34 |
-
* Display latest thumbnail videos from YouTube user channel
|
35 |
-
* When you click on one of the thumbnails the video plays
|
36 |
* This plugin uses the YouTube IFrame player API that allows YouTube to serve an HTML5 player, rather than a Flash player, for mobile devices that do not support Flash.
|
|
|
37 |
* You can choose to use this plugin as a widget or as a shortcode.
|
38 |
* You can use multiple instances of the plugin on the same page.
|
39 |
|
@@ -45,54 +45,100 @@ Description of the different fields of the plugin:
|
|
45 |
|
46 |
**Feed tab:**
|
47 |
|
48 |
-
* **Key:** You must insert your own API key. The API key inserted is an example
|
49 |
-
|
50 |
-
* **
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
* **Cache time (hours):** Hours that RSS data is saved in database, to not make a request every time the page is displayed. Assign this value according to how often you upgrade your playlist in YouTube. Shortcode attribute: cache_time; value: Number. (Optional).
|
53 |
-
|
|
|
|
|
54 |
|
55 |
**Player tab:**
|
56 |
|
57 |
-
* **Player:**
|
|
|
|
|
|
|
|
|
58 |
* **Width:** Width of player. Shortcode attribute:** width_value; values: Number. 100 (default). (Optional).
|
59 |
-
|
60 |
-
* **
|
|
|
|
|
|
|
61 |
* **Theme:** display player controls (like a 'play' button or volume control) within a dark or light control bar. Shortcode attribute: theme; values: dark (default) or light. (Optional).
|
|
|
62 |
* **Progress bar color:** specifies the color that will be used in the player's video progress bar to highlight the amount of the video that the viewer has already seen. Shortcode attribute: color; values: red (default) or white. (Optional).
|
|
|
63 |
* **Video quality:** sets the suggested video quality for the videos. The suggested quality parameter value can be small, medium, large, hd720, hd1080, highres or default. YouTube recommend that you set the parameter value to default, which instructs YouTube to select the most appropriate playback quality, which will vary for different users, videos, systems and other playback conditions. If you set suggested quality level that is not available for the video, then the quality will be set to the next lowest level that is available. Shortcode attribute: quality; values: small, medium, large, hd720, hd1080, highres or default (default). (Optional).
|
|
|
64 |
* **Autoplay:** automatically play the initial video when the player loads. Shortcode attribute: autoplay; values: 0 (default) or 1. (Optional).
|
|
|
65 |
* **Show YouTube logo:** Activate this field to show the YouTube logo in the control bar. Setting the color parameter to white will show the YouTube logo in the control bar. Shortcode attribute: modestbranding; values: 0 (default) or 1. (Optional).
|
|
|
66 |
* **Show related videos:** this parameter indicates whether the player should show related videos when playback of the initial video ends. Shortcode attribute: rel; values: 0 (default) or 1. (Optional).
|
|
|
67 |
* **Show info (title, uploader):** display information like the video title and rating before the video starts playing. Shortcode attribute: showinfo; values: 0 (default) or 1. (Optional).
|
|
|
68 |
* **Order:** order of player. Shortcode attribute: player_order; values: Number. 1 (default). (Optional).
|
69 |
|
|
|
70 |
**Thumbnails tab:**
|
71 |
|
72 |
-
* **Number of videos to show:** it must be a number indicating the number of thumbnails to be displayed. Shortcode attribute: maxitems; value: Number. (Optional).
|
73 |
-
|
74 |
-
* **
|
|
|
|
|
|
|
75 |
* **Thumbnail columns:** it allows to control the number of columns in which the thumbnails are distributed. It uses [Bootstrap Grid system](http://getbootstrap.com/css/#grid) to allow responsive behavior. Shortcode attribute: thumb_columns_phones (Phones), thumb_columns_tablets (Tablets), thumb_columns_md (Medium Desktops), thumb_columns_ld (Large Desktops); value: Number. Max value 12. (Optional).
|
76 |
-
|
77 |
-
* **Open in a new window or tab:** this option only appears if you select to use the gallery without player. Thumbnails links will open in a new window or tab. Shortcode attribute: thumb_window; values: 0 (default) or 1. (Optional).
|
78 |
* **Show title:** it displays the title of the thumbnail with a link to play the video in the player. Shortcode attribute: title; values: 0 (default) or 1. (Optional).
|
|
|
79 |
* **Show description:** it shows the description of the thumbnail with the number of specified words. Shortcode attribute: description; values: 0 (default) or 1. (Optional).
|
|
|
80 |
* **Title tag:** select an appropriate tag for the title. Shortcode attribute: title_tag; values: h1, h2, h3, h4, h5 (default), h6. (Optional).
|
81 |
-
|
82 |
* **Description words number:** the maximum number of words displayed in the description. Shortcode attribute: description_words_number; value: Number. (Optional).
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
**Link tab:**
|
85 |
|
86 |
* **Link text:** field to customize the text of the link to the gallery on YouTube. Shortcode attribute: link_tx; value: String. (Optional).
|
|
|
87 |
* **Show link to channel:** option to display a link to the YouTube user channel. Shortcode attribute: link; values: 0 (default) or 1. (Optional).
|
|
|
88 |
* **Open in a new window or tab:** option to open the link to YouTube in a new window or tab . Shortcode attribute: link_window; values: 0 (default) or 1. (Optional).
|
|
|
89 |
* **Show link to thank the developer:** option to add a small link to home page of the developer . Shortcode attribute: promotion; values: 0 or 1 (default). (Optional).
|
90 |
|
91 |
|
92 |
= Shortcode syntax: =
|
93 |
-
|
94 |
|
95 |
-
`[Youtube_Channel_Gallery user="
|
96 |
|
97 |
|
98 |
= Languages: =
|
@@ -100,7 +146,6 @@ In the following example are many attributes that can be used with the shortcode
|
|
100 |
* Italian (it_IT) - [Marco Milesi](https://profiles.wordpress.org/milmor).
|
101 |
* Spanish (es_ES) - [PoseLab](http://poselab.com/)
|
102 |
|
103 |
-
|
104 |
If you have created your own language pack, or have an update of an existing one, you can [send me](mailto:javierpose@gmail.com) your gettext PO and MO so that I can bundle it into the Youtube Channel Gallery.
|
105 |
|
106 |
|
@@ -154,9 +199,23 @@ See [HTTPS Support for YouTube Embeds](http://apiblog.youtube.com/2011/02/https-
|
|
154 |
|
155 |
== Changelog ==
|
156 |
|
157 |
-
= 2.
|
158 |
-
*
|
159 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
|
161 |
= 2.0.2 =
|
162 |
* Delete debug element.
|
@@ -177,12 +236,12 @@ See [HTTPS Support for YouTube Embeds](http://apiblog.youtube.com/2011/02/https-
|
|
177 |
|
178 |
= 1.8.7 =
|
179 |
* Fixed problem with SSL.
|
180 |
-
* Changes in CSS to correct IE columns.
|
181 |
|
182 |
= 1.8.6 =
|
183 |
* Check accounts suspended.
|
184 |
* SSL support (checks if HTTPS or on Port 443). Be aware that the YouTube player is not fully compatible with SSL. See [HTTPS Support for YouTube Embeds](http://apiblog.youtube.com/2011/02/https-support-for-youtube-embeds.html)
|
185 |
-
* Changes in CSS to correct IE support.
|
186 |
|
187 |
= 1.8.5 =
|
188 |
* Added option to show only thumbnails without player.
|
@@ -216,7 +275,7 @@ See [HTTPS Support for YouTube Embeds](http://apiblog.youtube.com/2011/02/https-
|
|
216 |
* Replaced SimplePie for SimpleXML to solve problems that many users have with Simplepie.
|
217 |
* Replaced SimplePie FeedCache for Transients API cache data to manage cache of RSS.
|
218 |
* Added a field to set the number of hours to keep the data before refreshing.
|
219 |
-
* Added a checkbox to deactivate the cache. Useful to check or flush new videos.
|
220 |
* Added default values.
|
221 |
* Changed the max-results parameter to 50 to allow the maximum display value of a single request.
|
222 |
* Fixed row counter with multiple instances of the plugin in the same page.
|
@@ -257,8 +316,8 @@ See [HTTPS Support for YouTube Embeds](http://apiblog.youtube.com/2011/02/https-
|
|
257 |
* Corrected order of playlists videos.
|
258 |
* Enqueue of admin style only in widget page.
|
259 |
* admin-styles.css tweaks.
|
260 |
-
* Update widget form after drag-and-drop (WP save bug).
|
261 |
-
* Added scroll to player only if not in view.
|
262 |
|
263 |
= 1.7.4.2 =
|
264 |
* Corrected problem with jQuery.noConflict.
|
@@ -278,7 +337,7 @@ See [HTTPS Support for YouTube Embeds](http://apiblog.youtube.com/2011/02/https-
|
|
278 |
* Added playlist feed support.
|
279 |
* Added control to select video quality.
|
280 |
* Added control to open link to Youtube in a new window.
|
281 |
-
* Improved accessibility of video links.
|
282 |
* Fixed bug with 1 column.
|
283 |
* CSS improvements.
|
284 |
|
@@ -339,14 +398,7 @@ See [HTTPS Support for YouTube Embeds](http://apiblog.youtube.com/2011/02/https-
|
|
339 |
* Multiple instances of the plugin on the same page.
|
340 |
* Added theme selector.
|
341 |
* Improved use of Iframe YouTube Player API (now synchronous).
|
342 |
-
* Added effect: hover on thumbnails to display a play button.
|
343 |
|
344 |
= 1.0 =
|
345 |
-
* Initial Release.
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
== Upgrade Notice ==
|
350 |
-
|
351 |
-
= 1.5.3 =
|
352 |
-
* New fields to control the player
|
4 |
Tags: widget, gallery, youtube, channel, user, sidebar, video, youtube playlist, html5, iframe, Youtube channel, youtube videos, API 3
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.8.8
|
7 |
+
Stable tag: 2.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
`WARNING: The name of some Shortcode options has change since version 2`
|
16 |
|
17 |
+
Show a YouTube video and a gallery of thumbnails for a YouTube user channel.
|
18 |
|
19 |
|
20 |
= Demo: =
|
27 |
* [Demo with title and description and thumbnail on the left](http://poselab.com/en/youtube-channel-gallery-demo-with-title-description-and-thumbnail-on-the-left/) | [ES](http://poselab.com/youtube-channel-gallery-demo-con-titulo-y-descripcion-y-miniatura-a-la-izquierda)
|
28 |
* [Demo with title and thumbnail at bottom](http://poselab.com/en/youtube-channel-gallery-demo-with-title-and-thumbnail-at-the-bottom/) | [ES](http://poselab.com/youtube-channel-gallery-demo-con-titulo-y-miniatura-abajo)
|
29 |
* [Demo with playlist](http://poselab.com/en/youtube-channel-gallery-demo-with-playlist/) | [ES](http://poselab.com/youtube-channel-gallery-demo-con-lista-de-reproduccion/)
|
|
|
30 |
|
31 |
|
32 |
= Features: =
|
33 |
+
* Display latest thumbnail videos from YouTube user channel playlist.
|
34 |
+
* When you click on one of the thumbnails the video plays on player.
|
35 |
* This plugin uses the YouTube IFrame player API that allows YouTube to serve an HTML5 player, rather than a Flash player, for mobile devices that do not support Flash.
|
36 |
+
* YouTube Data API v3.
|
37 |
* You can choose to use this plugin as a widget or as a shortcode.
|
38 |
* You can use multiple instances of the plugin on the same page.
|
39 |
|
45 |
|
46 |
**Feed tab:**
|
47 |
|
48 |
+
* **Key:** You must insert your own API key. The API key inserted is an example and if you do not change the API key for yours you may receive an error message of exceeded quota. This is necessary in version 3 of the YouTube API, [Obtaining authorization credentials](https://developers.google.com/youtube/registering_an_application). Shortcode attribute: key; value: API key. (Required).
|
49 |
+
|
50 |
+
* **Video feed type:** option to select the feed type to use to show videos. Yo can select Uploaded by a user, User's favorites, User's likes or Playlist. Shortcode attribute: feed; value: user (default), favorites, likes or playlist. (Optional).
|
51 |
+
|
52 |
+
* **YouTube user id or playlist id:** the user id of the user's Youtube videos you want to show or the id of the playlist. Shortcode attribute: user; value: String. (Required).
|
53 |
+
* **Order:** this option appears if you select "Uploaded by a user" as Video feed type. Shortcode attribute: feed_order; value: date (default), rating, relevance, title, videoCount or viewCount. (Optional).
|
54 |
+
* date: Resources are sorted in reverse chronological order based on the date they were created.
|
55 |
+
* rating: Resources are sorted from highest to lowest rating.
|
56 |
+
* relevance: Resources are sorted based on their relevance to the search query. This is the default value for this parameter.
|
57 |
+
* title: Resources are sorted alphabetically by title.
|
58 |
+
* videoCount: Channels are sorted in descending order of their number of uploaded videos.
|
59 |
+
* viewCount: Resources are sorted from highest to lowest number of views.
|
60 |
+
|
61 |
* **Cache time (hours):** Hours that RSS data is saved in database, to not make a request every time the page is displayed. Assign this value according to how often you upgrade your playlist in YouTube. Shortcode attribute: cache_time; value: Number. (Optional).
|
62 |
+
|
63 |
+
* **Activate cache:** If you disable this field the cache will be deleted and will not be used. This is useful to refresh immediately the YouTube RSS used by the plugin. Reenable the cache when the gallery shows the changes you made in your YouTube account. Shortcode attribute: cache; values: 0(default) or 1 . (Optional).
|
64 |
+
|
65 |
|
66 |
**Player tab:**
|
67 |
|
68 |
+
* **Player:** select where you want to play the video. Shortcode attribute: player; values: 0, 1 (default) or 2. (Optional).
|
69 |
+
* Without player: When you click on thumbnails they will go to the YouTube video page.
|
70 |
+
* Show player: Youtube player will be shown and when you click on a thumbnail the video will start playing on this player.
|
71 |
+
* Magnific Popup: Youtube player will not be shown and when you click on a thumbnail a [modal window](http://dimsemenov.com/plugins/magnific-popup/) will appear and the video will begin playing in it.
|
72 |
+
|
73 |
* **Width:** Width of player. Shortcode attribute:** width_value; values: Number. 100 (default). (Optional).
|
74 |
+
|
75 |
+
* **Width dimensions:** dimension of player width. Shortcode attribute: width_type; values: % (default) or px. (Optional).
|
76 |
+
|
77 |
+
* **Aspect ratio:** indicates the proportions of the player, standard (4:3) or widescreen (16:9) format. Shortcode attribute: ratio; values: 4x3 or 16x9 (default). (Optional).
|
78 |
+
|
79 |
* **Theme:** display player controls (like a 'play' button or volume control) within a dark or light control bar. Shortcode attribute: theme; values: dark (default) or light. (Optional).
|
80 |
+
|
81 |
* **Progress bar color:** specifies the color that will be used in the player's video progress bar to highlight the amount of the video that the viewer has already seen. Shortcode attribute: color; values: red (default) or white. (Optional).
|
82 |
+
|
83 |
* **Video quality:** sets the suggested video quality for the videos. The suggested quality parameter value can be small, medium, large, hd720, hd1080, highres or default. YouTube recommend that you set the parameter value to default, which instructs YouTube to select the most appropriate playback quality, which will vary for different users, videos, systems and other playback conditions. If you set suggested quality level that is not available for the video, then the quality will be set to the next lowest level that is available. Shortcode attribute: quality; values: small, medium, large, hd720, hd1080, highres or default (default). (Optional).
|
84 |
+
|
85 |
* **Autoplay:** automatically play the initial video when the player loads. Shortcode attribute: autoplay; values: 0 (default) or 1. (Optional).
|
86 |
+
|
87 |
* **Show YouTube logo:** Activate this field to show the YouTube logo in the control bar. Setting the color parameter to white will show the YouTube logo in the control bar. Shortcode attribute: modestbranding; values: 0 (default) or 1. (Optional).
|
88 |
+
|
89 |
* **Show related videos:** this parameter indicates whether the player should show related videos when playback of the initial video ends. Shortcode attribute: rel; values: 0 (default) or 1. (Optional).
|
90 |
+
|
91 |
* **Show info (title, uploader):** display information like the video title and rating before the video starts playing. Shortcode attribute: showinfo; values: 0 (default) or 1. (Optional).
|
92 |
+
|
93 |
* **Order:** order of player. Shortcode attribute: player_order; values: Number. 1 (default). (Optional).
|
94 |
|
95 |
+
|
96 |
**Thumbnails tab:**
|
97 |
|
98 |
+
* **Number of videos to show:** it must be a number indicating the number of thumbnails to be displayed for each page. Shortcode attribute: maxitems; value: Number. (Optional).
|
99 |
+
|
100 |
+
* **Thumbnail resolution:** indicates the resolution of thumbnails Default (120x90 px), Medium (320x180), High (480x360). Shortcode attribute: thumb_width; value: Number. 320 (default). (Optional).
|
101 |
+
|
102 |
+
* **Aspect ratio:** indicates the proportions of the thumbnails, standard (4:3) or widescreen (16:9) format. Shortcode attribute: thumb_ratio; values: 4x3 or 16x9 (default). (Optional).
|
103 |
+
|
104 |
* **Thumbnail columns:** it allows to control the number of columns in which the thumbnails are distributed. It uses [Bootstrap Grid system](http://getbootstrap.com/css/#grid) to allow responsive behavior. Shortcode attribute: thumb_columns_phones (Phones), thumb_columns_tablets (Tablets), thumb_columns_md (Medium Desktops), thumb_columns_ld (Large Desktops); value: Number. Max value 12. (Optional).
|
105 |
+
|
|
|
106 |
* **Show title:** it displays the title of the thumbnail with a link to play the video in the player. Shortcode attribute: title; values: 0 (default) or 1. (Optional).
|
107 |
+
|
108 |
* **Show description:** it shows the description of the thumbnail with the number of specified words. Shortcode attribute: description; values: 0 (default) or 1. (Optional).
|
109 |
+
|
110 |
* **Title tag:** select an appropriate tag for the title. Shortcode attribute: title_tag; values: h1, h2, h3, h4, h5 (default), h6. (Optional).
|
111 |
+
|
112 |
* **Description words number:** the maximum number of words displayed in the description. Shortcode attribute: description_words_number; value: Number. (Optional).
|
113 |
|
114 |
+
* **Thumbnail alignment:** it defines the alignment of the thumbnail respect to its description and title. Shortcode attribute: thumbnail_alignment; values: none (default), left, right. (Optional).
|
115 |
+
|
116 |
+
* **Thumbnail alignment width:** this option will be displayed if the alignment Thumbnail option is set as left or right. It is used to assign a relative size to thumbnails. Shortcode attribute: thumbnail_alignment_width; values: extra_small, small, half (default), large, extra_large. (Optional).
|
117 |
+
|
118 |
+
* **Minimum size with alignment:** it is useful to only use the alignment from a selected size. For example, if you do not want to use alignment on mobile devices, so that the thumbnails are not visible too small, you can select tablets option. Shortcode attribute: thumbnail_alignment_device; values: all (default), tablets, medium, large. (Optional).
|
119 |
+
|
120 |
+
* **Add "nofollow" attribute to links:** "nofollow" attribute provides a way for webmasters to tell search engines "Don't follow this specific link". Shortcode attribute: nofollow; values: 0 (default) or 1. (Optional).
|
121 |
+
|
122 |
+
* **Open in a new window or tab:** this option only appears if you select to use the gallery without player. Thumbnails links will open in a new window or tab. Shortcode attribute: thumb_window; values: 0 (default) or 1. (Optional).
|
123 |
+
|
124 |
+
* **Show pagination:** It shows a simple pagination with Next and Previous buttons, and information of page number and total pages. Take into account the warning from google: "Please note that the value is an approximation and may not represent an exact value. In addition, the maximum value is 1,000,000". I have observed that this value does not work properly on Youtube accounts with many videos. Shortcode attribute: thumb_pagination; values: 0 or 1 (default). (Optional).
|
125 |
+
|
126 |
+
|
127 |
**Link tab:**
|
128 |
|
129 |
* **Link text:** field to customize the text of the link to the gallery on YouTube. Shortcode attribute: link_tx; value: String. (Optional).
|
130 |
+
|
131 |
* **Show link to channel:** option to display a link to the YouTube user channel. Shortcode attribute: link; values: 0 (default) or 1. (Optional).
|
132 |
+
|
133 |
* **Open in a new window or tab:** option to open the link to YouTube in a new window or tab . Shortcode attribute: link_window; values: 0 (default) or 1. (Optional).
|
134 |
+
|
135 |
* **Show link to thank the developer:** option to add a small link to home page of the developer . Shortcode attribute: promotion; values: 0 or 1 (default). (Optional).
|
136 |
|
137 |
|
138 |
= Shortcode syntax: =
|
139 |
+
Example of shortcode use:
|
140 |
|
141 |
+
`[Youtube_Channel_Gallery user="apple" maxitems="16" thumb_columns_phones="2" thumb_columns_tablets="4" ]`
|
142 |
|
143 |
|
144 |
= Languages: =
|
146 |
* Italian (it_IT) - [Marco Milesi](https://profiles.wordpress.org/milmor).
|
147 |
* Spanish (es_ES) - [PoseLab](http://poselab.com/)
|
148 |
|
|
|
149 |
If you have created your own language pack, or have an update of an existing one, you can [send me](mailto:javierpose@gmail.com) your gettext PO and MO so that I can bundle it into the Youtube Channel Gallery.
|
150 |
|
151 |
|
199 |
|
200 |
== Changelog ==
|
201 |
|
202 |
+
= 2.2 =
|
203 |
+
* Optimization of cache use.
|
204 |
+
* Fixed Playlists order option and added the options allowed by YouTube api 3: Date Order, Rating Order, Relevance Order, Title Order, View Count Order.
|
205 |
+
* Fixed thumbail link in pages with multiple instances of the plugin.
|
206 |
+
* Added pagination of thumbnails. Take into account YouTube API does not correctly calculate the total number of videos in channels with a lot of videos.
|
207 |
+
* Added new video feed types: user's favorites and user's likes.
|
208 |
+
* JavaScript optimization.
|
209 |
+
* Link optimization.
|
210 |
+
* Error message optimization.
|
211 |
+
* Rows optimization: solution for column numbers that are not multiples between them.
|
212 |
+
* Added support for grids of 5, 7, 8, 9, 10 and 11.
|
213 |
+
* Improved interface of widget.
|
214 |
+
* id in top of styles.css for bigger precedence.
|
215 |
+
* Redesign system of aligned thumbnails to right or left with a relative thumbnail size to make it responsive and selection of minimum size of alignment.
|
216 |
+
* Added field and shortcode attribute thumbnail_alignment_width.
|
217 |
+
* Added field and shortcode attribute thumbnail_alignment_device.
|
218 |
+
* Control of private videos.
|
219 |
|
220 |
= 2.0.2 =
|
221 |
* Delete debug element.
|
236 |
|
237 |
= 1.8.7 =
|
238 |
* Fixed problem with SSL.
|
239 |
+
* Changes in CSS to correct IE columns.
|
240 |
|
241 |
= 1.8.6 =
|
242 |
* Check accounts suspended.
|
243 |
* SSL support (checks if HTTPS or on Port 443). Be aware that the YouTube player is not fully compatible with SSL. See [HTTPS Support for YouTube Embeds](http://apiblog.youtube.com/2011/02/https-support-for-youtube-embeds.html)
|
244 |
+
* Changes in CSS to correct IE support.
|
245 |
|
246 |
= 1.8.5 =
|
247 |
* Added option to show only thumbnails without player.
|
275 |
* Replaced SimplePie for SimpleXML to solve problems that many users have with Simplepie.
|
276 |
* Replaced SimplePie FeedCache for Transients API cache data to manage cache of RSS.
|
277 |
* Added a field to set the number of hours to keep the data before refreshing.
|
278 |
+
* Added a checkbox to deactivate the cache. Useful to check or flush new videos.
|
279 |
* Added default values.
|
280 |
* Changed the max-results parameter to 50 to allow the maximum display value of a single request.
|
281 |
* Fixed row counter with multiple instances of the plugin in the same page.
|
316 |
* Corrected order of playlists videos.
|
317 |
* Enqueue of admin style only in widget page.
|
318 |
* admin-styles.css tweaks.
|
319 |
+
* Update widget form after drag-and-drop (WP save bug).
|
320 |
+
* Added scroll to player only if not in view.
|
321 |
|
322 |
= 1.7.4.2 =
|
323 |
* Corrected problem with jQuery.noConflict.
|
337 |
* Added playlist feed support.
|
338 |
* Added control to select video quality.
|
339 |
* Added control to open link to Youtube in a new window.
|
340 |
+
* Improved accessibility of video links.
|
341 |
* Fixed bug with 1 column.
|
342 |
* CSS improvements.
|
343 |
|
398 |
* Multiple instances of the plugin on the same page.
|
399 |
* Added theme selector.
|
400 |
* Improved use of Iframe YouTube Player API (now synchronous).
|
401 |
+
* Added effect: hover on thumbnails to display a play button.
|
402 |
|
403 |
= 1.0 =
|
404 |
+
* Initial Release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scripts.js
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
/*------------------------------------------------------------
|
2 |
Plugin Name: Youtube Channel Gallery
|
3 |
Plugin URI: http://www.poselab.com/
|
4 |
-
Version: 2.
|
5 |
Description: Show a youtube video and a gallery of thumbnails for a youtube channel.
|
6 |
------------------------------------------------------------*/
|
7 |
jQuery(document).ready(function($) {
|
8 |
|
|
|
9 |
//thumbnails
|
10 |
var ytcplayer = {};
|
11 |
$('.youtubechannelgallery').on('click', '.ytclink', function(e) {
|
@@ -62,66 +63,46 @@ jQuery(document).ready(function($) {
|
|
62 |
}
|
63 |
}
|
64 |
|
|
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
jQuery('.ytc-td-bottom .ytc-row .ytctitledesc-cont').each(function() {
|
75 |
-
|
76 |
-
$el = jQuery(this);
|
77 |
-
topPostion = $el.position().top;
|
78 |
-
|
79 |
-
if (currentRowStart != topPostion) {
|
80 |
-
// we just came to a new row. Set all the heights on the completed row
|
81 |
-
for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
|
82 |
-
rowDivs[currentDiv].height(currentTallest);
|
83 |
-
}
|
84 |
-
// set the variables for the new row
|
85 |
-
rowDivs.length = 0; // empty the array
|
86 |
-
currentRowStart = topPostion;
|
87 |
-
currentTallest = $el.height();
|
88 |
-
rowDivs.push($el);
|
89 |
-
} else {
|
90 |
-
// another div on the current row. Add it to the list and check if it's taller
|
91 |
-
rowDivs.push($el);
|
92 |
-
currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
|
93 |
-
}
|
94 |
-
|
95 |
-
// do the last row
|
96 |
-
for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
|
97 |
-
rowDivs[currentDiv].height(currentTallest);
|
98 |
-
}
|
99 |
-
|
100 |
-
});
|
101 |
-
|
102 |
-
$('.widget.youtubechannelgallery').on('click', '.ytc-paginationlink', function(e) {
|
103 |
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
$.ajax({
|
110 |
url: ytcAjax.ajaxurl,
|
111 |
type: 'POST',
|
112 |
data: {
|
113 |
action: 'ytc_next',
|
|
|
114 |
token: token,
|
115 |
cid: cid,
|
116 |
-
playlist: playlist
|
|
|
|
|
117 |
},
|
118 |
success: function(data) {
|
119 |
|
120 |
-
|
121 |
|
122 |
-
widget.find('.ytc-
|
123 |
-
|
124 |
-
widget.find('.ytc-thumbnails').prepend(data);
|
125 |
|
126 |
$('.popup-youtube').magnificPopup({
|
127 |
disableOn: 700,
|
@@ -141,22 +122,23 @@ jQuery(document).ready(function($) {
|
|
141 |
return true;
|
142 |
});
|
143 |
|
144 |
-
$('.
|
145 |
|
146 |
var $this = $(this);
|
147 |
|
148 |
if (e.type === 'blur' || e.type === 'focusout' || (e.type === 'keyup' && e.which === 13)) {
|
149 |
|
150 |
-
var $widget = $('.
|
151 |
-
wid = $
|
152 |
cid = $this.data('cid'),
|
153 |
-
tag = $widget.find('.select
|
154 |
|
155 |
$.ajax({
|
156 |
url: ytcAjax.ajaxurl,
|
157 |
type: 'POST',
|
158 |
data: {
|
159 |
action: 'ytc_search',
|
|
|
160 |
cid: cid,
|
161 |
q: this.value,
|
162 |
tag: tag
|
@@ -168,12 +150,7 @@ jQuery(document).ready(function($) {
|
|
168 |
return;
|
169 |
}
|
170 |
|
171 |
-
|
172 |
-
|
173 |
-
widget.find('ytc-thumbnails').remove();
|
174 |
-
widget.find('.ytc-paginationlink').remove();
|
175 |
-
|
176 |
-
widget.prepend(data);
|
177 |
|
178 |
$('.popup-youtube').magnificPopup({
|
179 |
disableOn: 700,
|
@@ -193,4 +170,50 @@ jQuery(document).ready(function($) {
|
|
193 |
}
|
194 |
return true;
|
195 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
});
|
1 |
/*------------------------------------------------------------
|
2 |
Plugin Name: Youtube Channel Gallery
|
3 |
Plugin URI: http://www.poselab.com/
|
4 |
+
Version: 2.2
|
5 |
Description: Show a youtube video and a gallery of thumbnails for a youtube channel.
|
6 |
------------------------------------------------------------*/
|
7 |
jQuery(document).ready(function($) {
|
8 |
|
9 |
+
var PAGE = {};
|
10 |
//thumbnails
|
11 |
var ytcplayer = {};
|
12 |
$('.youtubechannelgallery').on('click', '.ytclink', function(e) {
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
$('.youtubechannelgallery').on('click', '.ytc-paginationlink', function(e) {
|
67 |
|
68 |
+
var $this = $(this),
|
69 |
+
$widget = $this.parents('.youtubechannelgallery'),
|
70 |
+
token = $this.data('token'),
|
71 |
+
playlist = $this.data('playlist'),
|
72 |
+
cid = $this.data('cid'),
|
73 |
+
wid = $widget.find('[id^=ytc-]').attr('id'),
|
74 |
+
$search = $widget.find('.search'),
|
75 |
+
$searchSelect = $widget.find('.search-select');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
+
if (PAGE[wid]) {
|
78 |
+
if ($this.hasClass('ytc-next')) {
|
79 |
+
PAGE[wid] += 1;
|
80 |
+
}
|
81 |
+
else {
|
82 |
+
PAGE[wid] -= 1;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
else {
|
86 |
+
PAGE[wid] = 2;
|
87 |
+
}
|
88 |
|
89 |
$.ajax({
|
90 |
url: ytcAjax.ajaxurl,
|
91 |
type: 'POST',
|
92 |
data: {
|
93 |
action: 'ytc_next',
|
94 |
+
wid: wid,
|
95 |
token: token,
|
96 |
cid: cid,
|
97 |
+
playlist: playlist,
|
98 |
+
search: $search.length ? $search.val() : '',
|
99 |
+
tag: $searchSelect.length ? $searchSelect.val() : ''
|
100 |
},
|
101 |
success: function(data) {
|
102 |
|
103 |
+
$widget.find('.ytc-thumbnails').html(data);
|
104 |
|
105 |
+
$widget.find('.ytc-currentpage').html(PAGE[wid]);
|
|
|
|
|
106 |
|
107 |
$('.popup-youtube').magnificPopup({
|
108 |
disableOn: 700,
|
122 |
return true;
|
123 |
});
|
124 |
|
125 |
+
$('.youtubechannelgallery').on('keyup blur', '.search', function(e) {
|
126 |
|
127 |
var $this = $(this);
|
128 |
|
129 |
if (e.type === 'blur' || e.type === 'focusout' || (e.type === 'keyup' && e.which === 13)) {
|
130 |
|
131 |
+
var $widget = $this.parents('.youtubechannelgallery'),
|
132 |
+
wid = $widget.find('[id^=ytc-]').attr('id'),
|
133 |
cid = $this.data('cid'),
|
134 |
+
tag = $widget.find('.search-select').val();
|
135 |
|
136 |
$.ajax({
|
137 |
url: ytcAjax.ajaxurl,
|
138 |
type: 'POST',
|
139 |
data: {
|
140 |
action: 'ytc_search',
|
141 |
+
wid: wid,
|
142 |
cid: cid,
|
143 |
q: this.value,
|
144 |
tag: tag
|
150 |
return;
|
151 |
}
|
152 |
|
153 |
+
$widget.find('.ytc-thumbnails').html(data);
|
|
|
|
|
|
|
|
|
|
|
154 |
|
155 |
$('.popup-youtube').magnificPopup({
|
156 |
disableOn: 700,
|
170 |
}
|
171 |
return true;
|
172 |
});
|
173 |
+
|
174 |
+
$('.youtubechannelgallery').on('change', '.search-select', function(e) {
|
175 |
+
|
176 |
+
var $this = $(this);
|
177 |
+
|
178 |
+
var $widget = $this.parents('.youtubechannelgallery'),
|
179 |
+
wid = $widget.find('[id^=ytc-]').attr('id'),
|
180 |
+
cid = $this.data('cid'),
|
181 |
+
$search = $widget.find('.search');
|
182 |
+
|
183 |
+
$.ajax({
|
184 |
+
url: ytcAjax.ajaxurl,
|
185 |
+
type: 'POST',
|
186 |
+
data: {
|
187 |
+
action: 'ytc_search',
|
188 |
+
wid: wid,
|
189 |
+
cid: cid,
|
190 |
+
q: $search.length ? $search.val() : '',
|
191 |
+
tag: $this.val()
|
192 |
+
},
|
193 |
+
success: function(data) {
|
194 |
+
|
195 |
+
if (data === '') {
|
196 |
+
$this.val('');
|
197 |
+
return;
|
198 |
+
}
|
199 |
+
|
200 |
+
$widget.find('.ytc-thumbnails').html(data);
|
201 |
+
|
202 |
+
$('.popup-youtube').magnificPopup({
|
203 |
+
disableOn: 700,
|
204 |
+
type: 'iframe',
|
205 |
+
mainClass: 'mfp-fade',
|
206 |
+
removalDelay: 160,
|
207 |
+
preloader: false,
|
208 |
+
|
209 |
+
fixedContentPos: false,
|
210 |
+
gallery: {
|
211 |
+
enabled:true
|
212 |
+
}
|
213 |
+
});
|
214 |
+
}
|
215 |
+
});
|
216 |
+
|
217 |
+
return true;
|
218 |
+
});
|
219 |
});
|
styles.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.ytc-pslb .container{margin-right:auto;margin-left:auto;padding-left:7px;padding-right:7px}@media (min-width:768px){.ytc-pslb .container{width:734px}}@media (min-width:992px){.ytc-pslb .container{width:954px}}@media (min-width:1200px){.ytc-pslb .container{width:1154px}}.ytc-pslb .container-fluid{margin-right:auto;margin-left:auto;padding-left:7px;padding-right:7px}.ytc-pslb .row{margin-left:-7px;margin-right:-7px}.ytc-pslb .col-xs-1,.ytc-pslb .col-sm-1,.ytc-pslb .col-md-1,.ytc-pslb .col-lg-1,.ytc-pslb .col-xs-2,.ytc-pslb .col-sm-2,.ytc-pslb .col-md-2,.ytc-pslb .col-lg-2,.ytc-pslb .col-xs-3,.ytc-pslb .col-sm-3,.ytc-pslb .col-md-3,.ytc-pslb .col-lg-3,.ytc-pslb .col-xs-4,.ytc-pslb .col-sm-4,.ytc-pslb .col-md-4,.ytc-pslb .col-lg-4,.ytc-pslb .col-xs-5,.ytc-pslb .col-sm-5,.ytc-pslb .col-md-5,.ytc-pslb .col-lg-5,.ytc-pslb .col-xs-6,.ytc-pslb .col-sm-6,.ytc-pslb .col-md-6,.ytc-pslb .col-lg-6,.ytc-pslb .col-xs-7,.ytc-pslb .col-sm-7,.ytc-pslb .col-md-7,.ytc-pslb .col-lg-7,.ytc-pslb .col-xs-8,.ytc-pslb .col-sm-8,.ytc-pslb .col-md-8,.ytc-pslb .col-lg-8,.ytc-pslb .col-xs-9,.ytc-pslb .col-sm-9,.ytc-pslb .col-md-9,.ytc-pslb .col-lg-9,.ytc-pslb .col-xs-10,.ytc-pslb .col-sm-10,.ytc-pslb .col-md-10,.ytc-pslb .col-lg-10,.ytc-pslb .col-xs-11,.ytc-pslb .col-sm-11,.ytc-pslb .col-md-11,.ytc-pslb .col-lg-11,.ytc-pslb .col-xs-12,.ytc-pslb .col-sm-12,.ytc-pslb .col-md-12,.ytc-pslb .col-lg-12{position:relative;min-height:1px;padding-left:7px;padding-right:7px}.ytc-pslb .col-xs-1,.ytc-pslb .col-xs-2,.ytc-pslb .col-xs-3,.ytc-pslb .col-xs-4,.ytc-pslb .col-xs-5,.ytc-pslb .col-xs-6,.ytc-pslb .col-xs-7,.ytc-pslb .col-xs-8,.ytc-pslb .col-xs-9,.ytc-pslb .col-xs-10,.ytc-pslb .col-xs-11,.ytc-pslb .col-xs-12{float:left}.ytc-pslb .col-xs-12{width:100%}.ytc-pslb .col-xs-11{width:91.66666667%}.ytc-pslb .col-xs-10{width:83.33333333%}.ytc-pslb .col-xs-9{width:75%}.ytc-pslb .col-xs-8{width:66.66666667%}.ytc-pslb .col-xs-7{width:58.33333333%}.ytc-pslb .col-xs-6{width:50%}.ytc-pslb .col-xs-5{width:41.66666667%}.ytc-pslb .col-xs-4{width:33.33333333%}.ytc-pslb .col-xs-3{width:25%}.ytc-pslb .col-xs-2{width:16.66666667%}.ytc-pslb .col-xs-1{width:8.33333333%}@media (min-width:768px){.ytc-pslb .col-sm-1,.ytc-pslb .col-sm-2,.ytc-pslb .col-sm-3,.ytc-pslb .col-sm-4,.ytc-pslb .col-sm-5,.ytc-pslb .col-sm-6,.ytc-pslb .col-sm-7,.ytc-pslb .col-sm-8,.ytc-pslb .col-sm-9,.ytc-pslb .col-sm-10,.ytc-pslb .col-sm-11,.ytc-pslb .col-sm-12{float:left}.ytc-pslb .col-sm-12{width:100%}.ytc-pslb .col-sm-11{width:91.66666667%}.ytc-pslb .col-sm-10{width:83.33333333%}.ytc-pslb .col-sm-9{width:75%}.ytc-pslb .col-sm-8{width:66.66666667%}.ytc-pslb .col-sm-7{width:58.33333333%}.ytc-pslb .col-sm-6{width:50%}.ytc-pslb .col-sm-5{width:41.66666667%}.ytc-pslb .col-sm-4{width:33.33333333%}.ytc-pslb .col-sm-3{width:25%}.ytc-pslb .col-sm-2{width:16.66666667%}.ytc-pslb .col-sm-1{width:8.33333333%}}@media (min-width:992px){.ytc-pslb .col-md-1,.ytc-pslb .col-md-2,.ytc-pslb .col-md-3,.ytc-pslb .col-md-4,.ytc-pslb .col-md-5,.ytc-pslb .col-md-6,.ytc-pslb .col-md-7,.ytc-pslb .col-md-8,.ytc-pslb .col-md-9,.ytc-pslb .col-md-10,.ytc-pslb .col-md-11,.ytc-pslb .col-md-12{float:left}.ytc-pslb .col-md-12{width:100%}.ytc-pslb .col-md-11{width:91.66666667%}.ytc-pslb .col-md-10{width:83.33333333%}.ytc-pslb .col-md-9{width:75%}.ytc-pslb .col-md-8{width:66.66666667%}.ytc-pslb .col-md-7{width:58.33333333%}.ytc-pslb .col-md-6{width:50%}.ytc-pslb .col-md-5{width:41.66666667%}.ytc-pslb .col-md-4{width:33.33333333%}.ytc-pslb .col-md-3{width:25%}.ytc-pslb .col-md-2{width:16.66666667%}.ytc-pslb .col-md-1{width:8.33333333%}}@media (min-width:1200px){.ytc-pslb .col-lg-1,.ytc-pslb .col-lg-2,.ytc-pslb .col-lg-3,.ytc-pslb .col-lg-4,.ytc-pslb .col-lg-5,.ytc-pslb .col-lg-6,.ytc-pslb .col-lg-7,.ytc-pslb .col-lg-8,.ytc-pslb .col-lg-9,.ytc-pslb .col-lg-10,.ytc-pslb .col-lg-11,.ytc-pslb .col-lg-12{float:left}.ytc-pslb .col-lg-12{width:100%}.ytc-pslb .col-lg-11{width:91.66666667%}.ytc-pslb .col-lg-10{width:83.33333333%}.ytc-pslb .col-lg-9{width:75%}.ytc-pslb .col-lg-8{width:66.66666667%}.ytc-pslb .col-lg-7{width:58.33333333%}.ytc-pslb .col-lg-6{width:50%}.ytc-pslb .col-lg-5{width:41.66666667%}.ytc-pslb .col-lg-4{width:33.33333333%}.ytc-pslb .col-lg-3{width:25%}.ytc-pslb .col-lg-2{width:16.66666667%}.ytc-pslb .col-lg-1{width:8.33333333%}}.ytc-pslb .embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.ytc-pslb .embed-responsive .embed-responsive-item,.ytc-pslb .embed-responsive iframe,.ytc-pslb .embed-responsive embed,.ytc-pslb .embed-responsive object,.ytc-pslb .embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.ytc-pslb .embed-responsive-16by9{padding-bottom:56.25%}.ytc-pslb .embed-responsive-4by3{padding-bottom:75%}.ytc-pslb .clearfix:before,.ytc-pslb .clearfix:after,.ytc-pslb .container:before,.ytc-pslb .container:after,.ytc-pslb .container-fluid:before,.ytc-pslb .container-fluid:after,.ytc-pslb .row:before,.ytc-pslb .row:after{content:" ";display:table}.ytc-pslb .clearfix:after,.ytc-pslb .container:after,.ytc-pslb .container-fluid:after,.ytc-pslb .row:after{clear:both}.ytc-pslb .center-block{display:block;margin-left:auto;margin-right:auto}.ytc-pslb .pull-right{float:right!important}.ytc-pslb .pull-left{float:left!important}.ytc-pslb .hide{display:none!important}.ytc-pslb .show{display:block!important}.ytc-pslb .invisible{visibility:hidden}.ytc-pslb .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.ytc-pslb .hidden{display:none!important}.ytc-pslb .affix{position:fixed}.ytc-pslb div{margin:0;padding:0}.ytc-pslb *{-webkit-box-sizing:border-box!important;box-sizing:border-box!important}.ytc-pslb :before,.ytc-pslb :after{-webkit-box-sizing:border-box!important;box-sizing:border-box!important}.ytc-pslb.container-fluid{padding:0!important}.ytc-pslb.ytcplayer-wrapper{border:1px solid #999;margin-bottom:14px}.ytc-pslb.ytcplayer-wrapper iframe{margin:0!important;padding:0!important}.ytc-pslb.ytc-thumbnails{padding:0!important}.ytc-pslb.ytc-thumbnails .ytc-row .ytc-column{margin-left:0!important;margin-right:0!important;-webkit-box-sizing:border-box!important;box-sizing:border-box!important;position:relative!important;margin-bottom:10px}.ytc-pslb.ytc-thumbnails.ytc-thumb-align-left .ytcthumb-cont{top:0;left:7px;position:absolute}.ytc-pslb.ytc-thumbnails.ytc-thumb-align-right .ytcthumb-cont{top:0;right:7px;position:absolute}.ytc-pslb.ytc-thumbnails a.ytcthumb{padding-bottom:55%!important}.ytc-pslb.ytc-thumbnails.ytc-thumb4x3 a.ytcthumb{padding-bottom:75%!important}.ytc-pslb.ytc-thumbnails a.ytcthumb{display:block!important;border:1px solid #999;position:relative!important;line-height:0!important;width:100%!important;padding-top:0!important;padding-left:0!important;padding-right:0!important;margin:0!important;height:0!important;overflow:hidden!important;background-size:cover!important;background-position:center!important}.ytc-pslb.ytc-thumbnails a.ytcthumb:hover{opacity:.75}.ytc-pslb.ytc-thumbnails a.ytcthumb .ytcplay{background:url(img/play.png) no-repeat!important;background-position:-9999px -9999px!important;position:absolute!important;width:100%!important;height:100%!important}.ytc-pslb.ytc-thumbnails a.ytcthumb:hover .ytcplay{background-position:center center!important}.ytc-pslb.ytc-thumbnails p{display:none!important}.ytc-pslb.ytc-thumbnails .ytc-pagination{margin-top:16px}.ytc-pslb.ytc-thumbnails .ytc-pagination div.ytc-next{text-align:right}.ytc-pslb.ytc-thumbnails .ytc-pagination a{cursor:pointer}.ytc-pslb.ytc-thumbnails .ytc-pagination .ytc-numeration{text-align:center}.ytc-pslb.ytc-links{margin-top:16px}.ytc-pslb.ytc-links .ytc-promotion a{font-size:10px;opacity:.3}.ytc-pslb.ytc-links .ytc-youtubelink{text-align:right}
|
1 |
+
#ytc-wrapper .col-xs-2-4,#ytc-wrapper .col-sm-2-4,#ytc-wrapper .col-md-2-4,#ytc-wrapper .col-lg-2-4{position:relative;min-height:1px;padding-right:7px;padding-left:7px}#ytc-wrapper .col-xs-2-4{float:left}@media (min-width:768px){#ytc-wrapper .col-sm-2-4{float:left}}@media (min-width:992px){#ytc-wrapper .col-md-2-4{float:left}}@media (min-width:1200px){#ytc-wrapper .col-lg-2-4{float:left}}#ytc-wrapper .col-xs-1-7,#ytc-wrapper .col-sm-1-7,#ytc-wrapper .col-md-1-7,#ytc-wrapper .col-lg-1-7{position:relative;min-height:1px;padding-right:7px;padding-left:7px}#ytc-wrapper .col-xs-1-7{float:left}@media (min-width:768px){#ytc-wrapper .col-sm-1-7{float:left}}@media (min-width:992px){#ytc-wrapper .col-md-1-7{float:left}}@media (min-width:1200px){#ytc-wrapper .col-lg-1-7{float:left}}#ytc-wrapper .col-xs-1-5,#ytc-wrapper .col-sm-1-5,#ytc-wrapper .col-md-1-5,#ytc-wrapper .col-lg-1-5{position:relative;min-height:1px;padding-right:7px;padding-left:7px}#ytc-wrapper .col-xs-1-5{float:left}@media (min-width:768px){#ytc-wrapper .col-sm-1-5{float:left}}@media (min-width:992px){#ytc-wrapper .col-md-1-5{float:left}}@media (min-width:1200px){#ytc-wrapper .col-lg-1-5{float:left}}#ytc-wrapper .col-xs-1-3,#ytc-wrapper .col-sm-1-3,#ytc-wrapper .col-md-1-3,#ytc-wrapper .col-lg-1-3{position:relative;min-height:1px;padding-right:7px;padding-left:7px}#ytc-wrapper .col-xs-1-3{float:left}@media (min-width:768px){#ytc-wrapper .col-sm-1-3{float:left}}@media (min-width:992px){#ytc-wrapper .col-md-1-3{float:left}}@media (min-width:1200px){#ytc-wrapper .col-lg-1-3{float:left}}#ytc-wrapper .col-xs-1-2,#ytc-wrapper .col-sm-1-2,#ytc-wrapper .col-md-1-2,#ytc-wrapper .col-lg-1-2{position:relative;min-height:1px;padding-right:7px;padding-left:7px}#ytc-wrapper .col-xs-1-2{float:left}@media (min-width:768px){#ytc-wrapper .col-sm-1-2{float:left}}@media (min-width:992px){#ytc-wrapper .col-md-1-2{float:left}}@media (min-width:1200px){#ytc-wrapper .col-lg-1-2{float:left}}#ytc-wrapper .col-xs-1-1,#ytc-wrapper .col-sm-1-1,#ytc-wrapper .col-md-1-1,#ytc-wrapper .col-lg-1-1{position:relative;min-height:1px;padding-right:7px;padding-left:7px}#ytc-wrapper .col-xs-1-1{float:left}@media (min-width:768px){#ytc-wrapper .col-sm-1-1{float:left}}@media (min-width:992px){#ytc-wrapper .col-md-1-1{float:left}}@media (min-width:1200px){#ytc-wrapper .col-lg-1-1{float:left}}#ytc-wrapper audio,#ytc-wrapper canvas,#ytc-wrapper progress,#ytc-wrapper video{display:inline-block;vertical-align:baseline}#ytc-wrapper a{background-color:transparent}#ytc-wrapper a:active,#ytc-wrapper a:hover{outline:0}#ytc-wrapper b,#ytc-wrapper strong{font-weight:700}#ytc-wrapper small{font-size:80%}#ytc-wrapper img{border:0}#ytc-wrapper svg:not(:root){overflow:hidden}#ytc-wrapper figure{margin:1em 40px}#ytc-wrapper .container{margin-right:auto;margin-left:auto;padding-left:7px!important;padding-right:7px!important}@media (min-width:768px){#ytc-wrapper .container{width:734px}}@media (min-width:992px){#ytc-wrapper .container{width:954px}}@media (min-width:1200px){#ytc-wrapper .container{width:1154px}}#ytc-wrapper .container-fluid{margin-right:auto;margin-left:auto;padding-left:7px!important;padding-right:7px!important}#ytc-wrapper .row{margin-left:-7px!important;margin-right:-7px!important}#ytc-wrapper .col-xs-1,#ytc-wrapper .col-sm-1,#ytc-wrapper .col-md-1,#ytc-wrapper .col-lg-1,#ytc-wrapper .col-xs-2,#ytc-wrapper .col-sm-2,#ytc-wrapper .col-md-2,#ytc-wrapper .col-lg-2,#ytc-wrapper .col-xs-3,#ytc-wrapper .col-sm-3,#ytc-wrapper .col-md-3,#ytc-wrapper .col-lg-3,#ytc-wrapper .col-xs-4,#ytc-wrapper .col-sm-4,#ytc-wrapper .col-md-4,#ytc-wrapper .col-lg-4,#ytc-wrapper .col-xs-5,#ytc-wrapper .col-sm-5,#ytc-wrapper .col-md-5,#ytc-wrapper .col-lg-5,#ytc-wrapper .col-xs-6,#ytc-wrapper .col-sm-6,#ytc-wrapper .col-md-6,#ytc-wrapper .col-lg-6,#ytc-wrapper .col-xs-7,#ytc-wrapper .col-sm-7,#ytc-wrapper .col-md-7,#ytc-wrapper .col-lg-7,#ytc-wrapper .col-xs-8,#ytc-wrapper .col-sm-8,#ytc-wrapper .col-md-8,#ytc-wrapper .col-lg-8,#ytc-wrapper .col-xs-9,#ytc-wrapper .col-sm-9,#ytc-wrapper .col-md-9,#ytc-wrapper .col-lg-9,#ytc-wrapper .col-xs-10,#ytc-wrapper .col-sm-10,#ytc-wrapper .col-md-10,#ytc-wrapper .col-lg-10,#ytc-wrapper .col-xs-11,#ytc-wrapper .col-sm-11,#ytc-wrapper .col-md-11,#ytc-wrapper .col-lg-11,#ytc-wrapper .col-xs-12,#ytc-wrapper .col-sm-12,#ytc-wrapper .col-md-12,#ytc-wrapper .col-lg-12{position:relative;min-height:1px;padding-left:7px!important;padding-right:7px!important}#ytc-wrapper .col-xs-1,#ytc-wrapper .col-xs-2,#ytc-wrapper .col-xs-3,#ytc-wrapper .col-xs-4,#ytc-wrapper .col-xs-5,#ytc-wrapper .col-xs-6,#ytc-wrapper .col-xs-7,#ytc-wrapper .col-xs-8,#ytc-wrapper .col-xs-9,#ytc-wrapper .col-xs-10,#ytc-wrapper .col-xs-11,#ytc-wrapper .col-xs-12{float:left}#ytc-wrapper .col-xs-12{width:100%}#ytc-wrapper .col-xs-11{width:91.66666667%}#ytc-wrapper .col-xs-10{width:83.33333333%}#ytc-wrapper .col-xs-9{width:75%}#ytc-wrapper .col-xs-8{width:66.66666667%}#ytc-wrapper .col-xs-7{width:58.33333333%}#ytc-wrapper .col-xs-6{width:50%}#ytc-wrapper .col-xs-5{width:41.66666667%}#ytc-wrapper .col-xs-4{width:33.33333333%}#ytc-wrapper .col-xs-3{width:25%}#ytc-wrapper .col-xs-2-4{width:20%}#ytc-wrapper .col-xs-2{width:16.66666667%}#ytc-wrapper .col-xs-1-7{width:14.28571429%}#ytc-wrapper .col-xs-1-5{width:12.5%}#ytc-wrapper .col-xs-1-3{width:11.11111111%}#ytc-wrapper .col-xs-1-2{width:10%}#ytc-wrapper .col-xs-1-1{width:9.09090909%}#ytc-wrapper .col-xs-1{width:8.33333333%}@media (min-width:768px){#ytc-wrapper .col-sm-1,#ytc-wrapper .col-sm-2,#ytc-wrapper .col-sm-3,#ytc-wrapper .col-sm-4,#ytc-wrapper .col-sm-5,#ytc-wrapper .col-sm-6,#ytc-wrapper .col-sm-7,#ytc-wrapper .col-sm-8,#ytc-wrapper .col-sm-9,#ytc-wrapper .col-sm-10,#ytc-wrapper .col-sm-11,#ytc-wrapper .col-sm-12{float:left}#ytc-wrapper .col-sm-12{width:100%}#ytc-wrapper .col-sm-11{width:91.66666667%}#ytc-wrapper .col-sm-10{width:83.33333333%}#ytc-wrapper .col-sm-9{width:75%}#ytc-wrapper .col-sm-8{width:66.66666667%}#ytc-wrapper .col-sm-7{width:58.33333333%}#ytc-wrapper .col-sm-6{width:50%}#ytc-wrapper .col-sm-5{width:41.66666667%}#ytc-wrapper .col-sm-4{width:33.33333333%}#ytc-wrapper .col-sm-3{width:25%}#ytc-wrapper .col-sm-2-4{width:20%}#ytc-wrapper .col-sm-2{width:16.66666667%}#ytc-wrapper .col-sm-1-7{width:14.28571429%}#ytc-wrapper .col-sm-1-5{width:12.5%}#ytc-wrapper .col-sm-1-3{width:11.11111111%}#ytc-wrapper .col-sm-1-2{width:10%}#ytc-wrapper .col-sm-1-1{width:9.09090909%}#ytc-wrapper .col-sm-1{width:8.33333333%}}@media (min-width:992px){#ytc-wrapper .col-md-1,#ytc-wrapper .col-md-2,#ytc-wrapper .col-md-3,#ytc-wrapper .col-md-4,#ytc-wrapper .col-md-5,#ytc-wrapper .col-md-6,#ytc-wrapper .col-md-7,#ytc-wrapper .col-md-8,#ytc-wrapper .col-md-9,#ytc-wrapper .col-md-10,#ytc-wrapper .col-md-11,#ytc-wrapper .col-md-12{float:left}#ytc-wrapper .col-md-12{width:100%}#ytc-wrapper .col-md-11{width:91.66666667%}#ytc-wrapper .col-md-10{width:83.33333333%}#ytc-wrapper .col-md-9{width:75%}#ytc-wrapper .col-md-8{width:66.66666667%}#ytc-wrapper .col-md-7{width:58.33333333%}#ytc-wrapper .col-md-6{width:50%}#ytc-wrapper .col-md-5{width:41.66666667%}#ytc-wrapper .col-md-4{width:33.33333333%}#ytc-wrapper .col-md-3{width:25%}#ytc-wrapper .col-md-2-4{width:20%}#ytc-wrapper .col-md-2{width:16.66666667%}#ytc-wrapper .col-md-1-7{width:14.28571429%}#ytc-wrapper .col-md-1-5{width:12.5%}#ytc-wrapper .col-md-1-3{width:11.11111111%}#ytc-wrapper .col-md-1-2{width:10%}#ytc-wrapper .col-md-1-1{width:9.09090909%}#ytc-wrapper .col-md-1{width:8.33333333%}}@media (min-width:1200px){#ytc-wrapper .col-lg-1,#ytc-wrapper .col-lg-2,#ytc-wrapper .col-lg-3,#ytc-wrapper .col-lg-4,#ytc-wrapper .col-lg-5,#ytc-wrapper .col-lg-6,#ytc-wrapper .col-lg-7,#ytc-wrapper .col-lg-8,#ytc-wrapper .col-lg-9,#ytc-wrapper .col-lg-10,#ytc-wrapper .col-lg-11,#ytc-wrapper .col-lg-12{float:left}#ytc-wrapper .col-lg-12{width:100%}#ytc-wrapper .col-lg-11{width:91.66666667%}#ytc-wrapper .col-lg-10{width:83.33333333%}#ytc-wrapper .col-lg-9{width:75%}#ytc-wrapper .col-lg-8{width:66.66666667%}#ytc-wrapper .col-lg-7{width:58.33333333%}#ytc-wrapper .col-lg-6{width:50%}#ytc-wrapper .col-lg-5{width:41.66666667%}#ytc-wrapper .col-lg-4{width:33.33333333%}#ytc-wrapper .col-lg-3{width:25%}#ytc-wrapper .col-lg-2-4{width:20%}#ytc-wrapper .col-lg-2{width:16.66666667%}#ytc-wrapper .col-lg-1-7{width:14.28571429%}#ytc-wrapper .col-lg-1-5{width:12.5%}#ytc-wrapper .col-lg-1-3{width:11.11111111%}#ytc-wrapper .col-lg-1-2{width:10%}#ytc-wrapper .col-lg-1-1{width:9.09090909%}#ytc-wrapper .col-lg-1{width:8.33333333%}}#ytc-wrapper .embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}#ytc-wrapper .embed-responsive .embed-responsive-item,#ytc-wrapper .embed-responsive iframe,#ytc-wrapper .embed-responsive embed,#ytc-wrapper .embed-responsive object,#ytc-wrapper .embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}#ytc-wrapper .embed-responsive-16by9{padding-bottom:56.25%}#ytc-wrapper .embed-responsive-4by3{padding-bottom:75%}#ytc-wrapper .clearfix:before,#ytc-wrapper .clearfix:after,#ytc-wrapper .container:before,#ytc-wrapper .container:after,#ytc-wrapper .container-fluid:before,#ytc-wrapper .container-fluid:after,#ytc-wrapper .row:before,#ytc-wrapper .row:after{content:" ";display:table}#ytc-wrapper .clearfix:after,#ytc-wrapper .container:after,#ytc-wrapper .container-fluid:after,#ytc-wrapper .row:after{clear:both}#ytc-wrapper .center-block{display:block;margin-left:auto;margin-right:auto}#ytc-wrapper .pull-right{float:right!important}#ytc-wrapper .pull-left{float:left!important}#ytc-wrapper .hide{display:none!important}#ytc-wrapper .show{display:block!important}#ytc-wrapper .invisible{visibility:hidden}#ytc-wrapper .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}#ytc-wrapper .hidden{display:none!important}#ytc-wrapper .affix{position:fixed}@-ms-viewport{width:device-width}#ytc-wrapper .visible-xs,#ytc-wrapper .visible-sm,#ytc-wrapper .visible-md,#ytc-wrapper .visible-lg{display:none!important}#ytc-wrapper .visible-xs-block,#ytc-wrapper .visible-xs-inline,#ytc-wrapper .visible-xs-inline-block,#ytc-wrapper .visible-sm-block,#ytc-wrapper .visible-sm-inline,#ytc-wrapper .visible-sm-inline-block,#ytc-wrapper .visible-md-block,#ytc-wrapper .visible-md-inline,#ytc-wrapper .visible-md-inline-block,#ytc-wrapper .visible-lg-block,#ytc-wrapper .visible-lg-inline,#ytc-wrapper .visible-lg-inline-block{display:none!important}@media (max-width:767px){#ytc-wrapper .visible-xs{display:block!important}#ytc-wrapper table.visible-xs{display:table!important}#ytc-wrapper tr.visible-xs{display:table-row!important}#ytc-wrapper th.visible-xs,#ytc-wrapper td.visible-xs{display:table-cell!important}}@media (max-width:767px){#ytc-wrapper .visible-xs-block{display:block!important}}@media (max-width:767px){#ytc-wrapper .visible-xs-inline{display:inline!important}}@media (max-width:767px){#ytc-wrapper .visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){#ytc-wrapper .visible-sm{display:block!important}#ytc-wrapper table.visible-sm{display:table!important}#ytc-wrapper tr.visible-sm{display:table-row!important}#ytc-wrapper th.visible-sm,#ytc-wrapper td.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){#ytc-wrapper .visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){#ytc-wrapper .visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){#ytc-wrapper .visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){#ytc-wrapper .visible-md{display:block!important}#ytc-wrapper table.visible-md{display:table!important}#ytc-wrapper tr.visible-md{display:table-row!important}#ytc-wrapper th.visible-md,#ytc-wrapper td.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){#ytc-wrapper .visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){#ytc-wrapper .visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){#ytc-wrapper .visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){#ytc-wrapper .visible-lg{display:block!important}#ytc-wrapper table.visible-lg{display:table!important}#ytc-wrapper tr.visible-lg{display:table-row!important}#ytc-wrapper th.visible-lg,#ytc-wrapper td.visible-lg{display:table-cell!important}}@media (min-width:1200px){#ytc-wrapper .visible-lg-block{display:block!important}}@media (min-width:1200px){#ytc-wrapper .visible-lg-inline{display:inline!important}}@media (min-width:1200px){#ytc-wrapper .visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){#ytc-wrapper .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){#ytc-wrapper .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){#ytc-wrapper .hidden-md{display:none!important}}@media (min-width:1200px){#ytc-wrapper .hidden-lg{display:none!important}}#ytc-wrapper .visible-print{display:none!important}@media print{#ytc-wrapper .visible-print{display:block!important}#ytc-wrapper table.visible-print{display:table!important}#ytc-wrapper tr.visible-print{display:table-row!important}#ytc-wrapper th.visible-print,#ytc-wrapper td.visible-print{display:table-cell!important}}#ytc-wrapper .visible-print-block{display:none!important}@media print{#ytc-wrapper .visible-print-block{display:block!important}}#ytc-wrapper .visible-print-inline{display:none!important}@media print{#ytc-wrapper .visible-print-inline{display:inline!important}}#ytc-wrapper .visible-print-inline-block{display:none!important}@media print{#ytc-wrapper .visible-print-inline-block{display:inline-block!important}}@media print{#ytc-wrapper .hidden-print{display:none!important}}#ytc-wrapper div{margin:0;padding:0}#ytc-wrapper *{-webkit-box-sizing:border-box!important;box-sizing:border-box!important}#ytc-wrapper :before,#ytc-wrapper :after{-webkit-box-sizing:border-box!important;box-sizing:border-box!important}#ytc-wrapper .container-fluid{padding:0!important}#ytc-wrapper .ytcplayer-wrapper{border:1px solid #999;margin-bottom:14px}#ytc-wrapper .ytcplayer-wrapper iframe{margin:0!important;padding:0!important}#ytc-wrapper .ytc-thumbnails{padding:0!important}#ytc-wrapper .ytc-thumbnails .ytc-row .ytc-column{margin-left:0!important;margin-right:0!important;-webkit-box-sizing:border-box!important;box-sizing:border-box!important;position:relative!important;margin-bottom:10px}#ytc-wrapper .ytc-thumbnails.ytc-thumb-align-left .ytc-column,#ytc-wrapper .ytc-thumbnails.ytc-thumb-align-right .ytc-column{margin-bottom:20px}#ytc-wrapper .ytc-thumbnails.ytc-thumb-align-left .ytctitle:first-child,#ytc-wrapper .ytc-thumbnails.ytc-thumb-align-right .ytctitle:first-child{margin:0 0 10px 0}#ytc-wrapper .ytc-thumbnails a.ytcthumb{padding-bottom:55%!important}#ytc-wrapper .ytc-thumbnails.ytc-thumb4x3 a.ytcthumb{padding-bottom:75%!important}#ytc-wrapper .ytc-thumbnails a.ytcthumb{display:block!important;border:1px solid #999;position:relative!important;line-height:0!important;width:100%!important;padding-top:0!important;padding-left:0!important;padding-right:0!important;margin:0!important;height:0!important;overflow:hidden!important;background-size:cover!important;background-position:center!important}#ytc-wrapper .ytc-thumbnails a.ytcthumb:hover{opacity:.75}#ytc-wrapper .ytc-thumbnails a.ytcthumb .ytcplay{background:url(img/play.png) no-repeat!important;background-position:-9999px -9999px!important;position:absolute!important;width:100%!important;height:100%!important}#ytc-wrapper .ytc-thumbnails a.ytcthumb:hover .ytcplay{background-position:center center!important}#ytc-wrapper .ytc-thumbnails .private{background:#262626;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #383838), to(#131313));background-image:-webkit-linear-gradient(top, #383838 0, #131313 100%);background-image:linear-gradient(to bottom,#383838 0,#131313 100%)}#ytc-wrapper .ytc-thumbnails .private a{background-size:38%!important;background-repeat:no-repeat!important;background-position:50% 76%!important}#ytc-wrapper .ytc-thumbnails .private a .private-text{width:100%!important;height:100%!important;padding-top:10px;position:absolute;text-align:center}#ytc-wrapper .ytc-thumbnails p{display:none!important}#ytc-wrapper .ytc-thumbnails .ytc-pagination{margin-top:16px}#ytc-wrapper .ytc-thumbnails .ytc-pagination div.ytc-next{text-align:right}#ytc-wrapper .ytc-thumbnails .ytc-pagination a{cursor:pointer}#ytc-wrapper .ytc-thumbnails .ytc-pagination .ytc-numeration{text-align:center}#ytc-wrapper .ytc-links{margin-top:16px}#ytc-wrapper .ytc-links .ytc-promotion a{font-size:10px;opacity:.3}#ytc-wrapper .ytc-links .ytc-youtubelink{text-align:right}
|
templates/admin_tabs.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
<ul class="ytchgtabs-tabs">
|
9 |
<li><a href=".tabs-1"><?php _e( 'Feed', 'youtube-channel-gallery' ); ?></a></li>
|
10 |
<li><a href=".tabs-2"><?php _e( 'Player', 'youtube-channel-gallery' ); ?></a></li>
|
11 |
-
|
12 |
<li><a href=".tabs-4"><?php _e( 'Thumbnails', 'youtube-channel-gallery' ); ?></a></li>
|
13 |
<li><a href=".tabs-5"><?php _e( 'Link', 'youtube-channel-gallery' ); ?></a></li>
|
14 |
</ul>
|
@@ -32,7 +32,8 @@
|
|
32 |
<label for="<?php echo $this->get_field_id( 'ytchag_feed' ); ?>"><?php _e( 'Video feed type:', 'youtube-channel-gallery' ); ?></label>
|
33 |
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_feed' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_feed' ); ?>">
|
34 |
<option value="user"<?php selected( $instance['ytchag_feed'], 'user' ); ?>><?php _e( 'Uploaded by a user', 'youtube-channel-gallery' ); ?></option>
|
35 |
-
|
|
|
36 |
<option value="playlist"<?php selected( $instance['ytchag_feed'], 'playlist' ); ?>><?php _e( 'Playlist', 'youtube-channel-gallery' ); ?></option>
|
37 |
</select>
|
38 |
</p>
|
@@ -47,23 +48,32 @@
|
|
47 |
<p class="<?php echo $this->get_field_id( 'ytchag_feed_order' ); ?>">
|
48 |
<label for="<?php echo $this->get_field_id( 'ytchag_feed_order' ); ?>"><?php _e( 'Playlist order:', 'youtube-channel-gallery' ); ?></label>
|
49 |
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_feed_order' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_feed_order' ); ?>">
|
50 |
-
<option value="
|
51 |
-
<option value="
|
|
|
|
|
|
|
|
|
52 |
</select>
|
53 |
</p>
|
54 |
|
55 |
-
<
|
56 |
-
<
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
<
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
67 |
</div>
|
68 |
|
69 |
|
@@ -74,86 +84,96 @@
|
|
74 |
*/
|
75 |
?>
|
76 |
<div id="tabs-<?php echo $this->id; ?>-2" class="ytchgtabs-content tabs-2">
|
77 |
-
|
78 |
<p>
|
79 |
<label for="<?php echo $this->get_field_id( 'ytchag_player' ); ?>"><?php _e( 'Player:', 'youtube-channel-gallery' ); ?></label>
|
80 |
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_player' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_player' ); ?>">
|
81 |
<option value="0"<?php selected( $instance['ytchag_player'], '0' ); ?>><?php _e( 'Without player', 'youtube-channel-gallery' ); ?></option>
|
82 |
-
<option value="1"<?php selected( $instance['ytchag_player'], '1' ); ?>><?php _e( 'show player
|
83 |
<option value="2"<?php selected( $instance['ytchag_player'], '2' ); ?>><?php _e( 'show player in Magnific Popup', 'youtube-channel-gallery' ); ?></option>
|
84 |
</select>
|
85 |
</p>
|
86 |
|
87 |
<span class="player_options">
|
88 |
-
<
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
<
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
<
|
98 |
-
|
99 |
-
<
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
<
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
<
|
115 |
-
<
|
116 |
-
<
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
<
|
126 |
-
<
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
<input class="checkbox" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_modestbranding'], true ); ?> id="<?php echo $this->get_field_id( 'ytchag_modestbranding' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_modestbranding' ); ?>" />
|
140 |
-
<label for="<?php echo $this->get_field_id( 'ytchag_modestbranding' ); ?>"><?php _e( 'Show YouTube logo', 'youtube-channel-gallery' ); ?></label>
|
141 |
-
<span class="ytchag_info" title="<?php _e( 'Activate this field to show the YouTube logo in the control bar. Setting the color parameter to white will show the YouTube logo in the control bar.', 'youtube-channel-gallery' ); ?>">?</span>
|
142 |
|
143 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
-
|
146 |
-
<
|
147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
|
149 |
-
<br>
|
150 |
|
151 |
-
<input class="checkbox" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_showinfo'], true ); ?> id="<?php echo $this->get_field_id( 'ytchag_showinfo' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_showinfo' ); ?>" />
|
152 |
-
<label for="<?php echo $this->get_field_id( 'ytchag_showinfo' ); ?>"><?php _e( 'Show info', 'youtube-channel-gallery' ); ?></label>
|
153 |
-
<span class="ytchag_info" title="<?php _e( 'Activate this field to display information like the video title and uploader before the video starts playing.', 'youtube-channel-gallery' ); ?>">?</span>
|
154 |
<p class="<?php echo $this->get_field_id( 'ytchag_player_order' ); ?>">
|
155 |
<label for="<?php echo $this->get_field_id( 'ytchag_player_order' ); ?>"><?php _e( 'Order:', 'youtube-channel-gallery' ); ?></label>
|
156 |
-
<input class="
|
157 |
</p>
|
158 |
</span>
|
159 |
|
@@ -188,7 +208,7 @@
|
|
188 |
<p>
|
189 |
<label for="<?php echo $this->get_field_id( 'ytchag_search_restrict' ); ?>"><?php _e( 'Restrict search by default: It will overwrite results of feed tab)', 'youtube-channel-gallery' ); ?></label>
|
190 |
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_search_restrict' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_search_restrict' ); ?>">
|
191 |
-
<option value=""<?php selected( $instance['ytchag_search_restrict'], '' ); ?>><?php _e( '
|
192 |
<?php foreach ($campos as $c): ?>
|
193 |
<?php $tag = toTag($c); ?>
|
194 |
<option value="<?php echo $tag ?>"<?php selected( $instance['ytchag_search_restrict'], $tag ); ?>><?php _e( $c, 'youtube-channel-gallery' ); ?></option>
|
@@ -205,7 +225,7 @@
|
|
205 |
<br>
|
206 |
<p class="<?php echo $this->get_field_id( 'ytchag_search_order' ); ?>">
|
207 |
<label for="<?php echo $this->get_field_id( 'ytchag_search_order' ); ?>"><?php _e( 'Order:', 'youtube-channel-gallery' ); ?></label>
|
208 |
-
<input class="
|
209 |
</p>
|
210 |
</div>
|
211 |
<?php
|
@@ -215,17 +235,22 @@
|
|
215 |
*/
|
216 |
?>
|
217 |
<div id="tabs-<?php echo $this->id; ?>-4" class="ytchgtabs-content tabs-4">
|
218 |
-
<p>
|
219 |
-
<label for="<?php echo $this->get_field_id( 'ytchag_maxitems' ); ?>"><?php _e( 'Number of videos to show:', 'youtube-channel-gallery' ); ?></label>
|
220 |
-
<input class="widefat wideinfo" id="<?php echo $this->get_field_id( 'ytchag_maxitems' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_maxitems' ); ?>" type="text" value="<?php echo esc_attr( $ytchag_maxitems ); ?>" />
|
221 |
-
<span class="ytchag_info" title="<?php _e( 'The plugin can display a maximum of 50 videos. This limitation will change in a future release.', 'youtube-channel-gallery' ); ?>">?</span>
|
222 |
-
</p>
|
223 |
|
224 |
-
<
|
225 |
-
<
|
226 |
-
|
227 |
-
|
228 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
|
230 |
<p>
|
231 |
|
@@ -236,19 +261,52 @@
|
|
236 |
</select>
|
237 |
</p>
|
238 |
|
239 |
-
|
240 |
-
<
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
|
253 |
|
254 |
|
@@ -260,42 +318,69 @@
|
|
260 |
|
261 |
<div class="ytchg-title-and-description ytchgtabs-content">
|
262 |
|
263 |
-
<
|
264 |
-
<
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
<
|
276 |
-
<
|
277 |
-
<
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
<
|
287 |
-
|
288 |
-
<
|
289 |
-
<
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
</div>
|
300 |
</fieldset>
|
301 |
|
@@ -303,30 +388,30 @@
|
|
303 |
<label for="<?php echo $this->get_field_id( 'ytchag_nofollow' ); ?>"><?php _e( 'Add "nofollow" attribute to links', 'youtube-channel-gallery' ); ?></label>
|
304 |
<span class="ytchag_info" title="<?php _e( '"nofollow" attribute provides a way for webmasters to tell search engines "Don\'t follow this specific link."', 'youtube-channel-gallery' ); ?>">?</span>
|
305 |
|
306 |
-
|
307 |
<span class="thumb_window">
|
308 |
</br>
|
309 |
<input class="checkbox" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_thumb_window'], true ); ?> id="<?php echo $this->get_field_id( 'ytchag_thumb_window' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_window' ); ?>" />
|
310 |
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_window' ); ?>"><?php _e( 'Open in a new window or tab', 'youtube-channel-gallery' ); ?></label>
|
311 |
</span>
|
312 |
<br>
|
313 |
-
|
314 |
-
<input class="checkbox" type="checkbox" value="1" <?php checked( (bool) $instance['
|
315 |
-
<label for="<?php echo $this->get_field_id( '
|
316 |
-
|
317 |
<label><?php _e( 'Order:', 'youtube-channel-gallery' ); ?></label>
|
318 |
<br>
|
319 |
-
<?php _e( 'Thumbnail:', 'youtube-channel-gallery' );
|
320 |
-
<input size="1" class="" id="<?php echo $this->get_field_id( 'ytchag_thumb_order_thumb' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_order_thumb' ); ?>" type="
|
321 |
-
<?php _e( 'Title:', 'youtube-channel-gallery' );
|
322 |
-
<input size="1"class="" id="<?php echo $this->get_field_id( 'ytchag_thumb_order_title' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_order_title' ); ?>" type="
|
323 |
-
<?php _e( 'Description:', 'youtube-channel-gallery' );
|
324 |
-
<input size="1" class="" id="<?php echo $this->get_field_id( 'ytchag_thumb_order_desc' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_order_desc' ); ?>" type="
|
325 |
</p>
|
326 |
</p>
|
327 |
<p class="<?php echo $this->get_field_id( 'ytchag_thumb_order' ); ?>">
|
328 |
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_order' ); ?>"><?php _e( 'Order:', 'youtube-channel-gallery' ); ?></label>
|
329 |
-
<input class="
|
330 |
</p>
|
331 |
|
332 |
</div>
|
@@ -363,7 +448,7 @@
|
|
363 |
|
364 |
<p class="<?php echo $this->get_field_id( 'ytchag_link_order' ); ?>">
|
365 |
<label for="<?php echo $this->get_field_id( 'ytchag_link_order' ); ?>"><?php _e( 'Order:', 'youtube-channel-gallery' ); ?></label>
|
366 |
-
<input class="
|
367 |
</p>
|
368 |
|
369 |
</div>
|
8 |
<ul class="ytchgtabs-tabs">
|
9 |
<li><a href=".tabs-1"><?php _e( 'Feed', 'youtube-channel-gallery' ); ?></a></li>
|
10 |
<li><a href=".tabs-2"><?php _e( 'Player', 'youtube-channel-gallery' ); ?></a></li>
|
11 |
+
<li style="<?php //echo ($instance['ytchag_feed'] == 'user' ? '' : 'display:none')?>display:none"><a href=".tabs-3"><?php _e( 'Search', 'youtube-channel-gallery' ); ?></a></li>
|
12 |
<li><a href=".tabs-4"><?php _e( 'Thumbnails', 'youtube-channel-gallery' ); ?></a></li>
|
13 |
<li><a href=".tabs-5"><?php _e( 'Link', 'youtube-channel-gallery' ); ?></a></li>
|
14 |
</ul>
|
32 |
<label for="<?php echo $this->get_field_id( 'ytchag_feed' ); ?>"><?php _e( 'Video feed type:', 'youtube-channel-gallery' ); ?></label>
|
33 |
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_feed' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_feed' ); ?>">
|
34 |
<option value="user"<?php selected( $instance['ytchag_feed'], 'user' ); ?>><?php _e( 'Uploaded by a user', 'youtube-channel-gallery' ); ?></option>
|
35 |
+
<option value="favorites"<?php selected( $instance['ytchag_feed'], 'favorites' ); ?>><?php _e( 'User\'s favorites', 'youtube-channel-gallery' ); ?></option>
|
36 |
+
<option value="likes"<?php selected( $instance['ytchag_feed'], 'likes' ); ?>><?php _e( 'User\'s likes', 'youtube-channel-gallery' ); ?></option>
|
37 |
<option value="playlist"<?php selected( $instance['ytchag_feed'], 'playlist' ); ?>><?php _e( 'Playlist', 'youtube-channel-gallery' ); ?></option>
|
38 |
</select>
|
39 |
</p>
|
48 |
<p class="<?php echo $this->get_field_id( 'ytchag_feed_order' ); ?>">
|
49 |
<label for="<?php echo $this->get_field_id( 'ytchag_feed_order' ); ?>"><?php _e( 'Playlist order:', 'youtube-channel-gallery' ); ?></label>
|
50 |
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_feed_order' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_feed_order' ); ?>">
|
51 |
+
<option value="date"<?php selected( $instance['ytchag_feed_order'], 'date' ); ?>><?php _e( 'Date Order', 'youtube-channel-gallery' ); ?></option>
|
52 |
+
<option value="rating"<?php selected( $instance['ytchag_feed_order'], 'rating' ); ?>><?php _e( 'Rating Order', 'youtube-channel-gallery' ); ?></option>
|
53 |
+
<option value="relevance"<?php selected( $instance['ytchag_feed_order'], 'relevance' ); ?>><?php _e( 'Relevance Order', 'youtube-channel-gallery' ); ?></option>
|
54 |
+
<option value="title"<?php selected( $instance['ytchag_feed_order'], 'title' ); ?>><?php _e( 'Title Order', 'youtube-channel-gallery' ); ?></option>
|
55 |
+
<option value="videoCount"<?php selected( $instance['ytchag_feed_order'], 'videoCount' ); ?>><?php _e( 'Video Count Order', 'youtube-channel-gallery' ); ?></option>
|
56 |
+
<option value="viewCount"<?php selected( $instance['ytchag_feed_order'], 'viewCount' ); ?>><?php _e( 'View Count Order', 'youtube-channel-gallery' ); ?></option>
|
57 |
</select>
|
58 |
</p>
|
59 |
|
60 |
+
<div class="row flex">
|
61 |
+
<div class="col-md-6">
|
62 |
+
<div class="<?php echo $this->get_field_id( 'ytchag_cache_time' ); ?>">
|
63 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_cache_time' ); ?>"><?php _e( 'Cache time (hours):', 'youtube-channel-gallery' ); ?></label><br>
|
64 |
+
<input class="widefat wideinfo" id="<?php echo $this->get_field_id( 'ytchag_cache_time' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_cache_time' ); ?>" type="number" size="1" value="<?php echo esc_attr( $ytchag_cache_time ); ?>" />
|
65 |
+
<span class="ytchag_info" title="<?php _e( 'Hours that RSS data is saved in database, to not make a request every time the page is displayed. Assign this value according to how often you upgrade your playlist in YouTube.', 'youtube-channel-gallery' ); ?>">?</span>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
<div class="col-md-6">
|
69 |
+
<div class="<?php echo $this->get_field_id( 'ytchag_cache' ); ?>">
|
70 |
+
<br>
|
71 |
+
<input class="checkbox" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_cache'], true, true ); ?> id="<?php echo $this->get_field_id( 'ytchag_cache' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_cache' ); ?>" />
|
72 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_cache' ); ?>"><?php _e( 'Activate cache', 'youtube-channel-gallery' ); ?></label>
|
73 |
+
<span class="ytchag_info" title="<?php _e( 'If you disable this field the cache will be deleted and will not be used. This is useful to refresh immediately the YouTube RSS used by the plugin. Reenable the cache when the gallery shows the changes you made in your youtube account.', 'youtube-channel-gallery' ); ?>">?</span>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
</div>
|
77 |
</div>
|
78 |
|
79 |
|
84 |
*/
|
85 |
?>
|
86 |
<div id="tabs-<?php echo $this->id; ?>-2" class="ytchgtabs-content tabs-2">
|
|
|
87 |
<p>
|
88 |
<label for="<?php echo $this->get_field_id( 'ytchag_player' ); ?>"><?php _e( 'Player:', 'youtube-channel-gallery' ); ?></label>
|
89 |
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_player' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_player' ); ?>">
|
90 |
<option value="0"<?php selected( $instance['ytchag_player'], '0' ); ?>><?php _e( 'Without player', 'youtube-channel-gallery' ); ?></option>
|
91 |
+
<option value="1"<?php selected( $instance['ytchag_player'], '1' ); ?>><?php _e( 'show player', 'youtube-channel-gallery' ); ?></option>
|
92 |
<option value="2"<?php selected( $instance['ytchag_player'], '2' ); ?>><?php _e( 'show player in Magnific Popup', 'youtube-channel-gallery' ); ?></option>
|
93 |
</select>
|
94 |
</p>
|
95 |
|
96 |
<span class="player_options">
|
97 |
+
<div class="row">
|
98 |
+
<div class="col-md-6">
|
99 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_width_value' ); ?>"><?php _e( 'Width:', 'youtube-channel-gallery' ); ?></label><br>
|
100 |
+
<input class="" id="<?php echo $this->get_field_id( 'ytchag_width_value' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_width_value' ); ?>" type="number" min="1" max="9999" size="1" value="<?php echo esc_attr( $ytchag_width_value); ?>" />
|
101 |
+
<select class="" id="<?php echo $this->get_field_id( 'ytchag_width_type' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_width_type' ); ?>">
|
102 |
+
<option value="%"<?php selected( $instance['ytchag_width_type'], '%' ); ?>><?php _e( '%', 'youtube-channel-gallery' ); ?></option>
|
103 |
+
<option value="px"<?php selected( $instance['ytchag_width_type'], 'px' ); ?>><?php _e( 'px', 'youtube-channel-gallery' ); ?></option>
|
104 |
+
</select>
|
105 |
+
</div>
|
106 |
+
<div class="col-md-6">
|
107 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_ratio' ); ?>"><?php _e( 'Aspect ratio:', 'youtube-channel-gallery' ); ?></label><br>
|
108 |
+
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_ratio' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_ratio' ); ?>">
|
109 |
+
<option value="4x3"<?php selected( $instance['ytchag_ratio'], '4x3' ); ?>><?php _e( 'Standard (4x3)', 'youtube-channel-gallery' ); ?></option>
|
110 |
+
<option value="16x9"<?php selected( $instance['ytchag_ratio'], '16x9' ); ?>><?php _e( 'Widescreen (16x9)', 'youtube-channel-gallery' ); ?></option>
|
111 |
+
</select>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<div class="row">
|
116 |
+
<div class="col-md-6">
|
117 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_theme' ); ?>"><?php _e( 'Theme:', 'youtube-channel-gallery' ); ?></label>
|
118 |
+
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_theme' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_theme' ); ?>">
|
119 |
+
<option value="dark"<?php selected( $instance['ytchag_theme'], 'dark' ); ?>><?php _e( 'Dark', 'youtube-channel-gallery' ); ?></option>
|
120 |
+
<option value="light"<?php selected( $instance['ytchag_theme'], 'light' ); ?>><?php _e( 'Light', 'youtube-channel-gallery' ); ?></option>
|
121 |
+
</select>
|
122 |
+
</div>
|
123 |
+
<div class="col-md-6">
|
124 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_color' ); ?>"><?php _e( 'Progress bar color:', 'youtube-channel-gallery' ); ?></label>
|
125 |
+
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_color' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_color' ); ?>">
|
126 |
+
<option value="red"<?php selected( $instance['ytchag_color'], 'red' ); ?>><?php _e( 'Red', 'youtube-channel-gallery' ); ?></option>
|
127 |
+
<option value="white"<?php selected( $instance['ytchag_color'], 'white' ); ?>><?php _e( 'White', 'youtube-channel-gallery' ); ?></option>
|
128 |
+
</select>
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
|
132 |
+
<div class="row">
|
133 |
+
<div class="col-md-6">
|
134 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_quality' ); ?>"><?php _e( 'Video quality:', 'youtube-channel-gallery' ); ?></label>
|
135 |
+
<select class="widefat wideinfo" id="<?php echo $this->get_field_id( 'ytchag_quality' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_quality' ); ?>">
|
136 |
+
<option value="default"<?php selected( $instance['ytchag_quality'], 'default' ); ?>><?php _e( 'default', 'youtube-channel-gallery' ); ?></option>
|
137 |
+
<option value="highres"<?php selected( $instance['ytchag_quality'], 'highres' ); ?>><?php _e( 'highres', 'youtube-channel-gallery' ); ?></option>
|
138 |
+
<option value="hd1080"<?php selected( $instance['ytchag_quality'], 'hd1080' ); ?>><?php _e( 'hd1080', 'youtube-channel-gallery' ); ?></option>
|
139 |
+
<option value="hd720"<?php selected( $instance['ytchag_quality'], 'hd720' ); ?>><?php _e( 'hd720', 'youtube-channel-gallery' ); ?></option>
|
140 |
+
<option value="large"<?php selected( $instance['ytchag_quality'], 'large' ); ?>><?php _e( 'large', 'youtube-channel-gallery' ); ?></option>
|
141 |
+
<option value="medium"<?php selected( $instance['ytchag_quality'], 'medium' ); ?>><?php _e( 'medium', 'youtube-channel-gallery' ); ?></option>
|
142 |
+
<option value="small"<?php selected( $instance['ytchag_quality'], 'small' ); ?>><?php _e( 'small', 'youtube-channel-gallery' ); ?></option>
|
143 |
+
</select>
|
144 |
+
<span class="ytchag_info" title="<?php _e( 'Default value enables YouTube to select the most appropriate playback quality. If you select a quality level that is not available for the video, then the quality will be set to the next lowest level that is available.', 'youtube-channel-gallery' ); ?>">?</span>
|
145 |
+
</div>
|
146 |
+
</div>
|
|
|
|
|
|
|
|
|
147 |
|
148 |
+
<div class="row">
|
149 |
+
<div class="col-md-6">
|
150 |
+
<input class="checkbox" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_autoplay'], true ); ?> id="<?php echo $this->get_field_id( 'ytchag_autoplay' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_autoplay' ); ?>" />
|
151 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_autoplay' ); ?>"><?php _e( 'Autoplay', 'youtube-channel-gallery' ); ?></label>
|
152 |
+
</div>
|
153 |
+
<div class="col-md-6">
|
154 |
+
<input class="checkbox" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_modestbranding'], true ); ?> id="<?php echo $this->get_field_id( 'ytchag_modestbranding' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_modestbranding' ); ?>" />
|
155 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_modestbranding' ); ?>"><?php _e( 'Show YouTube logo', 'youtube-channel-gallery' ); ?></label>
|
156 |
+
<span class="ytchag_info" title="<?php _e( 'Activate this field to show the YouTube logo in the control bar. Setting the color parameter to white will show the YouTube logo in the control bar.', 'youtube-channel-gallery' ); ?>">?</span>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
|
160 |
+
<div class="row">
|
161 |
+
<div class="col-md-6">
|
162 |
+
<input class="checkbox" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_rel'], true ); ?> id="<?php echo $this->get_field_id( 'ytchag_rel' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_rel' ); ?>" />
|
163 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_rel' ); ?>"><?php _e( 'Show related videos', 'youtube-channel-gallery' ); ?></label>
|
164 |
+
<span class="ytchag_info" title="<?php _e( 'Activate this field to show related videos when playback of the video ends.', 'youtube-channel-gallery' ); ?>">?</span>
|
165 |
+
</div>
|
166 |
+
<div class="col-md-6">
|
167 |
+
<input class="checkbox" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_showinfo'], true ); ?> id="<?php echo $this->get_field_id( 'ytchag_showinfo' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_showinfo' ); ?>" />
|
168 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_showinfo' ); ?>"><?php _e( 'Show info', 'youtube-channel-gallery' ); ?></label>
|
169 |
+
<span class="ytchag_info" title="<?php _e( 'Activate this field to display information like the video title and uploader before the video starts playing.', 'youtube-channel-gallery' ); ?>">?</span>
|
170 |
+
</div>
|
171 |
+
</div>
|
172 |
|
|
|
173 |
|
|
|
|
|
|
|
174 |
<p class="<?php echo $this->get_field_id( 'ytchag_player_order' ); ?>">
|
175 |
<label for="<?php echo $this->get_field_id( 'ytchag_player_order' ); ?>"><?php _e( 'Order:', 'youtube-channel-gallery' ); ?></label>
|
176 |
+
<input class="" id="<?php echo $this->get_field_id( 'ytchag_player_order' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_player_order' ); ?>" type="number" min="1" max="10" size="1" value="<?php echo esc_attr( $ytchag_player_order); ?>" />
|
177 |
</p>
|
178 |
</span>
|
179 |
|
208 |
<p>
|
209 |
<label for="<?php echo $this->get_field_id( 'ytchag_search_restrict' ); ?>"><?php _e( 'Restrict search by default: It will overwrite results of feed tab)', 'youtube-channel-gallery' ); ?></label>
|
210 |
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_search_restrict' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_search_restrict' ); ?>">
|
211 |
+
<option value=""<?php selected( $instance['ytchag_search_restrict'], '' ); ?>><?php _e( 'All', 'youtube-channel-gallery' ); ?></option>
|
212 |
<?php foreach ($campos as $c): ?>
|
213 |
<?php $tag = toTag($c); ?>
|
214 |
<option value="<?php echo $tag ?>"<?php selected( $instance['ytchag_search_restrict'], $tag ); ?>><?php _e( $c, 'youtube-channel-gallery' ); ?></option>
|
225 |
<br>
|
226 |
<p class="<?php echo $this->get_field_id( 'ytchag_search_order' ); ?>">
|
227 |
<label for="<?php echo $this->get_field_id( 'ytchag_search_order' ); ?>"><?php _e( 'Order:', 'youtube-channel-gallery' ); ?></label>
|
228 |
+
<input class="" id="<?php echo $this->get_field_id( 'ytchag_search_order' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_search_order' ); ?>" type="number" min="1" max="10" size="1" value="<?php echo esc_attr( $ytchag_search_order); ?>" />
|
229 |
</p>
|
230 |
</div>
|
231 |
<?php
|
235 |
*/
|
236 |
?>
|
237 |
<div id="tabs-<?php echo $this->id; ?>-4" class="ytchgtabs-content tabs-4">
|
|
|
|
|
|
|
|
|
|
|
238 |
|
239 |
+
<div class="row">
|
240 |
+
<div class="col-md-6">
|
241 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_maxitems' ); ?>"><?php _e( 'Number of videos to show:', 'youtube-channel-gallery' ); ?></label><br>
|
242 |
+
<input class="widefat wideinfo" id="<?php echo $this->get_field_id( 'ytchag_maxitems' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_maxitems' ); ?>" type="number" min="1" max="50" size="1" value="<?php echo esc_attr( $ytchag_maxitems ); ?>" />
|
243 |
+
<span class="ytchag_info" title="<?php _e( 'The plugin can display a maximum of 50 videos for each page.', 'youtube-channel-gallery' ); ?>">?</span>
|
244 |
+
</div>
|
245 |
+
<div class="col-md-6">
|
246 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_width' ); ?>"><?php _e( 'Thumbnail resolution:', 'youtube-channel-gallery' ); ?></label><br>
|
247 |
+
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_thumb_width' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_width' ); ?>">
|
248 |
+
<option value="120"<?php selected( $instance['ytchag_thumb_width'], '120' ); ?>><?php _e( 'Default (120x90 px)', 'youtube-channel-gallery' ); ?></option>
|
249 |
+
<option value="320"<?php selected( $instance['ytchag_thumb_width'], '320' ); ?>><?php _e( 'Medium (320x180)', 'youtube-channel-gallery' ); ?></option>
|
250 |
+
<option value="480"<?php selected( $instance['ytchag_thumb_width'], '480' ); ?>><?php _e( 'High (480x360)', 'youtube-channel-gallery' ); ?></option>
|
251 |
+
</select>
|
252 |
+
</div>
|
253 |
+
</div>
|
254 |
|
255 |
<p>
|
256 |
|
261 |
</select>
|
262 |
</p>
|
263 |
|
264 |
+
|
265 |
+
<div class="row thumbs-cols">
|
266 |
+
<div class="col-md-12">
|
267 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_columns' ); ?>"><?php _e( 'Thumbnail columns:', 'youtube-channel-gallery' ); ?></label>
|
268 |
+
</div>
|
269 |
+
<div class="col-md-6">
|
270 |
+
<div class="table">
|
271 |
+
<div class="table-row">
|
272 |
+
<div>
|
273 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_columns_phones' ); ?>"><?php _e( 'Phones:', 'youtube-channel-gallery' ); ?></label>
|
274 |
+
</div>
|
275 |
+
<div>
|
276 |
+
<input size="1" class="" id="<?php echo $this->get_field_id( 'ytchag_thumb_columns_phones' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_columns_phones' ); ?>" type="number" min="1" max="12" value="<?php echo esc_attr( $ytchag_thumb_columns_phones ); ?>" /><br>
|
277 |
+
</div>
|
278 |
+
</div>
|
279 |
+
<div class="table-row">
|
280 |
+
<div>
|
281 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_columns_tablets' ); ?>"><?php _e( 'Tablets:', 'youtube-channel-gallery' ); ?></label>
|
282 |
+
</div>
|
283 |
+
<div>
|
284 |
+
<input size="1"class="" id="<?php echo $this->get_field_id( 'ytchag_thumb_columns_tablets' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_columns_tablets' ); ?>" type="number" min="1" max="12" value="<?php echo esc_attr( $ytchag_thumb_columns_tablets ); ?>" />
|
285 |
+
</div>
|
286 |
+
</div>
|
287 |
+
</div>
|
288 |
+
</div>
|
289 |
+
<div class="col-md-6">
|
290 |
+
<div class="table">
|
291 |
+
<div class="table-row">
|
292 |
+
<div>
|
293 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_columns_md' ); ?>"><?php _e( 'Medium Desktops:', 'youtube-channel-gallery' ); ?></label>
|
294 |
+
</div>
|
295 |
+
<div>
|
296 |
+
<input size="1" class="" id="<?php echo $this->get_field_id( 'ytchag_thumb_columns_md' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_columns_md' ); ?>" type="number" min="1" max="12" value="<?php echo esc_attr( $ytchag_thumb_columns_md ); ?>" /><br>
|
297 |
+
</div>
|
298 |
+
</div>
|
299 |
+
<div class="table-row">
|
300 |
+
<div>
|
301 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_columns_ld' ); ?>"><?php _e( 'Large Desktops:', 'youtube-channel-gallery' ); ?></label>
|
302 |
+
</div>
|
303 |
+
<div>
|
304 |
+
<input size="1" class="" id="<?php echo $this->get_field_id( 'ytchag_thumb_columns_ld' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_columns_ld' ); ?>" type="number" min="1" max="12" value="<?php echo esc_attr( $ytchag_thumb_columns_ld ); ?>" />
|
305 |
+
</div>
|
306 |
+
</div>
|
307 |
+
</div>
|
308 |
+
</div>
|
309 |
+
</div>
|
310 |
|
311 |
|
312 |
|
318 |
|
319 |
<div class="ytchg-title-and-description ytchgtabs-content">
|
320 |
|
321 |
+
<div class="row">
|
322 |
+
<div class="col-md-6">
|
323 |
+
<input class="checkbox ytchg-tit" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_title'], true ); ?> id="<?php echo $this->get_field_id( 'ytchag_title' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_title' ); ?>" />
|
324 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_title' ); ?>"><?php _e( 'Show title', 'youtube-channel-gallery' ); ?></label>
|
325 |
+
</div>
|
326 |
+
<div class="col-md-6">
|
327 |
+
<input class="checkbox ytchg-desc" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_description'], true ); ?> id="<?php echo $this->get_field_id( 'ytchag_description' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_description' ); ?>" />
|
328 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_description' ); ?>"><?php _e( 'Show description', 'youtube-channel-gallery' ); ?></label>
|
329 |
+
</div>
|
330 |
+
</div>
|
331 |
+
|
332 |
+
<div class="row">
|
333 |
+
<div class="col-md-6">
|
334 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_title_tag' ); ?>"><?php _e( 'Title tag:', 'youtube-channel-gallery' ); ?></label>
|
335 |
+
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_title_tag' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_title_tag' ); ?>">
|
336 |
+
<option value="h1"<?php selected( $instance['ytchag_title_tag'], 'h1' ); ?>><?php _e( 'h1', 'youtube-channel-gallery' ); ?></option>
|
337 |
+
<option value="h2"<?php selected( $instance['ytchag_title_tag'], 'h2' ); ?>><?php _e( 'h2', 'youtube-channel-gallery' ); ?></option>
|
338 |
+
<option value="h3"<?php selected( $instance['ytchag_title_tag'], 'h3' ); ?>><?php _e( 'h3', 'youtube-channel-gallery' ); ?></option>
|
339 |
+
<option value="h4"<?php selected( $instance['ytchag_title_tag'], 'h4' ); ?>><?php _e( 'h4', 'youtube-channel-gallery' ); ?></option>
|
340 |
+
<option value="h5"<?php selected( $instance['ytchag_title_tag'], 'h5' ); ?>><?php _e( 'h5', 'youtube-channel-gallery' ); ?></option>
|
341 |
+
<option value="h6"<?php selected( $instance['ytchag_title_tag'], 'h6' ); ?>><?php _e( 'h6', 'youtube-channel-gallery' ); ?></option>
|
342 |
+
</select>
|
343 |
+
</div>
|
344 |
+
<div class="col-md-6">
|
345 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_description_words_number' ); ?>"><?php _e( 'Description words:', 'youtube-channel-gallery' ); ?></label><br>
|
346 |
+
<input class="widefat wideinfo" id="<?php echo $this->get_field_id( 'ytchag_description_words_number' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_description_words_number' ); ?>" type="number" min="1" max="99" size="1" value="<?php echo esc_attr( $ytchag_description_words_number ); ?>" />
|
347 |
+
<span class="ytchag_info" title="<?php _e( 'Set the maximum number of words that will be displayed of the description. This field is useful when the descriptions of videos in the gallery have different sizes.', 'youtube-channel-gallery' ); ?>">?</span>
|
348 |
+
</div>
|
349 |
+
</div>
|
350 |
+
|
351 |
+
<div class="row">
|
352 |
+
<div class="col-md-12">
|
353 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumbnail_alignment' ); ?>"><?php _e( 'Thumbnail alignment:', 'youtube-channel-gallery' ); ?></label>
|
354 |
+
<select class="widefat" id="<?php echo $this->get_field_id( 'ytchag_thumbnail_alignment' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumbnail_alignment' ); ?>">
|
355 |
+
<option value="none"<?php selected( $instance['ytchag_thumbnail_alignment'], 'none' ); ?>><?php _e( 'none', 'youtube-channel-gallery' ); ?></option>
|
356 |
+
<option value="left"<?php selected( $instance['ytchag_thumbnail_alignment'], 'left' ); ?>><?php _e( 'Left', 'youtube-channel-gallery' ); ?></option>
|
357 |
+
<option value="right"<?php selected( $instance['ytchag_thumbnail_alignment'], 'right' ); ?>><?php _e( 'Right', 'youtube-channel-gallery' ); ?></option>
|
358 |
+
</select>
|
359 |
+
</div>
|
360 |
+
</div>
|
361 |
+
|
362 |
+
<div class="row align-options">
|
363 |
+
<div class="col-md-6">
|
364 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumbnail_alignment_width' ); ?>"><?php _e( 'Thumbnail width:', 'youtube-channel-gallery' ); ?></label><br>
|
365 |
+
<select class="widefat wideinfo" id="<?php echo $this->get_field_id( 'ytchag_thumbnail_alignment_width' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumbnail_alignment_width' ); ?>">
|
366 |
+
<option value="extra_small"<?php selected( $instance['ytchag_thumbnail_alignment_width'], 'extra_small' ); ?>><?php _e( 'Extra small', 'youtube-channel-gallery' ); ?></option>
|
367 |
+
<option value="small"<?php selected( $instance['ytchag_thumbnail_alignment_width'], 'small' ); ?>><?php _e( 'Small', 'youtube-channel-gallery' ); ?></option>
|
368 |
+
<option value="half"<?php selected( $instance['ytchag_thumbnail_alignment_width'], 'half' ); ?>><?php _e( 'Half', 'youtube-channel-gallery' ); ?></option>
|
369 |
+
<option value="large"<?php selected( $instance['ytchag_thumbnail_alignment_width'], 'large' ); ?>><?php _e( 'Large', 'youtube-channel-gallery' ); ?></option>
|
370 |
+
<option value="extra_large"<?php selected( $instance['ytchag_thumbnail_alignment_width'], 'extra_large' ); ?>><?php _e( 'Extra large', 'youtube-channel-gallery' ); ?></option>
|
371 |
+
</select>
|
372 |
+
</div>
|
373 |
+
<div class="col-md-6">
|
374 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumbnail_alignment_device' ); ?>"><?php _e( 'Min. size with alignment:', 'youtube-channel-gallery' ); ?></label><br>
|
375 |
+
<select class="widefat wideinfo" id="<?php echo $this->get_field_id( 'ytchag_thumbnail_alignment_device' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumbnail_alignment_device' ); ?>">
|
376 |
+
<option value="all"<?php selected( $instance['ytchag_thumbnail_alignment_device'], 'all' ); ?>><?php _e( 'All', 'youtube-channel-gallery' ); ?></option>
|
377 |
+
<option value="tablets"<?php selected( $instance['ytchag_thumbnail_alignment_device'], 'tablets' ); ?>><?php _e( 'Tablets', 'youtube-channel-gallery' ); ?></option>
|
378 |
+
<option value="medium"<?php selected( $instance['ytchag_thumbnail_alignment_device'], 'medium' ); ?>><?php _e( 'Medium Desktops', 'youtube-channel-gallery' ); ?></option>
|
379 |
+
<option value="large"<?php selected( $instance['ytchag_thumbnail_alignment_device'], 'large' ); ?>><?php _e( 'Large devices', 'youtube-channel-gallery' ); ?></option>
|
380 |
+
</select>
|
381 |
+
<span class="ytchag_info" title="<?php _e( 'Thumbnails will be aligned only from the size of selected device to prevent unwanted effects in small sizes.', 'youtube-channel-gallery' ); ?>">?</span>
|
382 |
+
</div>
|
383 |
+
</div>
|
384 |
</div>
|
385 |
</fieldset>
|
386 |
|
388 |
<label for="<?php echo $this->get_field_id( 'ytchag_nofollow' ); ?>"><?php _e( 'Add "nofollow" attribute to links', 'youtube-channel-gallery' ); ?></label>
|
389 |
<span class="ytchag_info" title="<?php _e( '"nofollow" attribute provides a way for webmasters to tell search engines "Don\'t follow this specific link."', 'youtube-channel-gallery' ); ?>">?</span>
|
390 |
|
391 |
+
|
392 |
<span class="thumb_window">
|
393 |
</br>
|
394 |
<input class="checkbox" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_thumb_window'], true ); ?> id="<?php echo $this->get_field_id( 'ytchag_thumb_window' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_window' ); ?>" />
|
395 |
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_window' ); ?>"><?php _e( 'Open in a new window or tab', 'youtube-channel-gallery' ); ?></label>
|
396 |
</span>
|
397 |
<br>
|
398 |
+
<br>
|
399 |
+
<input class="checkbox" type="checkbox" value="1" <?php checked( (bool) $instance['ytchag_thumb_pagination'], true ); ?> id="<?php echo $this->get_field_id( 'ytchag_thumb_pagination' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_pagination' ); ?>" />
|
400 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_pagination' ); ?>"><?php _e( 'Show pagination', 'youtube-channel-gallery' ); ?></label>
|
401 |
+
<p>
|
402 |
<label><?php _e( 'Order:', 'youtube-channel-gallery' ); ?></label>
|
403 |
<br>
|
404 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_order_thumb' ); ?>"><?php _e( 'Thumbnail:', 'youtube-channel-gallery' ); ?></label>
|
405 |
+
<input size="1" class="" id="<?php echo $this->get_field_id( 'ytchag_thumb_order_thumb' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_order_thumb' ); ?>" type="number" min="1" max="3" value="<?php echo esc_attr( $ytchag_thumb_order_thumb); ?>" />
|
406 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_order_title' ); ?>"><?php _e( 'Title:', 'youtube-channel-gallery' ); ?></label>
|
407 |
+
<input size="1"class="" id="<?php echo $this->get_field_id( 'ytchag_thumb_order_title' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_order_title' ); ?>" type="number" min="1" max="3" value="<?php echo esc_attr( $ytchag_thumb_order_title); ?>" />
|
408 |
+
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_order_desc' ); ?>"><?php _e( 'Description:', 'youtube-channel-gallery' ); ?></label>
|
409 |
+
<input size="1" class="" id="<?php echo $this->get_field_id( 'ytchag_thumb_order_desc' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_order_desc' ); ?>" type="number" min="1" max="3" value="<?php echo esc_attr( $ytchag_thumb_order_desc); ?>" />
|
410 |
</p>
|
411 |
</p>
|
412 |
<p class="<?php echo $this->get_field_id( 'ytchag_thumb_order' ); ?>">
|
413 |
<label for="<?php echo $this->get_field_id( 'ytchag_thumb_order' ); ?>"><?php _e( 'Order:', 'youtube-channel-gallery' ); ?></label>
|
414 |
+
<input class="" id="<?php echo $this->get_field_id( 'ytchag_thumb_order' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_thumb_order' ); ?>" type="number" min="1" max="10" size="1" value="<?php echo esc_attr( $ytchag_thumb_order); ?>" />
|
415 |
</p>
|
416 |
|
417 |
</div>
|
448 |
|
449 |
<p class="<?php echo $this->get_field_id( 'ytchag_link_order' ); ?>">
|
450 |
<label for="<?php echo $this->get_field_id( 'ytchag_link_order' ); ?>"><?php _e( 'Order:', 'youtube-channel-gallery' ); ?></label>
|
451 |
+
<input class="" id="<?php echo $this->get_field_id( 'ytchag_link_order' ); ?>" name="<?php echo $this->get_field_name( 'ytchag_link_order' ); ?>" type="number" min="1" max="3" size="1" value="<?php echo esc_attr( $ytchag_link_order); ?>" />
|
452 |
</p>
|
453 |
|
454 |
</div>
|
templates/search.php
CHANGED
@@ -6,8 +6,8 @@
|
|
6 |
<?php if ($instance['ytchag_search_playlists']): ?>
|
7 |
<?php $campos = explode('#', $instance['ytchag_search_playlists']); ?>
|
8 |
<?php endif; ?>
|
9 |
-
<select class="search-select">
|
10 |
-
<option value=""><?php echo _e('
|
11 |
<?php foreach ($campos as $c): ?>
|
12 |
<?php $tag = toTag($c); ?>
|
13 |
<option value="<?php echo $tag ?>"<?php selected( $instance['ytchag_search_restrict'], $tag ); ?>><?php _e( $c, 'youtube-channel-gallery' ); ?></option>
|
6 |
<?php if ($instance['ytchag_search_playlists']): ?>
|
7 |
<?php $campos = explode('#', $instance['ytchag_search_playlists']); ?>
|
8 |
<?php endif; ?>
|
9 |
+
<select class="search-select" data-cid="<?php echo $ytchag_id ?>">
|
10 |
+
<option value=""><?php echo _e('All', 'youtube-channel-gallery') ?></option>
|
11 |
<?php foreach ($campos as $c): ?>
|
12 |
<?php $tag = toTag($c); ?>
|
13 |
<option value="<?php echo $tag ?>"<?php selected( $instance['ytchag_search_restrict'], $tag ); ?>><?php _e( $c, 'youtube-channel-gallery' ); ?></option>
|
templates/thumb.php
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
-
<div class="ytcthumb-cont
|
2 |
<a class="ytcthumb <?php echo (($ytchag_player == 2) ? 'popup-youtube' : 'ytclink')?>" href="https://www.youtube.com/watch?v=<?php echo $thumb->id?>" data-playerid="ytcplayer<?php echo $plugincount?>" data-quality="<?php echo $thumb->quality?>" title="<?php echo $thumb->title?>" style="background-image:url(<?php echo $thumb->img?>);" <?php echo ($ytchag_nofollow ? 'rel="nofollow"' : '')?> <?php echo ($ytchag_thumb_window ? 'target="_blank"' : '')?>>
|
|
|
|
|
|
|
3 |
<div class="ytcplay"></div>
|
4 |
</a>
|
5 |
</div>
|
1 |
+
<div class="ytcthumb-cont <?php echo $thumb->privacyStatus?>">
|
2 |
<a class="ytcthumb <?php echo (($ytchag_player == 2) ? 'popup-youtube' : 'ytclink')?>" href="https://www.youtube.com/watch?v=<?php echo $thumb->id?>" data-playerid="ytcplayer<?php echo $plugincount?>" data-quality="<?php echo $thumb->quality?>" title="<?php echo $thumb->title?>" style="background-image:url(<?php echo $thumb->img?>);" <?php echo ($ytchag_nofollow ? 'rel="nofollow"' : '')?> <?php echo ($ytchag_thumb_window ? 'target="_blank"' : '')?>>
|
3 |
+
<?php if ($thumb->privacyStatus == 'private'): ?>
|
4 |
+
<div class="private-text"><?php _e( 'Private video', 'youtube-channel-gallery');?></div>
|
5 |
+
<?php endif; ?>
|
6 |
<div class="ytcplay"></div>
|
7 |
</a>
|
8 |
</div>
|
templates/thumbs.php
CHANGED
@@ -1,46 +1,101 @@
|
|
1 |
<div class="ytc-pslb ytc-thumbnails container-fluid ytc-thumb<?php echo $ytchag_thumb_ratio?> ytc-thumb-align-<?php echo $ytchag_thumbnail_alignment?>">
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
<?php $i = 0; ?>
|
4 |
<?php $col = 1; ?>
|
|
|
5 |
<?php foreach ($thumbs as $thumb): ?>
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
<?php endif; ?>
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
$gutter = 7;
|
21 |
-
if ($ytchag_thumbnail_alignment == 'left') {
|
22 |
-
$padding = 'style="padding:0 '.$gutter.'px 0 '. ($ytchag_thumb_width + 2*$gutter) .'px!important;"';
|
23 |
-
}
|
24 |
-
if ($ytchag_thumbnail_alignment == 'right') {
|
25 |
-
$padding = 'style="padding:0 '. ($ytchag_thumb_width + 2*$gutter) .'px 0 '.$gutter.'px!important;"';
|
26 |
-
}
|
27 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
40 |
}
|
|
|
41 |
}
|
42 |
?>
|
43 |
</div> <?php //end col- ?>
|
|
|
44 |
|
45 |
<?php $i += 1; ?>
|
46 |
<?php endforeach; ?>
|
@@ -48,11 +103,11 @@
|
|
48 |
</div> <?php //end row ?>
|
49 |
|
50 |
<?php //Pagination ?>
|
51 |
-
<?php if ($
|
52 |
<div class="ytc-pagination row">
|
53 |
<div class="col-xs-4 ytc-previous">
|
54 |
-
<?php if ($ytchag_prev_token): ?>
|
55 |
-
<a class="ytc-paginationlink ytc-previous" data-cid="<?php echo $ytchag_id ?>" data-wid="<?php echo $
|
56 |
<?php endif; ?>
|
57 |
</div>
|
58 |
<div class="col-xs-4 ytc-numeration">
|
@@ -60,8 +115,8 @@
|
|
60 |
<span class="ytc-currentpage">1</span><span class="ytc-separator">/</span><span class="ytc-totalpages"><?php echo $total_pages ?></span>
|
61 |
</div>
|
62 |
<div class="col-xs-4 ytc-next">
|
63 |
-
<?php if ($ytchag_next_token): ?>
|
64 |
-
<a class="ytc-paginationlink ytc-next" data-cid="<?php echo $ytchag_id ?>" data-wid="<?php echo $
|
65 |
<?php endif; ?>
|
66 |
</div>
|
67 |
</div>
|
1 |
<div class="ytc-pslb ytc-thumbnails container-fluid ytc-thumb<?php echo $ytchag_thumb_ratio?> ytc-thumb-align-<?php echo $ytchag_thumbnail_alignment?>">
|
2 |
|
3 |
+
<?php $multiplos = multiplos(array($ytchag_thumb_columns_phones, $ytchag_thumb_columns_tablets, $ytchag_thumb_columns_md, $ytchag_thumb_columns_ld)); ?>
|
4 |
+
<?php if (!$multiplos): ?>
|
5 |
+
<div class="ytc-row row">
|
6 |
+
<?php endif; ?>
|
7 |
+
|
8 |
<?php $i = 0; ?>
|
9 |
<?php $col = 1; ?>
|
10 |
+
<?php $columns = max($ytchag_thumb_columns_phones, $ytchag_thumb_columns_tablets, $ytchag_thumb_columns_md, $ytchag_thumb_columns_ld); ?>
|
11 |
<?php foreach ($thumbs as $thumb): ?>
|
12 |
+
|
13 |
+
<?php if ($multiplos): ?>
|
14 |
+
<?php if ($i % $columns === 0): ?>
|
15 |
+
<?php if ($i > 0): ?>
|
16 |
+
</div>
|
17 |
+
<?php endif; ?>
|
18 |
+
<div class="ytc-row row">
|
19 |
+
<?php $col += 1; ?>
|
20 |
+
<?php $i = 0; ?>
|
21 |
+
<?php endif; ?>
|
22 |
<?php endif; ?>
|
23 |
|
24 |
+
<?php
|
25 |
+
$xs = $ytchag_thumb_columns_phones ? $ytchag_thumb_columns_phones : '2';
|
26 |
+
$sm = $ytchag_thumb_columns_tablets ? $ytchag_thumb_columns_tablets : $xs;
|
27 |
+
$md = $ytchag_thumb_columns_md ? $ytchag_thumb_columns_md : $sm;
|
28 |
+
$lg = $ytchag_thumb_columns_ld ? $ytchag_thumb_columns_ld : $md;
|
29 |
+
$col_xs = $xs ? 'col-xs-' . format_dec((12 / $xs)) : '';
|
30 |
+
$col_sm = $sm ? 'col-sm-' . format_dec((12 / $sm)) : '';
|
31 |
+
$col_md = $md ? 'col-md-' . format_dec((12 / $md)) : '';
|
32 |
+
$col_lg = $lg ? 'col-lg-' . format_dec((12 / $lg)) : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
?>
|
34 |
+
<div class="ytc-column <?php echo $col_xs?> <?php echo $col_sm?> <?php echo $col_md?> <?php echo $col_lg?>">
|
35 |
+
<?php
|
36 |
+
if ($ytchag_thumbnail_alignment == 'none') {
|
37 |
+
foreach ($thumb->modules as $module) {
|
38 |
+
if ($module === 'title' && $ytchag_title) {
|
39 |
+
include 'title.php';
|
40 |
+
}
|
41 |
+
elseif ($module === 'desc' && $ytchag_description) {
|
42 |
+
include 'desc.php';
|
43 |
+
}
|
44 |
+
elseif ($module !== 'title' && $module !== 'desc') {
|
45 |
+
include $module . '.php';
|
46 |
+
}
|
47 |
+
}
|
48 |
+
} else {
|
49 |
+
//
|
50 |
+
//min device
|
51 |
+
if ($ytchag_thumbnail_alignment_device == 'all'){
|
52 |
+
$thumb_align_device = 'col-xs-';
|
53 |
+
} elseif ($ytchag_thumbnail_alignment_device == 'medium') {
|
54 |
+
$thumb_align_device = 'col-md-';
|
55 |
+
} elseif ($ytchag_thumbnail_alignment_device == 'large') {
|
56 |
+
$thumb_align_device = 'col-lg-';
|
57 |
+
} else {
|
58 |
+
$thumb_align_device = 'col-sm-';
|
59 |
+
}
|
60 |
|
61 |
+
//thumb size
|
62 |
+
if ($ytchag_thumbnail_alignment_width == 'extra_small'){
|
63 |
+
$thumb_align_width = '4';
|
64 |
+
} elseif ($ytchag_thumbnail_alignment_width == 'small') {
|
65 |
+
$thumb_align_width = '5';
|
66 |
+
} elseif ($ytchag_thumbnail_alignment_width == 'large') {
|
67 |
+
$thumb_align_width = '7';
|
68 |
+
} elseif ($ytchag_thumbnail_alignment_width == 'extra_large') {
|
69 |
+
$thumb_align_width = '8';
|
70 |
+
} else {
|
71 |
+
$thumb_align_width = '6';
|
72 |
+
}
|
73 |
+
echo '<div class="row">';
|
74 |
+
if ($ytchag_thumbnail_alignment == 'left') {
|
75 |
+
echo '<div class="' . $thumb_align_device . $thumb_align_width . '">';
|
76 |
+
include 'thumb.php';
|
77 |
+
echo '</div>';
|
78 |
}
|
79 |
+
echo '<div class="' . $thumb_align_device . ( 12 - $thumb_align_width ) . '">';
|
80 |
+
foreach ($thumb->modules as $module) {
|
81 |
+
if ($module === 'title' && $ytchag_title) {
|
82 |
+
include 'title.php';
|
83 |
+
}
|
84 |
+
elseif ($module === 'desc' && $ytchag_description) {
|
85 |
+
include 'desc.php';
|
86 |
+
}
|
87 |
}
|
88 |
+
echo '</div>';
|
89 |
+
if ($ytchag_thumbnail_alignment == 'right') {
|
90 |
+
echo '<div class="' . $thumb_align_device . $thumb_align_width . '">';
|
91 |
+
include 'thumb.php';
|
92 |
+
echo '</div>';
|
93 |
}
|
94 |
+
echo '</div>';//end of row
|
95 |
}
|
96 |
?>
|
97 |
</div> <?php //end col- ?>
|
98 |
+
<?php $multiplos ? '' : visible(array($xs,$sm,$md,$lg), $i); ?>
|
99 |
|
100 |
<?php $i += 1; ?>
|
101 |
<?php endforeach; ?>
|
103 |
</div> <?php //end row ?>
|
104 |
|
105 |
<?php //Pagination ?>
|
106 |
+
<?php if ($ytchag_thumb_pagination): ?>
|
107 |
<div class="ytc-pagination row">
|
108 |
<div class="col-xs-4 ytc-previous">
|
109 |
+
<?php if (isset($ytchag_prev_token)): ?>
|
110 |
+
<a class="ytc-paginationlink ytc-previous" data-cid="<?php echo $ytchag_id ?>" data-wid="<?php echo $plugincount ?>" data-playlist="<?php echo $ytchag_playlist?>" data-token="<?php echo $ytchag_prev_token?>"><?php _e( '«Previous', 'youtube-channel-gallery' );?></a>
|
111 |
<?php endif; ?>
|
112 |
</div>
|
113 |
<div class="col-xs-4 ytc-numeration">
|
115 |
<span class="ytc-currentpage">1</span><span class="ytc-separator">/</span><span class="ytc-totalpages"><?php echo $total_pages ?></span>
|
116 |
</div>
|
117 |
<div class="col-xs-4 ytc-next">
|
118 |
+
<?php if (isset($ytchag_next_token)): ?>
|
119 |
+
<a class="ytc-paginationlink ytc-next" data-cid="<?php echo $ytchag_id ?>" data-wid="<?php echo $plugincount ?>" data-playlist="<?php echo $ytchag_playlist?>" data-token="<?php echo $ytchag_next_token?>"><?php _e( 'Next»', 'youtube-channel-gallery' );?></a>
|
120 |
<?php endif; ?>
|
121 |
</div>
|
122 |
</div>
|
youtube-channel-gallery.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Description: Show a youtube video and a gallery of thumbnails for a youtube channel.
|
6 |
Author: Javier Gómez Pose
|
7 |
Author URI: http://www.poselab.com/
|
8 |
-
Version: 2.
|
9 |
License: GPL2
|
10 |
|
11 |
Copyright 2013 Javier Gómez Pose (email : javierpose@gmail.com)
|
@@ -62,42 +62,62 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
62 |
|
63 |
function nextVideos() {
|
64 |
|
65 |
-
$
|
66 |
-
|
|
|
67 |
|
68 |
extract($instance);
|
69 |
|
70 |
$token = $_POST['token'];
|
71 |
$ytchag_playlist = $_POST['playlist'];
|
72 |
$ytchag_id = $_POST['cid'];
|
|
|
|
|
|
|
|
|
73 |
|
74 |
-
if ($ytchag_search_playlists && $ytchag_id) {
|
75 |
$ytchag_feed_url = 'https://www.googleapis.com/youtube/v3/search';
|
76 |
$ytchag_feed_url .= '?part=snippet';
|
77 |
$ytchag_feed_url .= '&channelId=' . $ytchag_id;
|
78 |
$ytchag_feed_url .= '&maxResults=' . $ytchag_maxitems;
|
79 |
|
80 |
if ($ytchag_search_restrict) {
|
81 |
-
$
|
82 |
}
|
83 |
else {
|
84 |
-
$
|
85 |
}
|
86 |
|
|
|
|
|
|
|
|
|
87 |
$ytchag_feed_url .= '&type=video';
|
88 |
$ytchag_feed_url .= '&key=' . $ytchag_key;
|
89 |
$ytchag_feed_url .= '&pageToken=' . $token;
|
90 |
|
91 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
else {
|
93 |
|
94 |
-
$api = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=';
|
95 |
$resto = '&maxResults=' . $ytchag_maxitems . '&key=' . $ytchag_key;
|
96 |
|
97 |
$ytchag_feed_url = $api . $ytchag_playlist . $resto . '&pageToken=' . $token;
|
98 |
}
|
|
|
99 |
|
100 |
-
$transientId = 'ytc-' .md5(
|
101 |
|
102 |
$videos_result = $this->get_rss_data ( $ytchag_cache, $transientId, $ytchag_feed_url, $ytchag_cache_time);
|
103 |
|
@@ -133,15 +153,18 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
133 |
|
134 |
function searchVideos() {
|
135 |
|
136 |
-
$
|
137 |
-
|
|
|
138 |
|
139 |
extract($instance);
|
140 |
|
141 |
-
$
|
142 |
$ytchag_search_restrict = $_POST['tag'];
|
143 |
$ytchag_id = $_POST['cid'];
|
144 |
|
|
|
|
|
145 |
$ytchag_feed_url = 'https://www.googleapis.com/youtube/v3/search';
|
146 |
$ytchag_feed_url .= '?part=snippet';
|
147 |
$ytchag_feed_url .= '&channelId=' . $ytchag_id;
|
@@ -150,16 +173,27 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
150 |
if ($ytchag_search_restrict) {
|
151 |
$q = $ytchag_search_restrict;
|
152 |
}
|
153 |
-
|
154 |
-
$q = implode('
|
155 |
}
|
156 |
|
157 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
|
159 |
$ytchag_feed_url .= '&type=video';
|
160 |
$ytchag_feed_url .= '&key=' . $ytchag_key;
|
161 |
|
162 |
-
$
|
|
|
|
|
163 |
|
164 |
$videos_result = $this->get_rss_data ( $ytchag_cache, $transientId, $ytchag_feed_url, $ytchag_cache_time);
|
165 |
|
@@ -206,30 +240,29 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
206 |
|
207 |
$thumb = new stdClass();
|
208 |
|
209 |
-
$thumb->id = $item->snippet->resourceId->videoId;
|
|
|
210 |
$thumb->title = $item->snippet->title;
|
211 |
$thumb->description = $item->snippet->description;
|
212 |
$thumb->modules = $modules;
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
$
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
$
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
$thumb->img = $item->snippet->thumbnails->maxres->url;
|
232 |
-
$thumb->quality = 'maxresdefault';
|
233 |
}
|
234 |
|
235 |
$thumbs[] = $thumb;
|
@@ -252,7 +285,6 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
252 |
}
|
253 |
|
254 |
|
255 |
-
//echo $this->ytchag_rss_markup( $instance );
|
256 |
echo $this->ytchag_json_markup( $instance );
|
257 |
|
258 |
echo $after_widget;
|
@@ -308,7 +340,7 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
308 |
$instance['ytchag_thumb_columns_ld'] = strip_tags( $new_instance['ytchag_thumb_columns_ld'] );
|
309 |
$instance['ytchag_nofollow'] = strip_tags( $new_instance['ytchag_nofollow'] );
|
310 |
$instance['ytchag_thumb_window'] = strip_tags( $new_instance['ytchag_thumb_window'] );
|
311 |
-
$instance['
|
312 |
$instance['ytchag_thumb_order_thumb'] = strip_tags( $new_instance['ytchag_thumb_order_thumb'] );
|
313 |
$instance['ytchag_thumb_order_title'] = strip_tags( $new_instance['ytchag_thumb_order_title'] );
|
314 |
$instance['ytchag_thumb_order_desc'] = strip_tags( $new_instance['ytchag_thumb_order_desc'] );
|
@@ -317,6 +349,8 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
317 |
$instance['ytchag_title'] = strip_tags( $new_instance['ytchag_title'] );
|
318 |
$instance['ytchag_description'] = strip_tags( $new_instance['ytchag_description'] );
|
319 |
$instance['ytchag_thumbnail_alignment'] = strip_tags( $new_instance['ytchag_thumbnail_alignment'] );
|
|
|
|
|
320 |
$instance['ytchag_title_tag'] = strip_tags( $new_instance['ytchag_title_tag'] );
|
321 |
$instance['ytchag_description_words_number'] = strip_tags( $new_instance['ytchag_description_words_number'] );
|
322 |
|
@@ -338,6 +372,17 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
338 |
$instance['ytchag_user_favorites'] = $playlists['favorites'];
|
339 |
}
|
340 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
return $instance;
|
342 |
}
|
343 |
|
@@ -355,7 +400,7 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
355 |
'ytchag_id' => 'UUBR8-60-B28hp2BmDPdntcQ',
|
356 |
'ytchag_user_uploads' => 'UUBR8-60-B28hp2BmDPdntcQ',
|
357 |
'ytchag_user_favorites' => '',
|
358 |
-
'ytchag_feed_order' => '
|
359 |
'ytchag_cache_time' => '24',
|
360 |
'ytchag_cache' => '',
|
361 |
|
@@ -383,15 +428,15 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
383 |
|
384 |
// Thumbnail options
|
385 |
'ytchag_maxitems' => '8',
|
386 |
-
'ytchag_thumb_width' => '
|
387 |
'ytchag_thumb_ratio' => '16x9',
|
388 |
'ytchag_thumb_columns_phones' => '2',
|
389 |
-
'ytchag_thumb_columns_tablets' => '
|
390 |
-
'ytchag_thumb_columns_md' => '
|
391 |
-
'ytchag_thumb_columns_ld' => '
|
392 |
'ytchag_nofollow' => '',
|
393 |
'ytchag_thumb_window' => '',
|
394 |
-
'
|
395 |
'ytchag_thumb_order_thumb' => '1',
|
396 |
'ytchag_thumb_order_title' => '2',
|
397 |
'ytchag_thumb_order_desc' => '3',
|
@@ -400,6 +445,8 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
400 |
'ytchag_title' => '',
|
401 |
'ytchag_description' => '',
|
402 |
'ytchag_thumbnail_alignment' => 'none',
|
|
|
|
|
403 |
'ytchag_title_tag' => 'h5',
|
404 |
'ytchag_description_words_number' => '',
|
405 |
|
@@ -474,7 +521,7 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
474 |
$ytchag_thumb_columns_ld = apply_filters( 'ytchag_thumb_columns_ld', $instance['ytchag_thumb_columns_ld'] );
|
475 |
$ytchag_nofollow = apply_filters( 'ytchag_nofollow', $instance['ytchag_nofollow'] );
|
476 |
$ytchag_thumb_window = apply_filters( 'ytchag_thumb_window', $instance['ytchag_thumb_window'] );
|
477 |
-
$
|
478 |
$ytchag_thumb_order_thumb = apply_filters( 'ytchag_thumb_order_thumb', $instance['ytchag_thumb_order_thumb'] );
|
479 |
$ytchag_thumb_order_title = apply_filters( 'ytchag_thumb_order_title', $instance['ytchag_thumb_order_title'] );
|
480 |
$ytchag_thumb_order_desc = apply_filters( 'ytchag_thumb_order_desc', $instance['ytchag_thumb_order_desc'] );
|
@@ -483,6 +530,8 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
483 |
$ytchag_title = apply_filters( 'ytchag_title', $instance['ytchag_title'] );
|
484 |
$ytchag_description = apply_filters( 'ytchag_description', $instance['ytchag_description'] );
|
485 |
$ytchag_thumbnail_alignment = apply_filters( 'ytchag_thumbnail_alignment', $instance['ytchag_thumbnail_alignment'] );
|
|
|
|
|
486 |
$ytchag_title_tag = apply_filters( 'ytchag_title_tag', $instance['ytchag_title_tag'] );
|
487 |
$ytchag_description_words_number = apply_filters( 'ytchag_description_words_number', $instance['ytchag_description_words_number'] );
|
488 |
|
@@ -504,7 +553,7 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
504 |
// Feed options
|
505 |
$ytchag_key = ( $ytchag_key) ? $ytchag_key: 'AIzaSyA6oW5D-ZlSIG-OHSBOR25TMd3YDRU7HdU'; //default user
|
506 |
$ytchag_feed = ( $ytchag_feed ) ? $ytchag_feed : 'user'; //default user
|
507 |
-
$ytchag_feed_order = ( $ytchag_feed_order ) ? $ytchag_feed_order : '
|
508 |
|
509 |
// Player options
|
510 |
$ytchag_player = isset( $ytchag_player ) ? $ytchag_player : '1'; //player?
|
@@ -532,7 +581,7 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
532 |
if ( (int) $ytchag_maxitems > 50 ) {
|
533 |
$ytchag_maxitems = 50;
|
534 |
}
|
535 |
-
$ytchag_thumb_width = ( $ytchag_thumb_width ) ? $ytchag_thumb_width :
|
536 |
$ytchag_thumb_columns_phones = ( ( $ytchag_thumb_columns_phones ) || ( $ytchag_thumb_columns_phones != 0 ) ) ? $ytchag_thumb_columns_phones : 0;
|
537 |
$ytchag_thumb_columns_tablets = ( ( $ytchag_thumb_columns_tablets ) || ( $ytchag_thumb_columns_tablets != 0 ) ) ? $ytchag_thumb_columns_tablets : 0;
|
538 |
$ytchag_thumb_columns_md = ( ( $ytchag_thumb_columns_md ) || ( $ytchag_thumb_columns_md != 0 ) ) ? $ytchag_thumb_columns_md : 0;
|
@@ -544,6 +593,8 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
544 |
$ytchag_title = ( $ytchag_title ) ? $ytchag_title : 0;
|
545 |
$ytchag_description = ( $ytchag_description ) ? $ytchag_description : 0;
|
546 |
$ytchag_thumbnail_alignment = ( $ytchag_thumbnail_alignment ) ? $ytchag_thumbnail_alignment : 'none';
|
|
|
|
|
547 |
$ytchag_title_tag = ( $ytchag_title_tag ) ? $ytchag_title_tag : 'h5';
|
548 |
$ytchag_description_words_number = ( $ytchag_description_words_number ) ? $ytchag_description_words_number : 10;
|
549 |
|
@@ -562,7 +613,7 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
562 |
|
563 |
} else {
|
564 |
|
565 |
-
$api = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=';
|
566 |
$resto = '&maxResults=' . $ytchag_maxitems . '&key=' . $ytchag_key;
|
567 |
|
568 |
if ($ytchag_feed !== 'playlist') {
|
@@ -572,7 +623,8 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
572 |
|
573 |
$ytchag_id = $item['id'];
|
574 |
$ytchag_user_uploads = $playlists['uploads'];
|
575 |
-
$ytchag_user_favorites = $playlists['favorites'];
|
|
|
576 |
}
|
577 |
|
578 |
if ($ytchag_search_playlists && $ytchag_id) {
|
@@ -586,36 +638,66 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
586 |
$ytchag_feed_url .= '&q=' . $ytchag_search_restrict;
|
587 |
}
|
588 |
else {
|
589 |
-
$ytchag_feed_url .= '&q=' . implode('
|
590 |
}
|
591 |
|
592 |
$ytchag_feed_url .= '&type=video';
|
593 |
$ytchag_feed_url .= '&key=' . $ytchag_key;
|
|
|
|
|
594 |
}
|
595 |
elseif ( $ytchag_feed === 'user' ) {
|
596 |
-
$ytchag_feed_url =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
597 |
$ytchag_playlist = $ytchag_user_uploads;
|
598 |
}
|
599 |
elseif ($ytchag_feed === 'favorites') {
|
600 |
$ytchag_feed_url = $api . $ytchag_user_favorites . $resto;
|
601 |
$ytchag_playlist = $ytchag_user_favorites;
|
602 |
}
|
|
|
|
|
|
|
|
|
603 |
elseif ($ytchag_feed === 'playlist') {
|
604 |
$ytchag_feed_url = $api . $ytchag_user . $resto;
|
605 |
$ytchag_playlist = $ytchag_user;
|
606 |
}
|
607 |
|
608 |
-
$
|
609 |
|
610 |
-
$transientId = 'ytc-' .md5(
|
611 |
$videos_result = $this->get_rss_data ( $ytchag_cache, $transientId, $ytchag_feed_url, $ytchag_cache_time );
|
612 |
|
613 |
ob_start();
|
614 |
|
615 |
if ($videos_result['response']['code'] != 200) {
|
616 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
617 |
}
|
618 |
else {
|
|
|
|
|
619 |
$json = json_decode($videos_result['body']);
|
620 |
|
621 |
if ($json->pageInfo->totalResults > 0) {
|
@@ -663,6 +745,10 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
663 |
|
664 |
ksort($modules);
|
665 |
|
|
|
|
|
|
|
|
|
666 |
foreach ($modules as $module) {
|
667 |
if ($module === 'player' && $ytchag_player == 1) {
|
668 |
include 'templates/player.php';
|
@@ -671,6 +757,15 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
671 |
include 'templates/' . $module . '.php';
|
672 |
}
|
673 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
674 |
}
|
675 |
}
|
676 |
|
@@ -689,11 +784,11 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
689 |
|
690 |
if ($cache == 1) {
|
691 |
|
692 |
-
if (false === ($
|
693 |
|
694 |
$resp = wp_remote_get($api);
|
695 |
$response_code = wp_remote_retrieve_response_code($resp);
|
696 |
-
$response_message = wp_remote_retrieve_response_message($
|
697 |
|
698 |
if ($response_code == 200) {
|
699 |
set_transient($transientId, $resp, $cache_time * HOUR_IN_SECONDS);
|
@@ -707,12 +802,14 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
707 |
|
708 |
$json = json_decode($resp['body'], true);
|
709 |
|
710 |
-
|
|
|
|
|
711 |
}
|
712 |
|
713 |
function get_rss_data( $ytchag_cache, $transientId, $ytchag_rss_url, $ytchag_cache_time ) {
|
714 |
//use cache
|
715 |
-
if ( $ytchag_cache ==
|
716 |
|
717 |
//if cache does not exist
|
718 |
if ( false === ( $videos_result = get_transient( $transientId ) ) ) {
|
@@ -784,10 +881,10 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
784 |
'key' => 'AIzaSyA0IBAaDqJxfQiqeYg_i2kVKW5P9ZLheVU',
|
785 |
'feed' => 'user',
|
786 |
'user' => 'youtube',
|
787 |
-
'id' => 'UUBR8-60-B28hp2BmDPdntcQ',
|
788 |
-
'user_uploads' => 'UUBR8-60-B28hp2BmDPdntcQ',
|
789 |
-
'user_favorites' => '',
|
790 |
-
'feed_order' => '
|
791 |
'cache_time' => '24',
|
792 |
'cache' => '',
|
793 |
|
@@ -815,15 +912,15 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
815 |
|
816 |
// Thumbnail options
|
817 |
'maxitems' => '8',
|
818 |
-
'thumb_width' => '
|
819 |
'thumb_ratio' => '16x9',
|
820 |
'thumb_columns_phones' => '2',
|
821 |
-
'thumb_columns_tablets' => '
|
822 |
-
'thumb_columns_md' => '
|
823 |
-
'thumb_columns_ld' => '
|
824 |
'nofollow' => '',
|
825 |
'thumb_window' => '',
|
826 |
-
'
|
827 |
'thumb_order_thumb' => '1',
|
828 |
'thumb_order_title' => '2',
|
829 |
'thumb_order_desc' => '3',
|
@@ -832,6 +929,8 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
832 |
'title' => '',
|
833 |
'description' => '',
|
834 |
'thumbnail_alignment' => 'none',
|
|
|
|
|
835 |
'title_tag' => 'h5',
|
836 |
'description_words_number' => '',
|
837 |
|
@@ -849,9 +948,9 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
849 |
$instance['ytchag_key'] = $key;
|
850 |
$instance['ytchag_feed'] = $feed;
|
851 |
$instance['ytchag_user'] = $user;
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
$instance['ytchag_feed_order'] = $feed_order;
|
856 |
$instance['ytchag_cache_time'] = $cache_time;
|
857 |
$instance['ytchag_cache'] = $cache;
|
@@ -888,7 +987,7 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
888 |
$instance['ytchag_thumb_columns_ld'] = $thumb_columns_ld;
|
889 |
$instance['ytchag_nofollow'] = $nofollow;
|
890 |
$instance['ytchag_thumb_window'] = $thumb_window;
|
891 |
-
$instance['
|
892 |
$instance['ytchag_thumb_order_thumb'] = $thumb_order_thumb;
|
893 |
$instance['ytchag_thumb_order_title'] = $thumb_order_title;
|
894 |
$instance['ytchag_thumb_order_desc'] = $thumb_order_desc;
|
@@ -897,6 +996,8 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
897 |
$instance['ytchag_title'] = $title;
|
898 |
$instance['ytchag_description'] = $description;
|
899 |
$instance['ytchag_thumbnail_alignment'] = $thumbnail_alignment;
|
|
|
|
|
900 |
$instance['ytchag_title_tag'] = $title_tag;
|
901 |
$instance['ytchag_description_words_number'] = $description_words_number;
|
902 |
|
@@ -908,9 +1009,33 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
908 |
|
909 |
$instance['ytchag_promotion'] = $promotion;
|
910 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
911 |
|
912 |
-
|
913 |
-
return '<div class="ytcshort youtubechannelgallery ytccf">'. $this->ytchag_json_markup( $instance ) . '</div>';
|
914 |
|
915 |
} // YoutubeChannelGallery_Shortcode
|
916 |
|
@@ -921,8 +1046,57 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
921 |
add_action( 'widgets_init', create_function( '', 'register_widget( "YoutubeChannelGallery_Widget" );' ) );
|
922 |
|
923 |
function toTag($s) {
|
924 |
-
return '
|
925 |
}
|
926 |
|
927 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
928 |
?>
|
5 |
Description: Show a youtube video and a gallery of thumbnails for a youtube channel.
|
6 |
Author: Javier Gómez Pose
|
7 |
Author URI: http://www.poselab.com/
|
8 |
+
Version: 2.2
|
9 |
License: GPL2
|
10 |
|
11 |
Copyright 2013 Javier Gómez Pose (email : javierpose@gmail.com)
|
62 |
|
63 |
function nextVideos() {
|
64 |
|
65 |
+
$wid = $_POST['wid'];
|
66 |
+
|
67 |
+
$instance = get_option($wid);
|
68 |
|
69 |
extract($instance);
|
70 |
|
71 |
$token = $_POST['token'];
|
72 |
$ytchag_playlist = $_POST['playlist'];
|
73 |
$ytchag_id = $_POST['cid'];
|
74 |
+
$search = $_POST['search'];
|
75 |
+
$ytchag_search_restrict = $_POST['tag'];
|
76 |
+
|
77 |
+
$plugincount = str_replace('ytc-', '', $wid);
|
78 |
|
79 |
+
if ($ytchag_search_playlists && $ytchag_id && $ytchag_feed == 'user') {
|
80 |
$ytchag_feed_url = 'https://www.googleapis.com/youtube/v3/search';
|
81 |
$ytchag_feed_url .= '?part=snippet';
|
82 |
$ytchag_feed_url .= '&channelId=' . $ytchag_id;
|
83 |
$ytchag_feed_url .= '&maxResults=' . $ytchag_maxitems;
|
84 |
|
85 |
if ($ytchag_search_restrict) {
|
86 |
+
$q = $ytchag_search_restrict;
|
87 |
}
|
88 |
else {
|
89 |
+
$q = implode(urlencode('|'), array_map('toTag', explode('#', $ytchag_search_playlists)));
|
90 |
}
|
91 |
|
92 |
+
$q .= $seach ? urlencode('+' . $search) : '';
|
93 |
+
|
94 |
+
$ytchag_feed_url .= '&q=' . $q;
|
95 |
+
|
96 |
$ytchag_feed_url .= '&type=video';
|
97 |
$ytchag_feed_url .= '&key=' . $ytchag_key;
|
98 |
$ytchag_feed_url .= '&pageToken=' . $token;
|
99 |
|
100 |
}
|
101 |
+
elseif ($ytchag_feed == 'user') {
|
102 |
+
$ytchag_feed_url = 'https://www.googleapis.com/youtube/v3/search';
|
103 |
+
$ytchag_feed_url .= '?part=snippet';
|
104 |
+
$ytchag_feed_url .= '&channelId=' . $ytchag_id;
|
105 |
+
$ytchag_feed_url .= '&maxResults=' . $ytchag_maxitems;
|
106 |
+
$ytchag_feed_url .= '&order=' . $ytchag_feed_order;
|
107 |
+
$ytchag_feed_url .= '&type=video';
|
108 |
+
$ytchag_feed_url .= '&key=' . $ytchag_key;
|
109 |
+
$ytchag_feed_url .= '&pageToken=' . $token;
|
110 |
+
}
|
111 |
else {
|
112 |
|
113 |
+
$api = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,status&playlistId=';
|
114 |
$resto = '&maxResults=' . $ytchag_maxitems . '&key=' . $ytchag_key;
|
115 |
|
116 |
$ytchag_feed_url = $api . $ytchag_playlist . $resto . '&pageToken=' . $token;
|
117 |
}
|
118 |
+
$ytchag_feed_url = str_replace('restrict_', '', $ytchag_feed_url);
|
119 |
|
120 |
+
$transientId = 'ytc-' . md5($ytchag_feed_url);
|
121 |
|
122 |
$videos_result = $this->get_rss_data ( $ytchag_cache, $transientId, $ytchag_feed_url, $ytchag_cache_time);
|
123 |
|
153 |
|
154 |
function searchVideos() {
|
155 |
|
156 |
+
$wid = $_POST['wid'];
|
157 |
+
|
158 |
+
$instance = get_option($wid);
|
159 |
|
160 |
extract($instance);
|
161 |
|
162 |
+
$term = $_POST['q'];
|
163 |
$ytchag_search_restrict = $_POST['tag'];
|
164 |
$ytchag_id = $_POST['cid'];
|
165 |
|
166 |
+
$plugincount = str_replace('ytc-', '', $wid);
|
167 |
+
|
168 |
$ytchag_feed_url = 'https://www.googleapis.com/youtube/v3/search';
|
169 |
$ytchag_feed_url .= '?part=snippet';
|
170 |
$ytchag_feed_url .= '&channelId=' . $ytchag_id;
|
173 |
if ($ytchag_search_restrict) {
|
174 |
$q = $ytchag_search_restrict;
|
175 |
}
|
176 |
+
elseif ($ytchag_search_playlists) {
|
177 |
+
$q = implode(urlencode('|'), array_map('toTag', explode('#', $ytchag_search_playlists)));
|
178 |
}
|
179 |
|
180 |
+
if ($q && $term) {
|
181 |
+
$q .= urlencode('+' . $term);
|
182 |
+
}
|
183 |
+
elseif ($term) {
|
184 |
+
$q .= $term;
|
185 |
+
}
|
186 |
+
|
187 |
+
if ($q) {
|
188 |
+
$ytchag_feed_url .= '&q=' . $q;
|
189 |
+
}
|
190 |
|
191 |
$ytchag_feed_url .= '&type=video';
|
192 |
$ytchag_feed_url .= '&key=' . $ytchag_key;
|
193 |
|
194 |
+
$ytchag_feed_url = str_replace('restrict_', '', $ytchag_feed_url);
|
195 |
+
|
196 |
+
$transientId = 'ytc-' .md5($ytchag_feed_url);
|
197 |
|
198 |
$videos_result = $this->get_rss_data ( $ytchag_cache, $transientId, $ytchag_feed_url, $ytchag_cache_time);
|
199 |
|
240 |
|
241 |
$thumb = new stdClass();
|
242 |
|
243 |
+
$thumb->id = isset($item->snippet->resourceId->videoId) ? $item->snippet->resourceId->videoId : null;
|
244 |
+
$thumb->id = $thumb->id ? $thumb->id : $item->id->videoId;
|
245 |
$thumb->title = $item->snippet->title;
|
246 |
$thumb->description = $item->snippet->description;
|
247 |
$thumb->modules = $modules;
|
248 |
+
$thumb->privacyStatus = isset($item->status->privacyStatus) ? $item->status->privacyStatus : null;
|
249 |
+
|
250 |
+
if ($thumb->privacyStatus == 'private') {
|
251 |
+
$thumb->img = plugins_url( '/img/private.png', __FILE__ );
|
252 |
+
$thumb->quality = 'medium';
|
253 |
+
}else{
|
254 |
+
if ($thumb_width > 320 && isset($item->snippet->thumbnails->high->url)) {
|
255 |
+
$thumb->img = $item->snippet->thumbnails->high->url;
|
256 |
+
$thumb->quality = 'high';
|
257 |
+
}
|
258 |
+
elseif ($thumb_width <= 120 && isset($item->snippet->thumbnails->default->url)) {
|
259 |
+
$thumb->img = $item->snippet->thumbnails->default->url;
|
260 |
+
$thumb->quality = 'default';
|
261 |
+
}
|
262 |
+
else {
|
263 |
+
$thumb->img = $item->snippet->thumbnails->medium->url;
|
264 |
+
$thumb->quality = 'medium';
|
265 |
+
}
|
|
|
|
|
266 |
}
|
267 |
|
268 |
$thumbs[] = $thumb;
|
285 |
}
|
286 |
|
287 |
|
|
|
288 |
echo $this->ytchag_json_markup( $instance );
|
289 |
|
290 |
echo $after_widget;
|
340 |
$instance['ytchag_thumb_columns_ld'] = strip_tags( $new_instance['ytchag_thumb_columns_ld'] );
|
341 |
$instance['ytchag_nofollow'] = strip_tags( $new_instance['ytchag_nofollow'] );
|
342 |
$instance['ytchag_thumb_window'] = strip_tags( $new_instance['ytchag_thumb_window'] );
|
343 |
+
$instance['ytchag_thumb_pagination'] = strip_tags( $new_instance['ytchag_thumb_pagination'] );
|
344 |
$instance['ytchag_thumb_order_thumb'] = strip_tags( $new_instance['ytchag_thumb_order_thumb'] );
|
345 |
$instance['ytchag_thumb_order_title'] = strip_tags( $new_instance['ytchag_thumb_order_title'] );
|
346 |
$instance['ytchag_thumb_order_desc'] = strip_tags( $new_instance['ytchag_thumb_order_desc'] );
|
349 |
$instance['ytchag_title'] = strip_tags( $new_instance['ytchag_title'] );
|
350 |
$instance['ytchag_description'] = strip_tags( $new_instance['ytchag_description'] );
|
351 |
$instance['ytchag_thumbnail_alignment'] = strip_tags( $new_instance['ytchag_thumbnail_alignment'] );
|
352 |
+
$instance['ytchag_thumbnail_alignment_width'] = strip_tags( $new_instance['ytchag_thumbnail_alignment_width'] );
|
353 |
+
$instance['ytchag_thumbnail_alignment_device'] = strip_tags( $new_instance['ytchag_thumbnail_alignment_device'] );
|
354 |
$instance['ytchag_title_tag'] = strip_tags( $new_instance['ytchag_title_tag'] );
|
355 |
$instance['ytchag_description_words_number'] = strip_tags( $new_instance['ytchag_description_words_number'] );
|
356 |
|
372 |
$instance['ytchag_user_favorites'] = $playlists['favorites'];
|
373 |
}
|
374 |
|
375 |
+
if (!$instance['ytchag_thumb_columns_phones'] &&
|
376 |
+
!$instance['ytchag_thumb_columns_tablets'] &&
|
377 |
+
!$instance['ytchag_thumb_columns_md'] &&
|
378 |
+
!$instance['ytchag_thumb_columns_ld']) {
|
379 |
+
|
380 |
+
$instance['ytchag_thumb_columns_phones'] = 2;
|
381 |
+
$instance['ytchag_thumb_columns_tablets'] = '';
|
382 |
+
$instance['ytchag_thumb_columns_md'] = '';
|
383 |
+
$instance['ytchag_thumb_columns_ld'] = '';
|
384 |
+
}
|
385 |
+
|
386 |
return $instance;
|
387 |
}
|
388 |
|
400 |
'ytchag_id' => 'UUBR8-60-B28hp2BmDPdntcQ',
|
401 |
'ytchag_user_uploads' => 'UUBR8-60-B28hp2BmDPdntcQ',
|
402 |
'ytchag_user_favorites' => '',
|
403 |
+
'ytchag_feed_order' => 'date',
|
404 |
'ytchag_cache_time' => '24',
|
405 |
'ytchag_cache' => '',
|
406 |
|
428 |
|
429 |
// Thumbnail options
|
430 |
'ytchag_maxitems' => '8',
|
431 |
+
'ytchag_thumb_width' => '320',
|
432 |
'ytchag_thumb_ratio' => '16x9',
|
433 |
'ytchag_thumb_columns_phones' => '2',
|
434 |
+
'ytchag_thumb_columns_tablets' => '',
|
435 |
+
'ytchag_thumb_columns_md' => '',
|
436 |
+
'ytchag_thumb_columns_ld' => '',
|
437 |
'ytchag_nofollow' => '',
|
438 |
'ytchag_thumb_window' => '',
|
439 |
+
'ytchag_thumb_pagination' => '1',
|
440 |
'ytchag_thumb_order_thumb' => '1',
|
441 |
'ytchag_thumb_order_title' => '2',
|
442 |
'ytchag_thumb_order_desc' => '3',
|
445 |
'ytchag_title' => '',
|
446 |
'ytchag_description' => '',
|
447 |
'ytchag_thumbnail_alignment' => 'none',
|
448 |
+
'ytchag_thumbnail_alignment_width' => 'half',
|
449 |
+
'ytchag_thumbnail_alignment_device' => 'tablet',
|
450 |
'ytchag_title_tag' => 'h5',
|
451 |
'ytchag_description_words_number' => '',
|
452 |
|
521 |
$ytchag_thumb_columns_ld = apply_filters( 'ytchag_thumb_columns_ld', $instance['ytchag_thumb_columns_ld'] );
|
522 |
$ytchag_nofollow = apply_filters( 'ytchag_nofollow', $instance['ytchag_nofollow'] );
|
523 |
$ytchag_thumb_window = apply_filters( 'ytchag_thumb_window', $instance['ytchag_thumb_window'] );
|
524 |
+
$ytchag_thumb_pagination = apply_filters( 'ytchag_thumb_pagination', $instance['ytchag_thumb_pagination'] );
|
525 |
$ytchag_thumb_order_thumb = apply_filters( 'ytchag_thumb_order_thumb', $instance['ytchag_thumb_order_thumb'] );
|
526 |
$ytchag_thumb_order_title = apply_filters( 'ytchag_thumb_order_title', $instance['ytchag_thumb_order_title'] );
|
527 |
$ytchag_thumb_order_desc = apply_filters( 'ytchag_thumb_order_desc', $instance['ytchag_thumb_order_desc'] );
|
530 |
$ytchag_title = apply_filters( 'ytchag_title', $instance['ytchag_title'] );
|
531 |
$ytchag_description = apply_filters( 'ytchag_description', $instance['ytchag_description'] );
|
532 |
$ytchag_thumbnail_alignment = apply_filters( 'ytchag_thumbnail_alignment', $instance['ytchag_thumbnail_alignment'] );
|
533 |
+
$ytchag_thumbnail_alignment_width = apply_filters( 'ytchag_thumbnail_alignment_width', $instance['ytchag_thumbnail_alignment_width'] );
|
534 |
+
$ytchag_thumbnail_alignment_device = apply_filters( 'ytchag_thumbnail_alignment_device', $instance['ytchag_thumbnail_alignment_device'] );
|
535 |
$ytchag_title_tag = apply_filters( 'ytchag_title_tag', $instance['ytchag_title_tag'] );
|
536 |
$ytchag_description_words_number = apply_filters( 'ytchag_description_words_number', $instance['ytchag_description_words_number'] );
|
537 |
|
553 |
// Feed options
|
554 |
$ytchag_key = ( $ytchag_key) ? $ytchag_key: 'AIzaSyA6oW5D-ZlSIG-OHSBOR25TMd3YDRU7HdU'; //default user
|
555 |
$ytchag_feed = ( $ytchag_feed ) ? $ytchag_feed : 'user'; //default user
|
556 |
+
$ytchag_feed_order = ( $ytchag_feed_order ) ? $ytchag_feed_order : 'date'; //default date
|
557 |
|
558 |
// Player options
|
559 |
$ytchag_player = isset( $ytchag_player ) ? $ytchag_player : '1'; //player?
|
581 |
if ( (int) $ytchag_maxitems > 50 ) {
|
582 |
$ytchag_maxitems = 50;
|
583 |
}
|
584 |
+
$ytchag_thumb_width = ( $ytchag_thumb_width ) ? $ytchag_thumb_width : 320;
|
585 |
$ytchag_thumb_columns_phones = ( ( $ytchag_thumb_columns_phones ) || ( $ytchag_thumb_columns_phones != 0 ) ) ? $ytchag_thumb_columns_phones : 0;
|
586 |
$ytchag_thumb_columns_tablets = ( ( $ytchag_thumb_columns_tablets ) || ( $ytchag_thumb_columns_tablets != 0 ) ) ? $ytchag_thumb_columns_tablets : 0;
|
587 |
$ytchag_thumb_columns_md = ( ( $ytchag_thumb_columns_md ) || ( $ytchag_thumb_columns_md != 0 ) ) ? $ytchag_thumb_columns_md : 0;
|
593 |
$ytchag_title = ( $ytchag_title ) ? $ytchag_title : 0;
|
594 |
$ytchag_description = ( $ytchag_description ) ? $ytchag_description : 0;
|
595 |
$ytchag_thumbnail_alignment = ( $ytchag_thumbnail_alignment ) ? $ytchag_thumbnail_alignment : 'none';
|
596 |
+
$ytchag_thumbnail_alignment_width = ( $ytchag_thumbnail_alignment_width ) ? $ytchag_thumbnail_alignment_width : 'half';
|
597 |
+
$ytchag_thumbnail_alignment_device = ( $ytchag_thumbnail_alignment_device ) ? $ytchag_thumbnail_alignment_device : 'tablet';
|
598 |
$ytchag_title_tag = ( $ytchag_title_tag ) ? $ytchag_title_tag : 'h5';
|
599 |
$ytchag_description_words_number = ( $ytchag_description_words_number ) ? $ytchag_description_words_number : 10;
|
600 |
|
613 |
|
614 |
} else {
|
615 |
|
616 |
+
$api = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,status&playlistId=';
|
617 |
$resto = '&maxResults=' . $ytchag_maxitems . '&key=' . $ytchag_key;
|
618 |
|
619 |
if ($ytchag_feed !== 'playlist') {
|
623 |
|
624 |
$ytchag_id = $item['id'];
|
625 |
$ytchag_user_uploads = $playlists['uploads'];
|
626 |
+
$ytchag_user_favorites = isset($playlists['favorites']) ? $playlists['favorites'] : null;
|
627 |
+
$ytchag_user_likes = isset($playlists['likes']) ? $playlists['likes'] : null;
|
628 |
}
|
629 |
|
630 |
if ($ytchag_search_playlists && $ytchag_id) {
|
638 |
$ytchag_feed_url .= '&q=' . $ytchag_search_restrict;
|
639 |
}
|
640 |
else {
|
641 |
+
$ytchag_feed_url .= '&q=' . implode(urlencode('|'), array_map('toTag', explode('#', $ytchag_search_playlists)));
|
642 |
}
|
643 |
|
644 |
$ytchag_feed_url .= '&type=video';
|
645 |
$ytchag_feed_url .= '&key=' . $ytchag_key;
|
646 |
+
|
647 |
+
$ytchag_playlist = $ytchag_user_uploads;
|
648 |
}
|
649 |
elseif ( $ytchag_feed === 'user' ) {
|
650 |
+
$ytchag_feed_url = 'https://www.googleapis.com/youtube/v3/search';
|
651 |
+
$ytchag_feed_url .= '?part=snippet';
|
652 |
+
$ytchag_feed_url .= '&channelId=' . $ytchag_id;
|
653 |
+
$ytchag_feed_url .= '&maxResults=' . $ytchag_maxitems;
|
654 |
+
$ytchag_feed_url .= '&order=' . $ytchag_feed_order;
|
655 |
+
$ytchag_feed_url .= '&type=video';
|
656 |
+
$ytchag_feed_url .= '&key=' . $ytchag_key;
|
657 |
+
|
658 |
$ytchag_playlist = $ytchag_user_uploads;
|
659 |
}
|
660 |
elseif ($ytchag_feed === 'favorites') {
|
661 |
$ytchag_feed_url = $api . $ytchag_user_favorites . $resto;
|
662 |
$ytchag_playlist = $ytchag_user_favorites;
|
663 |
}
|
664 |
+
elseif ($ytchag_feed === 'likes') {
|
665 |
+
$ytchag_feed_url = $api . $ytchag_user_likes . $resto;
|
666 |
+
$ytchag_playlist = $ytchag_user_likes;
|
667 |
+
}
|
668 |
elseif ($ytchag_feed === 'playlist') {
|
669 |
$ytchag_feed_url = $api . $ytchag_user . $resto;
|
670 |
$ytchag_playlist = $ytchag_user;
|
671 |
}
|
672 |
|
673 |
+
$ytchag_feed_url = str_replace('restrict_', '', $ytchag_feed_url);
|
674 |
|
675 |
+
$transientId = 'ytc-' . md5($ytchag_feed_url);
|
676 |
$videos_result = $this->get_rss_data ( $ytchag_cache, $transientId, $ytchag_feed_url, $ytchag_cache_time );
|
677 |
|
678 |
ob_start();
|
679 |
|
680 |
if ($videos_result['response']['code'] != 200) {
|
681 |
+
if ($ytchag_feed == 'playlist') {
|
682 |
+
$error_link = '<a href="https://www.youtube.com/playlist?list=' . $ytchag_user . '" target="_blank">' . $ytchag_user . '</a>';
|
683 |
+
$error_type = $ytchag_feed;
|
684 |
+
}else{
|
685 |
+
$error_link = '<a href="https://www.youtube.com/user/' . $ytchag_user . '" target="_blank">' . $ytchag_user . '</a>';
|
686 |
+
$error_type = 'user';
|
687 |
+
}
|
688 |
+
|
689 |
+
$content = '<div class="vmcerror">';
|
690 |
+
$content .= sprintf( __( 'Message from server: "%1$s". ', 'youtube-channel-gallery' ), $videos_result['response']['message'] );
|
691 |
+
$content .= sprintf( __( 'Check in YouTube if the id %1$s belongs to a %2$s. ', 'youtube-channel-gallery' ), $error_link, $error_type );
|
692 |
+
if ( $ytchag_feed !== 'playlist' && ($ytchag_feed === 'favorites' || $ytchag_feed === 'likes') ) {
|
693 |
+
$content .= sprintf( __( 'If the user id is correct, check that the channel of the user has list of "%1$s". ', 'youtube-channel-gallery' ), $ytchag_feed );
|
694 |
+
}
|
695 |
+
$content .= __( 'Check the <a href="http://wordpress.org/extend/plugins/youtube-channel-gallery/faq/" target="_blank">FAQ</a> of the plugin.', 'youtube-channel-gallery' );
|
696 |
+
$content .= '</div>';
|
697 |
}
|
698 |
else {
|
699 |
+
static $plugincount = 0;
|
700 |
+
|
701 |
$json = json_decode($videos_result['body']);
|
702 |
|
703 |
if ($json->pageInfo->totalResults > 0) {
|
745 |
|
746 |
ksort($modules);
|
747 |
|
748 |
+
$plugincount += 1;
|
749 |
+
echo '<div class="youtubechannelgallery">';
|
750 |
+
echo '<div id="ytc-'. $plugincount .'">';
|
751 |
+
echo '<div id="ytc-wrapper">';
|
752 |
foreach ($modules as $module) {
|
753 |
if ($module === 'player' && $ytchag_player == 1) {
|
754 |
include 'templates/player.php';
|
757 |
include 'templates/' . $module . '.php';
|
758 |
}
|
759 |
}
|
760 |
+
echo '</div>';
|
761 |
+
echo '</div>';
|
762 |
+
echo '</div>';
|
763 |
+
|
764 |
+
update_option('ytc-' . $plugincount, $instance);
|
765 |
+
|
766 |
+
}
|
767 |
+
else {
|
768 |
+
$content= '<div class="vmcerror">' . __( 'There are no videos matching selected criteria', 'youtube-channel-gallery');
|
769 |
}
|
770 |
}
|
771 |
|
784 |
|
785 |
if ($cache == 1) {
|
786 |
|
787 |
+
if (false === ($resp = get_transient($transientId))) {
|
788 |
|
789 |
$resp = wp_remote_get($api);
|
790 |
$response_code = wp_remote_retrieve_response_code($resp);
|
791 |
+
$response_message = wp_remote_retrieve_response_message($resp);
|
792 |
|
793 |
if ($response_code == 200) {
|
794 |
set_transient($transientId, $resp, $cache_time * HOUR_IN_SECONDS);
|
802 |
|
803 |
$json = json_decode($resp['body'], true);
|
804 |
|
805 |
+
if(isset($json['items'][0])){
|
806 |
+
return $json['items'][0];
|
807 |
+
}
|
808 |
}
|
809 |
|
810 |
function get_rss_data( $ytchag_cache, $transientId, $ytchag_rss_url, $ytchag_cache_time ) {
|
811 |
//use cache
|
812 |
+
if ( $ytchag_cache == 1 ) {
|
813 |
|
814 |
//if cache does not exist
|
815 |
if ( false === ( $videos_result = get_transient( $transientId ) ) ) {
|
881 |
'key' => 'AIzaSyA0IBAaDqJxfQiqeYg_i2kVKW5P9ZLheVU',
|
882 |
'feed' => 'user',
|
883 |
'user' => 'youtube',
|
884 |
+
//'id' => 'UUBR8-60-B28hp2BmDPdntcQ',
|
885 |
+
//'user_uploads' => 'UUBR8-60-B28hp2BmDPdntcQ',
|
886 |
+
//'user_favorites' => '',
|
887 |
+
'feed_order' => 'date',
|
888 |
'cache_time' => '24',
|
889 |
'cache' => '',
|
890 |
|
912 |
|
913 |
// Thumbnail options
|
914 |
'maxitems' => '8',
|
915 |
+
'thumb_width' => '320',
|
916 |
'thumb_ratio' => '16x9',
|
917 |
'thumb_columns_phones' => '2',
|
918 |
+
'thumb_columns_tablets' => '',
|
919 |
+
'thumb_columns_md' => '',
|
920 |
+
'thumb_columns_ld' => '',
|
921 |
'nofollow' => '',
|
922 |
'thumb_window' => '',
|
923 |
+
'thumb_pagination' => '1',
|
924 |
'thumb_order_thumb' => '1',
|
925 |
'thumb_order_title' => '2',
|
926 |
'thumb_order_desc' => '3',
|
929 |
'title' => '',
|
930 |
'description' => '',
|
931 |
'thumbnail_alignment' => 'none',
|
932 |
+
'thumbnail_alignment_width' => 'half',
|
933 |
+
'thumbnail_alignment_device' => 'tablet',
|
934 |
'title_tag' => 'h5',
|
935 |
'description_words_number' => '',
|
936 |
|
948 |
$instance['ytchag_key'] = $key;
|
949 |
$instance['ytchag_feed'] = $feed;
|
950 |
$instance['ytchag_user'] = $user;
|
951 |
+
//$instance['ytchag_id'] = $id;
|
952 |
+
//$instance['ytchag_user_uploads'] = $user_uploads;
|
953 |
+
//$instance['ytchag_user_favorites'] = $user_favorites;
|
954 |
$instance['ytchag_feed_order'] = $feed_order;
|
955 |
$instance['ytchag_cache_time'] = $cache_time;
|
956 |
$instance['ytchag_cache'] = $cache;
|
987 |
$instance['ytchag_thumb_columns_ld'] = $thumb_columns_ld;
|
988 |
$instance['ytchag_nofollow'] = $nofollow;
|
989 |
$instance['ytchag_thumb_window'] = $thumb_window;
|
990 |
+
$instance['ytchag_thumb_pagination'] = $thumb_pagination;
|
991 |
$instance['ytchag_thumb_order_thumb'] = $thumb_order_thumb;
|
992 |
$instance['ytchag_thumb_order_title'] = $thumb_order_title;
|
993 |
$instance['ytchag_thumb_order_desc'] = $thumb_order_desc;
|
996 |
$instance['ytchag_title'] = $title;
|
997 |
$instance['ytchag_description'] = $description;
|
998 |
$instance['ytchag_thumbnail_alignment'] = $thumbnail_alignment;
|
999 |
+
$instance['ytchag_thumbnail_alignment_width'] = $thumbnail_alignment_width;
|
1000 |
+
$instance['ytchag_thumbnail_alignment_device'] = $thumbnail_alignment_device;
|
1001 |
$instance['ytchag_title_tag'] = $title_tag;
|
1002 |
$instance['ytchag_description_words_number'] = $description_words_number;
|
1003 |
|
1009 |
|
1010 |
$instance['ytchag_promotion'] = $promotion;
|
1011 |
|
1012 |
+
$item = $this->getUserPlaylists($instance['ytchag_user'], $instance['ytchag_key'], $instance['ytchag_cache'], $instance['ytchag_cache_time']);
|
1013 |
+
$playlists = $item['contentDetails']['relatedPlaylists'];
|
1014 |
+
|
1015 |
+
$instance['ytchag_id'] = $item['id'];
|
1016 |
+
$instance['ytchag_user_uploads'] = $playlists['uploads'];
|
1017 |
+
$instance['ytchag_user_favorites'] = isset($playlists['favorites']) ? $playlists['favorites'] : null;
|
1018 |
+
|
1019 |
+
if (!$instance['ytchag_thumb_columns_phones'] &&
|
1020 |
+
!$instance['ytchag_thumb_columns_tablets'] &&
|
1021 |
+
!$instance['ytchag_thumb_columns_md'] &&
|
1022 |
+
!$instance['ytchag_thumb_columns_ld']) {
|
1023 |
+
|
1024 |
+
$instance['ytchag_thumb_columns_phones'] = 2;
|
1025 |
+
$instance['ytchag_thumb_columns_tablets'] = '';
|
1026 |
+
$instance['ytchag_thumb_columns_md'] = '';
|
1027 |
+
$instance['ytchag_thumb_columns_ld'] = '';
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
|
1031 |
+
|
1032 |
+
$contenido = '<div class="ytcshort ytccf">'. $this->ytchag_json_markup( $instance ) . '</div>';
|
1033 |
+
|
1034 |
+
preg_match('<div id="ytc-(.+?)">', $contenido, $matches);
|
1035 |
+
|
1036 |
+
update_option('ytc-' . $matches[1], $instance);
|
1037 |
|
1038 |
+
return $contenido;
|
|
|
1039 |
|
1040 |
} // YoutubeChannelGallery_Shortcode
|
1041 |
|
1046 |
add_action( 'widgets_init', create_function( '', 'register_widget( "YoutubeChannelGallery_Widget" );' ) );
|
1047 |
|
1048 |
function toTag($s) {
|
1049 |
+
return 'restrict_' . str_replace(' ', '_', strtolower($s));
|
1050 |
}
|
1051 |
|
1052 |
|
1053 |
+
function multiplos($arr) {
|
1054 |
+
|
1055 |
+
$res = 0;
|
1056 |
+
|
1057 |
+
foreach ($arr as $a) {
|
1058 |
+
|
1059 |
+
if (!is_numeric($a)) {
|
1060 |
+
continue;
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
$tmp = $arr;
|
1064 |
+
|
1065 |
+
array_splice($tmp, array_search($a, $tmp), 1);
|
1066 |
+
|
1067 |
+
foreach ($tmp as $t) {
|
1068 |
+
|
1069 |
+
if (!is_numeric($t)) {
|
1070 |
+
continue;
|
1071 |
+
}
|
1072 |
+
if($t != 0) {
|
1073 |
+
$res += $a % $t;
|
1074 |
+
}
|
1075 |
+
}
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
return ($res === 0);
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
function visible($col, $i) {
|
1082 |
+
$coln = array('xs','sm','md','lg');
|
1083 |
+
$n=0;
|
1084 |
+
$div = '';
|
1085 |
+
$class = '';
|
1086 |
+
foreach ($col as $c) {
|
1087 |
+
if ($c != 0 && ($i+1) % $c === 0){
|
1088 |
+
$class .= ' visible-' . $coln[$n] . '-block';
|
1089 |
+
$div = '<div class="clearfix' . $class . '"></div>';
|
1090 |
+
}
|
1091 |
+
$n++;
|
1092 |
+
}
|
1093 |
+
echo $div;
|
1094 |
+
}
|
1095 |
+
function format_dec($col) {
|
1096 |
+
if (is_float($col)) {
|
1097 |
+
return number_format($col, 1, '-', '');
|
1098 |
+
}else{
|
1099 |
+
return $col;
|
1100 |
+
}
|
1101 |
+
}
|
1102 |
?>
|