WordPress Video Galleries: Difference between revisions
| Line 30: | Line 30: | ||
* See the issue with [[WordPress_Video_Galleries#Gotchas:_Thumbnails_not_showing_up|thumbnails not showing up]]. This fix needs to be applied after an update unless it's changed by the authors. | * See the issue with [[WordPress_Video_Galleries#Gotchas:_Thumbnails_not_showing_up|thumbnails not showing up]]. This fix needs to be applied after an update unless it's changed by the authors. | ||
* The plugin has a PHP call to `session_start()` | * The plugin has a PHP call to `session_start()` around line 137 of `youtube_simplegallery.php` <strike>and line 236 of `inc/shortcode.php`</strike> (removed as of v2.0.5) which throw PHP `E_NOTICE` messages when `WP_DEBUG` is set to True.<br />To avoid these errors replace with:<br /> | ||
<syntaxhighlight lang="php"> | |||
if (!isset($_SESSION)) { | |||
session_start(); | |||
} | |||
</syntaxhighlight> | |||
==== Gotchas: Vimeo images not showing up ==== | ==== Gotchas: Vimeo images not showing up ==== | ||
Revision as of 20:43, 24 June 2013
Overview
Information about implementing galleries of videos in WordPress.
There doesn't seem to be a solution for combining videos in image galleries. The image gallery plugin that I have used is NextGEN Gallery which doesn't support videos.
YouTube/Video galleries
YouTube SimpleGallery WordPress plugin
Despite the name, this plugin also supports Vimeo videos, and can combine them in a gallery with YouTube videos.
Gotchas: Thumbnails not showing up
Using the Timthumb option, thumbnails images were broken.
Tracked this down to the use of get_bloginfo('url') to create the thumbnail URLs.
The thumbnail URLs are basically the Timthumb script URL with the image URL as an argument.
get_bloginfo('url') returns the "Site Address URL" as defined in the WP dashboard. This is the URL of the site itself.
site_url() returns the "WordPress Address URL" as defined in the WP dashboard, which is the URL of the WP installation.
The result was that the URL of the Timthumb script was missing the WP root directory, which is an easy thing to miss.
The fix was to edit [WP_ROOT]/wp-content/plugins/youtube-simple/inc/shortcode.php, search for timthumb and replace get_bloginfo('url') with site_url().
Gotchas: Updating the plugin
- See the issue with thumbnails not showing up. This fix needs to be applied after an update unless it's changed by the authors.
- The plugin has a PHP call to
session_start()around line 137 ofyoutube_simplegallery.phpand line 236 of(removed as of v2.0.5) which throw PHPinc/shortcode.phpE_NOTICEmessages whenWP_DEBUGis set to True.
To avoid these errors replace with:
if (!isset($_SESSION)) {
session_start();
}
Gotchas: Vimeo images not showing up
The vimeo domain was not included in the list of allowed sites for the Timthumb script.This has been fixed as of version 2.0.4.
Usage
Galleries of uploaded videos
Saw that there was at least one plugin that looked very good, but haven't had to implement this yet.