Changeset 706744
- Timestamp:
- 05/02/2013 02:50:34 AM (13 years ago)
- Location:
- fast-tube/trunk
- Files:
-
- 3 edited
-
fast-tube-gallery.php (modified) (6 diffs)
-
fast-tube.php (modified) (9 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fast-tube/trunk/fast-tube-gallery.php
r103632 r706744 9 9 global $wpdb; 10 10 $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__ ) ); 12 12 $limit = 5; 13 13 if(isset($_GET['vp'])) { $limit = $_GET['vp']; } … … 94 94 background: #fff; 95 95 margin-top: 10px; 96 margin-bottom: 10px; 96 97 padding: 10px; 97 98 text-align: justify; … … 111 112 <h2 style="float:left;">Video Gallery</h2> 112 113 <div style="float:right;"> 113 <form method="post" action=" <?php $PHP_SELF; ?>">114 <form method="post" action=""> 114 115 <select name="vp" onchange="form.submit();"> 115 116 <?php … … 135 136 <tbody> 136 137 <?php 137 $next = $_GET['next']? $_GET['next'] : 0;138 $next = isset($_GET['next']) ? $_GET['next'] : 0; 138 139 $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"); 139 140 $z = 1; $idcolor = ''; … … 179 180 · Created: <span class="sminf-o">'.$result->post_date.'</span> · Updated: <span class="sminf-o">'.$result->post_modified.'</span></div> 180 181 </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.'"> 182 183 <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" /> 183 184 </form> … … 198 199 </tfoot> 199 200 </table>'; 200 if( $_GET['next']) echo '<a style="float:left;padding:5px;text-decoration:none;" href="javascript:history.back()">← Prev '.$limit.' Videos</a> ';201 if(isset($_GET['next'])) echo '<a style="float:left;padding:5px;text-decoration:none;" href="javascript:history.back()">← Prev '.$limit.' Videos</a> '; 201 202 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 →</a>'; 202 203 -
fast-tube/trunk/fast-tube.php
r103628 r706744 4 4 Plugin URI: http://blog.caspie.net/2009/02/19/fast-tube-wordpress-plugin/ 5 5 Description: Fast and easy way to insert videos from YouTube right into your WordPress blog posts. 6 Version: 2.3 6 Version: 2.3.1 7 7 Author: Casper 8 8 Author URI: http://blog.caspie.net/ … … 11 11 function fast_youtube_content($the_content) { 12 12 $options = get_option('fast_tube_options'); 13 $ fullpath = trailingslashit(get_bloginfo('wpurl')) . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__));13 $skinspath = plugins_url( 'skins/', __FILE__ ); 14 14 $author = $options['author'] ? '<br /><small>Fast Tube by <a title="Casper\'s Blog" href="http://blog.caspie.net/">Casper</a></small>' : ''; 15 15 $align_class = $options['alignclass'] != '' ? ' class="'.$options['alignclass'].'"' : ''; … … 18 18 $thumb_dims = $options['thumbnail'] ? 'width="128" height="96"' : 'width="320" height="240"'; 19 19 $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" />' : ''; 22 22 $pat = "/\[(?:(?:http:\/\/)?(?:www\.)?youtube\.com\/)?(?:(?:watch\?)?v=|v\/)?([a-zA-Z0-9\-\_]{11})(?:&[a-zA-Z0-9\-\_]+=[a-zA-Z0-9\-\_]+)*\]/"; 23 23 if(preg_match_all($pat,$the_content,$matches,PREG_SET_ORDER)) { … … 27 27 if(@file_get_contents("http://gdata.youtube.com/feeds/api/videos/".$m1) != "Video not found") { 28 28 $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.' &hl=en&fs='.(int)$options['fullscreen'].'&border='.(int)$options['border'].'&color1=0x'.$options['color1'].'&color2=0x'.$options['color2'].'&egm='.(int)$options['egm'].'&disablekb='.(int)$options['disablekb'].'&autoplay='.$ap.'&loop='.(int)$options['loop'].'&rel='.(int)$options['related'].'&showinfo='.(int)$options['info'].'&showsearch='.(int)$options['search'].'&iv_load_policy='.$options['annotations'].'&start='.(int)$options['start'];29 $video = 'http://www.youtube.com/v/'.$m1.'?version=3&hl=en&fs='.(int)$options['fullscreen'].'&border='.(int)$options['border'].'&color1=0x'.$options['color1'].'&color2=0x'.$options['color2'].'&egm='.(int)$options['egm'].'&disablekb='.(int)$options['disablekb'].'&autoplay='.$ap.'&loop='.(int)$options['loop'].'&rel='.(int)$options['related'].'&showinfo='.(int)$options['info'].'&showsearch='.(int)$options['search'].'&iv_load_policy='.$options['annotations'].'&start='.(int)$options['start']; 30 30 if((!is_singular() && $options['thumb']) || is_feed()) { 31 31 $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]-->'; … … 43 43 add_action('admin_menu', 'fast_tube_menu'); 44 44 function 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' ); 48 48 } 49 49 function fast_tube_options() { … … 85 85 $div = $options['aligntag'] == 'div' ? ' selected="selected"' : ''; 86 86 $p = $options['aligntag'] == 'p' ? ' selected="selected"' : ''; 87 $small = $big = ''; 87 88 $thumbnail = $options['thumbnail'] ? $small = ' selected="selected"' : $big = ' selected="selected"'; 88 89 $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__ ) ); 90 91 ?> 91 92 <style type="text/css" media="screen"> … … 110 111 <input type="button" class="button" onclick="javascript:moreInfo('skins');" value="Fast Tube Skins" /> 111 112 <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="http s://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=R7HRD7C3JDDN8&lc=GB&item_name=WordPress%20Plugins%20by%20Casper&currency_code=EUR&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> 113 114 </div> 114 115 <div id="usage" class="info" style="display:none;"> … … 123 124 [v=gOAra5f0qlk]<br /> 124 125 [gOAra5f0qlk]<br /> 125 [http://www.youtube.com/watch?v=gOAra5f0qlk&feature=related] will work too!<br />126 126 </small></div> 127 127 </div> … … 385 385 } 386 386 add_filter('the_excerpt', 'fast_tube_excerpt'); 387 define('FAST_TUBE_VERSION','2.3 ');387 define('FAST_TUBE_VERSION','2.3.1'); 388 388 ?> -
fast-tube/trunk/readme.txt
r103628 r706744 4 4 Tags: YouTube, video, videos, clip, clips, insert, post, page, thumbs, skins, gallery 5 5 Requires at least: 2.6 6 Tested up to: 2.7.17 Stable tag: 2.3 6 Tested up to: 3.5.1 7 Stable tag: 2.3.1 8 8 9 9 Fast and easy way to insert videos from YouTube right into your WordPress blog posts or pages. … … 84 84 == Changelog == 85 85 86 Version: 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 86 94 Version: 2.3 (20 Mar 2009) 87 95
Note: See TracChangeset
for help on using the changeset viewer.