YouTube Channel - Version 1.3.2

Version Description

  • Add option to show video description below video
  • Add option to shorten video description to N characters
  • Add option to use light theme for controls instead of default dark theme (HTML5 iframe and flash object)
  • Add option to hide annotations from video
Download this release

Release Info

Developer urkekg
Plugin Icon YouTube Channel
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.3.1 to 1.3.2

languages/youtube-channel-es_ES.po CHANGED
@@ -6,165 +6,210 @@ msgstr ""
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Aleksandar Urošević <urke@users.sourceforge.net>\n"
8
  "Language-Team: \n"
9
- "Language: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
 
14
  "X-Poedit-SourceCharset: utf-8\n"
15
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
16
- "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
- "X-Textdomain-Support: yes\n"
18
  "X-Poedit-SearchPath-0: .\n"
 
19
 
20
- # @ youtube-channel
21
- #: ../youtube-channel.php:56
22
  msgid "Aspect ratio (relative to width):"
23
  msgstr "Aspecto de ratio (relativo al ancho):"
24
 
25
- # @ youtube-channel
26
- #: ../youtube-channel.php:72
27
  msgid "Autoplay video"
28
  msgstr "Reproducción automática"
29
 
30
- # @ youtube-channel
31
- #: ../youtube-channel.php:49
32
  msgid "Channel:"
33
  msgstr "Canal:"
34
 
35
- # @ youtube-channel
36
- #: ../youtube-channel.php:71
37
  msgid "Fix height taken by controls"
38
  msgstr "Fijar la altura tomada por los controles"
39
 
40
- # @ youtube-channel
41
- #: ../youtube-channel.php:53
42
- msgid "Get random video from channel"
43
- msgstr "Mostrar vídeo aleatorio del canal"
44
-
45
- # @ youtube-channel
46
- #: ../youtube-channel.php:55
47
  msgid "Height"
48
  msgstr "Alto"
49
 
50
- # @ youtube-channel
51
- #: ../youtube-channel.php:73
52
  msgid "Hide player controls"
53
  msgstr "Esconder controles de reproducción"
54
 
55
- # @ youtube-channel
56
- #: ../youtube-channel.php:74
57
  msgid "Hide video info"
58
  msgstr "Esconder info de vídeo"
59
 
60
- #: ../youtube-channel.php:52
61
- msgid "Items to fetch (min 1, max 50):"
62
- msgstr ""
63
-
64
- # @ youtube-channel
65
- #: ../youtube-channel.php:187
66
  msgid "No items"
67
  msgstr "No hay elementos"
68
 
69
- # @ youtube-channel
70
- #: ../youtube-channel.php:79
71
  msgid "Open channel in new window/tab"
72
  msgstr "Abrir canal en nueva ventana"
73
 
74
- #: ../youtube-channel.php:50
 
75
  msgid "Playlist:"
76
  msgstr "Lista de reproducción:"
77
 
78
- # @ youtube-channel
79
- #: ../youtube-channel.php:78
80
  msgid "Show link to channel"
81
  msgstr "Mostrar enlace a canal"
82
 
83
- # @ youtube-channel
84
- #: ../youtube-channel.php:75
85
  msgid "Show video title"
86
  msgstr "Mostrar título"
87
 
88
- # @ youtube-channel
89
- #: ../youtube-channel.php:80
90
  msgid "Use target=\"_blank\" (invalid XHTML)"
91
  msgstr "Utilice objetivo = \"blank\" (XHTML no válido)"
92
 
93
- #: ../youtube-channel.php:51
 
94
  msgid "Use the playlist instead of channel"
95
  msgstr "Use la lista de reproducción en lugar de canal"
96
 
97
- # @ youtube-channel
98
- #: ../youtube-channel.php:77
99
  msgid "Visit YouTube Channel text:"
100
  msgstr "Visitar canal de YouTube"
101
 
102
- # @ youtube-channel
103
- #: ../youtube-channel.php:256
104
  #, php-format
 
105
  msgid "Visit channel %1$s"
106
  msgstr "Visitar canal %1$s"
107
 
108
- # @ youtube-channel
109
- #: ../youtube-channel.php:219
110
  #, php-format
 
111
  msgid "Watch video %1$s published on %2$s"
112
  msgstr "Ver vídeo %1$s publicado en %2$s"
113
 
114
- # @ youtube-channel
115
- #: ../youtube-channel.php:64
116
  msgid "What to show?"
117
  msgstr "¿Qué mostrar?"
118
 
119
- # @ youtube-channel
120
- #: ../youtube-channel.php:48
121
  msgid "Widget Title:"
122
  msgstr "Título de widget"
123
 
124
- # @ youtube-channel
125
- #: ../youtube-channel.php:54
126
  msgid "Width"
127
  msgstr "Ancho"
128
 
129
- # @ youtube-channel
130
- #: ../youtube-channel.php:23
131
  msgid "YouTube Channel"
132
  msgstr "Canal de YouTube"
133
 
134
- # @ youtube-channel
135
- #: ../youtube-channel.php:69
136
  msgid "chromeless video"
137
  msgstr "vídeo sin marco"
138
 
139
- # @ youtube-channel
140
- #: ../youtube-channel.php:58
141
  msgid "custom"
142
  msgstr "Personalizado"
143
 
144
- # @ youtube-channel
145
- #: ../youtube-channel.php:54 ../youtube-channel.php:55
 
 
146
  msgid "default"
147
  msgstr "por defecto"
148
 
149
- # @ youtube-channel
150
- #: ../youtube-channel.php:68
151
  msgid "iframe (HTML5 player)"
152
  msgstr "iframe (html5) - el bueno"
153
 
154
- # @ youtube-channel
155
- #: ../youtube-channel.php:259
156
  msgid "in new window/tab"
157
  msgstr "en nueva ventana/pestaña"
158
 
159
- # @ youtube-channel
160
- #: ../youtube-channel.php:67
161
  msgid "object (flash player)"
162
  msgstr "objeto (flash)"
163
 
164
- # @ youtube-channel
165
- #: ../youtube-channel.php:66
166
  msgid "thumbnail"
167
  msgstr "miniatura"
168
 
169
- #~ msgid "Maximum items to fetch:"
170
- #~ msgstr "Máximo de elementos en busca de:"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Aleksandar Urošević <urke@users.sourceforge.net>\n"
8
  "Language-Team: \n"
 
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-Language: \n"
14
+ "X-Poedit-Country: \n"
15
  "X-Poedit-SourceCharset: utf-8\n"
16
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
17
+ "X-Poedit-Basepath: \n"
18
+ "X-Poedit-Bookmarks: \n"
19
  "X-Poedit-SearchPath-0: .\n"
20
+ "X-Textdomain-Support: yes"
21
 
22
+ #: youtube-channel.php:63
23
+ #@ youtube-channel
24
  msgid "Aspect ratio (relative to width):"
25
  msgstr "Aspecto de ratio (relativo al ancho):"
26
 
27
+ #: youtube-channel.php:81
28
+ #@ youtube-channel
29
  msgid "Autoplay video"
30
  msgstr "Reproducción automática"
31
 
32
+ #: youtube-channel.php:54
33
+ #@ youtube-channel
34
  msgid "Channel:"
35
  msgstr "Canal:"
36
 
37
+ #: youtube-channel.php:80
38
+ #@ youtube-channel
39
  msgid "Fix height taken by controls"
40
  msgstr "Fijar la altura tomada por los controles"
