Shortcodes are small snippets of text that give you complete control over TubePress. More specifically, a shortcode is a collection of space-separated name-value pairs (a.k.a. "attributes") that roughly follow the pattern [tubepress optionName="optionValue"].
Examples of valid shortcode syntax
[tubepress name = "value"][tubepress name = 'value'][tubepress name='value'][tubepress name="value"][tubepress name = '"some text" more stuff'][tubepress name = "'some text' more stuff"]Examples of invalid shortcode syntax
[tubepress name = 'value"][tubepress name = value][tubepress name = '"some text more stuff']These shortcodes control the content of thumbnail galleries.
These settings control details on how your thumbnail galleries are displayed.
In TubePress terminology, a "player location" defines where the embedded video player will appear after the user clicks a thumbnail to play a video. TubePress offers several different options, each of which can be activated by supplying the desired value to the playerLocation shortcode attribute.
playerLocation value | Description | Example | Applies to… |
|---|---|---|---|
fancybox | TubePress Pro only. Plays videos using FancyBox | [tubepress playerLocation="fancybox"] | ![]() |
jqmodal | Plays videos using jqModal | [tubepress playerLocation="jqModal"] | ![]() |
normal |
Plays videos in an embedded Flash player above the video thumbnails. If you'd like the page to load with a specific video at the top of the gallery, just add the video's ID to the address of you gallery as the | [tubepress playerLocation="normal"] | ![]() |
popup | Plays videos in an HTML popup window | [tubepress playerLocation="popup"] | ![]() |
shadowbox | Plays videos using ShadowBox | [tubepress playerLocation="shadowbox"] | ![]() |
solo | After clicking a thumbnail, the entire page will refresh. The gallery will be replaced with a single video embed of the selected video, along with all meta information. The user must user their browser's "back" button to return to the gallery. | [tubepress playerLocation="solo"] | ![]() |
static |
Behaves exactly the same as the | [tubepress playerLocation="static"] | ![]() |
tinybox | TubePress Pro only. Plays videos using TinyBox | [tubepress playerLocation="tinybox"] | ![]() |
vimeo | Redirects to the video's original Vimeo page. | [tubepress playerLocation="vimeo"] | |
youtube | Redirects to the video's original YouTube page. | [tubepress playerLocation="youtube"] | |
The sorting capabilities of TubePress are limited by the providers of the videos (e.g. YouTube or Vimeo). Sorting functionality can be quirky, and there are some limitations. Below are the shortcodes, all based on the orderBy attribute, that control the video sort order.
The following galleries can't be sorted
mode="favorites") will always be sorted in the order that the videos were favorited.mode="playlist") will always be sorted in the order that the videos appear in the playlistmode="vimeoAlbum")mode="vimeoChannel")These shortcodes control the appearance and behavior the actual video player (Flash, HTML5, etc).
| Setting | Description | Valid values | Examples | Applies to… |
|---|---|---|---|---|
autoplay | Start video playback without user intervention | true or false | [tubepress autoplay="true"] | ![]() |
embeddedHeight | Vertical size (in px) of embedded player | Any positive integer | [tubepress embeddedHeight="480"] | ![]() |
embeddedWidth | Horizontal size (in px) of embedded player | Any positive integer | [tubepress embeddedWidth="640"] | ![]() |
fullscreen | Allow fullscreen playback | true or false | [tubepress fullscreen="true"] | ![]() |
hd | Display high definition videos | true or false | [tubepress hd="true"] | |
loop | Repeat videos without user intervention | true or false | [tubepress loop="true"] | |
playerColor | Primary color of embedded player | Six hexadecimal digits, representing a valid HTML color code | [tubepress playerColor="ffaabb"] | ![]() |
playerHighlight | Highlight color of embedded player | Six hexadecimal digits, representing a valid HTML color code | [tubepress playerColor="aa2233"] | ![]() |
playerImplementation | Choose vendor of embedded Flash player. Choose from the provider implementation (YouTube, Vimeo, etc), or the JW FLV Media Player from LongTail (for YouTube only). | youtube or longtail | [tubepress playerImplementation="longtail"] | ![]() |
showInfo | Display title and rating before playback | true or false | [tubepress showInfo="true"] | ![]() |
showRelated | Display related videos after playback | true or false | [tubepress showRelated="true"] | |
These shortcodes control what information is displayed below each video thumbnail.
These shortcodes control how TubePress interacts with content providers (e.g. YouTube, Vimeo)
| Setting | Description | Valid values | Example | Applies to… |
|---|---|---|---|---|
cacheEnabled | Use a file-based cache to store responses from provider | true or false | [tubepress cacheEnabled="false"] | ![]() |
developerKey | The YouTube Developer Key when interacting with YouTube | Any valid YouTube Developer Key | [tubepress developerKey="33AEF33BBC344"] | |
embeddableOnly | Only retrieve videos that can be embedded in other sites | true or false | [tubepress embeddableOnly="true"] | |
filter_racy | Retrieve videos that may be unsuitable for minors | true or false | [tubepress filter_racy="true"] | |
resultCountCap | Maximum total videos to retrieve. This can help to reduce the number of pages in your gallery. Set to "0" to remove any limit. | Any non-negative integer. | [tubepress resultCountCap="500"] | ![]() |
searchResultsRestrictedToUser | Restrict search results to videos uploaded by the given user. | Any valid YouTube or Vimeo username | [tubepress mode="tag" tagValue="cats" searchResultsRestrictedToUser="3hough"] | ![]() |
vimeoKey | Vimeo API "consumer key". Click here to register a key and secret. | Any valid Vimeo API consumer key | [tubepress vimeoSecret="14cd6be163fa2e42" vimeoKey="e3647c0ab1953a38eaca38d6a34f8204"] | |
vimeoSecret | Vimeo API "consumer secret". Click here to register a key and secret. | Any valid Vimeo API consumer secret | [tubepress vimeoSecret="14cd6be163fa2e42" vimeoKey="e3647c0ab1953a38eaca38d6a34f8204"] | |
These shortcodes control TubePress's interactive search functionality.
| Setting | Description | Valid values | Example | Applies to… |
|---|---|---|---|---|
searchProvider |
Used in conjunction with | youtube or vimeo | [tubepress output="searchResults" searchProvider="youtube"] | ![]() |
searchResultsDomId |
Used in conjunction with | Any valid DOM element that can contain HTML. | [tubepress output="ajaxSearchInput" searchResultsDomId="#mydiv"] | ![]() |
searchResultsUrl |
Used in conjunction with |
A full URL of a page containing an invocation of TubePress with | [tubepress output="searchInput" searchResultsUrl="http://mysite.com/videos.php"] | ![]() |
searchResultsOnly |
Used in conjunction with | true or false | [tubepress output="searchResults" searchResultsOnly="true"] | ![]() |
Various features that casual users will not likely need or want to adjust
| Setting | Description | Valid values | Example | Applies to… |
|---|---|---|---|---|
cacheCleaningFactor | The inverse of this setting will determine how often the cache is cleaned. i.e. the cache will be cleaned every 1/X cache writes. Enter 0 to disable cleaning. | Any non-negative integer | [tubepress cacheCleaningFactor="20"] | ![]() |
cacheDirectory | The directory in which to store cache files. | The absolute path of a writeable directory on your sever. | [tubepress cacheDiretory="/some/directory/cache"] | ![]() |
cacheLifetimeSeconds | The number of seconds until a cached item is considered stale. | Any positive integer. | [tubepress cacheLifetimeSeconds="3600"] | ![]() |
dateFormat | Formatting of date information for videos. See http://us.php.net/manual/en/function.date.php for examples | Any valid string as defined by http://us.php.net/manual/en/function.date.php | [tubepress dateFormat="l jS \of F Y h:i:s A"] | ![]() |
debugging_enabled | Enable ability to perform remote debugging | true or false | [tubepress debugging_enabled="false"] | ![]() |
disableHttpTransportCurl | Disable cURL HTTP transport | true or false | [tubepress disableHttpTransportCurl="true"] | ![]() |
disableHttpTransportExtHttp | Disable HTTP extension transport | true or false | [tubepress disableHttpTransportExtHttp="true"] | ![]() |
disableHttpTransportFopen | Disable fopen HTTP transport | true or false | [tubepress disableHttpTransportFopen="true"] | ![]() |
disableHttpTransportFsockOpen | Disable fsockopen HTTP transport | true or false | [tubepress disableHttpTransportFsockOpen="true"] | ![]() |
disableHttpTransportStreams | Disable PHP streams HTTP transport | true or false | [tubepress disableHttpTransportStreams="true"] | ![]() |
videoBlacklist | List of video IDs that should never be displayed. | A comma-separated list of videos IDs | [tubepress videoBlacklist="17jymDn0W6U"] | ![]() |