Welcome to PlumTube!
PlumTube utilizes the combined power of jQuery and video feeds to generate an list of links to videos on a particular YouTube channel or playlist. The output is a clean unordered list element that can be styled as desired, and can also support the addition of modal popup player functionality from plugins such as fancybox.
Installation
- Load your jQuery library of choice (as long as your choice is jQuery 1.6.0 or higher), followed by the PlumTube script. For older jQuery libraries, use PlumTube v1.0.
- Create the container element where you want the YouTube feed to generate, and assign it a unique id attribute for PlumTube to target. Insert a fallback link to the content you are pulling into the YouTube feed. This link will only display if Javascript is not enabled on the user's browser.
- Add the appropriate data attributes to your container element. At minimum, you must include both the
data-plumtube
attribute and either the data-plum-user (for videos from a particular channel) or data-plum-playlist (for videos from a specific playlist) attribute.data-plumtube data-plum-user="koryphaios">Watch my videos on YouTube.
Need help selecting the right attributes? Check out the PlumTube Code Generator.
Attributes
data-plum-large-thumb
-
boolean: Inserts the larger version of the thumbnail image (480px by 360px) into the link list. Default is
false
(inserts 120px by 90px thumbnail image). data-plum-max-results
-
integer: Defines the maximum number of videos to be pulled into the feed. Default is
10
. data-plum-modal
-
boolean: If
true
, feed list links will direct to video embed URL instead of YouTube page URL for that video. This link format works with modal popup or other custom embed scripts, such as fancybox. Default isfalse
. data-plum-modal-options
-
object: Defines additional to be added to video embed URL.
data-plum-modal
must betrue
in order for parameters to be appended to URL. Each parameter you wish to append to the URL should be added as another parameter to the data-plum-modal-options object. Note that the attribute itself should be wrapped in single quotes, and each parameter within the attribute object should be wrapped in double quotes.
For example,data-plum-modal-options='{"controls":0, "autoplay":1}'
returns "http://www.youtube.com/embed/VIDEO_ID?controls=0&autoplay=1" for each video. data-plum-new-window
-
boolean: Sets "target='_blank'" on feed links. Default is
false
. data-plum-show-thumb
-
boolean: Show image thumbnail link. If
false
, feed will load plain text link to each video (with the video name as the link text). Default istrue
. data-plum-show-title
-
string (
'link' || 'text'
): Adds the title of each video to its respective list item.'text'
inserts the title as plain text.'link'
inserts the title as a link with the same href as the video thumbnail link. Default isundefined
(no title will show with thumbnail).