41
 
42
+ #: youtube-channel.php:62
43
+ #@ youtube-channel
 
 
 
 
 
44
  msgid "Height"
45
  msgstr "Alto"
46
 
47
+ #: youtube-channel.php:79
48
+ #@ youtube-channel
49
  msgid "Hide player controls"
50
  msgstr "Esconder controles de reproducción"
51
 
52
+ #: youtube-channel.php:86
53
+ #@ youtube-channel
54
  msgid "Hide video info"
55
  msgstr "Esconder info de vídeo"
56
 
57
+ #: youtube-channel.php:218
58
+ #@ youtube-channel
 
 
 
 
59
  msgid "No items"
60
  msgstr "No hay elementos"
61
 
62
+ #: youtube-channel.php:92
63
+ #@ youtube-channel
64
  msgid "Open channel in new window/tab"
65
  msgstr "Abrir canal en nueva ventana"
66
 
67
+ #: youtube-channel.php:55
68
+ #@ youtube-channel
69
  msgid "Playlist:"
70
  msgstr "Lista de reproducción:"
71
 
72
+ #: youtube-channel.php:91
73
+ #@ youtube-channel
74
  msgid "Show link to channel"
75
  msgstr "Mostrar enlace a canal"
76
 
77
+ #: youtube-channel.php:83
78
+ #@ youtube-channel
79
  msgid "Show video title"
80
  msgstr "Mostrar título"
81
 
82
+ #: youtube-channel.php:93
83
+ #@ youtube-channel
84
  msgid "Use target=\"_blank\" (invalid XHTML)"
85
  msgstr "Utilice objetivo = \"blank\" (XHTML no válido)"
86
 
87
+ #: youtube-channel.php:56
88
+ #@ youtube-channel
89
  msgid "Use the playlist instead of channel"
90
  msgstr "Use la lista de reproducción en lugar de canal"
91
 
92
+ #: youtube-channel.php:90
93
+ #@ youtube-channel
94
  msgid "Visit YouTube Channel text:"
95
  msgstr "Visitar canal de YouTube"
96
 
97
+ #: youtube-channel.php:307
 
98
  #, php-format
99
+ #@ youtube-channel
100
  msgid "Visit channel %1$s"
101
  msgstr "Visitar canal %1$s"
102
 
103
+ #: youtube-channel.php:257
 
104
  #, php-format
105
+ #@ youtube-channel
106
  msgid "Watch video %1$s published on %2$s"
107
  msgstr "Ver vídeo %1$s publicado en %2$s"
108
 
109
+ #: youtube-channel.php:71
110
+ #@ youtube-channel
111
  msgid "What to show?"
112
  msgstr "¿Qué mostrar?"
113
 
114
+ #: youtube-channel.php:53
115
+ #@ youtube-channel
116
  msgid "Widget Title:"
117
  msgstr "Título de widget"
118
 
119
+ #: youtube-channel.php:61
120
+ #@ youtube-channel
121
  msgid "Width"
122
  msgstr "Ancho"
123
 
124
+ #: youtube-channel.php:23
125
+ #@ youtube-channel
126
  msgid "YouTube Channel"
127
  msgstr "Canal de YouTube"
128
 
129
+ #: youtube-channel.php:76
130
+ #@ youtube-channel
131
  msgid "chromeless video"
132
  msgstr "vídeo sin marco"
133
 
134
+ #: youtube-channel.php:65
135
+ #@ youtube-channel
136
  msgid "custom"
137
  msgstr "Personalizado"
138
 
139
+ #: youtube-channel.php:61
140
+ #: youtube-channel.php:62
141
+ #: youtube-channel.php:88
142
+ #@ youtube-channel
143
  msgid "default"
144
  msgstr "por defecto"
145
 
146
+ #: youtube-channel.php:75
147
+ #@ youtube-channel
148
  msgid "iframe (HTML5 player)"
149
  msgstr "iframe (html5) - el bueno"
150
 
151
+ #: youtube-channel.php:310
152
+ #@ youtube-channel
153
  msgid "in new window/tab"
154
  msgstr "en nueva ventana/pestaña"
155
 
156
+ #: youtube-channel.php:74
157
+ #@ youtube-channel
158
  msgid "object (flash player)"
159
  msgstr "objeto (flash)"
160
 
161
+ #: youtube-channel.php:73
162
+ #@ youtube-channel
163
  msgid "thumbnail"
164
  msgstr "miniatura"
165
 
166
+ #: youtube-channel.php:59
167
+ #@ youtube-channel
168
+ msgid "Try to fix `No items` error"
169
+ msgstr ""
170
+
171
+ #: youtube-channel.php:78
172
+ #@ youtube-channel
173
+ msgid "Use light theme (default is dark)"
174
+ msgstr ""
175
+
176
+ #: youtube-channel.php:84
177
+ #@ youtube-channel
178
+ msgid "Show video description"
179
+ msgstr ""
180
+
181
+ #: youtube-channel.php:85
182
+ #@ youtube-channel
183
+ msgid "Hide annotations from video"
184
+ msgstr ""
185
+
186
+ #: youtube-channel.php:88
187
+ #@ youtube-channel
188
+ msgid "Description length"
189
+ msgstr ""
190
+
191
+ #: youtube-channel.php:57
192
+ #@ youtube-channel
193
+ msgid "Get one random video of latest N videos from channel (min 1, max 50):"
194
+ msgstr ""
195
+
196
+ #: youtube-channel.php:58
197
+ #@ youtube-channel
198
+ msgid "Show random video from channel"
199
+ msgstr ""
200
+
201
+ #: youtube-channel.php:60
202
+ #@ youtube-channel
203
+ msgid "Video property"
204
+ msgstr ""
205
+
206
+ #: youtube-channel.php:82
207
+ #@ youtube-channel
208
+ msgid "Layout behaviour"
209
+ msgstr ""
210
+
211
+ #: youtube-channel.php:89
212
+ #@ youtube-channel
213
+ msgid "Link to channel"
214
+ msgstr ""
215
+
languages/youtube-channel-sr_RS.mo CHANGED
Binary file
languages/youtube-channel-sr_RS.po CHANGED
@@ -6,165 +6,210 @@ msgstr ""
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Aleksandar Urošević <urke@users.sourceforge.net>\n"
8
  "Language-Team: \n"
9
- "Language: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
 
14
  "X-Poedit-SourceCharset: utf-8\n"
15
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
16
- "X-Textdomain-Support: yes\n"
 
17
  "X-Poedit-SearchPath-0: .\n"
 
18
 
19
- # @ youtube-channel
20
- #: ../youtube-channel.php:56
21
  msgid "Aspect ratio (relative to width):"
22
  msgstr "Однос страница (база је ширина):"
23
 
24
- # @ youtube-channel
25
- #: ../youtube-channel.php:72
26
  msgid "Autoplay video"
27
  msgstr "Аутоматска репродукција"
28
 
29
- # @ youtube-channel
30
- #: ../youtube-channel.php:49
31
  msgid "Channel:"
32
  msgstr "Канал:"
33
 
34
- # @ youtube-channel
35
- #: ../youtube-channel.php:71
36
  msgid "Fix height taken by controls"
37
  msgstr "Поправи висину контрола"
38
 
39
- # @ youtube-channel
40
- #: ../youtube-channel.php:53
41
- msgid "Get random video from channel"
42
- msgstr "Насумични видео са канала"
43
-
44
- # @ youtube-channel
45
- #: ../youtube-channel.php:55
46
  msgid "Height"
