Changeset 804415
- Timestamp:
- 11/14/2013 02:42:35 PM (12 years ago)
- Location:
- youtube-comments/trunk
- Files:
-
- 1 added
- 5 edited
-
class-comments.php (modified) (1 diff)
-
profile.png (added)
-
readme.txt (modified) (2 diffs)
-
style.css (modified) (1 diff)
-
template-comments.php (modified) (2 diffs)
-
youtube-comments.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
youtube-comments/trunk/class-comments.php
r786864 r804415 6 6 7 7 protected static $instance = null; 8 const PLUGIN_VERSION = '1.2. 0';8 const PLUGIN_VERSION = '1.2.1'; 9 9 private $client = null; 10 10 private $youtube = null; -
youtube-comments/trunk/readme.txt
r786864 r804415 2 2 Contributors: sydcode 3 3 Donate link: 4 Tags: YouTube, video, comments4 Tags: youtube, video, comments, video comments, google, social, social networks, social plugin, media 5 5 Requires at least: 3.3 6 Tested up to: 3. 6.17 Stable tag: 1.2. 06 Tested up to: 3.7.1 7 Stable tag: 1.2.1 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 70 70 * Added setting for URL custom fields. 71 71 * Updated the readme. 72 73 = 1.2.1 = 74 * Fixed bug in user profile loader. -
youtube-comments/trunk/style.css
r759170 r804415 28 28 #youtube-comments img { 29 29 border: none; 30 box-shadow: none; 30 31 margin: 0; 31 32 padding: 0; -
youtube-comments/trunk/template-comments.php
r786864 r804415 36 36 foreach($comments->entry as $comment) { 37 37 // Get author metadata 38 $author = false; 38 39 $author_uri = $comment->author->uri; 39 $author = simplexml_load_file($author_uri); 40 $author_link = $author->link->attributes(); 41 $media = $author->children('media', true); 42 $thumbnail = $media->thumbnail->attributes(); 40 if (strpos($author_uri, '__NO_YOUTUBE_ACCOUNT__') === false) { 41 $author = @simplexml_load_file($author_uri); // suppress errors 42 } 43 if ($author) { 44 $link_atts = $author->link->attributes(); 45 $link_href = $link_atts->href; 46 $media = $author->children('media', true); 47 $thumbnail_atts = $media->thumbnail->attributes(); 48 $thumbnail_url = $thumbnail_atts->url; 49 } else { 50 // Default values for private profiles 51 $link_href = ''; 52 $thumbnail_url = plugins_url('profile.png', __FILE__); 53 } 54 $name = $comment->author->name; 43 55 $posted = $this->time_ago($comment->published); 44 56 $text = nl2br($comment->content); … … 58 70 <li class='comment-item'> 59 71 <div class='author-thumbnail'> 60 <img src='<?php echo $thumbnail->url; ?>' alt='' /> 72 <a href='<?php echo $link_href; ?>' title='<?php echo $name; ?>'> 73 <img src='<?php echo $thumbnail_url; ?>' alt='' /> 74 </a> 61 75 </div> 62 76 <div class='comment-content'> 63 77 <span class='author-metadata'> 64 <a class='author-name' href='<?php echo $ author_link->href; ?>'><?php echo $comment->author->name; ?></a>78 <a class='author-name' href='<?php echo $link_href; ?>'><?php echo $name; ?></a> 65 79 <span class='comment-posted'><?php echo $posted; ?></span> 66 80 </span> -
youtube-comments/trunk/youtube-comments.php
r786864 r804415 4 4 Plugin Name: YouTube Comments 5 5 Description: This plugin finds YouTube links in post content and imports the video comments. 6 Version: 1.2. 06 Version: 1.2.1 7 7 Author: sydcode 8 8 Author URI: http://profiles.wordpress.org/sydcode
Note: See TracChangeset
for help on using the changeset viewer.