Nucleus CMS日本語版用プラグインのうち、日本語版開発者がサポートしているもの
Revision | d6f2bd49328dabd9bae211d81246b0ddbfe95452 (tree) |
---|---|
Time | 2012-10-20 15:10:28 |
Author | sakamocchi <o-takashi@saka...> |
Commiter | sakamocchi |
FIX: NP_ThumbnailをNucleus 3.65/PHP5.4/MySQL5.5で動作するよう修正
@@ -1,8 +1,8 @@ | ||
1 | 1 | <?php |
2 | 2 | /** |
3 | 3 | * Thumbnail plugin for Nucleus CMS |
4 | - * Version 3.9.6 (4.0 RC2) for PHP5 | |
5 | - * Written By Mocchi, Apr. 04, 2011 | |
4 | + * Version 4.0.0 for PHP5 | |
5 | + * Written By Mocchi, Apr. 06, 2011 | |
6 | 6 | * Original code was written by jirochou, May 23, 2004 and maintained by nakahara21 |
7 | 7 | * This plugin depends on NP_MediaUtils |
8 | 8 | * |
@@ -12,24 +12,26 @@ | ||
12 | 12 | * of the License, or (at your option) any later version. |
13 | 13 | */ |
14 | 14 | |
15 | -class NP_Thumbnail extends NucleusPlugin { | |
15 | +class NP_Thumbnail extends NucleusPlugin | |
16 | +{ | |
16 | 17 | private static $thumbdir = '.thumb'; |
17 | 18 | private static $max_sync = 10; |
18 | 19 | private static $authorid = 0; |
19 | 20 | private static $buffering = FALSE; |
20 | - private static $table_name = 'plugin_thumbnail'; // not implemented | |
21 | + private static $table_name = 'plugin_thumbnail'; // not implemented yet | |
21 | 22 | |
22 | 23 | public function getName() { return 'Thumbnail'; } |
23 | 24 | public function getAuthor() { return 'Mocchi, nakahara21, jirochou'; } |
24 | 25 | public function getURL() { return 'http://japan.nucleuscms.org/wiki/plugins:thumbnail'; } |
25 | - public function getVersion() { return '3.9.6 (4.0 RC2)'; } | |
26 | + public function getVersion() { return '4.0.0'; } | |
26 | 27 | public function getDescription() { return _NP_THUMBNAIL_01; } |
27 | - public function getPluginDep() { return array('NP_MediaUtils');} | |
28 | - public function getMinNucleusVersion() {return 340;} | |
28 | + public function getPluginDep() { return array('NP_MediaUtils'); } | |
29 | + public function getMinNucleusVersion() { return 340; } | |
29 | 30 | public function supportsFeature($feature) { return in_array ($feature, array('SqlTablePrefix', 'SqlApi'));} |
30 | 31 | public function getEventList() { return array('QuickMenu', 'PrePluginOptionsEdit', 'PostAuthentication', 'PreItem', 'PostMediaUpload'); } |
31 | 32 | |
32 | - public function install () { | |
33 | + public function install () | |
34 | + { | |
33 | 35 | $this->createOption('maxwidth', '_NP_THUMBNAIL_02', 'text', '100', 'datatype=numerical'); |
34 | 36 | $this->createOption('maxheight', '_NP_THUMBNAIL_03', 'text', '100', 'datatype=numerical'); |
35 | 37 | $this->createOption('save_thumb', '_NP_THUMBNAIL_04', 'select', 'filesystem', '_NP_THUMBNAIL_05|no|_NP_THUMBNAIL_06|filesystem'); |
@@ -41,114 +43,168 @@ class NP_Thumbnail extends NucleusPlugin { | ||
41 | 43 | /* |
42 | 44 | * plugin options are purged automatically when uninstalled. |
43 | 45 | */ |
44 | - public function uninstall() { | |
46 | + public function uninstall() | |
47 | + { | |
45 | 48 | global $DIR_MEDIA; |
46 | 49 | MediaUtils::purgeDir($DIR_MEDIA . self::$thumbdir); |
47 | 50 | return; |
48 | 51 | } |
49 | 52 | |
50 | - public function init() { | |
51 | - global $DIR_MEDIA; | |
53 | + public function init() | |
54 | + { | |
55 | + global $manager; | |
56 | + | |
57 | + $locale = ''; | |
52 | 58 | |
53 | - if (!class_exists('Medium', FALSE)) { | |
54 | - include(MediaUtils::$lib_path . '/Medium.php'); | |
59 | + if ( !class_exists('Medium', FALSE) ) | |
60 | + { | |
61 | + $manager->getPlugin('NP_Thumbnail'); | |
55 | 62 | } |
56 | 63 | |
57 | - $language = preg_replace('#[/|\\\\]#', '', getLanguageName()); | |
58 | 64 | |
59 | - if (!defined('_NP_THUMBNAIL_01')) { | |
60 | - if (file_exists($this->getDirectory() . $language.'.php')) { | |
61 | - include($this->getDirectory() . $language.'.php'); | |
62 | - } else { | |
63 | - include($this->getDirectory() . 'english.php'); | |
65 | + /* new API */ | |
66 | + if ( class_exists('i18n', FALSE) ) | |
67 | + { | |
68 | + $locale = i18n::get_current_locale() . '.' . i18n::get_current_charset() . '.php'; | |
69 | + } | |
70 | + /* old API */ | |
71 | + else | |
72 | + { | |
73 | + $language = preg_replace('#[/|\\\\]#', '', getLanguageName()); | |
74 | + if ( $language == 'japanese-euc' ) | |
75 | + { | |
76 | + $locale = 'ja_Jpan_JP.EUC-JP.php'; | |
77 | + } | |
78 | + else if ( $language = 'japanese-utf8' ) | |
79 | + { | |
80 | + $locale = 'ja_Jpan_JP.UTF-8.php'; | |
64 | 81 | } |
65 | 82 | } |
83 | + | |
84 | + if ( !$locale || !file_exists($this->getDirectory() . $locale) ) | |
85 | + { | |
86 | + include($this->getDirectory() . 'en_Latn_US.ISO-8859-1.php'); | |
87 | + } | |
88 | + else | |
89 | + { | |
90 | + include($this->getDirectory() . $locale); | |
91 | + } | |
92 | + | |
66 | 93 | return; |
67 | 94 | } |
68 | 95 | |
69 | -/* | |
70 | - * for translation | |
71 | - */ | |
72 | - public function event_PrePluginOptionsEdit ($data) { | |
73 | - if ($data['context'] != 'global') { | |
74 | - foreach($data['options'] as $key => $option) { | |
75 | - if ($option['pid'] == $this->getID()) { | |
76 | - if (defined($option['description'])) { | |
77 | - $data['options'][$key]['description'] = constant($option['description']); | |
78 | - } | |
79 | - if ($option['type'] == 'select') { | |
80 | - foreach (explode('|', $option['typeinfo']) as $option) { | |
81 | - if (defined($option)) { | |
82 | - $data['options'][$key]['typeinfo'] = str_replace($option, constant($option), $data['options'][$key]['typeinfo']); | |
96 | + /* | |
97 | + * for translation | |
98 | + */ | |
99 | + public function event_PrePluginOptionsEdit($data) | |
100 | + { | |
101 | + /* Old version do not support natively */ | |
102 | + if ( getNucleusVersion() < 400 ) | |
103 | + { | |
104 | + if ( $data['context'] != 'global' ) | |
105 | + { | |
106 | + foreach ( $data['options'] as $key => $option ) | |
107 | + { | |
108 | + if ( $option['pid'] == $this->getID() ) | |
109 | + { | |
110 | + if ( defined($option['description']) ) | |
111 | + { | |
112 | + $data['options'][$key]['description'] = constant($option['description']); | |
113 | + } | |
114 | + if ( $option['type'] == 'select' ) | |
115 | + { | |
116 | + foreach ( explode('|', $option['typeinfo']) as $option ) | |
117 | + { | |
118 | + if ( defined($option) ) | |
119 | + { | |
120 | + $data['options'][$key]['typeinfo'] = str_replace($option, constant($option), $data['options'][$key]['typeinfo']); | |
121 | + } | |
83 | 122 | } |
84 | 123 | } |
85 | 124 | } |
86 | 125 | } |
87 | 126 | } |
88 | - } else if ($data['plugid'] == $this->getID()) { | |
89 | - foreach($data['options'] as $key => $option){ | |
90 | - if (defined($option['description'])) { | |
91 | - $data['options'][$key]['description'] = constant($option['description']); | |
92 | - } | |
93 | - if ($option['type'] == 'select') { | |
94 | - foreach (explode('|', $option['typeinfo']) as $option) { | |
95 | - if (defined($option)) { | |
96 | - $data['options'][$key]['typeinfo'] = str_replace($option, constant($option), $data['options'][$key]['typeinfo']); | |
127 | + else if ($data['plugid'] == $this->getID() ) | |
128 | + { | |
129 | + foreach ( $data['options'] as $key => $option ) | |
130 | + { | |
131 | + if ( defined($option['description']) ) | |
132 | + { | |
133 | + $data['options'][$key]['description'] = constant($option['description']); | |
134 | + } | |
135 | + if ( $option['type'] == 'select' ) | |
136 | + { | |
137 | + foreach ( explode('|', $option['typeinfo']) as $option ) | |
138 | + { | |
139 | + if ( defined($option) ) | |
140 | + { | |
141 | + $data['options'][$key]['typeinfo'] = str_replace($option, constant($option), $data['options'][$key]['typeinfo']); | |
142 | + } | |
97 | 143 | } |
98 | - } | |
144 | + } | |
99 | 145 | } |
100 | 146 | } |
101 | 147 | } |
148 | + | |
102 | 149 | return; |
103 | 150 | } |
104 | 151 | |
105 | -/* | |
106 | - * for translation | |
107 | - */ | |
108 | - static private function t ($text, $array=array()){ | |
109 | - if (is_array($array)) { | |
152 | + /* | |
153 | + * for translation | |
154 | + */ | |
155 | + static private function t($text, $array=array()) | |
156 | + { | |
157 | + if ( is_array($array) ) | |
158 | + { | |
110 | 159 | $search = array(); |
111 | 160 | $replace = array(); |
112 | 161 | |
113 | - foreach ($array as $key => $value){ | |
114 | - if (is_array($value)) { | |
162 | + foreach ( $array as $key => $value ) | |
163 | + { | |
164 | + if ( is_array($value) ) | |
165 | + { | |
115 | 166 | continue; |
116 | 167 | } |
117 | 168 | $search[] = '<%'.preg_replace('/[^a-zA-Z0-9_]+/','',$key).'%>'; |
118 | 169 | $replace[] = $value; |
119 | 170 | } |
120 | 171 | } |
121 | - return htmlspecialchars (str_replace($search, $replace, $text), ENT_QUOTES, _CHARSET); | |
172 | + return htmlspecialchars(str_replace($search, $replace, $text), ENT_QUOTES, _CHARSET); | |
122 | 173 | } |
123 | 174 | |
124 | - public function event_QuickMenu ($data) { | |
175 | + public function event_QuickMenu(&$data) | |
176 | + { | |
125 | 177 | global $CONF; |
126 | - if($this->getOption('save_thumb') !== 'no') { | |
127 | - array_push( | |
128 | - $data['options'], | |
129 | - array ( | |
130 | - 'title' => 'NP_Thumbnail', | |
131 | - 'url' => "{$CONF['ActionURL']}?action=plugin&name={$this->getname()}&type=admin", | |
132 | - 'tooltip' => _NP_THUMBNAIL_09)); | |
178 | + | |
179 | + if ( $this->getOption('save_thumb') !== 'no' ) | |
180 | + { | |
181 | + $option = array ( | |
182 | + 'title' => 'NP_Thumbnail', | |
183 | + 'url' => "{$CONF['ActionURL']}?action=plugin&name={$this->getname()}&type=admin", | |
184 | + 'tooltip' => _NP_THUMBNAIL_09); | |
185 | + array_push($data['options'], $option); | |
133 | 186 | } |
134 | 187 | return; |
135 | 188 | } |
136 | 189 | |
137 | - public function event_PostAuthentication ($data) { | |
138 | - if (array_key_exists('action', $_REQUEST) | |
190 | + public function event_PostAuthentication(&$data) | |
191 | + { | |
192 | + if ( array_key_exists('action', $_REQUEST) | |
139 | 193 | && array_key_exists('name', $_REQUEST) |
140 | 194 | && array_key_exists('type', $_REQUEST) |
141 | 195 | && array_key_exists('width', $_REQUEST) |
142 | 196 | && array_key_exists('height', $_REQUEST) |
143 | 197 | && $_REQUEST['action'] === 'plugin' |
144 | 198 | && $_REQUEST['name'] === $this->getName() |
145 | - && $_REQUEST['type'] !== '') { | |
199 | + && $_REQUEST['type'] !== '' ) | |
200 | + { | |
146 | 201 | self::$buffering = ob_start; |
147 | 202 | } |
148 | 203 | return; |
149 | 204 | } |
150 | 205 | |
151 | - public function doAction ($type) { | |
206 | + public function doAction($type) | |
207 | + { | |
152 | 208 | global $DIR_MEDIA, $member; |
153 | 209 | |
154 | 210 | $type = (string) $type; |
@@ -157,37 +213,45 @@ class NP_Thumbnail extends NucleusPlugin { | ||
157 | 213 | $maxwidth = ''; |
158 | 214 | $maxheight = ''; |
159 | 215 | |
160 | - if (array_key_exists('path', $_GET)) { | |
216 | + if ( array_key_exists('path', $_GET) ) | |
217 | + { | |
161 | 218 | $path = (string) $_GET['path']; |
162 | 219 | } |
163 | - if (array_key_exists('width', $_GET)) { | |
220 | + if ( array_key_exists('width', $_GET) ) | |
221 | + { | |
164 | 222 | $maxwidth = (integer) $_GET['width']; |
165 | 223 | } |
166 | - if (array_key_exists('height', $_GET)) { | |
224 | + if ( array_key_exists('height', $_GET) ) | |
225 | + { | |
167 | 226 | $maxheight = (integer) $_GET['height']; |
168 | 227 | } |
169 | 228 | |
170 | - if (in_array($type, array('admin', 'clear', 'sync')) && $member->isAdmin()) { | |
171 | - $this->showAdmin($type); | |
172 | - exit; | |
229 | + if ( self::$buffering ) | |
230 | + { | |
231 | + ob_end_clean(); | |
173 | 232 | } |
174 | 233 | |
175 | - if (self::$buffering) { | |
176 | - ob_end_clean(); | |
234 | + if ( in_array($type, array('admin', 'clear', 'sync')) && $member->isAdmin() ) | |
235 | + { | |
236 | + $this->showAdmin($type); | |
237 | + exit; | |
177 | 238 | } |
178 | 239 | |
179 | - if ($maxwidth <= 0 || $maxwidth > 1000 || $maxheight <= 0 || $maxheight > 1000 ) { | |
180 | - MediaUtils::error ($this->t(_NP_THUMBNAIL_10, array($maxwidth, $maxheight))); | |
240 | + if ( $maxwidth <= 0 || $maxwidth > 1000 || $maxheight <= 0 || $maxheight > 1000 ) | |
241 | + { | |
242 | + MediaUtils::error($this->t(_NP_THUMBNAIL_10, array($maxwidth, $maxheight))); | |
181 | 243 | return; |
182 | 244 | } |
183 | 245 | |
184 | - if (FALSE === ($medium = new Medium($DIR_MEDIA, $path, MediaUtils::$prefix))) { | |
185 | - MediaUtils::error ($this->t(_NP_THUMBNAIL_11, array($path))); | |
246 | + if ( FALSE === ($medium = new Medium($DIR_MEDIA, $path, MediaUtils::$prefix)) ) | |
247 | + { | |
248 | + MediaUtils::error($this->t(_NP_THUMBNAIL_11, array($path))); | |
186 | 249 | return; |
187 | 250 | } |
188 | 251 | |
189 | - if (FALSE === $medium->setResampledSize($maxwidth, $maxheight)) { | |
190 | - MediaUtils::error ($this->t(_NP_THUMBNAIL_10, array($maxwidth, $maxheight))); | |
252 | + if ( FALSE === $medium->setResampledSize($maxwidth, $maxheight) ) | |
253 | + { | |
254 | + MediaUtils::error($this->t(_NP_THUMBNAIL_10, array($maxwidth, $maxheight))); | |
191 | 255 | return; |
192 | 256 | } |
193 | 257 |
@@ -195,34 +259,61 @@ class NP_Thumbnail extends NucleusPlugin { | ||
195 | 259 | return; |
196 | 260 | } |
197 | 261 | |
198 | - public function doSkinVar ($skinType, $path, $maxwidth=0, $maxheight=0, $alt) { | |
199 | - $path = (string) $path; | |
200 | - $maxwidth = (integer) $maxwidth; | |
201 | - $maxheight = (integer) $maxheight; | |
202 | - $alt = (string) $alt; | |
262 | + public function doSkinVar($skinType) | |
263 | + { | |
264 | + $path = ''; | |
265 | + $maxwidth = 0; | |
266 | + $maxheight = 0; | |
267 | + $alt = ''; | |
203 | 268 | |
204 | - if ($this->getBlogOption(MediaUtils::$blogid, 'force_thumb') == 'yes') { | |
269 | + /* retrieve arguments. This is for preventing E_STRICT */ | |
270 | + $args = func_get_args(); | |
271 | + if ( array_key_exists(0, $args) ) | |
272 | + { | |
273 | + $path = (string) $args[0]; | |
274 | + } | |
275 | + if ( array_key_exists(1, $args) ) | |
276 | + { | |
277 | + $maxwidth = (integer) $args[1]; | |
278 | + } | |
279 | + if ( array_key_exists(2, $args) ) | |
280 | + { | |
281 | + $maxheight = (integer) $args[2]; | |
282 | + } | |
283 | + if ( array_key_exists(3, $args) ) | |
284 | + { | |
285 | + $alt = (string) $args[3]; | |
286 | + } | |
287 | + | |
288 | + if ( $this->getBlogOption(MediaUtils::$blogid, 'force_thumb') == 'yes' ) | |
289 | + { | |
205 | 290 | echo $this->getParsedTag(array('', '', $path, 0, 0, $alt), $maxwidth, $maxheight); |
206 | 291 | } |
292 | + | |
207 | 293 | return; |
208 | 294 | } |
209 | 295 | |
210 | - public function event_PreItem($data) { | |
296 | + public function event_PreItem(&$data) | |
297 | + { | |
211 | 298 | $item =& $data["item"]; |
212 | 299 | self::$authorid = $item->authorid; |
213 | 300 | $item->body = preg_replace_callback("#<\%(Thumbnail)\((.*?)\|(.*?)\|(.*?)\|(.*?)\)%\>#", array(&$this, 'getParsedTag'), $item->body); |
214 | 301 | $item->more = preg_replace_callback("#<\%(Thumbnail)\((.*?)\|(.*?)\|(.*?)\|(.*?)\)%\>#", array(&$this, 'getParsedTag'), $item->more); |
215 | 302 | |
216 | - if ($this->getBlogOption(MediaUtils::$blogid, 'force_thumb') == 'yes') { | |
303 | + if ( $this->getBlogOption(MediaUtils::$blogid, 'force_thumb') == 'yes' ) | |
304 | + { | |
217 | 305 | $item->body = preg_replace_callback("#<\%(popup)\((.*?)\|(.*?)\|(.*?)\|(.*?)\)%\>#", array(&$this, 'getParsedTag'), $item->body); |
218 | 306 | $item->more = preg_replace_callback("#<\%(popup)\((.*?)\|(.*?)\|(.*?)\|(.*?)\)%\>#", array(&$this, 'getParsedTag'), $item->more); |
219 | 307 | } |
220 | 308 | return; |
221 | 309 | } |
222 | 310 | |
223 | - public function event_PostMediaUpload ($data) { | |
311 | + public function event_PostMediaUpload(&$data) | |
312 | + { | |
224 | 313 | global $DIR_MEDIA; |
225 | - if ($this->getOption('save_thumb') == 'no') { | |
314 | + | |
315 | + if ( $this->getOption('save_thumb') == 'no' ) | |
316 | + { | |
226 | 317 | return; |
227 | 318 | } |
228 | 319 |
@@ -232,27 +323,33 @@ class NP_Thumbnail extends NucleusPlugin { | ||
232 | 323 | $maxwidth = $this->getOption('maxwidth'); |
233 | 324 | $maxheight = $this->getOption('maxheight'); |
234 | 325 | |
235 | - if (!MediaUtils::checkDir ($root . '/' . self::$thumbdir)) { | |
326 | + if ( !MediaUtils::checkDir ($root . '/' . self::$thumbdir) ) | |
327 | + { | |
236 | 328 | return; |
237 | 329 | } |
238 | 330 | |
239 | - if (FALSE === ($medium = new Medium($root, "{$path}/{$filename}", MediaUtils::$prefix))) { | |
331 | + if ( FALSE === ($medium = new Medium($root, "{$path}/{$filename}", MediaUtils::$prefix)) ) | |
332 | + { | |
240 | 333 | return; |
241 | 334 | } |
242 | 335 | |
243 | - if (!array_key_exists($medium->mime, MediaUtils::$image_mime)) { | |
336 | + if ( !array_key_exists($medium->mime, MediaUtils::$image_mime) ) | |
337 | + { | |
244 | 338 | return; |
245 | 339 | } |
246 | 340 | |
247 | - if (FALSE === $medium->setResampledSize($maxwidth, $maxheight)) { | |
341 | + if ( FALSE === $medium->setResampledSize($maxwidth, $maxheight) ) | |
342 | + { | |
248 | 343 | return; |
249 | 344 | } |
250 | 345 | |
251 | - $target = $this->getThumbPath($medium); | |
346 | + $target = self::getThumbPath($medium); | |
252 | 347 | |
253 | - if ($this->getOption('save_thumb') == 'filesystem') { | |
254 | - if (!file_exists("{$root}/{$target}") | |
255 | - && !MediaUtils::storeResampledImage ($DIR_MEDIA, $target, $medium)) { | |
348 | + if ( $this->getOption('save_thumb') == 'filesystem' ) | |
349 | + { | |
350 | + if ( !file_exists("{$root}/{$target}") | |
351 | + && !MediaUtils::storeResampledImage ($DIR_MEDIA, $target, $medium) ) | |
352 | + { | |
256 | 353 | return; |
257 | 354 | } |
258 | 355 | } |
@@ -260,79 +357,97 @@ class NP_Thumbnail extends NucleusPlugin { | ||
260 | 357 | return; |
261 | 358 | } |
262 | 359 | |
263 | - public function getParsedTag ($match, $maxwidth=0, $maxheight=0) { | |
360 | + public function getParsedTag($match, $maxwidth=0, $maxheight=0) | |
361 | + { | |
264 | 362 | global $DIR_MEDIA, $member; |
265 | 363 | |
266 | 364 | list($code, $tag, $path, $width, $height, $alt) = $match; |
267 | 365 | |
268 | - if (!preg_match("#^.+?/.+$#", $path) && self::$authorid) { | |
366 | + if ( !preg_match("#^.+?/.+$#", $path) && self::$authorid ) | |
367 | + { | |
269 | 368 | $path = self::$authorid . '/' . $path; |
270 | 369 | } |
271 | 370 | |
272 | - if (FALSE === ($medium = new Medium($DIR_MEDIA, $path, MediaUtils::$prefix))) { | |
371 | + if ( FALSE === ($medium = new Medium($DIR_MEDIA, $path, MediaUtils::$prefix)) ) | |
372 | + { | |
273 | 373 | return $this->t('NP_Thumbnail: 指定したメディアファイルを読み込めませんでした。', array($path)); |
274 | 374 | } |
275 | 375 | |
276 | - if (!array_key_exists($medium->mime, MediaUtils::$image_mime)) { | |
376 | + if ( !array_key_exists($medium->mime, MediaUtils::$image_mime) ) | |
377 | + { | |
277 | 378 | return $this->t(_NP_THUMBNAIL_12, array($path)); |
278 | 379 | } |
279 | 380 | |
280 | - if ($tag == 'Thumbnail') { | |
381 | + if ( $tag == 'Thumbnail' ) | |
382 | + { | |
281 | 383 | $maxwidth = (integer) $width; |
282 | 384 | $maxheight = (integer) $height; |
283 | 385 | } |
284 | 386 | |
285 | - if (($maxwidth == 0) && ($maxheight == 0)) { | |
387 | + if ( ($maxwidth == 0) && ($maxheight == 0) ) | |
388 | + { | |
286 | 389 | $maxwidth = (integer) $this->getOption('maxwidth'); |
287 | 390 | $maxheight = (integer) $this->getOption('maxheight'); |
288 | 391 | } |
289 | 392 | |
290 | - if ($maxwidth < 0 || $maxwidth > 1000 || $maxheight < 0 || $maxheight > 1000) { | |
393 | + if ( $maxwidth < 0 || $maxwidth > 1000 || $maxheight < 0 || $maxheight > 1000 ) | |
394 | + { | |
291 | 395 | return $this->t(_NP_THUMBNAIL_10, array($path)); |
292 | 396 | } |
293 | 397 | |
294 | - if (FALSE === $medium->setResampledSize($maxwidth, $maxheight)) { | |
398 | + if ( FALSE === $medium->setResampledSize($maxwidth, $maxheight) ) | |
399 | + { | |
295 | 400 | return $this->t('NP_Thumbnail: サムネイルのサイズが不正です。', array($path)); |
296 | 401 | } |
297 | 402 | |
298 | - if (!$alt) { | |
403 | + if ( !$alt ) | |
404 | + { | |
299 | 405 | $alt =& $path; |
300 | 406 | } |
301 | 407 | |
302 | 408 | return $this->generateTag($this->getBlogOption(MediaUtils::$blogid, 'thumb_template'), $medium, $alt); |
303 | 409 | } |
304 | 410 | |
305 | - public function generateTag($template, $medium, $alt) { | |
411 | + public function generateTag($template, $medium, $alt) | |
412 | + { | |
306 | 413 | global $DIR_LIBS; |
307 | 414 | |
308 | - if (!class_exists('BODYACTIONS', FALSE)) { | |
415 | + if ( !class_exists('BODYACTIONS', FALSE) ) | |
416 | + { | |
309 | 417 | include($DIR_LIBS . 'BODYACTIONS.php'); |
310 | 418 | } |
311 | 419 | $action = new BODYACTIONS; |
312 | 420 | |
313 | - if (array_key_exists($medium->mime, MediaUtils::$image_mime) | |
314 | - && $this->getOption('save_thumb') == 'filesystem') { | |
315 | - if (!MediaUtils::checkDir ($medium->root . '/' . self::$thumbdir)) { | |
421 | + if ( array_key_exists($medium->mime, MediaUtils::$image_mime) | |
422 | + && $this->getOption('save_thumb') == 'filesystem' ) | |
423 | + { | |
424 | + if ( !MediaUtils::checkDir ($medium->root . '/' . self::$thumbdir) ) | |
425 | + { | |
316 | 426 | return $this->t(_NP_THUMBNAIL_13, array(self::$thumbdir)); |
317 | 427 | } |
318 | - if (!file_exists("{$medium->root}/{$this->getThumbPath($medium)}")) { | |
319 | - MediaUtils::storeResampledImage ($medium->root, $this->getThumbPath($medium), $medium); | |
428 | + if ( !file_exists($medium->root . '/' . self::getThumbPath($medium)) ) | |
429 | + { | |
430 | + MediaUtils::storeResampledImage ($medium->root, self::getThumbPath($medium), $medium); | |
320 | 431 | } |
321 | 432 | } |
322 | 433 | |
323 | 434 | ob_start(); |
324 | - if (array_key_exists($medium->mime, MediaUtils::$image_mime) && $this->getThumbURL($medium)) { | |
435 | + if ( array_key_exists($medium->mime, MediaUtils::$image_mime) && $this->getThumbURL($medium) ) | |
436 | + { | |
325 | 437 | $action->template['POPUP_CODE'] = $template; |
326 | 438 | $replacements = array( |
327 | - '<%thumb_width%>' => $medium->resampledwidth, | |
328 | - '<%thumb_height%>' => $medium->resampledheight, | |
329 | - '<%thumb_url%>' => $this->getThumbURL($medium) | |
439 | + '<%thumb_width%>' => $medium->resampledwidth, | |
440 | + '<%thumb_height%>' => $medium->resampledheight, | |
441 | + '<%thumb_url%>' => $this->getThumbURL($medium) | |
330 | 442 | ); |
331 | - foreach ($replacements as $target => $replacement) { | |
443 | + foreach ( $replacements as $target => $replacement ) | |
444 | + { | |
332 | 445 | $action->template['POPUP_CODE'] = str_replace ($target, $replacement, $action->template['POPUP_CODE']); |
333 | 446 | } |
334 | - $action->createPopupCode ("{$medium->path}/{$medium->name}", $medium->width, $medium->height, $alt); | |
335 | - } else { | |
447 | + $action->createPopupCode("{$medium->path}/{$medium->name}", $medium->width, $medium->height, $alt); | |
448 | + } | |
449 | + else | |
450 | + { | |
336 | 451 | $action->template['MEDIA_CODE'] = $template; |
337 | 452 | $action->createMediaCode("{$medium->path}/{$medium->name}", $alt); |
338 | 453 | } |
@@ -342,12 +457,14 @@ class NP_Thumbnail extends NucleusPlugin { | ||
342 | 457 | return preg_replace('#href="(.*?)imagetext(.*?)"#', 'href="$1imagetext$2&blogid='.MediaUtils::$blogid . '"', $tag); |
343 | 458 | } |
344 | 459 | |
345 | - private function showAdmin ($type) { | |
460 | + private function showAdmin($type) | |
461 | + { | |
346 | 462 | global $CONF, $DIR_LIBS, $DIR_MEDIA, $manager; |
347 | 463 | |
348 | 464 | $type = (string) $type; |
349 | 465 | |
350 | - if (!class_exists ('PLUGINADMIN', FALSE)) { | |
466 | + if ( !class_exists ('PLUGINADMIN', FALSE) ) | |
467 | + { | |
351 | 468 | include ($DIR_LIBS . 'PLUGINADMIN.php'); |
352 | 469 | } |
353 | 470 |
@@ -356,39 +473,58 @@ class NP_Thumbnail extends NucleusPlugin { | ||
356 | 473 | |
357 | 474 | echo "<h2>NP_Thumbnail</h2>\n"; |
358 | 475 | |
359 | - if($this->getOption('save_thumb') === 'no') { | |
476 | + if ( $this->getOption('save_thumb') === 'no' ) | |
477 | + { | |
360 | 478 | echo '<p>' . $this->t(_NP_THUMBNAIL_14) . "</p>\n"; |
361 | 479 | $oPluginAdmin->end(); |
362 | 480 | return; |
363 | 481 | } |
364 | 482 | |
365 | - if ($type == 'clear') { | |
366 | - if ($this->getOption('save_thumb') == 'filesystem') { | |
483 | + $logs = array (); | |
484 | + if ( $type == 'clear' ) | |
485 | + { | |
486 | + if ( $this->getOption('save_thumb') == 'filesystem' ) | |
487 | + { | |
367 | 488 | $logs = MediaUtils::purgeDir($DIR_MEDIA, self::$thumbdir . '/'); |
368 | 489 | } |
369 | - } else if ($type == 'sync') { | |
490 | + } | |
491 | + | |
492 | + echo "<p>" . $this->t(_NP_THUMBNAIL_15, array(self::$thumbdir)) . "<br />\n"; | |
493 | + echo $this->t(_NP_THUMBNAIL_16, array(self::$max_sync)) . "<br />\n"; | |
494 | + echo $this->t(_NP_THUMBNAIL_17) . "</p>\n"; | |
495 | + | |
496 | + if ( $type == 'sync' ) | |
497 | + { | |
370 | 498 | $maxwidth = $this->getOption('maxwidth'); |
371 | 499 | $maxheight = $this->getOption('maxheight'); |
372 | - if ($this->getOption('save_thumb') == 'filesystem') { | |
373 | - $logs = $this->syncFilesystem ($DIR_MEDIA, self::$thumbdir, $maxwidth, $maxheight); | |
500 | + if ( $this->getOption('save_thumb') == 'filesystem' ) | |
501 | + { | |
502 | + echo "<h3>" . $this->t(_NP_THUMBNAIL_22) . "</h3>\n"; | |
503 | + if ( self::syncFilesystem ($DIR_MEDIA, self::$thumbdir, $maxwidth, $maxheight) ) | |
504 | + { | |
505 | + echo "<p>何かのエラーメッセージ</p>\n"; | |
506 | + } | |
374 | 507 | } |
375 | - } else { | |
376 | - $logs = array (); | |
377 | 508 | } |
378 | 509 | |
379 | 510 | $media = MediaUtils::getMediaList($DIR_MEDIA); |
380 | 511 | $elected = array(); |
381 | 512 | $rejected = array(); |
382 | 513 | |
383 | - foreach ($media as $medium) { | |
384 | - if (!array_key_exists($medium->mime, MediaUtils::$image_mime)) { | |
514 | + foreach ( $media as $medium ) | |
515 | + { | |
516 | + if ( !array_key_exists($medium->mime, MediaUtils::$image_mime) ) | |
517 | + { | |
385 | 518 | continue; |
386 | 519 | } |
387 | - if (file_exists ($DIR_MEDIA . $this->getThumbPath($medium))) { | |
388 | - $rejected[] = &$medium; | |
520 | + if ( file_exists($DIR_MEDIA . self::getThumbPath($medium)) ) | |
521 | + { | |
522 | + $rejected[] =& $medium; | |
389 | 523 | continue; |
390 | - } else { | |
391 | - $elected[] = &$medium; | |
524 | + } | |
525 | + else | |
526 | + { | |
527 | + $elected[] =& $medium; | |
392 | 528 | continue; |
393 | 529 | } |
394 | 530 | } |
@@ -396,29 +532,33 @@ class NP_Thumbnail extends NucleusPlugin { | ||
396 | 532 | $total_media = count ($media); |
397 | 533 | $total_elected = count ($elected); |
398 | 534 | $total_rejected = count ($rejected); |
399 | - $total_candidates = count ($rejected) + $total_elected; | |
400 | - | |
401 | - echo "<p>" . $this->t(_NP_THUMBNAIL_15, array(self::$thumbdir)) . "<br />\n"; | |
402 | - echo $this->t(_NP_THUMBNAIL_16, array(self::$max_sync)) . "<br />\n"; | |
403 | - echo $this->t(_NP_THUMBNAIL_17) . "</p>\n"; | |
535 | + $total_images = count ($rejected) + $total_elected; | |
404 | 536 | |
405 | 537 | /* |
406 | 538 | * NOTICE: NP_Improvededia with eachblogdir option rewrite |
407 | 539 | * global variables of "DIR_MEDIA" and "$CONF['MediaURL']" |
408 | 540 | * in its initializing process. |
541 | + * (I realized it a bad behavior but there is no other way...) | |
409 | 542 | * Here are based on its rewriting system. |
543 | + * (Apr. 06, 2011) | |
410 | 544 | */ |
411 | - if ($manager->pluginInstalled('NP_ImprovedMedia')) { | |
545 | + if ( $manager->pluginInstalled('NP_ImprovedMedia') ) | |
546 | + { | |
412 | 547 | $NP_ImprovedMedia =& $manager->getPlugin('NP_ImprovedMedia'); |
413 | - if ($NP_ImprovedMedia->getOption('IM_EACHBLOGDIR') == 'yes') { | |
548 | + if ( $NP_ImprovedMedia->getOption('IM_EACHBLOGDIR') == 'yes' ) | |
549 | + { | |
414 | 550 | echo "<form method=\"post\" action=\"{$CONF['ActionURL']}?action=plugin&name=Thumbnail\" enctype=\"application/x-www-form-urlencoded\">\n"; |
415 | 551 | echo "<p>\n"; |
416 | - echo "<label for=\"blogid\">サムネイル作成対象のウェブログ</label>\n"; | |
552 | + echo "<label for=\"blogid\">" . $this->t(_NP_THUMBNAIL_18) . "</label>\n"; | |
417 | 553 | echo "<select name=\"blogid\" id=\"blogid\"onchange=\"return form.submit()\">\n"; |
418 | - foreach(MediaUtils::$blogs as $blogid => $bshortname) { | |
419 | - if ($blogid == MediaUtils::$blogid) { | |
554 | + foreach ( MediaUtils::$blogs as $blogid => $bshortname ) | |
555 | + { | |
556 | + if ( $blogid == MediaUtils::$blogid ) | |
557 | + { | |
420 | 558 | echo "<option value=\"{$blogid}\" selected=\"selected\">{$bshortname}</option>\n"; |
421 | - } else { | |
559 | + } | |
560 | + else | |
561 | + { | |
422 | 562 | echo "<option value=\"{$blogid}\">{$bshortname}</option>\n"; |
423 | 563 | } |
424 | 564 | } |
@@ -431,21 +571,23 @@ class NP_Thumbnail extends NucleusPlugin { | ||
431 | 571 | |
432 | 572 | echo "<form method=\"post\" action=\"{$CONF['ActionURL']}?action=plugin&name=Thumbnail\" enctype=\"application/x-www-form-urlencoded\">\n"; |
433 | 573 | echo "<ul>\n"; |
434 | - echo "<li>" . $this->t(_NP_THUMBNAIL_18, array($total_media)) . "</li>\n"; | |
435 | - echo "<li>" . $this->t(_NP_THUMBNAIL_19, array($total_candidates)) . "</li>\n"; | |
436 | - echo "<li>" . $this->t(_NP_THUMBNAIL_20, array($total_rejected)) . "</li>\n"; | |
574 | + echo "<li>" . $this->t(_NP_THUMBNAIL_19, array($total_media)) . "</li>\n"; | |
575 | + echo "<li>" . $this->t(_NP_THUMBNAIL_20, array($total_images)) . "</li>\n"; | |
576 | + echo "<li>" . $this->t(_NP_THUMBNAIL_21, array($total_rejected)) . "</li>\n"; | |
437 | 577 | echo "</ul>\n"; |
438 | 578 | echo "<p>\n"; |
439 | 579 | echo '<input type="hidden" name="blogid" value="' . MediaUtils::$blogid . '">' . "\n"; |
440 | - echo "<input type=\"submit\" id=\"sync\" name=\"type\" value=\"sync\">\n"; | |
441 | - echo "<input type=\"submit\" id=\"clear\" name=\"type\" value=\"clear\">\n"; | |
580 | + echo "<input type=\"submit\" name=\"type\" value=\"sync\">\n"; | |
581 | + echo "<input type=\"submit\" name=\"type\" value=\"clear\">\n"; | |
442 | 582 | echo "</p>\n"; |
443 | 583 | |
444 | - if ($logs) { | |
445 | - echo "<h3>" . $this->t(_NP_THUMBNAIL_21) . "</h3>\n"; | |
584 | + if ( $logs ) | |
585 | + { | |
586 | + echo "<h3>" . $this->t(_NP_THUMBNAIL_22) . "</h3>\n"; | |
446 | 587 | echo "<ul>\n"; |
447 | 588 | |
448 | - foreach ($logs as $log) { | |
589 | + foreach ( $logs as $log ) | |
590 | + { | |
449 | 591 | echo "<li>{$log}</li>\n"; |
450 | 592 | } |
451 | 593 | echo "</ul>\n"; |
@@ -456,74 +598,90 @@ class NP_Thumbnail extends NucleusPlugin { | ||
456 | 598 | return; |
457 | 599 | } |
458 | 600 | |
459 | - public function syncFilesystem ($root, $dest, $maxwidth, $maxheight) { | |
601 | + public static function syncFilesystem ($root, $dest, $maxwidth, $maxheight) | |
602 | + { | |
460 | 603 | $logs = array (); |
461 | 604 | |
462 | 605 | $root = rtrim($root, '/'); |
463 | - if(!$root || !file_exists($root)) { | |
606 | + if ( !$root || !file_exists($root) ) | |
607 | + { | |
464 | 608 | return FALSE; |
465 | 609 | } |
466 | 610 | |
467 | - if (!MediaUtils::checkDir(rtrim($root, '/') . '/' . trim($dest, '/'))) { | |
611 | + if ( !MediaUtils::checkDir(rtrim($root, '/') . '/' . trim($dest, '/')) ) | |
612 | + { | |
468 | 613 | return FALSE; |
469 | 614 | } |
470 | 615 | |
616 | + echo "<ul>\n"; | |
617 | + | |
471 | 618 | $media = MediaUtils::getMediaList($root); |
472 | 619 | $targets = array(); |
473 | 620 | $count = 1; |
474 | 621 | |
475 | - foreach ($media as $medium) { | |
476 | - if ($count > self::$max_sync) { | |
622 | + foreach ( $media as $medium ) | |
623 | + { | |
624 | + ob_flush(); | |
625 | + flush(); | |
626 | + | |
627 | + if ( $count > self::$max_sync ) | |
628 | + { | |
477 | 629 | break; |
478 | 630 | } |
479 | 631 | |
480 | - if (!array_key_exists ($medium->mime, MediaUtils::$image_mime)) { | |
632 | + if ( FALSE === ($destination = self::getThumbPath($medium)) | |
633 | + || file_exists (rtrim($root, '/') . '/' . $destination) ) | |
634 | + { | |
481 | 635 | continue; |
482 | 636 | } |
483 | 637 | |
484 | - if (FALSE === $medium->setResampledSize($maxwidth, $maxheight)) { | |
485 | - continue; | |
638 | + if ( FALSE === $medium->setResampledSize($maxwidth, $maxheight) | |
639 | + || !MediaUtils::storeResampledImage ($root, $destination, $medium) ) | |
640 | + { | |
641 | + echo "<li>Fail: {$medium->name}</li>\n"; | |
486 | 642 | } |
487 | - | |
488 | - $destination = $this->getThumbPath($medium); | |
489 | - | |
490 | - if (!file_exists (rtrim($root, '/') . '/' . $destination)) { | |
491 | - if (!MediaUtils::storeResampledImage ($root, $destination, $medium)) { | |
492 | - $logs[] = "Fail: {$medium->name}"; | |
493 | - } else { | |
494 | - $logs[] = "Success: {$medium->name}"; | |
495 | - } | |
643 | + else | |
644 | + { | |
645 | + echo "<li>Success: {$medium->name}</li>\n"; | |
496 | 646 | $count++; |
497 | 647 | } |
498 | 648 | } |
499 | - return $logs; | |
649 | + | |
650 | + echo "</ul>\n"; | |
651 | + flush(); | |
652 | + return TRUE; | |
500 | 653 | } |
501 | 654 | |
502 | - public function getThumbPath($medium) { | |
503 | - if ('Medium' !== get_class($medium)) { | |
655 | + public static function getThumbPath($medium) | |
656 | + { | |
657 | + if ( !array_key_exists ($medium->mime, MediaUtils::$image_mime) ) | |
658 | + { | |
504 | 659 | return FALSE; |
505 | 660 | } |
506 | 661 | return self::$thumbdir . '/' . $medium->getHashedName(MediaUtils::$algorism) . MediaUtils::$image_mime[$medium->mime]; |
507 | 662 | } |
508 | 663 | |
509 | - public function getThumbURL($medium) { | |
664 | + public function getThumbURL($medium) | |
665 | + { | |
510 | 666 | global $CONF, $DIR_MEDIA; |
511 | 667 | |
512 | - if ('Medium' !== get_class($medium)) { | |
513 | - return FALSE; | |
514 | - } | |
515 | - | |
516 | - if (($medium->width < $medium->resampledwidth && $medium->height < $medium->resampledheight) | |
517 | - || ($medium->width <= $this->getOption('maxwidth') && $medium->height <= $this->getOption('maxheight'))) { | |
668 | + if ( ($medium->width < $medium->resampledwidth && $medium->height < $medium->resampledheight) | |
669 | + || ($medium->width <= $this->getOption('maxwidth') && $medium->height <= $this->getOption('maxheight')) ) | |
670 | + { | |
518 | 671 | $url = "{$CONF['MediaURL']}{$medium->path}/{$medium->name}"; |
519 | - } else if ($medium->resampledwidth > $this->getOption('maxwidth') && $medium->resampledheight > $this->getOption('maxheight')) { | |
672 | + } | |
673 | + else if ( $medium->resampledwidth > $this->getOption('maxwidth') && $medium->resampledheight > $this->getOption('maxheight') ) | |
674 | + { | |
520 | 675 | $url = "{$CONF['ActionURL']}?action=plugin&name={$this->getName()}&path={$medium->path}/{$medium->name}&width={$medium->resampledwidth}&height={$medium->resampledheight}&blogid=" . MediaUtils::$blogid; |
521 | - } else if (file_exists($DIR_MEDIA . $this->getThumbPath($medium))) { | |
522 | - $url = "{$CONF['MediaURL']}{$this->getThumbPath($medium)}"; | |
523 | - } else { | |
676 | + } | |
677 | + else if (file_exists($DIR_MEDIA . self::getThumbPath($medium)) ) | |
678 | + { | |
679 | + $url = $CONF['MediaURL'] . self::getThumbPath($medium); | |
680 | + } | |
681 | + else | |
682 | + { | |
524 | 683 | $url = FALSE; |
525 | 684 | } |
526 | 685 | return $url; |
527 | 686 | } |
528 | 687 | } |
529 | - |
@@ -1,8 +1,8 @@ | ||
1 | 1 | <?php |
2 | 2 | /** |
3 | 3 | * Thumbnail plugin for Nucleus CMS |
4 | - * Version 3.9.6 (4.0 RC2) for PHP5 | |
5 | - * Written By Mocchi, Apr. 04, 2011 | |
4 | + * Version 4.0.0 for PHP5 | |
5 | + * Written By Mocchi, Apr. 06, 2011 | |
6 | 6 | * Original code was written by jirochou, May 23, 2004 and maintained by nakahara21 |
7 | 7 | * This plugin depends on NP_MediaUtils |
8 | 8 | * |
@@ -29,7 +29,8 @@ define ('_NP_THUMBNAIL_14', 'This function is not allowed.'); | ||
29 | 29 | define ('_NP_THUMBNAIL_15', 'Thumbnails is generated in <%0%> on Media directory.'); |
30 | 30 | define ('_NP_THUMBNAIL_16', 'One session generates <%0%> thumbnails.'); |
31 | 31 | define ('_NP_THUMBNAIL_17', 'There is a possibility to fail to generate thumbnail if original image is too large.'); |
32 | -define ('_NP_THUMBNAIL_18', '<%0%> files is in this media directory.'); | |
33 | -define ('_NP_THUMBNAIL_19', '<%0%> files can generate its own thumbnail.'); | |
34 | -define ('_NP_THUMBNAIL_20', '<%0%> thumbnails already generated'); | |
35 | -define ('_NP_THUMBNAIL_21', 'Logs'); | |
32 | +define ('_NP_THUMBNAIL_18', 'The target weblog to generate thumbnails'); | |
33 | +define ('_NP_THUMBNAIL_19', '<%0%> files is in this media directory.'); | |
34 | +define ('_NP_THUMBNAIL_20', '<%0%> files can generate its own thumbnail.'); | |
35 | +define ('_NP_THUMBNAIL_21', '<%0%> thumbnails already generated'); | |
36 | +define ('_NP_THUMBNAIL_22', 'Logs'); |
@@ -1,8 +1,8 @@ | ||
1 | 1 | <?php |
2 | 2 | /** |
3 | 3 | * Thumbnail plugin for Nucleus CMS |
4 | - * Version 3.9.6 (4.0 RC2) for PHP5 | |
5 | - * Written By Mocchi, Apr. 04, 2011 | |
4 | + * Version 4.0.0 for PHP5 | |
5 | + * Written By Mocchi, Apr. 06, 2011 | |
6 | 6 | * Original code was written by jirochou, May 23, 2004 and maintained by nakahara21 |
7 | 7 | * This plugin depends on NP_MediaUtils |
8 | 8 | * |
@@ -29,7 +29,8 @@ define ('_NP_THUMBNAIL_14', ' | ||
29 | 29 | define ('_NP_THUMBNAIL_15', 'サムネイルはメディア用ディレクトリの<%0%>に作成されます'); |
30 | 30 | define ('_NP_THUMBNAIL_16', '現在は1回あたり<%0%>枚のサムネイルを作成するように設定されています'); |
31 | 31 | define ('_NP_THUMBNAIL_17', 'あまりに縦横サイズの大きな画像はサムネイルが作成できない場合があります'); |
32 | -define ('_NP_THUMBNAIL_18', '現在<%0%>のメディアが登録されています'); | |
33 | -define ('_NP_THUMBNAIL_19', 'そのうち、<%0%>の画像のサムネイルが作成可能です'); | |
34 | -define ('_NP_THUMBNAIL_20', 'そのうち、<%0%>の画像のサムネイルがすでに作成されています。'); | |
35 | -define ('_NP_THUMBNAIL_21', 'ログ'); | |
32 | +define ('_NP_THUMBNAIL_18', 'サムネイル作成対象のウェブログ'); | |
33 | +define ('_NP_THUMBNAIL_19', '現在<%0%>のメディアが登録されています'); | |
34 | +define ('_NP_THUMBNAIL_20', 'そのうち、<%0%>の画像のサムネイルが作成可能です'); | |
35 | +define ('_NP_THUMBNAIL_21', 'そのうち、<%0%>の画像のサムネイルがすでに作成されています。'); | |
36 | +define ('_NP_THUMBNAIL_22', 'ログ'); |
@@ -1,8 +1,8 @@ | ||
1 | 1 | <?php |
2 | 2 | /** |
3 | 3 | * Thumbnail plugin for Nucleus CMS |
4 | - * Version 3.9.6 (4.0 RC2) for PHP5 | |
5 | - * Written By Mocchi, Apr. 04, 2011 | |
4 | + * Version 4.0.0 for PHP5 | |
5 | + * Written By Mocchi, Apr. 06, 2011 | |
6 | 6 | * Original code was written by jirochou, May 23, 2004 and maintained by nakahara21 |
7 | 7 | * This plugin depends on NP_MediaUtils |
8 | 8 | * |
@@ -29,7 +29,8 @@ define ('_NP_THUMBNAIL_14', '現在はサムネイルファイルをサーバに | ||
29 | 29 | define ('_NP_THUMBNAIL_15', 'サムネイルはメディア用ディレクトリの<%0%>に作成されます'); |
30 | 30 | define ('_NP_THUMBNAIL_16', '現在は1回あたり<%0%>枚のサムネイルを作成するように設定されています'); |
31 | 31 | define ('_NP_THUMBNAIL_17', 'あまりに縦横サイズの大きな画像はサムネイルが作成できない場合があります'); |
32 | -define ('_NP_THUMBNAIL_18', '現在<%0%>のメディアが登録されています'); | |
33 | -define ('_NP_THUMBNAIL_19', 'そのうち、<%0%>の画像のサムネイルが作成可能です'); | |
34 | -define ('_NP_THUMBNAIL_20', 'そのうち、<%0%>の画像のサムネイルがすでに作成されています。'); | |
35 | -define ('_NP_THUMBNAIL_21', 'ログ'); | |
32 | +define ('_NP_THUMBNAIL_18', 'サムネイル作成対象のウェブログ'); | |
33 | +define ('_NP_THUMBNAIL_19', '現在<%0%>のメディアが登録されています'); | |
34 | +define ('_NP_THUMBNAIL_20', 'そのうち、<%0%>の画像のサムネイルが作成可能です'); | |
35 | +define ('_NP_THUMBNAIL_21', 'そのうち、<%0%>の画像のサムネイルがすでに作成されています。'); | |
36 | +define ('_NP_THUMBNAIL_22', 'ログ'); |