47
  msgstr "Висина"
48
 
49
- # @ youtube-channel
50
- #: ../youtube-channel.php:73
51
  msgid "Hide player controls"
52
  msgstr "Сакривање контрола"
53
 
54
- # @ youtube-channel
55
- #: ../youtube-channel.php:74
56
  msgid "Hide video info"
57
  msgstr "Сакривање информација о видеу"
58
 
59
- #: ../youtube-channel.php:52
60
- msgid "Items to fetch (min 1, max 50):"
61
- msgstr "Ставки за добављање (мин 1, макс 50)"
62
-
63
- # @ youtube-channel
64
- #: ../youtube-channel.php:187
65
  msgid "No items"
66
  msgstr "Нема видео снимака"
67
 
68
- # @ youtube-channel
69
- #: ../youtube-channel.php:79
70
  msgid "Open channel in new window/tab"
71
  msgstr "Отвори канал у новом прозору"
72
 
73
- #: ../youtube-channel.php:50
 
74
  msgid "Playlist:"
75
  msgstr "Плејлиста:"
76
 
77
- # @ youtube-channel
78
- #: ../youtube-channel.php:78
79
  msgid "Show link to channel"
80
  msgstr "Прикажи везу до канала"
81
 
82
- # @ youtube-channel
83
- #: ../youtube-channel.php:75
84
  msgid "Show video title"
85
  msgstr "Прикажи наслов видеа"
86
 
87
- # @ youtube-channel
88
- #: ../youtube-channel.php:80
89
  msgid "Use target=\"_blank\" (invalid XHTML)"
90
  msgstr "Користи target=\"_blank\"<br />(даје невалидан XHTML)"
91
 
92
- #: ../youtube-channel.php:51
 
93
  msgid "Use the playlist instead of channel"
94
  msgstr "Користи плејлисту уместо канала"
95
 
96
- # @ youtube-channel
97
- #: ../youtube-channel.php:77
98
  msgid "Visit YouTube Channel text:"
99
  msgstr "Текст за везу „посети Јутјуб канал“:"
100
 
101
- # @ youtube-channel
102
- #: ../youtube-channel.php:256
103
  #, php-format
 
104
  msgid "Visit channel %1$s"
105
  msgstr "Посети канал %1$s"
106
 
107
- # @ youtube-channel
108
- #: ../youtube-channel.php:219
109
  #, php-format
 
110
  msgid "Watch video %1$s published on %2$s"
111
  msgstr "Погледај видео %1$s објављен дана %2$s"
112
 
113
- # @ youtube-channel
114
- #: ../youtube-channel.php:64
115
  msgid "What to show?"
116
  msgstr "Шта да прикажем?"
117
 
118
- # @ youtube-channel
119
- #: ../youtube-channel.php:48
120
  msgid "Widget Title:"
121
  msgstr "Наслов виџета:"
122
 
123
- # @ youtube-channel
124
- #: ../youtube-channel.php:54
125
  msgid "Width"
126
  msgstr "Ширина"
127
 
128
- # @ youtube-channel
129
- #: ../youtube-channel.php:23
130
  msgid "YouTube Channel"
131
  msgstr "YouTube Channel"
132
 
133
- # @ youtube-channel
134
- #: ../youtube-channel.php:69
135
  msgid "chromeless video"
136
  msgstr "„chromeless“ видео"
137
 
138
- # @ youtube-channel
139
- #: ../youtube-channel.php:58
140
  msgid "custom"
141
  msgstr "прилагођено"
142
 
143
- # @ youtube-channel
144
- #: ../youtube-channel.php:54
145
- #: ../youtube-channel.php:55
 
146
  msgid "default"
147
  msgstr "подразумевано"
148
 
149
- # @ youtube-channel
150
- #: ../youtube-channel.php:68
151
  msgid "iframe (HTML5 player)"
152
  msgstr "уграђени фрејм (HTML5 плејер)"
153
 
154
- # @ youtube-channel
155
- #: ../youtube-channel.php:259
156
  msgid "in new window/tab"
157
  msgstr "у новом прозору/језичку"
158
 
159
- # @ youtube-channel
160
- #: ../youtube-channel.php:67
161
  msgid "object (flash player)"
162
  msgstr "објекат (флеш плејер)"
163
 
164
- # @ youtube-channel
165
- #: ../youtube-channel.php:66
166
  msgid "thumbnail"
167
  msgstr "умањену слику"
168
 
169
- #~ msgid "Maximum items to fetch:"
170
- #~ msgstr "Максималан број видеа:"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Aleksandar Urošević <urke@users.sourceforge.net>\n"
8
  "Language-Team: \n"
 
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-Language: \n"
14
+ "X-Poedit-Country: \n"
15
  "X-Poedit-SourceCharset: utf-8\n"
16
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
17
+ "X-Poedit-Basepath: \n"
18
+ "X-Poedit-Bookmarks: \n"
19
  "X-Poedit-SearchPath-0: .\n"
20
+ "X-Textdomain-Support: yes"
21
 
22
+ #: youtube-channel.php:63
23
+ #@ youtube-channel
24
  msgid "Aspect ratio (relative to width):"
25
  msgstr "Однос страница (база је ширина):"
26
 
27
+ #: youtube-channel.php:81
28
+ #@ youtube-channel
29
  msgid "Autoplay video"
30
  msgstr "Аутоматска репродукција"
31
 
32
+ #: youtube-channel.php:54
33
+ #@ youtube-channel
34
  msgid "Channel:"
35
  msgstr "Канал:"
36
 
37
+ #: youtube-channel.php:80
38
+ #@ youtube-channel
39
  msgid "Fix height taken by controls"
40
  msgstr "Поправи висину контрола"
41
 
42
+ #: youtube-channel.php:62
43
+ #@ youtube-channel
 
 
 
 
 
44
  msgid "Height"
45
  msgstr "Висина"
46
 
47
+ #: youtube-channel.php:79
48
+ #@ youtube-channel
49
  msgid "Hide player controls"
50
  msgstr "Сакривање контрола"
51
 
52
+ #: youtube-channel.php:86
53
+ #@ youtube-channel
54
  msgid "Hide video info"
55
  msgstr "Сакривање информација о видеу"
56
 
57
+ #: youtube-channel.php:218
58
+ #@ youtube-channel
 
 
 
 
59
  msgid "No items"
60
  msgstr "Нема видео снимака"
61
 
62
+ #: youtube-channel.php:92
63
+ #@ youtube-channel
64
  msgid "Open channel in new window/tab"
65
  msgstr "Отвори канал у новом прозору"
66
 
67
+ #: youtube-channel.php:55
68
+ #@ youtube-channel
69
  msgid "Playlist:"
70
  msgstr "Плејлиста:"
71
 
72
+ #: youtube-channel.php:91
73
+ #@ youtube-channel
74
  msgid "Show link to channel"
75
  msgstr "Прикажи везу до канала"
76
 
77
+ #: youtube-channel.php:83
78
+ #@ youtube-channel
79
  msgid "Show video title"
80
  msgstr "Прикажи наслов видеа"
81
 
82
+ #: youtube-channel.php:93
83
+ #@ youtube-channel
84
  msgid "Use target=\"_blank\" (invalid XHTML)"
85
  msgstr "Користи target=\"_blank\"<br />(даје невалидан XHTML)"
86
 
