Youtube Channel Gallery - Version 1.7.4.2

Version Description

  • Corrected problem with jQuery.noConflict.
  • Corrected link to title.
Download this release

Release Info

Developer javitxu123
Plugin Icon 128x128 Youtube Channel Gallery
Version 1.7.4.2
Comparing to
See all releases

Code changes from version 1.7.4.1 to 1.7.4.2

Files changed (3) hide show
  1. readme.txt +5 -1
  2. scripts.js +3 -3
  3. youtube-channel-gallery.php +32 -23
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
5
Requires at least: 2.8
6
Tested up to: 3.4.1
7
- Stable tag: 1.7.4.1
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -118,6 +118,10 @@ If you go to a playlist you will get the following url format: https://www.youtu
118
119
== Changelog ==
120
121
= 1.7.4.1 =
122
* Corrected bug in pages with multiple galleries.
123
4
Tags: widget, gallery, youtube, channel, user, sidebar, video, youtube playlist, html5, iframe, Youtube channel, youtube videos
5
Requires at least: 2.8
6
Tested up to: 3.4.1
7
+ Stable tag: 1.7.4.2
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
118
119
== Changelog ==
120
121
+ = 1.7.4.2 =
122
+ * Corrected problem with jQuery.noConflict.
123
+ * Corrected link to title.
124
+
125
= 1.7.4.1 =
126
* Corrected bug in pages with multiple galleries.
127
scripts.js CHANGED
@@ -1,8 +1,8 @@
1
- jQuery(document).ready(function(){
2
-
3
//thumbnails
4
var ytcplayer = {};
5
- $('.ytcthumb').click(function(){
6
var iframeid = $(this).attr('data-playerid');
7
var youtubeid = $(this).attr('href').split("youtu.be/")[1];
8
var quality = $(this).attr('data-quality');
1
+ jQuery(document).ready(function($) {
2
+
3
//thumbnails
4
var ytcplayer = {};
5
+ $('.ytclink').click(function(){
6
var iframeid = $(this).attr('data-playerid');
7
var youtubeid = $(this).attr('href').split("youtu.be/")[1];
8
var quality = $(this).attr('data-quality');
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.7.4.1
9
License: GPL2
10
11
Copyright 2010 Javier Gómez Pose (email : javierpose@gmail.com)
@@ -610,27 +610,6 @@
610
$thumb = $media_content[$thumbcorrectWIndex]['attribs']['']['url'];
611
612
613
- //title and description content
614
-
615
- if($ytchag_title || $ytchag_description){
616
- $title_and_description_alignment_class = ' ytc-td-' . $ytchag_thumbnail_alignment;
617
- $title_and_description_content= '<div class="ytctitledesc-cont">';
618
-
619
- if($ytchag_title){
620
- $title_and_description_content.= '<h5 class="ytctitle"><a href="javascript: ytcplayVideo(\'ytcplayer' . $plugincount . '\', \'' . $youtubeid . '\');">' . $title . '</a></h5>';
621
- }
622
-
623
- if($ytchag_description){
624
- $description = wp_trim_words( $description, $num_words = $ytchag_description_words_number, $more = '&hellip;' );
625
- $title_and_description_content.= '<div class="ytctdescription">' . $description . '</div>';
626
- }
627
-
628
- $title_and_description_content.= '</div>';
629
- } else{
630
- $title_and_description_alignment_class = '';
631
- $title_and_description_content = '';
632
- }
633
- //end title and description content
634
635
636
//rows and columns control
@@ -651,6 +630,14 @@
651
}// end columns control
652
653
654
//The content
655
//--------------------------------
656
@@ -667,6 +654,28 @@
667
$i++;
668
669
670
//----
671
if($ytchag_thumb_columns !=0 && $column == 1){
672
$content.= "\n\n" .'<div class="ytccf ytc-row ytc-r-' . $rowcount . $row_oddeven . ' ">' . "\n\n";
@@ -683,7 +692,7 @@
683
}
684
685
$content.= '<div class="ytcthumb-cont">';
686
- $content.= '<a class="ytcthumb" href="http://youtu.be/' . $youtubeid . '" data-playerid="ytcplayer' . $plugincount . '" data-quality="' . $ytchag_quality . '" alt="' . $title . '" title="' . $title . '" style="background-image: url(' . $thumb . ');">';
687
$content.= '<div class="ytcplay" style="width: ' . $ytchag_thumb_width . 'px; height: ' . $ytchag_thumb_height . 'px"></div>';
688
$content.= '</a>';
689
$content.= '</div>';
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.7.4.2
9
License: GPL2
10
11
Copyright 2010 Javier Gómez Pose (email : javierpose@gmail.com)
610
$thumb = $media_content[$thumbcorrectWIndex]['attribs']['']['url'];
611
612
613
614
615
//rows and columns control
630
}// end columns control
631
632
633
+ //check if title or description
634
+ if($ytchag_title || $ytchag_description){
635
+ $title_and_description_alignment_class = ' ytc-td-' . $ytchag_thumbnail_alignment;
636
+ } else{
637
+ $title_and_description_alignment_class = '';
638
+ }
639
+
640
+
641
//The content
642
//--------------------------------
643
654
$i++;
655
656
657
+
658
+ //title and description content
659
+
660
+ if($ytchag_title || $ytchag_description){
661
+ $title_and_description_content= '<div class="ytctitledesc-cont">';
662
+
663
+ if($ytchag_title){
664
+ $title_and_description_content.= '<h5 class="ytctitle"><a class="ytclink" href="http://youtu.be/' . $youtubeid . '" data-playerid="ytcplayer' . $plugincount . '" data-quality="' . $ytchag_quality . '" alt="' . $title . '" title="' . $title . '">' . $title . '</a></h5>';
665
+ }
666
+
667
+ if($ytchag_description){
668
+ $description = wp_trim_words( $description, $num_words = $ytchag_description_words_number, $more = '&hellip;' );
669
+ $title_and_description_content.= '<div class="ytctdescription">' . $description . '</div>';
670
+ }
671
+
672
+ $title_and_description_content.= '</div>';
673
+ } else{
674
+ $title_and_description_content = '';
675
+ }
676
+ //end title and description content
677
+
678
+
679
//----
680
if($ytchag_thumb_columns !=0 && $column == 1){
681
$content.= "\n\n" .'<div class="ytccf ytc-row ytc-r-' . $rowcount . $row_oddeven . ' ">' . "\n\n";
692
}
693
694
$content.= '<div class="ytcthumb-cont">';
695
+ $content.= '<a class="ytcthumb ytclink" href="http://youtu.be/' . $youtubeid . '" data-playerid="ytcplayer' . $plugincount . '" data-quality="' . $ytchag_quality . '" alt="' . $title . '" title="' . $title . '" style="background-image: url(' . $thumb . ');">';
696
$content.= '<div class="ytcplay" style="width: ' . $ytchag_thumb_width . 'px; height: ' . $ytchag_thumb_height . 'px"></div>';
697
$content.= '</a>';
698
$content.= '</div>';