The options that can be passed to a TubePress shortcode
This page lists all of the options that can be used in a TubePress shortcode.
Gallery sources
This section lists the options used to control the sources of TubePress video galleries. For each source name listed
below, supply it to mode to have TubePress fetch videos from the given source.
General Source Options
mode
Defines the source of videos for the video gallery that you'd like TubePress to display.
Valid values
Any of the YouTube, Dailymotion, or Vimeo gallery source names defined on this page
Default value
user
Example shortcode
[tubepress mode="user" userValue="3hough"]
Dailymotion Sources
dailymotionFavorites
Description
Configures TubePress to fetch the videos marked as "favorites" by a Dailymotion user. The Dailymotion user is identified by the value you supply to dailymotionFavoritesValue.
Configures TubePress to fetch the videos that were both uploaded by a given Dailymotion user and featured by Dailymotion. The user is identified by the value you supply to dailymotionFeaturedValue.
Configures TubePress to fetch Dailymotion videos related to a specific Dailymotion video. The target video is identified by the value supplied to the dailymotionRelatedValue option.
[tubepress mode="dailymotionSearch" dailymotionSearchValue='cats playing piano']
dailymotionSubscriptions
Description
Configures TubePress to fetch the videos from a given Dailymotion user's subscriptions. The target user is identified by the value you supply to the dailymotionSubscriptionsValue option.
Configures TubePress to fetch the videos marked as "favorites" by a YouTube user or channel. The YouTube user or channel is identified by the value you supply to favoritesValue.
Configures TubePress to fetch YouTube videos matching a search term. Supply space-separated search terms to the tagValue option. To search for an exact phrase, enclose the phrase in double quotes. Use the pipe character (`
Configures TubePress to fetch YouTube videos uploaded by a YouTube user or channel. The YouTube channel or user is defined by the value you supply to the userValue option.
Configures TubePress to fetch YouTube videos related to a specific YouTube video. The target YouTube video is identified by the value supplied to the youtubeRelatedValue option.
Automatically adjust the height of thumbnail rows in TubePress galleries, ensuring that the metadata (runtime, title, description, etc.) for each video is completely visible.
Dynamically adjust the width of thumbnail columns to best fit their container. This generally improves the appearance of the thumbnail gallery, but can cause problems in complex site layouts.
Default value
true
Valid values
true or false
Example shortcode
[tubepress fluidThumbs="false"]
hqThumbs
Description
Use highest-quality thumbnails. This allows thumbnail sizes greater than 120px x 90px without causing distortion.
Default value
false
Valid values
true or false
Example shortcode
[tubepress hqThumbs="true"]
paginationAbove
Description
Show pagination links ("Next", "Prev", etc.) above the thumbnail gallery.
Default value
false
Valid values
true or false
Example shortcode
[tubepress paginationAbove="true"]
paginationBelow
Description
Show pagination links ("Next", "Prev", etc.) below the thumbnail gallery.
Default value
false
Valid values
true or false
Example shortcode
[tubepress paginationBelow="true"]
resultsPerPage
Description
Defines how many videos from a video source should be on each page of the gallery.
Default value
30
Valid values
Any integer between 1 and 50 (inclusive)
Example shortcode
[tubepress resultsPerPage="30"]
thumbHeight
Description
The desired height (in pixels) of video thumbnails.
Default value
90
Valid values
Any positive integer
Example shortcode
[tubepress thumbHeight="30"]
thumbWidth
Description
The desired width (in pixels) of video thumbnails.
Default value
90
Valid values
Any positive integer
Example shortcode
[tubepress thumbWidth="30"]
Dailymotion
The options below apply only to Dailymotion.
dailymotionThumbnailPreferredSize
Description
Select the desired height (in pixels) of the thumbnails served from Dailymotion. Higher resolutions will generally look better but will negatively impact your site's load time. For best results, choose the value closest to (but not less than) your actual thumbnail height.
Default value
original
Valid values
max, 720px, 480px, 360px, 240px, 180px, 120px, or 60px
Most YouTube videos come with several thumbnails. By setting this option to true, each time a user visits a gallery they will see a randomly-selected thumbnail for each video. This option conflicts with hqThumbs.
Default value
false
Valid values
true or false
Example shortcode
[tubepress randomize_thumbnails="true"]
youtubeHideBlackBars
Description
Hides the "black bars" on most YouTube thumbnails.
This section lists all of the TubePress options that apply to the collection of videos from a remote video provider (YouTube, Vimeo, etc.).
Global
The options below apply to all video providers (Vimeo, Dailymotion, etc.).
orderBy
Description
Defines the overall sort order of a video feed.
Default value
default
Valid values
alphabetical Alphabetical sort based on the video's title (Vimeo only)
default TubePress chooses the "best" sort order for the video source, e.g. search-based galleries are sorted by relevance, and user uploads are sorted by newest
likes Most-liked videos first (Vimeo only)
longest Longest videos first (Vimeo only)
newest Newest videos first
oldest Oldest videos first
random Retrieves videos in a random order (Dailymotion only)
ranking Highest-ranked videos first (Dailymotion only)
rating Highest-rated videos first (YouTube only)
relevance Applies only to search-based galleries or interactive searching. Videos most relevant to the search term will be shown first.
reverseAlphabetical Reverse alphabetical sort based on the video's title
shortest Shortest videos first (Vimeo only)
title Videos will be shown in alphabetical order of their titles (YouTube only)
trending Most-trending videos first (Dailymotion only)
viewCount Videos with the most views will be shown first
Note
Not all sort orders can be used with every video source.
Example shortcode
[tubepress orderBy="newest"]
perPageSort
Description
Defines an additional sorting to apply to each individual page of a video gallery.
Default value
none
Valid values
commentCount Videos with more comments will be shown before others
duration Longest-running videos shown first
newest Newest videos first
none Do nothing
oldest Oldest videos first
random Shuffles videos on the page
rating Highest-rated videos first
title Videos will be shown in alphabetical order of their titles
viewCount Videos with the most views will be shown first
Example shortcode
[tubepress perPageSort="newest"]
resultCountCap
Description
Set a maximum limit on the total number of videos in a gallery. This can both limit the number of videos that show up on a page (if resultsPerPage > resultCountCap), or reduce the number of pagination links for a gallery. Set to 0 to disable any limit.
Default value
0
Valid values
Any non-negative integer
Example shortcode
[tubepress resultCountCap="100"]
searchResultsRestrictedToUser
Description
For keyword-based galleries, or during interactive searching, this option can filter the results to videos uploaded by the given user or channel.
Default value
empty
Valid values
Any Vimeo username, a Dailymotion user ID, or a YouTube username or channel ID.
Some videos have embedding disabled. Enabling this option will exclude these videos from your galleries. Most users will never need to modify this option.
This section lists all of the TubePress options that apply to the embedded video player.
Global
The options below apply to all video providers (YouTube, Vimeo, Dailymotion, etc.).
autoNext
Description
Automatically start the next video in a gallery when playback of a video finishes.
Default value
false
Valid values
true or false
Example shortcode
[tubepress autoNext="true"]
autoplay
Description
Automatically start video playback of any embedded video when the page is loaded.
Default value
false
Valid values
true or false
Example shortcode
[tubepress autoplay="true"]
embeddedHeight
Description
The height, in pixels, of the embedded video player that TubePress builds. If you are using responsive embeds, this will help dictate the aspect ratio of the video player.
Default value
390
Valid values
Any positive integer
Example shortcode
[tubepress embeddedHeight="350"]
embeddedScrollDuration
Description
For playerLocation values that involve a scroll, this value defines the duration, in milliseconds, of how long the scroll should last. Set to 0 for an instant scroll.
Default value
0
Valid values
Any non-negative integer
Example shortcode
[tubepress embeddedScrollDuration="100"]
embeddedScrollOffset
Description
For playerLocation values that involve a scroll, this value defines the offset, in pixels, from the top of the video player to where the browser window will scroll. Set to 0 to scroll to the exact top of the video player. Negative values will scroll to above the player, and positive values will scroll to below the player.
Default value
0
Valid values
Any integer
Example shortcode
[tubepress embeddedScrollOffset="30"]
embeddedScrollOn
Description
For playerLocation values that involve a scroll, this will either enable or disable the automated scroll behavior.
Default value
true
Valid values
true or false
Example shortcode
[tubepress embeddedScrollOn="false"]
embeddedWidth
Description
The width, in pixels, of the embedded video player that TubePress builds. If you are using responsive embeds, this will help dictate the aspect ratio of the video player.
Default value
640
Valid values
Any positive integer
Example shortcode
[tubepress embeddedWidth="600"]
lazyPlay
Description
If enabled, video playback will auto-start after user clicks a video's thumbnail.
Default value
true
Valid values
true or false
Example shortcode
[tubepress lazyPlay="true"]
loop
Description
If enabled, immediately restart playback of each video after it finishes.
Default value
false
Valid values
true or false
Example shortcode
[tubepress loop="true"]
playerImplementation
Description
Defines the "brand" of the embedded video player.
Default value
provider_based
Valid values
provider_based Uses the provider’s player (e.g. the standard YouTube/Vimeo player)
The maximum number of characters of a video's description that should be displayed. Descriptions over this limit will be truncated with .... Set to 0 for no limit.
Default value
0
Valid values
Any non-negative integer.
Example shortcode
[tubepress descriptionLimit="20"]
Option name
relativeDates
Description
Toggle display of relative dates, such as "last year" instead of "Nov 3, 1980". Currently only available in English (for now).
Default value
false
Valid values
true or false
Example shortcode
[tubepress relativeDates="true"]
Interactive search
This section lists all of the TubePress options that apply to interactive search.
searchProvider
Description
The name of a video provider (e.g. YouTube or Vimeo) which should be searched for matching videos.
Default value
empty
Valid values
dailymotion, youtube, or vimeo
Example shortcode
[tubepress searchProvider="vimeo"]
searchResultsDomId
Description
Used with output="ajaxSearchInput", this option defines a jQuery selector for which TubePress should place the search results.
Default value
empty
Valid values
Any jQuery selector which identifies exactly one element on the page that can accept HTML.
Example shortcode
[tubepress searchResultsDomId="#foobar"]
searchResultsOnly
Description
If set to true, TubePress will output search results only after the user has submitted search terms. It will be "invisible" if the user has not submitted search terms.
Default value
false
Valid values
true or false
Example shortcode
[tubepress searchResultsOnly="true"]
searchResultsUrl
Description
A URL defining where TubePress should send the user's search terms.
This section lists all of the TubePress options that apply to server-side caching.
API Cache
cacheCleaningFactor
Description
Defines how often TubePress will perform a full flush of its API cache. If you enter x, the API cache will be flushed every 1/x cache writes. Enter 0 to disable all cache flushing.
Default value
20
Valid values
Any non-negative integer
Example shortcode
[tubepress cacheCleaningFactor="0"]
cacheDirectory
Description
The absolute filesystem path of a directory on your web server where TubePress can store the API cache contents. This directory must be writable by the PHP process owner. If this option is left empty, TubePress will attempt to find and use the system temporary directory.
Default value
empty
Valid values
An absolute filesystem path of a writeable (by the PHP process owner) directory on the web server, or empty.
Example shortcode
[tubepress cacheDirectory="/tmp/tubepress-cache"]
cacheEnabled
Description
Enables or disables the TubePress API cache. You should always leave the cache enabled unless you are debugging.
Default value
true
Valid values
true or false
Example shortcode
[tubepress cacheEnabled="false"]
Option name
cacheLifetimeSeconds
Description
How long, in seconds, before an item in the TubePress API cache is considered to be stale.
Default value
21600 (six hours)
Valid values
Any positive integer
Example shortcode
[tubepress cacheLifetimeSeconds="300"]
HTML Cache
htmlCacheCleaningFactor
Description
Defines how often TubePress will perform a full flush of its HTML cache. If you enter x, the HTML cache will be flushed every 1/x cache writes. Enter 0 to disable all cache flushing.
Default value
100
Valid values
Any non-negative integer
Example shortcode
[tubepress htmlCacheCleaningFactor="300"]
htmlCacheCleaningKey
Description
The name of the HTTP request parameter that, when set to true, can remotely flush the cache. For instance, if you enter foobar, then adding ?foobar=true to the end of a URL would remotely trigger a clear of the HTML cache.
Default value
tubepress_clear_html_cache
Valid values
Any string of word characters (alphanumerics, underscores, and hyphens)
Example shortcode
[tubepress htmlCacheCleaningKey="somekey"]
htmlCacheDirectory
Description
The absolute filesystem path of a directory on your web server where TubePress can store the HTML cache contents. This directory must be writable by the PHP process owner. If this option is left empty, TubePress will attempt to find and use the system temporary directory.
Default value
empty
Valid values
An absolute filesystem path of a writeable (by the PHP process owner) directory on the web server, or empty.
Enables or disables the TubePress HTML cache. You should always leave the cache enabled unless you are debugging.
Default value
true
Valid values
true or false
Example shortcode
[tubepress htmlCacheEnabled="false"]
htmlCacheLifetimeSeconds
Description
How long, in seconds, before an item in the TubePress HTML cache is considered to be stale.
Default value
21600 (six hours)
Valid values
Any positive integer
Example shortcode
[tubepress htmlCacheLifetimeSeconds="300"]
Single-video embedding
This section lists the options relevant to single video embedding with TubePress.
video
Description
Causes TubePress to generate HTML for a single video embed. The video to be displayed is defined by the value you supply to this option.
Default value
empty
Valid values
Any video ID (YouTube, Dailymotion, etc.) that TubePress knows how to handle.
Example shortcode
[tubepress video="lJtHNEDnrnY"]
Advanced
This page lists all of the TubePress options that many users will not need to adjust.
debugging_enabled
Description
Enables or disables TubePress debugging. Keeping this enabled is a slight privacy risk, so if you are not experiencing difficulty with TubePress then feel free to disable it.
Default value
true
Valid values
true or false
Example shortcode
[tubepress debugging_enabled="false"]
galleryId
Description
Explicitly set the unique identifier of this HTML element. By default, TubePress will assign a large random number to each bit of HTML that it produces. This allows TubePress to differentiate and coordinate between multiple elements on the same page. By setting this option, you can choose a constant ID so that you can refer to the element via JavaScript.
Default value
empty
Valid values
Any string, though a large positive integer is recommended.
Example shortcode
[tubepress galleryId="123456"]
httpMethod
Description
Defines the HTTP method to use for most Ajax operations that TubePress performs. This can be useful to change when TubePress is used in web servers with tight security requirements.
Default value
GET
Valid values
GET or POST (case sensitive)
Example shortcode
[tubepress httpMethod="POST"]
https
Description
Serve thumbnails and embedded video player over a secure connection. This is useful if you are running TubePress inside an HTTPS-only site.
Default value
false
Valid values
true or false
Example shortcode
[tubepress https="true"]
output
Description
Defines what HTML TubePress will generate (e.g. a video gallery, a single video embed, interactive search widgets, etc.). Unless explicitly defined, TubePress will generate a video gallery.
Default value
empty
Valid values
searchInput User input (text field and search button) for interactive searching
searchOutput Search results from interactive searching
player A single embedded video (player only)
ajaxSearchInput User input (text field and search button) for asynchronous interactive searching