Video Blogster Pro


Thank you for purchasing Video Blogster Pro!

Import new content from various media sites into WordPress for unlimited amounts of fresh search engine food to update your niche blog all day, every day.

How does it work?

Each Video Blogster content feed is a query for a channel, playlist, keyphrase, etc. that is sent to the media site’s API. The API returns the results of the query, and Video Blogster creates a post for each piece of content returned, including comments, tags, categories, statistics and it even imports the featured image. Your theme handles the rest.

These content feeds can be scheduled to run in the background to continually look for new media content, letting your site build itself automatically.

Yes, Video Blogster includes advanced processing, so you can spin content, translate languages, remove text or links, have full control of the content layout, and more. You can save as any user, any post type, any post status, in any format, and with any taxonomy.

 

Video Blogster Pro is a WordPress plugin so this guide assumes you have a basic understanding of WordPress.
  1. Download the Video Blogster Pro zip file from Envato to your computer.
  2. From the WordPress admin menu, select Plugins -> Add New.
  3. Click on the 'Upload Plugin' button at the top.
  4. Select the Video Blogster Pro zip file you downloaded and click 'Install Now'.
  5. Enter the server's FTP details to upload and install the zip file.
  6. After sucessfully uploading, click on 'Activate Plugin'.
  7. The Video Blogster menu will now appear in the WordPress admin menu.
  8. Plugin updates will automatically show on your WordPress Updates page.

For those familiar with WordPress and plugins. Let's import some 'Grumpy Cat' videos.

  1. Install and activate the Video Blogster Pro plugin on your WordPress site.

  2. From the admin menu, Go to Video Blogster -> Main Settings and validate the plugin with your purchase information.

  3. Click Make Content Feed to build your first YouTube feed. For this example we are only going to make 2 changes from the defaults:

    1. Change the number of videos to request to 10.
    2. Enter the search keyphrase 'grumpy cat'.

  4. For this example we are just going to manually query this feed to import some videos.
    Scroll down and click the Import YouTube Content Now button.

    It will take a few seconds for the YouTube API to respond and the results to be processed and each post created.

  5. You should see some admin messages similar to:

    Note that API queries do not 'remember' your previous queries.
    If you click the Import YouTube Content Now button again right now, YouTube should return the exact same 10 results.
    However, by default Video Blogster will automatically skip videos it has already imported to avoid duplicates.
    If you want to import the next batch of 10 instead, you can change the QueryBehavior to continuous.

  6. You can preview, edit, publish or delete these results by clicking 'Posts' in the main dashboard.

    (Note: I'm using the Featured Image Admin Thumb plugin to show thumbnails in the WordPress' Posts screen)

    As standard WordPress content, these posts will be easily compatible with other plugins and standard themes. If using a premium theme, we may need to connect Video Blogster to their custom meta fields, if used. See the Premium Theme Support section.

  7. Now you can explore all the options and flexiblity with Video Blogster Pro!

A content feed is comprised of Feed Details, Build the Query (unique to each media site), Process the Results returned into Post Templates and Create the Posts with the finished data. These 5 sections are broken down below.

Quick usage note: most circumstances break down into these several concepts:

  1. Request all videos from a channel/playlist/user/etc. - Set Videos to Request to -1 and the feed will import all results returned from the query. Can use lots of time, resources and quota depending on number of total videos. After doing this once, you should consider concept 3.
  2. Request all videos from a channel/playlist/user/etc. but only X at a time - Set Videos to Request to X and set Query Behavior to Continuous. This will only import videos that you have not imported before, until all results from the query have been imported. After that, you should consider concept 3.
  3. Request only new videos added to a channel/playlist/user/etc. - Set Order Videos by to date (or similar), set Query Behavior to Strict and compare the Scheduler time to how many videos might be added in that time. For instance, if the Scheduler is set to run every 24 hours, how many new videos could be added to the channel/playlist/user/etc. in that time? It is probably quite low. I recommend a number between 5 and 50, which will save much in time, resources and quota.

Build YouTube Query

This builds the query that will be sent to the YouTube API to retrieve videos.

API Request

Search Filters

Video Metadata

Video Image

Video Comments

Video Captions

Build the Query for DailyMotion

This builds the query that will be sent to the DailyMotion API to retrieve videos.

API Request

Search Filters

(DailyMotion documentation is a bit scarce)

Video Metadata

Video Image

