Changeset 601608
- Timestamp:
- 09/20/2012 02:34:25 PM (13 years ago)
- Location:
- auto-animateimage/trunk
- Files:
-
- 8 edited
-
animateimage-options.css (modified) (1 diff)
-
animateimage-options.js (modified) (1 diff)
-
animateimage-options.php (modified) (2 diffs)
-
animateimage.php (modified) (5 diffs)
-
languages/animateimage-ja.mo (modified) (previous)
-
languages/animateimage-ja.po (modified) (3 diffs)
-
languages/animateimage.pot (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
auto-animateimage/trunk/animateimage-options.css
r601588 r601608 11 11 label.item { margin-right: 3px; } 12 12 .rtl label.item { margin-left: 3px; margin-right: 0; } 13 label.boundary { margin-left: 3px; } 14 .rtl label.boundary { margin-right: 3px; } 13 15 14 16 .form-table th { font-weight: bold; } -
auto-animateimage/trunk/animateimage-options.js
r601584 r601608 9 9 postboxes.add_postbox_toggles(pagenow); 10 10 }); 11 12 function onRepeatChange(input) { 13 document.form[input.name][1].checked = input.value == '-1'; 14 } -
auto-animateimage/trunk/animateimage-options.php
r601588 r601608 12 12 add_options_page('Auto AnimateImage ' . $this->util->__('Settings'), 'Auto AnimateImage', 'manage_options', 'auto-animateimage', array(&$this, 'options_page')); 13 13 add_meta_box( 'general-box', $this->util->__('General'), array(&$this, 'general_metabox'), $this->settings_page_type, 'normal' ); 14 add_meta_box( 'options-box', $this->util->__('Common Options'), array(&$this, 'options_metabox'), $this->settings_page_type, 'normal' ); 14 15 add_meta_box( 'about-box', $this->util->__('About'), array(&$this, 'about_metabox'), $this->settings_page_type, 'normal' ); 15 16 } … … 57 58 <label class="item"><input type="radio" name="auto-animateimage[script_place]" value="footer"<?php $this->util->checked($this->options['script_place'], 'footer'); ?> /> 58 59 <?php $this->util->_e('Footer'); ?></label> 60 </td> 61 </tr> 62 </table> 63 <?php 64 } 65 66 function options_metabox() { 67 ?> 68 <table class="form-table"> 69 <tr> 70 <th scope="row"><?php $this->util->_e('Animation Delay'); ?></th> 71 <td> 72 <input type="number" min="0" name="auto-animateimage[options.delay]" value="<?php echo $this->options['options.delay']; ?>" class="small-text" /> ms 73 </td> 74 </tr> 75 <tr> 76 <th scope="row"><?php $this->util->_e('Delay between Animation Cycles'); ?></th> 77 <td> 78 <input type="number" min="0" name="auto-animateimage[options.cycleDelay]" value="<?php echo $this->options['options.cycleDelay']; ?>" class="small-text" /> ms 79 </td> 80 </tr> 81 <tr> 82 <th scope="row"><?php $this->util->_e('Repeat Count'); ?></th> 83 <td> 84 <input type="number" min="-1" name="auto-animateimage[options.repeat]" value="<?php echo $this->options['options.repeat']; ?>" onchange="onRepeatChange(this)" class="small-text" /> 85 <label class="boundary"><input type="checkbox" name="auto-animateimage[options.repeat]" value="-1"<?php $this->util->checked($this->options['options.repeat'], '-1'); ?> /> 86 <?php $this->util->_e('Infinite Iteration'); ?></label> 87 </td> 88 </tr> 89 <tr> 90 <th scope="row"><?php $this->util->_e('Rewind at the End of Animation'); ?></th> 91 <td> 92 <select name="auto-animateimage[options.rewind]"> 93 <option value="true"<?php selected($this->options['options.rewind'], 'true'); ?>>true</option> 94 <option value="false"<?php selected($this->options['options.rewind'], 'false'); ?>>false</option> 95 </select> 96 </td> 97 </tr> 98 <tr> 99 <th scope="row"><?php $this->util->_e('Pause at First Image'); ?></th> 100 <td> 101 <select name="auto-animateimage[options.pauseAtFirst]"> 102 <option value="true"<?php selected($this->options['options.pauseAtFirst'], 'true'); ?>>true</option> 103 <option value="false"<?php selected($this->options['options.pauseAtFirst'], 'false'); ?>>false</option> 104 </select> 105 </td> 106 </tr> 107 <tr> 108 <th scope="row"><?php $this->util->_e('Pause at Last Image'); ?></th> 109 <td> 110 <select name="auto-animateimage[options.pauseAtLast]"> 111 <option value="true"<?php selected($this->options['options.pauseAtLast'], 'true'); ?>>true</option> 112 <option value="false"<?php selected($this->options['options.pauseAtLast'], 'false'); ?>>false</option> 113 </select> 114 </td> 115 </tr> 116 <tr> 117 <th scope="row"><?php $this->util->_e('Show Blank Image between Animation Cycles'); ?></th> 118 <td> 119 <select name="auto-animateimage[options.showBlank]"> 120 <option value="true"<?php selected($this->options['options.showBlank'], 'true'); ?>>true</option> 121 <option value="false"<?php selected($this->options['options.showBlank'], 'false'); ?>>false</option> 122 </select> 123 </td> 124 </tr> 125 <tr> 126 <th scope="row"><?php $this->util->_e('Output img Elements when Using JavaScript Code'); ?></th> 127 <td> 128 <select name="auto-animateimage[options.output]"> 129 <option value="true"<?php selected($this->options['options.output'], 'true'); ?>>true</option> 130 <option value="false"<?php selected($this->options['options.output'], 'false'); ?>>false</option> 131 </select> 132 </td> 133 </tr> 134 <tr> 135 <th scope="row"><?php $this->util->_e('Class Name'); ?> (<?php $this->util->_e('Animated Images'); ?>)</th> 136 <td> 137 <input type="text" name="auto-animateimage[options.className]" value="<?php echo $this->options['options.className']; ?>" /> 138 </td> 139 </tr> 140 <tr> 141 <th scope="row"><?php $this->util->_e('Class Name'); ?> (<?php $this->util->_e('Blank Image'); ?>)</th> 142 <td> 143 <input type="text" name="auto-animateimage[options.blankClassName]" value="<?php echo $this->options['options.blankClassName']; ?>" /> 59 144 </td> 60 145 </tr> -
auto-animateimage/trunk/animateimage.php
r601588 r601608 4 4 Plugin URI: http://attosoft.info/en/blog/auto-animateimage/ 5 5 Description: Automatically applies AnimateImage script to your site. AnimateImage displays multiple images continuously like animated GIF. All you have to do is write img elements, and the images will be animated automatically. 6 Version: 0. 36 Version: 0.4 7 7 Author: attosoft 8 8 Author URI: http://attosoft.info/en/ … … 29 29 */ 30 30 31 define('AUTO_ANIMATE_IMAGE_VER', '0. 3');31 define('AUTO_ANIMATE_IMAGE_VER', '0.4'); 32 32 33 33 class Animate_Image { … … 41 41 $in_footer = $this->options['script_place'] == 'footer'; 42 42 wp_enqueue_script('animate-image', $this->util->plugins_url('animate-image.min.js'), false, AUTO_ANIMATE_IMAGE_VER, $in_footer); 43 } 44 45 function print_resources() { 46 echo '<!-- Auto AnimateImage by attosoft (' . $this->util->__('http://attosoft.info/en/') . ') -->' . "\n"; 47 $this->custom_scripts(); 48 } 49 50 var $js_options = array('delay', 'cycleDelay', 'repeat', 'rewind', 51 'pauseAtFirst', 'pauseAtLast', 'showBlank', 'output', 'className', 'blankClassName'); 52 53 function custom_scripts() { 54 $script = ''; 55 56 foreach ($this->js_options as $option) { 57 if ( $this->is_default_options('options.' . $option) ) 58 continue; 59 60 $value = $this->options['options.' . $option]; 61 if ( is_numeric($value) || $value == 'true' || $value == 'false' ) 62 $script .= "AnimateImage.options.{$option} = {$value};\n"; 63 else 64 $script .= "AnimateImage.options.{$option} = '{$value}';\n"; 65 } 66 67 if ($script) 68 echo "<script type='text/javascript'>\n/* <![CDATA[ */\n{$script}/* ]]> */\n</script>\n"; 69 } 70 71 function is_default_options($names) { 72 if (!is_array($names)) 73 return $this->options[$names] == $this->options_def[$names]; 74 75 foreach ($names as $name) { 76 if ($this->options[$name] != $this->options_def[$name]) 77 return false; 78 } 79 return true; 43 80 } 44 81 … … 81 118 } else { 82 119 add_action('wp_print_scripts', array(&$this, 'scripts')); 120 121 $res_hook = $this->options['script_place'] == 'header' ? 'wp_head' : 'wp_footer'; 122 add_action($res_hook, array(&$this, 'print_resources'), 20); 83 123 } 84 124 } … … 86 126 function init_options() { 87 127 $this->options_def = array( 88 'script_place' => 'header' 128 'script_place' => 'header', 129 130 'options.delay' => '500', 131 'options.repeat' => '-1', 132 'options.rewind' => 'false', 133 'options.pauseAtFirst' => 'false', 134 'options.pauseAtLast' => 'false', 135 'options.showBlank' => 'false', 136 'options.cycleDelay' => '0', 137 'options.className' => 'animation', 138 'options.blankClassName' => 'blank', 139 'options.output' => 'true' 89 140 ); 90 141 $this->options = get_option('auto-animateimage'); -
auto-animateimage/trunk/languages/animateimage-ja.po
r601588 r601608 6 6 msgid "" 7 7 msgstr "" 8 "Project-Id-Version: Auto AnimateImage 0. 3\n"8 "Project-Id-Version: Auto AnimateImage 0.4\n" 9 9 "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/auto-animateimage\n" 10 10 "POT-Creation-Date: 2012-09-18 13:23+0900\n" 11 "PO-Revision-Date: 2012-09-20 2 2:54+0900\n"11 "PO-Revision-Date: 2012-09-20 23:18+0900\n" 12 12 "Last-Translator: attosoft <contact@attosoft.info>\n" 13 13 "Language-Team: attosoft <http://attosoft.info/en/>\n" … … 21 21 "X-Poedit-SearchPath-0: .\n" 22 22 23 #: animateimage-options.php:14 24 msgid "Common Options" 25 msgstr "共通設定" 26 27 #: animateimage-options.php:15 28 msgid "Animated Images" 29 msgstr "アニメーション画像" 30 31 #: animateimage-options.php:16 32 msgid "Blank Image" 33 msgstr "空白画像" 34 23 35 #: animateimage-options.php:17 24 36 msgid "About" … … 28 40 msgid "AnimateImage Script" 29 41 msgstr "AnimateImage スクリプト" 42 43 #: animateimage-options.php:74 44 msgid "Animation Delay" 45 msgstr "アニメーション間隔" 46 47 #: animateimage-options.php:80 48 msgid "Delay between Animation Cycles" 49 msgstr "アニメーションサイクル間の間隔" 50 51 #: animateimage-options.php:86 52 msgid "Repeat Count" 53 msgstr "繰り返し回数" 54 55 #: animateimage-options.php:90 56 msgid "Infinite Iteration" 57 msgstr "無制限に繰り返す" 58 59 #: animateimage-options.php:94 60 msgid "Rewind at the End of Animation" 61 msgstr "アニメーション終了時に巻き戻す" 62 63 #: animateimage-options.php:103 64 msgid "Pause at First Image" 65 msgstr "最初の画像で一時停止" 66 67 #: animateimage-options.php:112 68 msgid "Pause at Last Image" 69 msgstr "最後の画像で一時停止" 70 71 #: animateimage-options.php:121 72 msgid "Show Blank Image between Animation Cycles" 73 msgstr "アニメーションサイクル間に空白画像を表示する" 74 75 #: animateimage-options.php:130 76 msgid "Output img Elements when Using JavaScript Code" 77 msgstr "JavaScript コード使用時に img 要素を出力する" 78 79 #: animateimage-options.php:139 animateimage-options.php:145 80 msgid "Class Name" 81 msgstr "クラス名" 30 82 31 83 #: animateimage-options.php:267 animateimage-options.php:272 -
auto-animateimage/trunk/languages/animateimage.pot
r601588 r601608 6 6 msgid "" 7 7 msgstr "" 8 "Project-Id-Version: Auto AnimateImage 0. 3\n"8 "Project-Id-Version: Auto AnimateImage 0.4\n" 9 9 "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/auto-animateimage\n" 10 10 "POT-Creation-Date: 2012-09-18 13:23+0900\n" … … 21 21 "X-Poedit-SearchPath-0: .\n" 22 22 23 #: animateimage-options.php:14 24 msgid "Common Options" 25 msgstr "" 26 27 #: animateimage-options.php:15 28 msgid "Animated Images" 29 msgstr "" 30 31 #: animateimage-options.php:16 32 msgid "Blank Image" 33 msgstr "" 34 23 35 #: animateimage-options.php:58 24 36 msgid "AnimateImage Script" 37 msgstr "" 38 39 #: animateimage-options.php:74 40 msgid "Animation Delay" 41 msgstr "" 42 43 #: animateimage-options.php:80 44 msgid "Delay between Animation Cycles" 45 msgstr "" 46 47 #: animateimage-options.php:86 48 msgid "Repeat Count" 49 msgstr "" 50 51 #: animateimage-options.php:90 52 msgid "Infinite Iteration" 53 msgstr "" 54 55 #: animateimage-options.php:94 56 msgid "Rewind at the End of Animation" 57 msgstr "" 58 59 #: animateimage-options.php:103 60 msgid "Pause at First Image" 61 msgstr "" 62 63 #: animateimage-options.php:112 64 msgid "Pause at Last Image" 65 msgstr "" 66 67 #: animateimage-options.php:121 68 msgid "Show Blank Image between Animation Cycles" 69 msgstr "" 70 71 #: animateimage-options.php:130 72 msgid "Output img Elements when Using JavaScript Code" 73 msgstr "" 74 75 #: animateimage-options.php:139 animateimage-options.php:145 76 msgid "Class Name" 25 77 msgstr "" 26 78 -
auto-animateimage/trunk/readme.txt
r601588 r601608 21 21 * Automatically applies [AnimateImage script](http://attosoft.info/en/blog/animate-image/) to your site 22 22 * All you have to do is write `img` elements. No JavaScript, No Shortcode, No Gallery. 23 * Common options can be customized via WordPress Settings screen 23 24 * Compatible widely down to even obsolete WordPress 2.7 24 25 … … 102 103 = Customization = 103 104 104 Here is all available options at Auto AnimateImage Settings screen. 105 Here is all available options at Auto AnimateImage Settings screen. You can customize common options through the following options. 105 106 106 107 * General 107 108 * AnimateImage Script (Header or Footer) 109 * Common Options 110 * Animation Delay 111 * Delay between Animation Cycles 112 * Repeat Count 113 * Rewind at the End of Animation 114 * Pause at First Image 115 * Pause at Last Image 116 * Show Blank Image between Animation Cycles 117 * Output img Elements when Using JavaScript Code 118 * Class Name (Animated Images) 119 * Class Name (Blank Image) 108 120 109 121 == Frequently Asked Questions == … … 150 162 = Latest Version = 151 163 164 = 0.4 = 165 * NEW: "Common Options" meta box in Settings screen. AnimateImage common options can be customized via Settings screen. 166 * Animation Delay 167 * Delay between Animation Cycles 168 * Repeat Count 169 * Rewind at the End of Animation 170 * Pause at First Image 171 * Pause at Last Image 172 * Show Blank Image between Animation Cycles 173 * Output img Elements when Using JavaScript Code 174 * Class Name (Animated Images) 175 * Class Name (Blank Image) 176 152 177 = 0.3 = 153 178 * NEW: Auto AnimateImage Settings screen
Note: See TracChangeset
for help on using the changeset viewer.