Changeset 451514
- Timestamp:
- 10/16/2011 05:29:26 AM (14 years ago)
- Location:
- mobileme-movie/trunk
- Files:
-
- 16 added
- 2 edited
-
class-mobileme-movie-admin.php (added)
-
class-mobileme-movie-install.php (added)
-
class-mobileme-movie-shortcode.php (added)
-
class-mobileme-movie.php (added)
-
css (added)
-
css/admin.css (added)
-
css/style.css (added)
-
images (added)
-
images/logo.png (added)
-
js (added)
-
js/admin.js (added)
-
js/script.js (added)
-
languages (added)
-
languages/mobileme-movie.pot (added)
-
mobileme-movie.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
rename (added)
-
uninstall.php (added)
Legend:
- Unmodified
- Added
- Removed
-
mobileme-movie/trunk/mobileme-movie.php
r412115 r451514 2 2 /* 3 3 Plugin Name: MobileMe Movie 4 Plugin URI: http://www.evolonix.com/wordpress/plugins/mobileme-movie /4 Plugin URI: http://www.evolonix.com/wordpress/plugins/mobileme-movie 5 5 Description: This plugin allows you to insert a movie you have hosted on your MobileMe Gallery's website in your post or page. Use [mobileme url="http://gallery.me.com/appleid#albumid/moviename" type="m4v or mov" width="width" height="height"] to insert the movie. The easiest way to get the "url" is to copy it from your browser's address bar when viewing the movie on the Gallery's site. The "type" attribute is optional if the movie is an .m4v file, which it uses by default, but required for .mov files. If it doesn't work without specifying the "type" attribute, then try adding it with the "mov" value. The "width" and "height" attributes are optional and default to width="640" and height="360". If one is specified, the other must be also, otherwise it uses the defaults. 6 Version: 1. 16 Version: 1.2 7 7 Author: Evolonix 8 8 Author URI: http://www.evolonix.com 9 9 License: GPL2 10 Text Domain: mobileme-movie 10 11 */ 11 12 ?> … … 29 30 <?php 30 31 31 if ( ! function_exists( 'get_mobileme_movie' ) ) : 32 // Install 33 // NOTE: References shortcode. 34 require_once(plugin_dir_path(__FILE__) . 'class-mobileme-movie-install.php'); 35 register_activation_hook(__FILE__, array('MobileMe_Movie_Install', 'activate')); 36 register_deactivation_hook(__FILE__, array('MobileMe_Movie_Install', 'deactivate')); 32 37 33 function get_mobileme_movie($atts) { 34 $url = $atts["url"]; 35 $type = $atts["type"]; 36 if ( ! isset( $type ) ) { 37 $type = 'm4v'; 38 } 39 $width = $atts["width"]; 40 $height = $atts["height"]; 41 if ( ! isset( $width ) || ! isset( $height ) ) { 42 $width = '640'; 43 $height = '360'; 44 } 45 46 $url = str_replace('#', '/', $url); 47 $url = stristr($url, "&bgcolor=", true); 48 49 $content = '<object id="GalleryMovie" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" width="' . $width . '" height="' . $height . '" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" class=""><param value="' . $url . '/video.' . $type . '" name="src"><object type="video/quicktime" data="' . $url . '/video.' . $type . '" id="GalleryMovieInner" width="' . $width . '" height="' . $height . '" class=""><param value="false" name="autoplay"><param value="true" name="controller"><param value="true" name="cache"><param value="false" name="kioskmode"><param value="false" name="showlogo"><param value="aspect" name="scale"><param value="true" name="saveembedtags"></object><param value="false" name="autoplay"><param value="true" name="controller"><param value="true" name="cache"><param value="false" name="kioskmode"><param value="false" name="showlogo"><param value="aspect" name="scale"><param value="true" name="saveembedtags"></object>'; 50 return $content; 51 } 38 // I18n 39 add_action('init', function() { load_plugin_textdomain('mobileme-movie', false, basename(dirname(__FILE__)) . '/languages'); }); 52 40 53 endif; //get_mobileme_movie 41 // Admin 42 require_once(plugin_dir_path(__FILE__) . 'class-mobileme-movie-admin.php'); 43 $mobileme_movie_admin = new MobileMe_Movie_Admin(); 44 add_action('admin_init', array(&$mobileme_movie_admin, 'init')); 45 add_action('wp_before_admin_bar_render', array(&$mobileme_movie_admin, 'before_admin_bar_render')); // (optional) 54 46 55 add_shortcode('mobileme', 'get_mobileme_movie'); 47 // Front-end (optional) 48 require_once(plugin_dir_path(__FILE__) . 'class-mobileme-movie.php'); 49 $mobileme_movie = new MobileMe_Movie(); 50 add_action('plugins_loaded', array(&$mobileme_movie, 'init')); 51 52 // Shortcode (optional) 53 require_once(plugin_dir_path(__FILE__) . 'class-mobileme-movie-shortcode.php'); 54 $mobileme_movie_shortcode = new MobileMe_Movie_Shortcode(); 55 add_shortcode('mobileme', array(&$mobileme_movie_shortcode, 'content')); 56 56 57 ?> -
mobileme-movie/trunk/readme.txt
r412115 r451514 18 18 19 19 1. Upload `mobileme-movie` to the `/wp-content/plugins/` directory 20 2. Activate the plugin through the 'Plugins' menu in WordPress 21 3. Place `[mobileme url="http://gallery.me.com/appleid#albumid/moviename" type="m4v or mov" width="width" height="height"]` in your posts or pages wherever you want the movie to display. 20 1. Activate the plugin through the 'Plugins' menu in WordPress 21 1. Place `[mobileme url="http://gallery.me.com/appleid#albumid/moviename" type="m4v or mov" width="width" height="height"]` in your posts or pages wherever you want the movie to display. 22 23 == Frequently Asked Questions == 24 25 26 27 == Screenshots == 28 29 22 30 23 31 == Changelog == 32 33 = 1.2 = 34 * Fixed a bug where an error may have occurred if the type, width, or height attributes were not specified. 24 35 25 36 = 1.1 = … … 28 39 == Upgrade Notice == 29 40 41 = 1.2 = 42 Upgrade to this version if you are trying to use the shortcode without a type, width, or height specified. Previous versions may have resulted in an error if any of the mentioned attributes were not provided. 43 30 44 = 1.1 = 31 45 You should upgrade from 1.0 so that it is easier to understand what movie you are specifying. Before, where you would have specified [mobileme url:the_url] you now write it like [mobileme url="the_url"]. Much more cleaner and easier to read. You also had to specify &type=mov in the url before, where you now specify it in an attribute like type="mov". 46 47 == Arbitrary section == 48
Note: See TracChangeset
for help on using the changeset viewer.