87
+ #: youtube-channel.php:56
88
+ #@ youtube-channel
89
  msgid "Use the playlist instead of channel"
90
  msgstr "Користи плејлисту уместо канала"
91
 
92
+ #: youtube-channel.php:90
93
+ #@ youtube-channel
94
  msgid "Visit YouTube Channel text:"
95
  msgstr "Текст за везу „посети Јутјуб канал“:"
96
 
97
+ #: youtube-channel.php:307
 
98
  #, php-format
99
+ #@ youtube-channel
100
  msgid "Visit channel %1$s"
101
  msgstr "Посети канал %1$s"
102
 
103
+ #: youtube-channel.php:257
 
104
  #, php-format
105
+ #@ youtube-channel
106
  msgid "Watch video %1$s published on %2$s"
107
  msgstr "Погледај видео %1$s објављен дана %2$s"
108
 
109
+ #: youtube-channel.php:71
110
+ #@ youtube-channel
111
  msgid "What to show?"
112
  msgstr "Шта да прикажем?"
113
 
114
+ #: youtube-channel.php:53
115
+ #@ youtube-channel
116
  msgid "Widget Title:"
117
  msgstr "Наслов виџета:"
118
 
119
+ #: youtube-channel.php:61
120
+ #@ youtube-channel
121
  msgid "Width"
122
  msgstr "Ширина"
123
 
124
+ #: youtube-channel.php:23
125
+ #@ youtube-channel
126
  msgid "YouTube Channel"
127
  msgstr "YouTube Channel"
128
 
129
+ #: youtube-channel.php:76
130
+ #@ youtube-channel
131
  msgid "chromeless video"
132
  msgstr "„chromeless“ видео"
133
 
134
+ #: youtube-channel.php:65
135
+ #@ youtube-channel
136
  msgid "custom"
137
  msgstr "прилагођено"
138
 
139
+ #: youtube-channel.php:61
140
+ #: youtube-channel.php:62
141
+ #: youtube-channel.php:88
142
+ #@ youtube-channel
143
  msgid "default"
144
  msgstr "подразумевано"
145
 
146
+ #: youtube-channel.php:75
147
+ #@ youtube-channel
148
  msgid "iframe (HTML5 player)"
149
  msgstr "уграђени фрејм (HTML5 плејер)"
150
 
151
+ #: youtube-channel.php:310
152
+ #@ youtube-channel
153
  msgid "in new window/tab"
154
  msgstr "у новом прозору/језичку"
155
 
156
+ #: youtube-channel.php:74
157
+ #@ youtube-channel
158
  msgid "object (flash player)"
159
  msgstr "објекат (флеш плејер)"
160
 
161
+ #: youtube-channel.php:73
162
+ #@ youtube-channel
163
  msgid "thumbnail"
164
  msgstr "умањену слику"
165
 
166
+ #: youtube-channel.php:59
167
+ #@ youtube-channel
168
+ msgid "Try to fix `No items` error"
169
+ msgstr "Покушај да поправиш гершку „No items“"
170
+
171
+ #: youtube-channel.php:78
172
+ #@ youtube-channel
173
+ msgid "Use light theme (default is dark)"
174
+ msgstr "Користи светлу тему"
175
+
176
+ #: youtube-channel.php:84
177
+ #@ youtube-channel
178
+ msgid "Show video description"
179
+ msgstr "Прикажи опис видеа"
180
+
181
+ #: youtube-channel.php:85
182
+ #@ youtube-channel
183
+ msgid "Hide annotations from video"
184
+ msgstr "Сакриј белешке са видеа"
185
+
186
+ #: youtube-channel.php:88
187
+ #@ youtube-channel
188
+ msgid "Description length"
189
+ msgstr "Дужина описа"
190
+
191
+ #: youtube-channel.php:57
192
+ #@ youtube-channel
193
+ msgid "Get one random video of latest N videos from channel (min 1, max 50):"
194
+ msgstr "Узми један насумични видео од последњих Н видеа са канала (мин. 1, макс. 50):"
195
+
196
+ #: youtube-channel.php:58
197
+ #@ youtube-channel
198
+ msgid "Show random video from channel"
199
+ msgstr "Прикажи насумични видео са канала"
200
+
201
+ #: youtube-channel.php:60
202
+ #@ youtube-channel
203
+ msgid "Video property"
204
+ msgstr "Поставке видеа"
205
+
206
+ #: youtube-channel.php:82
207
+ #@ youtube-channel
208
+ msgid "Layout behaviour"
209
+ msgstr "Изглед"
210
+
211
+ #: youtube-channel.php:89
212
+ #@ youtube-channel
213
+ msgid "Link to channel"
214
+ msgstr "Веза до канала"
215
+
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: youtube, channel, playlist, single, widget, widgets, youtube player, flash player, rss, feed, video, thumbnail, embed, sidebar, chromeless, iframe, html5
5
  Requires at least: 3.2.1
6
  Tested up to: 3.3.1
7
- Stable tag: 1.3.1
8
 
9
  Sidebar widget to show latest video thumbnail, playable flash object or chromeless video from YouTube Channel or Playlist.
10
 
@@ -28,12 +28,18 @@ If you like this extension and you find it useful, please rate it on the right s
28
  * Option to hide video controls
29
  * Option to hide video info
30
  * Option to show video title on top of the video
 
 
 
31
  * Set custom text for link to channel
32
  * Option to show link to channel
33
  * Option to open channel in new tab/window
34
  * Option to use target="_blank" instead of javascript window.open() for chanel link in new tab/window
35
  * Translated to Serbian and Spanish (English by default)
36
 
 
 
 
37
  = Credits =
