Plugin Directory

Changeset 706744


Ignore:
Timestamp:
05/02/2013 02:50:34 AM (13 years ago)
Author:
Caspie
Message:

Trunk version 2.3.1 for urgent fixes. Major update is on the way.

Location:
fast-tube/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fast-tube/trunk/fast-tube-gallery.php

    r103632 r706744  
    99    global $wpdb;   
    1010    $pattern = "/\[(?:(?:http:\/\/)?(?:www\.)?youtube\.com\/)?(?:(?:watch\?)?v=|v\/)?([a-zA-Z0-9\-\_]{11})(?:&[a-zA-Z0-9\-\_]+=[a-zA-Z0-9\-\_]+)*\]/";
    11     $path = defined('WP_PLUGIN_URL') ? trailingslashit(WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__))) : trailingslashit(get_bloginfo('wpurl')) . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__));
     11    $path = trailingslashit( plugins_url( '', __FILE__ ) );
    1212    $limit = 5;
    1313    if(isset($_GET['vp'])) { $limit = $_GET['vp']; }
     
    9494    background: #fff;
    9595    margin-top: 10px;
     96    margin-bottom: 10px;
    9697    padding: 10px;
    9798    text-align: justify;
     
    111112    <h2 style="float:left;">Video Gallery</h2>
    112113        <div style="float:right;">
    113     <form method="post" action="<?php $PHP_SELF; ?>">
     114    <form method="post" action="">
    114115        <select name="vp" onchange="form.submit();">
    115116        <?php
     
    135136        <tbody>
    136137<?php
    137     $next = $_GET['next'] ? $_GET['next'] : 0;
     138    $next = isset($_GET['next']) ? $_GET['next'] : 0;
    138139    $results = $wpdb->get_results("SELECT id,post_date,post_modified,post_title,post_content,post_type from $wpdb->posts WHERE post_type = 'post' OR post_type = 'page' ORDER by post_date DESC LIMIT $next,18446744073709551615");
    139140    $z = 1; $idcolor = '';
     
    179180                            &middot; Created: <span class="sminf-o">'.$result->post_date.'</span> &middot; Updated: <span class="sminf-o">'.$result->post_modified.'</span></div>
    180181                            </td><td>
    181                             <form class="idch" name="videoaction" method="post" action="'.$PHP_SELF.'#'.$result->id.'">
     182                            <form class="idch" name="videoaction" method="post" action="#'.$result->id.'">
    182183                            <input class="smin"'.$idcolor.' type="text" name="vid" maxlength="11" value="'.$m1.'" /><input type="hidden" value="'.$result->id.'" name="postid" /><input type="hidden" value="['.$m0.']" name="addedas" /><input type="hidden" value="'.$m1.'" name="videoid" /><br /><input name="check" class="ftbutton" type="submit" value="Check" /><input name="change" class="ftbutton" type="submit" value="Change" /><input name="remove" class="ftbutton" type="submit" value="Remove" />
    183184                            </form>
     
    198199            </tfoot>   
    199200        </table>';
    200         if($_GET['next']) echo '<a style="float:left;padding:5px;text-decoration:none;" href="javascript:history.back()">&larr; Prev '.$limit.' Videos</a> ';
     201        if(isset($_GET['next'])) echo '<a style="float:left;padding:5px;text-decoration:none;" href="javascript:history.back()">&larr; Prev '.$limit.' Videos</a> ';
    201202        if($i > $limit) echo '<a style="float:right;padding:5px;text-decoration:none;" href="admin.php?page=fast-tube/fast-tube-gallery.php&next='.$next.'&vp='.$limit.'">Next '.$limit.' Videos &rarr;</a>';
    202203
  • fast-tube/trunk/fast-tube.php

    r103628 r706744  
    44Plugin URI: http://blog.caspie.net/2009/02/19/fast-tube-wordpress-plugin/
    55Description: Fast and easy way to insert videos from YouTube right into your WordPress blog posts.
    6 Version: 2.3
     6Version: 2.3.1
    77Author: Casper
    88Author URI: http://blog.caspie.net/
     
    1111function fast_youtube_content($the_content) {
    1212    $options = get_option('fast_tube_options');
    13     $fullpath = trailingslashit(get_bloginfo('wpurl')) . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__));
     13    $skinspath = plugins_url( 'skins/', __FILE__ );
    1414    $author = $options['author'] ? '<br /><small>Fast Tube by <a title="Casper\'s Blog" href="http://blog.caspie.net/">Casper</a></small>' : '';
    1515    $align_class = $options['alignclass'] != '' ? ' class="'.$options['alignclass'].'"' : '';
     
    1818    $thumb_dims = $options['thumbnail'] ? 'width="128" height="96"' : 'width="320" height="240"';
    1919    $thumb_size = $options['thumbnail'] ? 'small' : 'big';
    20     $top = $options['skins'] ? '<img src="'.$fullpath.'/skins/'.$options['skin'].'/top_'.$thumb_size.'.png" border="0" /><br />' : '';
    21     $bottom = $options['skins'] ? '<br /><img src="'.$fullpath.'/skins/'.$options['skin'].'/bottom_'.$thumb_size.'.png" border="0" />' : '';
     20    $top = $options['skins'] ? '<img src="'.$skinspath.$options['skin'].'/top_'.$thumb_size.'.png" border="0" /><br />' : '';
     21    $bottom = $options['skins'] ? '<br /><img src="'.$skinspath.$options['skin'].'/bottom_'.$thumb_size.'.png" border="0" />' : '';
    2222    $pat = "/\[(?:(?:http:\/\/)?(?:www\.)?youtube\.com\/)?(?:(?:watch\?)?v=|v\/)?([a-zA-Z0-9\-\_]{11})(?:&[a-zA-Z0-9\-\_]+=[a-zA-Z0-9\-\_]+)*\]/";
    2323    if(preg_match_all($pat,$the_content,$matches,PREG_SET_ORDER)) {
     
    2727            if(@file_get_contents("http://gdata.youtube.com/feeds/api/videos/".$m1) != "Video not found") {
    2828            $align_before = $options['align'] ? '<'.$options['aligntag'].' id="'.$m1.'"'.$align_class.' style="text-align:'.$options['alignment'].';'.$align_display.'">' : '<span id="'.$m1.'" style="display:block;">';
    29             $video = 'http://www.youtube.com/v/'.$m1.'&amp;hl=en&amp;fs='.(int)$options['fullscreen'].'&amp;border='.(int)$options['border'].'&amp;color1=0x'.$options['color1'].'&amp;color2=0x'.$options['color2'].'&amp;egm='.(int)$options['egm'].'&amp;disablekb='.(int)$options['disablekb'].'&amp;autoplay='.$ap.'&amp;loop='.(int)$options['loop'].'&amp;rel='.(int)$options['related'].'&amp;showinfo='.(int)$options['info'].'&amp;showsearch='.(int)$options['search'].'&amp;iv_load_policy='.$options['annotations'].'&amp;start='.(int)$options['start'];
     29            $video = 'http://www.youtube.com/v/'.$m1.'?version=3&amp;hl=en&amp;fs='.(int)$options['fullscreen'].'&amp;border='.(int)$options['border'].'&amp;color1=0x'.$options['color1'].'&amp;color2=0x'.$options['color2'].'&amp;egm='.(int)$options['egm'].'&amp;disablekb='.(int)$options['disablekb'].'&amp;autoplay='.$ap.'&amp;loop='.(int)$options['loop'].'&amp;rel='.(int)$options['related'].'&amp;showinfo='.(int)$options['info'].'&amp;showsearch='.(int)$options['search'].'&amp;iv_load_policy='.$options['annotations'].'&amp;start='.(int)$options['start'];
    3030                if((!is_singular() && $options['thumb']) || is_feed()) {
    3131                    $vid = '<!--[Fast Tube]-->'.$align_before.$top.'<a title="Click here to watch this video!" href="'.get_permalink().'#'.$m1.'"><img src="http://i.ytimg.com/vi/'.$m1.'/'.(int)$options['thumbnail'].'.jpg" alt="Fast Tube" border="0" '.$thumb_dims.' /></a>'.$bottom.$author.$align_after.'<!--[/Fast Tube]-->';
     
    4343add_action('admin_menu', 'fast_tube_menu');
    4444function fast_tube_menu() {
    45     add_menu_page('Fast Tube', 'Fast Tube', 8, __FILE__, 'fast_tube_options', plugins_url('fast-tube/img/ft.gif'));
    46     add_submenu_page(__FILE__, 'Fast Tube Video Options', 'Video Options', 8, __FILE__, 'fast_tube_options');
    47     add_submenu_page(__FILE__, 'Fast Tube Video Gallery', 'Video Gallery', 8, 'fast-tube/fast-tube-gallery.php');
     45    add_menu_page( 'Fast Tube', 'Fast Tube', 'manage_options', __FILE__, 'fast_tube_options', plugins_url( 'img/ft.gif', __FILE__ ) );
     46    add_submenu_page( __FILE__, 'Fast Tube Video Options', 'Video Options', 'manage_options', __FILE__, 'fast_tube_options' );
     47    add_submenu_page( __FILE__, 'Fast Tube Video Gallery', 'Video Gallery', 'manage_options', dirname( __FILE__ ) . '/fast-tube-gallery.php' );
    4848}
    4949function fast_tube_options() {
     
    8585    $div = $options['aligntag'] == 'div' ? ' selected="selected"' : '';
    8686    $p = $options['aligntag'] == 'p' ? ' selected="selected"' : '';
     87    $small = $big = '';
    8788    $thumbnail = $options['thumbnail'] ? $small = ' selected="selected"' : $big = ' selected="selected"';
    8889    $default = $options['skin'] == 'default' ? ' selected="selected"' : '';
    89     $path = defined('WP_PLUGIN_URL') ? trailingslashit(WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__))) : trailingslashit(get_bloginfo('wpurl')) . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__));
     90    $path = trailingslashit( plugins_url( '', __FILE__ ) );
    9091?>
    9192<style type="text/css" media="screen">
     
    110111    <input type="button" class="button" onclick="javascript:moreInfo('skins');" value="Fast Tube Skins" />
    111112    <div id="information" class="info" style="display:none;">
    112         <div><small><strong>Check out my other WordPress plugins at <a title="Downloads @ Casper's Blog" href="http://blog.caspie.net/downloads/">http://blog.caspie.net/downloads</a><br />Nice plugin eh? Feel free to <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=R7HRD7C3JDDN8&amp;lc=GB&amp;item_name=WordPress%20Plugins%20by%20Casper&amp;currency_code=EUR&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG_global%2egif%3aNonHosted" target="_blank">donate</a> if you like it. Thanks and have fun! :)</strong></small></div>
     113        <div><small><strong>Check out my other WordPress plugins at <a title="Downloads @ Casper's Blog" href="http://blog.caspie.net/downloads/">http://blog.caspie.net/downloads</a><br />Nice plugin eh? Feel free to <a href="http://donate.caspie.net/" target="_blank">donate</a> if you like it. Thanks and have fun! :)</strong></small></div>
    113114    </div>
    114115    <div id="usage" class="info" style="display:none;">
     
    123124        [v=gOAra5f0qlk]<br />
    124125        [gOAra5f0qlk]<br />
    125         [http://www.youtube.com/watch?v=gOAra5f0qlk&amp;feature=related] will work too!<br />
    126126        </small></div>
    127127    </div>
     
    385385}
    386386add_filter('the_excerpt', 'fast_tube_excerpt');
    387 define('FAST_TUBE_VERSION','2.3');
     387define('FAST_TUBE_VERSION','2.3.1');
    388388?>
  • fast-tube/trunk/readme.txt

    r103628 r706744  
    44Tags: YouTube, video, videos, clip, clips, insert, post, page, thumbs, skins, gallery
    55Requires at least: 2.6
    6 Tested up to: 2.7.1
    7 Stable tag: 2.3
     6Tested up to: 3.5.1
     7Stable tag: 2.3.1
    88
    99Fast and easy way to insert videos from YouTube right into your WordPress blog posts or pages.
     
    8484== Changelog ==
    8585
     86Version: 2.3.1 (2 May 2013)
     87
     88 * This is a trunk version for urgent fixes
     89 * Fixed autoplay issue
     90 * Fixed various warnings and notices
     91 * Fixed some depricated code
     92
     93
    8694Version: 2.3 (20 Mar 2009)
    8795
Note: See TracChangeset for help on using the changeset viewer.