Changeset 1369929
- Timestamp:
- 03/12/2016 09:20:43 PM (10 years ago)
- Location:
- skip-to-timestamp
- Files:
-
- 5 edited
- 4 copied
-
. (modified) (1 prop)
-
tags/1.2 (copied) (copied from skip-to-timestamp/trunk)
-
tags/1.2/js (copied) (copied from skip-to-timestamp/trunk/js)
-
tags/1.2/js/skiptotimestamp.js (modified) (1 diff)
-
tags/1.2/readme.txt (copied) (copied from skip-to-timestamp/trunk/readme.txt) (4 diffs)
-
tags/1.2/skiptotimestamp.php (copied) (copied from skip-to-timestamp/trunk/skiptotimestamp.php) (8 diffs)
-
trunk/js/skiptotimestamp.js (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/skiptotimestamp.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
skip-to-timestamp
-
Property
svn:ignore
set to
trunk/.git
trunk/.gitignore
-
Property
svn:ignore
set to
-
skip-to-timestamp/tags/1.2/js/skiptotimestamp.js
r986462 r1369929 35 35 } 36 36 37 if ((parseInt(STT.settings.link_audio) && audio.length) || 38 (parseInt(STT.settings.link_video) && video.length)) 37 if ((parseInt(STT.settings.link_audio) && audio.length) || 38 (parseInt(STT.settings.link_video) && video.length)) 39 39 { 40 40 STT.doSkip = STT.doHTML5Skip; -
skip-to-timestamp/tags/1.2/readme.txt
r1048727 r1369929 1 1 === Plugin Name === 2 2 Contributors: doytch 3 Donate link: http s://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mark%2edeutsch%40utoronto%2eca&lc=US&item_name=Coffee%20Donation%20%3d%29&amount=10%2e00¤cy_code=USD&button_subtype=services&bn=PP%2dBuyNowBF%3abtn_buynowCC_LG%2egif%3aNonHosted3 Donate link: http://qedev.com/ 4 4 Tags: audio, embed, html5, media, plugin, shortcode, video, youtube 5 5 Requires at least: 3.0.1 6 Tested up to: 4. 17 Stable tag: 1. 16 Tested up to: 4.5 7 Stable tag: 1.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 33 33 You don't really need to do anything special to install this plugin. Just: 34 34 35 1. Download using the button above, unzip and place the folder in your wp-content/plugins/ folder. Alternately, 35 1. Download using the button above, unzip and place the folder in your wp-content/plugins/ folder. Alternately, 36 36 install using Wordpress' built-in plugin installer. 37 37 1. Activate the plugin through the Plugins menu in WordPress … … 42 42 If it adds an <audio> or <video> tag, then maybe. The plugin uses the currentTime parameter of those elements 43 43 to set the location to skip to. If you open your browsers developer console and see a message saying 44 'Skip to Timestamp: No media player found!', then that player isn't currently supported. I'd like to help you 45 though, so please submit a request for that player on the Wordpress plugin page. It's the only way I know 46 which players to prioritise! 44 'Skip to Timestamp: No media player found!', then that player isn't currently supported. I'd like to help you 45 though, so please submit a request for that player on the Wordpress plugin page. It's the only way I know 46 which players to prioritise! 47 47 48 48 = Can I use both shortcodes and automatically-replaced timestamps? = 49 Yes, as long as you don't use both in the same post. Each post can contain either shortcodes OR timestamps to 49 Yes, as long as you don't use both in the same post. Each post can contain either shortcodes OR timestamps to 50 50 auto-replace. If both are present, then timestamps will not be automatically replaced. 51 51 52 52 = It's not working! = 53 Please leave me a message with information about the media you embedded, how you tried to create the link, and what 53 Please leave me a message with information about the media you embedded, how you tried to create the link, and what 54 54 browser and operating system you're running. If it's a bug, I'll get right to work on it! 55 55 … … 60 60 == Changelog == 61 61 62 = 1.2 = 63 * Added ability to turn off automatic linking on a per-page basis. 64 62 65 = 1.1 = 63 * Fixed array return-and-reference for old PHP versions.66 * Support for older versions of WordPress 64 67 65 68 = 1.0 = -
skip-to-timestamp/tags/1.2/skiptotimestamp.php
r1024277 r1369929 4 4 Plugin URI: http://qedev.com 5 5 Description: Adds clickable timestamps via shortcode or search-and-replace that skip to a time in a media player. 6 Version: 1. 06 Version: 1.2 7 7 Author: Mark Hurst Deutsch 8 8 Author URI: http://qedev.com … … 90 90 function qed_stt_create_menu() { 91 91 add_options_page( 92 'Skip to Timestamp', 93 'Skip to Timestamp', 92 'Skip to Timestamp', 93 'Skip to Timestamp', 94 94 'manage_options', 95 95 'skiptotimestamp', … … 188 188 if ($link_video) echo ' checked '; 189 189 echo "/>Skip to timestamp in video embedded with the [video] shortcode or <video> HTML5 tag."; 190 190 191 191 } 192 192 … … 220 220 } 221 221 222 /* --- Metaboxes --- */ 223 add_action( 'add_meta_boxes', 'qed_stt_add_metabox' ); 224 add_action( 'save_post', 'qed_stt_save_metabox'); 225 add_action( 'wp_ajax_qed_stt_ajax_get_page_settings', 'qed_stt_get_page_settings'); 226 227 /** 228 * Register the metabox 229 * 230 */ 231 function qed_stt_add_metabox($post_type) { 232 $screens = array( 'post', 'page'); 233 234 foreach ($screens as $screen) { 235 add_meta_box( 236 'stt_post_mb', 237 __('Skip to Timestamp Configuration', 'stt'), 238 'qed_stt_create_metabox', 239 $screen, 240 'normal', 241 'high' 242 ); 243 } 244 } 245 246 function qed_stt_create_metabox($post) { 247 wp_nonce_field('qed_stt_post_mb', 'qed_stt_post_mb_nonce'); 248 249 ?> 250 <table id='qed-stt-mb-table' class='form-table'> 251 <tr valign='top'> 252 <th scope='row'><?php _e('Disable Automatic Links'); ?></th> 253 <td> 254 <input type='checkbox' id='qed-stt-disable-auto-link' name='qed-stt-disable-auto-link' valu 255 <?php echo get_post_meta(get_the_ID(), 'qed-stt-disable-auto-link', true) ? 'checked' : '' ?> 256 /> 257 </td> 258 </tr> 259 </table> 260 <?php 261 } 262 263 function qed_stt_save_metabox($post_id) { 264 // Verify the nonce to ensure we're getting called from the right spot. 265 if (!isset($_POST['qed_stt_post_mb_nonce'])) { 266 return $post_id; 267 } 268 $nonce = $_POST['qed_stt_post_mb_nonce']; 269 if (!wp_verify_nonce($nonce, 'qed_stt_post_mb')) { 270 return $post_id; 271 } 272 273 update_post_meta($post_id, 'qed-stt-disable-auto-link', isset($_POST['qed-stt-disable-auto-link'])); 274 } 275 222 276 /* --- Automatic Hyperlinking --- */ 223 277 add_action('plugins_loaded', 'qed_stt_loaded'); … … 228 282 add_action('wp_enqueue_scripts', 'qed_stt_enqueue_scripts'); 229 283 function qed_stt_enqueue_scripts() { 284 wp_enqueue_style( 'thickbox'); 230 285 wp_enqueue_script('qed-stt-youtube', 'https://www.youtube.com/iframe_api'); 231 286 wp_enqueue_script('qed-stt-js', plugin_dir_url(__FILE__).'/js/skiptotimestamp.js'); … … 235 290 236 291 function qed_stt_hyperlink_timestamps($content) { 237 // Don't autolink if it's turned off. 292 // Don't autolink if it's turned off. 238 293 $options = get_option('qed_stt_settings'); 239 294 if (!$options['auto_replace_ts']) { … … 244 299 return $content; 245 300 } 301 // Don't autolink if they've turned off autolinking for this page. 302 if (get_post_meta(get_the_ID(), 'qed-stt-disable-auto-link', true)) { 303 return $content; 304 } 305 246 306 // Don't allow shortcodes and autolinks in the same post 247 307 if (qed_stt_post_has_shortcode()) { … … 250 310 251 311 $content = preg_replace( 252 "/(?:(?:(?<hh>\d{1,2})[:.])?(?<mm>\d{1,2})[:.])(?<ss>\d{1,2})/", 253 '<a href="javascript:void(0)" class="qed_stt_tslink" onclick="STTSkipTo(\'$0\')">$0</a>', 312 "/(?:(?:(?<hh>\d{1,2})[:.])?(?<mm>\d{1,2})[:.])(?<ss>\d{1,2})/", 313 '<a href="javascript:void(0)" class="qed_stt_tslink" onclick="STTSkipTo(\'$0\')">$0</a>', 254 314 $content 255 315 ); -
skip-to-timestamp/trunk/js/skiptotimestamp.js
r986462 r1369929 35 35 } 36 36 37 if ((parseInt(STT.settings.link_audio) && audio.length) || 38 (parseInt(STT.settings.link_video) && video.length)) 37 if ((parseInt(STT.settings.link_audio) && audio.length) || 38 (parseInt(STT.settings.link_video) && video.length)) 39 39 { 40 40 STT.doSkip = STT.doHTML5Skip; -
skip-to-timestamp/trunk/readme.txt
r1048727 r1369929 1 1 === Plugin Name === 2 2 Contributors: doytch 3 Donate link: http s://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mark%2edeutsch%40utoronto%2eca&lc=US&item_name=Coffee%20Donation%20%3d%29&amount=10%2e00¤cy_code=USD&button_subtype=services&bn=PP%2dBuyNowBF%3abtn_buynowCC_LG%2egif%3aNonHosted3 Donate link: http://qedev.com/ 4 4 Tags: audio, embed, html5, media, plugin, shortcode, video, youtube 5 5 Requires at least: 3.0.1 6 Tested up to: 4. 17 Stable tag: 1. 16 Tested up to: 4.5 7 Stable tag: 1.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 33 33 You don't really need to do anything special to install this plugin. Just: 34 34 35 1. Download using the button above, unzip and place the folder in your wp-content/plugins/ folder. Alternately, 35 1. Download using the button above, unzip and place the folder in your wp-content/plugins/ folder. Alternately, 36 36 install using Wordpress' built-in plugin installer. 37 37 1. Activate the plugin through the Plugins menu in WordPress … … 42 42 If it adds an <audio> or <video> tag, then maybe. The plugin uses the currentTime parameter of those elements 43 43 to set the location to skip to. If you open your browsers developer console and see a message saying 44 'Skip to Timestamp: No media player found!', then that player isn't currently supported. I'd like to help you 45 though, so please submit a request for that player on the Wordpress plugin page. It's the only way I know 46 which players to prioritise! 44 'Skip to Timestamp: No media player found!', then that player isn't currently supported. I'd like to help you 45 though, so please submit a request for that player on the Wordpress plugin page. It's the only way I know 46 which players to prioritise! 47 47 48 48 = Can I use both shortcodes and automatically-replaced timestamps? = 49 Yes, as long as you don't use both in the same post. Each post can contain either shortcodes OR timestamps to 49 Yes, as long as you don't use both in the same post. Each post can contain either shortcodes OR timestamps to 50 50 auto-replace. If both are present, then timestamps will not be automatically replaced. 51 51 52 52 = It's not working! = 53 Please leave me a message with information about the media you embedded, how you tried to create the link, and what 53 Please leave me a message with information about the media you embedded, how you tried to create the link, and what 54 54 browser and operating system you're running. If it's a bug, I'll get right to work on it! 55 55 … … 60 60 == Changelog == 61 61 62 = 1.2 = 63 * Added ability to turn off automatic linking on a per-page basis. 64 62 65 = 1.1 = 63 * Fixed array return-and-reference for old PHP versions.66 * Support for older versions of WordPress 64 67 65 68 = 1.0 = -
skip-to-timestamp/trunk/skiptotimestamp.php
r1024277 r1369929 4 4 Plugin URI: http://qedev.com 5 5 Description: Adds clickable timestamps via shortcode or search-and-replace that skip to a time in a media player. 6 Version: 1. 06 Version: 1.2 7 7 Author: Mark Hurst Deutsch 8 8 Author URI: http://qedev.com … … 90 90 function qed_stt_create_menu() { 91 91 add_options_page( 92 'Skip to Timestamp', 93 'Skip to Timestamp', 92 'Skip to Timestamp', 93 'Skip to Timestamp', 94 94 'manage_options', 95 95 'skiptotimestamp', … … 188 188 if ($link_video) echo ' checked '; 189 189 echo "/>Skip to timestamp in video embedded with the [video] shortcode or <video> HTML5 tag."; 190 190 191 191 } 192 192 … … 220 220 } 221 221 222 /* --- Metaboxes --- */ 223 add_action( 'add_meta_boxes', 'qed_stt_add_metabox' ); 224 add_action( 'save_post', 'qed_stt_save_metabox'); 225 add_action( 'wp_ajax_qed_stt_ajax_get_page_settings', 'qed_stt_get_page_settings'); 226 227 /** 228 * Register the metabox 229 * 230 */ 231 function qed_stt_add_metabox($post_type) { 232 $screens = array( 'post', 'page'); 233 234 foreach ($screens as $screen) { 235 add_meta_box( 236 'stt_post_mb', 237 __('Skip to Timestamp Configuration', 'stt'), 238 'qed_stt_create_metabox', 239 $screen, 240 'normal', 241 'high' 242 ); 243 } 244 } 245 246 function qed_stt_create_metabox($post) { 247 wp_nonce_field('qed_stt_post_mb', 'qed_stt_post_mb_nonce'); 248 249 ?> 250 <table id='qed-stt-mb-table' class='form-table'> 251 <tr valign='top'> 252 <th scope='row'><?php _e('Disable Automatic Links'); ?></th> 253 <td> 254 <input type='checkbox' id='qed-stt-disable-auto-link' name='qed-stt-disable-auto-link' valu 255 <?php echo get_post_meta(get_the_ID(), 'qed-stt-disable-auto-link', true) ? 'checked' : '' ?> 256 /> 257 </td> 258 </tr> 259 </table> 260 <?php 261 } 262 263 function qed_stt_save_metabox($post_id) { 264 // Verify the nonce to ensure we're getting called from the right spot. 265 if (!isset($_POST['qed_stt_post_mb_nonce'])) { 266 return $post_id; 267 } 268 $nonce = $_POST['qed_stt_post_mb_nonce']; 269 if (!wp_verify_nonce($nonce, 'qed_stt_post_mb')) { 270 return $post_id; 271 } 272 273 update_post_meta($post_id, 'qed-stt-disable-auto-link', isset($_POST['qed-stt-disable-auto-link'])); 274 } 275 222 276 /* --- Automatic Hyperlinking --- */ 223 277 add_action('plugins_loaded', 'qed_stt_loaded'); … … 228 282 add_action('wp_enqueue_scripts', 'qed_stt_enqueue_scripts'); 229 283 function qed_stt_enqueue_scripts() { 284 wp_enqueue_style( 'thickbox'); 230 285 wp_enqueue_script('qed-stt-youtube', 'https://www.youtube.com/iframe_api'); 231 286 wp_enqueue_script('qed-stt-js', plugin_dir_url(__FILE__).'/js/skiptotimestamp.js'); … … 235 290 236 291 function qed_stt_hyperlink_timestamps($content) { 237 // Don't autolink if it's turned off. 292 // Don't autolink if it's turned off. 238 293 $options = get_option('qed_stt_settings'); 239 294 if (!$options['auto_replace_ts']) { … … 244 299 return $content; 245 300 } 301 // Don't autolink if they've turned off autolinking for this page. 302 if (get_post_meta(get_the_ID(), 'qed-stt-disable-auto-link', true)) { 303 return $content; 304 } 305 246 306 // Don't allow shortcodes and autolinks in the same post 247 307 if (qed_stt_post_has_shortcode()) { … … 250 310 251 311 $content = preg_replace( 252 "/(?:(?:(?<hh>\d{1,2})[:.])?(?<mm>\d{1,2})[:.])(?<ss>\d{1,2})/", 253 '<a href="javascript:void(0)" class="qed_stt_tslink" onclick="STTSkipTo(\'$0\')">$0</a>', 312 "/(?:(?:(?<hh>\d{1,2})[:.])?(?<mm>\d{1,2})[:.])(?<ss>\d{1,2})/", 313 '<a href="javascript:void(0)" class="qed_stt_tslink" onclick="STTSkipTo(\'$0\')">$0</a>', 254 314 $content 255 315 );
Note: See TracChangeset
for help on using the changeset viewer.