38
  Chromeless option borrowed from [Chromeless YouTube](http://wordpress.org/extend/plugins/chromeless-youtube/) extension.
39
  Code improvements and textdomain adds done by [dimadin](http://wordpress.org/extend/plugins/profile/dimadin).
@@ -77,6 +83,12 @@ Since version 1.3.1 you can paste full YouTube playlist URL and ID will be autom
77
  YouTube provide 320p videos if height of embeded video is set to 320 or more. If you use small YTC video size, 240p will be loaded instead.
78
 
79
  == Changelog ==
 
 
 
 
 
 
80
  = 1.3.1 =
81
  * Add support for playlist full URL
82
  * Fixed no random video for playlist
4
  Tags: youtube, channel, playlist, single, widget, widgets, youtube player, flash player, rss, feed, video, thumbnail, embed, sidebar, chromeless, iframe, html5
5
  Requires at least: 3.2.1
6
  Tested up to: 3.3.1
7
+ Stable tag: 1.3.2
8
 
9
  Sidebar widget to show latest video thumbnail, playable flash object or chromeless video from YouTube Channel or Playlist.
10
 
28
  * Option to hide video controls
29
  * Option to hide video info
30
  * Option to show video title on top of the video
31
+ * Option to show video description below vide (experimental)
32
+ * Option to hide annotations from video
33
+ * Option to use light controls theme
34
  * Set custom text for link to channel
35
  * Option to show link to channel
36
  * Option to open channel in new tab/window
37
  * Option to use target="_blank" instead of javascript window.open() for chanel link in new tab/window
38
  * Translated to Serbian and Spanish (English by default)
39
 
40
+ = Issues =
41
+ Controls light theme and hidden annotations does not work for chromeless object.
42
+
43
  = Credits =
44
  Chromeless option borrowed from [Chromeless YouTube](http://wordpress.org/extend/plugins/chromeless-youtube/) extension.
45
  Code improvements and textdomain adds done by [dimadin](http://wordpress.org/extend/plugins/profile/dimadin).
83
  YouTube provide 320p videos if height of embeded video is set to 320 or more. If you use small YTC video size, 240p will be loaded instead.
84
 
85
  == Changelog ==
86
+ = 1.3.2 =
87
+ * Add option to show video description below video
88
+ * Add option to shorten video description to N characters
89
+ * Add option to use light theme for controls instead of default dark theme (HTML5 iframe and flash object)
90
+ * Add option to hide annotations from video
91
+
92
  = 1.3.1 =
93
  * Add support for playlist full URL
94
  * Fixed no random video for playlist
screenshot-1.png CHANGED
Binary file
youtube-channel.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: YouTube Channel
4
  Plugin URI: http://blog.urosevic.net/wordpress/youtube-channel/
5
  Description: <a href="widgets.php">Widget</a> that display latest video thumbnail, iframe (HTML5 video), object (Flash video) or chromeless video from YouTube Channel or Playlist.
6
  Author: Aleksandar Urošević
7
- Version: 1.3.1
8
  Author URI: http://urosevic.net/
9
  */
10
 
@@ -36,6 +36,8 @@ class YouTube_Channel_Widget extends WP_Widget {
36
  $popupgoto = esc_attr($instance['popupgoto']);
37
  $target = esc_attr($instance['target']);
38
  $showtitle = esc_attr($instance['showtitle']);
 
 
39
  $width = esc_attr($instance['width']);
40
  $height = esc_attr($instance['height']);
41
  $to_show = esc_attr($instance['to_show']);
@@ -45,13 +47,17 @@ class YouTube_Channel_Widget extends WP_Widget {
45
  $ratio = esc_attr($instance['ratio']);
46
  $fixyt = esc_attr($instance['fixyt']);
47
  $hideinfo = esc_attr($instance['hideinfo']);
 
 
48
  ?>
49
  <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Widget Title:', 'youtube-channel'); ?><input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
50
  <p><label for="<?php echo $this->get_field_id('channel'); ?>"><?php _e('Channel:', 'youtube-channel'); ?> <input class="widefat" id="<?php echo $this->get_field_id('channel'); ?>" name="<?php echo $this->get_field_name('channel'); ?>" type="text" value="<?php echo $channel; ?>" /></label></p>
51
  <p><label for="<?php echo $this->get_field_id('playlist'); ?>"><?php _e('Playlist:', 'youtube-channel'); ?> <input class="widefat" id="<?php echo $this->get_field_id('playlist'); ?>" name="<?php echo $this->get_field_name('playlist'); ?>" type="text" value="<?php echo $playlist; ?>" /></label>
52
  <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['usepl'], true ); ?> id="<?php echo $this->get_field_id( 'usepl' ); ?>" name="<?php echo $this->get_field_name( 'usepl' ); ?>" /> <label for="<?php echo $this->get_field_id( 'usepl' ); ?>"><?php _e('Use the playlist instead of channel', 'youtube-channel'); ?></label></p>
53
- <p><label for="<?php echo $this->get_field_id('maxrnd'); ?>"><?php _e('Items to fetch (min 1, max 50):', 'youtube-channel'); ?> <input class="widefat" id="<?php echo $this->get_field_id('maxrnd'); ?>" name="<?php echo $this->get_field_name('maxrnd'); ?>" type="text" value="<?php echo $maxrnd; ?>" /></label><br />
54
- <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['getrnd'], true ); ?> id="<?php echo $this->get_field_id( 'getrnd' ); ?>" name="<?php echo $this->get_field_name( 'getrnd' ); ?>" /> <label for="<?php echo $this->get_field_id( 'getrnd' ); ?>"><?php _e('Get random video from channel', 'youtube-channel'); ?></label></p>
 
 
55
  <p><label for="<?php echo $this->get_field_id('width'); ?>"><?php _e('Width', 'youtube-channel'); ?> (<?php _e('default', 'youtube-channel'); ?> 220):<input class="widefat" id="<?php echo $this->get_field_id('width'); ?>" name="<?php echo $this->get_field_name('width'); ?>" type="text" value="<?php echo $width; ?>" /></label></p>
56
  <p><label for="<?php echo $this->get_field_id('height'); ?>"><?php _e('Height', 'youtube-channel'); ?> (<?php _e('default', 'youtube-channel'); ?> 165):<input class="widefat" id="<?php echo $this->get_field_id('height'); ?>" name="<?php echo $this->get_field_name('height'); ?>" type="text" value="<?php echo $height; ?>" /></label></p>
57
  <p><label for="<?php echo $this->get_field_id('to_show'); ?>"><?php _e('Aspect ratio (relative to width):', 'youtube-channel'); ?>
@@ -69,13 +75,18 @@ class YouTube_Channel_Widget extends WP_Widget {
69
  <option value="iframe"<?php selected( $instance['to_show'], 'iframe' ); ?>><?php _e('iframe (HTML5 player)', 'youtube-channel'); ?></option>
70
  <option value="chromeless"<?php selected( $instance['to_show'], 'chromeless' ); ?>><?php _e('chromeless video', 'youtube-channel'); ?></option>
71
  </select>
72
- <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['fixyt'], true ); ?> id="<?php echo $this->get_field_id( 'fixyt' ); ?>" name="<?php echo $this->get_field_name( 'fixyt' ); ?>" /> <label for="<?php echo $this->get_field_id( 'fixyt' ); ?>"><?php _e('Fix height taken by controls', 'youtube-channel'); ?></label><br />
73
- <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['fixnoitem'], true ); ?> id="<?php echo $this->get_field_id( 'fixnoitem' ); ?>" name="<?php echo $this->get_field_name( 'fixnoitem' ); ?>" /> <label for="<?php echo $this->get_field_id( 'fixnoitem' ); ?>"><?php _e('Try to fix `No items` error', 'youtube-channel'); ?></label><br />
74
- <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['autoplay'], true ); ?> id="<?php echo $this->get_field_id( 'autoplay' ); ?>" name="<?php echo $this->get_field_name( 'autoplay' ); ?>" /> <label for="<?php echo $this->get_field_id( 'autoplay' ); ?>"><?php _e('Autoplay video', 'youtube-channel'); ?></label><br />
75
  <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['controls'], true ); ?> id="<?php echo $this->get_field_id( 'controls' ); ?>" name="<?php echo $this->get_field_name( 'controls' ); ?>" /> <label for="<?php echo $this->get_field_id( 'controls' ); ?>"><?php _e('Hide player controls', 'youtube-channel'); ?></label><br />
76
- <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['hideinfo'], true ); ?> id="<?php echo $this->get_field_id( 'hideinfo' ); ?>" name="<?php echo $this->get_field_name( 'hideinfo' ); ?>" /> <label for="<?php echo $this->get_field_id( 'hideinfo' ); ?>"><?php _e('Hide video info', 'youtube-channel'); ?></label><br />
77
- <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['showtitle'], true ); ?> id="<?php echo $this->get_field_id( 'showtitle' ); ?>" name="<?php echo $this->get_field_name( 'showtitle' ); ?>" /> <label for="<?php echo $this->get_field_id( 'showtitle' ); ?>"><?php _e('Show video title', 'youtube-channel'); ?></label>
 
 
 
 
 
78
  </p>
 
 