Video Comments

  • Comments to Request - Will save video comments as WordPress comments attached to the created post for each video. A value of '-1' will grab all comments.
  • Build the Query for GiantBomb

    This builds the query that will be sent to the GiantBomb API to retrieve videos.

    Api Request

    Video Metadata

    Video Image

    Build the Query for MixCloud

    This builds the query that will be sent to the MixCloud API to retrieve tracks.

    Api Request

    Track Metadata

    Track Image

    Track Comments

    Build the Query for SoundCloud

    This builds the query that will be sent to the SoundCloud API to retrieve tracks.

    API Request

    Track Metadata

    Track Image

    Track Comments

    Build the Query for Spotify

    This builds the query that will be sent to the Spotify API to retrieve content.

    API Request

    Content Metadata

    Content Image

    Build the Query for Vimeo

    Determines the query request to send to the Vimeo API.

    API Request

    Search Filters

    Video Metadata

    Video Image

    Video Comments

    Build the Query for RSS feeds

    This builds the query that will read the RSS Feed to retrieve entries.

    Feed Request

    Entry Metadata

    Entry Image

  • Import featured image - If enabled, the image will be imported from the RSS item's thumbnail field. If it does not exist, the image will be extracted from the item content, if available.


  • Valid RSS feeds are generally in two flavors:

    IMPORTANT! Know the RSS feed style you wish to import. You can load the RSS feed URL in your browser and look for the <media:content> field to see if you need the Wordpress player shortcode. I know this is a bit of a pain, but it allows maximum flexibility.

    Process the Results

    The content returned from the SOURCE will then be processed using these rules.

    Content Exclusion Rules

    Content Filters

    The Post Templates

    Processed content will then be used to build each post. Template tags will be replaced with content info.

    Post Title

    • Post Title Template - This is the title of the post, where any template tags will be replaced with information from the video.
    • If Title a Duplicate? - If the post title would match an existing WordPress post title, then the import can be skipped. This can be useful if, for instance, someone uploads the exact same video under multiple YouTube accounts (against their TOS) in order to spam.

    Post Body

    • Post Body Template - This is the body of the post, where any template tags will be replaced with information from the video. Most themes use Post Body but some premium themes will use custom meta fields for content data instead. KSES is toggled off so you can use 'evil scripts' like iframe ads. You may also use spintax for more variations. If you want to make specific changes to your video player, see this FAQ for more information.

    Post Custom Meta Fields

    • Post Custom Meta Fields - Define your own meta data using a meta name and value, with template tags supported. This is useful if your theme or plugin requires it's own custom meta data, and this allows Video Blogster to fill out those fields automatically when the post is created.

      To insert an array, WordPress requires it must be serialized into a json string. For instance array(100,101) would be stored as a:2:{i:0;i:100;i:1;i:101;}. If you needed to store array(%VideoURL%,%VideoEmbed%) it would be stored as a:2:{i:0;i:%VideoURL%;i:1;i:%VideoEmbed%;}. Video Blogster will then replace the template tags with the content values with each content imported.

    Post Image

    • Post Image Template - The desired filename for the imported image, where any template tags will be replaced with information from the video. This will be the featured image filename of the post.

    Supported Template Tags

    • All the template tags available in the post templates.

    Create the Posts

    Content processed will then be saved in WordPress with these settings, one post per successful import.

    Post Details

    • Set Post Author - Presents a list of valid users to be author of the created posts. Selecting (random) will choose an existing author randomly. Selecting (content author) will set the post author to be the same as the content author, creating a new user if needed.

      To avoid WordPress running out of memory, a max of 1000 authors will be shown. If you want to change this, use this code snippet:

      function vbp_change_args_get_users( $args ) {
      	// Option 1. set number fetched to 5000
        	$args['number'] = 5000;	
      	// Option 2. Get all taxonomies. (I have plenty of memory and script execution timeout is high)	
        	$args['number'] = -1;		
      	return $args;
      }
      add_filter('vbp_get_users_args' , 'vbp_change_args_get_users');
      
      See get_users for other parameters you could change.
    • Set Post Type - All public and registered post types will be listed here, including any custom post types.
    • Set Post Status - All public and registered post statuses will be listed here, including any custom post statuses.
    • Set Post Format - If your theme supports them, you can choose any post format for the posts created (usually it would be 'video').
    • Set Post Publish Date to - Uses the original publish date of the content or comment when importing instead of the date the post or comment is imported (recommended). Note that if you manually publish a post later, WordPress will change the post date to the current time. If you wish to keep the content's publish date instead, see this FAQ.
    • Content Post Excerpt - Some themes use excerpts, which if created will be a shorter version of the content description.

    Post Taxonomies

    • All public and registered taxonimies will be listed here, including any custom taxonomies. To avoid WordPress running out of memory, a max of 1000 values per taxonomy will be shown. If you want to change this, use this code snippet:
      function vbp_change_args_get_terms( $args ) {
      	// Option 1. set number fetched to 5000
        	$args['number'] = 5000;	
      	// Option 2. Get all taxonomies. (I have plenty of memory and script execution timeout is high)	
        	$args['number'] = -1;		
      	return $args;
      }
      add_filter('vbp_get_terms' , 'vbp_change_args_get_terms');
      
      See get_terms for other parameters you could change.

    The buttons will contain the name of the media site for this feed.

    Import [MEDIA SITE] Content Now - Will send this content query immediately and create posts from the results. Note: If you haven't saved this feed, then no Feed ID meta data will be saved for the posts created. Also be aware if your server uses a hard set max_execution_time, the server might terminate the script before the query import is completed.
    Save [MEDIA SITE] Content Feed - Will save this content feed in the database. Whenever the Scheduler is triggered, all active content feeds will be queried sequentially.

    Shows a summary list of video feeds that can be queried when the Scheduler is triggered. Inactive feeds will be greyed out and the name will be striked out. You can view posts created by each feed as well as import, edit or delete feeds entirely, either singly or using the mass edit section below the summary list.

    The Build the Query section of Mass Edit does not have many fields because each media site has a different API.

    The Scheduler allows the content feeds to be queried continuously at certain intervals, as well as the utility functions that help manage the videos.

    If Scheduler is enabled it shows the times of the next scheduled triggers.

    • Once enabled, start querying content feeds in - The delay in hours before the Scheduler starts querying active feeds.
    • then Query the content feeds every - The number of hours between querying all the active content feeds.
    • Once enabled, start running utility functions in - The delay in hours before the Scheduler starts running utility functions.
    • then Run the utility functions every - The number of hours between running the utility functions.
    • Email error summary to - Enter a valid email and VBP will send a summary of any errors encountered after every completed run of querying content feeds and the utility functions.
    If a range is specified a random time will be chosen between them (example: 12-24 hours).

    Note: Video Blogster Pro schedules events into the WordPress Cron (aka wp-cron) for checking. These cron events are only checked when a visitor loads a non-cached WordPress page on the site. If there are no visitors, there can be no cron checks and therefore no scheduler checks.

    If you have a high traffic site and wish to turn off WP-Cron and use server cron jobs instead, see this FAQ.

    All important log events will be shown here. Also, the message display options will be used when manually importing content.

    Display Messages

    • Critical - Important messages like errors and posts created.
    • Video Import - Secondary messages when importing like comments and images.
    • Video Skipped - Displays a message when content is not imported and the skip reason.
    • Utility Function - Messages related to the Utility Functions to help manage imported content.
    • Debug - Lots of programming information to help with support requests.

    • Max log messages to save - Log messages are saved to the database, and this limit prevents the database from getting too large. If you are on a virtual host, I recommend NOT entering 0.

    Miscellaneous utility functions for Video Blogster Pro. Can be triggered via Scheduler or run manually.

    1. Trash Broken Embeds - Send posts to Trash if its embedded content has been removed from source media site. Sometimes the video owner or the remote site itself deletes or otherwise disables a video. In particular YouTube does well policing inappropriate, misleading and spammy videos. This cleans up your site instead of showing posts with broken embeds. For a full functional plugin, check out Video Link Checker
    2. Fetch Missing Images - If "Import featured image" is selected and the remote API fails to return an image for whatever reason, this tool lets the plugin re-request the image at the next opportunity. If "Twice" selected and unable to fetch image after 2 additional attempts, post will be sent to Trash. If "Import featured image" was NOT selected at time of import, the images are therefore NOT considered missing. You can override this by using the filter "vbp_image_import" to return TRUE.
    3. Remove Trash Images - Remove any images associated with Trashed Video Blogster posts to save space. If you Trash posts created by Video Blogster because the videos are spam, non-related, removed, etc., this will also delete the images too to save space (WordPress does NOT do this for you). Will ONLY apply to Trashed posts that were created by Video Blogster.
    1. Why don't the scheduler events trigger? Nothing is happening.
    2. Can I turn off WP-Cron and use server cron jobs instead?
    3. I’m seeing the message “Error: [plugin] hook not found, likely another plugin misuse of cron_schedules. See FAQ.” What is that?
    4. Why does the Scheduler use hours? Why can’t I query every X minutes or seconds?
    5. Video Blogster imported videos, but they don't display properly with my theme.
    6. I’m doing a query on a channel full of content but not getting any results. Why?
    7. How do I get videos to autoplay? autohide? not showinfo? remove control bar? etc.
    8. How can I use schema.org microdata for the videos?
    9. How can I use a 3rd party video player?
    10. How can I change the video player arguments?
    11. Why am I seeing the YouTube message 'Watch this video on YouTube'?
    12. How can I convert VideoDuration into other formats?
    13. I'm getting strange characters when I save my feeds. What is it?
    14. How can I customize something specific when a post is created?
    15. How can I customize something specific when a post is updated?
    16. How can I add default data to new feeds?
    17. Why is the script timing out? I'm seeing a blank page, a 404 error, or a 500 error.
    18. How can I get around the 500 results limit from YouTube?
    19. How can I use the video's publish date when I publish a post manually?
    20. On some posts I'm seeing 'missed schedule'. What does that mean?
    21. For Vimeo I'm seeing the message "Too many API requests. Wait an hour or so, then try again". What is happening?
    22. Why is SoundCloud not returning tracks?
    23. How can I map video categories to match my own site?
    24. My theme only shows static video sizes. How can I make it fluid and responsive?
    25. How to create a YouTube API key?
    26. How to check my YouTube API quota?
    27. YouTube returns "The request cannot be completed because you have exceeded your quota". What can I do?
    28. I'm trying to set the post author to the content author, but I'm getting "Cannot create a user with an empty login name." What does this mean?
    29. How do I remove black bars on YouTube thumbnails?

    1. Why don't the scheduler events trigger? Nothing is happening.

      • The plugin schedules events in the WordPress event scheduler. If checked with the default wp-cron, then these events are only checked when a visitor loads a non-cached WordPress page on the site. If there are no visitors, there can be no wp-cron checks and therefore no scheduler checks. A server cron job to invoke wp-cron is recommended instead.
      • If you are using a caching plugin, wp-cron won't be called until a cached page is rebuilt.
      • If you are using .htaccess to allow,deny by IP, make sure to allow the IP of your WordPress site itself as the wp-cron uses that IP address when executing.
      • Are you sure nothing is happening? Be sure to check the log file. Perhaps the content is being skipped because they have already been imported. Try running with debug mode turned on.
    2. Can I turn off WP-Cron and use server cron jobs instead?

      • Yes, this is recommended (for any site) if you have high traffic or low server resources. It also avoids any timeout restrictions on PHP scripts.
        1. Edit the WordPress file /wp-config.php and add the line
          define('DISABLE_WP_CRON', true);
        2. Edit your cron on the server either with the command line 'crontab -e' or an interface like cPanel and add the line
          */15 * * * * wget -q -O /dev/null http://www.mydomain.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1
          and change 'mydomain' to your site domain.

        This crontab entry will call wp_cron.php every 15 minutes and trigger any scheduled events in WordPress. Note in this example, that even though the 'next video feeds check' may be scheduled for 9:22, the above cron only fires every 15 minutes, so it won't be triggered until 9:30.

        See these excellent articles for more details: WP-Cron: Scheduling Tasks in WordPress and Replace WordPress Cron with Real Cron for Site Speed.

        If you are unfamiliar with cronjobs and/or are unable to edit your server's cron you may use a web based cron service such as EasyCron.

    3. I'm seeing the message "Error: [plugin] hook not found, likely another plugin misuse of cron_schedules. See FAQ." What is that?

      • This happens when another plugin incorrectly replaces cron_schedules with their own schedules instead of correctly adding to the existing schedules. This means the other plugin actually wipes out all existing cron hooks set by WordPress and plugins, including our plugin hook. The offending plugin code needs to be fixed or deactivated. I've only seen this happen with two other plugins - 1 was fixed and the other is no longer supported (php my video blog), but there are many many plugins out there. The chances of seeing this are slim, but if you do see this message, please let me know the offending plugin.
    4. Why does the Scheduler use hours? Why can't I query every X minutes or seconds?

      • The various media sites have daily quotas and/or throttling, so it's best to request 500 videos an hour than it is 10 videos a minute. If you want to publish the posts at that frequency, save them in bulk as Drafts and use the free plugin Auto Post Scheduler.
    5. Video Blogster imported videos, but they don't display properly with my theme.

      • You are most likely using a Premium theme that uses custom meta data created by the theme author to store video information, and Video Blogster doesn't know what those custom fields are unless we declare them. See Premium Theme Support.
    6. I'm doing a query on a channel full of content but not getting any results. Why?

      • The plugin queries the API for any videos attached to the channel. If the channel is only composed of playlists of videos, the API will return no video results.
    7. How do I get videos to autoplay? autohide? not showinfo? not show control bar? etc.

      Video Blogster allows maximum flexibility so you can use whichever video player you desire, free or paid. If using a video player such as JW Player, FV Player, video.js etc., then these options should be available through those players. If using the template tag %VideoEmbed%, it will use the default iframe code supplied by the video site.

      To make custom changes, use iframe code or WordPress' [embed] shortcode.

      • Example iframe code for YouTube:

        <iframe width="640" height="480" src="https://www.youtube.com/embed/nBa55pJEBG4" frameborder="0" allowfullscreen></iframe>

      • Example embed shortcode for YouTube:

        [embed]https://www.youtube.com/watch?v=nBa55pJEBG4[/embed]

      If you're using iframe code, you can just add parameters in Video Blogster's Post Body Template (used when importing content).

      • Example post content template using YouTube iframe with extra parameters. The %VideoID% will be automatically replaced with the ID of the video imported.

        <iframe width="640" height="480" src="https://www.youtube.com/embed/%VideoID%?autoplay=1&autohide=1&showinfo=0&controls=0" frameborder="0" allowfullscreen></iframe>

      • Example post content template using DailyMotion iframe with extra parameters. The %VideoID% will be automatically replaced with the ID of the video imported.

        <iframe width="640" height="480" src="http://www.dailymotion.com/embed/video/%VideoId%?autoplay=1&syndication=123456" frameborder="0" allowfullscreen></iframe>

      If you're using embed shortcode, the WordPress oEmbed request query does not support these options (boo). You can choose to use another video player that does OR use a site wide filter, applied to all embed shortcodes, that will add your extra parameters.

      • Example WordPress filter code you would add to your theme's functions.php file or the plugin Code Snippets (recommended):

        // this function is called on all videos emdbedded with WordPress shortcodes.
        // i.e.: [embed]https://www.youtube.com/watch?v=nBa55pJEBG4[/embed]
        function embed_responsive_options($code) {
           // check the code for the video site you want to change for. Here are some examples:
           if ( strpos($code, 'youtu.be' ) !== false || strpos( $code, 'youtube.com' ) !== false ){
              // replace the embed line with your additional parameters. YouTube always has $1 parameter '?feature=oembed'.
              $code = preg_replace( '@embed/([^"&]*)@', 'embed/$1&autoplay=1&autohide=1&showinfo=0&controls=0', $code );
           }
           else if ( strpos( $code, 'dailymotion.com' ) !== false ) {
              // replace the embed line with your additional parameters
              $code = preg_replace( '@embed/([^"&]*)@', 'embed/$1?autoplay=true&controls=false', $code );
           }
           else if ( strpos( $code, 'vimeo.com' ) !== false ) {
              // replace the embed line with your additional parameters
              $code = preg_replace( '@video/([^"&]*)@', 'video/$1?autoplay=1', $code );
           }
           return $code;
        }
        add_filter( 'embed_oembed_html', 'embed_responsive_options');

      • Click here for a full list of YouTube embed parameters.
      • Click here for a full list of DailyMotion embed parameters.
      • Click here for a full list of Vimeo embed parameters.
      • Click here for a full list of SoundCloud embed parameters.
    8. How can I use schema.org microdata for the videos?

      • We can add this right into the Post Body Template for the video feed. Here is an example:
        <div itemscope itemtype='http://schema.org/VideoObject'>
        <meta itemprop='name' content='%VideoTitle%'><meta itemprop='thumbnailURL' content='%VideoImage%'><meta itemprop='embedURL' content='%VideoUrl%'><meta itemprop='width' content='640'><meta itemprop='height' content='480'>
        <p><%VideoEmbed%</p>
        <p><span itemprop='description'>%VideoDescription%</span></p>
        </div>
        
    9. How can I use a 3rd party video player?

      • YouTube allows other video players to show their content but most other media sites do not. That said, once your chosen video player is installed on your site, you can simply replace the embed shortcode/tag in the Post Body Template with the shortcode for the new video player.

        Example: After installing the JW Player plugin, you would edit the Post Title Template to replace

        %VideoEmbed%
        
        with
        [jwplayer width='640' height='480' file='%VideoUrl%']
        
        Using a custom player typically supports a much wider range of options, for example see JW Player Options.
    10. How can I change the video player arguments?

      • If using the %VideoEmbed% or %TrackEmbed% template tags, it will be replaced with the default player supplied by the media site by using an oEmbed request. You may wish to change some aspects of the player that are not supported by oEmbed. In such cases, you can specify the iframe code yourself instead of using the template tags.

        Example: The MixCloud oEmbed request returns the Classic Widget using the Dark theme. If you wish to use another widget size or change to the Light theme, do not use the template tag that makes the oEmbed request. Instead, we can use the iframe of the Widget you want directly. I opened an example track, clicked on the Share link to open Embed Options and copy/pasted the code for the Picture Widget with the Light theme into the Video Blogster Post Body Template.

        Then I changed the URL for the iframe src feed parameter to the template tag %TrackUrl%, which Video Blogster will replace automatically with any imported track.

        Example Video Blogster post output with the Post Body Template above for the MixCloud Picture Widget using the Light theme:

    11. Why am I seeing the YouTube message 'Watch this video on YouTube'?

      notEmbeddable
      • Normally the plugin will only import videos that are flagged as embeddable on other websites besides YouTube, but you can override this by specifically importing a video by its video ID or similar. In this case if YouTube does not allow the video to be embedded on other sites, then this message will appear instead.
    12. How can I convert VideoDuration into other formats?

      • You can attach an action to when the VideoDuration post meta is added and perform your conversion. For instance the following code would be used to convert the VideoDuration from HH:MM:SS into just seconds and save it under the post meta key 'VideoSeconds':
        // Add this code to child theme's function.php file or in Code Snippets plugin (recommended)
        function video_duration_convert( $meta_id, $post_id, $meta_key, $meta_value ) {
                if ( 'VideoDuration' == $meta_key ) {
                        sscanf($meta_value, "%d:%d:%d", $hours, $minutes, $seconds);
                        $secs = isset($seconds) ? $hours * 3600 + $minutes * 60 + $seconds : $hours * 60 + $minutes;
                        add_post_meta( $post_id, 'VideoSeconds', $secs );
                }
        }
        
        add_action('added_post_meta', 'video_duration_convert', 10, 4);
    13. I'm getting strange characters when I save my feeds. What is it?

      charset
      • This might happen on older PHP versions that are not using the UTF-8 charset (default since PHP 5.4). You can either upgrade to a supported PHP version or modify your PHP .ini file to set the default_charset to UTF-8.
    14. How can I customize something specific when a post is created?

      We can insert a filter hook with the WordPress function add_filter. The filter 'vbp_create_the_post' is checked right before Video Blogster would call the function wp_insert_post, allowing us to hook in and customize the post creation functionality to do anything we want.

      This code snippet shows several examples of how we could customize post creation for an imported video.

      
      add_filter( 'vbp_create_the_post', 'my_create_post_hook' );
      
      // vidpost - the array of args we would send to wp_insert_post()
      // videoInfo - the array of info for this imported video
      // returns: either the postID, null, or $vidpost
      function my_create_post_hook( $vidpost, $videoInfo ) {
      
        // Usage 1: If we don't want VB to create the post at all, just return null. 
        // Useful for debugging or checking your own custom rules.
        if ( false !== stripos( $videoInfo['title'], "BAD WORD" ) ) {
      	return null;
        }
        if ( $videoInfo['videoLikes'] < 10 ) {
      	return null;
        }
        
        // Usage 2: If we want a custom rule to change something in the post creation, modify the $vidpost and return it.
        if ( $videoInfo['likeCount'] >= 10 ) {
      	$vidpost['post_content'] .= "<p> " . $videoInfo['likeCount'] . " likes</p>".;
        }
        return $vidpost;
      
        // Usage 3: We could also return a postID here, which tells VB it doesn't have to create a post.
        // VB would still attach meta and comments to the postID.
        // This allows you to do other customizations with the postID before control is returned to VB.
        $postID = wp_insert_post( $vidpost, TRUE );
        return $postID;
      
      }
      
    15. How can I customize something specific when a post is updated?

      We can insert a filter hook with the WordPress function add_filter. The filter 'vbp_update_the_post' is checked right before Video Blogster would call the function wp_update_post, allowing us to hook in and customize the post update functionality to do anything we want.

      Post updates can only occur when you have 'Update existing posts instead of skipping duplicate videos?' checked in the 'Process the Results' tab and the API returns a video you have already imported.

      This code snippet shows several examples of how we could customize a post update for an imported video

      
      add_filter( 'vbp_update_the_post', 'my_update_post_hook' );
      
      // vidpost - the array of args we would send to wp_update_post()
      // videoInfo - the array of info for this imported video
      // returns: either the postID, null, or $vidpost
      function my_update_post_hook( $vidpost, $videoInfo ) {
      
        // Usage 1: If we don't want VB to update the post at all, just return null. 
        // Useful for debugging or checking your own custom rules.
        if ( false !== stripos( $videoInfo['title'], "BAD WORD" ) ) {
      	return null;
        }
        if ( $videoInfo['videoLikes'] < 10 ) {
      	return null;
        }
        
        // Usage 2: If we want a custom rule to change something in the post update, modify the $vidpost and return it.
        if ( $videoInfo['likeCount'] > 10 ) {
      	$vidpost['post_content'] .= "<p> " . $videoInfo['likeCount'] . " likes</p>".;
        }
        return $vidpost;
      
        // Usage 3: If we don't want VB to call wp_update_post, we can just return the existing post ID.
        // VB would still attach meta and comments to it.
        return $vidpost['ID'];
      
      }
      
    16. How can I add default data to new content feeds?

      We can use a filter hook to edit the default data shown when you Make a Content Feed. Example code snippet:

      add_action( 'vbp_make_feed', 'add_feed_default_values', 10, 1 );
      
      function add_feed_default_values( $args ) {
              $args['pPostTemplate'] = '%VideoDescription%';
              $addFields = array(
                      '_yoast_wpseo_metadesc'         => '%VideoTitle%',
                      '_yoast_wpseo_title'            => '%VideoTitle%'
              );
              $args['pMetaFields'] = array_merge( $args['pMetaFields'], $addFields );
              return $args;
      }
      

      Resulting changes when you now click on 'Make Content Feed' :

    17. Why is the script timing out? I'm seeing a blank page, 404 error or 500 error.

      If your server uses mod_php (common) then a PHP script like Video Blogster will extend its script time automatically to handle any and all requests.

      However if your server uses mod_fcgid or mod_fastcgi or a fastcgi process manager like php-fpm then that mod will automatically terminate any PHP script after its timeout limit is reached. Video Blogster will be unable to extend the script time or recover or even log an error message. In this case, you'll have to edit the appropriate configuration files and extend the timeout manually (depends on which module), or preferably, create a server cron job which will not be subject to timeout limits.

      To know which module is currently used on your server, you can check your details with the plugin PHP Info.

    18. How can I get around the 500 results limit from YouTube?

      YouTube will return not more than 500 results for a search query. This is an issue if you want to import all the videos from a search query with more than 500 total results. This includes channels and user accounts. The solution would be to break the query up into multiple content feeds so that each query will return less than 500 video results.

      For instance, you could try splitting a channel query by date published:

      • Make a content feed to query YouTube channel videos that were added in the last 6 months.
      • Make a content feed to query YouTube channel videos that were added in the last 6-12 months.
      • Make a content feed to query YouTube channel videos that were added in the last 12-18 months.
      • Make a content feed to query YouTube channel videos that were added in the last 18-24 months.
      • Make a content feed to query YouTube channel videos that were added in the last 24+ months.
      Now each one would return up to 500 videos. Depending on the channel, you may need to adjust the date ranges of course.

    19. How can I use the video's publish date when I publish a post manually?

      Video Blogster can set the post's publish date to be the same as the remote video's publish site. However, if you import as draft, pending, etc. and then publish the post manually, WordPress changes the publish date to the current time. If you wish to keep the content's publish date instead after publishing the post manually, we can use this code snippet:

      // Add this code to child theme's function.php file or in Code Snippets plugin (recommended)
      function vbp_keep_publish_date( $post_id ) {
        $videoPublish = get_post_meta( $post_id, 'VideoPublish', TRUE );
        if ( empty( $videoPublish ) ) return;
        // unhook this function so it doesn't loop infinitely
        remove_action( 'publish_post', 'vbp_keep_publish_date', 99 );
        // update the post with the video publish date, which calls save_post again
        wp_update_post( array( 'ID' => $post_id, 'post_date' => $videoPublish ) );
        // re-hook this function
        add_action( 'publish_post', 'vbp_keep_publish_date', 99 );
      }
      
      add_action('publish_post', 'vbp_keep_publish_date', 99 );
      
    20. On some posts I'm seeing 'missed schedule'. What does that mean?

      This can sometimes happen when you're importing videos with post status set to 'Publish' and the 'Use the video publish dates instead of the current date?' checked. Video Blogster imports a video recently uploaded, and the video's publish date is ahead of the server's current time because of the timezone difference and/or server has the wrong time. Therefore, WordPress schedules it for a future publish at the video's publish date. I don't know why WordPress misses its scheduled posts sometimes, but you can try a plugin like Scheduled Post Guardian.

    21. For Vimeo I'm seeing the message "Too many API requests. Wait an hour or so, then try again". What is happening?

      Starting August 9th, 2016 Vimeo began enforcing rate limits on all API apps. The API rate limit is currently based on a 15-minute rolling window, and if you surpass the rate limit within a 15-minute time period the API app will be blocked for up to 2 hours. Unfortunately, how the rate limit numbers work is still a bit unclear, but it seems the default rate limit for new access tokens is 250 requests per 15-minute rolling window. Each request can be up to 50 videos or comments.

      In any case, the best thing to do is stop using the default Vimeo access token and create your own and enter it in Main Settings, so you are not sharing rate limits with other users.

    22. Why is SoundCloud not returning tracks?

      SoundCloud now allows track owners to mark tracks as private. As such, they won't show up through the API.

    23. How can I map video categories to match my own site?

      With Video Blogster you can do just about anything with a bit of hook coding. Unfortunately, each media site uses its own category names, so you'll have to code this manually depending on which media sites you're importing from and your own site's category structure. Some media sites will use 'Education' while others may use 'Instructionals', etc.

      Here is a code snippet to get you started:

      
      add_filter( 'vbp_create_category', 'vbp_category_submap');
      
      // see if the media site's category name should be a subcat of an existing category on your site.
      // this code snippet assumes the parent categories 'Entertainment' and 'Movies' already exist.
      function vbp_category_submap( $catName ) {
        $catID = 0;
      
        // example to map media site's 'Music' to your site's 'Entertainment/Music' category.
        if ( $catName == 'Music' ) {
      	$parent = get_cat_ID( 'Entertainment' );
      	$catID = wp_create_category( 'Music', $parent );  
        }
        // example to map media site's 'Gaming' to your site's 'Entertainment/Video Games' category.
        else if ( $catName == 'Gaming' ) {
      	$parent = get_cat_ID( 'Entertainment' );
      	$catID = wp_create_category( 'Video Games', $parent ); 
        }
        // example to map media site's 'Trailers' to your site's 'Movies/Previews' category.
        else if ( $catName == 'Trailers' ) {
      	$parent = get_cat_ID( 'Movies' );
      	$catID = wp_create_category( 'Previews', $parent ); 
        }
        
        // if there was a match above then we already checked/created the category so we can return its ID.
        if ( $catID ) return $catID;	
        
        // otherwise no match above so return the category name for WordPress to check/create the ID.  
        return $catName;  
        
      }
      
    24. The video embed is too small. How do I change it?

      This likely means two things: You are using the %VideoEmbed% template tag to import, and your theme does not adjust the video size as needed.

      1. %VideoEmbed% sends an oEmbed API call to the media site, which returns the embed html code of the video in its original size. Sometimes the video is recorded in a very small format, but your theme does not adjust the size as needed. Instead of %VideoEmbed% in the Post Body Template, you CAN use your own embed html code in the exact size you want. For an example, you can grab a sample embed code off YouTube and replace the video ID with the %VideoID% template tag and set any width and height you want:
        
        <iframe width="640" height="480" src="https://www.youtube.com/embed/%VideoID%" frameborder="0" 
        allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
        

        Video Blogster Pro will use your Post Body Template above with the %VideoID% replaced with the video ID of each video imported.

      2. However using the default width and height or setting your own may lead to display issues if your theme does not adjust the video size as needed, also known as being fluid and responsive. This means the video will automatically resize to match its parent container, regardless of display device, so there is no 'white space' around it. With a little work, we can make any video iframe fluid responsive.

        With Video Blogster, this consists of 2 things:

        1. In the Post Body Template, wrap the %VideoEmbed% keyword with a css custom class called 'videoWrapper', like so:
        2. Use the following custom CSS:
          
          .videoWrapper {
          	position: relative;
          	padding-bottom: 56.25%; /* 16:9 */
          	padding-top: 25px;
          	height: 0;
          }
          .videoWrapper iframe {
          	position: absolute;
          	top: 0;
          	left: 0;
          	width: 100%;
          	height: 100%;
          }
          
          If your theme does not have a setting to add custom CSS, you can make a child theme and put the custom CSS in the child's style.css file.
        Now when you import videos with Video Blogster the embeds will be fluid and responsive.
    25. How to create a YouTube API key?

      Log into the Google Developer's Console and follow these steps:

      Step 1: Create Project

      Step 2: Give Project a name

      Step 3: Select Enable APIs and Services

      Step 4: Search for 'youtube' and select YouTube Data API v3

      Step 5: Enable the YouTube Data API v3

      Step 6: Select Credentials

      Step 7: Select Create Credentials -> API key

      Step 8: Copy the API key and paste it into Video Blogster Pro -> Main Settings -> YouTube API Key.

    26. How to check my YouTube API quota?

      Log into your Google Console and follow these steps:

      Step 1: Select 'Go to APIs overview'

      Step 2: Select 'YouTube Data API v3'

      Step 3: Select 'Quotas' in the left menu.

    27. YouTube returns "The request cannot be completed because you have exceeded your quota". What can I do?

      YouTube allows a daily quota per project for using their API. The message means you have exceeded the daily quota. If you are using your own API key and need more you can request a quota increase through your google console or https://support.google.com/youtube/contact/yt_api_form
    28. I'm trying to set the post author to the content author, but I'm getting "Cannot create a user with an empty login name." What does this mean?

      WordPress does not allow user names with special characters, so you will see this message if the content author is in Hebrew, Arabic, Cyrillic, etc.
    29. How do I remove black bars on YouTube thumbnails?

      YouTube offers both 16:9 and 4:3 video formats so black bars are added by YouTube when the uploaded thumbnail ratio is less than the video uploaded ratio. If you are getting black bars try requesting the thumbnail in the other ratio. Unfortunately it is up to the video owner to upload a good valid thumbnail size so YouTube doesn't have to add black bars.
    1. I use Video Blogster Pro myself on numerous sites. I've added all the features I wanted plus everything else I could easily think of. Please let me know if any instructions need clarification - it all makes sense to me because I programmed it. :) If you have a feature request I'll try to implement it if possible.
    2. Future plan to add WordPress supported oEmbed sites, as requested.
    3. Trying to import zillions of videos on a free or virtual host will probably encounter low resource issues.
    4. There are many YouTube uploaders that use fake videos with misleading tags in order to get more views to their site or product. YouTube does a good job of removing many of them relatively quickly (and the Schedule Checker will remove those deleted posts automatically) but there still can be plenty of unrelated results returned by YouTube, especially if querying for the latest videos. For instance, when I just now went to YouTube and searched for 'funny cat videos' filtered by date, the third entry was 'Funny Magic with Jack: Ep 02 Card Elevator'. Why? Because he stuffed his description with popular keywords, including 'funny cat videos', so YouTube included it in the results. => Just be aware of this. <=
    5. Here's what I do:
      1. Save my feeds that use search terms to create posts in 'draft' status so they can be curated later. Feeds from 'trusted' sources such as channels or playlists can create posts in 'pending' or 'publish' status.
      2. Every X days I log into WordPress and check my new drafts imported by Video Blogster. Any spammy videos and the like are trashed and the rest edited/spun and are set to 'pending' status.
      3. My plugin WP Auto Poster publishes those pending posts at custom time intervals for me automatically.

    Video Blogster imports videos as WordPress data, to ensure compatibility with any plugin or theme that uses WordPress data. However, some premium themes use their own custom data to display videos instead of WordPress. In those cases Video Blogster may not know how to save that data (it's impossible to know what premium themes name their custom video fields in advance).

    You can identify if your theme is using custom meta data if you see a custom meta box that is not standard WordPress. Each theme will probably be different. Example custom meta box:

    Luckily, all we have to do is tell Video Blogster to fill in those custom data fields automatically when it imports videos. Unfortuantely, we have to figure out what variable names those custom data fields are using, and that might require some html and/or css knowledge. Fortunately, some popular video themes have already been done for you. If a supported Premium theme is detected, the custom meta fields will be filled out automatically for you in 'The Post Templates' section when making a NEW content feed.

    For example, these are the custom meta fields entered when the VideoTube theme is detected. The VideoTube custom fields video_frame, count_viewed, like_key, and layout will be filled in automatically for each video imported into WordPress so they display properly with VideoTube.

    These are FREEBIES and I do not promise compatability if their themes change or stop working, but I can try. If you have another premium theme not listed below that uses custom data for videos and cannot determine the variables they use, please contact support with a copy of the theme and I will take a look for you (Please note it's not my fault if a theme uses custom data fields).

    WordPress identifies the theme based on the Theme Name declaration in it's style.css file and Video Blogster uses that theme name to include the necessary file in its /theme-helpers/ sub-directory. If you've renamed your Theme Name from 'truemag' to 'truemag (shared on themelot.net)' in the style.css file, then the plugin will not be able to load the '/theme-helpers/truemag.php' file functions.

    Be aware some premium themes require you to create posts with a certain custom post type, a certain post format, and/or use their custom taxonomies. Be sure to set them in Video Blogster.

    Note that premium themes using custom meta data are subject to the theme-lock effect, preventing you from switching themes easily.

    Some of the premium themes recognized:

    Avada, deTube, Enfold, Furious, Goodwork, Newspaper, NewsTube, NovaVideo, Sahifa, SimpleMag, SnapTube, TrueMag, Valenti, VideoFly, Video Member, VideoTube.

     

     

     

    Some WordPress plugins use custom meta data to store video info, just like some Premium themes, and are handled the same way. Read that section for more details.

    Special plugins recognized:

    Post Views Count, WordPress SEO, WP-PostViews, WP-PostRatings, WTI Like Post.

     

    Post Views Count

    When Video Blogster detects this plugin, it will automatically set these form fields so Video Blogster will save the custom data the plugin uses:

    • New Custom Field '_count-views_all' set to
      %VideoViews%

    WordPress SEO aka Yoast SEO

    When Video Blogster detects this plugin, it will automatically set these form fields so Video Blogster will save the custom data the plugin uses:

    • New Custom Field '_yoast_wpseo_title' set to
      %VideoTitle%
    • New Custom Field '_yoast_wpseo_metadesc' set to
      %VideoDescription%

     

     

     

    WP-PostViews and WP-PostRatings

    Video Blogster automatically saves custom meta data with the same names as these plugins. No additional definitions are necessary.

     

     

     

    WTI Like Post

    When you import videos with Video Blogster and it detects this plugin, it will automatically include the file /plugin-helpers/wti-like-post.php to add these filter hooks to save the custom data the plugin uses:

    • add_action hook to the 'vbp_create_the_post_finished' filter which will insert video likeCount and dislikeCount numbers into the custom 'wti_like_post' database table for each video imported.

     

     

     

    Filter hooks allow programmers to modify WordPress code that uses them, especially useful for Premium Themes that use their own custom data tables. This is advanced WordPress usage, so be careful. If you're familiar with filter hooks, you'll know to search the Video Blogster code for the 'apply_filters' function you want and hook them to your own code.

    Simple Code Snippet Examples :
    // If imported video has more than 10 'Likes' then open comments on the post to be created.
    function my_create_post_hook( $videoPost, $videoInfo ) {
            if ( $videoInfo['VideoLikes'] > 10 )
    		$videoPost['comment_status'] = 'open';
            return $videoPost;
    }
    add_filter( 'vbp_create_the_post', 'my_create_post_hook' );
    
    // don't create the post if video meets a certain condition
    function my_create_post_hook2( $videoPost, $videoInfo ) {
            if ( $videoInfo['VideoLikes'] < 10 )
    		return null;  // post will not be created
            return $videoPost;
    }
    add_filter( 'vbp_create_the_post', 'my_create_post_hook2' );