951 Commits

Author SHA1 Message Date
沈唁
4be93f2741 Fix missing mysqli_connect_errno (#1346) 2022-03-28 12:11:24 +08:00
joyqi
6100695d87 fix db exception 2022-03-25 15:31:57 +08:00
fen
0bdf8721e1 add ignore 2022-03-25 12:08:22 +08:00
沈唁
ce7af58367 Optimize code (#1342) 2022-03-24 17:46:03 +08:00
joyqi
1b673e06ff fix typecho/Dockerfile#9 2022-03-22 14:24:14 +08:00
joyqi
0edb48fae0 fix #1335, close #1337 2022-03-16 21:05:22 +08:00
沈唁
17fcb2f08b Fix undefined Typecho\Db\Adapter_Exception (#1334) 2022-03-15 16:09:32 +08:00
joyqi
5f943d48b5 fix #1329 2022-02-25 21:16:12 +08:00
joyqi
b23277267a fix #1328 2022-02-24 23:21:35 +08:00
沈唁
b0d78a81dc Fix #1326 (#1327) 2022-02-21 21:51:13 +08:00
沈唁
f34d14280d Fix compatibility with PHP 8.1 (#1324)
* Fix compatibility with PHP 8.1

PHP Deprecated:  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in typecho/var/Widget/Archive.php on line 1292

* Fix login

* Fix write

* Fix manage

* Fix PHP Deprecated
2022-02-15 11:10:47 +08:00
沈唁
13dc5e87dd Fix #1322 (#1323)
Great work!
2022-02-15 11:10:15 +08:00
沈唁
0b021e5e7d Fix broken extends.typecho.org link (#1315)
close #857
2022-02-09 11:41:35 +08:00
joyqi
00c75d2f75 fix version compare 2022-01-30 00:30:28 +08:00
joyqi
1eedc481ad fix #1295, ref #1297 2022-01-29 17:46:48 +08:00
joyqi
75899e287d fix #1268 2022-01-28 23:58:31 +08:00
jiayx
047bd17f19 Fixes for PHP 8.1 compatibility (#1293)
* Fixes for PHP 8.1 compatibility

* Fixes for PHP 8.1 compatibility

* 优化写法

* remove mixed type

* fix nullable column

* fix query filter

* recover

* recover fileds

* recover

* Update Text.php

* Update Text.php

Co-authored-by: joyqi <joyqi@users.noreply.github.com>
2022-01-28 23:51:24 +08:00
joyqi
9c075dcdf0 fix #1279 2022-01-13 14:04:58 +08:00
joyqi
157fc05265 fix #1268 2021-12-13 11:58:35 +08:00
joyqi
c047669900 fix #1257 2021-12-06 22:09:17 +08:00
joyqi
eee0228fed Refactor HttpClient, fix #1246 2021-11-18 00:20:24 +08:00
joyqi
389b46635e fix client 2021-11-17 18:34:01 +08:00
joyqi
919911e288 fix redirect 2021-11-17 00:33:05 +08:00
joyqi
dd4bf889de fix #1222 2021-11-04 16:37:29 +08:00
joyqi
0dcf45a152 fix #1220 2021-10-30 00:02:41 +08:00
joyqi
ceaa545c7d fix #1212 2021-10-28 19:53:18 +08:00
joyqi
01d9d0c3f5 fix #1207 2021-10-28 12:04:00 +08:00
joyqi
6b46dd9c50 Merge branch 'master' of github.com:typecho/typecho 2021-10-21 22:09:05 +08:00
joyqi
cb4457ab52 fix #1201 2021-10-21 22:08:53 +08:00
joyqi
8a57b91343 fix #1203 2021-10-21 18:49:05 +08:00
joyqi
c66b6e20ec fix #1187 2021-10-21 11:10:34 +08:00
joyqi
b33a9c4d02 ref https://github.com/typecho/Dockerfile/issues/1 2021-10-13 18:34:46 +08:00
joyqi
cac1c650a1 fix #1196 2021-10-13 16:31:15 +08:00
joyqi
42e192340d fix #1194 2021-10-13 15:50:40 +08:00
joyqi
b677f7db92 Merge branch 'master' of github.com:typecho/typecho 2021-10-13 14:33:43 +08:00
joyqi
2fbc56dead ref https://github.com/typecho/Dockerfile/issues/1 2021-10-13 14:33:28 +08:00
joyqi
d174cc5732 update hyperdown 2021-09-30 01:06:14 +08:00
joyqi
5557f6dd91 fix clear 2021-09-29 17:10:34 +08:00
joyqi
42fe6f7bf5 fix #1191 2021-09-26 16:15:17 +08:00
joyqi
1f1019ba5b fix #1189 2021-09-23 11:29:10 +08:00
joyqi
13d18e02cc Create CODE_OF_CONDUCT.md 2021-09-17 21:59:56 +08:00
joyqi
e46acd815d improve cli install 2021-09-17 15:15:54 +08:00
joyqi
432b69f70d fix install detect & error display 2021-09-17 15:06:05 +08:00
joyqi
0e750771ae fix service 2021-09-16 21:54:49 +08:00
joyqi
fc9aaf66f3 Use TypechoPlugin\ for plugin namespace 2021-09-16 17:53:59 +08:00
joyqi
ec495d7e24 Add magic method to native request object 2021-09-16 17:05:43 +08:00
joyqi
f6b02ebe24 fix port number 2021-09-16 15:42:17 +08:00
joyqi
64b8e68688 fix #1178, change directory permission from 0777 to 0755 2021-09-15 14:59:08 +08:00
joyqi
4e5b88821d fix #1179 2021-09-15 14:33:23 +08:00
joyqi
a003cffbbb fix radio & checkbox vertical alignment. 2021-09-15 14:15:06 +08:00
joyqi
7ef5fcabd5 fix pingback & request 2021-09-15 01:25:36 +08:00
joyqi
3c4a0022c3 fix pingback 2021-09-15 00:31:13 +08:00
joyqi
780c3b61f4 fix ci build 2021-09-14 22:21:51 +08:00
joyqi
1d21ecac16 fix zip 2021-09-14 21:48:43 +08:00
joyqi
2d777ec061 fix tar 2021-09-14 21:39:06 +08:00
joyqi
5d20d57be9 fix #1173 2021-09-14 00:24:56 +08:00
joyqi
3f14d6e138 fix 2021-09-12 18:09:37 +08:00
joyqi
1ee18ad532 fix #1160 2021-09-11 01:06:54 +08:00
joyqi
419183ae2f fix #1167 2021-09-10 23:09:59 +08:00
joyqi
0916631ae2 fix #1165 2021-09-10 17:36:52 +08:00
joyqi
4186cdec6a fix #1164 2021-09-10 14:52:55 +08:00
joyqi
cbb270ea89 fix backup recover error 2021-09-10 11:47:55 +08:00
joyqi
d839f390ee fix #1163, fix #1164 2021-09-10 11:26:04 +08:00
joyqi
26e8077e0a fix alias 2021-09-10 02:28:15 +08:00
joyqi
b5167dbe5d fix #1158 2021-09-10 02:22:45 +08:00
joyqi
a1bf3d037b fix #1162 2021-09-09 20:18:11 +08:00
joyqi
ed30a99655 fix request response error 2021-09-09 20:08:04 +08:00
joyqi
bf2cb07e4b fix #1160 2021-09-09 18:20:30 +08:00
joyqi
729dcf729a fix #1160 2021-09-09 17:45:15 +08:00
joyqi
58cb9105d4 fix #1157 2021-09-09 15:06:05 +08:00
joyqi
eb77897ab6 fix #1159 2021-09-09 14:09:19 +08:00
joyqi
4ad930a31d Merge branch 'master' of github.com:typecho/typecho 2021-09-09 11:41:39 +08:00
joyqi
fa222ba7a2 fix #1157 2021-09-09 11:41:17 +08:00
joyqi
519e84e74c fix #1156 2021-09-09 00:16:07 +08:00
joyqi
57106d85c9 fix requestUri 2021-09-08 22:33:26 +08:00
joyqi
a4883be588 fix #1155 2021-09-08 22:18:11 +08:00
joyqi
96eb56fc35 fix #1154 2021-09-08 21:47:54 +08:00
joyqi
a3d698c09e fix actions 2021-09-08 16:36:56 +08:00
joyqi
9bd4eaeae8 fix release action 2021-09-08 16:17:55 +08:00
joyqi
a31da6880d fix destroy bug 2021-09-07 16:56:08 +08:00
joyqi
0759a9414a fix #1147 2021-09-07 16:31:06 +08:00
joyqi
ee00fc567f fix #1152 2021-09-07 15:59:09 +08:00
joyqi
5303124431 Merge pull request #1151 from typecho/dev
Dev
2021-09-07 11:00:58 +08:00
joyqi
74b0f45a72 fix format 2021-09-06 14:16:21 +08:00
joyqi
0f3f15c0ca fix titile 2021-09-06 14:00:39 +08:00
joyqi
cbfe180d8b fix rss 2021-09-06 00:37:59 +08:00
joyqi
d24a16ad23 fix sandbox 2021-09-05 11:09:06 +08:00
joyqi
6123f3ae62 fix sandbox 2021-09-05 10:47:29 +08:00
joyqi
89649522c7 fix sandbox 2021-09-04 21:27:57 +08:00
joyqi
675efe1e43 add sandbox 2021-09-04 21:12:14 +08:00
joyqi
f40c5c178e fix delete 2021-09-03 12:40:02 +08:00
joyqi
5a2833c5aa fix xmlrpc 2021-09-03 12:22:22 +08:00
joyqi
c279ef1443 fix xmlrpc 2021-09-03 02:27:52 +08:00
joyqi
6cedf6a0a1 fix xmlrpc 2021-09-03 00:15:22 +08:00
joyqi
7068b2bbe1 Refactor method pluginDIr 2021-09-02 17:55:41 +08:00
joyqi
4791cd978e fix bug 2021-09-02 16:13:32 +08:00
joyqi
403f96fdc0 Change plugin version dependence keyword form dependence to since 2021-09-02 15:30:26 +08:00
joyqi
86587d40ce fix options 2021-09-02 11:58:02 +08:00
joyqi
7bd37f7d8c fix options 2021-09-02 11:34:12 +08:00
joyqi
ecd21c2557 fix plugin name 2021-09-01 22:52:02 +08:00
joyqi
50dea3fc24 fix plugin namespace 2021-09-01 18:45:59 +08:00
joyqi
7db5f3c873 change all 2021-09-01 18:27:03 +08:00
joyqi
4f13adcadd replace theme and plugin file 2021-09-01 17:21:58 +08:00
joyqi
ba0bfd3551 replace with new namespace rule 2021-09-01 17:08:57 +08:00
joyqi
2fad7cc398 fix attr 2021-09-01 13:49:32 +08:00
joyqi
49eed7b437 fix xmlrpc 2021-09-01 00:04:05 +08:00
joyqi
d72d4ea2ab finish xmlrpc 2021-08-31 18:25:49 +08:00
joyqi
7ca696ce90 fix all 2021-08-31 01:52:30 +08:00
joyqi
806409496a fix xmlrpc 2021-08-31 00:18:56 +08:00
joyqi
e2ca6a1fa7 fix 2021-08-30 17:45:18 +08:00
joyqi
e15c2966a9 still working on it 2021-08-30 14:52:52 +08:00
joyqi
93b5656109 fix action 2021-08-27 18:27:21 +08:00
joyqi
539ef5e111 still working on it 2021-08-27 18:06:57 +08:00
joyqi
7a1b74b351 still working on it 2021-08-26 22:19:04 +08:00
joyqi
540fba3122 fix class rewrite 2021-08-26 18:48:04 +08:00
joyqi
28f687e7fe Remove some unnecessary method. 2021-08-26 18:25:43 +08:00
joyqi
91a970521c New context layer for widget. Improve backup performance. 2021-08-26 15:00:38 +08:00
joyqi
926ec3e117 fix bug 2021-08-24 18:47:21 +08:00
joyqi
23d52d44a1 refactor code 2021-08-24 18:30:04 +08:00
joyqi
cf9776ee43 replace underscore with backslash 2021-08-24 14:19:14 +08:00
joyqi
a2e784113a new request wrapper 2021-08-24 14:08:58 +08:00
joyqi
38184ba5ba fix pgsql 2021-08-24 02:04:55 +08:00
joyqi
c422952c89 fix pgsql 2021-08-24 01:30:05 +08:00
joyqi
75672fe259 fix all 2021-08-23 18:43:32 +08:00
joyqi
82fe09cf52 Finish refactoring widget helper 2021-08-23 12:32:18 +08:00
joyqi
b0df985d66 Refactor codes 2021-08-22 23:27:07 +08:00
joyqi
09a320bf5d fix #1139 2021-08-22 19:32:11 +08:00
joyqi
5163c43610 remove old file 2021-08-22 01:27:32 +08:00
joyqi
e20e6804e9 Finish router and plugin refactoring 2021-08-22 01:27:04 +08:00
joyqi
eeb893485b Finish http client refactoring 2021-08-21 23:11:10 +08:00
joyqi
80746465c7 Merge commit 'c84fa39c4f95be47bed6ee418c99b7000f020240' into dev 2021-08-21 21:23:32 +08:00
joyqi
0e4391006c Still working on namespace 2021-08-21 21:22:43 +08:00
joyqi
c84fa39c4f fix #1138 2021-08-21 21:19:42 +08:00
joyqi
687a4c8e26 Refactor autoload, use namespace 2021-08-20 18:34:59 +08:00
joyqi
92cb7834e2 Merge commit '88fff899b85bf7ef218fee3085c8792f204f9dc5' into dev 2021-08-20 17:54:02 +08:00
joyqi
88fff899b8 Update install.php 2021-08-20 17:53:02 +08:00
joyqi
5d2aef0dac Refactor Db class and still working on it. 2021-08-20 16:44:17 +08:00
joyqi
75d5677d7d Make API Typecho_Common::arrayFlatten deprecated, please use array_column instead. 2021-08-20 16:42:40 +08:00
joyqi
687ab6260a change error handler 2021-08-20 16:30:16 +08:00
joyqi
30baad977c Link build actions 2021-08-20 15:50:05 +08:00
joyqi
c8c4d9e079 Use WORKFLOW_TOKEN for trigger 2021-08-20 15:21:15 +08:00
joyqi
92debef3e3 Merge pull request #1137 from typecho/dev
Merge from branch dev
2021-08-20 15:05:06 +08:00
joyqi
1c189588db Reformat code 2021-08-20 15:03:45 +08:00
joyqi
0177a0557a Split test and build stage 2021-08-20 12:17:47 +08:00
joyqi
6855e9f1f3 with access token 2021-08-20 11:55:51 +08:00
joyqi
478ec92491 Make widget's property sequence and length readonly. 2021-08-20 11:27:03 +08:00
joyqi
256fff6b24 change token 2021-08-20 11:21:35 +08:00
joyqi
31ed159312 Merge branch 'dev' of github.com:typecho/typecho into dev 2021-08-20 11:20:54 +08:00
joyqi
b3b9255c69 fix #1134
fix #1135
fix #1136
2021-08-20 11:15:11 +08:00
joyqi
22cadcc884 add trigger 2021-08-20 01:08:37 +08:00
joyqi
df854a3bf0 Remove minor version 2021-08-20 00:58:22 +08:00
joyqi
5b58d71b61 Merge commit 'fc0485c891849706b2b60c67e52fe5638a7e707a' into dev
* commit 'fc0485c891849706b2b60c67e52fe5638a7e707a':
  Update Typecho-dev-Ci.yml
  Update Typecho-dev-Ci.yml
  Update Typecho-dev-Ci.yml
  Update Typecho-dev-Ci.yml
2021-08-20 00:57:39 +08:00
joyqi
fc0485c891 Update Typecho-dev-Ci.yml 2021-08-19 18:20:27 +08:00
joyqi
78a4cc9f84 Update Typecho-dev-Ci.yml 2021-08-19 17:58:47 +08:00
joyqi
29cf8a070d Update Typecho-dev-Ci.yml 2021-08-19 17:57:44 +08:00
joyqi
45c8b22ba7 Update Typecho-dev-Ci.yml 2021-08-19 16:58:12 +08:00
joyqi
d0cedde7c0 change build target 2021-08-19 16:56:59 +08:00
joyqi
efc5bf5c51 update hyperdown 2021-08-19 15:56:42 +08:00
joyqi
24bd3ab367 Redirect to siteUrl if installation finished 2021-08-19 11:15:53 +08:00
joyqi
954e710013 remove func_get_args 2021-08-18 23:16:08 +08:00
joyqi
4b97110087 fix stack 2021-08-18 22:55:32 +08:00
joyqi
3d0b5d5f6c reformat code 2021-08-18 22:29:34 +08:00
joyqi
44aef6c707 reformat code 2021-08-18 18:41:39 +08:00
joyqi
8f61e2155c Merge pull request #1131 from typecho/dev
Say goodbye to old install script. Now we support install from cli, and ready for container using.
2021-08-18 16:19:57 +08:00
joyqi
467471c9c3 finish install 2021-08-18 16:09:22 +08:00
joyqi
423c99f3bd Remove isFlash detector 2021-08-18 11:45:19 +08:00
joyqi
7f3cd2b9e8 Remove isAppEngine detector 2021-08-18 11:41:52 +08:00
joyqi
12bd32babf fix install 2021-08-18 00:47:34 +08:00
joyqi
3dabb7b8d8 specify node version 2021-08-18 00:43:32 +08:00
joyqi
10dd9344b8 update node 2021-08-18 00:42:11 +08:00
joyqi
3ad7b06c6f fix cli install 2021-08-18 00:41:48 +08:00
joyqi
e157b47336 fix install cli mode 2021-08-17 22:44:06 +08:00
joyqi
63dc87e7e3 fix cli 2021-08-17 18:39:46 +08:00
joyqi
2731e34db0 fix install 2021-08-17 18:36:54 +08:00
joyqi
0d4299d99e update install 2021-08-17 01:53:47 +08:00
joyqi
bac7340c2a improve installation 2021-08-16 18:34:25 +08:00
joyqi
21a57903a9 update build file 2021-08-08 13:00:01 +08:00
joyqi
39fcd8d513 update hyperdown 2021-08-08 12:47:16 +08:00
joyqi
371b88f9f8 fix simpleLogin 2021-08-06 17:23:42 +08:00
joyqi
a1168057a8 fix #1124
Extend usage scope of method simpleLogin.
2021-08-05 15:13:41 +08:00
joyqi
a38571bc64 Merge pull request #1119 from FlyingSky-CN/patch-1
fix #1118;
2021-07-28 22:21:07 +08:00
FlyingSky
79179fb65a fix #1118;
@see #1118
2021-07-23 17:23:36 +08:00
joyqi
27e6801e15 update hyperdown 2021-07-21 14:44:28 +08:00
joyqi
3dd592ae59 update hyperdown 2021-07-20 16:12:32 +08:00
joyqi
454302b3a1 update hyperdown 2021-07-12 10:31:54 +08:00
joyqi
3da4d660ec update hyperdown 2021-07-05 15:44:33 +08:00
joyqi
cb4778d6c4 update hyperdown 2021-06-30 16:29:51 +08:00
joyqi
d7a48ce086 update hyperdown 2021-06-25 18:28:17 +08:00
joyqi
ca1dcbf8da Add smooth preview scroll. 2021-06-25 17:42:32 +08:00
joyqi
98bf0a3b6c update hyperdown 2021-06-22 17:29:01 +08:00
joyqi
70068ed5a1 fix hyperdown 2021-06-22 12:15:00 +08:00
joyqi
db6825a33d fix typo error 2021-06-18 17:26:43 +08:00
joyqi
f6d0627a77 fix 1021 2021-06-18 17:25:56 +08:00
joyqi
50c23c44c5 update hyperdown 2021-06-18 16:52:59 +08:00
joyqi
ac74c6e0cb fix #1104 2021-06-11 14:05:35 +08:00
joyqi
4861a40b9e fix #1100 2021-06-08 11:47:03 +08:00
joyqi
0e49d186f5 fix #1096
Remove `include_path` setting.
2021-05-21 16:40:48 +08:00
joyqi
13ac6f1c70 Optimize table layout.
Close #1091
2021-05-21 15:29:03 +08:00
joyqi
6164d92173 Update hyperdown 2021-05-21 11:52:13 +08:00
joyqi
2f6a0c6f36 Merge pull request #1097 from typecho/dev
Optimize admin UI on mobile platform
2021-05-21 11:46:25 +08:00
joyqi
b2f1f46528 Merge branch 'master' into dev 2021-05-21 11:32:51 +08:00
joyqi
54af368084 Add more media file types. 2021-05-21 11:30:28 +08:00
joyqi
0dbc14da02 fix workflows 2021-05-20 14:46:16 +08:00
joyqi
60fdcae8e5 fix #1077 2021-05-20 14:02:15 +08:00
joyqi
27ebdf09f0 fix #1088 2021-04-14 14:23:05 +08:00
joyqi
6558fd5e03 minify js 2021-04-03 23:30:44 +08:00
joyqi
5afcfbf3df update hyperdown 2021-04-03 22:59:17 +08:00
joyqi
b80bce520c fix #1083 2021-04-03 22:54:23 +08:00
joyqi
cc078d6f6a Merge pull request #1083 from yongirl320/trackback-bug-fix
fix get trackback param bug
2021-04-03 21:09:18 +08:00
yongirl
a85c242e09 scheme check bug 2021-04-02 14:06:47 +08:00
yongirl
714e8788e8 fix get trackback param bug 2021-04-02 13:52:26 +08:00
joyqi
bd4ffc5e1d Improve mobile UI 2021-03-21 01:15:19 +08:00
joyqi
95ef1d562e fix touch event 2021-03-20 20:30:42 +08:00
joyqi
3fdaed97e3 Improve mobile UI. 2021-03-20 02:13:55 +08:00
joyqi
f775a3e490 Fix dashboard menu display on mobile platform(still working on it). 2021-03-19 18:34:04 +08:00
joyqi
eba20a69f0 fix #1074
fix #966
2021-03-19 01:33:08 +08:00
joyqi
452be71d87 Choose utf8mb4 and InnoDB as default mysql settings. 2021-03-19 00:12:26 +08:00
joyqi
99df2bae64 update hyperdown 2021-03-18 14:23:19 +08:00
joyqi
834e4722a0 Merge branch 'master' of github.com:typecho/typecho 2020-12-18 16:15:20 +08:00
joyqi
3b7d2dc319 fix #1049 2020-12-18 16:15:02 +08:00
joyqi
e563687451 Merge pull request #1045 from typecho/dependabot/npm_and_yarn/tools/ini-1.3.8
Bump ini from 1.3.5 to 1.3.8 in /tools
2020-12-17 00:46:31 +08:00
dependabot[bot]
ab6284abf7 Bump ini from 1.3.5 to 1.3.8 in /tools
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-12 17:38:37 +00:00
joyqi
63b71df244 Merge pull request #1039 from rakiy/master
php8正式移除了类名相同的构造方法的支持
2020-12-10 18:30:42 +08:00
alex.xu
f8d39927ce php8正式移除了类名相同的构造方法的支持 2020-12-10 15:02:16 +08:00
joyqi
f9dfb1bb85 fix #1034 2020-11-30 12:07:16 +08:00
joyqi
1cc3066569 fix #1030 2020-11-24 16:06:06 +08:00
joyqi
cee119eb4d upgrade HyperDown 2020-11-19 17:03:00 +08:00
joyqi
269832aa85 fix 2020-10-09 10:46:53 +08:00
joyqi
74c8143825 fix #1008 2020-10-03 21:20:27 +08:00
joyqi
bba332531b Redesign the pot file maker 2020-08-19 12:57:18 +08:00
joyqi
06876225c1 Merge pull request #990 from typecho/dependabot/npm_and_yarn/tools/lodash-4.17.19
Bump lodash from 4.17.15 to 4.17.19 in /tools
2020-07-21 14:44:08 +08:00
dependabot[bot]
a26e2d5a33 Bump lodash from 4.17.15 to 4.17.19 in /tools
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-20 17:33:29 +00:00
joyqi
cacb854d42 Merge pull request #979 from idawnlight/master
fix: array and string offset access syntax with curly braces is no longer supported on PHP 8
2020-06-28 14:42:28 +08:00
idawnlight
a387458fc6 ci: add tests on php 8 & drop travis ci 2020-06-28 01:31:26 +08:00
idawnlight
b8f8c4c489 fix: array offset access syntax with curly braces is no longer supported 2020-06-28 01:21:46 +08:00
fen
d8fe9e0463 修复失效的 cdn 链接 2020-06-17 12:19:43 +08:00
joyqi
0b68fa8b14 fix #968 2020-06-11 18:08:32 +08:00
joyqi
65455bc67e fix typo error 2020-05-17 13:55:22 +08:00
joyqi
a4bcd37dae fix upload panel 2020-05-15 15:18:39 +08:00
joyqi
31072a0726 fix icons retina display 2020-05-15 15:08:36 +08:00
joyqi
75227b3bac fix editor button generator 2020-05-15 12:19:26 +08:00
joyqi
38f959890d replace compass with node-sass.
create new build tools.
2020-05-14 14:30:19 +08:00
joyqi
77ef00e1a0 Merge pull request #955 from atomlong/master
Support Windows Live Writer and Open Live Writer.
2020-05-14 11:23:20 +08:00
Atom Long
09a81d394c Merge branch 'master' of https://github.com/typecho/typecho 2020-05-12 17:32:38 +08:00
Atom Long
78e2dfbde8 fixed code indent, TAB --> 4 spaces 2020-05-12 17:29:41 +08:00
joyqi
3413dfd7ce fix #954 2020-05-12 16:21:59 +08:00
joyqi
371e6c9884 Merge pull request #957 from starskim/master
添加GitHub Actions Ci
2020-05-12 16:19:30 +08:00
joyqi
6398551ac3 fix #952 2020-05-12 16:08:43 +08:00
Stars_Kim
beeeab869d 添加GitHub Actions Ci 2020-05-09 16:05:33 +08:00
Atom Long
408cb56ce1 Fix #334: Support uploading pictures using Windows Live Writer or Open Live Writer. 2020-05-09 00:20:50 +08:00
Atom Long
029579be4d IXR_Error is a class, not a function. 2020-05-09 00:08:06 +08:00
joyqi
5ba2f03206 fix #945 2020-04-08 00:56:47 +08:00
joyqi
691b43bc48 fix #941 2020-04-01 17:17:31 +08:00
joyqi
3cc75893da close #940
fix #936
2020-04-01 17:10:44 +08:00
joyqi
3afd22c12c Merge branch 'master' of https://github.com/typecho/typecho 2020-03-10 10:48:09 +08:00
joyqi
3bba7cd9dd fix #926
close #928
2020-03-10 10:47:40 +08:00
joyqi
0020814e18 Merge pull request #853 from Seevil/patch-2
修复最近回复链接
2020-01-17 10:50:55 +08:00
joyqi
8d2aa236b1 fix 2019-12-19 22:15:15 +08:00
joyqi
d695ce3ce5 Merge pull request #871 from AlanDecode/master
修复通过 metaWeblog 接口新建草稿时返回 cid 错误的问题
2019-12-18 11:47:49 +08:00
joyqi
ac1527ce43 Merge pull request #901 from jeaxnew/patch-1
Update Request.php
2019-12-18 11:41:22 +08:00
jeaxnew
9948a62557 Update Request.php
fix #567
2019-11-13 19:04:56 +08:00
joyqi
75237e6a44 fix #896 2019-10-31 16:47:33 +08:00
joyqi
c17bdaf606 Merge pull request #882 from kraity/master
修复 XmlRpc 接口的几个错误问题
2019-09-03 14:10:53 +08:00
joyqi
147f7ede98 fix #881
Add 'setInputsAttribute' method for all form element classes.
2019-09-03 13:44:16 +08:00
权那他
5abd915678 解决无法判断该独立页面是否有草稿 2019-08-23 13:20:52 +08:00
权那他
64a66be475 解决无法编辑独立页面 2019-08-23 13:19:51 +08:00
权那他
71c72c7926 修正XMLRPC不能获取文章是否有草稿状态
修正XMLRPC不能获取文章是否有草稿状态
1608行
$this->typechoToWordpressStatus($posts->status, 'post')
改为
$this->typechoToWordpressStatus(($posts->hasSaved || 'post_draft' == $posts->type) ? 'draft' : $posts->status, 'post')
2019-08-18 10:16:54 +08:00
权那他
6d27a24fb8 修正XMLRPC只能发表发布状态的问题,修正后可以发布私密、草稿、等等状态的文章
修正XMLRPC只能发表发布状态的问题,修正后可以发布私密、草稿、等等状态的文章
在1442行
$status = $this->wordpressToTypechoStatus($content["{$type}_status"], $type);
后面增加一行判断
$input['visibility'] = isset($content["visibility"]) ? $content["visibility"] : $status;
2019-08-18 10:14:26 +08:00
权那他
2e2835ce6b 修复用XMLRPC获取评论时无法得到垃圾评论和待审核评论
修复用XMLRPC获取评论时无法得到垃圾评论和待审核评论
1056行
$input['status'] = 'hold' == $input['status'] ? $input['status'] : $this->wordpressToTypechoStatus($struct['status']); 
改为
$input['status'] = $this->wordpressToTypechoStatus($struct['status'], 'comment');
2019-08-18 10:11:17 +08:00
AlanDecode
664d8bcb23 修复通过 metaWeblog 接口新建草稿时返回 cid 错误的问题 2019-06-11 10:06:44 +08:00
Intern
4df129b01c 修复最近回复链接
用户链接把评论链接覆盖掉了导致并不能点击前往回复的链接地址
2019-04-12 22:52:17 +08:00
joyqi
32c2f8217d fix #845 2019-03-16 14:50:13 +08:00
那他
91d83d40b1 BUG 2019-02-11 17:03:53 +08:00
那他
0cf11bb933 Update Dockerfile 2019-02-11 16:55:15 +08:00
那他
4155491719 Update Dockerfile 2019-02-11 16:31:08 +08:00
joyqi
8045a0d403 fix #821 2019-01-10 00:24:38 +08:00
joyqi
57a5857c1f Merge pull request #820 from xyuanmu/patch-2
fix Undefined variable: options in Fake.php
2018-12-26 11:06:46 +08:00
xyuanmu
632ac977ee Update Fake.php
测试发现,这个值是不需要的
2018-12-22 12:05:02 +08:00
xyuanmu
247aa9e043 fix Undefined variable: options in Fake.php 2018-12-14 23:14:57 +08:00
joyqi
9f8491076f add missing options 2018-11-26 14:20:08 +08:00
joyqi
f4a34e0d7b fix 2018-11-26 14:15:25 +08:00
joyqi
b6626e42d8 fix error 2018-11-26 13:28:19 +08:00
joyqi
26b70e2af8 Add function: mark status of multi posts. 2018-11-26 11:38:45 +08:00
joyqi
586492e1b8 Merge pull request #801 from jrotty/patch-1
增加标签统计
2018-11-21 13:32:00 +08:00
jrotty
430649df81 增加标签统计 2018-11-10 14:21:07 +08:00
joyqi
3050aa98ab Merge pull request #798 from renothing/ssl-proxy-to-http
fix error when use different protocol between reverse proxy and backend.
2018-10-30 10:31:17 +08:00
renothing
1e7e7e7997 fix error when use different protocol between reverse proxy and backend. 2018-10-28 05:41:02 +08:00
joyqi
235888cc3e fix typo 2018-10-23 16:39:15 +08:00
joyqi
0b1096c588 Now you can paste an image from clicpboard into the editor directly. 2018-10-23 16:29:48 +08:00
joyqi
ad10000aca Merge pull request #782 from Seevil/patch-1
解决插件注入右上角导航会有两个 | | 出现
2018-10-23 14:37:05 +08:00
joyqi
a6fe58e5b2 fix #785 2018-10-23 14:33:33 +08:00
joyqi
e492f9df4d Merge pull request #785 from hongweipeng/noopener
设置noopener防止钓鱼攻击
2018-10-23 14:25:31 +08:00
hongweipeng
350b2edb2b 设置noopener防止钓鱼攻击 2018-09-29 13:40:22 +08:00
joyqi
b70d240d3a fix #755 2018-09-26 11:52:56 +08:00
joyqi
6fbb65487c Remove auto complete for some input elements. 2018-09-26 11:11:44 +08:00
joyqi
b497004516 fix #753 2018-09-26 11:07:07 +08:00
Intern
a920bffd77 解决插件注入右上角导航会有两个 | | 出现
解决插件注入右上角导航会有两个| | 出现,如:插件名| |用户名|登出|网站 此种现象出现,原因为换行空格导致的。
2018-09-19 22:39:35 +08:00
joyqi
df7aeda761 Merge pull request #780 from bestony/add-gmail-support
fix: Support plus in email address
2018-09-07 10:55:49 +08:00
Bestony
2a8b11f48b fix: Support plus in email address
fix: add support in email address (just like example+typecho@gmail.com)
2018-09-06 10:54:42 +08:00
joyqi
c2a71c2f19 fix #769 2018-08-27 11:53:39 +08:00
joyqi
94ddb69311 Merge branch 'master' of github.com:typecho/typecho 2018-08-19 14:24:06 +08:00
joyqi
27dce21870 update hyperdown 2018-08-19 14:23:52 +08:00
joyqi
e942452197 Merge pull request #772 from h404bi/patch-1
chore: fix wrong slug prompt
2018-08-19 13:47:28 +08:00
Chawye Hsu
d93af07d31 chore: fix wrong slug prompt 2018-08-18 17:27:29 +08:00
joyqi
3303b435ad add reset 2018-07-30 12:05:28 +08:00
joyqi
03f237b32f Merge pull request #767 from idawnlight/master
修正错误的数据堆栈
2018-07-30 11:55:53 +08:00
dawnlight
cbc08861f4 修正错误的数据堆栈
减少一次 `count` 运算
2018-07-28 13:55:00 +08:00
joyqi
df5f747975 Merge pull request #766 from leenzhu/fix-752
fix #752
2018-07-28 12:35:06 +08:00
joyqi
02929ea4f5 update hyperdown 2018-07-25 10:58:53 +08:00
joyqi
ee409f1ee1 Merge branch 'master' of github.com:typecho/typecho 2018-07-25 10:56:39 +08:00
joyqi
1d56948c4d fix img load event 2018-07-25 10:56:09 +08:00
dawnlight
8d4c8698de 修正错误的数据堆栈 2018-07-23 12:38:23 +08:00
dawnlight
e72e723c1e 修正错误的数据堆栈
在没有评论且开启评论分页的情况下,$this->row 会被错误地赋值为 false,在之后通过魔术方法 __get 获取内部变量时会抛出警告
Warning: array_key_exists() expects parameter 2 to be array, boolean given
2018-07-23 10:40:44 +08:00
leenzhu
68db3cd2ab fix #752 2018-07-21 20:27:52 +08:00
joyqi
a2d21f1042 Merge pull request #757 from jrotty/master
修正编辑器预览界面代码不自动换行问题
2018-05-31 16:18:45 +08:00
jrotty
c0965ad200 修正编辑器预览界面代码不自动换行问题
编辑器预览界面,代码太长而没有换行会戳出屏幕外,故修复下,让其自动换行
2018-05-27 10:26:12 +08:00
joyqi
6530443e41 Merge pull request #735 from mrasong/master
bug fixed: Typecho_Plugin::exists()
2018-03-25 00:32:37 +08:00
mrasong
93a4bbdc20 bug fixed: Typecho_Plugin::exists() 2018-03-24 01:37:07 +08:00
joyqi
92a40c87a5 fix #724 2018-03-23 12:39:25 +08:00
joyqi
d745863e54 fix hyperdown
remove unnecessary js
2018-03-23 12:06:44 +08:00
joyqi
717a3b1afa Merge pull request #725 from mierhuo/master
fix logical mistake of HyperDown->optimizeBlocks
2018-03-23 11:42:11 +08:00
joyqi
dd2876f484 Merge pull request #733 from allen05ren/master
修复一处输入错误
2018-03-23 11:30:20 +08:00
allen05ren
10593d8172 fix typo. 2018-03-21 23:11:07 +08:00
joyqi
7900c1b740 fix backup file version 2018-03-15 13:23:35 +08:00
joyqi
13c1986f02 Add error correcting mode for backup recovery 2018-03-14 22:00:49 +08:00
joyqi
76c7eb757b fix i18n function 2018-03-08 12:11:49 +08:00
joyqi
09d9c3a944 Merge pull request #714 from mierhuo/master
delete some redundant code in file install.php(config.inc.php as well)
2018-03-08 12:09:37 +08:00
joyqi
1e0b2bca4b fix table style 2018-03-08 12:01:01 +08:00
joyqi
9e78add245 Merge pull request #726 from mierhuo/master
update normalize.css for admin panel and default theme
2018-03-08 11:36:45 +08:00
Huspy
143eeaa7b5 update normalize.css for admin panel and default theme 2018-03-08 00:01:58 +08:00
joyqi
a622aa41d7 Merge pull request #720 from insomnux/i18n
added gettext in a few strings in backup.php and Discussion.php
2018-03-07 10:54:54 +08:00
joyqi
307f0e0823 Merge pull request #723 from jrotty/patch-1
删除多余的冒号
2018-03-07 10:53:49 +08:00
Huspy
04ff4b4c9c fix logical mistake of HyperDown->optimizeBlocks 2018-03-06 15:58:08 +08:00
jrotty
b04996d917 删除多余的冒号 2018-03-05 15:47:57 +08:00
joyqi
eae806390b fix empty column 2018-02-26 12:52:06 +08:00
insomnux
96570e93b9 added gettext in a few strings in backup.php and Discussion.php 2018-02-23 13:21:57 +02:00
Huspy
4ce7490b3b delete some redundant code in file install.php(config.inc.php as well) 2018-02-04 20:09:14 +08:00
joyqi
3848176990 fix Chinese symobl 2018-02-03 12:31:30 +08:00
joyqi
02dd3f997f fix #710 2018-01-29 18:40:43 +08:00
joyqi
82212edba0 fix #1343 2018-01-22 11:42:59 +08:00
joyqi
2ff40c4869 fix textarea focus 2017-12-14 18:56:07 +08:00
joyqi
8c5f967f86 update version 2017-12-14 14:07:54 +08:00
joyqi
c3abcccf35 remove unused variables 2017-12-14 14:07:11 +08:00
joyqi
42495b36a3 fix plugin version check 2017-12-14 11:37:15 +08:00
joyqi
2e9f64a7f7 fix #689 2017-12-14 11:27:42 +08:00
joyqi
72ebc723b7 双向滚动绑定 2017-12-14 02:27:51 +08:00
joyqi
b59785563f fix line 2017-12-13 18:17:43 +08:00
joyqi
88b1aa465c 编辑器同步跟随功能 2017-12-13 16:55:08 +08:00
joyqi
1e82962b37 testing auto scroll 2017-12-12 19:07:12 +08:00
joyqi
f2731b7263 fix markdown list parser
fix #688
fix #678
2017-12-11 11:49:25 +08:00
joyqi
f3dab3996d fix #682 2017-12-08 18:38:19 +08:00
joyqi
dd79918d2e fix #676 2017-11-23 15:01:28 +08:00
joyqi
c57f34b3eb detect editor change event 2017-11-20 12:51:15 +08:00
joyqi
19450df26b Protect iframe with sandbox 2017-11-20 10:35:10 +08:00
joyqi
1a2dd1a812 fix #673 2017-11-20 03:05:10 +08:00
joyqi
1faf5b2199 improve ajax performance 2017-11-20 02:50:48 +08:00
joyqi
d70998ac81 finish preview 2017-11-19 21:58:11 +08:00
joyqi
ab180aa385 add preview function 2017-11-19 18:51:27 +08:00
joyqi
b8788c9e7e fix #671 2017-11-17 10:32:07 +08:00
joyqi
452fac4099 fix service url 2017-11-15 18:35:47 +08:00
joyqi
97390a2af5 update plupload 2017-11-15 17:51:29 +08:00
joyqi
77df79871b fix 2017-11-15 14:52:01 +08:00
joyqi
f180e8452d add async service for plugin 2017-11-15 14:25:02 +08:00
joyqi
5f3620e058 fix plugin helper 2017-11-15 11:43:32 +08:00
joyqi
abcecb124d close #662 2017-11-12 16:21:41 +08:00
joyqi
4a5f1aece1 fix #652
fix #612
2017-11-09 12:44:36 +08:00
joyqi
10a40c4683 fix #658
fix #659
2017-11-09 10:05:03 +08:00
joyqi
dabbdc8af9 ref #653
make hyperdown better
2017-11-08 13:17:01 +08:00
joyqi
72c236f651 fix #653
fix #655
2017-11-07 23:13:38 +08:00
joyqi
36742a6fdb fix #650
ref #580
2017-11-04 12:12:30 +08:00
joyqi
fee8bcc63c fix #651 2017-11-03 10:19:47 +08:00
joyqi
cf002bb0c0 fix #643 2017-11-03 00:29:58 +08:00
joyqi
425add976d fix #649 2017-11-02 23:20:47 +08:00
joyqi
5da128b0c7 Merge branch 'master' of https://github.com/typecho/typecho 2017-11-01 23:06:57 +08:00
joyqi
20732c1e89 fix #648 2017-11-01 23:06:29 +08:00
joyqi
5c2276c73f ref #644 2017-11-01 19:07:30 +08:00
joyqi
f2dc80592e fix #644
ref #642
2017-11-01 18:16:59 +08:00
joyqi
79dfede306 Merge pull request #646 from bighamx/patch-1
Update install.php
2017-11-01 18:14:20 +08:00
SpanishBigHam
827a085c5e Update install.php
cache html output until all headers seted
2017-11-01 14:54:41 +08:00
joyqi
bf4408d6da remove ACE support 2017-11-01 00:05:57 +08:00
joyqi
a48f7ea48b fix #642 2017-10-31 23:56:20 +08:00
joyqi
b68c45ca93 fix #640 2017-10-31 23:52:03 +08:00
joyqi
adfbc6ca28 fix #641 2017-10-30 20:57:04 +08:00
joyqi
b3dbef1377 fix #623 2017-10-30 13:16:15 +08:00
joyqi
9e1b61e0f0 fix #637 2017-10-30 12:11:13 +08:00
joyqi
c056f6c895 fix #636 2017-10-30 11:50:35 +08:00
joyqi
ac1c62a07d new release 2017-10-30 02:57:57 +08:00
joyqi
93bcd46d55 fix #635
fix #634
fix #633
2017-10-30 02:19:53 +08:00
joyqi
a214977c83 release new version 2017-10-29 17:37:18 +08:00
joyqi
01d3badc9b Add new constants for dynamic site url
fix #630
2017-10-29 16:11:37 +08:00
joyqi
9884a2fc76 fix #628 2017-10-29 15:45:47 +08:00
joyqi
7a2b374526 Merge branch 'master' of https://github.com/typecho/typecho 2017-10-29 13:07:48 +08:00
joyqi
92f81b3004 add client timezone 2017-10-29 13:07:15 +08:00
joyqi
95e62ce30a Add a security check step before upgrade 2017-10-28 15:03:59 +08:00
joyqi
3517eff4de fix #626 2017-10-27 19:40:37 +08:00
joyqi
8191c8fcea Merge branch 'master' of github.com:typecho/typecho 2017-10-27 16:42:29 +08:00
joyqi
ed0af49767 Add a switch for xmlrpc in general control panel. 2017-10-27 16:42:13 +08:00
joyqi
adafe05caf Merge branch 'master' of https://github.com/typecho/typecho 2017-10-27 00:43:32 +08:00
joyqi
da1e1b8d3b fix #624 2017-10-27 00:43:08 +08:00
joyqi
ef4ee2f9b0 fix unicode for hyperdown 2017-10-26 12:24:39 +08:00
joyqi
f955076905 fix upgrade 2017-10-26 11:12:26 +08:00
joyqi
fefedb3866 fix make tools 2017-10-26 10:44:27 +08:00
joyqi
7d229b55ee fix #616 2017-10-24 17:03:07 +08:00
joyqi
e277141c97 fix #619
使用更好的方式保护安装文件,不再依赖session
2017-10-24 16:59:31 +08:00
joyqi
242fc1a4cb fix some minor bugs 2017-10-13 11:03:38 +08:00
joyqi
eeedef972a fix pingback's security issue
ref: https://joychou.org/web/typecho-ssrf-analysis-and-exploit.html
2017-10-13 01:01:11 +08:00
joyqi
0e7b399ba8 Merge branch 'master' of github.com:typecho/typecho 2017-09-28 13:06:02 +08:00
joyqi
eaa7d28823 fix #610 2017-09-28 13:05:51 +08:00
joyqi
b97289f7eb Merge pull request #607 from jrotty/master
主题缩略图使用screenshot命名的图片
2017-09-21 17:39:06 +08:00
jrotty
6005d80b20 主题缩略图使用screenshot命名的图片
修复主题根目录存在screenshot.png和其他图片时,主题展示图抓取其他图片的问题
2017-09-19 10:42:51 +08:00
joyqi
55c676d6a5 fix autoload 2017-09-15 01:44:43 +08:00
joyqi
b1c0185d85 Merge branch 'master' of github.com:typecho/typecho 2017-09-08 14:49:46 +08:00
joyqi
ed8a847ae6 add new helper method
add new plugin callback method
2017-09-08 14:49:29 +08:00
joyqi
f3a28f38e2 add method to get query params 2017-08-22 01:29:44 +08:00
joyqi
ae684c3a82 ref #459 2017-08-21 17:07:32 +08:00
joyqi
3c171785d2 remove session requirement 2017-08-21 12:46:49 +08:00
joyqi
949b487445 fix query error 2017-08-21 11:49:36 +08:00
joyqi
d953e32003 add delay binding
fix #601
2017-08-21 11:43:10 +08:00
joyqi
c3c6723d7b fix typo error 2017-08-19 18:01:19 +08:00
joyqi
bcfbc07bac fix #599 2017-08-18 16:14:14 +08:00
joyqi
0ba45f1006 fix antispam method 2017-08-18 14:20:20 +08:00
joyqi
13fc1b7169 add validate meta info for the backup file 2017-08-18 11:09:46 +08:00
joyqi
ac11ff4cc9 add mathjax support for markdown parser 2017-08-17 15:18:03 +08:00
joyqi
a5c3e5aca7 finish backup description 2017-08-17 13:00:26 +08:00
joyqi
f2ba3071fd fix null value 2017-08-17 12:53:07 +08:00
joyqi
c1584509e2 finish backup recovery 2017-08-17 12:28:29 +08:00
joyqi
aa2eac4dcc 导入逻辑基本完成 2017-08-16 23:15:47 +08:00
joyqi
3d8fbc8a61 add backup panel 2017-08-16 18:09:39 +08:00
joyqi
43995a346d Merge branch 'master' of github.com:typecho/typecho 2017-08-15 11:35:54 +08:00
joyqi
4ac142ce9e add new plugin hook 2017-08-15 11:35:38 +08:00
joyqi
2849cc089d Merge pull request #598 from l2dy/master
Fix X-UA-Compatible
2017-08-14 15:32:36 +08:00
Zero King
2627638192 Update X-UA-Compatible 2017-08-12 00:43:56 +00:00
joyqi
43653242ed Merge branch 'master' of github.com:typecho/typecho 2017-08-10 10:28:06 +08:00
joyqi
d486a30a6d fix #596 2017-08-10 10:27:52 +08:00
joyqi
80b5323fe2 Merge pull request #592 from l2dy/master
url是BlogPosting的属性
2017-08-09 14:11:29 +08:00
joyqi
41751a3625 fix #597 2017-08-09 14:10:41 +08:00
joyqi
eb68b52800 新增 $this->directory() 方法,用来方便地输出多级分类
ref #597
2017-08-09 12:52:31 +08:00
joyqi
24cc1f5a5e fix #595
感谢 @eslizn 找到的问题,我用了更优雅的方式解决
2017-08-04 13:22:17 +08:00
joyqi
9bcfc8141a add table style for preview 2017-08-02 15:25:33 +08:00
joyqi
776e45473c 修正contents表安装时的数据类型为longtext
修复HyperDown的一个解析错误
2017-08-02 11:11:46 +08:00
Zero King
62d0013d41 url是BlogPosting的属性 2017-08-01 10:08:38 +00:00
joyqi
3bf5d07fa2 remove php 5.3 from travis-ci list 2017-07-31 11:44:32 +08:00
joyqi
597ff5ec11 Merge pull request #589 from l2dy/master
for属性只对应id,给input补上id属性
2017-07-31 01:44:37 +08:00
Zero King
a1b1915dfb label的for属性只对应id,给input补上id属性 2017-07-29 22:39:39 +00:00
joyqi
56dfd2f093 增加一个官方的 Telegram 消息发布渠道
https://t.me/typechodev
方便我适时发布相关消息
2017-07-28 17:30:37 +08:00
joyqi
8043d96d03 fix #586 2017-07-27 11:05:02 +08:00
joyqi
f88cd44d52 fix #577
fix #581
2017-07-24 16:35:54 +08:00
joyqi
98ed395962 remove hhvm 2017-05-10 11:57:55 +08:00
joyqi
966ecf74f1 fix column 2017-05-10 11:55:41 +08:00
joyqi
5cb34a6e82 fix #559 2017-05-10 11:51:55 +08:00
joyqi
16a74d5cc9 add cli mode 2017-05-09 17:38:09 +08:00
joyqi
b3ce12c575 fix xmlrpc post 2017-04-25 15:43:46 +08:00
joyqi
a159292173 fix typo 2017-04-25 13:57:05 +08:00
joyqi
93a3229c6d fix user options 2017-04-25 13:54:10 +08:00
joyqi
9122d2ab49 支持在xmlrpc接口中使用原生的markdown语法 2017-04-25 12:44:08 +08:00
joyqi
7cdc244d95 修正xmlrpc 2017-04-24 15:55:47 +08:00
joyqi
1366f44ada 增加兼容性 2017-04-17 19:04:19 +08:00
joyqi
47e10dcf53 Merge pull request #554 from JimmehCai/master
Fix "insertTo is not a function"
2017-04-06 11:08:10 +08:00
Jimmy Cai
9b03f1b5a2 Fix "insertTo is not a function"
insertTo > insertAfter
2017-04-04 14:37:11 +02:00
joyqi
909145058f enable super html mode 2017-03-30 17:00:30 +08:00
joyqi
b008bfbc96 增加超级html模式,可以输入由 !!! 三个感叹号包裹的任意html文本 2017-03-30 16:56:08 +08:00
joyqi
2f2c2d5910 fix #552 2017-03-30 15:09:28 +08:00
joyqi
8ac2087abc Merge pull request #544 from ldsink/master
fix: Mysqli quoteColumn 函数参数调用错误
2017-02-27 01:30:33 +08:00
zhoucheng
694a22a295 fix: Mysqli quoteColumn 函数参数调用错误 2017-02-25 22:30:37 +08:00
joyqi
44497599f6 add ci for php 7 2017-02-24 15:36:37 +08:00
joyqi
14f75b001c Update Makefile 2017-02-24 15:33:54 +08:00
fen
cca12d16e3 调整拼写及顺序 2017-02-21 13:47:05 +08:00
fen
3a438d1084 添加 github issue 模板 2017-02-21 13:43:00 +08:00
joyqi
2fe30b0837 fix typo 2017-02-19 23:03:41 +08:00
joyqi
e241ff09b0 fix #534 2017-02-19 01:17:41 +08:00
joyqi
e39183915b Merge branch 'master' of https://github.com/typecho/typecho 2017-02-19 00:47:10 +08:00
joyqi
43f3e686c6 fix #532 2017-02-19 00:46:50 +08:00
joyqi
3b9ae9c498 add timezone 2017-02-09 17:16:38 +08:00
joyqi
f2ebf4b10a add some useful html tag to markdown whitelist 2017-01-25 12:12:25 +08:00
joyqi
b9dc6a61ad add ignore tag 2017-01-25 11:51:28 +08:00
joyqi
03f928d4d9 fix #527 2017-01-25 11:47:13 +08:00
joyqi
8ac87dd5b2 Merge branch 'master' of github.com:typecho/typecho 2017-01-25 11:40:56 +08:00
joyqi
c5e1e3c6df fix #529 2017-01-25 11:40:48 +08:00
joyqi
1372cc4242 Merge pull request #531 from kokororin/master
修复后台数字序号样式自动换行
2017-01-25 11:37:50 +08:00
Kokororin
6bcae91008 修复后台数字序号样式自动换行 2017-01-24 18:47:45 +08:00
joyqi
134a300861 Merge pull request #525 from ty666/master
修复聚合调用时的判断问题
2017-01-06 11:04:27 +08:00
taoyu
8150e1a6a0 修复聚合调用时的判断问题 2017-01-05 23:35:11 +08:00
joyqi
42eb5c4744 Merge branch 'master' of github.com:typecho/typecho 2017-01-04 10:24:48 +08:00
joyqi
7653c5e0ff fix #522 2017-01-04 10:24:38 +08:00
joyqi
325f0e3486 fix #524 2017-01-02 19:09:00 +08:00
joyqi
cca53464df fix port number 2016-12-23 00:44:10 +08:00
joyqi
f28e909987 fix dockerfile 2016-12-23 00:43:56 +08:00
joyqi
e25022ecc1 fix install issue
add Dockerfile
2016-12-22 18:54:28 +08:00
fen
820828757a Merge branch 'master' of github.com:typecho/typecho 2016-12-20 12:52:04 +08:00
fen
a40767a01d 将默认模板的时间格式与后台设置关联 2016-12-20 12:51:47 +08:00
joyqi
12c4b8fe98 修正解析顺序 2016-12-14 10:56:38 +08:00
joyqi
627e5cf54e minor bugs 2016-11-30 10:58:30 +08:00
joyqi
cc8449b67e * add Hyperdown.js
* add Mysqli
2016-11-30 10:50:51 +08:00
joyqi
280bc71c0c Merge pull request #459 from skys215/master
Added support for MySQLi
2016-11-30 10:34:38 +08:00
joyqi
d2631fde2b Merge pull request #512 from Meekdai/master
解决BAE新版本不支持HTTP_BAE_LOGID变量获取导致BAE无法安装的问题
2016-11-30 10:30:30 +08:00
Meekdai
c968abae08 解决BAE新版本不支持HTTP_BAE_LOGID变量获取导致BAE无法安装的问题 2016-10-26 00:20:29 +08:00
fen
b675161c79 调整自定义 logo 样式 2016-07-17 18:24:28 +08:00
fen
0a04ab9924 调整标题字体 2016-07-17 18:06:43 +08:00
fen
cd65eaf6cb 调整后台可用性及并修复搜索 bug 2016-07-17 18:04:49 +08:00
fen
89293e80aa Merge branch 'master' of github.com:typecho/typecho 2016-07-16 13:07:57 +08:00
fen
437ba872c1 避免第三方插件模板开发时影响提交
移除已完成的 todo 文件
2016-07-16 13:07:38 +08:00
Fen
8d04c20ed5 fixed issue #474 2016-07-16 12:11:21 +08:00
Fen
a2e519beeb Merge pull request #452 from xiabeifeng/patch-6
将cancle改成cancel
2016-07-09 10:39:47 -05:00
skys215
37ab647895 Mysql->Mysqli 2016-03-20 21:00:30 +08:00
skys215
0464ad729c Added support for MySQLi 2016-03-20 12:50:28 +00:00
Fen
7195666f09 Merge pull request #450 from xiabeifeng/patch-2
我的IDE在selected=true这个地方提示我"没有定义的属性值"
2016-03-10 09:59:13 +08:00
xiabeifeng
1ab9e68f0f 将cancle改成cancel
cancel:取消
2016-03-09 20:25:48 +08:00
xiabeifeng
8553a8b6b9 我的IDE在selected=true这个地方显示没有定义的属性值
网上查了查w3c,发现标准的用例使用的是selected="selected",而在js代码中使用selected=true来更改状态,具体可见下列网址:
1.在html标签中使用selected="selected"
    http://www.w3school.com.cn/tags/att_option_selected.asp
2.在js中使用selected=true
    http://www.w3school.com.cn/jsref/prop_option_selected.asp
2016-03-09 16:14:37 +08:00
joyqi
0d371d4816 fix the display method of plugin's personal options 2016-02-18 14:47:13 +08:00
joyqi
0082816f53 Merge pull request #439 from kookxiang/personal-config-fix
修正个人设置中插件接口错位的问题
2016-02-18 14:41:38 +08:00
kookxiang
26745edeb5 Fix personal config page style 2016-02-11 23:07:33 +08:00
祁宁
394b93bbd2 fix more split 2016-02-08 15:59:24 +08:00
joyqi
2903f6a191 fix #435 2016-01-28 15:31:11 +08:00
joyqi
59bc86ff46 upgrades plupload 2016-01-26 18:32:08 +08:00
joyqi
ed974cd9fe fix #316
fix #390
fix #430

add constants __TYPECHO_URL_PREFIX__ to custom global url prefix
2016-01-26 17:50:26 +08:00
joyqi
87a0479324 Merge pull request #387 from helone/patch-1
删除 Chrome Frame 的支持
2016-01-26 15:28:45 +08:00
joyqi
93a3bc5c4c remove php 5.2 2016-01-26 15:28:02 +08:00
joyqi
30cbefc453 Merge pull request #428 from ldsink/phpdoc
update PHPDoc comments
2016-01-26 15:08:15 +08:00
joyqi
2613916d15 Merge pull request #411 from mikeyzm/master
设置搜索归档缩略名
2016-01-26 15:07:33 +08:00
joyqi
55dff6347a Merge pull request #427 from ldsink/typo
修复 iconv 函数参数传递错误
2016-01-26 14:52:36 +08:00
joyqi
86ae20bfbb Merge pull request #425 from MioMioReimu/master
bugfix: In function 'treeViewCategoriesCallback' , the item Tag is hardcode w…
2016-01-26 14:50:51 +08:00
joyqi
44141c5727 Merge pull request #393 from tridays/master
修复检测不到 $_server['SERVER_PORT'] 导致无法访问后台的问题。
2016-01-26 14:48:56 +08:00
joyqi
d6fc7f182f fix array 2016-01-26 14:43:32 +08:00
joyqi
2200d86e8a fix new line 2016-01-26 12:55:22 +08:00
joyqi
1c140a563a fix array 2016-01-26 12:04:56 +08:00
joyqi
c58a9530b1 fix #416 2016-01-25 16:58:27 +08:00
joyqi
eca450855e fix #407 2016-01-25 16:37:16 +08:00
joyqi
43087d6370 Replace the markdown parse engine with HyperDown 2016-01-25 16:21:04 +08:00
zhoucheng
d10701f743 update phpdoc in Plugin 2015-12-23 17:57:11 +08:00
zhoucheng
3955ccd85b use space instead tab to vertically align code 2015-12-23 17:29:03 +08:00
zhoucheng
50b2b9c591 add phpdoc 2015-12-23 17:26:18 +08:00
zhoucheng
32249ab897 fix iconv function param error 2015-12-23 17:14:30 +08:00
tlm
e311837418 In function 'treeViewCategoriesCallback' , the item Tag is hardcode with 'li' . It should be replaced by itemTag. 2015-12-15 14:20:33 +08:00
joyqi
35d2908934 Merge pull request #422 from ldsink/master
update PHPDoc comments
2015-12-08 23:24:27 +08:00
ldsink
925daaeb63 constructors, the @return tag MAY be omitted here, in which case @return self is implied. 2015-12-08 21:50:59 +08:00
ldsink
a498669ad8 add excption throws 2015-12-08 21:42:02 +08:00
ldsink
e3cdc44edc process Widget 2015-12-08 21:36:13 +08:00
ldsink
1d1b79b6cf update PHPDoc comments 2015-12-08 21:19:36 +08:00
joyqi
1ccd804a40 Merge pull request #412 from JShadowMan/patch-1
Update Db.php
2015-11-14 14:34:38 +08:00
joyqi
6f6cf15674 Merge pull request #405 from shuax/master
typo fix
2015-11-14 14:31:29 +08:00
JShadowMan
a98472c1bb Update Db.php
注释一个错字?
2015-11-01 13:20:42 +08:00
unknown
cc622f9ccc 设置搜索归档缩略名 2015-10-31 15:33:46 +08:00
舒俊杰
6ad6511762 typo fix 2015-10-09 21:17:47 +08:00
joyqi
fe76665687 Merge pull request #394 from lizheming/master
Json.php 中的引用错误
2015-09-29 16:16:51 +08:00
祁宁
2666641560 add php 7 check 2015-09-08 11:44:33 +08:00
lizheming
37be2afa98 fix Json.php error 2015-08-29 16:24:04 +08:00
joyqi
b257d053f6 Merge pull request #331 from dseguy/master
去掉无用的变量
2015-08-27 21:38:06 +08:00
joyqi
ce8bb8c349 Merge pull request #373 from mikeyzm/master
删除乱入的<dt>标签
2015-08-27 21:34:11 +08:00
joyqi
9e2a8214a9 Merge pull request #388 from keyingkai/master
Update header.php
2015-08-27 21:33:43 +08:00
tridays
ae7b2f49b0 修复检测不到 $_server['SERVER_PORT'] 导致无法访问后台的问题。
修改了 /var/Typecho/Request.php:222 行。
2015-08-27 21:09:24 +08:00
keyingkai
f5944fa138 Update header.php
更换到支持https的js库(cdnjs),增强了https的支持
2015-08-03 09:20:18 +08:00
helone
6ef4219b2a 删除 Chrome Frame 的支持
Google Chrome Frame已于2014年2月25日正式停止维护与更新 https://zh.wikipedia.org/wiki/Google_Chrome_Frame
2015-07-29 16:03:57 +08:00
joyqi
3d4b7babb4 Merge pull request #379 from aneasystone/master
修复两个在SAE本地环境出现的bug
2015-06-27 22:18:37 +08:00
Desmond Stonie
53a2ce64b4 __TYPECHO_MB_SUPPORTED__ needs mb_get_info and mb_regex_encoding all exist 2015-06-27 12:41:22 +08:00
Desmond Stonie
e4e0ace9a9 in some SAE environment, SAE constants like SAE_MYSQL_DB have been defined but not been initialized 2015-06-27 12:39:01 +08:00
joyqi
5f72999a44 Merge pull request #375 from byends/patch-1
Update Contents.php
2015-06-01 10:45:37 +08:00
羽飞
2aaaf9df05 Update Contents.php
修复在插件调用执行config() 方法时,不存在 text  key 时有警告提醒
2015-05-30 19:53:03 +08:00
Mike
e6e3cec3f1 删除乱入的<dt>标签 2015-05-05 10:38:20 +08:00
joyqi
65637a33d1 Update Response.php
修正某些情况下可能导致的重定向失败
2015-05-02 13:31:05 +08:00
祁宁
5c0ed25684 支持自定义gravatar url前缀 2015-01-20 17:32:44 +08:00
祁宁
a867645e45 Merge branch 'master' of https://github.com/typecho/typecho 2015-01-19 14:11:57 +08:00
祁宁
bcbb02b81e fix #347
修正多语言支持无法显示语言名称的bug
2015-01-19 14:09:14 +08:00
fen
b54c3fb085 修改 blockquote 样式 2014-11-20 11:02:43 +08:00
fen
a0dedafc10 添加默认模板表格支持 fixed issue #342 2014-11-20 10:59:12 +08:00
fen
4bb88fa79b Merge branch 'master' of github.com:typecho/typecho 2014-11-20 10:48:28 +08:00
fen
8fa7ddca6d 添加空格 2014-11-20 10:43:19 +08:00
祁宁
b0c4cc77a7 Merge branch 'master' of https://github.com/typecho/typecho 2014-11-18 13:59:52 +08:00
祁宁
c904005498 fix #341 2014-11-18 13:52:24 +08:00
joyqi
8fd7492840 Merge pull request #333 from zhulin3141/master
fix conflict with bootstrap tab
2014-11-07 18:13:05 +08:00
zhulin3141
59f4604eb6 fix conflict with bootstrap tab 2014-11-07 16:34:23 +08:00
祁宁
2b120ded77 fix cache key 2014-11-07 11:48:19 +08:00
祁宁
f062a78768 fix #328
fix #325

修正在标签输入时无法使用tab切换焦点
2014-11-07 11:40:38 +08:00
Damien Seguy
6e8c0f6c89 去掉无用的变量 2014-11-02 22:28:13 +01:00
祁宁
cd971ea91e parsedown依然有bug 2014-10-27 11:06:29 +08:00
祁宁
63b5e48805 markdown bug 2014-10-27 11:06:08 +08:00
祁宁
9d84c8f596 fix for php 5.2 2014-10-21 17:25:56 +08:00
祁宁
11bb981c99 missing pagedonw 2014-10-21 10:38:02 +08:00
祁宁
2b2a7e907b fix #319
使用pagedown原生解析器替换markdown-extra
2014-10-20 23:29:02 +08:00
祁宁
93be22e596 fix #319 2014-10-20 14:45:15 +08:00
祁宁
57947d05e4 Merge branch 'master' of https://github.com/typecho/typecho 2014-10-20 00:50:04 +08:00
祁宁
49cae68578 1. 在编辑器非全屏状态下,禁用tab插入空格,以便使用tab跳转输入聚焦
2. 修正一个路由错误
2014-10-20 00:38:34 +08:00
joyqi
381574c1c9 Merge pull request #313 from nopyhe/master
改进https支持
2014-10-17 17:41:53 +08:00
nopy
ac47e05b93 改进https支持 2014-10-17 16:04:40 +08:00
祁宁
72eedcdf14 fix #308
fix #304
fix #300
fix #284
2014-10-16 18:02:31 +08:00
祁宁
1225b0c0fd 修正sqlite数据库在pdo下的bug 2014-10-16 16:55:10 +08:00
祁宁
9c5c404c71 fix autop 2014-10-16 16:07:59 +08:00
祁宁
4fc76a4dc3 remove commonmark 2014-10-16 15:49:52 +08:00
祁宁
410c603cbd 一个bug 2014-10-13 16:05:51 +08:00
祁宁
09ba4cdde4 修正js的markdown语法解析 2014-10-12 13:09:37 +08:00
祁宁
f1726cf815 修正安装时的端口判断 2014-10-12 12:41:42 +08:00
祁宁
1e69fdbb53 后台预览,自动识别链接 2014-10-12 12:32:00 +08:00
祁宁
04b1ef83d2 更换为MarkdownExtraExtended解析引擎 2014-10-11 16:25:56 +08:00
祁宁
25f5e34e66 add hhvm and php 5.6 test 2014-10-11 13:08:04 +08:00
祁宁
ccd87381b0 更新测试脚本 2014-10-11 13:02:18 +08:00
祁宁
a1fad00292 php 5.2兼容性bug 2014-10-11 12:59:47 +08:00
祁宁
c9e34420e1 更新测试脚本 2014-10-11 12:49:42 +08:00
祁宁
9977578393 更新测试脚本 2014-10-11 12:44:54 +08:00
祁宁
48d30730fe 更新测试脚本 2014-10-11 12:34:27 +08:00
祁宁
f0b986318a php 5.2兼容性bug 2014-10-11 12:31:13 +08:00
祁宁
3f3812c305 change test script 2014-10-11 12:24:47 +08:00
祁宁
56d9b46d28 增加持续继承测试支持 2014-10-11 12:18:49 +08:00
祁宁
e3a7f143eb 修正secure判断 2014-10-11 10:07:41 +08:00
祁宁
889f27d119 fix #294 2014-10-11 00:11:32 +08:00
祁宁
aa6e27b95d 修正php5.2语法 2014-10-10 16:20:51 +08:00
祁宁
cdc3df3890 自动使用default皮肤 2014-10-10 15:51:37 +08:00
祁宁
1b4da70ee7 当某些情况下(比如升级)误删了皮肤目录,自动使用default皮肤 2014-10-10 15:48:45 +08:00
祁宁
19251770fd 恢复样式 2014-10-10 15:03:28 +08:00
祁宁
698c2a7682 继续提交 2014-10-10 15:02:24 +08:00
祁宁
136cf68e04 统一gravatar输出
增加__TYPECHO_SECURE__变量,强制使用https
2014-10-10 15:01:58 +08:00
祁宁
493eb47af3 fix #291
给token字符串加上扰码机制
2014-10-10 14:17:25 +08:00
祁宁
539f9fc9d0 增加一项反垃圾保护策略 2014-10-10 11:38:09 +08:00
祁宁
ecc8c80664 Merge branch 'master' of https://github.com/typecho/typecho 2014-10-10 10:25:53 +08:00
祁宁
74313b1600 修正由于 common mark 解析库使用了匿名函数造成部分php 5.2版本无法正常解析的错误 2014-10-10 09:58:10 +08:00
joyqi
b7013f3389 Merge pull request #290 from shingchi/master
纠正单词错误
2014-10-10 09:56:21 +08:00
ShingChi
e49287f957 纠正单词错误 2014-10-10 07:18:50 +08:00
祁宁
80de4900df fix #289
修正由于转义引号导致的在sqlite下查询失败错误
修正由于部分主机没有安装mb插件导致无法输出markdown文本的错误

fix #288

给expression增加参数$escape来控制是否转义语句
2014-10-09 22:19:22 +08:00
祁宁
52f7f3a29a 准备发布新版本 2014-10-09 16:30:34 +08:00
祁宁
7b95093dc5 fix #288 2014-10-09 14:14:28 +08:00
祁宁
18a4876110 fix css and cookie set 2014-09-29 17:02:48 +08:00
祁宁
29c55b43f4 fix editor css 2014-09-29 00:02:53 +08:00
祁宁
3df6e1fdbd make langs 2014-09-28 14:38:12 +08:00
祁宁
5e2fc0ae11 fix langs 2014-09-28 12:57:50 +08:00
祁宁
33df4bb3df fix markdown bug 2014-09-28 12:44:41 +08:00
祁宁
4a50198f6e add newline break support 2014-09-27 11:44:56 +08:00
祁宁
fbda6bc514 改善上传面板在全屏下的效果 2014-09-26 22:58:34 +08:00
祁宁
3e5a01637b update to CommonMark support 2014-09-26 21:40:55 +08:00
祁宁
146b289c42 update pot file 2014-09-11 14:19:42 +08:00
祁宁
7de46fd2b4 防止伪造ip 2014-09-03 13:25:34 +08:00
祁宁
bc12f48ac7 fix autop
add ParsedownExtra parser
2014-09-03 12:34:47 +08:00
祁宁
25c768a630 fix markdown preview 2014-09-03 00:07:46 +08:00
祁宁
d1fd4b2b9c 更换Markdown解析引擎为更准确的Parsedown
统一前后端的Markdown解析
更新Jquery 到2.1.1

fix #267
2014-09-02 13:11:57 +08:00
祁宁
6551798e70 增加完整的语言支持
fix #278
fix #266
fix #265
2014-09-02 11:22:26 +08:00
祁宁
97d4902ce0 修改错误提示样式
更新slug name自适应宽度取法,修正在新版chrome下可能引起的bug
2014-09-02 00:38:56 +08:00
祁宁
07f93cb76b 增加新常量 __TYPECHO_IP_SOURCE__
用来指定从哪个项里读取IP地址,比如HTTP_X_REAL_IP
2014-09-01 23:52:41 +08:00
祁宁
3041d50461 修正判断不完全的问题 2014-08-18 20:39:36 +08:00
祁宁
9a3949247d fix #279 2014-08-13 18:05:01 +08:00
joyqi
fe0807cec5 Merge pull request #268 from twwy/master
直接用parse_url会忽略端口,如果用户是非80端口会产生问题
2014-08-12 00:53:41 +08:00
joyqi
e867629ac5 Merge pull request #273 from xiaozi/patch-1
修复模板自定义field 不能保存的bug
2014-08-12 00:53:14 +08:00
小子欠扁
cfee6a59e7 修复模板自定义field 不能保存的bug 2014-08-02 17:07:12 +08:00
炯思
cee9dbc41e 直接用parse_url会忽略端口,如果用户是非80端口会产生问题 2014-07-11 09:32:34 +08:00
祁宁
a7bcb93d75 fix #257 2014-06-27 17:57:55 +08:00
祁宁
9daa4237dc fix #248
fix #241
2014-05-27 12:13:28 +08:00
祁宁
99819643dd fix #249
fix #250
2014-05-27 10:44:14 +08:00
祁宁
1a1262caf5 1.0 beta version 2014-05-26 11:37:55 +08:00
祁宁
c6a468fdcb fix #244 2014-05-23 14:45:44 +08:00
祁宁
13f6adad4d close #246
thanks @loftor-git, but I want to delete the "log" method
2014-05-23 14:44:05 +08:00
祁宁
0f572bc06e Merge branch 'master' of https://github.com/typecho/typecho 2014-05-14 14:27:16 +08:00
祁宁
48090d9d2f close #238
fix query builder
2014-05-14 14:26:41 +08:00
Fen
73ce576c53 Merge pull request #233 from linzian/master
Lossless compression
2014-05-04 11:13:11 +08:00
祁宁
4cb7850b42 fix #237
and Widget_Options is correct
2014-04-28 12:42:39 +08:00
祁宁
79b5095a3f Merge branch 'master' of https://github.com/typecho/typecho 2014-04-28 00:31:33 +08:00
祁宁
cee9c87d9e fix #228
disable fenced figures feature by MarkdownExtraExtended
2014-04-28 00:31:09 +08:00
joyqi
8c7fe0a72c Merge pull request #234 from KimiChen/master
增加更新fork之后的Typecho至最新的脚本
2014-04-28 00:19:00 +08:00
KimiChen
72bdfbe6ad 增加更新fork之后的Typecho至最新的脚本 2014-04-25 17:02:01 +08:00
祁宁
2e268996b1 finish gae install 2014-04-25 09:52:27 +08:00
祁宁
59a6a52acf Merge branch 'master' of https://github.com/typecho/typecho 2014-04-25 09:38:35 +08:00
祁宁
10b7d336ba replace hash method 2014-04-25 09:38:17 +08:00
joyqi
d7c8b87fb6 Merge pull request #232 from KimiChen/master
修正由于GAE的MySQL连接参数变化导致的安装失败问题
2014-04-25 09:36:51 +08:00
KimiChen
d872574ab5 修改错误的单引号 2014-04-24 22:46:56 +08:00
linzian
e450672333 Lossless compression
Lossless compression
2014-04-24 20:25:54 +08:00
KimiChen
4f22194222 replace hash module with PasswordHash 2014-04-24 18:29:43 +08:00
KimiChen
10d23e0e5f 修正由于GAE的MySQL连接参数变化导致的安装失败问题 2014-04-24 18:22:56 +08:00
祁宁
d9ee03df73 replace hash module with PasswordHash 2014-04-23 14:43:31 +08:00
祁宁
5e32925a94 clean some unused widgets 2014-04-23 10:50:12 +08:00
祁宁
8c3d36d1b2 fix some bugs 2014-04-22 22:42:35 +08:00
祁宁
6a73282e80 add widget dynamic alias method, which allows you hack widget class anywhere 2014-04-22 11:53:54 +08:00
祁宁
c10f2f4914 disable first user delete 2014-04-21 16:05:11 +08:00
祁宁
4255076c44 change __TYPECHO_UPLOAD_PREFIX_URL__ to __TYPECHO_UPLOAD_URL__ 2014-04-21 13:36:01 +08:00
祁宁
e927f47566 add __TYPECHO_SITE_URL__ constant 2014-04-21 12:34:38 +08:00
祁宁
bb1642c95f add __TYPECHO_THEME_URL__ and __TYPECHO_PLUGIN_URL__ constants 2014-04-20 20:59:58 +08:00
祁宁
df63e19190 add default query setting method 2014-04-20 20:29:02 +08:00
祁宁
e6d5d5e7de add __TYPECHO_UPLOAD_ROOT_DIR__, __TYPECHO_UPLOAD_PREFIX_URL__ constants 2014-04-20 18:03:44 +08:00
祁宁
18acb3cb27 add constant to disable theme file writing 2014-04-20 17:21:54 +08:00
祁宁
77088e226f fix #226
disable curl https verify
2014-04-19 17:15:21 +08:00
祁宁
e6cae33061 close #227
修正在检查重写时无法保存链接样式的bug
2014-04-19 17:13:22 +08:00
祁宁
db335cdb8f fix #217 2014-04-17 11:36:15 +08:00
祁宁
310ee3e2dc fix typo 2014-04-13 11:17:33 +08:00
joyqi
112f16ea90 Merge pull request #222 from loftor-git/master
Update Db.php
2014-04-13 11:14:56 +08:00
Loftor
764dc5b253 Update Db.php
修改数据库连接池实现
2014-04-12 20:51:15 +08:00
祁宁
99f6e2f8a7 给category list增加聚焦效果 2014-04-09 12:44:53 +08:00
祁宁
542620a9af 修改取附件的默认顺序,更符合通常需要 2014-04-09 11:53:37 +08:00
祁宁
82db829888 add attachment alias 2014-04-09 11:29:27 +08:00
祁宁
57c5f92877 给attachment增加offset 2014-04-09 10:44:04 +08:00
祁宁
3d5f0de968 Merge branch 'master' of https://github.com/typecho/typecho 2014-04-08 22:43:42 +08:00
祁宁
23b87aeb1f fix #219
修正后台->设置->评论->允许使用的html标签里的重复编码问题
2014-04-08 22:43:32 +08:00
joyqi
d384348308 Merge pull request #213 from shingchi/test
Test
2014-03-26 15:20:16 +08:00
ShingChi
a33f88e078 重新修改上下文,兼容原来主题 2014-03-21 12:26:01 +08:00
ShingChi
6c8e81edfa Merge pull request #3 from typecho/master
update
2014-03-21 12:15:58 +08:00
祁宁
ea3d5585a8 修正一些细节 2014-03-20 23:54:57 +08:00
祁宁
58afc7fc0c fix #212 2014-03-20 17:15:58 +08:00
joyqi
db5f84114e Merge pull request #210 from shingchi/master
安装文件漏掉括号和参数错误
2014-03-19 09:53:07 +08:00
ShingChi
608a3c4d89 漏掉括号和参数错误 2014-03-16 20:04:03 +08:00
ShingChi
515309b11b Merge pull request #2 from typecho/master
同步最新
2014-03-16 19:51:03 +08:00
祁宁
de41a3ee17 Merge branch 'master' of https://github.com/typecho/typecho 2014-03-15 22:50:29 +08:00
祁宁
81f46ae06f 使用严等于来修复某些极端情况下密码可被绕过的漏洞 2014-03-15 22:50:17 +08:00
祁宁
ee4e4838cd 修正链接跳转判断不完整 2014-03-15 22:46:46 +08:00
joyqi
098207351b Merge pull request #209 from byends/master
修复保存个人资料中“默认允许”选项失效的BUG
2014-03-15 19:31:27 +08:00
byends
8e0b3565a3 整理代码格式 2014-03-15 12:01:38 +08:00
byends
f1b7f58ddc 修复保存个人资料中“默认允许”选项失效的BUG 2014-03-15 11:56:08 +08:00
祁宁
b4c903f82b fix #208 2014-03-15 11:36:53 +08:00
祁宁
23e1e04cd7 修复自定义字段消失 2014-03-14 16:14:03 +08:00
祁宁
15927ad775 增加token保护
防垃圾评论
2014-03-14 16:11:28 +08:00
祁宁
308c1beb16 修正撰写文章添加标签时可能出现的非法字符
修正cookie对数组的过滤不严
2014-03-14 15:09:34 +08:00
祁宁
c4c915bcc4 不允许上传可执行文件 2014-03-13 23:05:22 +08:00
祁宁
8c28fda456 fix #206 2014-03-13 19:24:15 +08:00
祁宁
5dda5a5980 修复强制启用rewrite时可能被挡住的bug 2014-03-13 13:44:37 +08:00
祁宁
625adb8395 修正某些存储型xss。。。个人认为有点鸡肋 2014-03-13 12:25:23 +08:00
祁宁
3149169953 修正编辑器自动识别链接时可能错误地添加某些样式地bug 2014-03-13 12:11:21 +08:00
祁宁
a64a492886 在helper中引入security对象,建议插件中使用它,以降低xss风险 2014-03-12 15:14:04 +08:00
祁宁
7ee9b8b60a 修正使用不合法的utf-8字符串导致的数据判断错误 2014-03-12 12:58:44 +08:00
祁宁
f7cb1a1d49 修正电子邮箱过滤不严可能造成的xss 2014-03-12 11:29:54 +08:00
祁宁
90e2c08542 修复个人资料昵称可能导致的xss 2014-03-11 23:29:58 +08:00
祁宁
94e32784e1 Merge branch 'master' of https://github.com/typecho/typecho 2014-03-11 21:18:37 +08:00
祁宁
a58e564bb7 修正验证参数不严导致的可能泄漏路径 2014-03-11 21:18:16 +08:00
fen
6e92b4d7ce fixed default theme retina support 2014-03-11 20:23:29 +08:00
fen
e4c62b85f1 fixed retina support 2014-03-11 20:02:35 +08:00
祁宁
4610ee8b70 Merge branch 'master' of https://github.com/typecho/typecho 2014-03-11 19:40:38 +08:00
祁宁
1a51276b3d 修正用户昵称修改时可能造成的xss 2014-03-11 19:40:07 +08:00
fen
f4ca780f16 编辑器图标适配 retina 2014-03-11 19:08:46 +08:00
ShingChi
9f44b4bf67 顺便加上table 2014-03-11 18:54:40 +08:00
祁宁
bde86574b8 修正注册时可能造成的信息泄漏 2014-03-11 15:43:31 +08:00
ShingChi
1dba99b74a 不同标签不同结束符 2014-03-11 15:33:18 +08:00
ShingChi
d9746ef847 Merge pull request #1 from typecho/master
同步最新
2014-03-11 15:23:15 +08:00
祁宁
a4f93e0231 为文件上传加入token保护
对文件名做更加严格的过滤
2014-03-11 15:20:54 +08:00
祁宁
fa7bc750f0 笔误。。。 2014-03-11 14:45:21 +08:00
祁宁
e3095acfc3 fix #203
现在可以调用$this->summary,来自动输出文章的第一个段落作为摘要
2014-03-11 11:28:08 +08:00
祁宁
31a59be5e6 fix #204 2014-03-11 11:16:12 +08:00
祁宁
37c67e7de2 修正ip地址和agent没有过滤可能导致的xss漏洞 2014-03-11 11:04:12 +08:00
祁宁
c3e8abe333 修正模版没有限制造成在某些情况下的路径泄漏 2014-03-11 09:45:24 +08:00
ShingChi
1d77ca0ef9 修复下 2014-03-10 21:55:29 +08:00
祁宁
98d2433620 修正用户注册没有过滤用户名,导致的xss存储型漏洞 2014-03-10 21:31:07 +08:00
祁宁
5dc5cfb906 修正waring 导致的路径泄漏 2014-03-10 21:14:50 +08:00
祁宁
0d30d33aa3 修正泄露路径的漏洞 2014-03-10 21:05:20 +08:00
ShingChi
da1989c6e0 fix whitespace 2014-03-10 20:57:41 +08:00
ShingChi
51c2864fa6 让上下文链接样式更自由 2014-03-10 20:38:20 +08:00
祁宁
a7e4a8e120 修正ace安装 2014-03-06 10:48:42 +08:00
joyqi
90a3f44399 fix #199 2014-03-04 21:15:44 +08:00
joyqi
97d0d11a94 拼写错误 2014-03-04 00:54:44 +08:00
joyqi
bfa9fc2553 修复删除附件不能的bug 2014-03-04 00:50:32 +08:00
joyqi
78760beeea 更加优秀的预览cache 2014-03-03 15:25:10 +08:00
joyqi
8aa706fd49 去掉对ip的检测,因为再某些多出口的网络环境中可能存在多个ip来回切换的情况 2014-03-01 17:29:32 +08:00
joyqi
7ccd45dd87 修正分类修改bug 2014-03-01 13:27:10 +08:00
joyqi
1f5b276d19 修正分类输出错误 2014-02-28 23:01:21 +08:00
joyqi
7b52118457 增加超时时间 2014-02-28 17:03:21 +08:00
fen
ee4d86766a 修复安装界面按钮问题 2014-02-28 15:54:24 +08:00
joyqi
930c595ae5 增加多语言控制变量
例如:
将语言文件en_US.mo放置在/usr/langs目录下(没有创建的需要新建)
然后在config.inc.php里设置添加代码 define('__TYPECHO_LANG__', 'en_US'); ,即可将语言设置为en_US
2014-02-28 10:53:03 +08:00
joyqi
6de401ab49 防止跨站 2014-02-28 10:09:42 +08:00
joyqi
a54c3db00f 安全转义 2014-02-28 10:05:29 +08:00
joyqi
de7b57c2cb fix #197 2014-02-28 09:53:06 +08:00
joyqi
972e65d02b 全面增加security安全模块,保护免受跨站攻击 2014-02-27 23:13:09 +08:00
joyqi
338ce99c7c fix #196
增加获取页面总数函数$this->getTotalPage
2014-02-27 14:04:43 +08:00
joyqi
ac14a68937 修正一些注释 2014-02-27 11:46:33 +08:00
joyqi
462e1b645f fix #193 2014-02-26 14:21:41 +08:00
joyqi
4cd7184b5b 修正分类归档计数错误 2014-02-25 11:58:20 +08:00
joyqi
8e7bf64397 修复多级分类后台显示错误 2014-02-25 11:24:48 +08:00
joyqi
bb331ec8a5 修正子分类的一系列问题 2014-02-25 10:54:50 +08:00
joyqi
12fe71654d Merge branch 'master' of https://github.com/typecho/typecho 2014-02-24 18:56:11 +08:00
joyqi
854bfdafef 子分类支持 2014-02-24 18:55:56 +08:00
joyqi
dd3410f2b8 Merge pull request #191 from byends/master
删除多余的代码
2014-02-22 11:03:32 +08:00
byends
93137cf24b 删除多余的代码 2014-02-22 10:43:46 +08:00
joyqi
b4d1a3a067 fix markdown 2014-02-21 00:03:30 +08:00
joyqi
7ac6ca5546 将分类和标签分开管理,为后续支持子分类做准备 2014-02-18 15:48:03 +08:00
joyqi
72f95bb428 增加ACE适配 2014-02-18 15:36:58 +08:00
joyqi
273900d806 Merge branch 'master' of https://github.com/typecho/typecho 2014-02-18 10:14:34 +08:00
joyqi
948953eb33 修复拖拽效果 2014-02-18 10:14:27 +08:00
fen
1e50409ce5 Merge branch 'master' of https://github.com/typecho/typecho 2014-02-18 10:01:35 +08:00
fen
554124570b 添加最大高度 2014-02-18 10:01:28 +08:00
joyqi
5be3d08bd0 适配存储接口还是交由第三方插件 2014-02-18 09:49:39 +08:00
joyqi
502cd5f7ca 准备对各应用引擎的存储进行支持 2014-02-17 18:00:29 +08:00
joyqi
85bc868760 Merge branch 'master' of https://github.com/typecho/typecho 2014-02-17 14:38:24 +08:00
joyqi
b6121f8b75 优化文件上传体验,可以上传多个文件,上传更加流畅 2014-02-17 14:38:13 +08:00
fen
628dda2d8d Merge branch 'master' of https://github.com/typecho/typecho 2014-02-13 17:58:06 +08:00
fen
8b6f45662e 修复评论【取消】按钮样式 2014-02-13 17:57:58 +08:00
joyqi
a2090a3250 Merge pull request #181 from loftor-git/master
增加HAVING语句方法
2014-02-12 17:58:34 +08:00
joyqi
c056ba70fa fix #188
去掉所有不必要的require_once
2014-02-12 17:51:47 +08:00
fen
1ee0fa0805 Merge branch 'master' of https://github.com/typecho/typecho 2014-02-10 20:07:21 +08:00
fen
9b7c14e656 修复阅读设置页面的站点首页无法隐藏问题 2014-02-10 20:07:14 +08:00
joyqi
bf20d25984 添加autofocus属性 2014-02-09 01:46:35 +08:00
joyqi
fdf9196d58 fix #182 2014-02-09 01:18:31 +08:00
Loftor
7c1ff3029b 增加HAVING语句方法 2014-01-22 14:30:40 +08:00
joyqi
4ddd293f3d fix #168 2014-01-11 23:29:06 +08:00
joyqi
db3bfaa08e 尝试修复 #168 2014-01-11 18:37:23 +08:00
fen
787c143949 Merge branch 'master' of https://github.com/typecho/typecho 2014-01-10 23:55:59 +08:00
fen
4e7f9a041a 将模板的中文标点全部替换成英文 2014-01-10 23:55:04 +08:00
joyqi
68c4f7b912 修改更为准确的字符串处理函数 2014-01-10 19:12:39 +08:00
joyqi
daf8e1ee57 尝试修正 #168 2014-01-09 17:04:10 +08:00
joyqi
8dbe128e33 fix #169
增加评论删除插件接口
2014-01-09 16:51:36 +08:00
joyqi
1859e92e86 fix #152
增加了插件优先级定义的支持,多个插件之间可以自行约定执行顺序,范例

Typecho_Plugin::factory('admin/menu.php')->navBar_1000 = array('HelloWorld_Plugin', 'render');

这个插件的执行优先级就是1000,默认的执行顺序是10,越大的数字越靠后执行
2014-01-09 00:56:51 +08:00
joyqi
aa56382207 fix #167 2014-01-08 17:04:03 +08:00
joyqi
a3f17fbadb 修正class 2014-01-08 15:21:28 +08:00
joyqi
64db5b53da fix #161
为何有这么多人没有json支持,我都不知道你们是怎么装的php,算了,还是加上这个库吧
2014-01-08 15:03:37 +08:00
joyqi
ee42a9550d 一次取10篇日志 2014-01-08 00:10:01 +08:00
fen
6a838279c6 修复遗漏样式 2014-01-08 00:02:47 +08:00
fen
c447a3087e 改进 timepicker 样式 2014-01-08 00:00:16 +08:00
fen
851eb6b57d 剥离 .btn 样式 2014-01-07 23:53:05 +08:00
fen
2f1624b71b Merge branch 'master' of https://github.com/typecho/typecho
Conflicts:
	admin/editor-js.php
2014-01-07 23:46:22 +08:00
fen
c22ecae58a 改进 Issue #145 上传页面 2014-01-07 23:41:29 +08:00
joyqi
a21d13d4ed fix #166 2014-01-07 22:54:25 +08:00
joyqi
9788c44819 修正全屏上传按钮 2014-01-07 14:49:34 +08:00
joyqi
b7ebd770f7 Merge pull request #165 from Lanfei/master
修复包含大写字母的邮箱获取Gravatar头像错误问题
2014-01-06 22:08:27 -08:00
Lanfei
47e54f201e 修复包含大写字母的邮箱获取Gravatar头像错误问题 2014-01-07 13:58:09 +08:00
joyqi
bc7fd3e097 fix #150
fix #163

增加更加多样的分页输出样式选项,包括
wrapTag    外层包裹标签名,默认ol
wrapClass  外层包裹类名
itemTag     内层标签名, 默认li
textTag      直接输出文字的标签名
currentClass  当前聚焦类名
prevClass   上一页类名
nextClass   下一页类名
2014-01-07 10:45:07 +08:00
joyqi
297c77d593 fix #162
修正由于没有判断类别导致将没有文章的分类删除的bug
2014-01-06 00:52:14 +08:00
fen
8a58ab79cd 添加 Microdata 支持,改进与搜索引擎的关系 2014-01-04 23:19:59 +08:00
fen
a9000a7e43 升级库 2014-01-02 19:56:22 +08:00
Fen
f0455ec6e3 Merge pull request #158 from qt06/master
补充后台一些checkbox缺少文本描述
2014-01-01 18:17:00 -08:00
qt06
bce11f8b58 spelling error 2014-01-01 17:02:38 +08:00
qt06
6e855f25c9 missing the hover 2014-01-01 16:58:23 +08:00
qt06
98530da07c error spelling 2014-01-01 16:16:36 +08:00
qt06
d38e37cdf7 add the 'label' to the checkbox 2014-01-01 11:19:31 +08:00
qt06
7c6240f341 Merge branch 'master' of http://github.com/typecho/typecho 2014-01-01 10:58:02 +08:00
fen
9398c4e6ff 用了一个不太完美的方法解决了
fix issue #155
2013-12-31 17:14:52 +08:00
qt06
76c9e7fd23 add the for attribute fto the visibility label. 2013-12-29 14:36:34 +08:00
fen
b42c264494 统一 logo 配色 2013-12-27 12:26:12 +08:00
fen
ec58adb202 Merge branch 'master' of https://github.com/typecho/typecho 2013-12-27 12:25:17 +08:00
fen
45dc72970e 改进 logo 配色 2013-12-27 12:25:10 +08:00
joyqi
0357cb98cc Merge pull request #151 from shingchi/master
洁癖 https://github.com/typecho/typecho/pull/148#issuecomment-31201347
2013-12-25 19:09:18 -08:00
ShingChi
8f0125c06c https://github.com/typecho/typecho/pull/148#issuecomment-31201347 2013-12-26 10:45:44 +08:00
ShingChi
c4709b8560 Merge pull request #10 from typecho/master
同步最新
2013-12-25 18:34:18 -08:00
joyqi
0970125d25 修改array缩进格式 2013-12-26 00:09:31 +08:00
joyqi
9794b8ed1b Merge pull request #148 from loftor-git/master
wordpress 手机端
2013-12-25 07:55:13 -08:00
loftor
4843b2b30a 添加媒体中心列表接口 2013-12-25 23:51:52 +08:00
joyqi
ae25d095f2 Merge pull request #149 from shingchi/master
表名错误?
2013-12-25 07:12:14 -08:00
ShingChi
e917b842bd 表明错误? 2013-12-25 22:22:21 +08:00
fen
e74abeedd6 修复栅格历史遗留问题 2013-12-25 20:32:04 +08:00
fen
7c4da04be1 添加全屏撰写时附件上传,还不完美 fixed Issue #145 2013-12-25 20:16:25 +08:00
loftor
c5541ff5c3 格式调整 2013-12-25 20:14:31 +08:00
fen
0fe219206e 添加编辑器分隔符 2013-12-25 20:12:39 +08:00
Loftor
8dcb2512d8 wordpress 手机端 2013-12-25 17:13:04 +08:00
fen
d3382091bc 修改背景图 2013-12-25 14:23:29 +08:00
fen
785395167f 改进栅格系统 2013-12-25 13:56:33 +08:00
fen
4af6b4ad21 修改page hidden 2013-12-25 13:10:03 +08:00
joyqi
fd20c37c8f 使用兼容性更好的创建目录方式
当mkdir使用递归模式创建多层目录时,它的目录模式参数`mode`只会被设置在第一个目录上,为了保证兼容性,我们要手动设置所有创建的目录
2013-12-25 13:05:16 +08:00
fen
c7f30f0516 改进附件上传文件过大情况 2013-12-25 13:00:22 +08:00
joyqi
3d17d364d5 fixed #147
因为在处理拖拽上传的返回时没有处理出错提示,所以导致抛出错误。
2013-12-25 12:01:48 +08:00
joyqi
6baa5d893d Merge pull request #140 from nikbobo/master
增加分页 HTML 标签选项,问题详情见:http://forum.typecho.org/viewtopic.php?f=7&t=4712
2013-12-24 07:01:15 -08:00
joyqi
20bdf918ab Merge branch 'master' of https://github.com/typecho/typecho 2013-12-24 22:52:44 +08:00
joyqi
66626508f0 修正上传用户体验
当用户的附件上传完毕后,直接弹出插入图片或者链接对话框,让用户选择插入还是取消
2013-12-24 22:52:31 +08:00
joyqi
8430afcdd7 Merge pull request #146 from shingchi/master
添加后台插件管理快捷方式
2013-12-24 05:32:51 -08:00
ShingChi
b4fd952f03 添加插件管理快捷方式 2013-12-24 19:09:32 +08:00
ShingChi
4052da2ecd Merge pull request #9 from typecho/master
同步最新
2013-12-24 03:00:17 -08:00
fen
bc35aa4f45 Merge branch 'master' of https://github.com/typecho/typecho 2013-12-24 16:55:37 +08:00
fen
f7eddbaf79 预留全屏附件上传 2013-12-24 16:55:28 +08:00
joyqi
51dbbffc6d fixed #143
没有将上传路径的定义放到设置中,这是一个不常用的定义,放在config.inc.php里添加一行`define('__TYPECHO_UPLOAD_DIR__', 'xxxx');`即可
增加jpeg支持
2013-12-24 16:01:37 +08:00
joyqi
c0930d3f31 fixed #144 2013-12-23 20:18:46 +08:00
nikbobo
a0bfd17ec4 更换成为更美观的标签 $label 2013-12-21 18:40:23 +08:00
nikbobo
2ce51dc7b2 Merge remote-tracking branch 'remotes/typecho/master' 2013-12-21 18:38:38 +08:00
fen
6c9c0e0812 Merge branch 'master' of https://github.com/typecho/typecho 2013-12-21 12:08:04 +08:00
fen
e93ac75aed 减少默认模板对后台的依赖 2013-12-21 12:02:22 +08:00
joyqi
ee73a638ba fixed #142
尼玛,写反了。。。
2013-12-21 09:58:26 +08:00
ShingChi
def9d487ef Merge pull request #8 from typecho/master
更新
2013-12-20 17:26:02 -08:00
joyqi
a4c4213ac8 Merge pull request #141 from byends/patch-1
修复无法保存站点URL的BUG
2013-12-20 08:16:01 -08:00
byends
26adc429ee 修复无法保存站点URL的BUG
修复无法保存站点URL的BUG
2013-12-20 23:53:01 +08:00
nikbobo
a6c4ebb173 增加分页 HTML 标签选项,问题详情见:http://forum.typecho.org/viewtopic.php?f=7&t=4712 2013-12-20 20:11:00 +08:00
joyqi
6c09da6bda 给markdown编辑器增加创建自定义对话框的ui.dialog函数 2013-12-20 16:17:06 +08:00
joyqi
da5fa61414 给markdown编辑器的js脚本中增加插件挂载点
让用户可以通过js扩展编辑器的功能,比如增加其他按钮等等
2013-12-20 15:52:49 +08:00
joyqi
bd1c151eaa 修正评论钩子点书写错误 2013-12-20 09:36:54 +08:00
joyqi
f7d49225a4 增加评论列表插件钩子 2013-12-20 00:21:40 +08:00
joyqi
605a035b86 修正cookies设定 2013-12-20 00:14:44 +08:00
joyqi
2b9cf7755a 增加站点url设置功能,并且当站点url地址发生变化时,可以让用户以新地址正常登录后台并修改站点url
修正http://forum.typecho.org/viewtopic.php?f=4&t=4708 提到的问题
2013-12-20 00:11:34 +08:00
joyqi
0f822e5bfd fixed #127
fixed #139

增加了清理未归档文件功能
标签下的文章如果为空时会自动把该标签清除
2013-12-19 17:07:36 +08:00
joyqi
08bccb90fc fixed #138
修正判断不全面导致的撰写新文章页面也会出现提示的bug
2013-12-19 12:36:37 +08:00
joyqi
bfd97b3a51 增加强制使用Markdown编辑的功能
当用户编辑一个没有使用Markdown发布的内容时,会弹出提示让用户选择是否强制使用Markdown来编辑它
2013-12-19 11:24:51 +08:00
joyqi
6b38b7f541 fixed #137
在撰写页面输出文章标题时,被htmlspecialchars函数转义了两次导致了这个错误
2013-12-19 10:48:40 +08:00
joyqi
0f18b09ce4 修改撰写页面缩略名自适应宽度
根据issue #133 的提示,将宽度自适应改为完全依照css样式显示的实际宽度来调整
2013-12-19 10:46:23 +08:00
joyqi
a065afc55c 添加插件接口
根据issue #136的提议,在发布和删除内容后添加相应的插件接口,以实现一些特定的功能需求
2013-12-19 10:21:00 +08:00
fen
a77eedd18f 添加 pagedown 的 dialog 属性 2013-12-18 17:49:54 +08:00
fen
f4511ec67f 添加 dialog 2013-12-18 17:45:31 +08:00
joyqi
0271fa729f 修正代码格式 2013-12-18 12:35:24 +08:00
joyqi
4bc3e9d97b 修正遗漏的语言项
修正GetText库无法读取mo文件的bug
2013-12-18 00:19:52 +08:00
joyqi
02b7eda2a7 fixed #134
修正由于判断不准确导致某些情况下本地化时间函数输出异常。完善本地化时间函数的单,复数输出。
2013-12-17 22:51:15 +08:00
fen
f52d4c88a7 Merge branch 'master' of https://github.com/typecho/typecho 2013-12-17 11:19:45 +08:00
fen
b99e7c50d0 允许缩放 2013-12-17 11:19:34 +08:00
joyqi
cfa0caeb48 更新语言项
在安装程序中出现的语言翻译项不能使用换行符,那样不利于PO翻译软件识别。
2013-12-17 10:13:00 +08:00
joyqi
74e4e07da1 Merge pull request #132 from weakish/master
文字的小调整
2013-12-15 22:38:49 -08:00
joyqi
81b017a118 生成pot文件 2013-12-16 14:37:33 +08:00
Jakukyo Friel
5abd03638b 文字的小调整
- 密码建议使用符号、字母混合改为使用符号、字母、数字混合
- 授权说明改得更明确些,强调是在GPL的范围之内自由商业性或非商业性使用。
2013-12-16 13:37:08 +08:00
joyqi
6997bb1b8e fixed issue #129
根据实验,在某些web服务器上,对`urlencode`也就是RFC 3986的标准解释不同,它们将unicode字符转义为以百分号开头的小写字符,而php中则默认为大写字符。比如“你好”在php中被转义为`%E4%BD%A0%E5%A5%BD`而在某些服务器上被转义为`%e4%bd%a0%e5%a5%bd`。
这导致`Widget_Archive`中的`checkPermalink`函数将它们识别为不同的路径,从而循环重定向。

解决方法:在`checkPermalink`函数中直接比较`urldecode`以后的`path`
2013-12-16 09:39:25 +08:00
fen
6c074111be Merge branch 'master' of https://github.com/typecho/typecho 2013-12-13 17:09:52 +08:00
fen
b15350075c 改进编辑器按钮 2013-12-13 17:09:44 +08:00
joyqi
718f36caa3 标准化语言项 2013-12-13 15:32:56 +08:00
joyqi
fd597d5174 Update README.md 2013-12-13 12:36:01 +08:00
joyqi
d2ed2217c7 删掉一些不必要的参数 2013-12-13 12:29:26 +08:00
joyqi
81a99eb923 更新makefile
添加一个默认的readme
2013-12-13 11:59:17 +08:00
joyqi
f6f35f221d fix build env 2013-12-13 10:51:03 +08:00
joyqi
e979895006 fix build 2013-12-13 10:43:26 +08:00
fen
ae1e349647 Merge branch 'master' of https://github.com/typecho/typecho 2013-12-12 21:44:39 +08:00
fen
87a2191dba 添加上一篇、下一篇演示 2013-12-12 21:44:27 +08:00
joyqi
b2b55e6412 修正用户更新系统后还显示新版本更新的bug 2013-12-12 21:02:00 +08:00
joyqi
59e01860d1 0.9版本修正 2013-12-12 11:20:25 +08:00
joyqi
c773d9e6cc 升级版本,准备发布新的修正版 2013-12-12 11:18:39 +08:00
joyqi
7002dc5576 修正install的markdown 2013-12-12 11:14:39 +08:00
ShingChi
56d586e449 Merge pull request #7 from typecho/master
同步最新
2013-12-11 18:22:38 -08:00
fen
d4b55a9b87 Merge branch 'master' of https://github.com/typecho/typecho 2013-12-11 23:52:04 +08:00
fen
b6bbecce82 修复内置图片偏移问题 2013-12-11 23:51:57 +08:00
joyqi
7e06a9cc2e 修正以某个page作为首页时description和keywords会变化 2013-12-11 22:51:17 +08:00
joyqi
6825bb69d9 修正header的plugin会冲掉头部的bug 2013-12-11 22:45:48 +08:00
joyqi
17fb8ffd64 尝试修正iis 2013-12-11 17:41:45 +08:00
joyqi
355301df67 干掉持续集成 2013-12-11 16:06:26 +08:00
joyqi
c869721cca fix travis 2013-12-11 16:02:22 +08:00
joyqi
b20e12f63c 增加持续集成测试 2013-12-11 15:54:58 +08:00
joyqi
41c1112c23 fixed #119 2013-12-11 08:39:18 +08:00
joyqi
a644568299 增加模板自定义字段hook 2013-12-10 23:41:09 +08:00
joyqi
45ecb0cd29 Merge pull request #117 from byends/master
修复安装时删除原有数据表失败而无继续安装的BUG
2013-12-10 07:17:38 -08:00
byends
8a29052708 修复安装时删除原有数据表失败而无继续安装的BUG 2013-12-10 22:45:54 +08:00
joyqi
5ef50b7599 fixed #116 2013-12-10 21:49:48 +08:00
joyqi
d48ad48e0e fixed #115 2013-12-10 21:45:22 +08:00
joyqi
0adee465cc 简化链接判断 2013-12-10 16:01:22 +08:00
joyqi
19a9ebb8a0 修正链接跳转 2013-12-10 15:43:07 +08:00
fen
c21474545c Merge branch 'master' of https://github.com/typecho/typecho 2013-12-10 15:39:03 +08:00
fen
8f04aeff73 限制默认模板视频宽度 2013-12-10 15:38:52 +08:00
joyqi
e7ba0057d5 修正评论检测 2013-12-10 15:26:17 +08:00
joyqi
b960ecec4a 干掉create_function 2013-12-10 15:19:04 +08:00
joyqi
c39f6f3ee5 修正评论分页无效 2013-12-10 14:47:10 +08:00
joyqi
d02097dd3d 帮助文档链接修正 2013-12-10 12:41:42 +08:00
joyqi
8c6eeb8b42 最后检查 2013-12-10 12:19:54 +08:00
joyqi
5b561a246c fixed #112 2013-12-10 12:02:46 +08:00
fen
7e68a303a8 Merge branch 'master' of https://github.com/typecho/typecho 2013-12-10 11:54:17 +08:00
fen
2eb5e622fb 修改登录 body 登录页高度 2013-12-10 11:53:53 +08:00
joyqi
a7a7623203 修正强制https错误 2013-12-10 11:14:07 +08:00
fen
5346434a2b 改进后台日期显示
改进登录页面居中问题
2013-12-10 10:31:38 +08:00
fen
528ed53624 Merge branch 'master' of https://github.com/typecho/typecho 2013-12-10 10:12:02 +08:00
fen
4d6ee11578 修改默认模板截图 2013-12-10 10:11:55 +08:00
joyqi
1094abdd84 修正日期 2013-12-10 10:06:03 +08:00
fen
52751fe6e6 样式微调 2013-12-09 23:57:08 +08:00
fen
9314ab0ce7 修改后台首页,官方日志部分未修复 2013-12-09 23:43:59 +08:00
fen
aeef74372c 消除边边角角的样式 2013-12-09 21:32:45 +08:00
fen
490828caf2 统一命名 2013-12-09 21:29:49 +08:00
fen
a97266df06 减少代码量 2013-12-09 21:27:03 +08:00
fen
c849cd043c Merge branch 'master' of https://github.com/typecho/typecho 2013-12-09 21:11:11 +08:00
fen
6b3a81bb4d 添加 typecho 新 logo 2013-12-09 21:11:03 +08:00
joyqi
c85bb1dc24 fixed #111 2013-12-09 12:55:05 +08:00
joyqi
02a913f2a0 fixed #111 2013-12-09 09:52:39 +08:00
fen
fc292e1c0a tab 转 space 2013-12-09 00:08:28 +08:00
fen
59121c8426 调整措辞 2013-12-08 23:58:07 +08:00
fen
97af74da0b 浏览器升级提示 2013-12-08 21:26:50 +08:00
fen
4b2aef4596 Merge branch 'master' of https://github.com/typecho/typecho 2013-12-08 21:00:00 +08:00
fen
589c20de4f 修复管理页全选表单 label
移除下拉操作菜单多余内容
修复评论框 required 选项
2013-12-08 20:59:39 +08:00
joyqi
511f475bdd fixed #107 2013-12-08 18:49:19 +08:00
fen
6e1e3ac37d 修复导航菜单的聚焦问题 2013-12-08 16:20:03 +08:00
fen
e78a8b69f3 Merge branch 'master' of https://github.com/typecho/typecho 2013-12-07 16:32:55 +08:00
fen
0fa9e89b61 改进管理菜单操作 2013-12-07 16:32:41 +08:00
joyqi
be5f4f6e8b 修正替换文件的问题 2013-12-06 20:51:13 +08:00
joyqi
6db990f7a4 修正validate 2013-12-06 20:42:25 +08:00
joyqi
5b39b0ff48 fixed #106 2013-12-06 20:19:02 +08:00
fen
376c8869b7 修复自定义区域聚焦 2013-12-06 17:38:04 +08:00
fen
f5b3e92e8a 添加前台 landmark
优化撰写页 label
2013-12-06 17:26:32 +08:00
fen
eaf95a24c3 Merge branch 'master' of https://github.com/typecho/typecho
Conflicts:
	usr/themes/default/comments.php
2013-12-06 17:13:44 +08:00
fen
31b06efc56 添加后台部分页面的 landmark main
修复自定义字段错误 label
修复默认模板评论 label
2013-12-06 17:12:10 +08:00
shingchi
b46b7ada11 Merge pull request #6 from typecho/master 2013-11-30 10:00:30 -08:00
shingchi
30c6138323 Merge pull request #5 from typecho/master
update
2013-11-28 21:51:21 -08:00
440 changed files with 81843 additions and 53780 deletions

14
.editorconfig Normal file
View File

@@ -0,0 +1,14 @@
root = true
[*]
indent_style = space
indent_size = 4
[*.yml]
indent_size = 2
[*.scss]
indent_size = 2
[*.php]
insert_final_newline = true

14
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,14 @@
### 1. 该问题的重现步骤是什么?
### 2. 你期待的结果是什么?实际看到的又是什么?
### 3. 问题出现的环境
- 操作系统版本:
- Apache/NGINX 版本:
- 数据库版本:
- PHP 版本:
- Typecho 版本:
- 浏览器版本:
[//]: # (如有图片请附上截图)

64
.github/workflows/Typecho-dev-Ci.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: Typecho Dev Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
php:
name: PHP ${{ matrix.php }} Tests
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
fail-fast: false
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP only
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Test
run: |
find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" )
build:
name: Typecho Build
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci') && github.event_name != 'pull_request'"
needs:
- php
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: |
mkdir build
cp -r LICENSE.txt index.php install.php admin install usr var build/
mkdir build/usr/uploads/
chmod 755 build/usr/uploads/
rm -rf build/admin/src
cd build && zip -q -r typecho.zip * && mv typecho.zip ../ && cd -
- name: Upload a Build Artifact
uses: WebFreak001/deploy-nightly@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/typecho/typecho/releases/49532662/assets{?name,label}
release_id: 49532662
asset_path: ./typecho.zip
asset_name: typecho.zip
asset_content_type: application/zip
max_releases: 1
- name: Trigger build
run: |
curl -XPOST -H "Authorization: token ${{ secrets.WORKFLOW_TOKEN }}" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" \
https://api.github.com/repos/typecho/languages/actions/workflows/update.yml/dispatches --data '{"ref": "master"}'

View File

@@ -0,0 +1,39 @@
name: Typecho Build Release Ci
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: |
mkdir build
cp -r LICENSE.txt index.php install.php admin install usr var build/
mkdir build/usr/uploads/
chmod 755 build/usr/uploads/
rm -rf build/admin/src
cd build && zip -q -r typecho.zip * && mv typecho.zip ../ && cd -
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./typecho.zip
asset_name: typecho.zip
asset_content_type: application/zip

12
.gitignore vendored
View File

@@ -2,7 +2,6 @@
.*.swo
._*
.DS_Store
/Debug/
/ImgCache/
/Backup_rar/
/Debug/
@@ -18,9 +17,20 @@
*.exp
*.pdb
*.rar
*.mo
*.po
*.pot
.smbdelete*
*.sublime*
.sass-cache
config.rb
prepros.config
/config.inc.php
/usr/uploads/
/usr/*.db
/usr/plugins/
!/usr/plugins/HelloWorld
/usr/themes/
!/usr/themes/default
node_modules/
/tools/tmp/

0
.gitmodules vendored Normal file
View File

48
.phpstorm.meta.php Normal file
View File

@@ -0,0 +1,48 @@
<?php
namespace PHPSTORM_META {
override(\Typecho\Widget::widget(0), map([
'' => '@'
]));
exitPoint(\Typecho\Widget\Response::redirect());
exitPoint(\Typecho\Widget\Response::throwContent());
exitPoint(\Typecho\Widget\Response::throwFile());
exitPoint(\Typecho\Widget\Response::throwJson());
exitPoint(\Typecho\Widget\Response::throwXml());
exitPoint(\Typecho\Widget\Response::goBack());
override(\Widget\Options::__get(0), map([
'feedUrl' => string,
'feedRssUrl' => string,
'feedAtomUrl' => string,
'commentsFeedUrl' => string,
'commentsFeedRssUrl' => string,
'commentsFeedAtomUrl' => string,
'xmlRpcUrl' => string,
'index' => string,
'siteUrl' => string,
'routingTable' => \ArrayObject::class,
'rootUrl' => string,
'themeUrl' => string,
'pluginUrl' => string,
'adminUrl' => string,
'loginUrl' => string,
'loginAction' => string,
'registerUrl' => string,
'registerAction' => string,
'profileUrl' => string,
'logoutUrl' => string,
'serverTimezone' => int,
'contentType' => string,
'software' => string,
'version' => string,
'markdown' => int,
'allowedAttachmentTypes'=> \ArrayObject::class
]));
override(\Typecho\Widget::__get(0), map([
'sequence' => int,
'length' => int
]));
}

128
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
admin@typecho.org.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

19
README.md Normal file
View File

@@ -0,0 +1,19 @@
Typecho Blogging Platform
=========================
Typecho is a PHP Blogging Platform. Simple and Powerful.
#### Telegram Channel
https://t.me/typechodev
#### Homepage
http://typecho.org/
#### Documents
http://docs.typecho.org/
#### Community
http://forum.typecho.org/
#### Download
http://typecho.org/download

106
admin/backup.php Normal file
View File

@@ -0,0 +1,106 @@
<?php
include 'common.php';
include 'header.php';
include 'menu.php';
$actionUrl = $security->getTokenUrl(
\Typecho\Router::url('do', array('action' => 'backup', 'widget' => 'Backup'),
\Typecho\Common::url('index.php', $options->rootUrl)));
$backupFiles = \Widget\Backup::alloc()->listFiles();
?>
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="row typecho-page-main" role="main">
<div class="col-mb-12 col-tb-8">
<div id="typecho-welcome">
<form action="<?php echo $actionUrl; ?>" method="post">
<h3><?php _e('备份您的数据'); ?></h3>
<ul>
<li><?php _e('此备份操作仅包含<strong>内容数据</strong>, 并不会涉及任何<strong>设置信息</strong>'); ?></li>
<li><?php _e('如果您的数据量过大, 为了避免操作超时, 建议您直接使用数据库提供的备份工具备份数据'); ?></li>
<li><strong class="warning"><?php _e('为了缩小备份文件体积, 建议您在备份前删除不必要的数据'); ?></strong></li>
</ul>
<p><button class="btn primary" type="submit"><?php _e('开始备份 &raquo;'); ?></button></p>
<input tabindex="1" type="hidden" name="do" value="export">
</form>
</div>
</div>
<div id="backup-secondary" class="col-mb-12 col-tb-4" role="form">
<h3><?php _e('恢复数据'); ?></h3>
<ul class="typecho-option-tabs clearfix">
<li class="active w-50"><a href="#from-upload"><?php _e('上传'); ?></a></li>
<li class="w-50"><a href="#from-server"><?php _e('从服务器'); ?></a></li>
</ul>
<form action="<?php echo $actionUrl; ?>" id="from-upload" class="tab-content" method="post" enctype="multipart/form-data">
<ul class="typecho-option">
<li>
<input tabindex="2" id="backup-upload-file" name="file" type="file" class="file">
</li>
</ul>
<ul class="typecho-option typecho-option-submit">
<li>
<button tabindex="4" type="submit" class="btn primary"><?php _e('上传并恢复 &raquo;'); ?></button>
<input type="hidden" name="do" value="import">
</li>
</ul>
</form>
<form action="<?php echo $actionUrl; ?>" id="from-server" class="tab-content hidden" method="post">
<?php if (empty($backupFiles)): ?>
<ul class="typecho-option">
<li>
<p class="description"><?php _e('将备份文件手动上传至服务器的 %s 目录下后, 这里会出现文件选项', __TYPECHO_BACKUP_DIR__); ?></p>
</li>
</ul>
<?php else: ?>
<ul class="typecho-option">
<li>
<label class="typecho-label" for="backup-select-file"><?php _e('选择一个备份文件恢复数据'); ?></label>
<select tabindex="5" name="file" id="backup-select-file">
<?php foreach ($backupFiles as $file): ?>
<option value="<?php echo $file; ?>"><?php echo $file; ?></option>
<?php endforeach; ?>
</select>
</li>
</ul>
<?php endif; ?>
<ul class="typecho-option typecho-option-submit">
<li>
<button tabindex="7" type="submit" class="btn primary"><?php _e('选择并恢复 &raquo;'); ?></button>
<input type="hidden" name="do" value="import">
</li>
</ul>
</form>
</div>
</div>
</div>
</div>
<?php
include 'copyright.php';
include 'common-js.php';
?>
<script>
$('#backup-secondary .typecho-option-tabs li').click(function() {
$('#backup-secondary .typecho-option-tabs li').removeClass('active');
$(this).addClass('active');
$(this).parents('#backup-secondary').find('.tab-content').addClass('hidden');
var selected_tab = $(this).find('a').attr('href');
$(selected_tab).removeClass('hidden');
return false;
});
$('#backup-secondary form').submit(function (e) {
if (!confirm('<?php _e('恢复操作将清除所有现有数据, 是否继续?'); ?>')) {
return false;
}
});
</script>
<?php include 'footer.php'; ?>

23
admin/category.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
include 'common.php';
include 'header.php';
include 'menu.php';
?>
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="row typecho-page-main" role="form">
<div class="col-mb-12 col-tb-6 col-tb-offset-3">
<?php \Widget\Metas\Category\Edit::alloc()->form()->render(); ?>
</div>
</div>
</div>
</div>
<?php
include 'copyright.php';
include 'common-js.php';
include 'form-js.php';
include 'footer.php';
?>

View File

@@ -1,20 +1,19 @@
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<script src="<?php $options->adminUrl('js/jquery.js?v=' . $suffixVersion); ?>"></script>
<script src="<?php $options->adminUrl('js/jquery-ui.js?v=' . $suffixVersion); ?>"></script>
<script src="<?php $options->adminUrl('js/typecho.js?v=' . $suffixVersion); ?>"></script>
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
<script src="<?php $options->adminStaticUrl('js', 'jquery.js'); ?>"></script>
<script src="<?php $options->adminStaticUrl('js', 'jquery-ui.js'); ?>"></script>
<script src="<?php $options->adminStaticUrl('js', 'typecho.js'); ?>"></script>
<script>
(function () {
$(document).ready(function() {
// 处理消息机制
(function () {
var prefix = '<?php echo Typecho_Cookie::getPrefix(); ?>',
var prefix = '<?php echo \Typecho\Cookie::getPrefix(); ?>',
cookies = {
notice : $.cookie(prefix + '__typecho_notice'),
noticeType : $.cookie(prefix + '__typecho_notice_type'),
highlight : $.cookie(prefix + '__typecho_notice_highlight')
},
path = '<?php $parts = parse_url($options->siteUrl);
echo empty($parts['path']) ? '/' : $parts['path']; ?>';
path = '<?php echo \Typecho\Cookie::getPath(); ?>';
if (!!cookies.notice && 'success|notice|error'.indexOf(cookies.noticeType) >= 0) {
var head = $('.typecho-head-nav'),
@@ -59,7 +58,7 @@
}
t.effect('highlight', {color : color})
.delay(5000).slideUp(function () {
.delay(5000).fadeOut(function () {
$(this).remove();
});
});
@@ -75,19 +74,54 @@
}
})();
// 导航菜单 tab 聚焦时展开下拉菜单
const menuBar = $('.menu-bar').click(function () {
const nav = $(this).next('#typecho-nav-list');
if (!$(this).toggleClass('focus').hasClass('focus')) {
nav.removeClass('expanded noexpanded');
}
});
$('.main, .typecho-foot').on('click touchstart', function () {
if (menuBar.hasClass('focus')) {
menuBar.trigger('click');
}
});
$('#typecho-nav-list ul.root').each(function () {
const ul = $(this), nav = ul.parent();
ul.on('click touchend', '.parent a', function (e) {
nav.removeClass('noexpanded').addClass('expanded');
if ($(window).width() < 576 && e.type == 'click') {
return false;
}
}).find('.child')
.append($('<li class="return"><a><?php _e('返回'); ?></a></li>').click(function () {
nav.removeClass('expanded').addClass('noexpanded');
return false;
}));
});
if ($('.typecho-login').length == 0) {
$('a').each(function () {
var t = $(this), href = t.attr('href');
if ((href.length > 1 && href[0] == '#')
if ((href && href[0] == '#')
|| /^<?php echo preg_quote($options->adminUrl, '/'); ?>.*$/.exec(href)
|| /^<?php echo substr(preg_quote(Typecho_Common::url('s', $options->index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(href)) {
|| /^<?php echo substr(preg_quote(\Typecho\Common::url('s', $options->index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(href)) {
return;
}
t.attr('target', '_blank');
t.attr('target', '_blank')
.attr('rel', 'noopener noreferrer');
});
}
$('.main form').submit(function () {
$('button[type=submit]', this).attr('disabled', 'disabled');
});
});
})();
</script>

View File

@@ -3,21 +3,24 @@ if (!defined('__DIR__')) {
define('__DIR__', dirname(__FILE__));
}
define('__TYPECHO_ADMIN__', true);
/** 载入配置文件 */
if (!@include_once __DIR__ . '/../config.inc.php') {
if (!defined('__TYPECHO_ROOT_DIR__') && !@include_once __DIR__ . '/../config.inc.php') {
file_exists(__DIR__ . '/../install.php') ? header('Location: ../install.php') : print('Missing Config File');
exit;
}
/** 初始化组件 */
Typecho_Widget::widget('Widget_Init');
\Widget\Init::alloc();
/** 注册一个初始化插件 */
Typecho_Plugin::factory('admin/common.php')->begin();
\Typecho\Plugin::factory('admin/common.php')->begin();
Typecho_Widget::widget('Widget_Options')->to($options);
Typecho_Widget::widget('Widget_User')->to($user);
Typecho_Widget::widget('Widget_Menu')->to($menu);
\Widget\Options::alloc()->to($options);
\Widget\User::alloc()->to($user);
\Widget\Security::alloc()->to($security);
\Widget\Menu::alloc()->to($menu);
/** 初始化上下文 */
$request = $options->request;
@@ -25,32 +28,27 @@ $response = $options->response;
/** 检测是否是第一次登录 */
$currentMenu = $menu->getCurrentMenu();
list($prefixVersion, $suffixVersion) = explode('/', $options->version);
$params = parse_url($currentMenu[2]);
$adminFile = basename($params['path']);
if (!$user->logged && !Typecho_Cookie::get('__typecho_first_run') && !empty($currentMenu)) {
if ('welcome.php' != $adminFile) {
$response->redirect(Typecho_Common::url('welcome.php', $options->adminUrl));
} else {
Typecho_Cookie::set('__typecho_first_run', 1);
}
} else {
if (!empty($currentMenu)) {
$params = parse_url($currentMenu[2]);
$adminFile = basename($params['path']);
/** 检测版本是否升级 */
if ($user->pass('administrator', true) && !empty($currentMenu)) {
$mustUpgrade = (!defined('Typecho_Common::VERSION') || version_compare(str_replace('/', '.', Typecho_Common::VERSION),
str_replace('/', '.', $options->version), '>'));
if (!$user->logged && !\Typecho\Cookie::get('__typecho_first_run')) {
if ('welcome.php' != $adminFile) {
$response->redirect(\Typecho\Common::url('welcome.php', $options->adminUrl));
} else {
\Typecho\Cookie::set('__typecho_first_run', 1);
}
} elseif ($user->pass('administrator', true)) {
/** 检测版本是否升级 */
$mustUpgrade = version_compare(\Typecho\Common::VERSION, $options->version, '>');
if ($mustUpgrade && 'upgrade.php' != $adminFile) {
$response->redirect(Typecho_Common::url('upgrade.php', $options->adminUrl));
} else if (!$mustUpgrade && 'upgrade.php' == $adminFile) {
if ($mustUpgrade && 'upgrade.php' != $adminFile && 'backup.php' != $adminFile) {
$response->redirect(\Typecho\Common::url('upgrade.php', $options->adminUrl));
} elseif (!$mustUpgrade && 'upgrade.php' == $adminFile) {
$response->redirect($options->adminUrl);
} else if (!$mustUpgrade && 'welcome.php' == $adminFile && $user->logged) {
} elseif (!$mustUpgrade && 'welcome.php' == $adminFile && $user->logged) {
$response->redirect($options->adminUrl);
}
}
}

View File

@@ -1,12 +1,13 @@
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
<div class="typecho-foot" role="contentinfo">
<div class="copyright">
<?php _e('由 <a href="http://typecho.org">%s</a> 强力驱动, 版本 %s (%s)', $options->software, $prefixVersion, $suffixVersion); ?>
<a href="http://typecho.org" class="i-logo-s">Typecho</a>
<p><?php _e('由 <a href="http://typecho.org">%s</a> 强力驱动, 版本 %s', $options->software, $options->version); ?></p>
</div>
<nav class="resource">
<a href="http://docs.typecho.org"><?php _e('帮助文档'); ?></a> &bull;
<a href="http://forum.typecho.org"><?php _e('支持论坛'); ?></a> &bull;
<a href="https://github.com/typecho/typecho/issues"><?php _e('报告错误'); ?></a> &bull;
<a href="http://extends.typecho.org"><?php _e('资源下载'); ?></a>
<a href="http://typecho.org/download"><?php _e('资源下载'); ?></a>
</nav>
</div>

View File

@@ -1,563 +1,211 @@
/*
* Bento Grid System
* Source: https://github.com/fenbox/bento
* Version: 1.2.7
* Update: 2013.11.15
*/
.colgroup [class*="col-"] {
float: left;
min-height: 1px;
padding-right: 10px;
padding-left: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
.colgroup [class*="push-"],
.colgroup [class*="pull-"] {
position: relative; }
/*
* Mobile and up
*/
.col-mb-1 {
width: 8.33333%; }
.col-mb-2 {
width: 16.66667%; }
.col-mb-3 {
width: 25%; }
.col-mb-4 {
width: 33.33333%; }
.col-mb-5 {
width: 41.66667%; }
.col-mb-6 {
width: 50%; }
.col-mb-7 {
width: 58.33333%; }
.col-mb-8 {
width: 66.66667%; }
.col-mb-9 {
width: 75%; }
.col-mb-10 {
width: 83.33333%; }
.col-mb-11 {
width: 91.66667%; }
.col-mb-12 {
width: 100%; }
/*
* Tablet and up
*/
@media (min-width: 768px) {
.container {
margin-left: auto;
margin-right: auto;
max-width: 728px; }
.col-tb-1 {
width: 8.33333%; }
.col-tb-2 {
width: 16.66667%; }
.col-tb-3 {
width: 25%; }
.col-tb-4 {
width: 33.33333%; }
.col-tb-5 {
width: 41.66667%; }
.col-tb-6 {
width: 50%; }
.col-tb-7 {
width: 58.33333%; }
.col-tb-8 {
width: 66.66667%; }
.col-tb-9 {
width: 75%; }
.col-tb-10 {
width: 83.33333%; }
.col-tb-11 {
width: 91.66667%; }
.col-tb-12 {
width: 100%; }
.col-tb-offset-0 {
margin-left: 0%; }
.col-tb-offset-1 {
margin-left: 8.33333%; }
.col-tb-offset-2 {
margin-left: 16.66667%; }
.col-tb-offset-3 {
margin-left: 25%; }
.col-tb-offset-4 {
margin-left: 33.33333%; }
.col-tb-offset-5 {
margin-left: 41.66667%; }
.col-tb-offset-6 {
margin-left: 50%; }
.col-tb-offset-7 {
margin-left: 58.33333%; }
.col-tb-offset-8 {
margin-left: 66.66667%; }
.col-tb-offset-9 {
margin-left: 75%; }
.col-tb-offset-10 {
margin-left: 83.33333%; }
.col-tb-offset-11 {
margin-left: 91.66667%; }
.col-tb-offset-12 {
margin-left: 100%; }
.col-tb-pull-0 {
right: 0%; }
.col-tb-pull-1 {
right: 8.33333%; }
.col-tb-pull-2 {
right: 16.66667%; }
.col-tb-pull-3 {
right: 25%; }
.col-tb-pull-4 {
right: 33.33333%; }
.col-tb-pull-5 {
right: 41.66667%; }
.col-tb-pull-6 {
right: 50%; }
.col-tb-pull-7 {
right: 58.33333%; }
.col-tb-pull-8 {
right: 66.66667%; }
.col-tb-pull-9 {
right: 75%; }
.col-tb-pull-10 {
right: 83.33333%; }
.col-tb-pull-11 {
right: 91.66667%; }
.col-tb-pull-12 {
right: 100%; }
.col-tb-push-0 {
left: 0%; }
.col-tb-push-1 {
left: 8.33333%; }
.col-tb-push-2 {
left: 16.66667%; }
.col-tb-push-3 {
left: 25%; }
.col-tb-push-4 {
left: 33.33333%; }
.col-tb-push-5 {
left: 41.66667%; }
.col-tb-push-6 {
left: 50%; }
.col-tb-push-7 {
left: 58.33333%; }
.col-tb-push-8 {
left: 66.66667%; }
.col-tb-push-9 {
left: 75%; }
.col-tb-push-10 {
left: 83.33333%; }
.col-tb-push-11 {
left: 91.66667%; }
.col-tb-push-12 {
left: 100%; }
.colgroup {
margin-right: -10px;
margin-left: -10px; } }
/*
* Desktop and up
*/
@media (min-width: 992px) {
.container {
max-width: 952px; }
.col-1 {
width: 8.33333%; }
.col-2 {
width: 16.66667%; }
.col-3 {
width: 25%; }
.col-4 {
width: 33.33333%; }
.col-5 {
width: 41.66667%; }
.col-6 {
width: 50%; }
.col-7 {
width: 58.33333%; }
.col-8 {
width: 66.66667%; }
.col-9 {
width: 75%; }
.col-10 {
width: 83.33333%; }
.col-11 {
width: 91.66667%; }
.col-12 {
width: 100%; }
.col-offset-0 {
margin-left: 0%; }
.col-offset-1 {
margin-left: 8.33333%; }
.col-offset-2 {
margin-left: 16.66667%; }
.col-offset-3 {
margin-left: 25%; }
.col-offset-4 {
margin-left: 33.33333%; }
.col-offset-5 {
margin-left: 41.66667%; }
.col-offset-6 {
margin-left: 50%; }
.col-offset-7 {
margin-left: 58.33333%; }
.col-offset-8 {
margin-left: 66.66667%; }
.col-offset-9 {
margin-left: 75%; }
.col-offset-10 {
margin-left: 83.33333%; }
.col-offset-11 {
margin-left: 91.66667%; }
.col-offset-12 {
margin-left: 100%; }
.col-pull-0 {
right: 0%; }
.col-pull-1 {
right: 8.33333%; }
.col-pull-2 {
right: 16.66667%; }
.col-pull-3 {
right: 25%; }
.col-pull-4 {
right: 33.33333%; }
.col-pull-5 {
right: 41.66667%; }
.col-pull-6 {
right: 50%; }
.col-pull-7 {
right: 58.33333%; }
.col-pull-8 {
right: 66.66667%; }
.col-pull-9 {
right: 75%; }
.col-pull-10 {
right: 83.33333%; }
.col-pull-11 {
right: 91.66667%; }
.col-pull-12 {
right: 100%; }
.col-push-0 {
left: 0%; }
.col-push-1 {
left: 8.33333%; }
.col-push-2 {
left: 16.66667%; }
.col-push-3 {
left: 25%; }
.col-push-4 {
left: 33.33333%; }
.col-push-5 {
left: 41.66667%; }
.col-push-6 {
left: 50%; }
.col-push-7 {
left: 58.33333%; }
.col-push-8 {
left: 66.66667%; }
.col-push-9 {
left: 75%; }
.col-push-10 {
left: 83.33333%; }
.col-push-11 {
left: 91.66667%; }
.col-push-12 {
left: 100%; } }
/*
* Widescreen and up
*/
@media (min-width: 1200px) {
.container {
max-width: 1160px; }
.col-wd-1 {
width: 8.33333%; }
.col-wd-2 {
width: 16.66667%; }
.col-wd-3 {
width: 25%; }
.col-wd-4 {
width: 33.33333%; }
.col-wd-5 {
width: 41.66667%; }
.col-wd-6 {
width: 50%; }
.col-wd-7 {
width: 58.33333%; }
.col-wd-8 {
width: 66.66667%; }
.col-wd-9 {
width: 75%; }
.col-wd-10 {
width: 83.33333%; }
.col-wd-11 {
width: 91.66667%; }
.col-wd-12 {
width: 100%; }
.col-wd-offset-0 {
margin-left: 0%; }
.col-wd-offset-1 {
margin-left: 8.33333%; }
.col-wd-offset-2 {
margin-left: 16.66667%; }
.col-wd-offset-3 {
margin-left: 25%; }
.col-wd-offset-4 {
margin-left: 33.33333%; }
.col-wd-offset-5 {
margin-left: 41.66667%; }
.col-wd-offset-6 {
margin-left: 50%; }
.col-wd-offset-7 {
margin-left: 58.33333%; }
.col-wd-offset-8 {
margin-left: 66.66667%; }
.col-wd-offset-9 {
margin-left: 75%; }
.col-wd-offset-10 {
margin-left: 83.33333%; }
.col-wd-offset-11 {
margin-left: 91.66667%; }
.col-wd-offset-12 {
margin-left: 100%; }
.col-wd-pull-0 {
right: 0%; }
.col-wd-pull-1 {
right: 8.33333%; }
.col-wd-pull-2 {
right: 16.66667%; }
.col-wd-pull-3 {
right: 25%; }
.col-wd-pull-4 {
right: 33.33333%; }
.col-wd-pull-5 {
right: 41.66667%; }
.col-wd-pull-6 {
right: 50%; }
.col-wd-pull-7 {
right: 58.33333%; }
.col-wd-pull-8 {
right: 66.66667%; }
.col-wd-pull-9 {
right: 75%; }
.col-wd-pull-10 {
right: 83.33333%; }
.col-wd-pull-11 {
right: 91.66667%; }
.col-wd-pull-12 {
right: 100%; }
.col-wd-push-0 {
left: 0%; }
.col-wd-push-1 {
left: 8.33333%; }
.col-wd-push-2 {
left: 16.66667%; }
.col-wd-push-3 {
left: 25%; }
.col-wd-push-4 {
left: 33.33333%; }
.col-wd-push-5 {
left: 41.66667%; }
.col-wd-push-6 {
left: 50%; }
.col-wd-push-7 {
left: 58.33333%; }
.col-wd-push-8 {
left: 66.66667%; }
.col-wd-push-9 {
left: 75%; }
.col-wd-push-10 {
left: 83.33333%; }
.col-wd-push-11 {
left: 91.66667%; }
.col-wd-push-12 {
left: 100%; } }
/*
* Responsive kit
*/
@media (max-width: 767px) {
.kit-hidden-mb {
display: none; } }
@media (max-width: 991px) {
.kit-hidden-tb {
display: none; } }
@media (max-width: 1199px) {
.kit-hidden {
display: none; } }
/*
* Clearfix
*/
.clearfix, .colgroup {
zoom: 1; }
.clearfix:before, .colgroup:before, .clearfix:after, .colgroup:after {
content: " ";
display: table; }
.clearfix:after, .colgroup:after {
clear: both; }
/* Bento Grid System Source: https://github.com/fenbox/bento Version: 1.2.8 Update: 2013.11.25 */
.container, .row [class*="col-"] { box-sizing: border-box; }
.container { margin-left: auto; margin-right: auto; padding-left: 10px; padding-right: 10px; }
.row { margin-right: -10px; margin-left: -10px; }
.row [class*="col-"] { float: left; min-height: 1px; padding-right: 10px; padding-left: 10px; }
.row [class*="-push-"], .row [class*="-pull-"] { position: relative; }
/* Mobile and up */
.col-mb-1 { width: 8.33333%; }
.col-mb-2 { width: 16.66667%; }
.col-mb-3 { width: 25%; }
.col-mb-4 { width: 33.33333%; }
.col-mb-5 { width: 41.66667%; }
.col-mb-6 { width: 50%; }
.col-mb-7 { width: 58.33333%; }
.col-mb-8 { width: 66.66667%; }
.col-mb-9 { width: 75%; }
.col-mb-10 { width: 83.33333%; }
.col-mb-11 { width: 91.66667%; }
.col-mb-12 { width: 100%; }
/* Tablet and up */
@media (min-width: 768px) { .container { max-width: 728px; }
.col-tb-1 { width: 8.33333%; }
.col-tb-2 { width: 16.66667%; }
.col-tb-3 { width: 25%; }
.col-tb-4 { width: 33.33333%; }
.col-tb-5 { width: 41.66667%; }
.col-tb-6 { width: 50%; }
.col-tb-7 { width: 58.33333%; }
.col-tb-8 { width: 66.66667%; }
.col-tb-9 { width: 75%; }
.col-tb-10 { width: 83.33333%; }
.col-tb-11 { width: 91.66667%; }
.col-tb-12 { width: 100%; }
.col-tb-offset-0 { margin-left: 0%; }
.col-tb-offset-1 { margin-left: 8.33333%; }
.col-tb-offset-2 { margin-left: 16.66667%; }
.col-tb-offset-3 { margin-left: 25%; }
.col-tb-offset-4 { margin-left: 33.33333%; }
.col-tb-offset-5 { margin-left: 41.66667%; }
.col-tb-offset-6 { margin-left: 50%; }
.col-tb-offset-7 { margin-left: 58.33333%; }
.col-tb-offset-8 { margin-left: 66.66667%; }
.col-tb-offset-9 { margin-left: 75%; }
.col-tb-offset-10 { margin-left: 83.33333%; }
.col-tb-offset-11 { margin-left: 91.66667%; }
.col-tb-offset-12 { margin-left: 100%; }
.col-tb-pull-0 { right: 0%; }
.col-tb-pull-1 { right: 8.33333%; }
.col-tb-pull-2 { right: 16.66667%; }
.col-tb-pull-3 { right: 25%; }
.col-tb-pull-4 { right: 33.33333%; }
.col-tb-pull-5 { right: 41.66667%; }
.col-tb-pull-6 { right: 50%; }
.col-tb-pull-7 { right: 58.33333%; }
.col-tb-pull-8 { right: 66.66667%; }
.col-tb-pull-9 { right: 75%; }
.col-tb-pull-10 { right: 83.33333%; }
.col-tb-pull-11 { right: 91.66667%; }
.col-tb-pull-12 { right: 100%; }
.col-tb-push-0 { left: 0%; }
.col-tb-push-1 { left: 8.33333%; }
.col-tb-push-2 { left: 16.66667%; }
.col-tb-push-3 { left: 25%; }
.col-tb-push-4 { left: 33.33333%; }
.col-tb-push-5 { left: 41.66667%; }
.col-tb-push-6 { left: 50%; }
.col-tb-push-7 { left: 58.33333%; }
.col-tb-push-8 { left: 66.66667%; }
.col-tb-push-9 { left: 75%; }
.col-tb-push-10 { left: 83.33333%; }
.col-tb-push-11 { left: 91.66667%; }
.col-tb-push-12 { left: 100%; } }
/* Desktop and up */
@media (min-width: 992px) { .container { max-width: 952px; }
.col-1 { width: 8.33333%; }
.col-2 { width: 16.66667%; }
.col-3 { width: 25%; }
.col-4 { width: 33.33333%; }
.col-5 { width: 41.66667%; }
.col-6 { width: 50%; }
.col-7 { width: 58.33333%; }
.col-8 { width: 66.66667%; }
.col-9 { width: 75%; }
.col-10 { width: 83.33333%; }
.col-11 { width: 91.66667%; }
.col-12 { width: 100%; }
.col-offset-0 { margin-left: 0%; }
.col-offset-1 { margin-left: 8.33333%; }
.col-offset-2 { margin-left: 16.66667%; }
.col-offset-3 { margin-left: 25%; }
.col-offset-4 { margin-left: 33.33333%; }
.col-offset-5 { margin-left: 41.66667%; }
.col-offset-6 { margin-left: 50%; }
.col-offset-7 { margin-left: 58.33333%; }
.col-offset-8 { margin-left: 66.66667%; }
.col-offset-9 { margin-left: 75%; }
.col-offset-10 { margin-left: 83.33333%; }
.col-offset-11 { margin-left: 91.66667%; }
.col-offset-12 { margin-left: 100%; }
.col-pull-0 { right: 0%; }
.col-pull-1 { right: 8.33333%; }
.col-pull-2 { right: 16.66667%; }
.col-pull-3 { right: 25%; }
.col-pull-4 { right: 33.33333%; }
.col-pull-5 { right: 41.66667%; }
.col-pull-6 { right: 50%; }
.col-pull-7 { right: 58.33333%; }
.col-pull-8 { right: 66.66667%; }
.col-pull-9 { right: 75%; }
.col-pull-10 { right: 83.33333%; }
.col-pull-11 { right: 91.66667%; }
.col-pull-12 { right: 100%; }
.col-push-0 { left: 0%; }
.col-push-1 { left: 8.33333%; }
.col-push-2 { left: 16.66667%; }
.col-push-3 { left: 25%; }
.col-push-4 { left: 33.33333%; }
.col-push-5 { left: 41.66667%; }
.col-push-6 { left: 50%; }
.col-push-7 { left: 58.33333%; }
.col-push-8 { left: 66.66667%; }
.col-push-9 { left: 75%; }
.col-push-10 { left: 83.33333%; }
.col-push-11 { left: 91.66667%; }
.col-push-12 { left: 100%; } }
/* Widescreen and up */
@media (min-width: 1200px) { .container { max-width: 1160px; }
.col-wd-1 { width: 8.33333%; }
.col-wd-2 { width: 16.66667%; }
.col-wd-3 { width: 25%; }
.col-wd-4 { width: 33.33333%; }
.col-wd-5 { width: 41.66667%; }
.col-wd-6 { width: 50%; }
.col-wd-7 { width: 58.33333%; }
.col-wd-8 { width: 66.66667%; }
.col-wd-9 { width: 75%; }
.col-wd-10 { width: 83.33333%; }
.col-wd-11 { width: 91.66667%; }
.col-wd-12 { width: 100%; }
.col-wd-offset-0 { margin-left: 0%; }
.col-wd-offset-1 { margin-left: 8.33333%; }
.col-wd-offset-2 { margin-left: 16.66667%; }
.col-wd-offset-3 { margin-left: 25%; }
.col-wd-offset-4 { margin-left: 33.33333%; }
.col-wd-offset-5 { margin-left: 41.66667%; }
.col-wd-offset-6 { margin-left: 50%; }
.col-wd-offset-7 { margin-left: 58.33333%; }
.col-wd-offset-8 { margin-left: 66.66667%; }
.col-wd-offset-9 { margin-left: 75%; }
.col-wd-offset-10 { margin-left: 83.33333%; }
.col-wd-offset-11 { margin-left: 91.66667%; }
.col-wd-offset-12 { margin-left: 100%; }
.col-wd-pull-0 { right: 0%; }
.col-wd-pull-1 { right: 8.33333%; }
.col-wd-pull-2 { right: 16.66667%; }
.col-wd-pull-3 { right: 25%; }
.col-wd-pull-4 { right: 33.33333%; }
.col-wd-pull-5 { right: 41.66667%; }
.col-wd-pull-6 { right: 50%; }
.col-wd-pull-7 { right: 58.33333%; }
.col-wd-pull-8 { right: 66.66667%; }
.col-wd-pull-9 { right: 75%; }
.col-wd-pull-10 { right: 83.33333%; }
.col-wd-pull-11 { right: 91.66667%; }
.col-wd-pull-12 { right: 100%; }
.col-wd-push-0 { left: 0%; }
.col-wd-push-1 { left: 8.33333%; }
.col-wd-push-2 { left: 16.66667%; }
.col-wd-push-3 { left: 25%; }
.col-wd-push-4 { left: 33.33333%; }
.col-wd-push-5 { left: 41.66667%; }
.col-wd-push-6 { left: 50%; }
.col-wd-push-7 { left: 58.33333%; }
.col-wd-push-8 { left: 66.66667%; }
.col-wd-push-9 { left: 75%; }
.col-wd-push-10 { left: 83.33333%; }
.col-wd-push-11 { left: 91.66667%; }
.col-wd-push-12 { left: 100%; } }
/* Responsive kit */
@media (max-width: 575px) { .kit-hidden-mb { display: none; } }
@media (max-width: 767px) { .kit-hidden-tb { display: none; } }
@media (max-width: 991px) { .kit-hidden { display: none; } }
/* Clearfix */
.clearfix, .row { zoom: 1; }
.clearfix:before, .row:before, .clearfix:after, .row:after { content: " "; display: table; }
.clearfix:after, .row:after { clear: both; }

24
admin/css/install.css Normal file
View File

@@ -0,0 +1,24 @@
h1 { text-align: center; }
details summary { cursor: pointer; }
@keyframes fadein { from { opacity: 0; }
to { opacity: 1; } }
.fresh .keep-word { display: none; }
.keep .fresh-word { display: none; }
form > .message { display: none; padding: 20px; border-radius: 5px; }
.message textarea { width: 100%; height: 200px; resize: none; margin: 10px 0; }
.message.fade { display: block; animation: fadein .5s linear; }
.message *:last-child { margin-bottom: 0; }
.message p { margin-top: 10px; }
.message p button { margin-left: 5px; }
.message p button:first-child { margin-left: 0; }

View File

@@ -1,406 +1,341 @@
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
/* ==========================================================================
HTML5 display definitions
/* Document
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/**
* Correct `inline-block` display not defined in IE 8/9.
*/
audio,
canvas,
video {
display: inline-block;
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9.
* Hide the `template` element in IE, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove default margin.
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background: transparent;
margin: 0;
}
/**
* Address `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari 5, and Chrome.
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* Address styling not present in IE 8/9, Safari 5, and Chrome.
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: 1px dotted;
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bold;
font-weight: bolder;
}
/**
* Address styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Correct font family set oddly in Safari 5 and Chrome.
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Improve readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre-wrap;
}
/**
* Set consistent quote types.
*/
q {
quotes: "\201C" "\201D" "\2018" "\2019";
}
/**
* Address inconsistent and variable font size in all browsers.
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
bottom: -0.25em;
}
/* ==========================================================================
Embedded content
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9.
* Remove the border on images inside links in IE 10.
*/
img {
border: 0;
border-style: none;
}
/**
* Correct overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
/* Forms
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari 5.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* 1. Correct font family not being inherited in all browsers.
* 2. Correct font size not being inherited in all browsers.
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 2 */
margin: 0; /* 3 */
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
line-height: normal;
input { /* 1 */
overflow: visible;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
* Correct `select` style inheritance in Firefox 4+ and Opera.
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
text-transform: none;
select { /* 1 */
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Remove inner padding and border in Firefox 4+.
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* 1. Remove default vertical scrollbar in IE 8/9.
* 2. Improve readability and alignment in all browsers.
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
overflow: auto;
}
/* ==========================================================================
Tables
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Remove most spacing between table cells.
* Add the correct display in IE 10+.
*/
table {
border-collapse: collapse;
border-spacing: 0;
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,4 @@
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
<script>
$(document).ready(function () {
// 自定义字段
@@ -9,6 +10,7 @@ $(document).ready(function () {
btn.removeClass('i-caret-down').addClass('i-caret-right');
}
$(this).parent().toggleClass('fold');
return false;
});
function attachDeleteEvent (el) {
@@ -17,6 +19,8 @@ $(document).ready(function () {
$(this).parents('tr').fadeOut(function () {
$(this).remove();
});
$(this).parents('form').trigger('field');
}
});
}
@@ -33,9 +37,13 @@ $(document).ready(function () {
+ '<option value="float"><?php _e('小数'); ?></option>'
+ '</select></td>'
+ '<td><textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" class="text-s w-100" rows="2"></textarea></td>'
+ '<td><button type="button" class="btn-xs"><?php _e('删除'); ?></button></td></tr>',
+ '<td><button type="button" class="btn btn-xs"><?php _e('删除'); ?></button></td></tr>',
el = $(html).hide().appendTo('#custom-field table tbody').fadeIn();
$(':input', el).bind('input change', function () {
$(this).parents('form').trigger('field');
});
attachDeleteEvent(el);
});
});

View File

@@ -1,66 +1,82 @@
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php if (!defined('__TYPECHO_ADMIN__')) exit; ?>
<?php
$fields = isset($post) ? $post->getFieldItems() : $page->getFieldItems();
$defaultFields = isset($post) ? $post->getDefaultFieldItems() : $page->getDefaultFieldItems();
?>
<section id="custom-field" class="typecho-post-option<?php if (empty($defaultFields) && empty($fields)): ?> fold<?php endif; ?>">
<label id="custom-field-expand" class="typecho-label"><i class="i-caret-right"></i> <?php _e('自定义字段'); ?></label>
<table class="typecho-list-table mono">
<colgroup>
<col width="25%"/>
<col width="10%"/>
<col width="55%"/>
<col width="10%"/>
</colgroup>
<?php foreach ($defaultFields as $field): ?>
<?php list ($label, $input) = $field; ?>
<tr>
<td><?php $label->render(); ?></td>
<td colspan="3"><?php $input->render(); ?></td>
</tr>
<?php endforeach; ?>
<?php foreach ($fields as $field): ?>
<tr>
<td><input type="text" name="fieldNames[]" value="<?php echo htmlspecialchars($field['name']); ?>" class="text-s w-100"></td>
<td>
<select name="fieldTypes[]" id="">
<option value="str"<?php if ('str' == $field['type']): ?> selected<?php endif; ?>><?php _e('字'); ?></option>
<option value="int"<?php if ('int' == $field['type']): ?> selected<?php endif; ?>><?php _e('整数'); ?></option>
<option value="float"<?php if ('float' == $field['type']): ?> selected<?php endif; ?>><?php _e('小数'); ?></option>
</select>
</td>
<td><textarea name="fieldValues[]" class="text-s w-100" rows="2"><?php echo htmlspecialchars($field[$field['type'] . '_value']); ?></textarea></td>
<td>
<button type="button" class="btn-xs"><?php _e('删除'); ?></button>
</td>
</tr>
<?php endforeach; ?>
<?php if (empty($defaultFields) && empty($fields)): ?>
<tr>
<td>
<label for="title" class="visuallyhidden"><?php _e('字段名称'); ?></label>
<input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" class="text-s w-100">
</td>
<td>
<label for="title" class="visuallyhidden"><?php _e('字段类型'); ?></label>
<select name="fieldTypes[]" id="">
<option value="str"><?php _e('字符'); ?></option>
<option value="int"><?php _e('整数'); ?></option>
<option value="float"><?php _e('小数'); ?></option>
</select>
</td>
<td>
<label for="title" class="visuallyhidden"><?php _e('字段值'); ?></label>
<textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" class="text-s w-100" rows="2"></textarea>
</td>
<td>
<button type="button" class="btn-xs"><?php _e('删除'); ?></button>
</td>
</tr>
<?php endif; ?>
</table>
<div class="description clearfix">
<button type="button" class="btn-xs operate-add"><?php _e('+添加字段'); ?></button>
<?php _e('自定义字段可以扩展你的模板功能, 使用方法参见 <a href="">帮助文档</a>'); ?>
</div>
</section>
<section id="custom-field"
class="typecho-post-option<?php if (empty($defaultFields) && empty($fields)): ?> fold<?php endif; ?>">
<label id="custom-field-expand" class="typecho-label"><a href="##"><i
class="i-caret-right"></i> <?php _e('自定义字段'); ?></a></label>
<table class="typecho-list-table mono">
<colgroup>
<col width="25%"/>
<col width="10%"/>
<col width="55%"/>
<col width="10%"/>
</colgroup>
<?php foreach ($defaultFields as $field): ?>
<?php [$label, $input] = $field; ?>
<tr>
<td><?php $label->render(); ?></td>
<td colspan="3"><?php $input->render(); ?></td>
</tr>
<?php endforeach; ?>
<?php foreach ($fields as $field): ?>
<tr>
<td>
<label for="fieldname" class="sr-only"><?php _e('字段名称'); ?></label>
<input type="text" name="fieldNames[]" value="<?php echo htmlspecialchars($field['name']); ?>"
id="fieldname" class="text-s w-100">
</td>
<td>
<label for="fieldtype" class="sr-only"><?php _e('字段类型'); ?></label>
<select name="fieldTypes[]" id="fieldtype">
<option
value="str"<?php if ('str' == $field['type']): ?> selected<?php endif; ?>><?php _e('字符'); ?></option>
<option
value="int"<?php if ('int' == $field['type']): ?> selected<?php endif; ?>><?php _e('整数'); ?></option>
<option
value="float"<?php if ('float' == $field['type']): ?> selected<?php endif; ?>><?php _e('小数'); ?></option>
</select>
</td>
<td>
<label for="fieldvalue" class="sr-only"><?php _e('字段值'); ?></label>
<textarea name="fieldValues[]" id="fieldvalue" class="text-s w-100"
rows="2"><?php echo htmlspecialchars($field[$field['type'] . '_value']); ?></textarea>
</td>
<td>
<button type="button" class="btn btn-xs"><?php _e('删除'); ?></button>
</td>
</tr>
<?php endforeach; ?>
<?php if (empty($defaultFields) && empty($fields)): ?>
<tr>
<td>
<label for="fieldname" class="sr-only"><?php _e('字段名称'); ?></label>
<input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" id="fieldname"
class="text-s w-100">
</td>
<td>
<label for="fieldtype" class="sr-only"><?php _e('字段类型'); ?></label>
<select name="fieldTypes[]" id="fieldtype">
<option value="str"><?php _e('字符'); ?></option>
<option value="int"><?php _e('整数'); ?></option>
<option value="float"><?php _e('小数'); ?></option>
</select>
</td>
<td>
<label for="fieldvalue" class="sr-only"><?php _e('字段值'); ?></label>
<textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" id="fieldvalue"
class="text-s w-100" rows="2"></textarea>
</td>
<td>
<button type="button" class="btn btn-xs"><?php _e('删除'); ?></button>
</td>
</tr>
<?php endif; ?>
</table>
<div class="description clearfix">
<button type="button" class="btn btn-xs operate-add"><?php _e('+添加字段'); ?></button>
<?php _e('自定义字段可以扩展你的模板功能, 使用方法参见 <a href="http://docs.typecho.org/help/custom-fields">帮助文档</a>'); ?>
</div>
</section>

View File

@@ -1,15 +1,17 @@
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $content = !empty($post) ? $post : $page; if ($options->markdown && (!$content->have() || $content->isMarkdown)): ?>
<script src="<?php $options->adminUrl('js/pagedown.js?v=' . $suffixVersion); ?>"></script>
<script src="<?php $options->adminUrl('js/pagedown-extra.js?v=' . $suffixVersion); ?>"></script>
<script src="<?php $options->adminUrl('js/diff.js?v=' . $suffixVersion); ?>"></script>
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
<?php $content = !empty($post) ? $post : $page; if ($options->markdown): ?>
<script src="<?php $options->adminStaticUrl('js', 'hyperdown.js'); ?>"></script>
<script src="<?php $options->adminStaticUrl('js', 'pagedown.js'); ?>"></script>
<script src="<?php $options->adminStaticUrl('js', 'paste.js'); ?>"></script>
<script src="<?php $options->adminStaticUrl('js', 'purify.js'); ?>"></script>
<script>
$(document).ready(function () {
var textarea = $('#text'),
toolbar = $('<div class="editor" id="wmd-button-bar" />').insertBefore(textarea.parent())
isFullScreen = false,
toolbar = $('<div class="editor" id="wmd-button-bar" />').insertBefore(textarea.parent()),
preview = $('<div id="wmd-preview" class="wmd-hidetab" />').insertAfter('.editor');
var options = {};
var options = {}, isMarkdown = <?php echo intval($content->isMarkdown || !$content->have()); ?>;
options.strings = {
bold: '<?php _e('加粗'); ?> <strong> Ctrl+B',
@@ -48,7 +50,7 @@ $(document).ready(function () {
exitFullscreen: '<?php _e('退出全屏'); ?> - Ctrl+E',
fullscreenUnsupport: '<?php _e('此浏览器不支持全屏操作'); ?>',
imagedialog: '<p><b><?php _e('插入图片'); ?></b></p><p><?php _e('请在下方的输入框内输入要插入的远程图片地址'); ?></p><p><?php _e('您也可以使用编辑器下方的文件上传功能插入本地图片'); ?></p>',
imagedialog: '<p><b><?php _e('插入图片'); ?></b></p><p><?php _e('请在下方的输入框内输入要插入的远程图片地址'); ?></p><p><?php _e('您也可以使用附件功能插入上传的本地图片'); ?></p>',
linkdialog: '<p><b><?php _e('插入链接'); ?></b></p><p><?php _e('请在下方的输入框内输入要插入的链接地址'); ?></p>',
ok: '<?php _e('确定'); ?>',
@@ -57,31 +59,18 @@ $(document).ready(function () {
help: '<?php _e('Markdown语法帮助'); ?>'
};
var converter = new Markdown.Converter(),
editor = new Markdown.Editor(converter, '', options),
diffMatch = new diff_match_patch(), last = '', preview = $('#wmd-preview'),
mark = '@mark' + Math.ceil(Math.random() * 100000000) + '@',
span = '<span class="diff" />';
// 设置markdown
Markdown.Extra.init(converter, {
extensions : 'all'
});
var converter = new HyperDown(),
editor = new Markdown.Editor(converter, '', options);
// 自动跟随
converter.hooks.chain('postConversion', function (html) {
// clear special html tags
html = html.replace(/<\/?(\!doctype|html|head|body|link|title|input|select|button|textarea|style|noscript)[^>]*>/ig, function (all) {
return all.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/'/g, '&#039;')
.replace(/"/g, '&quot;');
});
// clear hard breaks
html = html.replace(/\s*((?:<br>\n)+)\s*(<\/?(?:p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|li|dd|dt)[^\w])/gm, '$2');
converter.enableHtml(true);
converter.enableLine(true);
reloadScroll = scrollableEditor(textarea, preview);
// 修正白名单
converter.hook('makeHtml', function (html) {
html = html.replace('<p><!--more--></p>', '<!--more-->');
if (html.indexOf('<!--more-->') > 0) {
var parts = html.split(/\s*<\!\-\-more\-\->\s*/),
summary = parts.shift(),
@@ -91,82 +80,50 @@ $(document).ready(function () {
+ '<div class="details">' + details + '</div>';
}
var diffs = diffMatch.diff_main(last, html);
last = html;
if (diffs.length > 0) {
var stack = [], markStr = mark;
for (var i = 0; i < diffs.length; i ++) {
var diff = diffs[i], op = diff[0], str = diff[1]
sp = str.lastIndexOf('<'), ep = str.lastIndexOf('>');
if (op != 0) {
if (sp >=0 && sp > ep) {
if (op > 0) {
stack.push(str.substring(0, sp) + markStr + str.substring(sp));
} else {
var lastStr = stack[stack.length - 1], lastSp = lastStr.lastIndexOf('<');
stack[stack.length - 1] = lastStr.substring(0, lastSp) + markStr + lastStr.substring(lastSp);
}
} else {
if (op > 0) {
stack.push(str + markStr);
} else {
stack.push(markStr);
}
}
markStr = '';
} else {
stack.push(str);
}
// 替换block
html = html.replace(/<(iframe|embed)\s+([^>]*)>/ig, function (all, tag, src) {
if (src[src.length - 1] == '/') {
src = src.substring(0, src.length - 1);
}
html = stack.join('');
return '<div class="embed"><strong>'
+ tag + '</strong> : ' + $.trim(src) + '</div>';
});
if (!markStr) {
var pos = html.indexOf(mark), prev = html.substring(0, pos),
next = html.substr(pos + mark.length),
sp = prev.lastIndexOf('<'), ep = prev.lastIndexOf('>');
if (sp >= 0 && sp > ep) {
html = prev.substring(0, sp) + span + prev.substring(sp) + next;
} else {
html = prev + span + next;
}
}
}
return html;
return DOMPurify.sanitize(html, {USE_PROFILES: {html: true}});
});
editor.hooks.chain('onPreviewRefresh', function () {
var diff = $('.diff', preview), scrolled = false;
var images = $('img', preview), count = images.length;
$('img', preview).load(function () {
if (scrolled) {
preview.scrollTo(diff, {
offset : - 50
});
}
});
if (count == 0) {
reloadScroll(true);
} else {
images.bind('load error', function () {
count --;
if (diff.length > 0) {
var p = diff.position(), lh = diff.parent().css('line-height');
lh = !!lh ? parseInt(lh) : 0;
if (p.top < 0 || p.top > preview.height() - lh) {
preview.scrollTo(diff, {
offset : - 50
});
scrolled = true;
}
if (count == 0) {
reloadScroll(true);
}
});
}
});
var input = $('#text'), th = textarea.height(), ph = preview.height();
<?php \Typecho\Plugin::factory('admin/editor-js.php')->markdownEditor($content); ?>
var th = textarea.height(), ph = preview.height(),
uploadBtn = $('<button type="button" id="btn-fullscreen-upload" class="btn btn-link">'
+ '<i class="i-upload"><?php _e('附件'); ?></i></button>')
.prependTo('.submit .right')
.click(function() {
$('a', $('.typecho-option-tabs li').not('.active')).trigger('click');
return false;
});
$('.typecho-option-tabs li').click(function () {
uploadBtn.find('i').toggleClass('i-upload-active',
$('#tab-files-btn', this).length > 0);
});
editor.hooks.chain('enterFakeFullScreen', function () {
th = textarea.height();
@@ -176,6 +133,7 @@ $(document).ready(function () {
textarea.css('height', h);
preview.css('height', h);
isFullScreen = true;
});
editor.hooks.chain('enterFullScreen', function () {
@@ -184,59 +142,100 @@ $(document).ready(function () {
var h = window.screen.height - toolbar.outerHeight();
textarea.css('height', h);
preview.css('height', h);
isFullScreen = true;
});
editor.hooks.chain('exitFullScreen', function () {
$(document.body).removeClass('fullscreen');
textarea.height(th);
preview.height(ph);
isFullScreen = false;
});
editor.run();
editor.hooks.chain('commandExecuted', function () {
textarea.trigger('input');
});
var imageButton = $('#wmd-image-button'),
linkButton = $('#wmd-link-button');
function initMarkdown() {
editor.run();
Typecho.insertFileToEditor = function (file, url, isImage) {
var button = isImage ? imageButton : linkButton;
var imageButton = $('#wmd-image-button'),
linkButton = $('#wmd-link-button');
options.strings[isImage ? 'imagename' : 'linkname'] = file;
button.trigger('click');
Typecho.insertFileToEditor = function (file, url, isImage) {
var button = isImage ? imageButton : linkButton;
var checkDialog = setInterval(function () {
if ($('.wmd-prompt-dialog').length > 0) {
$('.wmd-prompt-dialog input').val(url).select();
clearInterval(checkDialog);
checkDialog = null;
}
}, 10);
};
options.strings[isImage ? 'imagename' : 'linkname'] = file;
button.trigger('click');
var checkDialog = setInterval(function () {
if ($('.wmd-prompt-dialog').length > 0) {
$('.wmd-prompt-dialog input').val(url).select();
clearInterval(checkDialog);
checkDialog = null;
}
}, 10);
};
// 编辑预览切换
var edittab = $('.editor').prepend('<div class="wmd-edittab"><a href="#wmd-editarea" class="active">撰写</a><a href="#wmd-preview">预览</a></div>'),
editarea = $(textarea.parent()).attr("id", "wmd-editarea");
Typecho.uploadComplete = function (file) {
Typecho.insertFileToEditor(file.title, file.url, file.isImage);
};
$(".wmd-edittab a").click(function() {
$(".wmd-edittab a").removeClass('active');
$(this).addClass("active");
$("#wmd-editarea, #wmd-preview").addClass("wmd-hidetab");
// 编辑预览切换
var edittab = $('.editor').prepend('<div class="wmd-edittab"><a href="#wmd-editarea" class="active"><?php _e('撰写'); ?></a><a href="#wmd-preview"><?php _e('预览'); ?></a></div>'),
editarea = $(textarea.parent()).attr("id", "wmd-editarea");
$(".wmd-edittab a").click(function() {
$(".wmd-edittab a").removeClass('active');
$(this).addClass("active");
$("#wmd-editarea, #wmd-preview").addClass("wmd-hidetab");
var selected_tab = $(this).attr("href"),
selected_el = $(selected_tab).removeClass("wmd-hidetab");
var selected_tab = $(this).attr("href"),
selected_el = $(selected_tab).removeClass("wmd-hidetab");
// 预览时隐藏编辑器按钮
if (selected_tab == "#wmd-preview") {
$("#wmd-button-row").addClass("wmd-visualhide");
} else {
$("#wmd-button-row").removeClass("wmd-visualhide");
}
// 预览时隐藏编辑器按钮
if (selected_tab == "#wmd-preview") {
$("#wmd-button-row").addClass("wmd-visualhide");
} else {
$("#wmd-button-row").removeClass("wmd-visualhide");
}
// 预览和编辑窗口高度一致
$("#wmd-preview").outerHeight($("#wmd-editarea").innerHeight());
// 预览和编辑窗口高度一致
$("#wmd-preview").outerHeight($("#wmd-editarea").innerHeight());
return false;
});
return false;
});
// 剪贴板复制图片
textarea.pastableTextarea().on('pasteImage', function (e, data) {
var name = data.name ? data.name.replace(/[\(\)\[\]\*#!]/g, '') : (new Date()).toISOString().replace(/\..+$/, '');
if (!name.match(/\.[a-z0-9]{2,}$/i)) {
var ext = data.blob.type.split('/').pop();
name += '.' + ext;
}
Typecho.uploadFile(new File([data.blob], name), name);
});
}
if (isMarkdown) {
initMarkdown();
} else {
var notice = $('<div class="message notice"><?php _e('这篇文章不是由Markdown语法创建的, 继续使用Markdown编辑它吗?'); ?> '
+ '<button class="btn btn-xs primary yes"><?php _e('是'); ?></button> '
+ '<button class="btn btn-xs no"><?php _e('否'); ?></button></div>')
.hide().insertBefore(textarea).slideDown();
$('.yes', notice).click(function () {
notice.remove();
$('<input type="hidden" name="markdown" value="1" />').appendTo('.submit');
initMarkdown();
});
$('.no', notice).click(function () {
notice.remove();
});
}
});
</script>
<?php endif; ?>

View File

@@ -1,11 +1,14 @@
<?php
include 'common.php';
$panel = $request->get('panel');
$panelTable = unserialize($options->panelTable);
if (!isset($panelTable['file']) || !in_array(urlencode($panel), $panelTable['file'])) {
throw new Typecho_Plugin_Exception(_t('页面不存在'), 404);
throw new \Typecho\Plugin\Exception(_t('页面不存在'), 404);
}
require_once $panel;
[$pluginName, $file] = explode('/', trim($panel, '/'), 2);
require_once $options->pluginDir($pluginName) . '/' . $file;

View File

@@ -1,36 +1,26 @@
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
<?php
if (isset($post) && $post instanceof Typecho_Widget && $post->have()) {
if (isset($post) && $post instanceof \Typecho\Widget && $post->have()) {
$fileParentContent = $post;
} else if (isset($page) && $page instanceof Typecho_Widget && $page->have()) {
} elseif (isset($page) && $page instanceof \Typecho\Widget && $page->have()) {
$fileParentContent = $page;
}
$phpMaxFilesize = function_exists('ini_get') ? trim(ini_get('upload_max_filesize')) : 0;
if (preg_match("/^([0-9]+)([a-z]{1,2})$/i", $phpMaxFilesize, $matches)) {
$phpMaxFilesize = strtolower($matches[1] . $matches[2] . (1 == strlen($matches[2]) ? 'b' : ''));
}
?>
<script src="<?php $options->adminUrl('js/filedrop.js?v=' . $suffixVersion); ?>"></script>
<script src="<?php $options->adminStaticUrl('js', 'moxie.js'); ?>"></script>
<script src="<?php $options->adminStaticUrl('js', 'plupload.js'); ?>"></script>
<script>
$(document).ready(function() {
var errorWord = '<?php $val = function_exists('ini_get') ? trim(ini_get('upload_max_filesize')) : 0;
$last = strtolower($val[strlen($val)-1]);
switch($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
$val = number_format(ceil($val / (1024 *1024)));
_e('文件上传失败, 请确认文件尺寸没有超过 %s 并且服务器文件目录可以写入', "{$val}Mb"); ?>',
loading = $('<img src="<?php $options->adminUrl('img/ajax-loader.gif'); ?>" style="display:none" />')
.appendTo(document.body);
function updateAttacmentNumber () {
var btn = $('#tab-files-btn'),
balloon = $('.balloon', btn),
count = $('#file-list li').length;
count = $('#file-list li .insert').length;
if (count > 0) {
if (!balloon.length) {
@@ -44,13 +34,72 @@ $(document).ready(function() {
}
}
$('.upload-area').bind({
dragenter : function () {
$(this).parent().addClass('drag');
},
dragover : function (e) {
$(this).parent().addClass('drag');
},
drop : function () {
$(this).parent().removeClass('drag');
},
dragend : function () {
$(this).parent().removeClass('drag');
},
dragleave : function () {
$(this).parent().removeClass('drag');
}
});
updateAttacmentNumber();
function fileUploadStart (file, id) {
$('<li id="' + id + '" class="loading">'
+ file + '</li>').prependTo('#file-list');
function fileUploadStart (file) {
$('<li id="' + file.id + '" class="loading">'
+ file.name + '</li>').appendTo('#file-list');
}
function fileUploadError (error) {
var file = error.file, code = error.code, word;
switch (code) {
case plupload.FILE_SIZE_ERROR:
word = '<?php _e('文件大小超过限制'); ?>';
break;
case plupload.FILE_EXTENSION_ERROR:
word = '<?php _e('文件扩展名不被支持'); ?>';
break;
case plupload.FILE_DUPLICATE_ERROR:
word = '<?php _e('文件已经上传过'); ?>';
break;
case plupload.HTTP_ERROR:
default:
word = '<?php _e('上传出现错误'); ?>';
break;
}
var fileError = '<?php _e('%s 上传失败'); ?>'.replace('%s', file.name),
li, exist = $('#' + file.id);
if (exist.length > 0) {
li = exist.removeClass('loading').html(fileError);
} else {
li = $('<li>' + fileError + '<br />' + word + '</li>').appendTo('#file-list');
}
li.effect('highlight', {color : '#FBC2C4'}, 2000, function () {
$(this).remove();
});
// fix issue #341
this.removeFile(file);
}
var completeFile = null;
function fileUploadComplete (id, url, data) {
var li = $('#' + id).removeClass('loading').data('cid', data.cid)
.data('url', data.url)
@@ -65,123 +114,85 @@ $(document).ready(function() {
attachInsertEvent(li);
attachDeleteEvent(li);
updateAttacmentNumber();
if (!completeFile) {
completeFile = data;
}
}
$('#tab-files').bind('init', function () {
$('.upload-file').fileUpload({
url : '<?php $options->index('/action/upload'
var uploader = null, tabFilesEl = $('#tab-files').bind('init', function () {
uploader = new plupload.Uploader({
browse_button : $('.upload-file').get(0),
url : '<?php $security->index('/action/upload'
. (isset($fileParentContent) ? '?cid=' . $fileParentContent->cid : '')); ?>',
types : <?php
$attachmenttypes = $options->allowedattachmenttypes;
$attachmenttypescount = count($attachmenttypes);
$types = array();
for ($i = 0; $i < $attachmenttypescount; $i ++) {
$types[] = '.' . $attachmenttypes[$i];
}
echo json_encode($types);
?>,
typesError : '<?php _e('文件 %s 的类型不被支持'); ?>',
onUpload : fileUploadStart,
onError : function (id) {
$('#' + id).remove();
alert(errorWord);
runtimes : 'html5,flash,html4',
flash_swf_url : '<?php $options->adminStaticUrl('js', 'Moxie.swf'); ?>',
drop_element : $('.upload-area').get(0),
filters : {
max_file_size : '<?php echo $phpMaxFilesize ?>',
mime_types : [{'title' : '<?php _e('允许上传的文件'); ?>', 'extensions' : '<?php echo implode(',', $options->allowedAttachmentTypes); ?>'}],
prevent_duplicates : true
},
onComplete : fileUploadComplete
});
});
$('#upload-panel').filedrop({
url : '<?php $options->index('/action/upload'
. (isset($fileParentContent) ? '?cid=' . $fileParentContent->cid : '')); ?>',
allowedfileextensions : <?php
$attachmenttypes = $options->allowedattachmenttypes;
$attachmenttypescount = count($attachmenttypes);
$types = array();
init : {
FilesAdded : function (up, files) {
for (var i = 0; i < files.length; i ++) {
fileUploadStart(files[i]);
}
for ($i = 0; $i < $attachmenttypescount; $i ++) {
$types[] = '.' . $attachmenttypes[$i];
}
completeFile = null;
uploader.start();
},
echo json_encode($types);
?>,
UploadComplete : function () {
if (completeFile) {
Typecho.uploadComplete(completeFile);
}
},
maxfilesize : <?php
$val = function_exists('ini_get') ? trim(ini_get('upload_max_filesize')) : 0;
$last = strtolower($val[strlen($val)-1]);
switch($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
FileUploaded : function (up, file, result) {
if (200 == result.status) {
var data = $.parseJSON(result.response);
echo ceil($val / (1024 * 1024));
?>,
if (data) {
fileUploadComplete(file.id, data[0], data[1]);
uploader.removeFile(file);
return;
}
}
queuefiles : 5,
fileUploadError.call(uploader, {
code : plupload.HTTP_ERROR,
file : file
});
},
error: function(err, file) {
switch(err) {
case 'BrowserNotSupported':
alert('<?php _e('浏览器不支持拖拽上传'); ?>');
break;
case 'TooManyFiles':
alert('<?php _e('一次上传的文件不能多于%d个', 25); ?>');
break;
case 'FileTooLarge':
alert('<?php $val = function_exists('ini_get') ? trim(ini_get('upload_max_filesize')) : 0;
$last = strtolower($val[strlen($val)-1]);
switch($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
$val = number_format(ceil($val / (1024 *1024)));
_e('文件尺寸不能超过 %s', "{$val}Mb"); ?>');
break;
case 'FileTypeNotAllowed':
// The file type is not in the specified list 'allowedfiletypes'
break;
case 'FileExtensionNotAllowed':
alert('<?php _e('文件 %s 的类型不被支持'); ?>'.replace('%s', file.name));
break;
default:
break;
Error : function (up, error) {
fileUploadError.call(uploader, error);
}
}
},
dragOver : function () {
$(this).addClass('drag');
},
});
dragLeave : function () {
$(this).removeClass('drag');
},
drop : function () {
$(this).removeClass('drag');
},
uploadStarted : function (i, file, len) {
fileUploadStart(file.name, 'drag-' + i);
},
uploadFinished : function (i, file, response) {
fileUploadComplete('drag-' + i, response[0], response[1]);
}
uploader.init();
});
Typecho.uploadFile = function (file, name) {
if (!uploader) {
$('#tab-files-btn').parent().trigger('click');
}
var timer = setInterval(function () {
if (!uploader) {
return;
}
clearInterval(timer);
timer = null;
uploader.addFile(file, name);
}, 50);
};
function attachInsertEvent (el) {
$('.insert', el).click(function () {
var t = $(this), p = t.parents('li');
@@ -195,7 +206,7 @@ $(document).ready(function() {
$('.delete', el).click(function () {
if (confirm('<?php _e('确认要删除文件 %s 吗?'); ?>'.replace('%s', file))) {
var cid = $(this).parents('li').data('cid');
$.post('<?php $options->index('/action/contents-attachment-edit'); ?>',
$.post('<?php $security->index('/action/contents-attachment-edit'); ?>',
{'do' : 'delete', 'cid' : cid},
function () {
$(el).fadeOut(function () {

View File

@@ -1,19 +1,19 @@
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
<?php
if (isset($post) || isset($page)) {
$cid = isset($post) ? $post->cid : $page->cid;
if ($cid) {
Typecho_Widget::widget('Widget_Contents_Attachment_Related', 'parentId=' . $cid)->to($attachment);
\Widget\Contents\Attachment\Related::alloc(['parentId' => $cid])->to($attachment);
} else {
Typecho_Widget::widget('Widget_Contents_Attachment_Unattached')->to($attachment);
\Widget\Contents\Attachment\Unattached::alloc()->to($attachment);
}
}
?>
<div id="upload-panel" class="p">
<div class="upload-area"><?php _e('拖放文件到这里<br>或者 %s选择文件上传%s', '<a href="###" class="upload-file">', '</a>'); ?></div>
<div class="upload-area" draggable="true"><?php _e('拖放文件到这里<br>或者 %s选择文件上传%s', '<a href="###" class="upload-file">', '</a>'); ?></div>
<ul id="file-list">
<?php while ($attachment->next()): ?>
<li data-cid="<?php $attachment->cid(); ?>" data-url="<?php echo $attachment->attachment->url; ?>" data-image="<?php echo $attachment->attachment->isImage ? 1 : 0; ?>"><input type="hidden" name="attachment[]" value="<?php $attachment->cid(); ?>" />

View File

@@ -1,6 +1,6 @@
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
</body>
</html>
<?php
/** 注册一个初始化插件 */
Typecho_Plugin::factory('admin/footer.php')->end();
/** 注册一个结束插件 */
\Typecho\Plugin::factory('admin/footer.php')->end();

View File

@@ -1,11 +1,11 @@
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
<script>
(function () {
$(document).ready(function () {
var error = $('.typecho-option .error:first');
if (error.length > 0) {
$('html,body').scrollTop(error.offset().top);
$('html,body').scrollTop(error.parents('.typecho-option').offset().top);
}
$('form').submit(function () {

View File

@@ -1,31 +1,23 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) {
if (!defined('__TYPECHO_ADMIN__')) {
exit;
}
$header = '<link rel="stylesheet" href="' . Typecho_Common::url('css/normalize.css?v=' . $suffixVersion, $options->adminUrl) . '">
<link rel="stylesheet" href="' . Typecho_Common::url('css/grid.css?v=' . $suffixVersion, $options->adminUrl) . '">
<link rel="stylesheet" href="' . Typecho_Common::url('css/style.css?v=' . $suffixVersion, $options->adminUrl) . '">
<!--[if lt IE 9]>
<script src="' . Typecho_Common::url('js/html5shiv.js?v=' . $suffixVersion, $options->adminUrl) . '"></script>
<script src="' . Typecho_Common::url('js/respond.js?v=' . $suffixVersion, $options->adminUrl) . '"></script>
<![endif]-->';
$header = '<link rel="stylesheet" href="' . $options->adminStaticUrl('css', 'normalize.css', true) . '">
<link rel="stylesheet" href="' . $options->adminStaticUrl('css', 'grid.css', true) . '">
<link rel="stylesheet" href="' . $options->adminStaticUrl('css', 'style.css', true) . '">';
/** 注册一个初始化插件 */
$header = Typecho_Plugin::factory('admin/header.php')->header($header);
$header = \Typecho\Plugin::factory('admin/header.php')->header($header);
?><!DOCTYPE HTML>
<html class="no-js">
<html>
<head>
<meta charset="<?php $options->charset(); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title><?php _e('%s - %s - Powered by Typecho', $menu->title, $options->title); ?></title>
<meta name="robots" content="noindex, nofollow">
<?php echo $header; ?>
</head>
<body<?php if (isset($bodyClass)) {echo ' class="' . $bodyClass . '"';} ?>>
<!--[if lt IE 9]>
<div class="message error browsehappy"><?php _e('您正在使用 <strong>旧版本</strong> 的浏览器. 为了更好的访问本页面, 请 <a href="http://browsehappy.com/">升级你的浏览器</a>'); ?>.</div>
<![endif]-->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

BIN
admin/img/editor@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 941 B

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

BIN
admin/img/icons@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="110px" height="26px" viewBox="0 0 110 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<title>typecho-logo</title>
<description>Created with Sketch (http://www.bohemiancoding.com/sketch)</description>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<path d="M34.75,5.288 C34.288,6.542 33.76,7.73 32.22,7.862 L32,9.468 L33.562,9.468 L33.562,15.342 C33.562,16.882 33.54,18.994 36.972,18.994 C38.006,18.994 39.106,18.686 39.766,18.224 L39.106,16.53 C38.754,16.75 38.204,16.992 37.61,16.992 C36.708,16.992 36.18,16.596 36.18,15.254 L36.18,9.468 L38.886,9.468 L39.106,7.62 L36.18,7.62 L36.18,5.288 L34.75,5.288 Z M48.258,18.268 C48.258,20.27 47.444,21.502 45.42,21.502 C44.76,21.502 44.276,21.436 43.858,21.282 C43.462,21.128 43.352,20.908 43.352,20.49 L43.352,19.434 L41.262,19.61 L41.262,22.668 C42.186,23.13 44.012,23.394 45.398,23.394 C48.676,23.394 50.502,21.898 50.502,18.268 L50.502,7.62 L46.63,7.62 L46.63,9.424 L47.334,9.468 C47.752,9.468 47.884,9.644 47.884,10.128 L47.884,14.11 C47.884,15.254 47.07,16.288 45.53,16.288 C44.122,16.288 43.902,15.276 43.902,13.934 L43.902,7.62 L40.03,7.62 L40.03,9.424 L40.734,9.468 C41.108,9.49 41.284,9.622 41.284,10.084 L41.284,14.506 C41.284,17.102 42.494,18.312 44.694,18.312 C46.146,18.312 47.488,17.696 48.258,16.596 L48.258,18.268 Z M54,20.776 C54,21.326 53.78,21.458 53.362,21.502 L52.636,21.568 L52.636,23.24 L58.312,23.24 L58.312,21.502 L56.53,21.414 L56.53,18.378 C57.102,18.73 58.026,19.016 58.884,19.016 C61.788,19.016 63.702,16.926 63.702,12.878 C63.702,8.94 62.162,7.29 59.72,7.29 C57.85,7.29 56.64,8.302 56.244,9.05 L56.244,7.62 L52.526,7.62 L52.526,9.402 L53.45,9.468 C53.868,9.468 54,9.644 54,10.128 L54,20.776 Z M60.974,13.098 C60.974,15.012 60.336,16.926 58.466,16.926 C57.894,16.926 57.102,16.75 56.53,16.376 L56.53,11.316 C56.53,10.304 57.498,9.424 58.752,9.424 C59.918,9.424 60.974,10.172 60.974,13.098 Z M70.786,7.29 C67.178,7.29 65.352,10.15 65.352,13.406 C65.352,16.684 66.804,18.972 70.544,18.972 C72.612,18.972 74.064,18.048 74.416,17.74 L73.58,15.958 C73.052,16.332 72.106,16.926 70.808,16.926 C68.938,16.926 68.19,15.76 68.102,14.33 C70.698,14.308 74.372,13.736 74.372,10.348 C74.372,8.39 72.942,7.29 70.786,7.29 Z M71.952,10.392 C71.952,12.086 69.642,12.46 68.014,12.482 C68.08,10.854 68.872,9.16 70.632,9.16 C71.424,9.16 71.952,9.578 71.952,10.392 Z M81.192,16.97 C79.234,16.97 78.354,15.43 78.354,13.032 C78.354,10.59 79.256,9.27 81.016,9.27 C81.346,9.27 81.61,9.314 81.874,9.402 C82.27,9.534 82.336,9.732 82.336,10.15 L82.336,11.206 L84.36,11.052 L84.36,8.192 C83.304,7.62 82.248,7.29 80.928,7.29 C78.442,7.29 75.692,8.83 75.692,13.296 C75.692,16.948 77.606,18.994 80.84,18.994 C82.468,18.994 83.81,18.422 84.668,17.718 L83.722,16.024 C82.82,16.684 82.05,16.97 81.192,16.97 Z M87.286,16.222 C87.286,16.772 87.066,16.904 86.648,16.948 L85.922,17.014 L85.922,18.686 L91.158,18.686 L91.158,16.926 L89.904,16.86 L89.904,11.536 C89.904,10.392 90.718,9.314 92.258,9.314 C93.666,9.314 93.974,10.348 93.974,11.69 L93.974,16.222 C93.974,16.772 93.754,16.904 93.336,16.948 L92.61,17.014 L92.61,18.686 L97.846,18.686 L97.846,16.926 L96.592,16.86 L96.592,11.118 C96.592,8.522 95.294,7.29 93.094,7.29 C91.642,7.29 90.542,7.972 89.882,8.918 L89.882,3 L85.966,3 L85.966,4.826 L86.736,4.87 C87.154,4.892 87.286,5.024 87.286,5.508 L87.286,16.222 Z M98.924,13.142 C98.924,17.124 100.86,19.016 103.808,19.016 C106.712,19.016 109.066,17.08 109.066,12.856 C109.066,7.796 105.788,7.29 104.16,7.29 C101.894,7.29 98.924,8.566 98.924,13.142 Z M103.984,17.08 C101.872,17.08 101.586,14.88 101.586,12.834 C101.586,10.722 102.29,9.226 104.028,9.226 C105.788,9.226 106.382,10.744 106.382,13.208 C106.382,15.496 105.7,17.08 103.984,17.08 Z" id="typecho" fill="#000000" sketch:type="MSShapeGroup"></path>
<path d="M13,26 C3.36833333,26 0,22.631 0,13 C0,3.36866667 3.36833333,0 13,0 C22.6316667,0 26,3.36866667 26,13 C26,22.631 22.6316667,26 13,26 Z M6,9 L20,9 L20,7 L6,7 L6,9 Z M6,14 L16,14 L16,12 L6,12 L6,14 Z M6,19 L18,19 L18,17 L6,17 L6,19 Z" id="icon" fill="#000000" sketch:type="MSShapeGroup"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -3,109 +3,102 @@ include 'common.php';
include 'header.php';
include 'menu.php';
$stat = Typecho_Widget::widget('Widget_Stat');
$stat = \Widget\Stat::alloc();
?>
<div class="main">
<div class="container typecho-dashboard">
<?php include 'page-title.php'; ?>
<div class="colgroup typecho-page-main">
<div class="col-mb-12 col-tb-3 typecho-dashboard-nav" role="main">
<p class="intro"><?php _e('欢迎使用 Typecho, 您可以使用下面的链接开始您的 Blog 之旅:'); ?></p>
<ul class="intro-link">
<?php if($user->pass('contributor', true)): ?>
<li><a href="<?php $options->adminUrl('write-post.php'); ?>"><?php _e('撰写新文章'); ?></a></li>
<?php if($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->waitingCommentsNum > 0): ?>
<li><a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核的评论'); ?></a>
<span class="balloon"><?php $stat->waitingCommentsNum(); ?></span>
</li>
<?php elseif($stat->myWaitingCommentsNum > 0): ?>
<li><a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核的评论'); ?></a>
<span class="balloon"><?php $stat->myWaitingCommentsNum(); ?></span>
</li>
<?php endif; ?>
<?php if($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->spamCommentsNum > 0): ?>
<li><a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
<span class="balloon"><?php $stat->spamCommentsNum(); ?></span>
</li>
<?php elseif($stat->mySpamCommentsNum > 0): ?>
<li><a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
<span class="balloon"><?php $stat->mySpamCommentsNum(); ?></span>
</li>
<?php endif; ?>
<?php if($user->pass('administrator', true)): ?>
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('更换外观模板'); ?></a></li>
<li><a href="<?php $options->adminUrl('options-general.php'); ?>"><?php _e('修改系统设置'); ?></a></li>
<?php endif; ?>
<div class="row typecho-page-main">
<div class="col-mb-12 welcome-board" role="main">
<p><?php _e('目前有 <em>%s</em> 篇文章, 并有 <em>%s</em> 条关于你的评论在 <em>%s</em> 个分类中.',
$stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?>
<br><?php _e('点击下面的链接快速开始:'); ?></p>
<ul id="start-link" class="clearfix">
<?php if ($user->pass('contributor', true)): ?>
<li><a href="<?php $options->adminUrl('write-post.php'); ?>"><?php _e('撰写新文章'); ?></a></li>
<?php if ($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->waitingCommentsNum > 0): ?>
<li>
<a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核的评论'); ?></a>
<span class="balloon"><?php $stat->waitingCommentsNum(); ?></span>
</li>
<?php elseif ($stat->myWaitingCommentsNum > 0): ?>
<li>
<a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核评论'); ?></a>
<span class="balloon"><?php $stat->myWaitingCommentsNum(); ?></span>
</li>
<?php endif; ?>
<?php if ($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->spamCommentsNum > 0): ?>
<li>
<a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
<span class="balloon"><?php $stat->spamCommentsNum(); ?></span>
</li>
<?php elseif ($stat->mySpamCommentsNum > 0): ?>
<li>
<a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
<span class="balloon"><?php $stat->mySpamCommentsNum(); ?></span>
</li>
<?php endif; ?>
<?php if ($user->pass('administrator', true)): ?>
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('更换外观'); ?></a></li>
<li><a href="<?php $options->adminUrl('plugins.php'); ?>"><?php _e('插件管理'); ?></a></li>
<li><a href="<?php $options->adminUrl('options-general.php'); ?>"><?php _e('系统设置'); ?></a>
</li>
<?php endif; ?>
<?php endif; ?>
<!--<li><a href="<?php $options->adminUrl('profile.php'); ?>"><?php _e('更新我的资料'); ?></a></li>-->
</ul>
<h3><?php _e('统计信息'); ?></h3>
<div class="status">
<p><?php _e('目前有 <em>%s</em> 篇 Blog, 并有 <em>%s</em> 条关于你的评论在已设定的 <em>%s</em> 个分类中.',
$stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?></p>
<p><?php
if ($user->logged > 0) {
_e('最后登录: %s', Typecho_I18n::dateWord($user->logged + $options->timezone, $options->gmtTime + $options->timezone));
}
?></p>
</div>
</div>
<div class="col-mb-12 col-tb-6 typecho-dashboard-main" role="complementary">
<section>
<h3><?php _e('最近发的文章'); ?></h3>
<?php Typecho_Widget::widget('Widget_Contents_Post_Recent', 'pageSize=7')->to($posts); ?>
<div class="col-mb-12 col-tb-4" role="complementary">
<section class="latest-link">
<h3><?php _e('最近发的文章'); ?></h3>
<?php \Widget\Contents\Post\Recent::alloc('pageSize=10')->to($posts); ?>
<ul>
<?php if($posts->have()): ?>
<?php while($posts->next()): ?>
<li>
<a href="<?php $posts->permalink(); ?>" class="title"><?php $posts->title(); ?></a>
<span>- <?php $posts->dateWord(); ?></span>
</li>
<?php endwhile; ?>
<?php else: ?>
<li><em><?php _e('暂时没有文章'); ?></em></li>
<?php endif; ?>
</ul>
</section>
<section>
<h3><?php _e('最新得到的回复'); ?></h3>
<ul>
<?php Typecho_Widget::widget('Widget_Comments_Recent', 'pageSize=7')->to($comments); ?>
<?php if($comments->have()): ?>
<?php while($comments->next()): ?>
<li>
<a href="<?php $comments->permalink(); ?>" class="title"><?php $comments->title(); ?></a>
<span>- <?php $comments->dateWord(); ?>, <?php $comments->author(true); ?></span>
</li>
<?php endwhile; ?>
<?php if ($posts->have()): ?>
<?php while ($posts->next()): ?>
<li>
<span><?php $posts->date('n.j'); ?></span>
<a href="<?php $posts->permalink(); ?>" class="title"><?php $posts->title(); ?></a>
</li>
<?php endwhile; ?>
<?php else: ?>
<li><em><?php _e('暂时没有回复'); ?></em></li>
<li><em><?php _e('暂时没有文章'); ?></em></li>
<?php endif; ?>
</ul>
</section>
</div>
<div class="col-mb-12 col-tb-3 typecho-dashboard-nav" role="complementary">
<?php $version = Typecho_Cookie::get('__typecho_check_version'); ?>
<?php if ($version && $version['available']): ?>
<div class="update-check">
<p>
<?php _e('您当前使用的版本是'); ?> <?php echo $version['current']; ?><br>
<strong><a href="<?php echo $version['link']; ?>"><?php _e('官方最新版本是'); ?> <?php echo $version['latest']; ?></a></strong>
</p>
</div>
<?php endif; ?>
<h3><?php _e('官方消息'); ?></h3>
<div id="typecho-message" class="intro-link">
<div class="col-mb-12 col-tb-4" role="complementary">
<section class="latest-link">
<h3><?php _e('最近得到的回复'); ?></h3>
<ul>
<li><?php _e('读取中...'); ?></li>
<?php \Widget\Comments\Recent::alloc('pageSize=10')->to($comments); ?>
<?php if ($comments->have()): ?>
<?php while ($comments->next()): ?>
<li>
<span><?php $comments->date('n.j'); ?></span>
<a href="<?php $comments->permalink(); ?>"
class="title"><?php $comments->author(false); ?></a>:
<?php $comments->excerpt(35, '...'); ?>
</li>
<?php endwhile; ?>
<?php else: ?>
<li><?php _e('暂时没有回复'); ?></li>
<?php endif; ?>
</ul>
</div>
</section>
</div>
<div class="col-mb-12 col-tb-4" role="complementary">
<section class="latest-link">
<h3><?php _e('官方最新日志'); ?></h3>
<div id="typecho-message">
<ul>
<li><?php _e('读取中...'); ?></li>
</ul>
</div>
</section>
</div>
</div>
</div>
@@ -117,47 +110,46 @@ include 'common-js.php';
?>
<script>
$(document).ready(function () {
var ul = $('.intro-link ul'), cache = window.sessionStorage,
html = cache ? cache.getItem('feed') : '',
update = cache ? cache.getItem('update') : '';
if (!!html) {
ul.html(html);
} else {
html = '';
$.get('<?php $options->index('/action/ajax?do=feed'); ?>', function (o) {
for (var i = 0; i < o.length; i ++) {
var item = o[i];
html += '<li><a href="' + item.link + '" target="_blank">' + item.title
+ '</a> <span>' + item.date + '</span></li>';
}
$(document).ready(function () {
var ul = $('#typecho-message ul'), cache = window.sessionStorage,
html = cache ? cache.getItem('feed') : '',
update = cache ? cache.getItem('update') : '';
if (!!html) {
ul.html(html);
cache.setItem('feed', html);
}, 'json');
}
} else {
html = '';
$.get('<?php $options->index('/action/ajax?do=feed'); ?>', function (o) {
for (var i = 0; i < o.length; i++) {
var item = o[i];
html += '<li><span>' + item.date + '</span> <a href="' + item.link + '" target="_blank">' + item.title
+ '</a></li>';
}
function applyUpdate(update) {
if (update.available) {
$('<div class="update-check"><p>'
+ '<?php _e('您当前使用的版本是 %s'); ?>'.replace('%s', update.current) + '<br />'
+ '<strong><a href="' + update.link + '" target="_blank">'
+ '<?php _e('官方最新版本是 %s'); ?>'.replace('%s', update.latest) + '</a></strong></p></div>')
.prependTo('.typecho-dashboard-nav').effect('highlight');
ul.html(html);
cache.setItem('feed', html);
}, 'json');
}
}
if (!!update) {
applyUpdate($.parseJSON(update));
} else {
update = '';
$.get('<?php $options->index('/action/ajax?do=checkVersion'); ?>', function (o, status, resp) {
applyUpdate(o);
cache.setItem('update', resp.responseText);
}, 'json');
}
});
function applyUpdate(update) {
if (update.available) {
$('<div class="update-check message error"><p>'
+ '<?php _e('您当前使用的版本是 %s'); ?>'.replace('%s', update.current) + '<br />'
+ '<strong><a href="' + update.link + '" target="_blank">'
+ '<?php _e('官方最新版本是 %s'); ?>'.replace('%s', update.latest) + '</a></strong></p></div>')
.insertAfter('.typecho-page-title').effect('highlight');
}
}
if (!!update) {
applyUpdate($.parseJSON(update));
} else {
$.get('<?php $options->index('/action/ajax?do=checkVersion'); ?>', function (o, status, resp) {
applyUpdate(o);
cache.setItem('update', resp.responseText);
}, 'json');
}
});
</script>
<?php include 'footer.php'; ?>

BIN
admin/js/Moxie.swf Executable file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,557 +0,0 @@
/*global jQuery:false, alert:false */
/*
* Default text - jQuery plugin for html5 dragging files from desktop to browser
*
* Author: Weixi Yen
*
* Email: [Firstname][Lastname]@gmail.com
*
* Copyright (c) 2010 Resopollution
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Project home:
* http://www.github.com/weixiyen/jquery-filedrop
*
* Version: 0.1.0
*
* Features:
* Allows sending of extra parameters with file.
* Works with Firefox 3.6+
* Future-compliant with HTML5 spec (will work with Webkit browsers and IE9)
* Usage:
* See README at project homepage
*
*/
;(function($) {
jQuery.event.props.push("dataTransfer");
var default_opts = {
fallback_id: '',
url: '',
refresh: 1000,
paramname: 'userfile',
requestType: 'POST', // just in case you want to use another HTTP verb
allowedfileextensions:[],
allowedfiletypes:[],
maxfiles: 25, // Ignored if queuefiles is set > 0
maxfilesize: 1, // MB file size limit
queuefiles: 0, // Max files before queueing (for large volume uploads)
queuewait: 200, // Queue wait time if full
data: {},
headers: {},
drop: empty,
dragStart: empty,
dragEnter: empty,
dragOver: empty,
dragLeave: empty,
docEnter: empty,
docOver: empty,
docLeave: empty,
beforeEach: empty,
afterAll: empty,
rename: empty,
error: function(err, file, i, status) {
alert(err);
},
uploadOpened: empty,
uploadStarted: empty,
uploadFinished: empty,
progressUpdated: empty,
globalProgressUpdated: empty,
speedUpdated: empty
},
errors = ["BrowserNotSupported", "TooManyFiles", "FileTooLarge", "FileTypeNotAllowed", "NotFound", "NotReadable", "AbortError", "ReadError", "FileExtensionNotAllowed"];
$.fn.filedrop = function(options) {
var opts = $.extend({}, default_opts, options),
global_progress = [],
doc_leave_timer, stop_loop = false,
files_count = 0,
files;
$('#' + opts.fallback_id).css({
display: 'none',
width: 0,
height: 0
});
this.on('drop', drop).on('dragstart', opts.dragStart).on('dragenter', dragEnter).on('dragover', dragOver).on('dragleave', dragLeave);
$(document).on('drop', docDrop).on('dragenter', docEnter).on('dragover', docOver).on('dragleave', docLeave);
this.on('click', function(e){
$('#' + opts.fallback_id).trigger(e);
});
$('#' + opts.fallback_id).change(function(e) {
opts.drop(e);
files = e.target.files;
files_count = files.length;
upload();
});
function drop(e) {
if( opts.drop.call(this, e) === false ) return false;
if(!e.dataTransfer)
return;
files = e.dataTransfer.files;
if (files === null || files === undefined || files.length === 0) {
opts.error(errors[0]);
return false;
}
files_count = files.length;
upload();
e.preventDefault();
return false;
}
function getBuilder(filename, filedata, mime, boundary) {
var dashdash = '--',
crlf = '\r\n',
builder = '',
paramname = opts.paramname;
if (opts.data) {
var params = $.param(opts.data).replace(/\+/g, '%20').split(/&/);
$.each(params, function() {
var pair = this.split("=", 2),
name = decodeURIComponent(pair[0]),
val = decodeURIComponent(pair[1]);
if (pair.length !== 2) {
return;
}
builder += dashdash;
builder += boundary;
builder += crlf;
builder += 'Content-Disposition: form-data; name="' + name + '"';
builder += crlf;
builder += crlf;
builder += val;
builder += crlf;
});
}
if (jQuery.isFunction(paramname)){
paramname = paramname(filename);
}
builder += dashdash;
builder += boundary;
builder += crlf;
builder += 'Content-Disposition: form-data; name="' + (paramname||"") + '"';
builder += '; filename="' + filename + '"';
builder += crlf;
builder += 'Content-Type: ' + mime;
builder += crlf;
builder += crlf;
builder += filedata;
builder += crlf;
builder += dashdash;
builder += boundary;
builder += dashdash;
builder += crlf;
return builder;
}
function progress(e) {
if (e.lengthComputable) {
var percentage = Math.round((e.loaded * 100) / e.total);
if (this.currentProgress !== percentage) {
this.currentProgress = percentage;
opts.progressUpdated(this.index, this.file, this.currentProgress);
global_progress[this.global_progress_index] = this.currentProgress;
globalProgress();
var elapsed = new Date().getTime();
var diffTime = elapsed - this.currentStart;
if (diffTime >= opts.refresh) {
var diffData = e.loaded - this.startData;
var speed = diffData / diffTime; // KB per second
opts.speedUpdated(this.index, this.file, speed);
this.startData = e.loaded;
this.currentStart = elapsed;
}
}
}
}
function globalProgress() {
if (global_progress.length === 0) {
return;
}
var total = 0, index;
for (index in global_progress) {
if(global_progress.hasOwnProperty(index)) {
total = total + global_progress[index];
}
}
opts.globalProgressUpdated(Math.round(total / global_progress.length));
}
// Respond to an upload
function upload() {
stop_loop = false;
if (!files) {
opts.error(errors[0]);
return false;
}
if (opts.allowedfiletypes.push && opts.allowedfiletypes.length) {
for(var fileIndex = files.length;fileIndex--;) {
if(!files[fileIndex].type || $.inArray(files[fileIndex].type, opts.allowedfiletypes) < 0) {
opts.error(errors[3], files[fileIndex]);
return false;
}
}
}
if (opts.allowedfileextensions.push && opts.allowedfileextensions.length) {
for(var fileIndex = files.length;fileIndex--;) {
var allowedextension = false;
for (i=0;i<opts.allowedfileextensions.length;i++){
if (files[fileIndex].name.substr(files[fileIndex].name.length-opts.allowedfileextensions[i].length) == opts.allowedfileextensions[i]) {
allowedextension = true;
}
}
if (!allowedextension){
opts.error(errors[8], files[fileIndex]);
return false;
}
}
}
var filesDone = 0,
filesRejected = 0;
if (files_count > opts.maxfiles && opts.queuefiles === 0) {
opts.error(errors[1]);
return false;
}
// Define queues to manage upload process
var workQueue = [];
var processingQueue = [];
var doneQueue = [];
// Add everything to the workQueue
for (var i = 0; i < files_count; i++) {
workQueue.push(i);
opts.uploadOpened(i, files[i]);
}
// Helper function to enable pause of processing to wait
// for in process queue to complete
var pause = function(timeout) {
setTimeout(process, timeout);
return;
};
// Process an upload, recursive
var process = function() {
var fileIndex;
if (stop_loop) {
return false;
}
// Check to see if are in queue mode
if (opts.queuefiles > 0 && processingQueue.length >= opts.queuefiles) {
return pause(opts.queuewait);
} else {
// Take first thing off work queue
fileIndex = workQueue[0];
workQueue.splice(0, 1);
// Add to processing queue
processingQueue.push(fileIndex);
}
try {
if (beforeEach(files[fileIndex]) !== false) {
if (fileIndex === files_count) {
return;
}
var reader = new FileReader(),
max_file_size = 1048576 * opts.maxfilesize;
reader.index = fileIndex;
if (files[fileIndex].size > max_file_size) {
opts.error(errors[2], files[fileIndex], fileIndex);
// Remove from queue
processingQueue.forEach(function(value, key) {
if (value === fileIndex) {
processingQueue.splice(key, 1);
}
});
filesRejected++;
return true;
}
reader.onerror = function(e) {
switch(e.target.error.code) {
case e.target.error.NOT_FOUND_ERR:
opts.error(errors[4]);
return false;
case e.target.error.NOT_READABLE_ERR:
opts.error(errors[5]);
return false;
case e.target.error.ABORT_ERR:
opts.error(errors[6]);
return false;
default:
opts.error(errors[7]);
return false;
};
};
reader.onloadend = !opts.beforeSend ? send : function (e) {
opts.beforeSend(files[fileIndex], fileIndex, function () { send(e); });
};
reader.readAsDataURL(files[fileIndex]);
} else {
filesRejected++;
}
} catch (err) {
// Remove from queue
processingQueue.forEach(function(value, key) {
if (value === fileIndex) {
processingQueue.splice(key, 1);
}
});
opts.error(errors[0]);
return false;
}
// If we still have work to do,
if (workQueue.length > 0) {
process();
}
};
var send = function(e) {
var fileIndex = (e.srcElement || e.target).index;
// Sometimes the index is not attached to the
// event object. Find it by size. Hack for sure.
if (e.target.index === undefined) {
e.target.index = getIndexBySize(e.total);
}
var xhr = new XMLHttpRequest(),
upload = xhr.upload,
file = files[e.target.index],
index = e.target.index,
start_time = new Date().getTime(),
boundary = '------multipartformboundary' + (new Date()).getTime(),
global_progress_index = global_progress.length,
builder,
newName = rename(file.name),
mime = file.type;
if (opts.withCredentials) {
xhr.withCredentials = opts.withCredentials;
}
var data = atob(e.target.result.split(',')[1]);
if (typeof newName === "string") {
builder = getBuilder(newName, data, mime, boundary);
} else {
builder = getBuilder(file.name, data, mime, boundary);
}
upload.index = index;
upload.file = file;
upload.downloadStartTime = start_time;
upload.currentStart = start_time;
upload.currentProgress = 0;
upload.global_progress_index = global_progress_index;
upload.startData = 0;
upload.addEventListener("progress", progress, false);
// Allow url to be a method
if (jQuery.isFunction(opts.url)) {
xhr.open(opts.requestType, opts.url(), true);
} else {
xhr.open(opts.requestType, opts.url, true);
}
xhr.setRequestHeader('content-type', 'multipart/form-data; boundary=' + boundary);
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
// Add headers
$.each(opts.headers, function(k, v) {
xhr.setRequestHeader(k, v);
});
xhr.sendAsBinary(builder);
global_progress[global_progress_index] = 0;
globalProgress();
opts.uploadStarted(index, file, files_count);
xhr.onload = function() {
var serverResponse = null;
if (xhr.responseText) {
try {
serverResponse = jQuery.parseJSON(xhr.responseText);
}
catch (e) {
serverResponse = xhr.responseText;
}
}
var now = new Date().getTime(),
timeDiff = now - start_time,
result = opts.uploadFinished(index, file, serverResponse, timeDiff, xhr);
filesDone++;
// Remove from processing queue
processingQueue.forEach(function(value, key) {
if (value === fileIndex) {
processingQueue.splice(key, 1);
}
});
// Add to donequeue
doneQueue.push(fileIndex);
// Make sure the global progress is updated
global_progress[global_progress_index] = 100;
globalProgress();
if (filesDone === (files_count - filesRejected)) {
afterAll();
}
if (result === false) {
stop_loop = true;
}
// Pass any errors to the error option
if (xhr.status < 200 || xhr.status > 299) {
opts.error(xhr.statusText, file, fileIndex, xhr.status);
}
};
};
// Initiate the processing loop
process();
}
function getIndexBySize(size) {
for (var i = 0; i < files_count; i++) {
if (files[i].size === size) {
return i;
}
}
return undefined;
}
function rename(name) {
return opts.rename(name);
}
function beforeEach(file) {
return opts.beforeEach(file);
}
function afterAll() {
return opts.afterAll();
}
function dragEnter(e) {
clearTimeout(doc_leave_timer);
e.preventDefault();
opts.dragEnter.call(this, e);
}
function dragOver(e) {
clearTimeout(doc_leave_timer);
e.preventDefault();
opts.docOver.call(this, e);
opts.dragOver.call(this, e);
}
function dragLeave(e) {
clearTimeout(doc_leave_timer);
opts.dragLeave.call(this, e);
e.stopPropagation();
}
function docDrop(e) {
e.preventDefault();
opts.docLeave.call(this, e);
return false;
}
function docEnter(e) {
clearTimeout(doc_leave_timer);
e.preventDefault();
opts.docEnter.call(this, e);
return false;
}
function docOver(e) {
clearTimeout(doc_leave_timer);
e.preventDefault();
opts.docOver.call(this, e);
return false;
}
function docLeave(e) {
doc_leave_timer = setTimeout((function(_this) {
return function() {
opts.docLeave.call(_this, e);
};
})(this), 200);
}
return this;
};
function empty() {}
try {
if (XMLHttpRequest.prototype.sendAsBinary) {
return;
}
XMLHttpRequest.prototype.sendAsBinary = function(datastr) {
function byteValue(x) {
return x.charCodeAt(0) & 0xff;
}
var ords = Array.prototype.map.call(datastr, byteValue);
var ui8a = new Uint8Array(ords);
// Not pretty: Chrome 22 deprecated sending ArrayBuffer, moving instead
// to sending ArrayBufferView. Sadly, no proper way to detect this
// functionality has been discovered. Happily, Chrome 22 also introduced
// the base ArrayBufferView class, not present in Chrome 21.
if ('ArrayBufferView' in window)
this.send(ui8a);
else
this.send(ui8a.buffer);
};
} catch (e) {}
})(jQuery);

301
admin/js/html5shiv.js vendored
View File

@@ -1,301 +0,0 @@
/**
* @preserve HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
;(function(window, document) {
/*jshint evil:true */
/** version */
var version = '3.7.0';
/** Preset options */
var options = window.html5 || {};
/** Used to skip problem elements */
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
/** Not all elements can be cloned in IE **/
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
/** Detect whether the browser supports default html5 styles */
var supportsHtml5Styles;
/** Name of the expando, to work with multiple documents or to re-shiv one document */
var expando = '_html5shiv';
/** The id for the the documents expando */
var expanID = 0;
/** Cached data for each document */
var expandoData = {};
/** Detect whether the browser supports unknown elements */
var supportsUnknownElements;
(function() {
try {
var a = document.createElement('a');
a.innerHTML = '<xyz></xyz>';
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
supportsHtml5Styles = ('hidden' in a);
supportsUnknownElements = a.childNodes.length == 1 || (function() {
// assign a false positive if unable to shiv
(document.createElement)('a');
var frag = document.createDocumentFragment();
return (
typeof frag.cloneNode == 'undefined' ||
typeof frag.createDocumentFragment == 'undefined' ||
typeof frag.createElement == 'undefined'
);
}());
} catch(e) {
// assign a false positive if detection fails => unable to shiv
supportsHtml5Styles = true;
supportsUnknownElements = true;
}
}());
/*--------------------------------------------------------------------------*/
/**
* Creates a style sheet with the given CSS text and adds it to the document.
* @private
* @param {Document} ownerDocument The document.
* @param {String} cssText The CSS text.
* @returns {StyleSheet} The style element.
*/
function addStyleSheet(ownerDocument, cssText) {
var p = ownerDocument.createElement('p'),
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
p.innerHTML = 'x<style>' + cssText + '</style>';
return parent.insertBefore(p.lastChild, parent.firstChild);
}
/**
* Returns the value of `html5.elements` as an array.
* @private
* @returns {Array} An array of shived element node names.
*/
function getElements() {
var elements = html5.elements;
return typeof elements == 'string' ? elements.split(' ') : elements;
}
/**
* Returns the data associated to the given document
* @private
* @param {Document} ownerDocument The document.
* @returns {Object} An object of data.
*/
function getExpandoData(ownerDocument) {
var data = expandoData[ownerDocument[expando]];
if (!data) {
data = {};
expanID++;
ownerDocument[expando] = expanID;
expandoData[expanID] = data;
}
return data;
}
/**
* returns a shived element for the given nodeName and document
* @memberOf html5
* @param {String} nodeName name of the element
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived element.
*/
function createElement(nodeName, ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createElement(nodeName);
}
if (!data) {
data = getExpandoData(ownerDocument);
}
var node;
if (data.cache[nodeName]) {
node = data.cache[nodeName].cloneNode();
} else if (saveClones.test(nodeName)) {
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
} else {
node = data.createElem(nodeName);
}
// Avoid adding some elements to fragments in IE < 9 because
// * Attributes like `name` or `type` cannot be set/changed once an element
// is inserted into a document/fragment
// * Link elements with `src` attributes that are inaccessible, as with
// a 403 response, will cause the tab/window to crash
// * Script elements appended to fragments will execute when their `src`
// or `text` property is set
return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
}
/**
* returns a shived DocumentFragment for the given document
* @memberOf html5
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived DocumentFragment.
*/
function createDocumentFragment(ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createDocumentFragment();
}
data = data || getExpandoData(ownerDocument);
var clone = data.frag.cloneNode(),
i = 0,
elems = getElements(),
l = elems.length;
for(;i<l;i++){
clone.createElement(elems[i]);
}
return clone;
}
/**
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
* @private
* @param {Document|DocumentFragment} ownerDocument The document.
* @param {Object} data of the document.
*/
function shivMethods(ownerDocument, data) {
if (!data.cache) {
data.cache = {};
data.createElem = ownerDocument.createElement;
data.createFrag = ownerDocument.createDocumentFragment;
data.frag = data.createFrag();
}
ownerDocument.createElement = function(nodeName) {
//abort shiv
if (!html5.shivMethods) {
return data.createElem(nodeName);
}
return createElement(nodeName, ownerDocument, data);
};
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
'var n=f.cloneNode(),c=n.createElement;' +
'h.shivMethods&&(' +
// unroll the `createElement` calls
getElements().join().replace(/[\w\-]+/g, function(nodeName) {
data.createElem(nodeName);
data.frag.createElement(nodeName);
return 'c("' + nodeName + '")';
}) +
');return n}'
)(html5, data.frag);
}
/*--------------------------------------------------------------------------*/
/**
* Shivs the given document.
* @memberOf html5
* @param {Document} ownerDocument The document to shiv.
* @returns {Document} The shived document.
*/
function shivDocument(ownerDocument) {
if (!ownerDocument) {
ownerDocument = document;
}
var data = getExpandoData(ownerDocument);
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
data.hasCSS = !!addStyleSheet(ownerDocument,
// corrects block display not defined in IE6/7/8/9
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
// adds styling not present in IE6/7/8/9
'mark{background:#FF0;color:#000}' +
// hides non-rendered elements
'template{display:none}'
);
}
if (!supportsUnknownElements) {
shivMethods(ownerDocument, data);
}
return ownerDocument;
}
/*--------------------------------------------------------------------------*/
/**
* The `html5` object is exposed so that more elements can be shived and
* existing shiving can be detected on iframes.
* @type Object
* @example
*
* // options can be changed before the script is included
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
*/
var html5 = {
/**
* An array or space separated string of node names of the elements to shiv.
* @memberOf html5
* @type Array|String
*/
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
/**
* current version of html5shiv
*/
'version': version,
/**
* A flag to indicate that the HTML5 style sheet should be inserted.
* @memberOf html5
* @type Boolean
*/
'shivCSS': (options.shivCSS !== false),
/**
* Is equal to true if a browser supports creating unknown/HTML5 elements
* @memberOf html5
* @type boolean
*/
'supportsUnknownElements': supportsUnknownElements,
/**
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
* methods should be overwritten.
* @memberOf html5
* @type Boolean
*/
'shivMethods': (options.shivMethods !== false),
/**
* A string to describe the type of `html5` object ("default" or "default print").
* @memberOf html5
* @type String
*/
'type': 'default',
// shivs the document according to the specified `html5` object options
'shivDocument': shivDocument,
//creates a shived element
createElement: createElement,
//creates a shived documentFragment
createDocumentFragment: createDocumentFragment
};
/*--------------------------------------------------------------------------*/
// expose html5
window.html5 = html5;
// shiv the document
shivDocument(document);
}(this, document));

Some files were not shown because too many files have changed in this diff Show More