79
  <p><label for="<?php echo $this->get_field_id('goto_txt'); ?>"><?php _e('Visit YouTube Channel text:', 'youtube-channel'); ?> <input class="widefat" id="<?php echo $this->get_field_id('goto_txt'); ?>" name="<?php echo $this->get_field_name('goto_txt'); ?>" type="text" value="<?php echo $goto_txt; ?>" /></label>
80
  <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['showgoto'], true ); ?> id="<?php echo $this->get_field_id( 'showgoto' ); ?>" name="<?php echo $this->get_field_name( 'showgoto' ); ?>" /> <label for="<?php echo $this->get_field_id( 'showgoto' ); ?>"><?php _e('Show link to channel', 'youtube-channel'); ?></label><br />
81
  <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['popupgoto'], true ); ?> id="<?php echo $this->get_field_id( 'popupgoto' ); ?>" name="<?php echo $this->get_field_name( 'popupgoto' ); ?>" /> <label for="<?php echo $this->get_field_id( 'popupgoto' ); ?>"><?php _e('Open channel in new window/tab', 'youtube-channel'); ?></label><br />
@@ -87,26 +98,30 @@ class YouTube_Channel_Widget extends WP_Widget {
87
  function update($new_instance, $old_instance) {
88
  // processes widget options to be saved
89
  $instance = $old_instance;
90
- $instance['title'] = strip_tags($new_instance['title']);
91
- $instance['channel'] = strip_tags($new_instance['channel']);
92
- $instance['playlist'] = strip_tags($new_instance['playlist']);
93
- $instance['usepl'] = $new_instance['usepl'];
94
- $instance['getrnd'] = $new_instance['getrnd'];
95
- $instance['maxrnd'] = $new_instance['maxrnd'];
96
- $instance['goto_txt'] = strip_tags($new_instance['goto_txt']);
97
- $instance['showgoto'] = $new_instance['showgoto'];
98
- $instance['popupgoto'] = $new_instance['popupgoto'];
99
- $instance['target'] = $new_instance['target'];
100
- $instance['showtitle'] = $new_instance['showtitle'];
101
- $instance['width'] = strip_tags($new_instance['width']);
102
- $instance['height'] = strip_tags($new_instance['height']);
103
- $instance['to_show'] = strip_tags($new_instance['to_show']);
104
- $instance['autoplay'] = $new_instance['autoplay'];
105
- $instance['controls'] = $new_instance['controls'];
106
- $instance['fixnoitem'] = $new_instance['fixnoitem'];
107
- $instance['ratio'] = strip_tags($new_instance['ratio']);
108
- $instance['fixyt'] = $new_instance['fixyt'];
109
- $instance['hideinfo'] = $new_instance['hideinfo'];
 
 
 
 
110
 
111
  return $instance;
112
  }
@@ -163,6 +178,9 @@ class YouTube_Channel_Widget extends WP_Widget {
163
  $height += 25;
164
  }
165
 
 
 
 
166
  echo $before_widget;
167
  if ( $title )
168
  echo $before_title . $title . $after_title;
@@ -231,16 +249,19 @@ class YouTube_Channel_Widget extends WP_Widget {
231
  echo "<h3>$yt_title</h3>";
232
  }
233
 
 
 
 
234
  // print out video
235
  if ( $to_show == "thumbnail" ) {
236
  $title = sprintf( __( 'Watch video %1$s published on %2$s' , 'youtube-channel' ), $yt_title, $yt_date );
237
  echo <<<EOF
238
- <a href="$yt_video" title="$title"><div style="width: ${width}px; height: ${height}px; overflow: hidden; background: url($yt_thumb) 50% 50% no-repeat; background-size: ${width}px ${imgfixedheight}px;" title="$yt_title"></div></a>
239
  EOF;
240
  } else if ( $to_show == "chromeless" ) {
241
  ?>
242
- <object type="application/x-shockwave-flash" data="<?php echo YOUTUBE_CHANNEL_URL . 'chromeless.swf'; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>">
243
- <param name="flashVars" value="video_source=<?php echo $yt_id; ?>&video_width=<?php echo $width; ?>&video_height=<?php echo $height; ?><?php if ( $autoplay ) { echo "&autoplay=Yes"; } if ( !$controls ) { echo "&youtube_controls=Yes"; } ?>" />
244
  <param name="quality" value="high" />
245
  <param name="wmode" value="opaque" />
246
  <param name="swfversion" value="6.0.65.0" />
@@ -250,14 +271,15 @@ EOF;
250
  } else if ( $to_show == "iframe" ) {
251
  if (!$usepl) { $yt_url = $yt_id; }
252
  ?>
253
- <iframe title="YouTube video player" width="<?php echo $width; ?>" height="<?php echo $height; ?>" src="http://www.youtube.com/embed/<?php echo $yt_url."?wmode=opaque&enablejsapi=1"; if ( $controls ) { echo "&controls=0"; } if ( $hideinfo ) { echo "&showinfo=0"; } if ( $autoplay ) { echo "&autoplay=1"; } ?>" frameborder="0" allowfullscreen></iframe>
254
  <?php
255
  } else { // default is object
256
  ?>
257
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?php echo $width; ?>" height="<?php echo $height; ?>">
258
- <param name="movie" value="http://www.youtube.com/<?php echo $yt_url; ?>?version=3<?php if ( $controls ) { echo "&amp;controls=0"; } if ( $hideinfo ) { echo "&amp;showinfo=0"; } if ( $autoplay ) { echo "&amp;autoplay=1"; } ?>" />
 
259
  <!--[if !IE]>-->
260
- <object type="application/x-shockwave-flash" data="http://www.youtube.com/<?php echo $yt_url; ?>?version=3<?php if ( $controls ) { echo "&amp;controls=0"; } if ( $hideinfo ) { echo "&amp;showinfo=0"; } if ( $autoplay ) { echo "&amp;autoplay=1"; } ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>">
261
  <!--<![endif]-->
262
  <param name="wmode" value="opaque" />
263
  <!--[if !IE]>-->
@@ -267,6 +289,17 @@ EOF;
267
  <?php
268
  }
269
 
 
 
 
 
 
 
 
 
 
 
 
270
  // do we need to show goto link?
271
  if ( $instance['showgoto'] ) {
272
  $goto_txt = $instance['goto_txt'];
4
  Plugin URI: http://blog.urosevic.net/wordpress/youtube-channel/
5
  Description: <a href="widgets.php">Widget</a> that display latest video thumbnail, iframe (HTML5 video), object (Flash video) or chromeless video from YouTube Channel or Playlist.
6
  Author: Aleksandar Urošević
7
+ Version: 1.3.2
8
  Author URI: http://urosevic.net/
9
  */
10
 
36
  $popupgoto = esc_attr($instance['popupgoto']);
37
  $target = esc_attr($instance['target']);
38
  $showtitle = esc_attr($instance['showtitle']);
39
+ $showvidesc = esc_attr($instance['showvidesc']);
40
+ $videsclen = esc_attr($instance['videsclen']);
41
  $width = esc_attr($instance['width']);
42
  $height = esc_attr($instance['height']);
43
  $to_show = esc_attr($instance['to_show']);
47
  $ratio = esc_attr($instance['ratio']);
48
  $fixyt = esc_attr($instance['fixyt']);
49
  $hideinfo = esc_attr($instance['hideinfo']);
50
+ $hideanno = esc_attr($instance['hideanno']);
51
+ $themelight = esc_attr($instance['themelight']);
52
  ?>
53
  <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Widget Title:', 'youtube-channel'); ?><input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
54
  <p><label for="<?php echo $this->get_field_id('channel'); ?>"><?php _e('Channel:', 'youtube-channel'); ?> <input class="widefat" id="<?php echo $this->get_field_id('channel'); ?>" name="<?php echo $this->get_field_name('channel'); ?>" type="text" value="<?php echo $channel; ?>" /></label></p>
55
  <p><label for="<?php echo $this->get_field_id('playlist'); ?>"><?php _e('Playlist:', 'youtube-channel'); ?> <input class="widefat" id="<?php echo $this->get_field_id('playlist'); ?>" name="<?php echo $this->get_field_name('playlist'); ?>" type="text" value="<?php echo $playlist; ?>" /></label>
56
  <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['usepl'], true ); ?> id="<?php echo $this->get_field_id( 'usepl' ); ?>" name="<?php echo $this->get_field_name( 'usepl' ); ?>" /> <label for="<?php echo $this->get_field_id( 'usepl' ); ?>"><?php _e('Use the playlist instead of channel', 'youtube-channel'); ?></label></p>
57
+ <p><label for="<?php echo $this->get_field_id('maxrnd'); ?>"><?php _e('Get one random video of latest N videos from channel (min 1, max 50):', 'youtube-channel'); ?> <input class="widefat" id="<?php echo $this->get_field_id('maxrnd'); ?>" name="<?php echo $this->get_field_name('maxrnd'); ?>" type="text" value="<?php echo $maxrnd; ?>" /></label><br />
58
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['getrnd'], true ); ?> id="<?php echo $this->get_field_id( 'getrnd' ); ?>" name="<?php echo $this->get_field_name( 'getrnd' ); ?>" /> <label for="<?php echo $this->get_field_id( 'getrnd' ); ?>"><?php _e('Show random video from channel', 'youtube-channel'); ?></label></p>
59
+ <p><input class="checkbox" type="checkbox" <?php checked( (bool) $instance['fixnoitem'], true ); ?> id="<?php echo $this->get_field_id( 'fixnoitem' ); ?>" name="<?php echo $this->get_field_name( 'fixnoitem' ); ?>" /> <label for="<?php echo $this->get_field_id( 'fixnoitem' ); ?>"><?php _e('Try to fix `No items` error', 'youtube-channel'); ?></label><p>
60
+ <h4><?php _e('Video property', 'youtube-channel'); ?></h4>
61
  <p><label for="<?php echo $this->get_field_id('width'); ?>"><?php _e('Width', 'youtube-channel'); ?> (<?php _e('default', 'youtube-channel'); ?> 220):<input class="widefat" id="<?php echo $this->get_field_id('width'); ?>" name="<?php echo $this->get_field_name('width'); ?>" type="text" value="<?php echo $width; ?>" /></label></p>
