
CF Pro™ takes advantage of the Google™ API for YouTube™ to allow you to post videos relevant to your blogs, videos related to those videos, videos posted in response to those videos, and comments on those videos. As always with CF Pro™, you can define as many layouts for each of these and one will be chosen randomly.
There are a few steps to setting up your YouTube™ content source:
Create a new project and add a content source of Content Type YouTube™ Video Feeds. Set any additional options you want.
Leave the Add Content and Add File options empty as they are not used for the YouTube™ content source.

Now, when editing the project where you just added a YouTube™ Video Feed, click the pencil icon to open up the Content Editor.

Begin setting up your feed details on the screen which opens up. When finished, click Save Settings.
Now that you have setup the settings for your feed, begin by creating one or more layouts for the video feeds themselves. There are lots of tokens you can use to include specific information about the video. Follow the bread crumb at the top left of your screen, then just click on Show Tokens and they will pop up at the bottom of your screen along with your wysiwyg editor.


To include the video directly, please see the table of video tokens in the Tokens section. You may drag-and-drop these tokens or copy-and-paste them into the layout of your choice. Replace all * symbols with the quantity of that item to use.
In addition to creating a variety of layouts for each video type & comments, you can set the number of each type to include. For example, if a video has 15 comments, but you set the comments field to from 3 to 10, then only the randomly chosen number between 3 and 10 of the comments will be included (each with a layout chosen at random from the layouts you create).
If you used the #YOUTUBE_VIDEO_RESPONSES_LAYOUT#, #YOUTUBE_RELATED_VIDEOS_LAYOUT#, or #YOUTUBE_VIDEO_COMMENTS_LAYOUT# tokens in your custom video layouts, then you will be provided with options to edit the layout choices for each of those items. Just click the appropriate section in the breadcrumb navigation at the top and use the tokens for that layout type to create a variety of layouts.
Your YouTube™ content source is now configured and ready to go!
There are a numer of settings to let you take great advantage of YouTube™ Video Feeds.
You can choose a standard feed or the searchable Video feed.
Publish and update dates will be formatted to match the format you choose here. A variety of formats are listed showing the look for today's date and time (according to the server).
The category and keyword tokens allow you to list multiples of each. CF Pro™ will stick something in between the listings. That "something" is your separator. For example, if set to a semicolon then categories would be listed like Category 1; Category 2; ...
Choose the category videos are posted in to search.
YouTube™ may change the available categories from time-to-time. This list is automatically refreshed from the YouTube™ server when you first log into CF (and every new session thereafter) so that you'll always see the latest list from YouTube™
If you want to limit the standard feed to a specific country, select it from the drop down.
If you want to limit the standard feed to include only a specific time frame, choose the time frame from the drop down.
The YouTube™ username to pull videos from. Only this user will be queried, so use this option carefully.
The number of entries to skip (where 1 means that no entries are skipped). For example, if a search contains 30 results and you don't want to use the first 5 for some reason, start at the 6th result by setting this value to 6.
The number of entries to be pulled in the YouTube™ feed. Recommended value is 10. Setting this value higher may slow processing significantly (according to YouTube™). Note that this is different from the From/To values used in the project.
Example: Your project is set to use from 3 to 5 results. Max results is 15. From those 15 results, 3 to 5 will be randomly chosen for your post.
Enter a search term or #KEYWORD# to return videos matching a specific keyword or the keyword for the current post, respectively.
Sorts results by the chosen field or language.
Set the language of the videos to be returned.
Set the country which must be allowed to play the videos returned. For example, setting to United States will prevent the inclusion of videos only playable in other countries.
A rather odd option provided by YouTube™. If checked then videos with information about the geographical location of the uploader will be included while those without such information will be excluded. Why would anyone use this?
Pretty obvious: If checked, then adult content will be allowed; otherwise it won't.
The easiest to use if you don't want to customize the look and feel of the YouTube™ video is the #YOUTUBE_VIDEO_FEED_DEFAULT_CODE# token. It will be replaced with this code:
<object width="425" height="344"><param name="movie" value="URL_TO_VIDEO"></param><param name="allowFullScreen" value="true"></param><embed src="URL_TO_VIDEO" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object>
If you enter your own custom code, be sure to click on the Source button in the WYSIWYG editor as you'll be pasting in source code. The video will not show up in the WYSIWYG editor, but will shwo up during previewing the next post.
The remaining tokens can be used to further customize your YouTube feeds.
Most tokens are fairly straight forward. The tokens listed here require additional information.
#YOUTUBE_VIDEO_RESPONSES_LAYOUT#
This token will be replaced by the correct video response layouts for your settings
#YOUTUBE_RELATED_VIDEOS_LAYOUT#
This token will be replaced by the correct related video layouts for your settings
#YOUTUBE_VIDEO_COMMENTS_LAYOUT#
This token will be replaced by the correct comment layouts for your settings
The table below details how you can include YouTube™ video code and links to the video.
| Video Type | URL To YouTube™ Page | URL To Actual YouTube™ Video | Basic Code To Display YouTube™ Video |
|---|---|---|---|
| Videos | #YOUTUBE_VIDEO_FEED_VIDEO_URL# |
#YOUTUBE_VIDEO_FEED_CODE_URL# |
#YOUTUBE_VIDEO_FEED_DEFAULT_CODE# |
| Video Responses | #YOUTUBE_VIDEO_RESPONSE_FEED_VIDEO_RESPONSE_URL# |
#YOUTUBE_VIDEO_RESPONSE_FEED_CODE_URL# |
#YOUTUBE_VIDEO_RESPONSE_FEED_DEFAULT_CODE# |
| Related Videos | #YOUTUBE_RELATED_VIDEO_FEED_RELATED_VIDEO_URL# |
#YOUTUBE_RELATED_VIDEO_FEED_CODE_URL# |
#YOUTUBE_RELATED_VIDEO_FEED_DEFAULT_CODE# |
#YOUTUBE_VIDEO_FEED_CATEGORY#
Each video is associated with exactly one primary category. This token is replaced by that value (matches the category value from the category setting).
#YOUTUBE_VIDEO_FEED_RANDOM_CATEGORIES_*#, #YOUTUBE_RELATED_VIDEO_FEED_RANDOM_CATEGORIES_*#, #YOUTUBE_VIDEO_RESPONSE_FEED_RANDOM_CATEGORIES_*#
Replace the * with a number (e.g. #YOUTUBE_VIDEO_FEED_RANDOM_CATEGORIES_4#, #YOUTUBE_RELATED_VIDEO_FEED_RANDOM_CATEGORIES_2#, #YOUTUBE_VIDEO_RESPONSE_FEED_RANDOM_CATEGORIES_6#). A listing of categories will replace this token. Each category will be separated by the separator set in settings.
#YOUTUBE_VIDEO_FEED_RANDOM_KEYWORDS_*#, #YOUTUBE_RELATED_VIDEO_FEED_RANDOM_KEYWORDS_*#, #YOUTUBE_VIDEO_RESPONSE_FEED_RANDOM_KEYWORDS_*#
Replace the * with a number (e.g. #YOUTUBE_VIDEO_FEED_RANDOM_KEYWORDS_1#, #YOUTUBE_RELATED_VIDEO_FEED_RANDOM_KEYWORDS_3#, #YOUTUBE_VIDEO_RESPONSE_FEED_RANDOM_KEYWORDS_6#). A listing of keywords will replace this token. Each keyword will be separated by the separator set in settings.
#YOUTUBE_VIDEO_FEED_THUMBNAIL_*_URL#, #YOUTUBE_RELATED_VIDEO_FEED_THUMBNAIL_*_URL#, #YOUTUBE_VIDEO_RESPONSE_FEED_THUMBNAIL_*_URL#
Replace the * with a number (e.g. #YOUTUBE_VIDEO_FEED_THUMBNAIL_3_URL#, #YOUTUBE_RELATED_VIDEO_FEED_THUMBNAIL_2_URL#, #YOUTUBE_VIDEO_RESPONSE_FEED_THUMBNAIL_1_URL#). This token will be replaced with the URL corresponding to the number you replaced the asterisks for. For example, if a video has 5 thumbnails and you use the token #YOUTUBE_VIDEO_FEED_THUMBNAIL_3_URL#, then it will be replaced with the 3rd thumbnail's URL. If you set the number greater than the number of thumbnails, then the token will be replaced with the last available thumbnail's URL.