Nucleus CMS日本語版SVNをgit-svnしたもの。リポジトリの変換作業用
Revision | 349798ca67168cf3fff4e2eda316898c87adba78 (tree) |
---|---|
Zeit | 2009-03-18 16:10:37 |
Autor | shizuki <shizuki@1ca2...> |
Commiter | shizuki |
EUCのインストールファイル削除
プラグインリストのリダイレクト問題修正
スキンの読み込み/書き出し改良
デフォルトスキンのインクルードファイルをスキンパーツ化
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk/utf8@987 1ca29b6e-896d-4ea0-84a5-967f57386b96
@@ -1,1112 +0,0 @@ | ||
1 | -<?php | |
2 | -/* | |
3 | - * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/) | |
4 | - * Copyright (C) 2002-2009 The Nucleus Group | |
5 | - * | |
6 | - * This program is free software; you can redistribute it and/or | |
7 | - * modify it under the terms of the GNU General Public License | |
8 | - * as published by the Free Software Foundation; either version 2 | |
9 | - * of the License, or (at your option) any later version. | |
10 | - * (see nucleus/documentation/index.html#license for more info) | |
11 | - * This script will install the Nucleus tables in your SQL-database, and initialize the data in | |
12 | - * those tables. | |
13 | - * | |
14 | - * Below is a friendly way of letting users on non-php systems know that Nucleus won't run there. | |
15 | - * ?><div style="font-size: xx-large;">If you see this text in your browser when you open <i>install.php</i>, your web server is not able to run PHP-scripts, and therefor Nucleus will not be able to run there. </div><div style="display: none"><?php | |
16 | - */ | |
17 | - | |
18 | -/** | |
19 | - * @license http://nucleuscms.org/license.txt GNU General Public License | |
20 | - * @copyright Copyright (C) 2002-2009 The Nucleus Group | |
21 | - * @version $Id$ | |
22 | - * $NucleusJP: install.php,v 1.7 2007/02/04 06:28:44 kimitake Exp $ | |
23 | - */ | |
24 | - | |
25 | -/* | |
26 | - This part of the install.php code allows for customization of the install process. | |
27 | - When distributing plugins or skins together with a Nucleus installation, the | |
28 | - configuration below will instruct to install them | |
29 | - | |
30 | - -- Start Of Configurable Part -- | |
31 | -*/ | |
32 | - | |
33 | -include('./install_lang_japanese-euc.php'); | |
34 | - | |
35 | -// array with names of plugins to install. Plugin files must be present in the nucleus/plugin/ | |
36 | -// directory. | |
37 | -// | |
38 | -// example: | |
39 | -// array('NP_TrackBack', 'NP_MemberGoodies') | |
40 | -$aConfPlugsToInstall = array('NP_SkinFiles'); | |
41 | - | |
42 | - | |
43 | -// array with skins to install. skins must be present under the skins/ directory with | |
44 | -// a subdirectory having the same name that contains a skinbackup.xml file | |
45 | -// | |
46 | -// example: | |
47 | -// array('base','rsd') | |
48 | -$aConfSkinsToImport = array('default'); | |
49 | - | |
50 | -/* | |
51 | - -- End Of Configurable Part -- | |
52 | -*/ | |
53 | - | |
54 | -// don't give warnings for uninitialized vars | |
55 | -error_reporting(E_ERROR | E_WARNING | E_PARSE); | |
56 | - | |
57 | -// make sure there's no unnecessary escaping: | |
58 | -set_magic_quotes_runtime(0); | |
59 | - | |
60 | -// if there are some plugins or skins to import, do not include vars | |
61 | -// in globalfunctions.php again... so set a flag | |
62 | -if ((count($aConfPlugsToInstall) > 0) || (count($aConfSkinsToImport) > 0) ) { | |
63 | - global $CONF; | |
64 | - $CONF['installscript'] = 1; | |
65 | -} | |
66 | - | |
67 | -if (phpversion() >= '4.1.0') { | |
68 | - include_once('nucleus/libs/vars4.1.0.php'); | |
69 | -} else { | |
70 | - include_once('nucleus/libs/vars4.0.6.php'); | |
71 | -} | |
72 | - | |
73 | -include_once('nucleus/libs/mysql.php'); | |
74 | - | |
75 | -// check if mysql support is installed | |
76 | - if (!function_exists('mysql_query') ) { | |
77 | - _doError(_ERROR1); | |
78 | - } | |
79 | - | |
80 | - if (postVar('action') == 'go') { | |
81 | - doInstall(); | |
82 | - } else { | |
83 | - showInstallForm(); | |
84 | - } | |
85 | - | |
86 | -exit; | |
87 | - | |
88 | -function showInstallForm() { | |
89 | - // 0. pre check if all necessary files exist | |
90 | - doCheckFiles(); | |
91 | - | |
92 | - ?> | |
93 | - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
94 | - <html xmlns="http://www.w3.org/1999/xhtml"> | |
95 | - <head> | |
96 | - <meta http-equiv="content-type" content="application/xhtml+xml; charset=<?php echo _CHARSET; ?>" /> | |
97 | - <title><?php echo _TITLE; ?></title> | |
98 | - <style type="text/css"><!-- | |
99 | - @import url('nucleus/documentation/styles/manual.css'); | |
100 | - --></style> | |
101 | - <script type="text/javascript"><!-- | |
102 | - var submitcount = 0; | |
103 | - | |
104 | - // function to make sure the submit button only gets pressed once | |
105 | - function checkSubmit() { | |
106 | - if (submitcount == 0) { | |
107 | - submitcount++; | |
108 | - return true; | |
109 | - } else { | |
110 | - return false; | |
111 | - } | |
112 | - } | |
113 | - --></script> | |
114 | - </head> | |
115 | - <body> | |
116 | - <div style="text-align:center"><img src="./nucleus/styles/logo.gif" /></div> <!-- Nucleus logo --> | |
117 | - <form method="post" action="install.php"> | |
118 | - | |
119 | - <h1><?php echo _HEADER1; ?></h1> | |
120 | - | |
121 | - <?php echo _TEXT1; ?> | |
122 | - | |
123 | - <h1><?php echo _HEADER2; ?></h1> | |
124 | - | |
125 | - <?php echo _TEXT2; ?> | |
126 | - | |
127 | - <ul> | |
128 | - <li>PHP: | |
129 | - | |
130 | -<?php | |
131 | - echo phpversion(); | |
132 | - $minVersion = '4.0.6'; | |
133 | - | |
134 | - if (phpversion() < $minVersion) { | |
135 | - echo ' <span class="warning" style="display:block">' . sprintf(_TEXT2_WARN, $minVersion) . '</span>'; | |
136 | - } elseif (phpversion() < '5') { | |
137 | - echo ' <span class="warning" style="display:block">' . _TEXT2_WARN3 . '</span>'; | |
138 | - } | |
139 | -?> | |
140 | - | |
141 | - </li> | |
142 | - <li>MySQL: | |
143 | - | |
144 | -<?php | |
145 | - // note: this piece of code is taken from phpMyAdmin | |
146 | - $result = @mysql_query('SELECT VERSION() AS version'); | |
147 | - | |
148 | - if ($result != FALSE && @mysql_num_rows($result) > 0) { | |
149 | - $row = mysql_fetch_array($result); | |
150 | - $match = explode('.', $row['version']); | |
151 | - } else { | |
152 | - $result = @mysql_query('SHOW VARIABLES LIKE \'version\''); | |
153 | - | |
154 | - if ($result != FALSE && @mysql_num_rows($result) > 0) { | |
155 | - $row = mysql_fetch_row($result); | |
156 | - $match = explode('.', $row[1]); | |
157 | - } else { | |
158 | - $output = shell_exec('mysql -V'); | |
159 | - preg_match('@[0-9]+\.[0-9]+\.[0-9]+@', $output, $version); | |
160 | - $match = explode('.', $version[0]); | |
161 | - | |
162 | - if ($match[0] == '') { | |
163 | - $match[0] = '0'; | |
164 | - $match[1] = '0'; | |
165 | - $match[2] = '0'; | |
166 | - } | |
167 | - } | |
168 | - } | |
169 | - | |
170 | - $mysqlVersion = implode($match, '.'); | |
171 | - $minVersion = '3.23'; | |
172 | - | |
173 | - if ($mysqlVersion == '0.0.0') { | |
174 | - echo _NOTIFICATION1; | |
175 | - } | |
176 | - else { | |
177 | - echo $mysqlVersion; | |
178 | - } | |
179 | - | |
180 | - if ($mysqlVersion < $minVersion) { | |
181 | - echo ' <span class="warning" style="display:block">' . sprintf(_TEXT2_WARN2, $minVersion) . '</span>'; | |
182 | - } | |
183 | -?> | |
184 | - | |
185 | - </li> | |
186 | - </ul> | |
187 | - | |
188 | -<?php | |
189 | - // tell people how they can have their config file filled out automatically | |
190 | - if (@file_exists('config.php') && @!is_writable('config.php')) { | |
191 | -?> | |
192 | - | |
193 | - <h1><?php echo _HEADER3; ?></h1> | |
194 | - | |
195 | - <?php echo _TEXT3; | |
196 | - | |
197 | -} ?> | |
198 | - | |
199 | - <h1><?php echo _HEADER4; ?></h1> | |
200 | - | |
201 | - <?php echo _TEXT4; ?> | |
202 | - | |
203 | - <fieldset> | |
204 | - <legend><?php echo _TEXT4_TAB_HEAD; ?></legend> | |
205 | - <table> | |
206 | - <tr> | |
207 | - <td><?php echo _TEXT4_TAB_FIELD1; ?></td> | |
208 | - <td><input name="mySQL_host" value="<?php echo htmlspecialchars(@ini_get('mysql.default_host') )?>" /></td> | |
209 | - </tr> | |
210 | - <tr> | |
211 | - <td><?php echo _TEXT4_TAB_FIELD2; ?></td> | |
212 | - <td><input name="mySQL_user" /></td> | |
213 | - </tr> | |
214 | - <tr> | |
215 | - <td><?php echo _TEXT4_TAB_FIELD3; ?></td> | |
216 | - <td><input name="mySQL_password" type="password" /></td> | |
217 | - </tr> | |
218 | - <tr> | |
219 | - <td><?php echo _TEXT4_TAB_FIELD4; ?></td> | |
220 | - <td><input name="mySQL_database" /> (<input name="mySQL_create" value="1" type="checkbox" id="mySQL_create" /><label for="mySQL_create"><?php echo _TEXT4_TAB_FIELD4_ADD; ?></label>)</td> | |
221 | - </tr> | |
222 | - </table> | |
223 | - </fieldset> | |
224 | - | |
225 | - <fieldset> | |
226 | - <legend><?php echo _TEXT4_TAB2_HEAD; ?></legend> | |
227 | - <table> | |
228 | - <tr> | |
229 | - <td><input name="mySQL_usePrefix" value="1" type="checkbox" id="mySQL_usePrefix" /><label for="mySQL_usePrefix"><?php echo _TEXT4_TAB2_FIELD; ?></label></td> | |
230 | - <td><input name="mySQL_tablePrefix" value="" /></td> | |
231 | - </tr> | |
232 | - </table> | |
233 | - | |
234 | - <?php echo _TEXT4_TAB2_ADD; ?> | |
235 | - | |
236 | - </fieldset> | |
237 | - | |
238 | - <h1><?php echo _HEADER5; ?></h1> | |
239 | - | |
240 | - <?php echo _TEXT5; ?> | |
241 | - | |
242 | -<?php | |
243 | - | |
244 | - // no need to this all! dirname(__FILE__) is all we need -- moraes | |
245 | - /* | |
246 | - // discover full path | |
247 | - $fullPath = serverVar('PATH_TRANSLATED'); | |
248 | - | |
249 | - if ($fullPath == '') { | |
250 | - $fullPath = serverVar('SCRIPT_FILENAME'); | |
251 | - } | |
252 | - | |
253 | - $basePath = str_replace('install.php', '', $fullPath); | |
254 | - $basePath = replaceDoubleBackslash($basePath); | |
255 | - $basePath = replaceDoubleBackslash($basePath); | |
256 | - | |
257 | - // add slash at end if necessary | |
258 | - if (!endsWithSlash($basePath) ) { | |
259 | - $basePath .= '/'; | |
260 | - } | |
261 | - */ | |
262 | - | |
263 | - $basePath = dirname(__FILE__) . '/'; | |
264 | -?> | |
265 | - | |
266 | - <fieldset> | |
267 | - <legend><?php echo _TEXT5_TAB_HEAD; ?></legend> | |
268 | - <table> | |
269 | - <tr> | |
270 | - <td><?php echo _TEXT5_TAB_FIELD1; ?></td> | |
271 | - <td><input name="IndexURL" size="60" value="<?php | |
272 | - $url = 'http://' . serverVar('HTTP_HOST') . serverVar('PHP_SELF'); | |
273 | - $url = str_replace('install.php', '', $url); | |
274 | - $url = replaceDoubleBackslash($url); | |
275 | - | |
276 | - // add slash at end if necessary | |
277 | - if (!endsWithSlash($url) ) { | |
278 | - $url .= '/'; | |
279 | - } | |
280 | - | |
281 | - echo $url; ?>" /></td> | |
282 | - </tr> | |
283 | - <tr> | |
284 | - <td><?php echo _TEXT5_TAB_FIELD2; ?></td> | |
285 | - <td><input name="AdminURL" size="60" value="<?php | |
286 | - if ($url) { | |
287 | - echo $url . 'nucleus/'; | |
288 | - } ?>" /></td> | |
289 | - </tr> | |
290 | - <tr> | |
291 | - <td><?php echo _TEXT5_TAB_FIELD3; ?></td> | |
292 | - <td><input name="AdminPath" size="60" value="<?php | |
293 | - if($basePath) { | |
294 | - echo $basePath . 'nucleus/'; | |
295 | - } ?>" /></td> | |
296 | - </tr> | |
297 | - <tr> | |
298 | - <td><?php echo _TEXT5_TAB_FIELD4; ?></td> | |
299 | - <td><input name="MediaURL" size="60" value="<?php | |
300 | - if ($url) { | |
301 | - echo $url . 'media/'; | |
302 | - } ?>" /></td> | |
303 | - </tr> | |
304 | - <tr> | |
305 | - <td><?php echo _TEXT5_TAB_FIELD5; ?></td> | |
306 | - <td><input name="MediaPath" size="60" value="<?php | |
307 | - if ($basePath) { | |
308 | - echo $basePath . 'media/'; | |
309 | - } ?>" /></td> | |
310 | - </tr> | |
311 | - <tr> | |
312 | - <td><?php echo _TEXT5_TAB_FIELD6; ?></td> | |
313 | - <td><input name="SkinsURL" size="60" value="<?php | |
314 | - if ($url) { | |
315 | - echo $url . 'skins/'; | |
316 | - } ?>" /> | |
317 | - <br />(<?php echo _TEXT5_TAB_FIELD7_2; ?>) | |
318 | - </td> | |
319 | - </tr> | |
320 | - <tr> | |
321 | - <td><?php echo _TEXT5_TAB_FIELD7; ?></td> | |
322 | - <td><input name="SkinsPath" size="60" value="<?php | |
323 | - if ($basePath) { | |
324 | - echo $basePath . 'skins/'; | |
325 | - } ?>" /> | |
326 | - <br />(<?php echo _TEXT5_TAB_FIELD7_2; ?>) | |
327 | - </td> | |
328 | - </tr> | |
329 | - <tr> | |
330 | - <td><?php echo _TEXT5_TAB_FIELD8; ?></td> | |
331 | - <td><input name="PluginURL" size="60" value="<?php | |
332 | - if ($url) { | |
333 | - echo $url . 'nucleus/plugins/'; | |
334 | - } ?>" /></td> | |
335 | - </tr> | |
336 | - <tr> | |
337 | - <td><?php echo _TEXT5_TAB_FIELD9; ?></td> | |
338 | - <td><input name="ActionURL" size="60" value="<?php | |
339 | - if ($url) { | |
340 | - echo $url . 'action.php'; | |
341 | - } ?>" /> | |
342 | - <br />(<?php echo _TEXT5_TAB_FIELD9_2;?>) | |
343 | - </td> | |
344 | - </tr> | |
345 | - </table> | |
346 | - </fieldset> | |
347 | - | |
348 | - <?php echo _TEXT5_2; ?> | |
349 | - | |
350 | - <h1><? echo _HEADER6; ?></h1> | |
351 | - | |
352 | - <?php echo _TEXT6; ?> | |
353 | - | |
354 | - <fieldset> | |
355 | - <legend><?php echo _TEXT6_TAB_HEAD; ?></legend> | |
356 | - <table> | |
357 | - <tr> | |
358 | - <td><?php echo _TEXT6_TAB_FIELD1; ?></td> | |
359 | - <td><input name="User_name" value="" /> <small>(<?php echo _TEXT6_TAB_FIELD1_2; ?>)</small></td> | |
360 | - </tr> | |
361 | - <tr> | |
362 | - <td><?php echo _TEXT6_TAB_FIELD2; ?></td> | |
363 | - <td><input name="User_realname" value="" /></td> | |
364 | - </tr> | |
365 | - <tr> | |
366 | - <td><?php echo _TEXT6_TAB_FIELD3; ?></td> | |
367 | - <td><input name="User_password" type="password" value="" /></td> | |
368 | - </tr> | |
369 | - <tr> | |
370 | - <td><?php echo _TEXT6_TAB_FIELD4; ?></td> | |
371 | - <td><input name="User_password2" type="password" value="" /></td> | |
372 | - </tr> | |
373 | - <tr> | |
374 | - <td><?php echo _TEXT6_TAB_FIELD5; ?></td> | |
375 | - <td><input name="User_email" value="" /> <small>(<?php echo _TEXT6_TAB_FIELD5_2; ?>)</small></td> | |
376 | - </tr> | |
377 | - </table> | |
378 | - </fieldset> | |
379 | - | |
380 | - <h1><?php echo _HEADER7; ?></h1> | |
381 | - | |
382 | - <?php echo _TEXT7; ?> | |
383 | - | |
384 | - <fieldset> | |
385 | - <legend><?php echo _TEXT7_TAB_HEAD; ?></legend> | |
386 | - <table> | |
387 | - <tr> | |
388 | - <td><?php echo _TEXT7_TAB_FIELD1; ?></td> | |
389 | - <td><input name="Blog_name" size="60" value="My Nucleus CMS" /></td> | |
390 | - </tr> | |
391 | - <tr> | |
392 | - <td><?php echo _TEXT7_TAB_FIELD2; ?></td> | |
393 | - <td><input name="Blog_shortname" value="mynucleuscms" /> <small>(<?php echo _TEXT7_TAB_FIELD2_2; ?>)</small></td> | |
394 | - </tr> | |
395 | - </table> | |
396 | - </fieldset> | |
397 | - | |
398 | - <h1><?php echo _HEADER8; ?></h1> | |
399 | - | |
400 | - <fieldset> | |
401 | - <legend><?php echo _TEXT8_TAB_HEADER; ?></legend> | |
402 | - <table> | |
403 | - <tr> | |
404 | - <td><input name="Weblog_ping" value="1" type="checkbox" id="Weblog_ping" /><?php echo _TEXT8_TAB_FIELD1; ?></td> | |
405 | - </tr> | |
406 | - </table> | |
407 | - </fieldset> | |
408 | - | |
409 | - <h1><?php echo _HEADER9; ?></h1> | |
410 | - | |
411 | - <?php echo _TEXT9; ?> | |
412 | - | |
413 | - <p><input name="action" value="go" type="hidden" /> <input type="submit" value="<?php echo _BUTTON1; ?>" onclick="return checkSubmit();" /></p> | |
414 | - | |
415 | - </form> | |
416 | - </body> | |
417 | -</html> | |
418 | - | |
419 | -<?php } | |
420 | - | |
421 | -function tableName($unPrefixed) { | |
422 | - global $mysql_usePrefix, $mysql_prefix; | |
423 | - | |
424 | - if ($mysql_usePrefix == 1) { | |
425 | - return $mysql_prefix . $unPrefixed; | |
426 | - } else { | |
427 | - return $unPrefixed; | |
428 | - } | |
429 | -} | |
430 | - | |
431 | -function doInstall() { | |
432 | - global $mysql_usePrefix, $mysql_prefix, $weblog_ping; | |
433 | - | |
434 | - // 0. put all POST-vars into vars | |
435 | - $mysql_host = postVar('mySQL_host'); | |
436 | - $mysql_user = postVar('mySQL_user'); | |
437 | - $mysql_password = postVar('mySQL_password'); | |
438 | - $mysql_database = postVar('mySQL_database'); | |
439 | - $mysql_create = postVar('mySQL_create'); | |
440 | - $mysql_usePrefix = postVar('mySQL_usePrefix'); | |
441 | - $mysql_prefix = postVar('mySQL_tablePrefix'); | |
442 | - $config_indexurl = postVar('IndexURL'); | |
443 | - $config_adminurl = postVar('AdminURL'); | |
444 | - $config_adminpath = postVar('AdminPath'); | |
445 | - $config_mediaurl = postVar('MediaURL'); | |
446 | - $config_skinsurl = postVar('SkinsURL'); | |
447 | - $config_pluginurl = postVar('PluginURL'); | |
448 | - $config_actionurl = postVar('ActionURL'); | |
449 | - $config_mediapath = postVar('MediaPath'); | |
450 | - $config_skinspath = postVar('SkinsPath'); | |
451 | - $user_name = postVar('User_name'); | |
452 | - $user_realname = postVar('User_realname'); | |
453 | - $user_password = postVar('User_password'); | |
454 | - $user_password2 = postVar('User_password2'); | |
455 | - $user_email = postVar('User_email'); | |
456 | - $blog_name = postVar('Blog_name'); | |
457 | - $blog_shortname = postVar('Blog_shortname'); | |
458 | - $config_adminemail = $user_email; | |
459 | - $config_sitename = $blog_name; | |
460 | - $weblog_ping = postVar('Weblog_ping'); | |
461 | - | |
462 | - $config_indexurl = replaceDoubleBackslash($config_indexurl); | |
463 | - $config_adminurl = replaceDoubleBackslash($config_adminurl); | |
464 | - $config_mediaurl = replaceDoubleBackslash($config_mediaurl); | |
465 | - $config_skinsurl = replaceDoubleBackslash($config_skinsurl); | |
466 | - $config_pluginurl = replaceDoubleBackslash($config_pluginurl); | |
467 | - $config_actionurl = replaceDoubleBackslash($config_actionurl); | |
468 | - $config_adminpath = replaceDoubleBackslash($config_adminpath); | |
469 | - $config_skinspath = replaceDoubleBackslash($config_skinspath); | |
470 | - $config_mediapath = replaceDoubleBackslash($config_mediapath); | |
471 | - | |
472 | - // 1. check all the data | |
473 | - $errors = array(); | |
474 | - | |
475 | - if (!$mysql_database) { | |
476 | - array_push($errors, _ERROR2); | |
477 | - } | |
478 | - | |
479 | - if (($mysql_usePrefix == 1) && (strlen($mysql_prefix) == 0) ) { | |
480 | - array_push($errors, _ERROR3); | |
481 | - } | |
482 | - | |
483 | - if (($mysql_usePrefix == 1) && (!eregi('^[a-zA-Z0-9_]+$', $mysql_prefix) ) ) { | |
484 | - array_push($errors, _ERROR4); | |
485 | - } | |
486 | - | |
487 | - // TODO: add action.php check | |
488 | - if (!endsWithSlash($config_indexurl) || !endsWithSlash($config_adminurl) || !endsWithSlash($config_mediaurl) || !endsWithSlash($config_pluginurl) || !endsWithSlash($config_skinsurl) ) { | |
489 | - array_push($errors, _ERROR5); | |
490 | - } | |
491 | - | |
492 | - if (!endsWithSlash($config_adminpath) ) { | |
493 | - array_push($errors, _ERROR6); | |
494 | - } | |
495 | - | |
496 | - if (!endsWithSlash($config_mediapath) ) { | |
497 | - array_push($errors, _ERROR7); | |
498 | - } | |
499 | - | |
500 | - if (!endsWithSlash($config_skinspath) ) { | |
501 | - array_push($errors, _ERROR8); | |
502 | - } | |
503 | - | |
504 | - if (!is_dir($config_adminpath) ) { | |
505 | - array_push($errors, _ERROR9); | |
506 | - } | |
507 | - | |
508 | - if (!_isValidMailAddress($user_email) ) { | |
509 | - array_push($errors, _ERROR10); | |
510 | - } | |
511 | - | |
512 | - if (!_isValidDisplayName($user_name) ) { | |
513 | - array_push($errors, _ERROR11); | |
514 | - } | |
515 | - | |
516 | - if (!$user_password || !$user_password2) { | |
517 | - array_push($errors, _ERROR12); | |
518 | - } | |
519 | - | |
520 | - if ($user_password != $user_password2) { | |
521 | - array_push($errors, _ERROR13); | |
522 | - } | |
523 | - | |
524 | - if (!_isValidShortName($blog_shortname) ) { | |
525 | - array_push($errors, _ERROR14); | |
526 | - } | |
527 | - | |
528 | - if (sizeof($errors) > 0) { | |
529 | - showErrorMessages($errors); | |
530 | - } | |
531 | - | |
532 | - // 2. try to log in to mySQL | |
533 | - global $MYSQL_CONN; | |
534 | - $MYSQL_CONN = @mysql_connect($mysql_host, $mysql_user, $mysql_password); | |
535 | - | |
536 | - if ($MYSQL_CONN == false) { | |
537 | - _doError(_ERROR15 . ': ' . mysql_error() ); | |
538 | - } | |
539 | - | |
540 | - // 3. try to create database (if needed) | |
541 | - if ($mysql_create == 1) { | |
542 | - mysql_query('CREATE DATABASE ' . $mysql_database) or _doError(_ERROR16 . ': ' . mysql_error() ); | |
543 | - } | |
544 | - | |
545 | - // 4. try to select database | |
546 | - mysql_select_db($mysql_database) or _doError(_ERROR17); | |
547 | - | |
548 | - // 5. execute queries | |
549 | - $filename = 'install.sql'; | |
550 | - $fd = fopen($filename, 'r'); | |
551 | - $queries = fread($fd, filesize($filename) ); | |
552 | - fclose($fd); | |
553 | - | |
554 | - $queries = split("(;\n|;\r)", $queries); | |
555 | - | |
556 | - $aTableNames = array( | |
557 | - 'nucleus_actionlog', | |
558 | - 'nucleus_ban', | |
559 | - 'nucleus_blog', | |
560 | - 'nucleus_category', | |
561 | - 'nucleus_comment', | |
562 | - 'nucleus_config', | |
563 | - 'nucleus_item', | |
564 | - 'nucleus_karma', | |
565 | - 'nucleus_member', | |
566 | - 'nucleus_plugin', | |
567 | - 'nucleus_skin', | |
568 | - 'nucleus_template', | |
569 | - 'nucleus_team', | |
570 | - 'nucleus_activation', | |
571 | - 'nucleus_tickets' | |
572 | - ); | |
573 | -// these are unneeded (one of the replacements above takes care of them) | |
574 | -// 'nucleus_plugin_event', | |
575 | -// 'nucleus_plugin_option', | |
576 | -// 'nucleus_plugin_option_desc', | |
577 | -// 'nucleus_skin_desc', | |
578 | -// 'nucleus_template_desc', | |
579 | - | |
580 | - $aTableNamesPrefixed = array( | |
581 | - $mysql_prefix . 'nucleus_actionlog', | |
582 | - $mysql_prefix . 'nucleus_ban', | |
583 | - $mysql_prefix . 'nucleus_blog', | |
584 | - $mysql_prefix . 'nucleus_category', | |
585 | - $mysql_prefix . 'nucleus_comment', | |
586 | - $mysql_prefix . 'nucleus_config', | |
587 | - $mysql_prefix . 'nucleus_item', | |
588 | - $mysql_prefix . 'nucleus_karma', | |
589 | - $mysql_prefix . 'nucleus_member', | |
590 | - $mysql_prefix . 'nucleus_plugin', | |
591 | - $mysql_prefix . 'nucleus_skin', | |
592 | - $mysql_prefix . 'nucleus_template', | |
593 | - $mysql_prefix . 'nucleus_team', | |
594 | - $mysql_prefix . 'nucleus_activation', | |
595 | - $mysql_prefix . 'nucleus_tickets' | |
596 | - ); | |
597 | -// these are unneeded (one of the replacements above takes care of them) | |
598 | -// $mysql_prefix . 'nucleus_plugin_event', | |
599 | -// $mysql_prefix . 'nucleus_plugin_option', | |
600 | -// $mysql_prefix . 'nucleus_plugin_option_desc', | |
601 | -// $mysql_prefix . 'nucleus_skin_desc', | |
602 | -// $mysql_prefix . 'nucleus_template_desc', | |
603 | - | |
604 | - $count = count($queries); | |
605 | - | |
606 | - for ($idx = 0; $idx < $count; $idx++) { | |
607 | - $query = trim($queries[$idx]); | |
608 | - // echo "QUERY = <small>" . htmlspecialchars($query) . "</small><p>"; | |
609 | - | |
610 | - if ($query) { | |
611 | - | |
612 | - if ($mysql_usePrefix == 1) { | |
613 | - $query = str_replace($aTableNames, $aTableNamesPrefixed, $query); | |
614 | - } | |
615 | - | |
616 | - mysql_query($query) or _doError(_ERROR30 . ' (<small>' . htmlspecialchars($query) . '</small>): ' . mysql_error() ); | |
617 | - } | |
618 | - } | |
619 | - | |
620 | - // 5a make first post | |
621 | - $newpost = "INSERT INTO " . tableName('nucleus_item') . " VALUES (1, '" . _1ST_POST_TITLE . "', '" . _1ST_POST . "', '" . _1ST_POST2 . "', 1, 1, '2005-08-15 11:04:26', 0, 0, 0, 1, 0, 1);"; | |
622 | - mysql_query($newpost) or _doError(_ERROR18 . ' (<small>' . htmlspecialchars($newpost) . '</small>): ' . mysql_error() ); | |
623 | - | |
624 | - // 6. update global settings | |
625 | - updateConfig('IndexURL', $config_indexurl); | |
626 | - updateConfig('AdminURL', $config_adminurl); | |
627 | - updateConfig('MediaURL', $config_mediaurl); | |
628 | - updateConfig('SkinsURL', $config_skinsurl); | |
629 | - updateConfig('PluginURL', $config_pluginurl); | |
630 | - updateConfig('ActionURL', $config_actionurl); | |
631 | - updateConfig('AdminEmail', $config_adminemail); | |
632 | - updateConfig('SiteName', $config_sitename); | |
633 | - | |
634 | - // 7. update GOD member | |
635 | - $query = 'UPDATE ' . tableName('nucleus_member') | |
636 | - . " SET mname = '" . addslashes($user_name) . "'," | |
637 | - . " mrealname = '" . addslashes($user_realname) . "'," | |
638 | - . " mpassword = '" . md5(addslashes($user_password) ) . "'," | |
639 | - . " murl = '" . addslashes($config_indexurl) . "'," | |
640 | - . " memail = '" . addslashes($user_email) . "'," | |
641 | - . " madmin = 1," | |
642 | - . " mcanlogin = 1" | |
643 | - . " WHERE" | |
644 | - . " mnumber = 1"; | |
645 | - | |
646 | - mysql_query($query) or _doError(_ERROR19 . ': ' . mysql_error() ); | |
647 | - | |
648 | - // 8. update weblog settings | |
649 | - $query = 'UPDATE ' . tableName('nucleus_blog') | |
650 | - . " SET bname = '" . addslashes($blog_name) . "'," | |
651 | - . " bshortname = '" . addslashes($blog_shortname) . "'," | |
652 | - . " burl = '" . addslashes($config_indexurl) . "'" | |
653 | - . " WHERE" | |
654 | - . " bnumber = 1"; | |
655 | - | |
656 | - mysql_query($query) or _doError(_ERROR20 . ': ' . mysql_error() ); | |
657 | - | |
658 | - // 8-2. update category settings | |
659 | - $query = 'UPDATE ' . tableName('nucleus_category') | |
660 | - . " SET cname = '" . addslashes(_GENERALCAT_NAME) . "'," | |
661 | - . " cdesc = '" . addslashes(_GENERALCAT_DESC) . "'" | |
662 | - . " WHERE" | |
663 | - . " catid = 1"; | |
664 | - | |
665 | - mysql_query($query) or _doError(_ERROR20 . ': ' . mysql_error() ); | |
666 | - | |
667 | - // 9. update item date | |
668 | - $query = 'UPDATE ' . tableName('nucleus_item') | |
669 | - . " SET itime = '" . date('Y-m-d H:i:s', time() ) ."'" | |
670 | - . " WHERE inumber = 1"; | |
671 | - | |
672 | - mysql_query($query) or _doError(_ERROR21 . ': ' . mysql_error() ); | |
673 | - | |
674 | - global $aConfPlugsToInstall, $aConfSkinsToImport; | |
675 | - $aSkinErrors = array(); | |
676 | - $aPlugErrors = array(); | |
677 | - | |
678 | - if ((count($aConfPlugsToInstall) > 0) || (count($aConfSkinsToImport) > 0) ) { | |
679 | - // 10. set global variables | |
680 | - global $MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWORD, $MYSQL_DATABASE, $MYSQL_PREFIX; | |
681 | - | |
682 | - $MYSQL_HOST = $mysql_host; | |
683 | - $MYSQL_USER = $mysql_user; | |
684 | - $MYSQL_PASSWORD = $mysql_password; | |
685 | - $MYSQL_DATABASE = $mysql_database; | |
686 | - $MYSQL_PREFIX = ($mysql_usePrefix == 1) ? $mysql_prefix : ''; | |
687 | - | |
688 | - global $DIR_NUCLEUS, $DIR_MEDIA, $DIR_SKINS, $DIR_PLUGINS, $DIR_LANG, $DIR_LIBS; | |
689 | - | |
690 | - $DIR_NUCLEUS = $config_adminpath; | |
691 | - $DIR_MEDIA = $config_mediapath; | |
692 | - $DIR_SKINS = $config_skinspath; | |
693 | - $DIR_PLUGINS = $DIR_NUCLEUS . 'plugins/'; | |
694 | - $DIR_LANG = $DIR_NUCLEUS . 'language/'; | |
695 | - $DIR_LIBS = $DIR_NUCLEUS . 'libs/'; | |
696 | - | |
697 | - // close database connection (needs to be closed if we want to include globalfunctions.php) | |
698 | - mysql_close(); | |
699 | - | |
700 | - $manager = ''; | |
701 | - include_once($DIR_LIBS . 'globalfunctions.php'); | |
702 | - | |
703 | - // 11. install custom skins | |
704 | - $aSkinErrors = installCustomSkins($manager); | |
705 | - | |
706 | - // 12. install NP_Ping, if decided | |
707 | - if ($weblog_ping == 1) { | |
708 | - global $aConfPlugsToInstall; | |
709 | - array_push($aConfPlugsToInstall, "NP_Ping"); | |
710 | - } | |
711 | - | |
712 | - // 13. install custom plugins | |
713 | - $aPlugErrors = installCustomPlugs($manager); | |
714 | - } | |
715 | - | |
716 | - // 14. Write config file ourselves (if possible) | |
717 | - $bConfigWritten = 0; | |
718 | - | |
719 | - if (@file_exists('config.php') && is_writable('config.php') && $fp = @fopen('config.php', 'w') ) { | |
720 | - $config_data = '<' . '?php' . "\n\n"; | |
721 | - //$config_data .= "\n"; (extraneous, just added extra \n to previous line | |
722 | - $config_data .= " // mySQL connection information\n"; | |
723 | - $config_data .= " \$MYSQL_HOST = '" . $mysql_host . "';\n"; | |
724 | - $config_data .= " \$MYSQL_USER = '" . $mysql_user . "';\n"; | |
725 | - $config_data .= " \$MYSQL_PASSWORD = '" . $mysql_password . "';\n"; | |
726 | - $config_data .= " \$MYSQL_DATABASE = '" . $mysql_database . "';\n"; | |
727 | - $config_data .= " \$MYSQL_PREFIX = '" . (($mysql_usePrefix == 1) ? $mysql_prefix : '') . "';\n"; | |
728 | - $config_data .= "\n"; | |
729 | - $config_data .= " // main nucleus directory\n"; | |
730 | - $config_data .= " \$DIR_NUCLEUS = '" . $config_adminpath . "';\n"; | |
731 | - $config_data .= "\n"; | |
732 | - $config_data .= " // path to media dir\n"; | |
733 | - $config_data .= " \$DIR_MEDIA = '" . $config_mediapath . "';\n"; | |
734 | - $config_data .= "\n"; | |
735 | - $config_data .= " // extra skin files for imported skins\n"; | |
736 | - $config_data .= " \$DIR_SKINS = '" . $config_skinspath . "';\n"; | |
737 | - $config_data .= "\n"; | |
738 | - $config_data .= " // these dirs are normally sub dirs of the nucleus dir, but \n"; | |
739 | - $config_data .= " // you can redefine them if you wish\n"; | |
740 | - $config_data .= " \$DIR_PLUGINS = \$DIR_NUCLEUS . 'plugins/';\n"; | |
741 | - $config_data .= " \$DIR_LANG = \$DIR_NUCLEUS . 'language/';\n"; | |
742 | - $config_data .= " \$DIR_LIBS = \$DIR_NUCLEUS . 'libs/';\n"; | |
743 | - $config_data .= "\n"; | |
744 | - $config_data .= " // include libs\n"; | |
745 | - $config_data .= " include(\$DIR_LIBS . 'globalfunctions.php');\n"; | |
746 | - $config_data .= " if (!extension_loaded('mbstring')) {\n"; | |
747 | - $config_data .= " include(\$DIR_LIBS . 'mb_emulator/mb-emulator.php');\n"; | |
748 | - $config_data .= " }\n"; | |
749 | - $config_data .= "?" . ">"; | |
750 | - | |
751 | - $result = @fputs($fp, $config_data, strlen($config_data) ); | |
752 | - fclose($fp); | |
753 | - | |
754 | - if ($result) { | |
755 | - $bConfigWritten = 1; | |
756 | - } | |
757 | - } | |
758 | - | |
759 | -?> | |
760 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
761 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
762 | -<head> | |
763 | - <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET; ?>" /> | |
764 | - <title><?php echo _TITLE; ?></title> | |
765 | - <style>@import url('nucleus/styles/manual.css');</style> | |
766 | -</head> | |
767 | -<body> | |
768 | - <div style='text-align:center'><img src='./nucleus/styles/logo.gif' /></div> <!-- Nucleus logo --> | |
769 | - | |
770 | -<?php | |
771 | - $aAllErrors = array_merge($aSkinErrors, $aPlugErrors); | |
772 | - | |
773 | - if (count($aAllErrors) > 0) { | |
774 | - echo '<h1>' . _TITLE2 . '</h1>'; | |
775 | - echo '<ul><li>' . implode('</li><li>', $aAllErrors) . '</li></ul>'; | |
776 | - } | |
777 | - | |
778 | - if (!$bConfigWritten) { ?> | |
779 | - <h1><?php echo _TITLE3; ?></h1> | |
780 | - | |
781 | - <? echo _TEXT10; ?> | |
782 | - | |
783 | - <pre><code><?php | |
784 | - // mySQL connection information | |
785 | - $MYSQL_HOST = '<b><?php echo $mysql_host?></b>'; | |
786 | - $MYSQL_USER = '<b><?php echo $mysql_user?></b>'; | |
787 | - $MYSQL_PASSWORD = '<i><b>xxxxxxxxxxx</b></i>'; | |
788 | - $MYSQL_DATABASE = '<b><?php echo $mysql_database?></b>'; | |
789 | - $MYSQL_PREFIX = '<b><?php echo ($mysql_usePrefix == 1)?$mysql_prefix:''?></b>'; | |
790 | - | |
791 | - // main nucleus directory | |
792 | - $DIR_NUCLEUS = '<b><?php echo $config_adminpath?></b>'; | |
793 | - | |
794 | - // path to media dir | |
795 | - $DIR_MEDIA = '<b><?php echo $config_mediapath?></b>'; | |
796 | - | |
797 | - // extra skin files for imported skins | |
798 | - $DIR_SKINS = '<b><?php echo $config_skinspath?></b>'; | |
799 | - | |
800 | - // these dirs are normally sub dirs of the nucleus dir, but | |
801 | - // you can redefine them if you wish | |
802 | - $DIR_PLUGINS = $DIR_NUCLEUS . 'plugins/'; | |
803 | - $DIR_LANG = $DIR_NUCLEUS . 'language/'; | |
804 | - $DIR_LIBS = $DIR_NUCLEUS . 'libs/'; | |
805 | - | |
806 | - // include libs | |
807 | - include($DIR_LIBS . 'globalfunctions.php'); | |
808 | - if (!extension_loaded('mbstring')) { | |
809 | - include($DIR_LIBS . 'mb_emulator/mb-emulator.php'); | |
810 | - } | |
811 | -?></code></pre> | |
812 | - | |
813 | - <?php echo _TEXT11; ?> | |
814 | - | |
815 | - <div class="note"> | |
816 | - <?php echo _TEXT12; ?> | |
817 | - </div> | |
818 | - | |
819 | -<?php } else { ?> | |
820 | - | |
821 | - <h1><?php echo _TITLE4; ?></h1> | |
822 | - | |
823 | - <?php echo _TEXT13; ?> | |
824 | - | |
825 | -<?php } ?> | |
826 | - | |
827 | - <h1><?php echo _TITLE5; ?></h1> | |
828 | - | |
829 | - <?php echo _TEXT14; ?> | |
830 | - | |
831 | - <ul> | |
832 | - <li><?php echo _TEXT14_L1; ?></li> | |
833 | - <li><?php echo _TEXT14_L2; ?></li> | |
834 | - </ul> | |
835 | - | |
836 | - <h1><?php echo _HEADER10; ?></h1> | |
837 | - | |
838 | - <?php echo _TEXT15; ?> | |
839 | - | |
840 | - <ul> | |
841 | - <li><?php echo _TEXT15_L1; ?></li> | |
842 | - <li><?php echo _TEXT15_L2; ?></li> | |
843 | - </ul> | |
844 | - | |
845 | - <?php echo _TEXT15_EX; ?> | |
846 | - | |
847 | - <h1><?php echo _HEADER11; ?></h1> | |
848 | - | |
849 | - <p><?php echo _TEXT16; ?> | |
850 | - <ul> | |
851 | - <li><a href="<?php echo $config_adminurl?>"><?php echo _TEXT16_L1; ?></a></li> | |
852 | - <li><a href="<?php echo $config_indexurl?>"><?php echo _TEXT16_L2; ?></a></li> | |
853 | - </ul> | |
854 | - </p> | |
855 | - | |
856 | -</body> | |
857 | -</html> | |
858 | - | |
859 | -<?php | |
860 | -} | |
861 | - | |
862 | -function installCustomPlugs(&$manager) { | |
863 | - global $aConfPlugsToInstall, $DIR_LIBS; | |
864 | - | |
865 | - $aErrors = array(); | |
866 | - | |
867 | - if (count($aConfPlugsToInstall) == 0) { | |
868 | - return $aErrors; | |
869 | - } | |
870 | - | |
871 | - $res = sql_query('SELECT * FROM ' . sql_table('plugin') ); | |
872 | - $numCurrent = mysql_num_rows($res); | |
873 | - | |
874 | - foreach ($aConfPlugsToInstall as $plugName) { | |
875 | - // do this before calling getPlugin (in case the plugin id is used there) | |
876 | - $query = 'INSERT INTO ' . sql_table('plugin') . ' (porder, pfile) VALUES (' . (++$numCurrent) . ', "' . addslashes($plugName) . '")'; | |
877 | - sql_query($query); | |
878 | - | |
879 | - // get and install the plugin | |
880 | - $manager->clearCachedInfo('installedPlugins'); | |
881 | - $plugin =& $manager->getPlugin($plugName); | |
882 | - $plugin->plugid = $numCurrent; | |
883 | - | |
884 | - if (!$plugin) { | |
885 | - sql_query('DELETE FROM ' . sql_table('plugin') . ' WHERE pfile=\'' . addslashes($plugName) . '\''); | |
886 | - $numCurrent--; | |
887 | - array_push($aErrors, _ERROR22 . $plugName); | |
888 | - continue; | |
889 | - } | |
890 | - | |
891 | - $plugin->install(); | |
892 | - } | |
893 | - | |
894 | - // SYNC PLUGIN EVENT LIST | |
895 | - sql_query('DELETE FROM ' . sql_table('plugin_event') ); | |
896 | - | |
897 | - // loop over all installed plugins | |
898 | - $res = sql_query('SELECT pid, pfile FROM ' . sql_table('plugin') ); | |
899 | - | |
900 | - while($o = mysql_fetch_object($res) ) { | |
901 | - $pid = $o->pid; | |
902 | - $plug =& $manager->getPlugin($o->pfile); | |
903 | - | |
904 | - if ($plug) { | |
905 | - $eventList = $plug->getEventList(); | |
906 | - | |
907 | - foreach ($eventList as $eventName) { | |
908 | - sql_query('INSERT INTO ' . sql_table('plugin_event') . ' (pid, event) VALUES (' . $pid . ', \'' . $eventName . '\')'); | |
909 | - } | |
910 | - } | |
911 | - } | |
912 | - | |
913 | - return $aErrors; | |
914 | -} | |
915 | - | |
916 | -function installCustomSkins(&$manager) { | |
917 | - global $aConfSkinsToImport, $DIR_LIBS, $DIR_SKINS; | |
918 | - | |
919 | - $aErrors = array(); | |
920 | - | |
921 | - if (count($aConfSkinsToImport) == 0) { | |
922 | - return $aErrors; | |
923 | - } | |
924 | - | |
925 | - // load skinie class | |
926 | - include_once($DIR_LIBS . 'skinie.php'); | |
927 | - | |
928 | - $importer = new SKINIMPORT(); | |
929 | - | |
930 | - foreach ($aConfSkinsToImport as $skinName) { | |
931 | - $importer->reset(); | |
932 | - $skinFile = $DIR_SKINS . $skinName . '/skinbackup.xml'; | |
933 | - | |
934 | - if (!@file_exists($skinFile) ) { | |
935 | - array_push($aErrors, _ERROR23_1 . $skinFile . ' : ' . _ERROR23_2); | |
936 | - continue; | |
937 | - } | |
938 | - | |
939 | - $error = $importer->readFile($skinFile); | |
940 | - | |
941 | - if ($error) { | |
942 | - array_push($aErrors, _ERROR24 . $skinName . ' : ' . $error); | |
943 | - continue; | |
944 | - } | |
945 | - | |
946 | - $error = $importer->writeToDatabase(1); | |
947 | - | |
948 | - if ($error) { | |
949 | - array_push($aErrors, _ERROR24 . $skinName . ' : ' . $error); | |
950 | - continue; | |
951 | - } | |
952 | - } | |
953 | - | |
954 | - return $aErrors; | |
955 | -} | |
956 | - | |
957 | -// give an error if one or more nucleus are not accessible | |
958 | -function doCheckFiles() { | |
959 | - $missingfiles = array(); | |
960 | - $files = array( | |
961 | - 'install.sql', | |
962 | - 'index.php', | |
963 | - 'action.php', | |
964 | - 'nucleus/index.php', | |
965 | - 'nucleus/libs/globalfunctions.php', | |
966 | - 'nucleus/libs/ADMIN.php', | |
967 | - 'nucleus/libs/BLOG.php', | |
968 | - 'nucleus/libs/COMMENT.php', | |
969 | - 'nucleus/libs/COMMENTS.php', | |
970 | - 'nucleus/libs/ITEM.php', | |
971 | - 'nucleus/libs/MEMBER.php', | |
972 | - 'nucleus/libs/SKIN.php', | |
973 | - 'nucleus/libs/TEMPLATE.php', | |
974 | - 'nucleus/libs/MEDIA.php', | |
975 | - 'nucleus/libs/ACTIONLOG.php', | |
976 | - 'nucleus/media.php' | |
977 | - ); | |
978 | - | |
979 | - $count = count($files); | |
980 | - | |
981 | - for ($i = 0; $i < $count; $i++) { | |
982 | - if (!is_readable($files[$i]) ) { | |
983 | - array_push($missingfiles, _ERROR25_1 . $files[$i] . _ERROR25_2); | |
984 | - } | |
985 | - } | |
986 | - | |
987 | -// The above code replaces several if statements of the form: | |
988 | - | |
989 | -// if (!is_readable('install.sql') ) { | |
990 | -// array_push($missingfiles, 'File <b>install.sql</b> is missing or not readable'); | |
991 | -// } | |
992 | - | |
993 | - if (count($missingfiles) > 0) { | |
994 | - showErrorMessages($missingfiles); | |
995 | - } | |
996 | -} | |
997 | - | |
998 | -function updateConfig($name, $val) { | |
999 | - $name = addslashes($name); | |
1000 | - $val = trim(addslashes($val) ); | |
1001 | - | |
1002 | - $query = 'UPDATE ' . tableName('nucleus_config') | |
1003 | - . " SET value = '$val'" | |
1004 | - . " WHERE name = '$name'"; | |
1005 | - | |
1006 | - mysql_query($query) or _doError(_ERROR26 . ': ' . mysql_error() ); | |
1007 | - return mysql_insert_id(); | |
1008 | -} | |
1009 | - | |
1010 | -function replaceDoubleBackslash($input) { | |
1011 | - return str_replace('\\', '/', $input); | |
1012 | -} | |
1013 | - | |
1014 | -function endsWithSlash($s) { | |
1015 | - return (strrpos($s, '/') == strlen($s) - 1); | |
1016 | -} | |
1017 | - | |
1018 | -/** | |
1019 | - * Checks if email address is valid | |
1020 | - */ | |
1021 | -function _isValidMailAddress($address) { | |
1022 | - if (preg_match("/^[a-zA-Z0-9\._-]+@+[A-Za-z0-9\._-]+\.+[A-Za-z]{2,4}$/", $address) ) { | |
1023 | - return 1; | |
1024 | - } else { | |
1025 | - return 0; | |
1026 | - } | |
1027 | -} | |
1028 | - | |
1029 | -// returns true if the given string is a valid shortname | |
1030 | -// (to check short blog names and nicknames) | |
1031 | -// logic: starts and ends with a non space, can contain spaces in between | |
1032 | -// min 2 chars | |
1033 | -function _isValidShortName($name) { | |
1034 | - if (eregi("^[a-z0-9]+$", $name) ) { | |
1035 | - return 1; | |
1036 | - } else { | |
1037 | - return 0; | |
1038 | - } | |
1039 | -} | |
1040 | - | |
1041 | - | |
1042 | - | |
1043 | -// returns true if the given string is a valid display name | |
1044 | -// (to check nicknames) | |
1045 | -function _isValidDisplayName($name) { | |
1046 | - if (eregi("^[a-z0-9]+[a-z0-9 ]*[a-z0-9]+$", $name) ) { | |
1047 | - return 1; | |
1048 | - } else { | |
1049 | - return 0; | |
1050 | - } | |
1051 | -} | |
1052 | - | |
1053 | -function _doError($msg) { | |
1054 | - ?> | |
1055 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
1056 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
1057 | -<head> | |
1058 | - <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET ?>" /> | |
1059 | - <title><?php echo _TITLE; ?></title> | |
1060 | - <style>@import url('nucleus/styles/manual.css');</style> | |
1061 | -</head> | |
1062 | -<body> | |
1063 | - <div style='text-align:center'><img src='./nucleus/styles/logo.gif' /></div> <!-- Nucleus logo --> | |
1064 | - <h1><?php echo _ERROR27; ?></h1> | |
1065 | - | |
1066 | - <p><?php echo _ERROR28; ?>: "<?php echo $msg?>";</p> | |
1067 | - | |
1068 | - <p><a href="install.php" onclick="history.back();"><?php echo _TEXT17; ?></a></p> | |
1069 | -</body> | |
1070 | -</html> | |
1071 | - | |
1072 | -<?php | |
1073 | - exit; | |
1074 | -} | |
1075 | - | |
1076 | -function showErrorMessages($errors) { | |
1077 | - ?> | |
1078 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
1079 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
1080 | -<head> | |
1081 | - <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET ?>" /> | |
1082 | - <title><?php echo _TITLE; ?></title> | |
1083 | - <style>@import url('nucleus/styles/manual.css');</style> | |
1084 | -</head> | |
1085 | -<body> | |
1086 | - <div style='text-align:center'><img src='./nucleus/styles/logo.gif' /></div> <!-- Nucleus logo --> | |
1087 | - <h1><?php echo _ERROR27; ?></h1> | |
1088 | - | |
1089 | - <p><?php echo _ERROR29; ?>:</p> | |
1090 | - | |
1091 | - <ul> | |
1092 | - | |
1093 | -<?php | |
1094 | - while($msg = array_shift($errors) ) { | |
1095 | - echo '<li>' . $msg . '</li>'; | |
1096 | - } | |
1097 | -?> | |
1098 | - | |
1099 | - </ul> | |
1100 | - | |
1101 | - <p><a href="install.php" onclick="history.back();return false;"><?php echo _TEXT17; ?></a></p> | |
1102 | -</body> | |
1103 | -</html> | |
1104 | - | |
1105 | -<?php | |
1106 | - exit; | |
1107 | -} | |
1108 | - | |
1109 | -/* for the non-php systems that decide to show the contents: | |
1110 | -?></div><?php */ | |
1111 | - | |
1112 | -?> | |
\ No newline at end of file |
@@ -1,346 +0,0 @@ | ||
1 | -<?php | |
2 | -/* | |
3 | - * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/) | |
4 | - * Copyright (C) 2002-2009 The Nucleus Group | |
5 | - * | |
6 | - * This program is free software; you can redistribute it and/or | |
7 | - * modify it under the terms of the GNU General Public License | |
8 | - * as published by the Free Software Foundation; either version 2 | |
9 | - * of the License, or (at your option) any later version. | |
10 | - * (see nucleus/documentation/index.html#license for more info) | |
11 | - */ | |
12 | - | |
13 | -/** | |
14 | - * @license http://nucleuscms.org/license.txt GNU General Public License | |
15 | - * @copyright Copyright (C) 2002-2009 The Nucleus Group | |
16 | - * @version $Id$ | |
17 | - */ | |
18 | -define('_CHARSET', 'EUC-JP'); | |
19 | - | |
20 | -define('_ERROR1', '使用中のPHPはMySQLをサポートしていません :('); | |
21 | -define('_ERROR2', 'データベース名が見つかりません'); | |
22 | -define('_ERROR3', '「データベースプリフィックスを使用する」が選択されていますが、プリフィックスが設定されていません。'); | |
23 | -define('_ERROR4', 'プリフィックスに使用できる文字は A-Z、a-z、0-9 と _(アンダーバー)のみです。'); | |
24 | -define('_ERROR5', 'URLのいづれかが「/(スラッシュ)」で終わっていないか、または機能決定ファイルのURLが「action.php」で終わっていません。'); | |
25 | -define('_ERROR6', '管理エリアのディレクトリパスが「/(スラッシュ)」で終わっていません。'); | |
26 | -define('_ERROR7', 'アップロードしたファイルが格納されるディレクトリパスが「/(スラッシュ)」で終わっていません。'); | |
27 | -define('_ERROR8', 'テーマファイルのディレクトリパスが「/(スラッシュ)」で終わっていません。'); | |
28 | -define('_ERROR9', '管理エリアのディレクトリパスがサーバ上に存在しません。'); | |
29 | -define('_ERROR9_2', '<tt>action.php</tt>ファイルへのURLが別のサーバを指しています。'); | |
30 | -define('_ERROR9_3', '<tt>action.php</tt>ファイルへのURLにファイルが存在しません。'); | |
31 | -define('_ERROR10', 'メールアドレスが不正です。'); | |
32 | -define('_ERROR11', '「表示される名前」に使用できない文字が含まれています。(使用できる文字:a-z と 0-9、最初と最後以外の空白)'); | |
33 | -define('_ERROR12', 'パスワードが入力されていません。'); | |
34 | -define('_ERROR13', '入力された二つのパスワードが一致しませんでした。'); | |
35 | -define('_ERROR14', '「ブログの短縮名(略称)」に使用できない文字が含まれています。(使用できる文字:a-z と 0-9。空白は使用できません)'); | |
36 | -define('_ERROR15', 'mySQL serverに接続できませんでした。'); | |
37 | -define('_ERROR16', 'データベースを作成できませんでした。作成の権限があるかどうか確認してください。SQL エラーの内容:'); | |
38 | -define('_ERROR17', 'データベースを見つけられませんでした。データベースが存在するか確認してください。'); | |
39 | -define('_ERROR18', '次のクエリの実行中にエラーが発生しました:'); | |
40 | -define('_ERROR19', '「メンバー設定」の実行中にエラーが発生しました:'); | |
41 | -define('_ERROR20', '「blog設定」の実行中にエラーが発生しました:'); | |
42 | -define('_ERROR21', '次のクエリの実行中にエラーが発生しました:'); | |
43 | -define('_ERROR22', 'プラグイン「%s」をインストールできませんでした。'); | |
44 | -define('_ERROR23_1', 'テーマファイル「%s」が読み込めませんでした。'); | |
45 | -define('_ERROR23_2', 'ファイルが見つかりません。'); | |
46 | -define('_ERROR24', 'テーマ「%s」をインポート出来ませんでした。'); | |
47 | -define('_ERROR25_1', 'プログラムのコアファイル <b>'); | |
48 | -define('_ERROR25_2', '</b> が見つからない、もしくは読み出し禁止になっています。'); | |
49 | -define('_ERROR26', '設定の更新中にエラーが発生しました。実行したクエリは次の通りです:'); | |
50 | -define('_ERROR27', 'エラー!'); | |
51 | -define('_ERROR28', 'エラーメッセージは次の通りです:'); | |
52 | -define('_ERROR29', '複数のエラーを発見しました'); | |
53 | -define('_ERROR30', 'クエリの実行中にエラーが発生しました:'); | |
54 | - | |
55 | -define('_NOTIFICATION1', '判別不能'); | |
56 | - | |
57 | -define('_TITLE', 'Nucleusのインストール'); | |
58 | -define('_TITLE2', 'テーマ・プラグインのインストールエラー'); | |
59 | -define('_TITLE3', 'インストールはほぼ完了しました!'); | |
60 | -define('_TITLE4', 'インストールは完了しました!'); | |
61 | -define('_TITLE5', 'スパムとの戦い'); | |
62 | - | |
63 | -define('_HEADER1', 'Nucleusのインストール'); | |
64 | -define('_TEXT1', '<p>このスクリプトはNucleusのインストールを手助けします。MySQLテーブルのセットアップと、<i>config.php</i>に入力するための情報を表示します(config.phpのパーミッションを0666にしておけば、後者の作業は自動的に行われます)。これをなす為に、いくつかの情報を入力する必要があります。</p><p>すべての欄の入力が必要です。オプション情報は、インストールが完了後Nucleusの管理領域から設定可能です。</p>'); | |
65 | - | |
66 | -define('_HEADER2', 'PHP と MySQL のバージョン'); | |
67 | -define('_TEXT2', '<p>以下はあなたのウェブホストにおけるPHPとMySQLサーバーのバージョンです。Nucleusのサポートフォーラムに問題を報告する時は、この情報を書き添えてください。</p>'); | |
68 | -define('_TEXT2_WARN', ' 注意: Nucleusの動作には少なくともバージョン %s が必要です'); | |
69 | -define('_TEXT2_WARN2', ' 注意: Nucleusの動作には少なくともバージョン %s が必要です'); | |
70 | -define('_TEXT2_WARN3', '警告! 動作しているPHPのバージョンが古いようです!次にリリースされるNucleusCMSではPHP4はサポートされません!早急にPHP5にアップグレードしてください!'); | |
71 | - | |
72 | -define('_HEADER3', '<i>config.php</i>の自動設定'); | |
73 | -define('_TEXT3', '<em>config.php</em>のパーミッションを<strong>666</strong>にしておけば、スクリプトが自動で設定情報を書き込みます。ただし、Nucleusのインストール完了後、<strong><em style="font-color:#f00;">必ず</em></strong>パーミッションを<strong>444</strong>に変更してください(<a href="nucleus/documentation/tips.html#filepermissions">パーミッション変更の簡易ガイド</a>)。</p><p>スクリプトに書き込み権限を与えなくても、インストール中に<em>config.php</em>に書き込むべき内容が表示されるので、内容を書き換えてFTP等でアップロードすれば問題ありません。'); | |
74 | - | |
75 | -define('_HEADER4', 'MySQLのログインデータ'); | |
76 | -define('_TEXT4', '<p>MySQLのデータを以下に入力してください。それらはデータベース・テーブルを作成し情報を入力するために必要なものです。後で、<i>config.php</i>にも記入する必要があります(上記の自動設定を利用する場合、その手順は省略されます)。</p><p>もしこの情報がわからなければ、システム管理者かホスティング元に連絡をとってください。ほとんどの場合、ホスト名は「localhost」です。もしNucleusがあなたのサーバのPHP設定から「default MySQL host」を検知したなら、「ホスト名」に既に記入されているはずです。もっとも、この情報が正確であるという保証はありません。</p>'); | |
77 | -define('_TEXT4_TAB_HEAD', '基本のデータベース設定'); | |
78 | -define('_TEXT4_TAB_FIELD1', 'ホスト名:'); | |
79 | -define('_TEXT4_TAB_FIELD2', 'ユーザー名:'); | |
80 | -define('_TEXT4_TAB_FIELD3', 'パスワード:'); | |
81 | -define('_TEXT4_TAB_FIELD4', 'データベース名:'); | |
82 | -define('_TEXT4_TAB_FIELD4_ADD', 'データベースを作成する必要がある'); | |
83 | - | |
84 | -define('_TEXT4_TAB2_HEAD', '高度なデータベース設定'); | |
85 | -define('_TEXT4_TAB2_FIELD', 'テーブル・プリフィックスを使用する:'); | |
86 | -define('_TEXT4_TAB2_ADD', '<p>一つのデータベースに複数のNucleusをインストールし、自分が何をやっているのか理解している場合を除き、<strong>これを変更する必要はありません</strong>。</p><p>Nucleusによって生成されたすべてのデータベーステーブルは、このプリフィックスが頭につきます。</p>'); | |
87 | - | |
88 | -define('_HEADER5', 'ディレクトリとURL'); | |
89 | -define('_TEXT5', '<p>このインストールスクリプトはNucleusがインストールされているディレクトリとURLを見つけようとしました。下の値をチェックして必要なら訂正してください。ファイルへのパスとURLはスラッシュ\'/\'で終わらなくてはなりません。</p>'); | |
90 | - | |
91 | -define('_TEXT5_TAB_HEAD', 'ディレクトリとURL'); | |
92 | -define('_TEXT5_TAB_FIELD1', 'サイトの<strong>URL</strong>:'); | |
93 | -define('_TEXT5_TAB_FIELD2', '管理エリアの<strong>URL</strong>:'); | |
94 | -define('_TEXT5_TAB_FIELD3', '管理エリアの<strong>ディレクトリ</strong>:'); | |
95 | -define('_TEXT5_TAB_FIELD4', 'アップロードしたファイルが格納される<strong>URL</strong>:'); | |
96 | -define('_TEXT5_TAB_FIELD5', 'アップロードしたファイルが格納される<strong>ディレクトリ</strong>:'); | |
97 | -define('_TEXT5_TAB_FIELD6', 'スキンファイルの<strong>URL</strong>:'); | |
98 | -define('_TEXT5_TAB_FIELD7', 'スキンファイルの<strong>ディレクトリ</strong>:'); | |
99 | -define('_TEXT5_TAB_FIELD7_2', 'インポートしたスキンで使用するファイル'); | |
100 | -define('_TEXT5_TAB_FIELD8', 'プラグインが格納されている<strong>URL</strong>:'); | |
101 | -define('_TEXT5_TAB_FIELD9', '機能決定ファイルの<strong>URL</strong>:'); | |
102 | -define('_TEXT5_TAB_FIELD9_2', '<tt>action.php</tt>ファイルへのhttp://から始まるURL:'); | |
103 | -define('_TEXT5_2', '<p class="note"><strong>付記:</strong> 相対パスではなく<strong>絶対パスを使用してください</strong>。絶対パスはほとんどの場合、<tt>/home/username/public_html/</tt>のようにスラッシュから始まります。よく解らない場合はサーバ管理者に質問してください。</p>'); | |
104 | - | |
105 | -define('_HEADER6', '管理権限をもつユーザー'); | |
106 | -define('_TEXT6', '<p>以下に、サイトの最初のユーザーを作成するための情報を入力してください。</p>'); | |
107 | -define('_TEXT6_TAB_HEAD', 'サイトの管理者:'); | |
108 | -define('_TEXT6_TAB_FIELD1', '表示される名前(ログインID):'); | |
109 | -define('_TEXT6_TAB_FIELD1_2', '使用できる文字:a-z と 0-9、最初と最後以外の空白'); | |
110 | -define('_TEXT6_TAB_FIELD2', '本名(ハンドル名):'); | |
111 | -define('_TEXT6_TAB_FIELD3', 'パスワード:'); | |
112 | -define('_TEXT6_TAB_FIELD4', 'パスワード(確認の為にもういちど入力してください):'); | |
113 | -define('_TEXT6_TAB_FIELD5', 'メールアドレス:'); | |
114 | -define('_TEXT6_TAB_FIELD5_2', '利用可能なメールアドレスを入れてください'); | |
115 | - | |
116 | -define('_HEADER7', 'ブログのデータ'); | |
117 | -define('_TEXT7', '<p>以下に、デフォルトのWeblogを作成するための情報を入力してください。このWeblogの名前は、サイト名としても利用されます。</p>'); | |
118 | -define('_TEXT7_TAB_HEAD', 'ブログのデータ'); | |
119 | -define('_TEXT7_TAB_FIELD1', 'ブログの名前:'); | |
120 | -define('_TEXT7_TAB_FIELD2', 'ブログの短縮名(略称):'); | |
121 | -define('_TEXT7_TAB_FIELD2_2', '使用できる文字:a-z と 0-9、空白は不可'); | |
122 | - | |
123 | -define('_HEADER8', '更新Ping'); | |
124 | -//define('_HEADER8', 'インストールするプラグインとテーマの選択'); | |
125 | -define('_TEXT8_TAB_HEADER', '更新Ping'); | |
126 | -define('_TEXT8_TAB_PLUGINDEP', '以下のプラグインに依存します。%s'); //<addsatona date="2008-09-03" /> | |
127 | -//define('_TEXT8_TAB_HEADER', 'プラグインの選択'); | |
128 | -define('_TEXT8_TAB_HEADER2', 'テーマの選択'); | |
129 | -define('_TEXT8_TAB_FIELD1', '更新Ping送信のために、NP_Pingをインストールしますか?(このプラグインをインストールしなくても、他のプラグインで更新Pingを送信する事は出来ます)'); | |
130 | - | |
131 | -define('_HEADER9', 'データの送信'); | |
132 | -define('_TEXT9', '<p>上に書いてきたデータが正しいか確かめてください。よければデータベース・テーブルと最初のデータを設定するために下のボタンを押してください。少し時間がかかるかもしれませんがご辛抱を。<strong>ボタンをクリックするのは一回だけにしてください。</strong></p>'); | |
133 | - | |
134 | -define('_TEXT10', '<p>データベーステーブルの初期値入力が成功しました。後は<i>config.php</i>を書き換えるだけです。以下に書き換えるべき内容を表示します(mysqlのパスワードはマスクされています。ここは実際のものに書き換えてください)</p>'); | |
135 | -define('_TEXT11', '<p>あなたのコンピュータ上のファイルを書き換えたら、FTPを使ってウェブサーバにアップロードしてください。ASCIIモードで送信してファイルを上書きします。</p>'); | |
136 | -define('_TEXT12', '<b>付記:</b> <i>config.php</i>の最初や終わりにスペースを空けないようにしましょう。実行時にエラーを引き起こす原因となります。<br />したがって、config.phpの最初の文字は "<"で最後の文字は">"としなければなりません。'); | |
137 | -define('_TEXT13', '<p>Nucleusはインストールされ、<code>config.php</code>はアップデートされました。</p><p>セキュリティのため<code>config.php</code>のパーミッションを444に戻すことを忘れないでください(<a href="nucleus/documentation/tips.html#filepermissions">パーミッション変更の簡易ガイド</a>)。</p>'); | |
138 | -define('_TEXT14', '<p>Nucleusは誰でもブログにコメントを残す事が出来る様になっているので、このままではスパマーの温床になる危険があります。以下の方法のによってブログを保護することをお勧めします:</p>'); | |
139 | -define('_TEXT14_L1', 'あなたがコメントを必要としないのであれば、管理エリアから「あなたのブログ」 > 「ブログ設定」 とたどり、 「コメントを許可しますか?」 の設定を「いいえ」にする事で、コメント投稿フォームを非表示にする事が出来ます。'); | |
140 | -define('_TEXT14_L2', 'スパムを撃退・管理する為のプラグインをインストールすることも可能です:<a href="http://japan.nucleuscms.org/wiki/plugins_by_category#section4">Nucleus Japan wiki</a> (ブックマークをお勧めします)'); | |
141 | -define('_HEADER10', 'インストールファイルの削除'); | |
142 | -define('_TEXT15', '<p>ウェブサーバから次のファイルを削除してください:</p>'); | |
143 | -define('_TEXT15_L1', '<b>install.sql</b>:テーブルの構造を内包するファイル'); | |
144 | -define('_TEXT15_L2', '<b>install.php</b>:このファイル'); | |
145 | - | |
146 | -define('_TEXT15_EX', '<p>もしこれらのファイルを削除していなければ、管理領域を開くことが出来ません。</p>'); | |
147 | - | |
148 | -define('_HEADER11', 'ウェブサイトの確認'); | |
149 | -define('_TEXT16', 'ウェブサイトを使う準備が整いました。'); | |
150 | -define('_TEXT16_L1', '管理領域にログインしてサイトの設定を行う'); | |
151 | -define('_TEXT16_L2', 'すぐにサイトへ行ってみる'); | |
152 | - | |
153 | -define('_TEXT17', '戻る'); | |
154 | - | |
155 | -define('_BUTTON1', 'Nucleus CMSのインストール'); | |
156 | - | |
157 | -// General category | |
158 | -define('_GENERALCAT_NAME', '総合'); | |
159 | -define('_GENERALCAT_DESC', '投稿した記事に合うカテゴリが無い時にこのカテゴリを使用すると良いでしょう'); | |
160 | - | |
161 | -define('_1ST_POST_TITLE', 'Nucleus CMS バージョン3.4へようこそ'); | |
162 | -define('_1ST_POST', 'ウェブページの作成を補助する積み木がここにあります。それは心躍るblogになるかもしれませんし、観るものを和ませる家族のページになるかもしれませんし、実り多き趣味のサイトになるかもしれません。あるいは現在のあなたには想像がつかないものになることだってあるでしょう。<br /> | |
163 | -<br />用途が思いつきませんでしたか? それならここへ来て正解です。なぜならあなた同様私たちにもわからないのですから。'); | |
164 | -define('_1ST_POST2', 'これはサイトにおける最初のエントリーです。スタートを切りやすいように、リンクと情報を入れておきました。<br /> | |
165 | -<br /> | |
166 | -この記事を削除することもできますが、どちらにせよ記事を追加していくことによってやがてメインページからは見えなくなります。Nucleusを扱ううちに生じたメモをコメントとして追加し、将来アクセスできるようにこのページをブックマークしておくのも手です。<br /> | |
167 | -<br /> | |
168 | -<b>リンク</b><br /> | |
169 | -<br /> | |
170 | -Nucleus CMSの<a href="http://nucleuscms.org">本家</a>と<a href="http://japan.nucleuscms.org">日本語公式</a>ページ。<br /> | |
171 | -<br /> | |
172 | -Nucleus CMSのSourceForge<a href="http://sourceforge.net/projects/nucleuscms/">プロジェクト</a>(<a href="http://sourceforge.jp/projects/nucleus-jp/">日本版</a>)ページ。<br /> | |
173 | -<br /> | |
174 | -Nucleus CMSのプラグイン<a href="http://wakka.xiffy.nl/Plugin/">倉庫</a>と<a href="http://japan.nucleuscms.org/wiki/plugins">日本語のリスト</a>ページ。<br /> | |
175 | -<br /> | |
176 | -<b>ドキュメント - <a href="http://docs.nucleuscms.org/">docs.nucleuscms.org</a></b><br /> | |
177 | -<br /> | |
178 | -Nucleusの<a href="http://japan.nucleuscms.org/faq.php">FAQ(よくある質問集)</a>(<a href="http://nucleuscms.org/faq.php">原文</a>)ページ。<br /> | |
179 | -<br /> | |
180 | -インストール方法等は<a href="nucleus/documentation/">ユーザー向け</a>と<a href="nucleus/documentation/devdocs/">開発者向け</a>文書がファイルに含まれています。<br /> | |
181 | -<br /> | |
182 | -ポップアップ<a href="./nucleus/documentation/help.html">ヘルプ</a>が管理エリアのいたるところにあり、サイトのカスタマイズやデザインを手助けしてくれることでしょう。<br /> | |
183 | -<br /> | |
184 | -一度用意されているドキュメントに目を通したら、<a href="http://wiki.nucleuscms.org/">Wiki</a>(<a href="http://japan.nucleuscms.org/wiki/">日本版</a>)を訪れてください。ユーザーの書いたハウツーや小技が掲載されています。<br /> | |
185 | -<br /> | |
186 | -<b>サポート</b><br /> | |
187 | -<br /> | |
188 | -<a href="http://forum.nucleuscms.org/">forum.nucleuscms.org</a>(本家)<br /> | |
189 | -<a href="http://japan.nucleuscms.org/bb/">japan.nucleuscms.org/bb/</a>(日本版)<br /> | |
190 | -<br /> | |
191 | -<a href="http://forum.nucleuscms.org/groupcp.php?g=3">moderators</a>とサポートフォーラムで活動する全てのボランティアに感謝します。<br /> | |
192 | -<br /> | |
193 | -- <a href="http://edmondhui.homeip.net/blog/">admun</a> - Ottawa, ON, Canada <br /> | |
194 | -- <a href="http://www.tamizhan.com/">anand</a> - Bangalore, India<br /> | |
195 | -- <a href="http://hcgtv.com">hcgtv</a> - Miami, Florida, USA<br /> | |
196 | -- <a href="http://www.adrenalinsports.nl/">ikeizer</a> - Maastricht<br /> | |
197 | -- <a href="http://www.tipos.com.br/">moraes</a> - Brazil<br /> | |
198 | -- <a href="http://roelg.nl/">roel </a>- The Netherlands<br /> | |
199 | -- <a href="http://budts.be/weblog/">TeRanEX </a>- Ekeren, Antwerp, Belgium<br /> | |
200 | -- <a href="http://www.trentadams.com/">Trent </a>- Alberta, Canada<br /> | |
201 | -- <a href="http://xiffy.nl/weblog/">xiffy </a>- Deventer<br /> | |
202 | -<br /> | |
203 | -もし手助けが必要なら、1400を超える登録ユーザーのいる私たちのフォーラムに参加してください。23,000を超える投稿された記事を検索できるようになっておりますので、求める答えに数回のクリックでたどり着けるかもしれません。<br /> | |
204 | -<br /> | |
205 | -<b>Personalization - <a href="http://skins.nucleuscms.org/">skins.nucleuscms.org</a></b><br /> | |
206 | -<br /> | |
207 | -マルチウェブログとスキン/テンプレートの組み合わせは強力な相乗効果を生み出します。個人的なサイト作成、友人や親戚あるいはクライアントに対するサイトデザインいずれに対してもです。<br /> | |
208 | -<br /> | |
209 | -636の登録された<a href="http://nucleuscms.org/sites.php">Nucleusで運用されているサイト</a>(<a href="http://japan.nucleuscms.org/sites.php">日本版</a>)の中から特色あるサイトをサンプルとしてご紹介します。<br /> | |
210 | -<br /> | |
211 | -The Zen of Nucleus<br /> | |
212 | -- <a href="http://beefcake.nl/">beefcake.nl</a> - Beefcake | Nuke the whales!<br /> | |
213 | -- <a href="http://www.leng-lui.com//">leng-lui.com</a> - Leng-Lui.com - v7.0: "Memento"<br /> | |
214 | -<br /> | |
215 | -Personal blogs<br /> | |
216 | -- <a href="http://bloggard.com/">bloggard.com</a> - The Adventures of Bloggard<br /> | |
217 | -- <a href="http://battleangel.org/">battleangel.org</a> - Giving meaning to the meaningless<br /> | |
218 | -- <a href="http://www.yetanotherblog.de/">yetanotherblog.de</a> - Yet Another Blog<br /> | |
219 | -<br /> | |
220 | -Multi user blogs<br /> | |
221 | -- <a href="http://tipos.com.br/">tipos.com.br</a> - Blogging community<br /> | |
222 | -<br /> | |
223 | -Hobby, Travel and News sites<br /> | |
224 | -- <a href="http://adrenalinsports.nl/">adrenalinsports.nl</a> - Extreme sports<br /> | |
225 | -- <a href="http://hsbluebird.com/">hsbluebird.com</a> - Hot Springs, Montana\'\'s Online Resource <br /> | |
226 | -- <a href="http://groningen-info.de/">groningen-info.de</a> - Neues aus Groningen. Fr Leute aus Duitsland.<br /> | |
227 | -- <a href="http://www.americandaily.com/">americandaily.com</a> - American Daily - Home<br /> | |
228 | -<br /> | |
229 | -<b>Nucleus Developer Network - <a href="http://dev.nucleuscms.org/">dev.nucleuscms.org</a></b><br /> | |
230 | -<br /> | |
231 | -The NUDN is a hub for developer sites and programming resources.<br /> | |
232 | -<br /> | |
233 | -NUDN satellite sites, handles, location and UTC offset:<br /> | |
234 | -- <a href="http://karma.nucleuscms.org/">karma</a> - Izegem +02<br /> | |
235 | -- <a href="http://hcgtv.net/">hcgtv</a> - Miami -05<br /> | |
236 | -- <a href="http://edmondhui.homeip.net/blog/nudn.php">admun</a> - Ottawa -04<br /> | |
237 | -- <a href="http://dev.budts.be/nucleus/">TeRanEX</a> - Ekeren +02<br /> | |
238 | -<br /> | |
239 | -Sourceforge.net graciously hosts our <a href="http://sourceforge.net/projects/nucleuscms/">CVS repository</a>.<br /> | |
240 | -<br /> | |
241 | -Want to play around or test changes, visit our demo site at <a href="http://demo.nucleuscms.org/">demo.nucleuscms.org</a>.<br /> | |
242 | -<br /> | |
243 | -Not sure what plugins to use, visit the <a href="http://showcase.trentadams.com/">showcase site</a> where you can see plugins at play in their native habitat.<br /> | |
244 | -<br /> | |
245 | -Then visit the plugin repository at <a href="http://plugins.nucleuscms.org/">plugins.nucleuscms.org</a> for download and installation instructions.<br /> | |
246 | -<br /> | |
247 | -<b>寄付者一覧</b><br /> | |
248 | -<br /> | |
249 | -以下の<a href="http://nucleuscms.org/donators.php">素晴らしい人々</a>による<a href="http://nucleuscms.org/donate.php">援助</a>感謝を捧げます。<em>ありがとう!</em><br /> | |
250 | -<br /> | |
251 | -- <a href="http://reddustrec.net/">dkex</a><br /> | |
252 | -- <a href="http://www.uncoverthenet.com/">Uncover the Net</a><br /> | |
253 | -- <a href="http://www.webatlas.org/">Web Atlas</a><br /> | |
254 | -- <a href="http://www.ipnlighting.com/">IPN Lighting</a><br /> | |
255 | -- <a href="http://blog.datoka.jp/">Yu (blog.datoka.jp)</a><br /> | |
256 | -- <a href="http://www.thegadgetreview.com/">Sony Gadgets and Reviews</a><br /> | |
257 | -- <a href="http://sites.proliphus.com/blueZhift/blog/">Thomas McKibben</a><br /> | |
258 | -- <a href="http://cheapweb.us/">CheapWeb.us</a><br /> | |
259 | -- Robert Seyfriedsberger<br /> | |
260 | -- <a href="http://www.toxicologie.nl/">Toxicologie.nl</a><br /> | |
261 | -- Gordon Shum<br /> | |
262 | -- <a href="http://www.subsim.com/">Neal Stevens</a><br /> | |
263 | -- <a href="http://www.GamblingHelper.com/">GamblingHelper</a><br /> | |
264 | -- Oliver Kirstein<br /> | |
265 | -- <a href="http://www.dominiek.be/">Dominiek</a><br /> | |
266 | -- <a href="http://www.aardschok.net/">Aardschok</a><br /> | |
267 | -- <a href="http://www.nieuwevoordeur.be/">nieuwevoordeur.be</a><br /> | |
268 | -- <a href="http://www.scene24.net/">Scene24</a><br /> | |
269 | -- <a href="http://www.eug.be/">Eug\'\'s Weblog</a><br /> | |
270 | -- <a href="http://www.bloggard.com/">The Adventures of Bloggard</a><br /> | |
271 | -- <a href="http://www.voltos.com/">Arthur Cronos from Voltos</a><br /> | |
272 | -- <a href="http://www.webmaster-toolkit.com/">Free Webmaster Tools and Resources</a><br /> | |
273 | -- <a href="http://www.domilog.be/">Domi\'\'s Weblog</a><br /> | |
274 | -- Infodoma <br /> | |
275 | -- <a href="http://carvingcode.com/">carvingCode.com</a><br /> | |
276 | -- <a href="http://www.traweb.com/">Traweb</a><br /> | |
277 | -- <a href="http://gene.mm2u.com/">Gene\'\'s MoBlog</a><br /> | |
278 | -- <a href="http://interfacethis.com/">InterfaceThis</a><br /> | |
279 | -- <a href="http://www.thefinsters.com/flog/">The Finster Log</a><br /> | |
280 | -- <a href="http://www.mrhop.com/">Hop Nguyen</a><br /> | |
281 | -- <a href="http://www.zwavel.com/~zwavelaars" title="Zwavelaars">Zwavelaars</a><br /> | |
282 | -- <a href="http://beefcake.nl/">Joaquin Scholten</a> <br /> | |
283 | -- <a href="http://www.roelgroeneveld.com/">Roel Groeneveld</a><br /> | |
284 | -- <a href="http://lvb.net/">LVBlog</a><br /> | |
285 | -- <a href="http://xandermol.com/">Xander Mol</a><br /> | |
286 | -- Danilo Massa<br /> | |
287 | -- <a href="http://01FTP.com/">01FTP.com</a><br /> | |
288 | -- <a href="http://www.adrenalinsports.nl/">Irmo Keizer</a><br /> | |
289 | -- <a href="http://www.jasonkrogh.com/">Jason Krogh</a><br /> | |
290 | -- <a href="http://www.higuchi.com/">Osamu Higuchi</a><br /> | |
291 | -- <a href="http://www.trentadams.com/">Trent Adams</a><br /> | |
292 | -- <a href="http://www.ppcw.net/">Arne Hess</a><br /> | |
293 | -- <a href="http://hsbluebird.com/">The Bluebird</a><br /> | |
294 | -- Rainer Bickel<br /> | |
295 | -- Fritz Elfers<br /> | |
296 | -- <a href="http://www.european-wall-tapestries.com/">European Wall Tapestries</a><br /> | |
297 | -- <a href="http://www.jamier.net/">Jamie R. Rytlewski</a><br /> | |
298 | -- Madolyn Piper<br /> | |
299 | -- <a href="http://www.batteryvalues.com/">Battery Values</a><br /> | |
300 | -- <a href="http://www.mixburnrip.de/">Janko Roettgers</a><br /> | |
301 | -- Lukas Loesche<br /> | |
302 | -- <a href="http://www.seobook.com/">SEO Book</a><br /> | |
303 | -- <a href="http://www.brandweerdematen.nl/">Brandweer de Maten</a><br /> | |
304 | -- Andy Fuchs<br /> | |
305 | -- <a href="http://www.sumoforce.com/">Sumoforce</a><br /> | |
306 | -- <a href="http://love.silverindigo.com/">Al\'\'ky\'\'mie</a><br /> | |
307 | -- <a href="http://www.pejo.us/">Peter Johnson</a><br /> | |
308 | -- <a href="http://www.triv.nl/">TriV Internet Solutions</a><br /> | |
309 | -- <a href="http://www.torontomusicians.org/nucleus/">Margaret Stowe</a><br /> | |
310 | -- <a href="http://www.zenkey.org/">zenkey dot org</a><br /> | |
311 | -- <a href="http://www.golb.org/">Blots of Info</a><br /> | |
312 | -- <a href="http://www.zonderpartij.be/">Rudi De Kerpel</a><br /> | |
313 | -- <a href="http://staylorx.com/">Steve Taylor</a><br /> | |
314 | -- <a href="http://lmhcave.com/">Malcolm Farnsworth</a><br /> | |
315 | -- Birgit Kellner<br /> | |
316 | -- <a href="http://www.tobiasly.com/">Toby Johnson</a><br /> | |
317 | -- <a href="http://www.kapingamarangi.be/">Kapingamarangi</a><br /> | |
318 | -- <a href="http://www.pallalink.net/">Pallalink</a><br /> | |
319 | -- <a href="http://publiustx.net/">PubliusTX Weblog</a><br /> | |
320 | -- <a href="http://www.reductioadabsurdum.net/">Reductio Ad Absurdum</a><br /> | |
321 | -- <a href="http://www.gagaweb.org/">GagaWeb</a><br /> | |
322 | -- <a href="http://www.videokid.be/">Videokid</a><br /> | |
323 | -- Jon Marr<br /> | |
324 | -- <a href="http://www.docblog.org/">Luigi Cristiano</a><br /> | |
325 | -- J Keith Lehman<br /> | |
326 | -- Bohemian Cachet<br /> | |
327 | -- Jesus Mourazos<br /> | |
328 | -- <a href="http://ltp-design.com/">Stephen Jones</a><br /> | |
329 | -- <a href="http://oha.nu/">One-Handed Apps</a><br /> | |
330 | -- Alwin Hawkins<br /> | |
331 | -- <a href="http://jstigall.bloomington.in.us">Justin Stigall</a><br /> | |
332 | -- <a href="http://www.itismylife.com/">It is my life</a><br /> | |
333 | -- Greg Morrill<br /> | |
334 | -- <a href="http://www.dutchsubmarines.com/">Dutch Submarines</a><br /> | |
335 | -- <a href="http://www.7thwatch.com/">Seventh Watch Design Studios</a> <br /> | |
336 | -- <a href="http://www.macnet2.com/">MacNetv2</a> <br /> | |
337 | -- Richard Noordhof<br /> | |
338 | -- <a href="http://www.jamier.net/">Jamie Rytlewski</a><br /> | |
339 | -<br /> | |
340 | -Nucleusが気に入りましたか? <a href="http://www.hotscripts.com/Detailed/13368.html?RID=nucleus@demuynck.org">HotScripts</a>や<a href="http://www.opensourcecms.com/index.php?option=content&task=view&id=145">opensourceCMS</a>での投票をお願いします。<br /> | |
341 | -<br /> | |
342 | -<b>ライセンス</b><br /> | |
343 | -<br /> | |
344 | -私たちがフリー・ソフトウェアについて口にする場合は自由のことに言及しているのであって、価格のことではありません。私たちの<a href="http://www.gnu.org/licenses/gpl.html">一般公有使用許諾書</a>(<a href="http://www.gnu.org/licenses/gpl.ja.html">日本語訳</a>と<a href="http://www.atmarkit.co.jp/aig/03linux/gpl.html">概要</a>)は、フリー・ソフトウェアの複製物を自由に頒布できること(そして、望むならこのサービスに対して対価を請求できること)、ソース・コードを実際に受け取るか希望しさえすれば入手することが可能であること、入手したソフトウェアを変更したり新しいフリー・プログラムの一部として使用できること、以上の各内容を行なうことができるということをユーザ自身が知っていることを実現できるようにデザインされています。'); | |
345 | - | |
346 | -?> | |
\ No newline at end of file |
@@ -6190,7 +6190,7 @@ selector(); | ||
6190 | 6190 | * @todo document this |
6191 | 6191 | */ |
6192 | 6192 | function action_pluginupdate() { |
6193 | - global $member, $manager; | |
6193 | + global $member, $manager, $CONF; | |
6194 | 6194 | |
6195 | 6195 | // check if allowed |
6196 | 6196 | $member->isAdmin() or $this->disallow(); |
@@ -6211,7 +6211,7 @@ selector(); | ||
6211 | 6211 | } |
6212 | 6212 | } |
6213 | 6213 | |
6214 | - redirect('?action=pluginlist'); | |
6214 | + redirect($CONF['AdminURL'] . '?action=pluginlist'); | |
6215 | 6215 | // $this->action_pluginlist(); |
6216 | 6216 | } |
6217 | 6217 |
@@ -6241,14 +6241,15 @@ selector(); | ||
6241 | 6241 | <input type="hidden" name="plugid" value="<?php echo $pid; ?>" /> |
6242 | 6242 | <input type="submit" tabindex="10" value="<?php echo _DELETE_CONFIRM_BTN?>" /> |
6243 | 6243 | </div></form> |
6244 | - <?php $this->pagefoot(); | |
6244 | + <?php | |
6245 | + $this->pagefoot(); | |
6245 | 6246 | } |
6246 | 6247 | |
6247 | 6248 | /** |
6248 | 6249 | * @todo document this |
6249 | 6250 | */ |
6250 | 6251 | function action_plugindeleteconfirm() { |
6251 | - global $member, $manager; | |
6252 | + global $member, $manager, $CONF; | |
6252 | 6253 | |
6253 | 6254 | // check if allowed |
6254 | 6255 | $member->isAdmin() or $this->disallow(); |
@@ -6260,7 +6261,7 @@ selector(); | ||
6260 | 6261 | $this->error($error); |
6261 | 6262 | } |
6262 | 6263 | |
6263 | - redirect('?action=pluginlist'); | |
6264 | + redirect($CONF['AdminURL'] . '?action=pluginlist'); | |
6264 | 6265 | // $this->action_pluginlist(); |
6265 | 6266 | } |
6266 | 6267 |
@@ -6342,7 +6343,7 @@ selector(); | ||
6342 | 6343 | * @todo document this |
6343 | 6344 | */ |
6344 | 6345 | function action_pluginup() { |
6345 | - global $member, $manager; | |
6346 | + global $member, $manager, $CONF; | |
6346 | 6347 | |
6347 | 6348 | // check if allowed |
6348 | 6349 | $member->isAdmin() or $this->disallow(); |
@@ -6366,14 +6367,14 @@ selector(); | ||
6366 | 6367 | |
6367 | 6368 | //$this->action_pluginlist(); |
6368 | 6369 | // To avoid showing ticket in the URL, redirect to pluginlist, instead. |
6369 | - redirect('?action=pluginlist'); | |
6370 | + redirect($CONF['AdminURL'] . '?action=pluginlist'); | |
6370 | 6371 | } |
6371 | 6372 | |
6372 | 6373 | /** |
6373 | 6374 | * @todo document this |
6374 | 6375 | */ |
6375 | 6376 | function action_plugindown() { |
6376 | - global $member, $manager; | |
6377 | + global $member, $manager, $CONF; | |
6377 | 6378 | |
6378 | 6379 | // check if allowed |
6379 | 6380 | $member->isAdmin() or $this->disallow(); |
@@ -6399,7 +6400,7 @@ selector(); | ||
6399 | 6400 | |
6400 | 6401 | //$this->action_pluginlist(); |
6401 | 6402 | // To avoid showing ticket in the URL, redirect to pluginlist, instead. |
6402 | - redirect('?action=pluginlist'); | |
6403 | + redirect($CONF['AdminURL'] . '?action=pluginlist'); | |
6403 | 6404 | } |
6404 | 6405 | |
6405 | 6406 | /** |
@@ -19,624 +19,665 @@ | ||
19 | 19 | * @version $NucleusJP: skinie.php,v 1.9.2.1 2007/09/05 07:46:30 kimitake Exp $ |
20 | 20 | */ |
21 | 21 | |
22 | -class SKINIMPORT { | |
23 | - | |
24 | - // hardcoded value (see constructor). When 1, interesting info about the | |
25 | - // parsing process is sent to the output | |
26 | - var $debug; | |
27 | - | |
28 | - // parser/file pointer | |
29 | - var $parser; | |
30 | - var $fp; | |
31 | - | |
32 | - // which data has been read? | |
33 | - var $metaDataRead; | |
34 | - var $allRead; | |
35 | - | |
36 | - // extracted data | |
37 | - var $skins; | |
38 | - var $templates; | |
39 | - var $info; | |
40 | - | |
41 | - // to maintain track of where we are inside the XML file | |
42 | - var $inXml; | |
43 | - var $inData; | |
44 | - var $inMeta; | |
45 | - var $inSkin; | |
46 | - var $inTemplate; | |
47 | - var $currentName; | |
48 | - var $currentPartName; | |
49 | - var $cdata; | |
50 | - | |
51 | - | |
52 | - | |
53 | - /** | |
54 | - * constructor initializes data structures | |
55 | - */ | |
56 | - function SKINIMPORT() { | |
57 | - // disable magic_quotes_runtime if it's turned on | |
58 | - set_magic_quotes_runtime(0); | |
59 | - | |
60 | - // debugging mode? | |
61 | - $this->debug = 0; | |
62 | - | |
63 | - $this->reset(); | |
64 | - | |
65 | - } | |
66 | - | |
67 | - function reset() { | |
68 | - if ($this->parser) | |
69 | - xml_parser_free($this->parser); | |
70 | - | |
71 | - // XML file pointer | |
72 | - $this->fp = 0; | |
73 | - | |
74 | - // which data has been read? | |
75 | - $this->metaDataRead = 0; | |
76 | - $this->allRead = 0; | |
77 | - | |
78 | - // to maintain track of where we are inside the XML file | |
79 | - $this->inXml = 0; | |
80 | - $this->inData = 0; | |
81 | - $this->inMeta = 0; | |
82 | - $this->inSkin = 0; | |
83 | - $this->inTemplate = 0; | |
84 | - $this->currentName = ''; | |
85 | - $this->currentPartName = ''; | |
86 | - | |
87 | - // character data pile | |
88 | - $this->cdata = ''; | |
89 | - | |
90 | - // list of skinnames and templatenames (will be array of array) | |
91 | - $this->skins = array(); | |
92 | - $this->templates = array(); | |
93 | - | |
94 | - // extra info included in the XML files (e.g. installation notes) | |
95 | - $this->info = ''; | |
96 | - | |
97 | - // init XML parser | |
98 | - $this->parser = xml_parser_create(); | |
99 | - xml_set_object($this->parser, $this); | |
100 | - xml_set_element_handler($this->parser, 'startElement', 'endElement'); | |
101 | - xml_set_character_data_handler($this->parser, 'characterData'); | |
102 | - xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); | |
103 | - | |
104 | - } | |
105 | - | |
106 | - /** | |
107 | - * Reads an XML file into memory | |
108 | - * | |
109 | - * @param $filename | |
110 | - * Which file to read | |
111 | - * @param $metaOnly | |
112 | - * Set to 1 when only the metadata needs to be read (optional, default 0) | |
113 | - */ | |
114 | - function readFile($filename, $metaOnly = 0) { | |
115 | - // open file | |
116 | - $this->fp = @fopen($filename, 'r'); | |
117 | - if (!$this->fp) { | |
118 | - return _SKINIE_ERROR_FAILEDOPEN_FILEURL; | |
119 | - } | |
120 | - | |
121 | - // here we go! | |
122 | - $this->inXml = 1; | |
123 | - | |
124 | - $tempbuffer = null; | |
125 | - | |
126 | - while (!feof($this->fp)) { | |
127 | - $tempbuffer .= fread($this->fp, 4096); | |
128 | - } | |
129 | - fclose($this->fp); | |
130 | - $tempcharset = mb_detect_encoding($tempbuffer); | |
131 | - if ($tempcharset != 'UTF-8') { | |
132 | - $tempbuffer = mb_convert_encoding($tempbuffer, 'UTF-8', $tempcharset); | |
133 | - } | |
134 | - | |
135 | -/* | |
136 | - [2004-08-04] dekarma - Took this out since it messes up good XML if it has skins/templates | |
137 | - with CDATA sections. need to investigate consequences. | |
138 | - see bug [ 999914 ] Import fails (multiple skins in XML/one of them with CDATA) | |
139 | - | |
140 | - // backwards compatibility with the non-wellformed skinbackup.xml files | |
141 | - // generated by v2/v3 (when CDATA sections were present in skins) | |
142 | - // split up those CDATA sections into multiple ones | |
143 | - $tempbuffer = preg_replace_callback( | |
144 | - "/(<!\[CDATA\[[^]]*?<!\[CDATA\[[^]]*)((?:\]\].*?<!\[CDATA.*?)*)(\]\])(.*\]\])/ms", | |
145 | - create_function( | |
146 | - '$matches', | |
147 | - 'return $matches[1] . preg_replace("/(\]\])(.*?<!\[CDATA)/ms","]]]]><![CDATA[$2",$matches[2])."]]]]><![CDATA[".$matches[4];' | |
148 | - ), | |
149 | - $tempbuffer | |
150 | - ); | |
151 | -*/ | |
152 | - $temp = tmpfile(); | |
153 | - fwrite($temp, $tempbuffer); | |
154 | - rewind($temp); | |
155 | - | |
156 | - while ( ($buffer = fread($temp, 4096) ) && (!$metaOnly || ($metaOnly && !$this->metaDataRead))) { | |
157 | - $err = xml_parse( $this->parser, $buffer, feof($temp) ); | |
158 | - if (!$err && $this->debug) { | |
159 | - echo _ERROR . ': ' . xml_error_string(xml_get_error_code($this->parser)) . '<br />'; | |
160 | - } | |
161 | - } | |
162 | - | |
163 | - // all done | |
164 | - $this->inXml = 0; | |
165 | - fclose($temp); | |
166 | - } | |
167 | - | |
168 | - /** | |
169 | - * Returns the list of skin names | |
170 | - */ | |
171 | - function getSkinNames() { | |
172 | - return array_keys($this->skins); | |
173 | - } | |
174 | - | |
175 | - /** | |
176 | - * Returns the list of template names | |
177 | - */ | |
178 | - function getTemplateNames() { | |
179 | - return array_keys($this->templates); | |
180 | - } | |
181 | - | |
182 | - /** | |
183 | - * Returns the extra information included in the XML file | |
184 | - */ | |
185 | - function getInfo() { | |
186 | - return $this->info; | |
187 | - } | |
188 | - | |
189 | - /** | |
190 | - * Writes the skins and templates to the database | |
191 | - * | |
192 | - * @param $allowOverwrite | |
193 | - * set to 1 when allowed to overwrite existing skins with the same name | |
194 | - * (default = 0) | |
195 | - */ | |
196 | - function writeToDatabase($allowOverwrite = 0) { | |
197 | - $existingSkins = $this->checkSkinNameClashes(); | |
198 | - $existingTemplates = $this->checkTemplateNameClashes(); | |
199 | - | |
200 | - // if not allowed to overwrite, check if any nameclashes exists | |
201 | - if (!$allowOverwrite) { | |
202 | - if ((sizeof($existingSkins) > 0) || (sizeof($existingTemplates) > 0)) { | |
203 | - return _SKINIE_NAME_CLASHES_DETECTED; | |
204 | - } | |
205 | - } | |
206 | - | |
207 | - foreach ($this->skins as $skinName => $data) { | |
208 | - // 1. if exists: delete all part data, update desc data | |
209 | - // if not exists: create desc | |
210 | - if (in_array($skinName, $existingSkins)) { | |
211 | - $skinObj = SKIN::createFromName($skinName); | |
212 | - | |
213 | - // delete all parts of the skin | |
214 | - $skinObj->deleteAllParts(); | |
215 | - | |
216 | - // update general info | |
217 | - $skinObj->updateGeneralInfo( | |
218 | - $skinName, | |
219 | - $data['description'], | |
220 | - $data['type'], | |
221 | - $data['includeMode'], | |
222 | - $data['includePrefix'] | |
223 | - ); | |
224 | - } else { | |
225 | - $skinid = SKIN::createNew( | |
226 | - $skinName, | |
227 | - $data['description'], | |
228 | - $data['type'], | |
229 | - $data['includeMode'], | |
230 | - $data['includePrefix'] | |
231 | - ); | |
232 | - $skinObj = new SKIN($skinid); | |
233 | - } | |
234 | - | |
235 | - // 2. add parts | |
236 | - foreach ($data['parts'] as $partName => $partContent) { | |
237 | - $skinObj->update($partName, $partContent); | |
238 | - } | |
239 | - } | |
240 | - | |
241 | - foreach ($this->templates as $templateName => $data) { | |
242 | - // 1. if exists: delete all part data, update desc data | |
243 | - // if not exists: create desc | |
244 | - if (in_array($templateName, $existingTemplates)) { | |
245 | - $templateObj = TEMPLATE::createFromName($templateName); | |
246 | - | |
247 | - // delete all parts of the template | |
248 | - $templateObj->deleteAllParts(); | |
249 | - | |
250 | - // update general info | |
251 | - $templateObj->updateGeneralInfo($templateName, $data['description']); | |
252 | - } else { | |
253 | - $templateid = TEMPLATE::createNew($templateName, $data['description']); | |
254 | - $templateObj = new TEMPLATE($templateid); | |
255 | - } | |
256 | - | |
257 | - // 2. add parts | |
258 | - foreach ($data['parts'] as $partName => $partContent) { | |
259 | - $templateObj->update($partName, $partContent); | |
260 | - } | |
261 | - } | |
262 | - | |
263 | - | |
264 | - } | |
265 | - | |
266 | - /** | |
267 | - * returns an array of all the skin nameclashes (empty array when no name clashes) | |
268 | - */ | |
269 | - function checkSkinNameClashes() { | |
270 | - $clashes = array(); | |
271 | - | |
272 | - foreach ($this->skins as $skinName => $data) { | |
273 | - if (SKIN::exists($skinName)) { | |
274 | - array_push($clashes, $skinName); | |
275 | - } | |
276 | - } | |
277 | - | |
278 | - return $clashes; | |
279 | - } | |
280 | - | |
281 | - /** | |
282 | - * returns an array of all the template nameclashes | |
283 | - * (empty array when no name clashes) | |
284 | - */ | |
285 | - function checkTemplateNameClashes() { | |
286 | - $clashes = array(); | |
287 | - | |
288 | - foreach ($this->templates as $templateName => $data) { | |
289 | - if (TEMPLATE::exists($templateName)) { | |
290 | - array_push($clashes, $templateName); | |
291 | - } | |
292 | - } | |
293 | - | |
294 | - return $clashes; | |
295 | - } | |
296 | - | |
297 | - /** | |
298 | - * Called by XML parser for each new start element encountered | |
299 | - */ | |
300 | - function startElement($parser, $name, $attrs) { | |
301 | - foreach($attrs as $key=>$value) { | |
302 | - $attrs[$key] = htmlspecialchars($value, ENT_QUOTES); | |
303 | - } | |
304 | - | |
305 | - if ($this->debug) { | |
306 | - echo 'START: ' . htmlspecialchars($name, ENT_QUOTES) . '<br />'; | |
307 | - } | |
308 | - | |
309 | - switch ($name) { | |
310 | - case 'nucleusskin': | |
311 | - $this->inData = 1; | |
312 | - break; | |
313 | - case 'meta': | |
314 | - $this->inMeta = 1; | |
315 | - break; | |
316 | - case 'info': | |
317 | - // no action needed | |
318 | - break; | |
319 | - case 'skin': | |
320 | - if (!$this->inMeta) { | |
321 | - $this->inSkin = 1; | |
322 | - $this->currentName = $attrs['name']; | |
323 | - $this->skins[$this->currentName]['type'] = $attrs['type']; | |
324 | - $this->skins[$this->currentName]['includeMode'] = $attrs['includeMode']; | |
325 | - $this->skins[$this->currentName]['includePrefix'] = $attrs['includePrefix']; | |
326 | - $this->skins[$this->currentName]['parts'] = array(); | |
327 | - } else { | |
328 | - $this->skins[$attrs['name']] = array(); | |
329 | - $this->skins[$attrs['name']]['parts'] = array(); | |
330 | - } | |
331 | - break; | |
332 | - case 'template': | |
333 | - if (!$this->inMeta) { | |
334 | - $this->inTemplate = 1; | |
335 | - $this->currentName = $attrs['name']; | |
336 | - $this->templates[$this->currentName]['parts'] = array(); | |
337 | - } else { | |
338 | - $this->templates[$attrs['name']] = array(); | |
339 | - $this->templates[$attrs['name']]['parts'] = array(); | |
340 | - } | |
341 | - break; | |
342 | - case 'description': | |
343 | - // no action needed | |
344 | - break; | |
345 | - case 'part': | |
346 | - $this->currentPartName = $attrs['name']; | |
347 | - break; | |
348 | - default: | |
349 | - echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . htmlspecialchars($name, ENT_QUOTES) . '<br />'; | |
350 | - break; | |
351 | - } | |
352 | - | |
353 | - // character data never contains other tags | |
354 | - $this->clearCharacterData(); | |
355 | - | |
356 | - } | |
357 | - | |
358 | - /** | |
359 | - * Called by the XML parser for each closing tag encountered | |
360 | - */ | |
361 | - function endElement($parser, $name) { | |
362 | - if ($this->debug) { | |
363 | - echo 'END: ' . htmlspecialchars($name, ENT_QUOTES) . '<br />'; | |
364 | - } | |
365 | - | |
366 | - switch ($name) { | |
367 | - case 'nucleusskin': | |
368 | - $this->inData = 0; | |
369 | - $this->allRead = 1; | |
370 | - break; | |
371 | - case 'meta': | |
372 | - $this->inMeta = 0; | |
373 | - $this->metaDataRead = 1; | |
374 | - break; | |
375 | - case 'info': | |
376 | - $this->info = $this->getCharacterData(); | |
377 | - case 'skin': | |
378 | - if (!$this->inMeta) { | |
379 | - $this->inSkin = 0; | |
380 | - } | |
381 | - break; | |
382 | - case 'template': | |
383 | - if (!$this->inMeta) { | |
384 | - $this->inTemplate = 0; | |
385 | - } | |
386 | - break; | |
387 | - case 'description': | |
388 | - if ($this->inSkin) { | |
389 | - $this->skins[$this->currentName]['description'] = $this->getCharacterData(); | |
390 | - } else { | |
391 | - $this->templates[$this->currentName]['description'] = $this->getCharacterData(); | |
392 | - } | |
393 | - break; | |
394 | - case 'part': | |
395 | - if ($this->inSkin) { | |
396 | - $this->skins[$this->currentName]['parts'][$this->currentPartName] = $this->getCharacterData(); | |
397 | - } else { | |
398 | - $this->templates[$this->currentName]['parts'][$this->currentPartName] = $this->getCharacterData(); | |
399 | - } | |
400 | - break; | |
401 | - default: | |
402 | - echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . htmlspecialchars($name, ENT_QUOTES) . '<br />'; | |
403 | - break; | |
404 | - } | |
405 | - $this->clearCharacterData(); | |
406 | - | |
407 | - } | |
408 | - | |
409 | - /** | |
410 | - * Called by XML parser for data inside elements | |
411 | - */ | |
412 | - function characterData ($parser, $data) { | |
413 | - if ($this->debug) { | |
414 | - echo 'NEW DATA: ' . htmlspecialchars($data, ENT_QUOTES) . '<br />'; | |
415 | - } | |
416 | - $this->cdata .= $data; | |
417 | - } | |
418 | - | |
419 | - /** | |
420 | - * Returns the data collected so far | |
421 | - */ | |
422 | - function getCharacterData() { | |
423 | - if (_CHARSET != 'UTF-8') { | |
424 | - return mb_convert_encoding($this->cdata, _CHARSET, 'UTF-8'); | |
425 | - } else { | |
426 | - return $this->cdata; | |
427 | - } | |
428 | - } | |
429 | - | |
430 | - /** | |
431 | - * Clears the data buffer | |
432 | - */ | |
433 | - function clearCharacterData() { | |
434 | - $this->cdata = ''; | |
435 | - } | |
436 | - | |
437 | - /** | |
438 | - * Static method that looks for importable XML files in subdirs of the given dir | |
439 | - */ | |
440 | - function searchForCandidates($dir) { | |
441 | - $candidates = array(); | |
442 | - | |
443 | - $dirhandle = opendir($dir); | |
444 | - while ($filename = readdir($dirhandle)) { | |
445 | - if (@is_dir($dir . $filename) && ($filename != '.') && ($filename != '..')) { | |
446 | - $xml_file = $dir . $filename . '/skinbackup.xml'; | |
447 | - if (file_exists($xml_file) && is_readable($xml_file)) { | |
448 | - $candidates[$filename] = $filename; //$xml_file; | |
449 | - } | |
450 | - | |
451 | - // backwards compatibility | |
452 | - $xml_file = $dir . $filename . '/skindata.xml'; | |
453 | - if (file_exists($xml_file) && is_readable($xml_file)) { | |
454 | - $candidates[$filename] = $filename; //$xml_file; | |
455 | - } | |
456 | - } | |
457 | - } | |
458 | - closedir($dirhandle); | |
459 | - | |
460 | - return $candidates; | |
461 | - | |
462 | - } | |
463 | - | |
464 | - | |
465 | -} | |
466 | - | |
467 | - | |
468 | -class SKINEXPORT { | |
469 | - | |
470 | - var $templates; | |
471 | - var $skins; | |
472 | - var $info; | |
473 | - | |
474 | - /** | |
475 | - * Constructor initializes data structures | |
476 | - */ | |
477 | - function SKINEXPORT() { | |
478 | - // list of templateIDs to export | |
479 | - $this->templates = array(); | |
480 | - | |
481 | - // list of skinIDs to export | |
482 | - $this->skins = array(); | |
483 | - | |
484 | - // extra info to be in XML file | |
485 | - $this->info = ''; | |
486 | - } | |
487 | - | |
488 | - /** | |
489 | - * Adds a template to be exported | |
490 | - * | |
491 | - * @param id | |
492 | - * template ID | |
493 | - * @result false when no such ID exists | |
494 | - */ | |
495 | - function addTemplate($id) { | |
496 | - if (!TEMPLATE::existsID($id)) { | |
497 | - return 0; | |
498 | - } | |
499 | - | |
500 | - | |
501 | - $this->templates[$id] = TEMPLATE::getNameFromId($id); | |
502 | - | |
503 | - return 1; | |
504 | - } | |
505 | - | |
506 | - /** | |
507 | - * Adds a skin to be exported | |
508 | - * | |
509 | - * @param id | |
510 | - * skin ID | |
511 | - * @result false when no such ID exists | |
512 | - */ | |
513 | - function addSkin($id) { | |
514 | - if (!SKIN::existsID($id)) { | |
515 | - return 0; | |
516 | - } | |
517 | - | |
518 | - $this->skins[$id] = SKIN::getNameFromId($id); | |
519 | - | |
520 | - return 1; | |
521 | - } | |
522 | - | |
523 | - /** | |
524 | - * Sets the extra info to be included in the exported file | |
525 | - */ | |
526 | - function setInfo($info) { | |
527 | - $this->info = $info; | |
528 | - } | |
529 | - | |
530 | - | |
531 | - /** | |
532 | - * Outputs the XML contents of the export file | |
533 | - * | |
534 | - * @param $setHeaders | |
535 | - * set to 0 if you don't want to send out headers | |
536 | - * (optional, default 1) | |
537 | - */ | |
538 | - function export($setHeaders = 1) { | |
539 | - if ($setHeaders) { | |
540 | - // make sure the mimetype is correct, and that the data does not show up | |
541 | - // in the browser, but gets saved into and XML file (popup download window) | |
542 | - header('Content-Type: text/xml'); | |
543 | - header('Content-Disposition: attachment; filename="skinbackup.xml"'); | |
544 | - header('Expires: 0'); | |
545 | - header('Pragma: no-cache'); | |
546 | - } | |
547 | - | |
548 | - echo "<nucleusskin>\n"; | |
549 | - | |
550 | - // meta | |
551 | - echo "\t<meta>\n"; | |
552 | - // skins | |
553 | - foreach ($this->skins as $skinId => $skinName) { | |
554 | - $skinName = htmlspecialchars($skinName, ENT_QUOTES); | |
555 | - echo "\t\t" . '<skin name="' . $skinName . '" />' . "\n"; | |
556 | - } | |
557 | - // templates | |
558 | - foreach ($this->templates as $templateId => $templateName) { | |
559 | - $templateName = htmlspecialchars($templateName, ENT_QUOTES); | |
560 | - echo "\t\t" . '<template name="' . $templateName . '" />' . "\n"; | |
561 | - } | |
562 | - // extra info | |
563 | - if ($this->info) | |
564 | - echo "\t\t<info><![CDATA[" . $this->info . "]]></info>\n"; | |
565 | - echo "\t</meta>\n\n\n"; | |
566 | - | |
567 | - // contents skins | |
568 | - foreach ($this->skins as $skinId => $skinName) { | |
569 | - $skinId = intval($skinId); | |
570 | - $skinObj = new SKIN($skinId); | |
571 | - $skinName = htmlspecialchars($skinName, ENT_QUOTES); | |
572 | - $contentT = htmlspecialchars($skinObj->getContentType(), ENT_QUOTES); | |
573 | - $incMode = htmlspecialchars($skinObj->getIncludeMode(), ENT_QUOTES); | |
574 | - $incPrefx = htmlspecialchars($skinObj->getIncludePrefix(), ENT_QUOTES); | |
575 | - $skinDesc = htmlspecialchars($skinObj->getDescription(), ENT_QUOTES); | |
576 | - | |
577 | - echo "\t" . '<skin name="' . $skinName . '" type="' . $contentT . '" includeMode="' . $incMode . '" includePrefix="' . $incPrefx . '">' . "\n"; | |
578 | - | |
579 | - echo "\t\t" . '<description>' . $skinDesc . '</description>' . "\n"; | |
580 | - | |
581 | - $que = 'SELECT' | |
582 | - . ' stype,' | |
583 | - . ' scontent ' | |
584 | - . 'FROM ' | |
585 | - . sql_table('skin') | |
586 | - . ' WHERE' | |
587 | - . ' sdesc = ' . $skinId; | |
588 | - $res = sql_query($que); | |
589 | - while ($partObj = mysql_fetch_object($res)) { | |
590 | - $type = htmlspecialchars($partObj->stype, ENT_QUOTES); | |
591 | - $cdata = $this->escapeCDATA($partObj->scontent); | |
592 | - echo "\t\t" . '<part name="' . $type . '">'; | |
593 | - echo '<![CDATA[' . $cdata . ']]>'; | |
594 | - echo "</part>\n\n"; | |
595 | - } | |
596 | - | |
597 | - echo "\t</skin>\n\n\n"; | |
598 | - } | |
599 | - | |
600 | - // contents templates | |
601 | - foreach ($this->templates as $templateId => $templateName) { | |
602 | - $templateId = intval($templateId); | |
603 | - $templateName = htmlspecialchars($templateName, ENT_QUOTES); | |
604 | - $templateDesc = htmlspecialchars(TEMPLATE::getDesc($templateId), ENT_QUOTES); | |
605 | - | |
606 | - echo "\t" . '<template name="' . $templateName . '">' . "\n"; | |
607 | - | |
608 | - echo "\t\t" . '<description>' . $templateDesc . "</description>\n"; | |
609 | - | |
610 | - $que = 'SELECT' | |
611 | - . ' tpartname,' | |
612 | - . ' tcontent' | |
613 | - . ' FROM ' | |
614 | - . sql_table('template') | |
615 | - . ' WHERE' | |
616 | - . ' tdesc = ' . $templateId; | |
617 | - $res = sql_query($que); | |
618 | - while ($partObj = mysql_fetch_object($res)) { | |
619 | - $type = htmlspecialchars($partObj->tpartname, ENT_QUOTES); | |
620 | - $cdata = $this->escapeCDATA($partObj->tcontent); | |
621 | - echo "\t\t" . '<part name="' . $type . '">'; | |
622 | - echo '<![CDATA[' . $cdata . ']]>'; | |
623 | - echo '</part>' . "\n\n"; | |
624 | - } | |
625 | - | |
626 | - echo "\t</template>\n\n\n"; | |
627 | - } | |
628 | - | |
629 | - echo '</nucleusskin>'; | |
630 | - } | |
631 | - | |
632 | - /** | |
633 | - * Escapes CDATA content so it can be included in another CDATA section | |
634 | - */ | |
635 | - function escapeCDATA($cdata) | |
636 | - { | |
637 | - return preg_replace('/]]>/', ']]]]><![CDATA[>', $cdata); | |
638 | - | |
639 | - } | |
640 | -} | |
641 | - | |
22 | +class SKINIMPORT { | |
23 | + | |
24 | + // hardcoded value (see constructor). When 1, interesting info about the | |
25 | + // parsing process is sent to the output | |
26 | + var $debug; | |
27 | + | |
28 | + // parser/file pointer | |
29 | + var $parser; | |
30 | + var $fp; | |
31 | + | |
32 | + // which data has been read? | |
33 | + var $metaDataRead; | |
34 | + var $allRead; | |
35 | + | |
36 | + // extracted data | |
37 | + var $skins; | |
38 | + var $templates; | |
39 | + var $info; | |
40 | + | |
41 | + // to maintain track of where we are inside the XML file | |
42 | + var $inXml; | |
43 | + var $inData; | |
44 | + var $inMeta; | |
45 | + var $inSkin; | |
46 | + var $inTemplate; | |
47 | + var $currentName; | |
48 | + var $currentPartName; | |
49 | + var $cdata; | |
50 | + | |
51 | + | |
52 | + | |
53 | + /** | |
54 | + * constructor initializes data structures | |
55 | + */ | |
56 | + function SKINIMPORT() { | |
57 | + // disable magic_quotes_runtime if it's turned on | |
58 | + set_magic_quotes_runtime(0); | |
59 | + | |
60 | + // debugging mode? | |
61 | + $this->debug = 0; | |
62 | + | |
63 | + $this->reset(); | |
64 | + | |
65 | + } | |
66 | + | |
67 | + function reset() { | |
68 | + if ($this->parser) | |
69 | + xml_parser_free($this->parser); | |
70 | + | |
71 | + // XML file pointer | |
72 | + $this->fp = 0; | |
73 | + | |
74 | + // which data has been read? | |
75 | + $this->metaDataRead = 0; | |
76 | + $this->allRead = 0; | |
77 | + | |
78 | + // to maintain track of where we are inside the XML file | |
79 | + $this->inXml = 0; | |
80 | + $this->inData = 0; | |
81 | + $this->inMeta = 0; | |
82 | + $this->inSkin = 0; | |
83 | + $this->inTemplate = 0; | |
84 | + $this->currentName = ''; | |
85 | + $this->currentPartName = ''; | |
86 | + | |
87 | + // character data pile | |
88 | + $this->cdata = ''; | |
89 | + | |
90 | + // list of skinnames and templatenames (will be array of array) | |
91 | + $this->skins = array(); | |
92 | + $this->templates = array(); | |
93 | + | |
94 | + // extra info included in the XML files (e.g. installation notes) | |
95 | + $this->info = ''; | |
96 | + | |
97 | + // init XML parser | |
98 | + $this->parser = xml_parser_create(); | |
99 | + xml_set_object($this->parser, $this); | |
100 | + xml_set_element_handler($this->parser, 'startElement', 'endElement'); | |
101 | + xml_set_character_data_handler($this->parser, 'characterData'); | |
102 | + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); | |
103 | + | |
104 | + } | |
105 | + | |
106 | + /** | |
107 | + * Reads an XML file into memory | |
108 | + * | |
109 | + * @param $filename | |
110 | + * Which file to read | |
111 | + * @param $metaOnly | |
112 | + * Set to 1 when only the metadata needs to be read (optional, default 0) | |
113 | + */ | |
114 | + function readFile($filename, $metaOnly = 0) { | |
115 | + // open file | |
116 | + $this->fp = @fopen($filename, 'r'); | |
117 | + if (!$this->fp) { | |
118 | + return _SKINIE_ERROR_FAILEDOPEN_FILEURL; | |
119 | + } | |
120 | + | |
121 | + // here we go! | |
122 | + $this->inXml = 1; | |
123 | + | |
124 | + $tempbuffer = null; | |
125 | + | |
126 | + while (!feof($this->fp)) { | |
127 | + $tempbuffer .= fread($this->fp, 4096); | |
128 | + } | |
129 | + fclose($this->fp); | |
130 | + | |
131 | +/* | |
132 | + [2004-08-04] dekarma - Took this out since it messes up good XML if it has skins/templates | |
133 | + with CDATA sections. need to investigate consequences. | |
134 | + see bug [ 999914 ] Import fails (multiple skins in XML/one of them with CDATA) | |
135 | + | |
136 | + // backwards compatibility with the non-wellformed skinbackup.xml files | |
137 | + // generated by v2/v3 (when CDATA sections were present in skins) | |
138 | + // split up those CDATA sections into multiple ones | |
139 | + $tempbuffer = preg_replace_callback( | |
140 | + "/(<!\[CDATA\[[^]]*?<!\[CDATA\[[^]]*)((?:\]\].*?<!\[CDATA.*?)*)(\]\])(.*\]\])/ms", | |
141 | + create_function( | |
142 | + '$matches', | |
143 | + 'return $matches[1] . preg_replace("/(\]\])(.*?<!\[CDATA)/ms","]]]]><![CDATA[$2",$matches[2])."]]]]><![CDATA[".$matches[4];' | |
144 | + ), | |
145 | + $tempbuffer | |
146 | + ); | |
147 | +*/ | |
148 | + $temp = tmpfile(); | |
149 | +// fwrite($temp, $tempbuffer); | |
150 | + if (!function_exists('mb_convert_encoding')) { | |
151 | + fwrite($temp, $tempbuffer); | |
152 | + } else { | |
153 | + if (strtoupper(_CHARSET) == 'ISO-8859-1') { | |
154 | + fwrite($temp, $tempbuffer); | |
155 | + } else { | |
156 | + mb_detect_order("ASCII, JIS, SJIS, UTF-8, EUC-JP, ISO-8859-1"); | |
157 | + $temp_encode = mb_detect_encoding($tempbuffer); | |
158 | + fwrite($temp, mb_convert_encoding($tempbuffer, 'UTF-8', $temp_encode)); | |
159 | + } | |
160 | + } | |
161 | + rewind($temp); | |
162 | + | |
163 | + while ( ($buffer = fread($temp, 4096) ) && (!$metaOnly || ($metaOnly && !$this->metaDataRead))) { | |
164 | + $err = xml_parse( $this->parser, $buffer, feof($temp) ); | |
165 | + if (!$err && $this->debug) { | |
166 | + echo _ERROR . ': ' . xml_error_string(xml_get_error_code($this->parser)) . '<br />'; | |
167 | + } | |
168 | + } | |
169 | + | |
170 | + // all done | |
171 | + $this->inXml = 0; | |
172 | + fclose($temp); | |
173 | + } | |
174 | + | |
175 | + /** | |
176 | + * Returns the list of skin names | |
177 | + */ | |
178 | + function getSkinNames() { | |
179 | + return array_keys($this->skins); | |
180 | + } | |
181 | + | |
182 | + /** | |
183 | + * Returns the list of template names | |
184 | + */ | |
185 | + function getTemplateNames() { | |
186 | + return array_keys($this->templates); | |
187 | + } | |
188 | + | |
189 | + /** | |
190 | + * Returns the extra information included in the XML file | |
191 | + */ | |
192 | + function getInfo() { | |
193 | + return $this->info; | |
194 | + } | |
195 | + | |
196 | + /** | |
197 | + * Writes the skins and templates to the database | |
198 | + * | |
199 | + * @param $allowOverwrite | |
200 | + * set to 1 when allowed to overwrite existing skins with the same name | |
201 | + * (default = 0) | |
202 | + */ | |
203 | + function writeToDatabase($allowOverwrite = 0) { | |
204 | + $existingSkins = $this->checkSkinNameClashes(); | |
205 | + $existingTemplates = $this->checkTemplateNameClashes(); | |
206 | + | |
207 | + // if not allowed to overwrite, check if any nameclashes exists | |
208 | + if (!$allowOverwrite) { | |
209 | + if ((sizeof($existingSkins) > 0) || (sizeof($existingTemplates) > 0)) { | |
210 | + return _SKINIE_NAME_CLASHES_DETECTED; | |
211 | + } | |
212 | + } | |
213 | + | |
214 | + foreach ($this->skins as $skinName => $data) { | |
215 | + // 1. if exists: delete all part data, update desc data | |
216 | + // if not exists: create desc | |
217 | + if (in_array($skinName, $existingSkins)) { | |
218 | + $skinObj = SKIN::createFromName($skinName); | |
219 | + | |
220 | + // delete all parts of the skin | |
221 | + $skinObj->deleteAllParts(); | |
222 | + | |
223 | + // update general info | |
224 | + $skinObj->updateGeneralInfo( | |
225 | + $skinName, | |
226 | + $data['description'], | |
227 | + $data['type'], | |
228 | + $data['includeMode'], | |
229 | + $data['includePrefix'] | |
230 | + ); | |
231 | + } else { | |
232 | + $skinid = SKIN::createNew( | |
233 | + $skinName, | |
234 | + $data['description'], | |
235 | + $data['type'], | |
236 | + $data['includeMode'], | |
237 | + $data['includePrefix'] | |
238 | + ); | |
239 | + $skinObj = new SKIN($skinid); | |
240 | + } | |
241 | + | |
242 | + // 2. add parts | |
243 | + foreach ($data['parts'] as $partName => $partContent) { | |
244 | + $skinObj->update($partName, $partContent); | |
245 | + } | |
246 | + } | |
247 | + | |
248 | + foreach ($this->templates as $templateName => $data) { | |
249 | + // 1. if exists: delete all part data, update desc data | |
250 | + // if not exists: create desc | |
251 | + if (in_array($templateName, $existingTemplates)) { | |
252 | + $templateObj = TEMPLATE::createFromName($templateName); | |
253 | + | |
254 | + // delete all parts of the template | |
255 | + $templateObj->deleteAllParts(); | |
256 | + | |
257 | + // update general info | |
258 | + $templateObj->updateGeneralInfo($templateName, $data['description']); | |
259 | + } else { | |
260 | + $templateid = TEMPLATE::createNew($templateName, $data['description']); | |
261 | + $templateObj = new TEMPLATE($templateid); | |
262 | + } | |
263 | + | |
264 | + // 2. add parts | |
265 | + foreach ($data['parts'] as $partName => $partContent) { | |
266 | + $templateObj->update($partName, $partContent); | |
267 | + } | |
268 | + } | |
269 | + | |
270 | + | |
271 | + } | |
272 | + | |
273 | + /** | |
274 | + * returns an array of all the skin nameclashes (empty array when no name clashes) | |
275 | + */ | |
276 | + function checkSkinNameClashes() { | |
277 | + $clashes = array(); | |
278 | + | |
279 | + foreach ($this->skins as $skinName => $data) { | |
280 | + if (SKIN::exists($skinName)) { | |
281 | + array_push($clashes, $skinName); | |
282 | + } | |
283 | + } | |
284 | + | |
285 | + return $clashes; | |
286 | + } | |
287 | + | |
288 | + /** | |
289 | + * returns an array of all the template nameclashes | |
290 | + * (empty array when no name clashes) | |
291 | + */ | |
292 | + function checkTemplateNameClashes() { | |
293 | + $clashes = array(); | |
294 | + | |
295 | + foreach ($this->templates as $templateName => $data) { | |
296 | + if (TEMPLATE::exists($templateName)) { | |
297 | + array_push($clashes, $templateName); | |
298 | + } | |
299 | + } | |
300 | + | |
301 | + return $clashes; | |
302 | + } | |
303 | + | |
304 | + /** | |
305 | + * Called by XML parser for each new start element encountered | |
306 | + */ | |
307 | + function startElement($parser, $name, $attrs) { | |
308 | + foreach($attrs as $key=>$value) { | |
309 | + $attrs[$key] = htmlspecialchars($value, ENT_QUOTES); | |
310 | + } | |
311 | + | |
312 | + if ($this->debug) { | |
313 | + echo 'START: ' . htmlspecialchars($name, ENT_QUOTES) . '<br />'; | |
314 | + } | |
315 | + | |
316 | + switch ($name) { | |
317 | + case 'nucleusskin': | |
318 | + $this->inData = 1; | |
319 | + break; | |
320 | + case 'meta': | |
321 | + $this->inMeta = 1; | |
322 | + break; | |
323 | + case 'info': | |
324 | + // no action needed | |
325 | + break; | |
326 | + case 'skin': | |
327 | + if (!$this->inMeta) { | |
328 | + $this->inSkin = 1; | |
329 | + $this->currentName = $attrs['name']; | |
330 | + $this->skins[$this->currentName]['type'] = $attrs['type']; | |
331 | + $this->skins[$this->currentName]['includeMode'] = $attrs['includeMode']; | |
332 | + $this->skins[$this->currentName]['includePrefix'] = $attrs['includePrefix']; | |
333 | + $this->skins[$this->currentName]['parts'] = array(); | |
334 | + } else { | |
335 | + $this->skins[$attrs['name']] = array(); | |
336 | + $this->skins[$attrs['name']]['parts'] = array(); | |
337 | + } | |
338 | + break; | |
339 | + case 'template': | |
340 | + if (!$this->inMeta) { | |
341 | + $this->inTemplate = 1; | |
342 | + $this->currentName = $attrs['name']; | |
343 | + $this->templates[$this->currentName]['parts'] = array(); | |
344 | + } else { | |
345 | + $this->templates[$attrs['name']] = array(); | |
346 | + $this->templates[$attrs['name']]['parts'] = array(); | |
347 | + } | |
348 | + break; | |
349 | + case 'description': | |
350 | + // no action needed | |
351 | + break; | |
352 | + case 'part': | |
353 | + $this->currentPartName = $attrs['name']; | |
354 | + break; | |
355 | + default: | |
356 | + echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . htmlspecialchars($name, ENT_QUOTES) . '<br />'; | |
357 | + break; | |
358 | + } | |
359 | + | |
360 | + // character data never contains other tags | |
361 | + $this->clearCharacterData(); | |
362 | + | |
363 | + } | |
364 | + | |
365 | + /** | |
366 | + * Called by the XML parser for each closing tag encountered | |
367 | + */ | |
368 | + function endElement($parser, $name) { | |
369 | + if ($this->debug) { | |
370 | + echo 'END: ' . htmlspecialchars($name, ENT_QUOTES) . '<br />'; | |
371 | + } | |
372 | + | |
373 | + switch ($name) { | |
374 | + case 'nucleusskin': | |
375 | + $this->inData = 0; | |
376 | + $this->allRead = 1; | |
377 | + break; | |
378 | + case 'meta': | |
379 | + $this->inMeta = 0; | |
380 | + $this->metaDataRead = 1; | |
381 | + break; | |
382 | + case 'info': | |
383 | + $this->info = $this->getCharacterData(); | |
384 | + case 'skin': | |
385 | + if (!$this->inMeta) { | |
386 | + $this->inSkin = 0; | |
387 | + } | |
388 | + break; | |
389 | + case 'template': | |
390 | + if (!$this->inMeta) { | |
391 | + $this->inTemplate = 0; | |
392 | + } | |
393 | + break; | |
394 | + case 'description': | |
395 | + if ($this->inSkin) { | |
396 | + $this->skins[$this->currentName]['description'] = $this->getCharacterData(); | |
397 | + } else { | |
398 | + $this->templates[$this->currentName]['description'] = $this->getCharacterData(); | |
399 | + } | |
400 | + break; | |
401 | + case 'part': | |
402 | + if ($this->inSkin) { | |
403 | + $this->skins[$this->currentName]['parts'][$this->currentPartName] = $this->getCharacterData(); | |
404 | + } else { | |
405 | + $this->templates[$this->currentName]['parts'][$this->currentPartName] = $this->getCharacterData(); | |
406 | + } | |
407 | + break; | |
408 | + default: | |
409 | + echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . htmlspecialchars($name, ENT_QUOTES) . '<br />'; | |
410 | + break; | |
411 | + } | |
412 | + $this->clearCharacterData(); | |
413 | + | |
414 | + } | |
415 | + | |
416 | + /** | |
417 | + * Called by XML parser for data inside elements | |
418 | + */ | |
419 | + function characterData ($parser, $data) { | |
420 | + if ($this->debug) { | |
421 | + echo 'NEW DATA: ' . htmlspecialchars($data, ENT_QUOTES) . '<br />'; | |
422 | + } | |
423 | + $this->cdata .= $data; | |
424 | + } | |
425 | + | |
426 | + /** | |
427 | + * Returns the data collected so far | |
428 | + */ | |
429 | + function getCharacterData() { | |
430 | +// echo $this->cdata; | |
431 | + if ( (strtoupper(_CHARSET) == 'UTF-8') | |
432 | + or (strtoupper(_CHARSET) == 'ISO-8859-1') | |
433 | + or (!function_exists('mb_convert_encoding')) ) { | |
434 | + return $this->cdata; | |
435 | + } else { | |
436 | + return mb_convert_encoding($this->cdata, _CHARSET ,'UTF-8'); | |
437 | + } | |
438 | + } | |
439 | + | |
440 | + /** | |
441 | + * Clears the data buffer | |
442 | + */ | |
443 | + function clearCharacterData() { | |
444 | + $this->cdata = ''; | |
445 | + } | |
446 | + | |
447 | + /** | |
448 | + * Static method that looks for importable XML files in subdirs of the given dir | |
449 | + */ | |
450 | + function searchForCandidates($dir) { | |
451 | + $candidates = array(); | |
452 | + | |
453 | + $dirhandle = opendir($dir); | |
454 | + while ($filename = readdir($dirhandle)) { | |
455 | + if (@is_dir($dir . $filename) && ($filename != '.') && ($filename != '..')) { | |
456 | + $xml_file = $dir . $filename . '/skinbackup.xml'; | |
457 | + if (file_exists($xml_file) && is_readable($xml_file)) { | |
458 | + $candidates[$filename] = $filename; //$xml_file; | |
459 | + } | |
460 | + | |
461 | + // backwards compatibility | |
462 | + $xml_file = $dir . $filename . '/skindata.xml'; | |
463 | + if (file_exists($xml_file) && is_readable($xml_file)) { | |
464 | + $candidates[$filename] = $filename; //$xml_file; | |
465 | + } | |
466 | + } | |
467 | + } | |
468 | + closedir($dirhandle); | |
469 | + | |
470 | + return $candidates; | |
471 | + | |
472 | + } | |
473 | + | |
474 | + | |
475 | +} | |
476 | + | |
477 | + | |
478 | +class SKINEXPORT { | |
479 | + | |
480 | + var $templates; | |
481 | + var $skins; | |
482 | + var $info; | |
483 | + | |
484 | + /** | |
485 | + * Constructor initializes data structures | |
486 | + */ | |
487 | + function SKINEXPORT() { | |
488 | + // list of templateIDs to export | |
489 | + $this->templates = array(); | |
490 | + | |
491 | + // list of skinIDs to export | |
492 | + $this->skins = array(); | |
493 | + | |
494 | + // extra info to be in XML file | |
495 | + $this->info = ''; | |
496 | + } | |
497 | + | |
498 | + /** | |
499 | + * Adds a template to be exported | |
500 | + * | |
501 | + * @param id | |
502 | + * template ID | |
503 | + * @result false when no such ID exists | |
504 | + */ | |
505 | + function addTemplate($id) { | |
506 | + if (!TEMPLATE::existsID($id)) { | |
507 | + return 0; | |
508 | + } | |
509 | + | |
510 | + | |
511 | + $this->templates[$id] = TEMPLATE::getNameFromId($id); | |
512 | + | |
513 | + return 1; | |
514 | + } | |
515 | + | |
516 | + /** | |
517 | + * Adds a skin to be exported | |
518 | + * | |
519 | + * @param id | |
520 | + * skin ID | |
521 | + * @result false when no such ID exists | |
522 | + */ | |
523 | + function addSkin($id) { | |
524 | + if (!SKIN::existsID($id)) { | |
525 | + return 0; | |
526 | + } | |
527 | + | |
528 | + $this->skins[$id] = SKIN::getNameFromId($id); | |
529 | + | |
530 | + return 1; | |
531 | + } | |
532 | + | |
533 | + /** | |
534 | + * Sets the extra info to be included in the exported file | |
535 | + */ | |
536 | + function setInfo($info) { | |
537 | + $this->info = $info; | |
538 | + } | |
539 | + | |
540 | + | |
541 | + /** | |
542 | + * Outputs the XML contents of the export file | |
543 | + * | |
544 | + * @param $setHeaders | |
545 | + * set to 0 if you don't want to send out headers | |
546 | + * (optional, default 1) | |
547 | + */ | |
548 | + function export($setHeaders = 1) { | |
549 | + if ($setHeaders) { | |
550 | + // make sure the mimetype is correct, and that the data does not show up | |
551 | + // in the browser, but gets saved into and XML file (popup download window) | |
552 | + header('Content-Type: text/xml'); | |
553 | + header('Content-Disposition: attachment; filename="skinbackup.xml"'); | |
554 | + header('Expires: 0'); | |
555 | + header('Pragma: no-cache'); | |
556 | + } | |
557 | + | |
558 | + echo "<nucleusskin>\n"; | |
559 | + | |
560 | + // meta | |
561 | + echo "\t<meta>\n"; | |
562 | + // skins | |
563 | + foreach ($this->skins as $skinId => $skinName) { | |
564 | + $skinName = htmlspecialchars($skinName, ENT_QUOTES); | |
565 | + if (_CHARSET != 'UTF-8') { | |
566 | + $skinName = mb_convert_encoding($skinName, 'UTF-8', _CHARSET); | |
567 | + } | |
568 | + echo "\t\t" . '<skin name="' . $skinName . '" />' . "\n"; | |
569 | + } | |
570 | + // templates | |
571 | + foreach ($this->templates as $templateId => $templateName) { | |
572 | + $templateName = htmlspecialchars($templateName, ENT_QUOTES); | |
573 | + if (_CHARSET != 'UTF-8') { | |
574 | + $templateName = mb_convert_encoding($templateName, 'UTF-8', _CHARSET); | |
575 | + } | |
576 | + echo "\t\t" . '<template name="' . $templateName . '" />' . "\n"; | |
577 | + } | |
578 | + // extra info | |
579 | + if ($this->info) { | |
580 | + if (_CHARSET != 'UTF-8') { | |
581 | + $skin_info = mb_convert_encoding($this->info, 'UTF-8', _CHARSET); | |
582 | + } else { | |
583 | + $skin_info = $this->info; | |
584 | + } | |
585 | + echo "\t\t<info><![CDATA[" . $skin_info . "]]></info>\n"; | |
586 | + } | |
587 | + echo "\t</meta>\n\n\n"; | |
588 | + | |
589 | + // contents skins | |
590 | + foreach ($this->skins as $skinId => $skinName) { | |
591 | + $skinId = intval($skinId); | |
592 | + $skinObj = new SKIN($skinId); | |
593 | + $skinName = htmlspecialchars($skinName, ENT_QUOTES); | |
594 | + $contentT = htmlspecialchars($skinObj->getContentType(), ENT_QUOTES); | |
595 | + $incMode = htmlspecialchars($skinObj->getIncludeMode(), ENT_QUOTES); | |
596 | + $incPrefx = htmlspecialchars($skinObj->getIncludePrefix(), ENT_QUOTES); | |
597 | + $skinDesc = htmlspecialchars($skinObj->getDescription(), ENT_QUOTES); | |
598 | + if (_CHARSET != 'UTF-8') { | |
599 | + $skinName = mb_convert_encoding($skinName, 'UTF-8', _CHARSET); | |
600 | + $contentT = mb_convert_encoding($contentT, 'UTF-8', _CHARSET); | |
601 | + $incMode = mb_convert_encoding($incMode, 'UTF-8', _CHARSET); | |
602 | + $incPrefx = mb_convert_encoding($incPrefx, 'UTF-8', _CHARSET); | |
603 | + $skinDesc = mb_convert_encoding($skinDesc, 'UTF-8', _CHARSET); | |
604 | + } | |
605 | + | |
606 | + echo "\t" . '<skin name="' . $skinName . '" type="' . $contentT . '" includeMode="' . $incMode . '" includePrefix="' . $incPrefx . '">' . "\n"; | |
607 | + | |
608 | + echo "\t\t" . '<description>' . $skinDesc . '</description>' . "\n"; | |
609 | + | |
610 | + $que = 'SELECT' | |
611 | + . ' stype,' | |
612 | + . ' scontent ' | |
613 | + . 'FROM ' | |
614 | + . sql_table('skin') | |
615 | + . ' WHERE' | |
616 | + . ' sdesc = ' . $skinId; | |
617 | + $res = sql_query($que); | |
618 | + while ($partObj = mysql_fetch_object($res)) { | |
619 | + $type = htmlspecialchars($partObj->stype, ENT_QUOTES); | |
620 | + $cdata = $this->escapeCDATA($partObj->scontent); | |
621 | + if (_CHARSET != 'UTF-8') { | |
622 | + $type = mb_convert_encoding($type, 'UTF-8', _CHARSET); | |
623 | + $cdata = mb_convert_encoding($cdata, 'UTF-8', _CHARSET); | |
624 | + } | |
625 | + echo "\t\t" . '<part name="' . $type . '">'; | |
626 | + echo '<![CDATA[' . $cdata . ']]>'; | |
627 | + echo "</part>\n\n"; | |
628 | + } | |
629 | + | |
630 | + echo "\t</skin>\n\n\n"; | |
631 | + } | |
632 | + | |
633 | + // contents templates | |
634 | + foreach ($this->templates as $templateId => $templateName) { | |
635 | + $templateId = intval($templateId); | |
636 | + $templateName = htmlspecialchars($templateName, ENT_QUOTES); | |
637 | + $templateDesc = htmlspecialchars(TEMPLATE::getDesc($templateId), ENT_QUOTES); | |
638 | + if (_CHARSET != 'UTF-8') { | |
639 | + $templateName = mb_convert_encoding($templateName, 'UTF-8', _CHARSET); | |
640 | + $templateDesc = mb_convert_encoding($templateDesc, 'UTF-8', _CHARSET); | |
641 | + } | |
642 | + | |
643 | + echo "\t" . '<template name="' . $templateName . '">' . "\n"; | |
644 | + | |
645 | + echo "\t\t" . '<description>' . $templateDesc . "</description>\n"; | |
646 | + | |
647 | + $que = 'SELECT' | |
648 | + . ' tpartname,' | |
649 | + . ' tcontent' | |
650 | + . ' FROM ' | |
651 | + . sql_table('template') | |
652 | + . ' WHERE' | |
653 | + . ' tdesc = ' . $templateId; | |
654 | + $res = sql_query($que); | |
655 | + while ($partObj = mysql_fetch_object($res)) { | |
656 | + $type = htmlspecialchars($partObj->tpartname, ENT_QUOTES); | |
657 | + $cdata = $this->escapeCDATA($partObj->tcontent); | |
658 | + if (_CHARSET != 'UTF-8') { | |
659 | + $type = mb_convert_encoding($type, 'UTF-8', _CHARSET); | |
660 | + $cdata = mb_convert_encoding($cdata, 'UTF-8', _CHARSET); | |
661 | + } | |
662 | + echo "\t\t" . '<part name="' . $type . '">'; | |
663 | + echo '<![CDATA[' . $cdata . ']]>'; | |
664 | + echo '</part>' . "\n\n"; | |
665 | + } | |
666 | + | |
667 | + echo "\t</template>\n\n\n"; | |
668 | + } | |
669 | + | |
670 | + echo '</nucleusskin>'; | |
671 | + } | |
672 | + | |
673 | + /** | |
674 | + * Escapes CDATA content so it can be included in another CDATA section | |
675 | + */ | |
676 | + function escapeCDATA($cdata) | |
677 | + { | |
678 | + return preg_replace('/]]>/', ']]]]><![CDATA[>', $cdata); | |
679 | + | |
680 | + } | |
681 | +} | |
682 | + | |
642 | 683 | ?> |
\ No newline at end of file |
@@ -10,5 +10,6 @@ if (!function_exists('getmtime')) | ||
10 | 10 | |
11 | 11 | global $StartTime, $SQLCount; |
12 | 12 | $loadtime = getmtime() - $StartTime; |
13 | - printf("%.3f 秒/%d クエリ", $loadtime, $SQLCount); | |
13 | + $var = mb_convert_encoding("%.3f 秒/%d クエリ", _CHARSET, 'UTF-8'); | |
14 | + printf($var, $loadtime, $SQLCount); | |
14 | 15 | ?> |
@@ -8,21 +8,33 @@ | ||
8 | 8 | <template name="default/commentlist" /> |
9 | 9 | <template name="default/searchlist" /> |
10 | 10 | <template name="default/bloglist" /> |
11 | - <info><![CDATA[Nucleus CMS default skin (日本語版)]]></info> | |
11 | + <info><![CDATA[日本語版デフォルトスキン データベースバージョン。 | |
12 | +*.inc ファイルをスペシャルスキンパーツ化したバージョンです。 | |
13 | +<%parsedinclude%>でスペシャルスキンパーツを読み込んで、スキン内のパーツとして使用できます。 | |
14 | +*.incファイルを使用したバージョンは、同じディレクトリにある「skinbackup.xml.org」をリネームして読み込むことで使用できるようになります。]]></info> | |
12 | 15 | </meta> |
13 | 16 | |
14 | 17 | |
15 | 18 | <skin name="default" type="text/html" includeMode="skindir" includePrefix="default/"> |
16 | 19 | <description>Nucleus CMS default skin (日本語版)</description> |
20 | + <part name="additemform"><![CDATA[<%if(loggedin)%> | |
21 | +<div id="edit" style="display:none;"> | |
22 | +<div class="contenttitle"> | |
23 | +<h2>新規投稿</h2></div> | |
24 | +<div class="contentbody"> | |
25 | +<%additemform%></div> | |
26 | +</div> | |
27 | +<%endif%>]]></part> | |
28 | + | |
17 | 29 | <part name="archive"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
18 | 30 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> |
19 | 31 | <head> |
20 | -<%parsedinclude(inc/head.inc)%> | |
21 | -<%parsedinclude(inc/navigation.inc)%> | |
32 | +<%parsedinclude(head)%> | |
33 | +<%parsedinclude(navigation)%> | |
22 | 34 | </head> |
23 | 35 | <body> |
24 | 36 | <!-- page header --> |
25 | -<%parsedinclude(inc/header.inc)%> | |
37 | +<%parsedinclude(header)%> | |
26 | 38 | <!-- begin wrapper divs --> |
27 | 39 | <div id="mainwrapper"><div id="wrapper"> |
28 | 40 |
@@ -42,7 +54,7 @@ | ||
42 | 54 | <!-- page menu --> |
43 | 55 | <h2 class="hidden">Sidebar</h2> |
44 | 56 | <div id="sidebarcontainer"> |
45 | -<%parsedinclude(inc/sidebar.inc)%> | |
57 | +<%parsedinclude(sidebar)%> | |
46 | 58 | </div> |
47 | 59 | |
48 | 60 | <div class="clearing"> </div> |
@@ -51,7 +63,7 @@ | ||
51 | 63 | |
52 | 64 | <!-- page footer, copyrights, etc. --> |
53 | 65 | <div id="footer"> |
54 | -<%parsedinclude(inc/footer.inc)%> | |
66 | +<%parsedinclude(footer)%> | |
55 | 67 | </div> |
56 | 68 | |
57 | 69 | </body> |
@@ -60,12 +72,12 @@ | ||
60 | 72 | <part name="archivelist"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
61 | 73 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> |
62 | 74 | <head> |
63 | -<%parsedinclude(inc/head.inc)%> | |
64 | -<%parsedinclude(inc/navigation.inc)%> | |
75 | +<%parsedinclude(head)%> | |
76 | +<%parsedinclude(navigation)%> | |
65 | 77 | </head> |
66 | 78 | <body> |
67 | 79 | <!-- page header --> |
68 | -<%parsedinclude(inc/header.inc)%> | |
80 | +<%parsedinclude(header)%> | |
69 | 81 | <!-- begin wrapper divs --> |
70 | 82 | <div id="mainwrapper"> |
71 | 83 | <div id="wrapper"> |
@@ -86,7 +98,7 @@ | ||
86 | 98 | <!-- page menu --> |
87 | 99 | <h2 class="hidden">サイドバー</h2> |
88 | 100 | <div id="sidebarcontainer"> |
89 | -<%parsedinclude(inc/sidebar.inc)%> | |
101 | +<%parsedinclude(sidebar)%> | |
90 | 102 | </div> |
91 | 103 | |
92 | 104 | <div class="clearing"> </div> |
@@ -96,7 +108,7 @@ | ||
96 | 108 | |
97 | 109 | <!-- page footer, copyrights, etc. --> |
98 | 110 | <div id="footer"> |
99 | -<%parsedinclude(inc/footer.inc)%> | |
111 | +<%parsedinclude(footer)%> | |
100 | 112 | </div> |
101 | 113 | |
102 | 114 | </body> |
@@ -105,12 +117,12 @@ | ||
105 | 117 | <part name="error"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
106 | 118 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> |
107 | 119 | <head> |
108 | -<%parsedinclude(inc/head.inc)%> | |
109 | -<%parsedinclude(inc/navigation.inc)%> | |
120 | +<%parsedinclude(head)%> | |
121 | +<%parsedinclude(navigation)%> | |
110 | 122 | </head> |
111 | 123 | <body> |
112 | 124 | <!-- page header --> |
113 | -<%parsedinclude(inc/header.inc)%> | |
125 | +<%parsedinclude(header)%> | |
114 | 126 | |
115 | 127 | <!-- begin wrapper divs --> |
116 | 128 | <div id="mainwrapper"> |
@@ -130,7 +142,7 @@ | ||
130 | 142 | <!-- page menu --> |
131 | 143 | <h2 class="hidden">サイドバー</h2> |
132 | 144 | <div id="sidebarcontainer"> |
133 | -<%parsedinclude(inc/sidebar.inc)%> | |
145 | +<%parsedinclude(sidebar)%> | |
134 | 146 | </div> |
135 | 147 | |
136 | 148 | <div class="clearing"> </div> |
@@ -140,12 +152,67 @@ | ||
140 | 152 | |
141 | 153 | <!-- page footer, copyrights, etc. --> |
142 | 154 | <div id="footer"> |
143 | -<%parsedinclude(inc/footer.inc)%> | |
155 | +<%parsedinclude(footer)%> | |
144 | 156 | </div> |
145 | 157 | |
146 | 158 | </body> |
147 | 159 | </html>]]></part> |
148 | 160 | |
161 | + <part name="footer"><![CDATA[<div id="copyrights"> | |
162 | + <small>Copyright | <a href="http://nucleuscms.org"><%version%></a> | | |
163 | + <a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0 Strict</a> | | |
164 | + <a href="http://jigsaw.w3.org/css-validator/">Valid CSS</a> | | |
165 | + <a href="#top">ページの先頭に戻る</a></small> | |
166 | +</div>]]></part> | |
167 | + | |
168 | + <part name="head"><![CDATA[<meta http-equiv="Content-Type" content="text/html; charset=<%charset%>" /> | |
169 | +<%phpinclude(benchmark)%> | |
170 | + | |
171 | +<!-- meta information for search engines --> | |
172 | +<meta name="generator" content="<%version%>" /> | |
173 | +<meta name="name" content="<%blogsetting(name)%>" /> | |
174 | +<meta name="description" content="<%blogsetting(desc)%>" /> | |
175 | + | |
176 | +<!-- prevent caching (効果については不明。削除してもかまいません) --> | |
177 | +<meta http-equiv="Pragma" content="no-cache" /> | |
178 | +<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" /> | |
179 | +<meta http-equiv="Expires" content="-1" /> | |
180 | + | |
181 | +<!-- site stylesheet (site colors and layout definitions:サイドバー左用) --> | |
182 | +<link rel="stylesheet" type="text/css" href="<%skinfile(default_left.css)%>" /> | |
183 | +<!-- site stylesheet (site colors and layout definitions:サイドバー右用) --> | |
184 | +<link rel="alternate stylesheet" type="text/css" href="<%skinfile(default_right.css)%>" /> | |
185 | + | |
186 | +<!-- site stylesheet ADDED (some adjustment) --> | |
187 | +<link rel="stylesheet" type="text/css" href="<%skinfile(jlocal.css)%>" /> | |
188 | + | |
189 | +<!-- tooltips & stylesheet (activated by title="" on links) --> | |
190 | +<link rel="stylesheet" type="text/css" href="<%skinfile(nicetitle.css)%>" /> | |
191 | +<script type="text/javascript" src="<%skinfile(nicetitle.js)%>"></script> | |
192 | + | |
193 | +<!-- ATOM support --> | |
194 | +<link rel="alternate" type="application/atom+xml" title="ATOM" href="atom.php" /> | |
195 | + | |
196 | +<!-- RSS 2.0 feed --> | |
197 | +<link rel="alternate" type="application/rss+xml" title="RSS" href="<%sitevar(url)%>xml-rss2.php" /> | |
198 | + | |
199 | +<!-- favorite icon --> | |
200 | +<link rel="shortcut icon" href="<%skinfile(favicon.ico)%>" /> | |
201 | +<link rel="icon" href="<%skinfile(favicon.ico)%>" />]]></part> | |
202 | + | |
203 | + <part name="header"><![CDATA[<!-- page header --> | |
204 | +<div id="header"><a name="top"></a> | |
205 | +<h1> | |
206 | + <%if(skintype,error)%> | |
207 | + <a href="<%sitevar(url)%>"><%sitevar(name)%></a> | |
208 | + <%elseif(skintype,member)%> | |
209 | + <a href="<%sitevar(url)%>"><%sitevar(name)%></a> | |
210 | + <%else%> | |
211 | + <a href="<%blogsetting(url)%>"><%blogsetting(name)%></a> | |
212 | + <%endif%> | |
213 | +</h1> | |
214 | +</div>]]></part> | |
215 | + | |
149 | 216 | <part name="imagepopup"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
150 | 217 | <html> |
151 | 218 | <head> |
@@ -166,12 +233,12 @@ body { margin: 0px; } | ||
166 | 233 | <part name="index"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
167 | 234 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> |
168 | 235 | <head> |
169 | -<%parsedinclude(inc/head.inc)%> | |
170 | -<%parsedinclude(inc/navigation.inc)%> | |
236 | +<%parsedinclude(head)%> | |
237 | +<%parsedinclude(navigation)%> | |
171 | 238 | </head> |
172 | 239 | <body> |
173 | 240 | <!-- page header --> |
174 | -<%parsedinclude(inc/header.inc)%> | |
241 | +<%parsedinclude(header)%> | |
175 | 242 | |
176 | 243 | <!-- begin wrapper divs --> |
177 | 244 | <div id="mainwrapper"><div id="wrapper"> |
@@ -179,7 +246,7 @@ body { margin: 0px; } | ||
179 | 246 | <!-- page content --> |
180 | 247 | <div id="container"> |
181 | 248 | <div class="content"> |
182 | -<%parsedinclude(inc/additemform.inc)%> | |
249 | +<%parsedinclude(additemform)%> | |
183 | 250 | <%blog(default/index,10)%> |
184 | 251 | </div> |
185 | 252 | </div> |
@@ -187,7 +254,7 @@ body { margin: 0px; } | ||
187 | 254 | <!-- page menu --> |
188 | 255 | <h2 class="hidden">サイドバー</h2> |
189 | 256 | <div id="sidebarcontainer"> |
190 | -<%parsedinclude(inc/sidebar.inc)%> | |
257 | +<%parsedinclude(sidebar)%> | |
191 | 258 | </div> |
192 | 259 | |
193 | 260 | <div class="clearing"> </div> |
@@ -196,7 +263,7 @@ body { margin: 0px; } | ||
196 | 263 | |
197 | 264 | <!-- page footer, copyrights, etc. --> |
198 | 265 | <div id="footer"> |
199 | -<%parsedinclude(inc/footer.inc)%> | |
266 | +<%parsedinclude(footer)%> | |
200 | 267 | </div> |
201 | 268 | |
202 | 269 | </body> |
@@ -205,12 +272,12 @@ body { margin: 0px; } | ||
205 | 272 | <part name="item"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
206 | 273 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> |
207 | 274 | <head> |
208 | -<%parsedinclude(inc/head.inc)%> | |
209 | -<%parsedinclude(inc/navigation.inc)%> | |
275 | +<%parsedinclude(head)%> | |
276 | +<%parsedinclude(navigation)%> | |
210 | 277 | </head> |
211 | 278 | <body> |
212 | 279 | <!-- page header --> |
213 | -<%parsedinclude(inc/header.inc)%> | |
280 | +<%parsedinclude(header)%> | |
214 | 281 | |
215 | 282 | <!-- begin wrapper divs --> |
216 | 283 | <div id="mainwrapper"><div id="wrapper"> |
@@ -235,7 +302,7 @@ body { margin: 0px; } | ||
235 | 302 | <!-- page menu --> |
236 | 303 | <h2 class="hidden">サイドバー</h2> |
237 | 304 | <div id="sidebarcontainer"> |
238 | -<%parsedinclude(inc/sidebar.inc)%> | |
305 | +<%parsedinclude(sidebar)%> | |
239 | 306 | </div> |
240 | 307 | |
241 | 308 | <div class="clearing"> </div> |
@@ -244,21 +311,31 @@ body { margin: 0px; } | ||
244 | 311 | |
245 | 312 | <!-- page footer, copyrights, etc. --> |
246 | 313 | <div id="footer"> |
247 | -<%parsedinclude(inc/footer.inc)%> | |
314 | +<%parsedinclude(footer)%> | |
248 | 315 | </div> |
249 | 316 | |
250 | 317 | </body> |
251 | 318 | </html>]]></part> |
252 | 319 | |
320 | + <part name="linklist"><![CDATA[<dd><a href="http://nucleuscms.org" title="Nucleus CMS Home">nucleuscms.org(本家サイト)</a></dd> | |
321 | +<dd><a href="http://japan.nucleuscms.org/" title="Nucleus CMS Japan Home">nucleuscms 日本公式</a></dd> | |
322 | +<dd><a href="http://japan.nucleuscms.org/documentation/" title="Nucleus CMS Documentation">Nucleus管理マニュアル</a></dd> | |
323 | +<dd><a href="http://japan.nucleuscms.org/bb/" title="Nucleus CMS Support Forum">Nucleus日本公式フォーラム</a></dd> | |
324 | +<dd><a href="http://japan.nucleuscms.org/wiki/" title="Nucleus CMS Wiki">Nucleus日本公式wiki</a></dd> | |
325 | +<dd><a href="http://skins.nucleuscms.org/" title="Nucleus CMS Skins">skins.nucleuscms.org</a></dd> | |
326 | +<dd><a href="http://japan.nucleuscms.org/wiki/plugins" title="Nucleus CMS Plugins">Nucleusプラグイン紹介</a></dd> | |
327 | +<dd><a href="http://japan.nucleuscms.org/documentation/devdocs/plugins.html" title="Nucleus CMS Plugins">プラグインを自作</a></dd> | |
328 | +<dd><a href="http://dev.nucleuscms.org/" title="Nucleus Developer Network">dev.nucleuscms.org</a></dd>]]></part> | |
329 | + | |
253 | 330 | <part name="member"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
254 | 331 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> |
255 | 332 | <head> |
256 | -<%parsedinclude(inc/head.inc)%> | |
257 | -<%parsedinclude(inc/navigation.inc)%> | |
333 | +<%parsedinclude(head)%> | |
334 | +<%parsedinclude(navigation)%> | |
258 | 335 | </head> |
259 | 336 | |
260 | 337 | <!-- page header --> |
261 | -<%parsedinclude(inc/header.inc)%> | |
338 | +<%parsedinclude(header)%> | |
262 | 339 | <!-- begin wrapper divs --> |
263 | 340 | <div id="mainwrapper"> |
264 | 341 | <div id="wrapper"> |
@@ -284,7 +361,7 @@ WEBサイト: <a href="<%member(url)%>"><%member(url)%></a> | ||
284 | 361 | <!-- page menu --> |
285 | 362 | <h2 class="hidden">サイドバー</h2> |
286 | 363 | <div id="sidebarcontainer"> |
287 | -<%parsedinclude(inc/sidebar.inc)%> | |
364 | +<%parsedinclude(sidebar)%> | |
288 | 365 | </div> |
289 | 366 | |
290 | 367 | <div class="clearing"> </div> |
@@ -294,21 +371,81 @@ WEBサイト: <a href="<%member(url)%>"><%member(url)%></a> | ||
294 | 371 | |
295 | 372 | <!-- page footer, copyrights, etc. --> |
296 | 373 | <div id="footer"> |
297 | -<%parsedinclude(inc/footer.inc)%> | |
374 | +<%parsedinclude(footer)%> | |
298 | 375 | </div> |
299 | 376 | |
300 | 377 | </body> |
301 | 378 | </html>]]></part> |
302 | 379 | |
380 | + <part name="navigation"><![CDATA[<!-- navigation & page titles --> | |
381 | +<%if(skintype,index)%> | |
382 | +<!-- index: page title and extra navigational links --> | |
383 | +<title><%blogsetting(name)%></title> | |
384 | +<link rel="bookmark" title="Nucleus" href="http://nucleuscms.org/" /> | |
385 | +<link rel="archives" title="Archives" href="<%archivelink%>" /> | |
386 | +<link rel="top" title="Today" href="<%todaylink%>" /> | |
387 | + | |
388 | +<%elseif(skintype,item)%> | |
389 | +<!-- item: page title and extra navigational links --> | |
390 | +<title><%itemtitle(attribute)%> » <%blogsetting(name)%></title> | |
391 | +<link rel="archives" title="過去ログ" href="<%archivelink%>" /> | |
392 | +<link rel="top" title="今日の投稿" href="<%sitevar(url)%>" /> | |
393 | +<link rel="next" href="<%nextlink%>" title="次の記事" /> | |
394 | +<link rel="prev" href="<%prevlink%>" title="前の記事" /> | |
395 | +<link rel="up" href="<%todaylink%>" title="今日の投稿" /> | |
396 | +<meta name="robots" content="all,noodp,noydir" /> | |
397 | + | |
398 | +<%elseif(skintype,archive)%> | |
399 | +<!-- archive: page title and extra navigational links --> | |
400 | +<title><%blogsetting(name)%> » 過去ログ</title> | |
401 | +<link rel="archives" title="Archives" href="<%archivelink%>" /> | |
402 | +<link rel="top" title="Today" href="<%sitevar(url)%>" /> | |
403 | +<link rel="up" href="<%todaylink%>" title="Today" /> | |
404 | +<meta name="robots" content="all,noodp,noydir,NOINDEX,NOFOLLOW" /> | |
405 | + | |
406 | +<%elseif(skintype,archivelist)%> | |
407 | +<!-- archivelist: page title and extra navigational links --> | |
408 | +<title><%blogsetting(name)%> » 過去ログリスト</title> | |
409 | +<link rel="archives" title="Archives" href="<%archivelink%>" /> | |
410 | +<link rel="top" title="Today" href="<%sitevar(url)%>" /> | |
411 | +<link rel="up" href="<%todaylink%>" title="Today" /> | |
412 | +<meta name="robots" content="all,noodp,noydir,NOINDEX,NOFOLLOW" /> | |
413 | + | |
414 | +<%elseif(skintype,error)%> | |
415 | +<!-- error: page title and extra navigational links --> | |
416 | +<title><%sitevar(name)%> » エラー!</title> | |
417 | +<link rel="top" title="Today" href="<%todaylink%>" /> | |
418 | +<link rel="up" href="<%todaylink%>" title="Today" /> | |
419 | +<meta name="robots" content="all,noodp,noydir,NOINDEX,NOFOLLOW" /> | |
420 | + | |
421 | +<%elseif(skintype,member)%> | |
422 | +<!-- member: page title and extra navigational links --> | |
423 | +<title><%blogsetting(name)%> » メンバー詳細</title> | |
424 | +<link rel="top" title="Today" href="<%todaylink%>" /> | |
425 | +<link rel="up" href="<%todaylink%>" title="Today" /> | |
426 | +<meta name="robots" content="all,noodp,noydir,NOINDEX,NOFOLLOW" /> | |
427 | + | |
428 | +<%elseif(skintype,search)%> | |
429 | +<!-- search: page title and extra navigational links --> | |
430 | +<title><%blogsetting(name)%> » 検索</title> | |
431 | +<link rel="archives" title="過去ログ" href="<%archivelink%>" /> | |
432 | +<link rel="top" title="Today" href="<%sitevar(url)%>" /> | |
433 | +<link rel="up" href="<%todaylink%>" title="Today" /> | |
434 | +<%endif%> | |
435 | + | |
436 | +<%if(loggedin)%> | |
437 | +<script type="text/javascript" src="<%adminurl%>javascript/edit.js"></script> | |
438 | +<%endif%>]]></part> | |
439 | + | |
303 | 440 | <part name="search"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
304 | 441 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> |
305 | 442 | <head> |
306 | -<%parsedinclude(inc/head.inc)%> | |
307 | -<%parsedinclude(inc/navigation.inc)%> | |
443 | +<%parsedinclude(head)%> | |
444 | +<%parsedinclude(navigation)%> | |
308 | 445 | </head> |
309 | 446 | <body> |
310 | 447 | <!-- page header --> |
311 | -<%parsedinclude(inc/header.inc)%> | |
448 | +<%parsedinclude(header)%> | |
312 | 449 | <!-- begin wrapper divs --> |
313 | 450 | <div id="mainwrapper"> |
314 | 451 | <div id="wrapper"> |
@@ -329,7 +466,7 @@ WEBサイト: <a href="<%member(url)%>"><%member(url)%></a> | ||
329 | 466 | <!-- page menu --> |
330 | 467 | <h2 class="hidden">サイドバー</h2> |
331 | 468 | <div id="sidebarcontainer"> |
332 | -<%parsedinclude(inc/sidebar.inc)%> | |
469 | +<%parsedinclude(sidebar)%> | |
333 | 470 | </div> |
334 | 471 | |
335 | 472 | <div class="clearing"> </div> |
@@ -339,12 +476,124 @@ WEBサイト: <a href="<%member(url)%>"><%member(url)%></a> | ||
339 | 476 | |
340 | 477 | <!-- page footer, copyrights, etc. --> |
341 | 478 | <div id="footer"> |
342 | -<%parsedinclude(inc/footer.inc)%> | |
479 | +<%parsedinclude(footer)%> | |
343 | 480 | </div> |
344 | 481 | |
345 | 482 | </body> |
346 | 483 | </html>]]></part> |
347 | 484 | |
485 | + <part name="sidebar"><![CDATA[<!-- page menu --> | |
486 | +<div class="sidebar"> | |
487 | +<dl class="sidebardl"> | |
488 | +<dt>ナビゲーション</dt> | |
489 | + | |
490 | +<%if(skintype,archive)%> | |
491 | +<!-- archive: navigation --> | |
492 | +<dd><a href="<%prevlink%>" title="前の月">前の<%archivetype%></a></dd> | |
493 | +<dd><a href="<%nextlink%>" title="次の月">次の<%archivetype%></a></dd> | |
494 | +<dd><a href="<%todaylink%>" title="今日の登録">最新の投稿</a></dd> | |
495 | +<dd><a href="<%archivelink%>" title="過去の投稿">過去の投稿</a></dd> | |
496 | + | |
497 | +<%elseif(skintype,archivelist)%> | |
498 | +<!-- archivelist: navigation --> | |
499 | +<dd><a href="<%todaylink%>" title="最新の投稿">最新の投稿</a></dd> | |
500 | +<dd><a href="<%archivelink%>" title="過去の投稿">過去の投稿</a></dd> | |
501 | + | |
502 | +<%elseif(skintype,error)%> | |
503 | +<!-- error: navigation --> | |
504 | +<dd><a href="<%todaylink%>" title="最新の投稿">最新の投稿</a></dd> | |
505 | + | |
506 | +<%elseif(skintype,index)%> | |
507 | +<!-- index: navigation --> | |
508 | +<dd><a href="<%todaylink%>" title="最新の投稿">最新の投稿</a></dd> | |
509 | +<dd><a href="<%archivelink%>" title="過去の投稿">過去の投稿</a></dd> | |
510 | + | |
511 | +<!-- item: navigation --> | |
512 | +<%elseif(skintype,item)%> | |
513 | +<%if(previtem)%><dd><a href="<%prevlink%>" title="前の投稿">前の投稿</a></dd><%endif%> | |
514 | +<%if(nextitem)%><dd><a href="<%nextlink%>" title="次の投稿">次の投稿</a></dd><%endif%> | |
515 | +<dd><a href="<%todaylink%>" title="最新順の投稿一覧">最新順の投稿一覧</a></dd> | |
516 | +<dd><a href="<%archivelink%>" title="過去の投稿">過去の投稿一覧</a></dd> | |
517 | + | |
518 | +<!-- member: navigation --> | |
519 | +<%elseif(skintype,member)%> | |
520 | +<dd><a href="<%todaylink%>" title="最新の投稿">最新の投稿</a></dd> | |
521 | + | |
522 | +<!-- search: navigation --> | |
523 | +<%elseif(skintype,search)%> | |
524 | +<dd><a href="<%todaylink%>" title="最新の投稿">最新の投稿</a></dd> | |
525 | +<dd><a href="<%archivelink%>" title="過去の投稿">過去の投稿</a></dd> | |
526 | +<%endif%> | |
527 | + | |
528 | +<%if(loggedin)%> | |
529 | +<!-- admin link, only visible if logged in --> | |
530 | +<%if(skintype,index)%> | |
531 | +<dd><a href="javascript:showedit();">クイック投稿</a></dd> | |
532 | +<%endif%> | |
533 | +<dd><a href="<%addlink%>" onclick="<%addpopupcode%>" title="ブログに記事を投稿(新規投稿ウィンドウが開きます)">新規投稿(ポップアップ)</a></dd> | |
534 | +<dd><a href="<%adminurl%>" title="管理画面">管理画面</a></dd> | |
535 | +<%endif%> | |
536 | +</dl> | |
537 | +</div> | |
538 | + | |
539 | +<%if(skintype,error)%> | |
540 | +<%elseifnot(skintype,member)%> | |
541 | +<!-- category list, not on error or member page --> | |
542 | +<div class="sidebar"> | |
543 | +<dl class="sidebardl"> | |
544 | +<dt>カテゴリ</dt> | |
545 | +<%categorylist(default/categorylist)%> | |
546 | +</dl> | |
547 | +</div> | |
548 | +<%endif%> | |
549 | + | |
550 | +<!-- bloglist--> | |
551 | +<div class="sidebar"> | |
552 | +<dl class="sidebardl"> | |
553 | +<dt>Blogs</dt> | |
554 | +<%bloglist(default/bloglist)%> | |
555 | +</dl> | |
556 | +</div> | |
557 | + | |
558 | +<!-- search form --> | |
559 | +<div class="sidebar"> | |
560 | +<dl class="sidebardl"> | |
561 | +<dt>検索</dt> | |
562 | +<dd><%searchform%></dd> | |
563 | +</dl> | |
564 | +</div> | |
565 | + | |
566 | +<!-- login form --> | |
567 | +<div class="sidebar"> | |
568 | +<dl class="sidebardl"> | |
569 | +<dt>ログイン</dt> | |
570 | +<dd><%loginform%></dd> | |
571 | +</dl> | |
572 | +</div> | |
573 | + | |
574 | +<!-- links --> | |
575 | +<div class="sidebar"> | |
576 | +<dl class="sidebardl"> | |
577 | +<dt>リンク</dt> | |
578 | +<%parsedinclude(linklist)%> | |
579 | +</dl> | |
580 | +</div> | |
581 | + | |
582 | +<!-- Powered by --> | |
583 | +<div class="sidebar"> | |
584 | +<div class="sidebardl centerize"> | |
585 | +<%nucleusbutton(images/nucleus.gif,85,31)%> | |
586 | +</div> | |
587 | +</div> | |
588 | + | |
589 | +<!-- benchimark --> | |
590 | +<div class="sidebar"> | |
591 | +<dl class="sidebardl"> | |
592 | +<dt>ページ生成時間</dt> | |
593 | +<dd><%phpinclude(inc/show_benchmark.inc)%></dd> | |
594 | +</dl> | |
595 | +</div>]]></part> | |
596 | + | |
348 | 597 | </skin> |
349 | 598 | |
350 | 599 |
@@ -0,0 +1,568 @@ | ||
1 | +<nucleusskin> | |
2 | + <meta> | |
3 | + <skin name="default" /> | |
4 | + <template name="default/index" /> | |
5 | + <template name="default/item" /> | |
6 | + <template name="default/categorylist" /> | |
7 | + <template name="default/archivelist" /> | |
8 | + <template name="default/commentlist" /> | |
9 | + <template name="default/searchlist" /> | |
10 | + <template name="default/bloglist" /> | |
11 | + <info><![CDATA[Nucleus CMS default skin (日本語版)]]></info> | |
12 | + </meta> | |
13 | + | |
14 | + | |
15 | + <skin name="default" type="text/html" includeMode="skindir" includePrefix="default/"> | |
16 | + <description>Nucleus CMS default skin (日本語版)</description> | |
17 | + <part name="archive"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
18 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> | |
19 | +<head> | |
20 | +<%parsedinclude(inc/head.inc)%> | |
21 | +<%parsedinclude(inc/navigation.inc)%> | |
22 | +</head> | |
23 | +<body> | |
24 | +<!-- page header --> | |
25 | +<%parsedinclude(inc/header.inc)%> | |
26 | +<!-- begin wrapper divs --> | |
27 | +<div id="mainwrapper"><div id="wrapper"> | |
28 | + | |
29 | +<!-- page content --> | |
30 | +<div id="container"> | |
31 | +<div class="content"> | |
32 | +<div class="contenttitle"> | |
33 | +<h2>過去の投稿</h2> | |
34 | +</div> | |
35 | +<%archivedate(%Y年%m月)%> の投稿一覧です。 | |
36 | +</div> | |
37 | +<div class="content"> | |
38 | +<%archive(default/index)%> | |
39 | +</div> | |
40 | +</div> | |
41 | + | |
42 | +<!-- page menu --> | |
43 | +<h2 class="hidden">Sidebar</h2> | |
44 | +<div id="sidebarcontainer"> | |
45 | +<%parsedinclude(inc/sidebar.inc)%> | |
46 | +</div> | |
47 | + | |
48 | +<div class="clearing"> </div> | |
49 | +</div></div> | |
50 | +<!-- end wrapper divs --> | |
51 | + | |
52 | +<!-- page footer, copyrights, etc. --> | |
53 | +<div id="footer"> | |
54 | +<%parsedinclude(inc/footer.inc)%> | |
55 | +</div> | |
56 | + | |
57 | +</body> | |
58 | +</html>]]></part> | |
59 | + | |
60 | + <part name="archivelist"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
61 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> | |
62 | +<head> | |
63 | +<%parsedinclude(inc/head.inc)%> | |
64 | +<%parsedinclude(inc/navigation.inc)%> | |
65 | +</head> | |
66 | +<body> | |
67 | +<!-- page header --> | |
68 | +<%parsedinclude(inc/header.inc)%> | |
69 | +<!-- begin wrapper divs --> | |
70 | +<div id="mainwrapper"> | |
71 | +<div id="wrapper"> | |
72 | + | |
73 | +<!-- page content --> | |
74 | +<div id="container"> | |
75 | +<div class="content"> | |
76 | +<div class="contenttitle"> | |
77 | +<h2>過去の投稿</h2> | |
78 | +</div> | |
79 | +<dl> | |
80 | +<dt>月別の投稿</dt> | |
81 | +<%archivelist(default/archivelist)%> | |
82 | +</dl> | |
83 | +</div> | |
84 | +</div> | |
85 | + | |
86 | +<!-- page menu --> | |
87 | +<h2 class="hidden">サイドバー</h2> | |
88 | +<div id="sidebarcontainer"> | |
89 | +<%parsedinclude(inc/sidebar.inc)%> | |
90 | +</div> | |
91 | + | |
92 | +<div class="clearing"> </div> | |
93 | +</div> | |
94 | +</div> | |
95 | +<!-- end wrapper divs --> | |
96 | + | |
97 | +<!-- page footer, copyrights, etc. --> | |
98 | +<div id="footer"> | |
99 | +<%parsedinclude(inc/footer.inc)%> | |
100 | +</div> | |
101 | + | |
102 | +</body> | |
103 | +</html>]]></part> | |
104 | + | |
105 | + <part name="error"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
106 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> | |
107 | +<head> | |
108 | +<%parsedinclude(inc/head.inc)%> | |
109 | +<%parsedinclude(inc/navigation.inc)%> | |
110 | +</head> | |
111 | +<body> | |
112 | +<!-- page header --> | |
113 | +<%parsedinclude(inc/header.inc)%> | |
114 | + | |
115 | +<!-- begin wrapper divs --> | |
116 | +<div id="mainwrapper"> | |
117 | +<div id="wrapper"> | |
118 | + | |
119 | +<!-- page content --> | |
120 | +<div id="container"> | |
121 | +<div class="content"> | |
122 | +<div class="contenttitle"> | |
123 | +<h2>エラーです</h2> | |
124 | +</div> | |
125 | +<%errormessage%><br /><br /> | |
126 | +<a href="<%referer%>">戻る</a> | |
127 | +</div> | |
128 | +</div> | |
129 | + | |
130 | +<!-- page menu --> | |
131 | +<h2 class="hidden">サイドバー</h2> | |
132 | +<div id="sidebarcontainer"> | |
133 | +<%parsedinclude(inc/sidebar.inc)%> | |
134 | +</div> | |
135 | + | |
136 | +<div class="clearing"> </div> | |
137 | +</div> | |
138 | +</div> | |
139 | +<!-- end wrapper divs --> | |
140 | + | |
141 | +<!-- page footer, copyrights, etc. --> | |
142 | +<div id="footer"> | |
143 | +<%parsedinclude(inc/footer.inc)%> | |
144 | +</div> | |
145 | + | |
146 | +</body> | |
147 | +</html>]]></part> | |
148 | + | |
149 | + <part name="imagepopup"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
150 | +<html> | |
151 | +<head> | |
152 | +<title><%imagetext%></title> | |
153 | +<style type="text/css"> | |
154 | +img { border: none; } | |
155 | +body { margin: 0px; } | |
156 | +</style> | |
157 | +</head> | |
158 | + | |
159 | +<!-- image content --> | |
160 | +<body onblur="window.close()"> | |
161 | +<a href="javascript:window.close();"><%image%></a> | |
162 | +</body> | |
163 | + | |
164 | +</html>]]></part> | |
165 | + | |
166 | + <part name="index"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
167 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> | |
168 | +<head> | |
169 | +<%parsedinclude(inc/head.inc)%> | |
170 | +<%parsedinclude(inc/navigation.inc)%> | |
171 | +</head> | |
172 | +<body> | |
173 | +<!-- page header --> | |
174 | +<%parsedinclude(inc/header.inc)%> | |
175 | + | |
176 | +<!-- begin wrapper divs --> | |
177 | +<div id="mainwrapper"><div id="wrapper"> | |
178 | + | |
179 | +<!-- page content --> | |
180 | +<div id="container"> | |
181 | +<div class="content"> | |
182 | +<%parsedinclude(inc/additemform.inc)%> | |
183 | +<%blog(default/index,10)%> | |
184 | +</div> | |
185 | +</div> | |
186 | + | |
187 | +<!-- page menu --> | |
188 | +<h2 class="hidden">サイドバー</h2> | |
189 | +<div id="sidebarcontainer"> | |
190 | +<%parsedinclude(inc/sidebar.inc)%> | |
191 | +</div> | |
192 | + | |
193 | +<div class="clearing"> </div> | |
194 | +</div></div> | |
195 | +<!-- end wrapper divs --> | |
196 | + | |
197 | +<!-- page footer, copyrights, etc. --> | |
198 | +<div id="footer"> | |
199 | +<%parsedinclude(inc/footer.inc)%> | |
200 | +</div> | |
201 | + | |
202 | +</body> | |
203 | +</html>]]></part> | |
204 | + | |
205 | + <part name="item"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
206 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> | |
207 | +<head> | |
208 | +<%parsedinclude(inc/head.inc)%> | |
209 | +<%parsedinclude(inc/navigation.inc)%> | |
210 | +</head> | |
211 | +<body> | |
212 | +<!-- page header --> | |
213 | +<%parsedinclude(inc/header.inc)%> | |
214 | + | |
215 | +<!-- begin wrapper divs --> | |
216 | +<div id="mainwrapper"><div id="wrapper"> | |
217 | + | |
218 | +<!-- page content --> | |
219 | +<div id="container"> | |
220 | +<div class="content"> | |
221 | +<%item(default/item)%> | |
222 | +</div> | |
223 | + | |
224 | +<%comments(default/commentlist)%> | |
225 | + | |
226 | +<div class="content"> | |
227 | +<div class="contenttitle"> | |
228 | +<h2>コメントを書く</h2> | |
229 | +</div> | |
230 | +<%commentform%> | |
231 | +</div> | |
232 | + | |
233 | +</div> | |
234 | + | |
235 | +<!-- page menu --> | |
236 | +<h2 class="hidden">サイドバー</h2> | |
237 | +<div id="sidebarcontainer"> | |
238 | +<%parsedinclude(inc/sidebar.inc)%> | |
239 | +</div> | |
240 | + | |
241 | +<div class="clearing"> </div> | |
242 | +</div></div> | |
243 | +<!-- end wrapper divs --> | |
244 | + | |
245 | +<!-- page footer, copyrights, etc. --> | |
246 | +<div id="footer"> | |
247 | +<%parsedinclude(inc/footer.inc)%> | |
248 | +</div> | |
249 | + | |
250 | +</body> | |
251 | +</html>]]></part> | |
252 | + | |
253 | + <part name="member"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
254 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> | |
255 | +<head> | |
256 | +<%parsedinclude(inc/head.inc)%> | |
257 | +<%parsedinclude(inc/navigation.inc)%> | |
258 | +</head> | |
259 | + | |
260 | +<!-- page header --> | |
261 | +<%parsedinclude(inc/header.inc)%> | |
262 | +<!-- begin wrapper divs --> | |
263 | +<div id="mainwrapper"> | |
264 | +<div id="wrapper"> | |
265 | + | |
266 | +<!-- page content --> | |
267 | +<div id="container"> | |
268 | +<div class="content"> | |
269 | +<div class="contenttitle"> | |
270 | +<h2>投稿者「<%member(name)%>」の情報</h2> | |
271 | +</div> | |
272 | +本名: <%member(realname)%> | |
273 | +<br /><br /> | |
274 | +WEBサイト: <a href="<%member(url)%>"><%member(url)%></a> | |
275 | +</div> | |
276 | +<div class="content"> | |
277 | +<div class="contenttitle"> | |
278 | +<h2>メッセージを送る</h2> | |
279 | +</div> | |
280 | +<%membermailform%> | |
281 | +</div> | |
282 | +</div> | |
283 | + | |
284 | +<!-- page menu --> | |
285 | +<h2 class="hidden">サイドバー</h2> | |
286 | +<div id="sidebarcontainer"> | |
287 | +<%parsedinclude(inc/sidebar.inc)%> | |
288 | +</div> | |
289 | + | |
290 | +<div class="clearing"> </div> | |
291 | +</div> | |
292 | +</div> | |
293 | +<!-- end wrapper divs --> | |
294 | + | |
295 | +<!-- page footer, copyrights, etc. --> | |
296 | +<div id="footer"> | |
297 | +<%parsedinclude(inc/footer.inc)%> | |
298 | +</div> | |
299 | + | |
300 | +</body> | |
301 | +</html>]]></part> | |
302 | + | |
303 | + <part name="search"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
304 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP"> | |
305 | +<head> | |
306 | +<%parsedinclude(inc/head.inc)%> | |
307 | +<%parsedinclude(inc/navigation.inc)%> | |
308 | +</head> | |
309 | +<body> | |
310 | +<!-- page header --> | |
311 | +<%parsedinclude(inc/header.inc)%> | |
312 | +<!-- begin wrapper divs --> | |
313 | +<div id="mainwrapper"> | |
314 | +<div id="wrapper"> | |
315 | + | |
316 | +<!-- page content --> | |
317 | +<div id="container"> | |
318 | +<div class="content"> | |
319 | +<div class="contenttitle"> | |
320 | +<h2>検索結果</h2> | |
321 | +</div> | |
322 | +<%searchform%> | |
323 | +</div> | |
324 | +<div class="content"> | |
325 | +<%searchresults(default/searchlist)%> | |
326 | +</div> | |
327 | +</div> | |
328 | + | |
329 | +<!-- page menu --> | |
330 | +<h2 class="hidden">サイドバー</h2> | |
331 | +<div id="sidebarcontainer"> | |
332 | +<%parsedinclude(inc/sidebar.inc)%> | |
333 | +</div> | |
334 | + | |
335 | +<div class="clearing"> </div> | |
336 | +</div> | |
337 | +</div> | |
338 | +<!-- end wrapper divs --> | |
339 | + | |
340 | +<!-- page footer, copyrights, etc. --> | |
341 | +<div id="footer"> | |
342 | +<%parsedinclude(inc/footer.inc)%> | |
343 | +</div> | |
344 | + | |
345 | +</body> | |
346 | +</html>]]></part> | |
347 | + | |
348 | + </skin> | |
349 | + | |
350 | + | |
351 | + <template name="default/index"> | |
352 | + <description>defaultスキン用 index テンプレート</description> | |
353 | + <part name="COMMENTS_NONE"><![CDATA[<div class="contentitem3"> | |
354 | +<small class="contentitemcomments"> | |
355 | +<a href="<%itemlink%>#c" rel="bookmark" title="'<%itemtitle(attribute)%>' にコメントをつける">コメントを書く</a> | |
356 | +</small> | |
357 | +</div>]]></part> | |
358 | + | |
359 | + <part name="COMMENTS_TOOMUCH"><![CDATA[<div class="contentitem3"> | |
360 | +<small class="contentitemcomments"> | |
361 | +<a href="<%itemlink%>#c" rel="bookmark" title="'<%itemtitle(attribute)%>' にコメントを書く">コメント数 <%commentcount%></a> | |
362 | +</small> | |
363 | +</div>]]></part> | |
364 | + | |
365 | + <part name="EDITLINK"><![CDATA[<div class="contentitem4"> | |
366 | +<small class="contentitemedit"> | |
367 | +<a href="<%editlink%>" title="投稿を編集" onclick="<%editpopupcode%>" >投稿を編集</a> | |
368 | +</small> | |
369 | +</div>]]></part> | |
370 | + | |
371 | + <part name="IMAGE_CODE"><![CDATA[<%image%>]]></part> | |
372 | + | |
373 | + <part name="ITEM"><![CDATA[<div class="contenttitle"> | |
374 | +<h2><a href="<%itemlink%>" title="投稿を読む: <%title(attribute)%>"><%title%> (<%date(%Y/%m/%d)%>)</a></h2> | |
375 | +</div> | |
376 | +<div class="contentitem"> | |
377 | +<div class="contentitem1"> | |
378 | +<small class="contentitemcategory"> | |
379 | +カテゴリー: <a href="<%categorylink%>" title="カテゴリー: <%Category%>"><%Category%></a> | |
380 | +</small> | |
381 | +</div> | |
382 | +<div class="contentitem2"> | |
383 | +<small class="contentitempostedby"> | |
384 | +投稿者: <a href="<%authorlink%>" title="投稿者: <%author%>"><%author%></a> | |
385 | +</small> | |
386 | +</div> | |
387 | +<%comments%> | |
388 | +<%edit%> | |
389 | +</div> | |
390 | +<div class="contentbody"> | |
391 | +<%body%> | |
392 | +<%morelink%> | |
393 | +</div>]]></part> | |
394 | + | |
395 | + <part name="MEDIA_CODE"><![CDATA[<%media%>]]></part> | |
396 | + | |
397 | + <part name="MORELINK"><![CDATA[<p>» | |
398 | +<a href="<%itemlink%>#more" title="'<%title%>' の続きを読む">続きを読む</a> | |
399 | +</p>]]></part> | |
400 | + | |
401 | + <part name="POPUP_CODE"><![CDATA[<%popuplink%>]]></part> | |
402 | + | |
403 | + </template> | |
404 | + | |
405 | + | |
406 | + <template name="default/item"> | |
407 | + <description>defaultスキン用 itemテンプレート</description> | |
408 | + <part name="EDITLINK"><![CDATA[<div class="contentitem4"> | |
409 | +<small class="contentitemedit"> | |
410 | +<a href="<%editlink%>" title="投稿を編集" onclick="<%editpopupcode%>" >投稿を編集</a> | |
411 | +</small> | |
412 | +</div>]]></part> | |
413 | + | |
414 | + <part name="IMAGE_CODE"><![CDATA[<%image%>]]></part> | |
415 | + | |
416 | + <part name="ITEM"><![CDATA[<div class="contenttitle"> | |
417 | +<h2><%title%> (<%date(%Y/%m/%d)%>)</h2> | |
418 | +</div> | |
419 | +<div class="contentitem"> | |
420 | +<div class="contentitem1"> | |
421 | +<small class="contentitemcategory"> | |
422 | +カテゴリー: <a href="<%categorylink%>" title="カテゴリー: <%category%>"><%category%></a> | |
423 | +</small> | |
424 | +</div> | |
425 | +<div class="contentitem2"> | |
426 | +<small class="contentitempostedby"> | |
427 | +投稿者: <a href="<%authorlink%>" title="投稿者: <%author%>"><%author%></a> | |
428 | +</small> | |
429 | +</div> | |
430 | +<%edit%> | |
431 | +</div> | |
432 | +<div class="contentbody"> | |
433 | +<%body%><br /><br /> | |
434 | +<a name="more"></a><%more%> | |
435 | +</div>]]></part> | |
436 | + | |
437 | + <part name="MEDIA_CODE"><![CDATA[<%media%>]]></part> | |
438 | + | |
439 | + <part name="POPUP_CODE"><![CDATA[<%popuplink%>]]></part> | |
440 | + | |
441 | + </template> | |
442 | + | |
443 | + | |
444 | + <template name="default/categorylist"> | |
445 | + <description>defaultスキン用カテゴリーリスト(サイドバー)</description> | |
446 | + <part name="CATLIST_HEADER"><![CDATA[<dd> | |
447 | +<a href="<%blogurl%>" title="全てのカテゴリー">全てのカテゴリー</a> | |
448 | +</dd>]]></part> | |
449 | + | |
450 | + <part name="CATLIST_LISTITEM"><![CDATA[<dd> | |
451 | +<a href="<%catlink%>" title="カテゴリー: <%catname%>"><%catname%></a> | |
452 | +</dd>]]></part> | |
453 | + | |
454 | + </template> | |
455 | + | |
456 | + | |
457 | + <template name="default/archivelist"> | |
458 | + <description>defaultスキン用アーカイブリスト(月別アーカイブの一覧)</description> | |
459 | + <part name="ARCHIVELIST_LISTITEM"><![CDATA[<dd> | |
460 | +<a href="<%archivelink%>" title="過去の投稿 %Y年%m月">%Y年%m月</a> | |
461 | +</dd>]]></part> | |
462 | + | |
463 | + </template> | |
464 | + | |
465 | + | |
466 | + <template name="default/commentlist"> | |
467 | + <description>defaultスキン用コメントリスト(個別アイテム内)</description> | |
468 | + <part name="COMMENTS_BODY"><![CDATA[<div class="itemcomment id<%memberid%>"> | |
469 | +<h3><a href="<%userlinkraw%>" | |
470 | +title="<%user%>さんにメールを送るかサイトを訪れる。"> | |
471 | +<%user%></a>さんのコメント</h3> | |
472 | +<div class="commentbody"> | |
473 | +<%body%> | |
474 | +</div> | |
475 | +<div class="commentinfo"> | |
476 | +<%date%> <%time%> | |
477 | +</div> | |
478 | +</div> | |
479 | +]]></part> | |
480 | + | |
481 | + <part name="COMMENTS_FOOTER"><![CDATA[</div> | |
482 | + | |
483 | +]]></part> | |
484 | + | |
485 | + <part name="COMMENTS_HEADER"><![CDATA[<a name="c"></a> | |
486 | +<div class="content"> | |
487 | +<div class="contenttitle"> | |
488 | +<h2>コメント一覧</h2> | |
489 | +</div> | |
490 | + | |
491 | +]]></part> | |
492 | + | |
493 | + <part name="COMMENTS_NONE"><![CDATA[<a name="c"></a> | |
494 | + | |
495 | +]]></part> | |
496 | + | |
497 | + </template> | |
498 | + | |
499 | + | |
500 | + <template name="default/searchlist"> | |
501 | + <description>defaultスキン用検索結果一覧テンプレート</description> | |
502 | + <part name="COMMENTS_NONE"><![CDATA[<div class="contentitem3"> | |
503 | +<small class="contentitemcomments"> | |
504 | +<a href="<%itemlink%>#c" rel="bookmark" title="'<%itemtitle(attribute)%>' にコメントをつける">コメントを書く</a> | |
505 | +</small> | |
506 | +</div>]]></part> | |
507 | + | |
508 | + <part name="COMMENTS_TOOMUCH"><![CDATA[<div class="contentitem3"> | |
509 | +<small class="contentitemcomments"> | |
510 | +<a href="<%itemlink%>#c" rel="bookmark" title="'<%itemtitle(attribute)%>' にコメントを書く">コメント数 <%commentcount%></a> | |
511 | +</small> | |
512 | +</div>]]></part> | |
513 | + | |
514 | + <part name="EDITLINK"><![CDATA[<div class="contentitem4"> | |
515 | +<small class="contentitemedit"> | |
516 | +<a href="<%editlink%>" title="投稿を編集" onclick="<%editpopupcode%>" >投稿を編集</a> | |
517 | +</small> | |
518 | +</div>]]></part> | |
519 | + | |
520 | + <part name="IMAGE_CODE"><![CDATA[<%image%>]]></part> | |
521 | + | |
522 | + <part name="ITEM"><![CDATA[<div class="contenttitle"> | |
523 | +<h2><a href="<%itemlink%>" title="投稿を読む: <%title(attribute)%>"><%title%> (<%date(%Y/%m/%d)%>)</a></h2> | |
524 | +</div> | |
525 | +<div class="contentitem"> | |
526 | +<div class="contentitem1"> | |
527 | +<small class="contentitemcategory"> | |
528 | +カテゴリー: <a href="<%categorylink%>" title="カテゴリー: <%Category%>"><%Category%></a> | |
529 | +</small> | |
530 | +</div> | |
531 | +<div class="contentitem2"> | |
532 | +<small class="contentitempostedby"> | |
533 | +投稿者: <a href="<%authorlink%>" title="投稿者: <%author%>"><%author%></a> | |
534 | +</small> | |
535 | +</div> | |
536 | +<%comments%> | |
537 | +<%edit%> | |
538 | +</div> | |
539 | +<div class="contentbody"> | |
540 | +<%body%> | |
541 | +<%morelink%> | |
542 | +</div>]]></part> | |
543 | + | |
544 | + <part name="MEDIA_CODE"><![CDATA[<%media%>]]></part> | |
545 | + | |
546 | + <part name="MORELINK"><![CDATA[<p>» | |
547 | +<a href="<%itemlink%>#more" title="'<%title%>' の続きを読む">続きを読む</a> | |
548 | +</p>]]></part> | |
549 | + | |
550 | + <part name="POPUP_CODE"><![CDATA[<%popuplink%>]]></part> | |
551 | + | |
552 | + <part name="SEARCH_HIGHLIGHT"><![CDATA[<span class='highlight'>\0</span>]]></part> | |
553 | + | |
554 | + <part name="SEARCH_NOTHINGFOUND"><![CDATA[キーワード<b><%query%></b>は見つかりませんでした。]]></part> | |
555 | + | |
556 | + </template> | |
557 | + | |
558 | + | |
559 | + <template name="default/bloglist"> | |
560 | + <description>defaultスキン用ブログリスト(サイドバー)</description> | |
561 | + <part name="BLOGLIST_LISTITEM"><![CDATA[<dd> | |
562 | +<a href="<%bloglink%>" title="ブログ: <%blogname%>"><%blogname%></a> | |
563 | +</dd>]]></part> | |
564 | + | |
565 | + </template> | |
566 | + | |
567 | + | |
568 | +</nucleusskin> | |
\ No newline at end of file |