62
  <p><label for="<?php echo $this->get_field_id('height'); ?>"><?php _e('Height', 'youtube-channel'); ?> (<?php _e('default', 'youtube-channel'); ?> 165):<input class="widefat" id="<?php echo $this->get_field_id('height'); ?>" name="<?php echo $this->get_field_name('height'); ?>" type="text" value="<?php echo $height; ?>" /></label></p>
63
  <p><label for="<?php echo $this->get_field_id('to_show'); ?>"><?php _e('Aspect ratio (relative to width):', 'youtube-channel'); ?>
75
  <option value="iframe"<?php selected( $instance['to_show'], 'iframe' ); ?>><?php _e('iframe (HTML5 player)', 'youtube-channel'); ?></option>
76
  <option value="chromeless"<?php selected( $instance['to_show'], 'chromeless' ); ?>><?php _e('chromeless video', 'youtube-channel'); ?></option>
77
  </select>
78
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['themelight'], true ); ?> id="<?php echo $this->get_field_id( 'themelight' ); ?>" name="<?php echo $this->get_field_name( 'themelight' ); ?>" /> <label for="<?php echo $this->get_field_id( 'themelight' ); ?>"><?php _e('Use light theme (default is dark)', 'youtube-channel'); ?></label><br />
 
 
79
  <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['controls'], true ); ?> id="<?php echo $this->get_field_id( 'controls' ); ?>" name="<?php echo $this->get_field_name( 'controls' ); ?>" /> <label for="<?php echo $this->get_field_id( 'controls' ); ?>"><?php _e('Hide player controls', 'youtube-channel'); ?></label><br />
80
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['fixyt'], true ); ?> id="<?php echo $this->get_field_id( 'fixyt' ); ?>" name="<?php echo $this->get_field_name( 'fixyt' ); ?>" /> <label for="<?php echo $this->get_field_id( 'fixyt' ); ?>"><?php _e('Fix height taken by controls', 'youtube-channel'); ?></label><br />
81
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['autoplay'], true ); ?> id="<?php echo $this->get_field_id( 'autoplay' ); ?>" name="<?php echo $this->get_field_name( 'autoplay' ); ?>" /> <label for="<?php echo $this->get_field_id( 'autoplay' ); ?>"><?php _e('Autoplay video', 'youtube-channel'); ?></label></p>
82
+ <h4><?php _e('Layout behaviour', 'youtube-channel'); ?></h4>
83
+ <p><input class="checkbox" type="checkbox" <?php checked( (bool) $instance['showtitle'], true ); ?> id="<?php echo $this->get_field_id( 'showtitle' ); ?>" name="<?php echo $this->get_field_name( 'showtitle' ); ?>" /> <label for="<?php echo $this->get_field_id( 'showtitle' ); ?>"><?php _e('Show video title', 'youtube-channel'); ?></label><br />
84
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['showvidesc'], true ); ?> id="<?php echo $this->get_field_id( 'showvidesc' ); ?>" name="<?php echo $this->get_field_name( 'showvidesc' ); ?>" /> <label for="<?php echo $this->get_field_id( 'showvidesc' ); ?>"><?php _e('Show video description', 'youtube-channel'); ?></label><br />
85
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['hideanno'], true ); ?> id="<?php echo $this->get_field_id( 'hideanno' ); ?>" name="<?php echo $this->get_field_name( 'hideanno' ); ?>" /> <label for="<?php echo $this->get_field_id( 'hideanno' ); ?>"><?php _e('Hide annotations from video', 'youtube-channel'); ?></label><br />
86
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['hideinfo'], true ); ?> id="<?php echo $this->get_field_id( 'hideinfo' ); ?>" name="<?php echo $this->get_field_name( 'hideinfo' ); ?>" /> <label for="<?php echo $this->get_field_id( 'hideinfo' ); ?>"><?php _e('Hide video info', 'youtube-channel'); ?></label></p>
87
  </p>
88
+ <p><label for="<?php echo $this->get_field_id('videsclen'); ?>"><?php _e('Description length', 'youtube-channel'); ?> (<?php _e('default', 'youtube-channel'); ?> 0 for full):<input class="widefat" id="<?php echo $this->get_field_id('videsclen'); ?>" name="<?php echo $this->get_field_name('videsclen'); ?>" type="text" value="<?php echo $videsclen; ?>" /></label></p>
89
+ <h4><?php _e('Link to channel', 'youtube-channel'); ?></h4>
90
  <p><label for="<?php echo $this->get_field_id('goto_txt'); ?>"><?php _e('Visit YouTube Channel text:', 'youtube-channel'); ?> <input class="widefat" id="<?php echo $this->get_field_id('goto_txt'); ?>" name="<?php echo $this->get_field_name('goto_txt'); ?>" type="text" value="<?php echo $goto_txt; ?>" /></label>
