Invoking TubePress on your site is really easy! It's done slightly differently depending on where you'll be using TubePress, so follow the instructions below that match your environment. In all cases, however, you'll be using a TubePress shortcode.
TubePress shortcodes are small snippets of text that give you complete control over what TubePress will output to your users. You should definitely check out the TubePress Shortcode Reference.
Follow these instructions to use TubePress (free version or Pro version) in WordPress posts and/or pages. Make sure TubePress is enabled from WP Admin > Plugins, then just type in a WordPress post and/or page. When a user visits this post/page, TubePress will replace your shortcode with some HTML content (a single video or a gallery). You may notice that TubePress shortcodes are very similar to WordPress shortcodes, but with some slight syntactical differences.
The options in Settings > TubePress are the global options for TubePress; i.e. if you type [tubepress] and nothing else, these options will be used. The real power of the plugin lies in the ability to be invoked in unique ways on multiple posts and pages. This is done with, like everything else in TubePress, with shortcodes. For example, say on one page you want to display a gallery of YouTube videos that are tagged with "football", want 15 videos per page, and want to play the videos in an HTML poupup window. On this page, you would type
on the page where you want the gallery to show up. And say on another page you want to display a different gallery with the default (global) options that were set in Settings > TubePress. On this page you would type
where you wanted the gallery to show up. Follow this procedure for unlimited galleries on unlimited posts/pages. Just use any TubePress shortcode to control the gallery content.
Follow these instructions to use TubePress (Pro version only) outside of the WordPress Loop (i.e. in your WordPress templates). The code snippet below shows the world's simplest WordPress template with TubePress Pro added. As you can see by the highlighted lines below, there are only 2 steps:
tubepress-pro.php). An absolute path works best.getHtmlForShortcode static function takes a single string parameter which is any valid TubePress shortcode. It returns the HTML output of TubePress. You may repeat this function call as many times as you like.Follow these instructions to use TubePress (Pro version only) in any PHP5 environment. As you can see by the highlighted lines of the PHP file below, there are only four steps:
tubepress_base_url to the web-accessible URL of your TubePress Pro installation.TubePressPro.class.php). An absolute path works best.false for this parameter.getHtmlForShortcode function takes a single string parameter which is any valid TubePress shortcode It returns the HTML output of TubePress. You may repeat this function call as many times as you like.