Version Description
- Corrected error when file_get_contents() is disabled in the server configuration by allow_url_fopen=0.
- Corrected error with Show info (title, uploader) field.
Download this release
Release Info
Developer | javitxu123 |
Plugin | Youtube Channel Gallery |
Version | 1.5.4 |
Comparing to | |
See all releases |
Code changes from version 1.5.3 to 1.5.4
- readme.txt +9 -5
- youtube-channel-gallery.php +12 -16
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://poselab.com/
|
|
4 |
Tags: widget, gallery, youtube, channel, user
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.4.1
|
7 |
-
Stable tag: 1.5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -63,7 +63,7 @@ If you want to use it as Shortcode:
|
|
63 |
`[Youtube_Channel_Gallery
|
64 |
user="MaxonC4D"
|
65 |
videowidth="500"
|
66 |
-
ratio="
|
67 |
theme="light"
|
68 |
color="white"
|
69 |
autoplay="1"
|
@@ -71,7 +71,7 @@ rel="1"
|
|
71 |
showinfo="1"
|
72 |
maxitems="9"
|
73 |
thumbwidth="90"
|
74 |
-
thumbratio="
|
75 |
thumbcolumns="3"
|
76 |
]`
|
77 |
|
@@ -82,7 +82,7 @@ The attributes used in the shortcode are the same as the fields available in the
|
|
82 |
Player:
|
83 |
|
84 |
* videowidth: Video width. Values: Number. (optional).
|
85 |
-
* ratio: Aspect ratio. Values: 4/3 (default) /
|
86 |
* theme: Theme. Values: dark (default) / light. (optional).
|
87 |
* color: Progress bar color. Values: red (default) / white. (optional).
|
88 |
* autoplay: Autoplay. Values: 0 (default) / 1. (optional).
|
@@ -93,7 +93,7 @@ Thumbnails:
|
|
93 |
|
94 |
* maxitems: Number of videos to show. Values: Number. (optional).
|
95 |
* thumbwidth: Thumbnail size. Values: Number. (optional).
|
96 |
-
* thumbratio: Aspect ratio. Values: 4/3 (default) /
|
97 |
* thumbcolumns: Thumbnail columns. Values: Number. (optional).
|
98 |
|
99 |
Link:
|
@@ -134,6 +134,10 @@ The username who uploaded a video to Youtube is located below each video, where
|
|
134 |
|
135 |
== Changelog ==
|
136 |
|
|
|
|
|
|
|
|
|
137 |
= 1.5.3 =
|
138 |
* Added tabs to the widget interface to better organize the fields.
|
139 |
* Added new fields to control the player (Aspect ratio, Progress bar color, Autoplay, Show related videos, Show info).
|
4 |
Tags: widget, gallery, youtube, channel, user
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.4.1
|
7 |
+
Stable tag: 1.5.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
63 |
`[Youtube_Channel_Gallery
|
64 |
user="MaxonC4D"
|
65 |
videowidth="500"
|
66 |
+
ratio="16x9"
|
67 |
theme="light"
|
68 |
color="white"
|
69 |
autoplay="1"
|
71 |
showinfo="1"
|
72 |
maxitems="9"
|
73 |
thumbwidth="90"
|
74 |
+
thumbratio="16x9"
|
75 |
thumbcolumns="3"
|
76 |
]`
|
77 |
|
82 |
Player:
|
83 |
|
84 |
* videowidth: Video width. Values: Number. (optional).
|
85 |
+
* ratio: Aspect ratio. Values: 4/3 (default) / 16x9. (optional).
|
86 |
* theme: Theme. Values: dark (default) / light. (optional).
|
87 |
* color: Progress bar color. Values: red (default) / white. (optional).
|
88 |
* autoplay: Autoplay. Values: 0 (default) / 1. (optional).
|
93 |
|
94 |
* maxitems: Number of videos to show. Values: Number. (optional).
|
95 |
* thumbwidth: Thumbnail size. Values: Number. (optional).
|
96 |
+
* thumbratio: Aspect ratio. Values: 4/3 (default) / 16x9. (optional).
|
97 |
* thumbcolumns: Thumbnail columns. Values: Number. (optional).
|
98 |
|
99 |
Link:
|
134 |
|
135 |
== Changelog ==
|
136 |
|
137 |
+
= 1.5.4 =
|
138 |
+
* Corrected error when file_get_contents() is disabled in the server configuration by allow_url_fopen=0.
|
139 |
+
* Corrected error with Show info (title, uploader) field.
|
140 |
+
|
141 |
= 1.5.3 =
|
142 |
* Added tabs to the widget interface to better organize the fields.
|
143 |
* Added new fields to control the player (Aspect ratio, Progress bar color, Autoplay, Show related videos, Show info).
|
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: 1.5.
|
9 |
License: GPL2
|
10 |
|
11 |
Copyright 2010 Javier Gómez Pose (email : javierpose@gmail.com)
|
@@ -86,7 +86,7 @@
|
|
86 |
$instance['ytchag_color'] = strip_tags( $new_instance['ytchag_color'] );
|
87 |
$instance['ytchag_autoplay'] = strip_tags( $new_instance['ytchag_autoplay'] );
|
88 |
$instance['ytchag_rel'] = strip_tags( $new_instance['ytchag_rel'] );
|
89 |
-
$instance['ytchag_showinfo'] = (
|
90 |
|
91 |
// Thumbnail options
|
92 |
$instance['ytchag_maxitems'] = strip_tags( $new_instance['ytchag_maxitems'] );
|
@@ -351,19 +351,15 @@
|
|
351 |
$ytchag_rss_url = "http://gdata.youtube.com/feeds/api/users/" . $ytchag_user . "/uploads";
|
352 |
$ytchag_link_url = "http://www.youtube.com/user/" . $ytchag_user;
|
353 |
|
|
|
|
|
|
|
|
|
354 |
|
355 |
-
// check if no correct user name
|
356 |
-
if ( file_get_contents($ytchag_rss_url) == '' ) {
|
357 |
-
|
358 |
-
$content= '<p class="empty">' . __('You must insert a valid YouTube user name.', 'youtube-channel-gallery') . '</p>';
|
359 |
|
360 |
-
// correct user name
|
361 |
-
|
362 |
|
363 |
-
//RSS Feed
|
364 |
-
include_once(ABSPATH . WPINC . '/feed.php');
|
365 |
-
|
366 |
-
$rss = fetch_feed($ytchag_rss_url);
|
367 |
$maxitems = ( $ytchag_maxitems ) ? $ytchag_maxitems : 9;
|
368 |
$items = $rss->get_items(0, $maxitems);
|
369 |
|
@@ -412,7 +408,7 @@
|
|
412 |
|
413 |
//columns control
|
414 |
$column++;
|
415 |
-
|
416 |
if($ytchag_thumb_columns !=0 && $column%$ytchag_thumb_columns === 0){
|
417 |
$columnnumber = ' ytccell-last';
|
418 |
} else if($ytchag_thumb_columns !=0 && $column === 1){
|
@@ -422,8 +418,6 @@
|
|
422 |
|
423 |
if($ytchag_thumb_columns !=0 && $column%$ytchag_thumb_columns === 0 ){
|
424 |
$column = 0;
|
425 |
-
}else if($ytchag_thumb_columns !=0 && $column === 1){
|
426 |
-
$columnnumber = '';
|
427 |
}
|
428 |
|
429 |
$content.= '<a class="ytcthumb" href="javascript: ytcplayVideo(\'ytcplayer' . $plugincount . '\', \'' . $youtubeid . '\');" alt="' . $title . '" title="' . $title . '" style="background-image: url(' . $thumb . ');">';
|
@@ -440,7 +434,9 @@
|
|
440 |
$content.= '<a href="' . $ytchag_link_url . '" class="ytcmore">' . $ytchag_link_tx . '</a>';
|
441 |
}
|
442 |
}
|
443 |
-
}
|
|
|
|
|
444 |
|
445 |
// user name not inserted
|
446 |
} else {
|
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: 1.5.4
|
9 |
License: GPL2
|
10 |
|
11 |
Copyright 2010 Javier Gómez Pose (email : javierpose@gmail.com)
|
86 |
$instance['ytchag_color'] = strip_tags( $new_instance['ytchag_color'] );
|
87 |
$instance['ytchag_autoplay'] = strip_tags( $new_instance['ytchag_autoplay'] );
|
88 |
$instance['ytchag_rel'] = strip_tags( $new_instance['ytchag_rel'] );
|
89 |
+
$instance['ytchag_showinfo'] = strip_tags( $new_instance['ytchag_showinfo'] );
|
90 |
|
91 |
// Thumbnail options
|
92 |
$instance['ytchag_maxitems'] = strip_tags( $new_instance['ytchag_maxitems'] );
|
351 |
$ytchag_rss_url = "http://gdata.youtube.com/feeds/api/users/" . $ytchag_user . "/uploads";
|
352 |
$ytchag_link_url = "http://www.youtube.com/user/" . $ytchag_user;
|
353 |
|
354 |
+
//RSS Feed
|
355 |
+
include_once(ABSPATH . WPINC . '/feed.php');
|
356 |
+
|
357 |
+
$rss = fetch_feed($ytchag_rss_url);
|
358 |
|
|
|
|
|
|
|
|
|
359 |
|
360 |
+
// check if no correct user name
|
361 |
+
if (!is_wp_error( $rss ) ) {
|
362 |
|
|
|
|
|
|
|
|
|
363 |
$maxitems = ( $ytchag_maxitems ) ? $ytchag_maxitems : 9;
|
364 |
$items = $rss->get_items(0, $maxitems);
|
365 |
|
408 |
|
409 |
//columns control
|
410 |
$column++;
|
411 |
+
$columnnumber = '';
|
412 |
if($ytchag_thumb_columns !=0 && $column%$ytchag_thumb_columns === 0){
|
413 |
$columnnumber = ' ytccell-last';
|
414 |
} else if($ytchag_thumb_columns !=0 && $column === 1){
|
418 |
|
419 |
if($ytchag_thumb_columns !=0 && $column%$ytchag_thumb_columns === 0 ){
|
420 |
$column = 0;
|
|
|
|
|
421 |
}
|
422 |
|
423 |
$content.= '<a class="ytcthumb" href="javascript: ytcplayVideo(\'ytcplayer' . $plugincount . '\', \'' . $youtubeid . '\');" alt="' . $title . '" title="' . $title . '" style="background-image: url(' . $thumb . ');">';
|
434 |
$content.= '<a href="' . $ytchag_link_url . '" class="ytcmore">' . $ytchag_link_tx . '</a>';
|
435 |
}
|
436 |
}
|
437 |
+
} else {
|
438 |
+
$content= '<p class="empty">' . __('You must insert a valid YouTube user name.', 'youtube-channel-gallery') . '</p>';
|
439 |
+
} // end check user name
|
440 |
|
441 |
// user name not inserted
|
442 |
} else {
|