91
  <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['showgoto'], true ); ?> id="<?php echo $this->get_field_id( 'showgoto' ); ?>" name="<?php echo $this->get_field_name( 'showgoto' ); ?>" /> <label for="<?php echo $this->get_field_id( 'showgoto' ); ?>"><?php _e('Show link to channel', 'youtube-channel'); ?></label><br />
92
  <input class="checkbox" type="checkbox" <?php checked( (bool) $instance['popupgoto'], true ); ?> id="<?php echo $this->get_field_id( 'popupgoto' ); ?>" name="<?php echo $this->get_field_name( 'popupgoto' ); ?>" /> <label for="<?php echo $this->get_field_id( 'popupgoto' ); ?>"><?php _e('Open channel in new window/tab', 'youtube-channel'); ?></label><br />
98
  function update($new_instance, $old_instance) {
99
  // processes widget options to be saved
100
  $instance = $old_instance;
101
+ $instance['title'] = strip_tags($new_instance['title']);
102
+ $instance['channel'] = strip_tags($new_instance['channel']);
103
+ $instance['playlist'] = strip_tags($new_instance['playlist']);
104
+ $instance['usepl'] = $new_instance['usepl'];
105
+ $instance['getrnd'] = $new_instance['getrnd'];
106
+ $instance['maxrnd'] = $new_instance['maxrnd'];
107
+ $instance['goto_txt'] = strip_tags($new_instance['goto_txt']);
108
+ $instance['showgoto'] = $new_instance['showgoto'];
109
+ $instance['popupgoto'] = $new_instance['popupgoto'];
110
+ $instance['target'] = $new_instance['target'];
111
+ $instance['showtitle'] = $new_instance['showtitle'];
112
+ $instance['showvidesc'] = $new_instance['showvidesc'];
113
+ $instance['videsclen'] = strip_tags($new_instance['videsclen']);
114
+ $instance['width'] = strip_tags($new_instance['width']);
115
+ $instance['height'] = strip_tags($new_instance['height']);
116
+ $instance['to_show'] = strip_tags($new_instance['to_show']);
117
+ $instance['autoplay'] = $new_instance['autoplay'];
118
+ $instance['controls'] = $new_instance['controls'];
119
+ $instance['fixnoitem'] = $new_instance['fixnoitem'];
120
+ $instance['ratio'] = strip_tags($new_instance['ratio']);
121
+ $instance['fixyt'] = $new_instance['fixyt'];
122
+ $instance['hideinfo'] = $new_instance['hideinfo'];
123
+ $instance['hideanno'] = $new_instance['hideanno'];
124
+ $instance['themelight'] = $new_instance['themelight'];
125
 
126
  return $instance;
127
  }
178
  $height += 25;
179
  }
180
 
181
+ $hideanno = $instance['hideanno'];
182
+ $themelight = $instance['themelight'];
183
+
184
  echo $before_widget;
185
  if ( $title )
186
  echo $before_title . $title . $after_title;
249
  echo "<h3>$yt_title</h3>";
250
  }
251
 
252
+ // define object ID
253
+ $ytc_vid = 'ytc_' . $yt_id;
254
+
255
  // print out video
256
  if ( $to_show == "thumbnail" ) {
257
  $title = sprintf( __( 'Watch video %1$s published on %2$s' , 'youtube-channel' ), $yt_title, $yt_date );
258
  echo <<<EOF
259
+ <a href="$yt_video" title="$title"><div style="width: ${width}px; height: ${height}px; overflow: hidden; background: url($yt_thumb) 50% 50% no-repeat; background-size: ${width}px ${imgfixedheight}px;" title="$yt_title" id="$ytc_vid"></div></a>
260
  EOF;
261
  } else if ( $to_show == "chromeless" ) {
262
  ?>
263
+ <object type="application/x-shockwave-flash" data="<?php echo YOUTUBE_CHANNEL_URL . 'chromeless.swf'; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" id="<?php echo $ytc_vid; ?>">
264
+ <param name="flashVars" value="video_source=<?php echo $yt_id; ?>&video_width=<?php echo $width; ?>&video_height=<?php echo $height; ?><?php if ( $autoplay ) { echo "&autoplay=Yes"; } if ( !$controls ) { echo "&youtube_controls=Yes"; } if ( $hideanno ) { echo "&iv_load_policy=3"; } if ( $themelight ) { echo "&theme=light"; } ?>" />
265
  <param name="quality" value="high" />
266
  <param name="wmode" value="opaque" />
267
  <param name="swfversion" value="6.0.65.0" />
271
  } else if ( $to_show == "iframe" ) {
272
  if (!$usepl) { $yt_url = $yt_id; }
273
  ?>
274
+ <iframe title="YouTube video player" width="<?php echo $width; ?>" height="<?php echo $height; ?>" src="http://www.youtube.com/embed/<?php echo $yt_url."?wmode=opaque&enablejsapi=1"; if ( $controls ) { echo "&controls=0"; } if ( $hideinfo ) { echo "&showinfo=0"; } if ( $autoplay ) { echo "&autoplay=1"; } if ( $hideanno ) { echo "&iv_load_policy=3"; } if ( $themelight ) { echo "&theme=light"; } ?>" frameborder="0" allowfullscreen id="<?php echo $ytc_vid ?>"></iframe>
275
  <?php
276
  } else { // default is object
277
  ?>
278
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?php echo $width; ?>" height="<?php echo $height; ?>" id="<?php echo $ytc_vid; ?>">
279
+ <param name="movie" value="http://www.youtube.com/<?php echo $yt_url; ?>?version=3<?php if ( $controls ) { echo "&amp;controls=0"; } if ( $hideinfo ) { echo "&amp;showinfo=0"; } if ( $autoplay ) { echo "&amp;autoplay=1"; } if ( $hideanno ) { echo "&amp;iv_load_policy=3"; } if ( $themelight ) { echo "&amp;theme=light"; } ?>" />
280
+ <param name="allowScriptAccess" value="always">
281
  <!--[if !IE]>-->
282
+ <object type="application/x-shockwave-flash" data="http://www.youtube.com/<?php echo $yt_url; ?>?version=3<?php if ( $controls ) { echo "&amp;controls=0"; } if ( $hideinfo ) { echo "&amp;showinfo=0"; } if ( $autoplay ) { echo "&amp;autoplay=1"; } if ( $hideanno ) { echo "&amp;iv_load_policy=3"; } if ( $themelight ) { echo "&amp;theme=light"; } ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>">
283
  <!--<![endif]-->
284
  <param name="wmode" value="opaque" />
285
  <!--[if !IE]>-->
289
  <?php
290
  }
291
 
292
+ // do we need to show video description?
293
+ if ( $instance['showvidesc'] ) {
294
+ preg_match('/<div><span>(.*)<\/span><\/div>/', $item->get_description(), $videsc);
295
+ if ( $instance['videsclen'] > 0 ) {
296
+ $video_description = substr($videsc[1], 0, $instance['videsclen']);
297
+ } else {
298
+ $video_description = $videsc[1];
299
+ }
300
+ echo '<p class="video_description">' .$video_description. '</p>';
301
+
302
+ }
303
  // do we need to show goto link?
304
  if ( $instance['showgoto'] ) {
305
  $goto_txt = $instance['goto_txt'];