mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-04 12:17:42 +02:00
Compare commits
660 Commits
v2.3.0
...
monstra-mu
Author | SHA1 | Date | |
---|---|---|---|
|
dc8ef1c489 | ||
|
5f1746d62e | ||
|
9c48c41e55 | ||
|
a088fd9772 | ||
|
d6221b3f50 | ||
|
a39d78d725 | ||
|
dfffa3d984 | ||
|
79f42c2f01 | ||
|
5acdcbd32b | ||
|
57f798e2cb | ||
|
b60ffab09f | ||
|
01a9112966 | ||
|
2dd6faceed | ||
|
ac8ba8a6dc | ||
|
19e0e36eec | ||
|
009e32e635 | ||
|
7ff4ff29d9 | ||
|
31b103d9d3 | ||
|
6b7f1fce17 | ||
|
a4af90a72e | ||
|
eaccc1056d | ||
|
728f6509a6 | ||
|
169803c85a | ||
|
3fddfa8d06 | ||
|
5d696d9a47 | ||
|
1c43b78d71 | ||
|
d58e1c2f92 | ||
|
ab471b9555 | ||
|
9f5516233d | ||
|
f8fa3f966b | ||
|
7c548aa5b4 | ||
|
3592d3342a | ||
|
4743f4e6e1 | ||
|
55324b20a0 | ||
|
c11ee609bc | ||
|
43655828c9 | ||
|
19afcbd9e8 | ||
|
2643a33820 | ||
|
4fb4de67d4 | ||
|
b9d3292899 | ||
|
3470c28c03 | ||
|
3e7f381fc0 | ||
|
392d8c253f | ||
|
c7133368d1 | ||
|
c5534d26ad | ||
|
17569174aa | ||
|
90057e13d0 | ||
|
5abc71089e | ||
|
a078ba2ad1 | ||
|
5bbb9a7871 | ||
|
ad5d92bbff | ||
|
00f4c551a1 | ||
|
1d2c4cd068 | ||
|
0414e887e1 | ||
|
49347e80b6 | ||
|
1bb101edef | ||
|
918f0470e0 | ||
|
aaae5c723f | ||
|
ed9490042d | ||
|
1ef144ba21 | ||
|
970ce69cfa | ||
|
33eedc9481 | ||
|
5bf01e01ca | ||
|
8c66bac570 | ||
|
cd6cd24ed2 | ||
|
d293b649b8 | ||
|
a27564c317 | ||
|
c713cf40d2 | ||
|
abdde2411a | ||
|
d9ee6c89d9 | ||
|
f871958e51 | ||
|
552c84c7b2 | ||
|
b9408b3522 | ||
|
c4895264de | ||
|
3834f931d9 | ||
|
dba81f723e | ||
|
c2e00b3f81 | ||
|
7a89ba8a9b | ||
|
45f6c4952e | ||
|
b758b6e503 | ||
|
2b3bbd247b | ||
|
3c79bc2a45 | ||
|
29d11febfd | ||
|
33d8024866 | ||
|
9e92cc5372 | ||
|
cc3ca4476f | ||
|
7dc755db99 | ||
|
bacfb156f4 | ||
|
d469da3b2d | ||
|
de90f501b6 | ||
|
11ec340a15 | ||
|
5c8b3a2da1 | ||
|
4eaa1165b0 | ||
|
0285dabee3 | ||
|
a8000d167d | ||
|
2a35099a83 | ||
|
fcf349d0a1 | ||
|
44f1fd2e0a | ||
|
acb88579c8 | ||
|
e18c4912b5 | ||
|
b7ce4670ec | ||
|
ff18aba1b5 | ||
|
bf7e12b16d | ||
|
418f89f64d | ||
|
b1455d63af | ||
|
7089970cf6 | ||
|
91dec98620 | ||
|
6d682b3d7f | ||
|
91d769a1c4 | ||
|
3a58e39f5c | ||
|
fc685e0514 | ||
|
f15766ee86 | ||
|
e78cce729b | ||
|
fc0a4cf3b3 | ||
|
8a905b9481 | ||
|
fb5e278073 | ||
|
dc6a689013 | ||
|
b91e746c09 | ||
|
6be93036ae | ||
|
ac1a4b4a6c | ||
|
cbacd6db91 | ||
|
f5566ef2b4 | ||
|
a2596a13a8 | ||
|
054cb8ec65 | ||
|
99a22cf36e | ||
|
daf306bcb3 | ||
|
b386055643 | ||
|
d7510e699e | ||
|
b9fb53820e | ||
|
b6be58ba07 | ||
|
947ebb4a3d | ||
|
e816be56a4 | ||
|
531e81b2ac | ||
|
7357d1c26a | ||
|
fd3a16d72f | ||
|
b697274f86 | ||
|
a01ef33951 | ||
|
a17ee5f09c | ||
|
635eb98c4e | ||
|
ea574a1d40 | ||
|
a115a51fd9 | ||
|
23360d4c42 | ||
|
58bedf57e7 | ||
|
b52ff6abb7 | ||
|
745c06df7f | ||
|
a62a1e7ef5 | ||
|
9741538fb2 | ||
|
48b7be3ecc | ||
|
fe4caf0802 | ||
|
30f5a5969f | ||
|
47af0a0d4b | ||
|
b39381990a | ||
|
1a335cfaad | ||
|
ab647fdce5 | ||
|
a3c75d72fb | ||
|
c60cd592c4 | ||
|
a36b72f32f | ||
|
4803e3285e | ||
|
312d79c2c9 | ||
|
5bea8e2b72 | ||
|
b5a9b3f49a | ||
|
a9c720659d | ||
|
ae587082ac | ||
|
ee168a2aa0 | ||
|
144a3e7cc3 | ||
|
295e2cb873 | ||
|
f2b9975eca | ||
|
12d4be693b | ||
|
616e3a3608 | ||
|
34cade84cf | ||
|
a898a84739 | ||
|
6a7c3a3462 | ||
|
eb5f918f5d | ||
|
6c68b1023c | ||
|
9cdf1a3d71 | ||
|
cec57dc108 | ||
|
bd3df9598a | ||
|
798c121e51 | ||
|
4f2fb1a319 | ||
|
79e8c94468 | ||
|
de4b0eff15 | ||
|
0fa5c3c91d | ||
|
ab69a6128b | ||
|
9981219800 | ||
|
cd2b94c7cc | ||
|
926b99b2fa | ||
|
eeffcca348 | ||
|
1f3ed549d5 | ||
|
fea6350416 | ||
|
01cef7e8e9 | ||
|
efb026013e | ||
|
56562942cd | ||
|
8b63ae4c39 | ||
|
a98ae9bbc2 | ||
|
431337e138 | ||
|
7a9aa577dd | ||
|
9ea7b09e15 | ||
|
c3a1a33c73 | ||
|
44e3f5f31c | ||
|
4e2f2b6528 | ||
|
9594f0d48b | ||
|
8ea46eac2c | ||
|
961f03a7a4 | ||
|
a23885d619 | ||
|
71d0244a01 | ||
|
90f8020d92 | ||
|
369eb76f09 | ||
|
5e1a5f9150 | ||
|
e4ed4a3e00 | ||
|
8c20dd5155 | ||
|
80ea7dbc3a | ||
|
5f79f19542 | ||
|
3624af6371 | ||
|
11eaf2702a | ||
|
69b23097e1 | ||
|
66b331c8a6 | ||
|
faad94b51f | ||
|
92afccf4f8 | ||
|
9d48963513 | ||
|
43925eaf54 | ||
|
80fcdb20f9 | ||
|
b71b0a422a | ||
|
2e51c5ecf9 | ||
|
253cb63630 | ||
|
2070d0ab32 | ||
|
f84ce335c7 | ||
|
507142df0a | ||
|
fa7fdfce56 | ||
|
c462909f0d | ||
|
de3ad26ece | ||
|
84d1fffc71 | ||
|
6b55dd36e5 | ||
|
d046e53ef9 | ||
|
2031d25253 | ||
|
57544b6740 | ||
|
c5b8ad8c3d | ||
|
059ad82591 | ||
|
febd1e7e71 | ||
|
616c8a18af | ||
|
e442d4debd | ||
|
5a876fddb1 | ||
|
6658500691 | ||
|
4756be2309 | ||
|
16dbbcdb16 | ||
|
5c1ea1f819 | ||
|
b2ca81e9d6 | ||
|
dfb4c01ffd | ||
|
45cb0e69d8 | ||
|
ca43003293 | ||
|
4bddfae60f | ||
|
314996be6b | ||
|
32472a1a0e | ||
|
ec6e4bba27 | ||
|
438a81af8f | ||
|
e51ed4c587 | ||
|
a8c163a535 | ||
|
0102715cf3 | ||
|
d68a4c5e28 | ||
|
9c54a443d9 | ||
|
2178b7d406 | ||
|
34d4482911 | ||
|
a0719eac94 | ||
|
32e2890b37 | ||
|
e449381555 | ||
|
ac3c4e6ac8 | ||
|
06981a768e | ||
|
e5af6b060a | ||
|
f0899e9358 | ||
|
e3bc818348 | ||
|
b32452a815 | ||
|
a242cd8804 | ||
|
9fc9843639 | ||
|
190bbe05b1 | ||
|
b0c19f7c81 | ||
|
cae9c77d0a | ||
|
8b58e1536f | ||
|
3339ad0ce5 | ||
|
c003072a5d | ||
|
710f86ffc6 | ||
|
c1a20a5f6e | ||
|
207a13904d | ||
|
5942c29fe9 | ||
|
2a3d9720d1 | ||
|
163914b579 | ||
|
41076ede4a | ||
|
44451af610 | ||
|
e3d0da1047 | ||
|
e436317d7e | ||
|
3b7288cbdb | ||
|
9896ea7c31 | ||
|
5e2984e448 | ||
|
82a516d431 | ||
|
f7bc03ef91 | ||
|
7ca3946f8a | ||
|
80582f2c9f | ||
|
3e4bd66e16 | ||
|
3bd33ab305 | ||
|
608c987e6d | ||
|
582f49418e | ||
|
1b77c928f4 | ||
|
f2d0bd2745 | ||
|
1085953b3b | ||
|
8ac3b92248 | ||
|
37ec41199d | ||
|
9ea4477bd8 | ||
|
81ffb867be | ||
|
eea5606985 | ||
|
c01e03e139 | ||
|
071595fd61 | ||
|
847af54c11 | ||
|
308483f167 | ||
|
1a5d05bfaa | ||
|
e17bc2454d | ||
|
e662a9937b | ||
|
d8a9c746b4 | ||
|
0a08b4131d | ||
|
ba78201812 | ||
|
36bb23db5b | ||
|
6713282196 | ||
|
bcf3d58c14 | ||
|
3f7e3e5b98 | ||
|
baefbef8ab | ||
|
f5ff259344 | ||
|
8380ec5b7d | ||
|
44c274cf8c | ||
|
bcac217db3 | ||
|
a1c7aa1d46 | ||
|
594d6fd51d | ||
|
9a6329a6cd | ||
|
1350491545 | ||
|
61317e99fe | ||
|
46c2d5e93d | ||
|
35029b1e24 | ||
|
8a107d190c | ||
|
ff26fc105c | ||
|
2e19f5c1a7 | ||
|
0bbf9544da | ||
|
27cf070816 | ||
|
66eb4fd120 | ||
|
3aad8db409 | ||
|
6d703b1286 | ||
|
948bf57a1c | ||
|
ef63bda6da | ||
|
87135d00ae | ||
|
350dd8ed8b | ||
|
b8ebd53272 | ||
|
358c7fdefe | ||
|
062460895d | ||
|
7113f09937 | ||
|
918820da3e | ||
|
8f0e576f99 | ||
|
eecf2e85a4 | ||
|
933c1df4f6 | ||
|
28ec930671 | ||
|
e74111fb7d | ||
|
551ce3be6b | ||
|
ceb19b2e83 | ||
|
38efadd6bf | ||
|
97dc6a8f69 | ||
|
1e3689204e | ||
|
fee8dc34e9 | ||
|
a5dbfaee85 | ||
|
e72dcc3a94 | ||
|
106c7b2c56 | ||
|
6749608a17 | ||
|
4b381efb10 | ||
|
8d16632454 | ||
|
67bf91a872 | ||
|
482e865358 | ||
|
fb906708b9 | ||
|
76c71c8174 | ||
|
6d20d97c86 | ||
|
2ba945313f | ||
|
52192f9dea | ||
|
054aa46635 | ||
|
cff06f5564 | ||
|
14dfc59b9e | ||
|
03045d03ae | ||
|
5d8a4abcb9 | ||
|
3ad2cf7a56 | ||
|
474fddd803 | ||
|
a1942f55dc | ||
|
38e6961a91 | ||
|
73d78f0585 | ||
|
bd84514fce | ||
|
9d66c5ca32 | ||
|
54660eb5c1 | ||
|
ea3f059a41 | ||
|
1e2fe718c1 | ||
|
aaba7cef27 | ||
|
2afaba814b | ||
|
2a465bab1b | ||
|
fff6890205 | ||
|
9a5f0a99ba | ||
|
2c4d1c36f9 | ||
|
7b397ddfaa | ||
|
0cecc2e9a6 | ||
|
a8b2725721 | ||
|
274e9a1849 | ||
|
a76207ae96 | ||
|
0bb9915708 | ||
|
f7a716cb76 | ||
|
dfb0b41467 | ||
|
ad5c1802d0 | ||
|
390c5a1354 | ||
|
3f4a04e03a | ||
|
669289af32 | ||
|
d4f57e35d3 | ||
|
cc7d270bfb | ||
|
caecc6df07 | ||
|
0f357ec80b | ||
|
57c43319f7 | ||
|
00ac33e273 | ||
|
3947d3560d | ||
|
4907964484 | ||
|
38c8a3340c | ||
|
7532ad1127 | ||
|
cc613247f3 | ||
|
92064df622 | ||
|
fb121a88d1 | ||
|
abc04ee218 | ||
|
0faba762ba | ||
|
fed3aa5664 | ||
|
6e3a2a63e7 | ||
|
c119c9f84a | ||
|
3eae0d2114 | ||
|
955ba2a9ca | ||
|
25bee212a8 | ||
|
e5f319a961 | ||
|
251acd4949 | ||
|
bc429ac098 | ||
|
a76590930f | ||
|
2f873985a8 | ||
|
ffc0bf62c2 | ||
|
678573b91a | ||
|
83abaae0af | ||
|
bd310d6c7c | ||
|
9fabc679b4 | ||
|
5e06c10ef9 | ||
|
fa00499d93 | ||
|
ed323cfe7b | ||
|
5dc4c65f76 | ||
|
3dfef0e3a3 | ||
|
87a55ed5bb | ||
|
40afdaccc7 | ||
|
290ab4bec2 | ||
|
14baa34888 | ||
|
5c03f0cfab | ||
|
f9ec0b9e18 | ||
|
d2ab853939 | ||
|
fae12cefda | ||
|
1dbd208832 | ||
|
2b1e28a0d5 | ||
|
2c268fc873 | ||
|
15535a460c | ||
|
c2a2dba621 | ||
|
f340fcd3a2 | ||
|
7f71f3e3bc | ||
|
0170c3015e | ||
|
141df2033d | ||
|
a8c9f864e5 | ||
|
8b5bdd266f | ||
|
97a5dcf317 | ||
|
e78f59126a | ||
|
81b070322e | ||
|
aabbb4461e | ||
|
e08c17df4b | ||
|
01be9f66e4 | ||
|
4381179378 | ||
|
015aff3cb3 | ||
|
fb44416902 | ||
|
6721c7829f | ||
|
df745f597c | ||
|
95a791e871 | ||
|
7196ac5067 | ||
|
1db7253e63 | ||
|
1998674217 | ||
|
d6e269a7fa | ||
|
bd1b9d24d6 | ||
|
1c42312010 | ||
|
31e0616a42 | ||
|
b3767f9f59 | ||
|
c68ac3f03a | ||
|
e8f79e99b5 | ||
|
5433a17aa5 | ||
|
0ab72c4208 | ||
|
e71bb980a5 | ||
|
7c0a4d7a50 | ||
|
ca65abd10c | ||
|
26f1abd717 | ||
|
281894d08a | ||
|
b2f3d3d526 | ||
|
1bc19bc850 | ||
|
73b20836c8 | ||
|
aef599de95 | ||
|
0fcae326cb | ||
|
6d38fb9c39 | ||
|
64d13302d5 | ||
|
cc9ce84648 | ||
|
9d6d3dec95 | ||
|
365dbafcc9 | ||
|
da4e3b60c0 | ||
|
ed1edc32db | ||
|
dbb3db8e6b | ||
|
27d55c2e51 | ||
|
2bc94dbe6a | ||
|
d3b00d894b | ||
|
5a142a2353 | ||
|
88b244a6df | ||
|
1fd4892969 | ||
|
a48a587fcd | ||
|
30f5aae0be | ||
|
14d7d93373 | ||
|
4f92cb32c2 | ||
|
1e3e3ce8b3 | ||
|
e3c80959f8 | ||
|
b36a30c4c3 | ||
|
7f8833286c | ||
|
3bfee0107d | ||
|
9d263cb2c9 | ||
|
01a1b5d62d | ||
|
1286de90ae | ||
|
b6de5a3261 | ||
|
5abc7c89db | ||
|
32165e0b18 | ||
|
bdb27de2f1 | ||
|
70f3338470 | ||
|
f82f677f79 | ||
|
a8a425bec1 | ||
|
4bb991ebe8 | ||
|
2c87b85daa | ||
|
fabf51c624 | ||
|
5655dd70a8 | ||
|
4d7383637a | ||
|
8ee7c234e1 | ||
|
b757c19778 | ||
|
2574431dd8 | ||
|
b43422f090 | ||
|
450a7f3c2f | ||
|
79f0ef2701 | ||
|
ce14f9b241 | ||
|
843b460614 | ||
|
15b089f043 | ||
|
2baee12915 | ||
|
1d13ebe490 | ||
|
dee1b7ba75 | ||
|
469a015b8b | ||
|
44860b5cba | ||
|
dd2e241207 | ||
|
986353aa88 | ||
|
5b4a0c3bbf | ||
|
e60fb9921e | ||
|
5cb23c76c3 | ||
|
02fa169760 | ||
|
3d83dc775f | ||
|
432942abf8 | ||
|
29d506a862 | ||
|
83f7be1c7d | ||
|
bbc74df954 | ||
|
fbb65d4568 | ||
|
543b8ae883 | ||
|
51e2cd0a45 | ||
|
aa3d785b97 | ||
|
cd40c09496 | ||
|
7c0fcf42cf | ||
|
a32056db45 | ||
|
de0c1da61c | ||
|
8b0ba10a5a | ||
|
8d681709d2 | ||
|
7f0cdeba25 | ||
|
f4d9b9c53d | ||
|
7b8949dc2b | ||
|
108581e4ef | ||
|
83264e41f3 | ||
|
79f4abe6bd | ||
|
9da99040e1 | ||
|
c3fe4d16bc | ||
|
c1a523acf6 | ||
|
03653831c8 | ||
|
fb12bc8d85 | ||
|
6bbf1ffd51 | ||
|
0c118fb984 | ||
|
b33b85860f | ||
|
d1ef0e47f9 | ||
|
5466099cae | ||
|
2df64961e6 | ||
|
d01a5e36fb | ||
|
97b9982ba0 | ||
|
cac3aeb813 | ||
|
7b24e315b7 | ||
|
73abb00785 | ||
|
4d16d07b2c | ||
|
54be2aa7d0 | ||
|
42e807db22 | ||
|
76f216f516 | ||
|
5def336ff9 | ||
|
b90f3ec00d | ||
|
e58399298f | ||
|
e31c081732 | ||
|
588f67b2e9 | ||
|
e3a623b31f | ||
|
8cacd03c40 | ||
|
5ea80e31e0 | ||
|
83f80306d3 | ||
|
bfc41e03ea | ||
|
7241410c2d | ||
|
8284902d57 | ||
|
791e73c1b6 | ||
|
80d1439471 | ||
|
197cd7afde | ||
|
326a846be3 | ||
|
97542ada1b | ||
|
db5e6b7868 | ||
|
81ff2288b9 | ||
|
cd0d8296a5 | ||
|
03e5fc320c | ||
|
b29abf8da1 | ||
|
6f55f9238b | ||
|
ad870b2120 | ||
|
d9ea1c3d7c | ||
|
6531d3ee87 | ||
|
c7935e6636 | ||
|
a33d1a39d9 | ||
|
cbaa84f50e | ||
|
339413581d | ||
|
7696d90752 | ||
|
c83bb55df3 | ||
|
e76cd74d5b | ||
|
099b206e66 | ||
|
10a6b56b34 | ||
|
8e83ca5bd1 | ||
|
524052b4bf | ||
|
f4eaded4f3 | ||
|
2efff484fc | ||
|
b134abb96e | ||
|
1a1bfabda0 | ||
|
a8ea2d4e02 | ||
|
ce571b6ef3 | ||
|
ac3eeb1508 | ||
|
e9691d6b71 | ||
|
7734822789 | ||
|
75af5452bc | ||
|
c9019ca5fa | ||
|
ee8e1abfd4 | ||
|
6b576be9a5 | ||
|
e823494ab5 | ||
|
f7f3b91f46 | ||
|
0c90ab6bfe | ||
|
35b75e9027 | ||
|
2d5eb31569 | ||
|
2c3d224e62 | ||
|
2fbb4c30c3 | ||
|
0dfc0e5951 | ||
|
fc4d4cde4f | ||
|
b23f2b9c5a | ||
|
4f35153ac2 | ||
|
82f02a7ab5 | ||
|
16975a3062 | ||
|
9b4ff3e2e3 | ||
|
798f558558 |
@@ -1,3 +1,71 @@
|
|||||||
|
Monstra 3.0.1, 2014-08-10
|
||||||
|
------------------------
|
||||||
|
- Minimum php is 5.3
|
||||||
|
- Themes Plugin: Imposible to create new CSS - fixed
|
||||||
|
- Themes Plugin: js and css counter does not recalculate - fixed
|
||||||
|
- Error in Monstra Notifications - fixed
|
||||||
|
- Updated plugins url from plugins.monstra.org to monstra.org/download/plugins
|
||||||
|
|
||||||
|
Monstra 3.0.0, 2014-08-01
|
||||||
|
------------------------
|
||||||
|
- Mobile Ready! Monstra fully responsive for mobile devices, tablets, and normal computer screens.
|
||||||
|
- Twitter Bootstrap updated to 3.1.1
|
||||||
|
- Idiorm updated to 1.4.1
|
||||||
|
- jQuery updated to 2.1.0
|
||||||
|
- Admin: New Modern User Interface
|
||||||
|
- Site: New default theme
|
||||||
|
- Layout fixes according to World Wide Web Consortium (W3C) Standards
|
||||||
|
- Prefetch DNS to reduce look up times
|
||||||
|
- Files Manager: added ability to create & rename directories.
|
||||||
|
- Files Manager: Maximum upload file size message - added.
|
||||||
|
- Files Manager: Bootstrap fileinput.js updated to 3.0.0
|
||||||
|
- Files Manager: File Info Popup
|
||||||
|
- Backup: Restore Site from Backup added
|
||||||
|
- Plugins Manager: Uploading new plugins via the admin panel added
|
||||||
|
- Plugins Manager: Read plugin help(README.MD) ability added.
|
||||||
|
- Responsive Chocolat Lightbox instead of TB Lightbox
|
||||||
|
- Blog Plugin as a part of Monstra CMS
|
||||||
|
- CodeMirror Plugin as a part of Monstra CMS
|
||||||
|
- Markdown Plugin as a part of Monstra CMS
|
||||||
|
- MarkItUp Color Pallete fixes
|
||||||
|
- Site Url without trailing slashes
|
||||||
|
- Admin Help Section - added.
|
||||||
|
- Pages Plugin: tags field added.
|
||||||
|
- Pages Plugin: Meta Title added.
|
||||||
|
- Sitemap Errors Fixes.
|
||||||
|
- Monstra automatically renames files - fixed
|
||||||
|
- Monstra Dashboard created and set as default Plugin for Admin Panel
|
||||||
|
- Ink Framework for Monstra Email Templates
|
||||||
|
- iCheck plugin for checkboxes added.
|
||||||
|
- Emails Manager Plugin added.
|
||||||
|
- HubSpot Messaging Library added for notifications
|
||||||
|
- Gelato: Unzip Functionality added.
|
||||||
|
- Gelato: Number Class new method convertToBytes() added.
|
||||||
|
- Gelato: ErroHandler styles updates
|
||||||
|
- Users Plugin getGravatarURL() improve
|
||||||
|
- Plugin API - Actions - Closure support added.
|
||||||
|
- Plugin API - Filters - Closure support added.
|
||||||
|
- Core: Better statuses notification (error,success,warning)
|
||||||
|
- Core: Store user_email in Session
|
||||||
|
- Core: Javascript may be broken if there is no break line - fixed
|
||||||
|
- Core: Added ability to avoid caching JS/CSS by the browser.
|
||||||
|
- Core: Monstra automatically rename files Issue - fixed
|
||||||
|
- Sandbox Plugin cleanup
|
||||||
|
- New Flags: Japanese(JA), Indonesian(ID), Chinese(ZH-CN), Turkish(TR) added.
|
||||||
|
- Localization: Japanese(JA), Indonesian(ID), Chinese(ZH-CN), Turkish(TR) translations added.
|
||||||
|
- Localization: Major Fixes
|
||||||
|
|
||||||
|
Monstra 2.3.1, 2013-12-25
|
||||||
|
------------------------
|
||||||
|
- Localization: Major Fixes
|
||||||
|
- Gelato: Image.php Major Fixes
|
||||||
|
- Sitemap: Errors #175 - fixes
|
||||||
|
- New favicon added #182 - by bernte
|
||||||
|
- Layouts: General Fixes - by bernte
|
||||||
|
- Installer: SERVER_PORT issue - fixed by KANekT
|
||||||
|
- Gelato: Number Class - updated bytes format (JEDEC & IEC 60027) by mbarzda
|
||||||
|
- Email Layout: footer fixes
|
||||||
|
|
||||||
Monstra 2.3.0, 2013-12-19
|
Monstra 2.3.0, 2013-12-19
|
||||||
------------------------
|
------------------------
|
||||||
- Update Twitter Bootstrap to 2.3.2
|
- Update Twitter Bootstrap to 2.3.2
|
||||||
@@ -238,7 +306,7 @@ Monstra 1.1.4, 2012-06-09
|
|||||||
------------------------
|
------------------------
|
||||||
- Improve Monstra Error Handler
|
- Improve Monstra Error Handler
|
||||||
|
|
||||||
Monstra 1.1.3, 2012-06-06
|
Monstra 1.1.3, 2012-06-06
|
||||||
------------------------
|
------------------------
|
||||||
- Improve Monstra Error Handler
|
- Improve Monstra Error Handler
|
||||||
|
|
10
README.md
10
README.md
@@ -1,12 +1,10 @@
|
|||||||
# Monstra CMS
|
# Monstra CMS
|
||||||
Fast and small content management system written in PHP!
|
Monstra is a modern and lightweight Content Management System.
|
||||||
|
|
||||||
## System Requirements
|
## System Requirements
|
||||||
- UNIX/Linux host
|
Operation system: Unix, Linux, Windows, Mac OS
|
||||||
- PHP 5.2.3 or higher
|
Middleware: PHP 5.3.0 or higher with PHP's [SimpleXML module](http://php.net/simplexml) and [Multibyte String module](http://php.net/mbstring)
|
||||||
- SimpleXML Module
|
Webserver: Apache with [Mod Rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) or Ngnix with [Rewrite Module](http://wiki.nginx.org/HttpRewriteModule)
|
||||||
- Apache Mod Rewrite
|
|
||||||
- Multibyte String
|
|
||||||
|
|
||||||
## Steps to Install
|
## Steps to Install
|
||||||
1. [Download the latest version.](http://monstra.org/download)
|
1. [Download the latest version.](http://monstra.org/download)
|
||||||
|
@@ -48,6 +48,7 @@ if (Request::post('login_submit')) {
|
|||||||
Session::set('user_id', (int) $user['id']);
|
Session::set('user_id', (int) $user['id']);
|
||||||
Session::set('user_login', (string) $user['login']);
|
Session::set('user_login', (string) $user['login']);
|
||||||
Session::set('user_role', (string) $user['role']);
|
Session::set('user_role', (string) $user['role']);
|
||||||
|
Session::set('user_email', (string) $user['email']);
|
||||||
Request::redirect('index.php');
|
Request::redirect('index.php');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -81,6 +82,9 @@ if (Request::post('login_submit')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Notification::setNow('error', $login_error);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Errors
|
// Errors
|
||||||
@@ -116,13 +120,13 @@ if (Request::post('reset_password_submit')) {
|
|||||||
$mail->AddReplyTo(Option::get('system_email'));
|
$mail->AddReplyTo(Option::get('system_email'));
|
||||||
$mail->AddAddress($user['email'], $user['login']);
|
$mail->AddAddress($user['email'], $user['login']);
|
||||||
$mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));
|
$mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));
|
||||||
$mail->MsgHTML(View::factory('box/users/views/emails/layout_email')
|
$mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
|
||||||
->assign('site_url', $site_url)
|
->assign('site_url', $site_url)
|
||||||
->assign('site_name', $site_name)
|
->assign('site_name', $site_name)
|
||||||
->assign('user_id', $user['id'])
|
->assign('user_id', $user['id'])
|
||||||
->assign('user_login', $user['login'])
|
->assign('user_login', $user['login'])
|
||||||
->assign('new_hash', $new_hash)
|
->assign('new_hash', $new_hash)
|
||||||
->assign('view', 'reset_password_email')
|
->assign('email_template', 'reset-password')
|
||||||
->render());
|
->render());
|
||||||
$mail->Send();
|
$mail->Send();
|
||||||
|
|
||||||
@@ -131,7 +135,7 @@ if (Request::post('reset_password_submit')) {
|
|||||||
Notification::set('reset_password', 'reset_password');
|
Notification::set('reset_password', 'reset_password');
|
||||||
|
|
||||||
// Redirect to password-reset page
|
// Redirect to password-reset page
|
||||||
Request::redirect(Site::url().'admin');
|
Request::redirect(Site::url().'/admin');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +161,7 @@ if ($is_admin) {
|
|||||||
if (Request::get('id')) {
|
if (Request::get('id')) {
|
||||||
$area = Request::get('id');
|
$area = Request::get('id');
|
||||||
} else {
|
} else {
|
||||||
Request::redirect('index.php?id=pages');
|
Request::redirect('index.php?id=dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
$plugins_registered = Plugin::$plugins;
|
$plugins_registered = Plugin::$plugins;
|
||||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
Before Width: | Height: | Size: 28 KiB |
@@ -2,135 +2,169 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
|
<meta http-equiv="x-dns-prefetch-control" content="on">
|
||||||
|
<link rel="dns-prefetch" href="<?php echo Site::url(); ?>" />
|
||||||
|
<link rel="dns-prefetch" href="//www.google-analytics.com" />
|
||||||
|
<link rel="dns-prefetch" href="//www.gravatar.com" />
|
||||||
|
|
||||||
<title>Monstra :: <?php echo __('Administration', 'system'); ?></title>
|
<title>Monstra :: <?php echo __('Administration', 'system'); ?></title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="Monstra admin area" />
|
<meta name="description" content="Monstra Admin Area" />
|
||||||
<link rel="icon" href="<?php echo Option::get('siteurl'); ?>favicon.ico" type="image/x-icon" />
|
<link rel="icon" href="<?php echo Option::get('siteurl'); ?>/favicon.ico" type="image/x-icon" />
|
||||||
<link rel="shortcut icon" href="<?php echo Option::get('siteurl'); ?>favicon.ico" type="image/x-icon" />
|
<link rel="shortcut icon" href="<?php echo Option::get('siteurl'); ?>/favicon.ico" type="image/x-icon" />
|
||||||
|
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
<?php Stylesheet::add('public/assets/css/bootstrap.css', 'backend', 1); ?>
|
<link rel="stylesheet" href="<?php echo Site::url(); ?>/public/assets/css/bootstrap.css" type="text/css" />
|
||||||
<?php Stylesheet::add('public/assets/css/bootstrap-lightbox.css', 'backend', 2); ?>
|
<link rel="stylesheet" href="<?php echo Site::url(); ?>/public/assets/css/messenger.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="<?php echo Site::url(); ?>/public/assets/css/messenger-theme-flat.css" type="text/css" />
|
||||||
|
<?php Stylesheet::add('public/assets/css/chocolat.css', 'backend', 2); ?>
|
||||||
<?php Stylesheet::add('public/assets/css/bootstrap-fileupload.css', 'backend', 3); ?>
|
<?php Stylesheet::add('public/assets/css/bootstrap-fileupload.css', 'backend', 3); ?>
|
||||||
<?php Stylesheet::add('public/assets/css/bootstrap-responsive.css', 'backend', 4); ?>
|
<?php Stylesheet::add('public/assets/css/icheck-blue.css', 'backend', 4); ?>
|
||||||
<?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 5); ?>
|
<?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 5); ?>
|
||||||
<?php Stylesheet::load(); ?>
|
<?php Stylesheet::load(); ?>
|
||||||
|
|
||||||
<!-- JavaScripts -->
|
<!-- JavaScripts -->
|
||||||
<?php Javascript::add('public/assets/js/jquery.js', 'backend', 1); ?>
|
<script src="<?php echo Site::url(); ?>/public/assets/js/jquery.min.js"></script>
|
||||||
<?php Javascript::add('public/assets/js/bootstrap.js', 'backend', 2); ?>
|
<script src="<?php echo Site::url(); ?>/public/assets/js/bootstrap.min.js"></script>
|
||||||
<?php Javascript::add('public/assets/js/bootstrap-lightbox.js', 'backend', 3); ?>
|
<script src="<?php echo Site::url(); ?>/public/assets/js/messenger.min.js"></script>
|
||||||
|
<script src="<?php echo Site::url(); ?>/public/assets/js/icheck.min.js"></script>
|
||||||
|
<?php Javascript::add('public/assets/js/jquery.chocolat.js', 'backend', 3); ?>
|
||||||
<?php Javascript::add('public/assets/js/bootstrap-fileupload.js', 'backend', 4); ?>
|
<?php Javascript::add('public/assets/js/bootstrap-fileupload.js', 'backend', 4); ?>
|
||||||
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 5); ?>
|
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 5); ?>
|
||||||
<?php Javascript::load(); ?>
|
<?php Javascript::load(); ?>
|
||||||
|
|
||||||
<?php Action::run('admin_header'); ?>
|
<?php Action::run('admin_header'); ?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('.chocolat').Chocolat({
|
||||||
|
overlayColor : '#000',
|
||||||
|
leftImg : "<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/left.gif",
|
||||||
|
rightImg : "<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/right.gif",
|
||||||
|
closeImg : "<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/close.gif",
|
||||||
|
loadingImg : "<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/loading.gif"
|
||||||
|
});
|
||||||
|
|
||||||
|
$('input').iCheck({
|
||||||
|
checkboxClass: 'icheckbox_square-blue',
|
||||||
|
radioClass: 'iradio_square-blue',
|
||||||
|
increaseArea: '20%'
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<link rel="stylesheet" href="css/ie.css" type="text/css" media="screen" />
|
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
|
||||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
|
||||||
</head>
|
<body class="page-<?php echo Request::get('id'); ?>">
|
||||||
<body>
|
|
||||||
|
|
||||||
<!-- Block_topbar -->
|
<nav class="navbar navbar-default navbar-inverse" role="navigation">
|
||||||
<div class="monstra-header">
|
<div class="container">
|
||||||
<div class="monstra-header-inner">
|
<div class="navbar-header">
|
||||||
<div class="container-fluid">
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||||
<a class="brand" href="<?php echo Option::get('siteurl'); ?>admin"><img src="<?php echo Option::get('siteurl'); ?>public/assets/img/monstra-logo.png" height="27" width="171"></a>
|
<span class="sr-only">Toggle navigation</span>
|
||||||
<p class="pull-right">
|
<span class="icon-bar"></span>
|
||||||
<?php Navigation::draw('top', Navigation::TOP); ?>
|
<span class="icon-bar"></span>
|
||||||
</p>
|
<span class="icon-bar"></span>
|
||||||
</div>
|
</button>
|
||||||
</div>
|
<a class="navbar-brand" href="<?php echo Site::url(); ?>/admin/index.php?id=dashboard">MONSTRA</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- /Block_topbar -->
|
|
||||||
|
|
||||||
<!-- Block_container -->
|
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||||
<div class="container-fluid">
|
<ul class="nav navbar-nav">
|
||||||
|
<li<?php if (Request::get('id') == 'dashboard') { ?> class="active"<?php } ?>><a href="<?php echo Site::url(); ?>/admin/index.php?id=dashboard"><?php echo __('Dashboard', 'dashboard'); ?></a></li>
|
||||||
<div class="row-fluid">
|
<li class="dropdown">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo __('Content', 'pages'); ?> <b class="caret"></b></a>
|
||||||
<!-- Block_sidebar -->
|
<ul class="dropdown-menu">
|
||||||
|
<?php Navigation::draw('content'); ?>
|
||||||
<div class="span2 monstra-menu-sidebar">
|
</ul>
|
||||||
|
</li>
|
||||||
<div class="hidden-desktop">
|
<?php if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { ?>
|
||||||
<select class="input-block-level" name="sections" id="sections">
|
<li class="dropdown">
|
||||||
<?php
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo __('Extends', 'system'); ?> <b class="caret"></b></a>
|
||||||
Navigation::getDropdown('content');
|
<ul class="dropdown-menu">
|
||||||
Navigation::getDropdown('extends');
|
<?php Navigation::draw('extends'); ?>
|
||||||
Navigation::getDropdown('system');
|
</ul>
|
||||||
?>
|
</li>
|
||||||
</select>
|
<?php } ?>
|
||||||
</div>
|
<li class="dropdown">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo __('System', 'system'); ?> <b class="caret"></b></a>
|
||||||
<div class="hidden-phone hidden-tablet">
|
<ul class="dropdown-menu">
|
||||||
|
<?php Navigation::draw('system'); ?>
|
||||||
<h3><?php echo __('Content', 'pages'); ?></h3>
|
</ul>
|
||||||
<ul>
|
</li>
|
||||||
<?php Navigation::draw('content'); ?>
|
<li class="dropdown">
|
||||||
</ul>
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo __('Help', 'system'); ?> <b class="caret"></b></a>
|
||||||
<div class="monstra-menu-category-separator"></div>
|
<ul class="dropdown-menu">
|
||||||
<?php if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { ?>
|
<li><a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a></li>
|
||||||
<h3><?php echo __('Extends', 'system'); ?></h3>
|
<?php if (Option::get('language') == 'ru') { ?>
|
||||||
<ul>
|
<li><a href="http://ru.forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a></li>
|
||||||
<?php Navigation::draw('extends'); ?>
|
<?php } else { ?>
|
||||||
</ul>
|
<li><a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a></li>
|
||||||
<div class="monstra-menu-category-separator"></div>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<h3><?php echo __('System', 'system'); ?></h3>
|
</ul>
|
||||||
<ul>
|
</li>
|
||||||
<?php Navigation::draw('system'); ?>
|
</ul>
|
||||||
</ul>
|
<ul class="nav navbar-nav navbar-right">
|
||||||
|
<li><a href="<?php echo Site::url(); ?>" target="_blank"><?php echo __('View Site', 'system'); ?></a></li>
|
||||||
|
<li class="dropdown">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo Session::get('user_login'); ?> <img src="<?php echo Users::getGravatarURL(Session::get('user_email'), 28); ?>" alt=""> <b class="caret"></b></a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href="<?php echo Site::url(); ?>/admin/index.php?id=users&action=edit&user_id=<?php echo Session::get('user_id'); ?>"><?php echo __('Profile', 'users')?></a></li>
|
||||||
|
<li><a href="<?php echo Site::url(); ?>/admin/?logout=do"><?php echo __('Log Out', 'users'); ?></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
</div>
|
<div class="container">
|
||||||
|
|
||||||
</div>
|
<?php
|
||||||
<!-- /Block_sidebar -->
|
// Monstra Notifications
|
||||||
|
Notification::get('success') AND Alert::success(Notification::get('success'));
|
||||||
<!-- Block_content -->
|
Notification::get('warning') AND Alert::warning(Notification::get('warning'));
|
||||||
<div class="span10 monstra-content">
|
Notification::get('error') AND Alert::error(Notification::get('error'));
|
||||||
|
?>
|
||||||
<div id="update-monstra"></div>
|
|
||||||
<div><?php Action::run('admin_pre_template'); ?></div>
|
|
||||||
<div>
|
|
||||||
<?php
|
|
||||||
if ($plugin_admin_area) {
|
|
||||||
if (is_callable(ucfirst(Plugin::$plugins[$area]['id']).'Admin::main')) {
|
|
||||||
call_user_func(ucfirst(Plugin::$plugins[$area]['id']).'Admin::main');
|
|
||||||
} else {
|
|
||||||
echo '<div class="message-error">'.__('Plugin main admin function does not exist', 'system').'</div>';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo '<div class="message-error">'.__('Plugin does not exist', 'system').'</div>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<div><?php Action::run('admin_post_template'); ?></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- /Block_content -->
|
|
||||||
|
|
||||||
|
<div id="update-monstra"></div>
|
||||||
|
<div><?php Action::run('admin_pre_template'); ?></div>
|
||||||
|
<div>
|
||||||
|
<?php
|
||||||
|
if ($plugin_admin_area) {
|
||||||
|
if (is_callable(ucfirst(Plugin::$plugins[$area]['id']).'Admin::main')) {
|
||||||
|
call_user_func(ucfirst(Plugin::$plugins[$area]['id']).'Admin::main');
|
||||||
|
} else {
|
||||||
|
echo '<div class="message-error">'.__('Plugin main admin function does not exist', 'system').'</div>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<div class="message-error">'.__('Plugin does not exist', 'system').'</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
<div><?php Action::run('admin_post_template'); ?></div>
|
||||||
<!-- Block_footer -->
|
</div>
|
||||||
<footer>
|
<div class="margin-top-1 margin-bottom-1 hidden-md"></div>
|
||||||
<p class="pull-right">
|
<footer class="container visible-md visible-lg">
|
||||||
<span style="border-top:1px solid #E0E0E0; padding-top:10px;">
|
<p class="pull-right">
|
||||||
<span class="hidden-phone">
|
<span>
|
||||||
<a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a> /
|
<?php if (Option::get('language') == 'ru') { ?>
|
||||||
<a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a> /
|
<a href="http://ru.forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a> /
|
||||||
</span>
|
<?php } else { ?>
|
||||||
© 2012 - 2014 <a href="http://monstra.org" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?>
|
<a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a> /
|
||||||
</span>
|
<?php } ?>
|
||||||
</p>
|
<a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a> /
|
||||||
</footer>
|
© 2012 - 2014 <a href="http://monstra.org" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?>
|
||||||
<!-- /Block_footer -->
|
</span>
|
||||||
|
</p>
|
||||||
</div>
|
</footer>
|
||||||
<!-- /Block_container -->
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -1,26 +1,23 @@
|
|||||||
/**
|
/**
|
||||||
* Monstra JS module
|
* Monstra JS module
|
||||||
* @package Monstra
|
*
|
||||||
* @author Romanenko Sergey / Awilum
|
* This source file is part of the Monstra Engine. More information,
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* documentation and tutorials can be found at http://monstra.org
|
||||||
* @version $Id$
|
*
|
||||||
* @since 1.0.0
|
* @package Monstra
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
*
|
||||||
* Monstra is free software. This version may have been modified pursuant
|
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||||
* to the GNU General Public License, and as distributed it includes or
|
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||||
* is derivative of works licensed under the GNU General Public License or
|
*
|
||||||
* other free or open source software licenses.
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* See COPYING.txt for copyright notices and details.
|
* file that was distributed with this source code.
|
||||||
* @filesource
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Confirm delete */
|
/* Confirm delete */
|
||||||
function confirmDelete(msg){var data=confirm(msg+" ?"); return data;}
|
function confirmDelete(msg){var data=confirm(msg+" ?"); return data;}
|
||||||
|
|
||||||
$(document).ready(function() {
|
/* Messanger */
|
||||||
/* DropDown Menu for Mobile Devices */
|
Messenger.options = {
|
||||||
$("#sections").change(function(){
|
extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
|
||||||
window.location = $('#sections option:selected').attr('rel');
|
theme: 'flat'
|
||||||
});
|
}
|
||||||
});
|
|
@@ -5,22 +5,28 @@
|
|||||||
<title>Monstra :: <?php echo __('Administration', 'system'); ?></title>
|
<title>Monstra :: <?php echo __('Administration', 'system'); ?></title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="Monstra Admin Area">
|
<meta name="description" content="Monstra Admin Area">
|
||||||
<link rel="icon" href="<?php echo Option::get('siteurl'); ?>favicon.ico" type="image/x-icon" />
|
<link rel="icon" href="<?php echo Option::get('siteurl'); ?>/favicon.ico" type="image/x-icon" />
|
||||||
<link rel="shortcut icon" href="<?php echo Option::get('siteurl'); ?>favicon.ico" type="image/x-icon" />
|
<link rel="shortcut icon" href="<?php echo Option::get('siteurl'); ?>/favicon.ico" type="image/x-icon" />
|
||||||
|
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
<?php Stylesheet::add('public/assets/css/bootstrap.css', 'backend', 1); ?>
|
<link rel="stylesheet" href="<?php echo Site::url(); ?>/public/assets/css/bootstrap.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="<?php echo Site::url(); ?>/public/assets/css/messenger.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="<?php echo Site::url(); ?>/public/assets/css/messenger-theme-flat.css" type="text/css" />
|
||||||
<?php Stylesheet::add('public/assets/css/bootstrap-lightbox.css', 'backend', 2); ?>
|
<?php Stylesheet::add('public/assets/css/bootstrap-lightbox.css', 'backend', 2); ?>
|
||||||
<?php Stylesheet::add('public/assets/css/bootstrap-responsive.css', 'backend', 3); ?>
|
<?php Stylesheet::add('public/assets/css/bootstrap-fileupload.css', 'backend', 3); ?>
|
||||||
<?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 4); ?>
|
<?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 5); ?>
|
||||||
<?php Stylesheet::load(); ?>
|
<?php Stylesheet::load(); ?>
|
||||||
|
|
||||||
<!-- JavaScripts -->
|
<!-- JavaScripts -->
|
||||||
<?php Javascript::add('public/assets/js/jquery.js', 'backend', 1); ?>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
<?php Javascript::add('public/assets/js/bootstrap.js', 'backend', 2); ?>
|
<script src="<?php echo Site::url(); ?>/public/assets/js/bootstrap.min.js"></script>
|
||||||
|
<script src="<?php echo Site::url(); ?>/public/assets/js/messenger.min.js"></script>
|
||||||
|
<script src="<?php echo Site::url(); ?>/public/assets/js/messenger-theme-flat.js"></script>
|
||||||
<?php Javascript::add('public/assets/js/bootstrap-lightbox.js', 'backend', 3); ?>
|
<?php Javascript::add('public/assets/js/bootstrap-lightbox.js', 'backend', 3); ?>
|
||||||
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 4); ?>
|
<?php Javascript::add('public/assets/js/bootstrap-fileupload.js', 'backend', 4); ?>
|
||||||
|
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 5); ?>
|
||||||
<?php Javascript::load(); ?>
|
<?php Javascript::load(); ?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$().ready(function () {
|
$().ready(function () {
|
||||||
<?php if (Notification::get('reset_password') == 'reset_password') { ?>
|
<?php if (Notification::get('reset_password') == 'reset_password') { ?>
|
||||||
@@ -45,47 +51,56 @@
|
|||||||
|
|
||||||
<?php Action::run('admin_header'); ?>
|
<?php Action::run('admin_header'); ?>
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
<link rel="stylesheet" href="css/ie.css" type="text/css" media="screen" />
|
<!--[if lt IE 9]>
|
||||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
|
||||||
<![endif]-->
|
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
|
||||||
|
<![endif]-->
|
||||||
</head>
|
</head>
|
||||||
<body class="login-body">
|
<body class="login-body">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Monstra Notifications
|
||||||
|
Notification::get('success') AND Alert::success(Notification::get('success'));
|
||||||
|
Notification::get('warning') AND Alert::warning(Notification::get('warning'));
|
||||||
|
Notification::get('error') AND Alert::error(Notification::get('error'));
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="container form-signin">
|
<div class="container form-signin">
|
||||||
|
|
||||||
<div style="text-align:center;"><a class="brand" href="<?php echo Option::get('siteurl'); ?>admin"><img src="<?php echo Option::get('siteurl'); ?>public/assets/img/monstra-logo.png" height="27" width="171"></a></div>
|
<div class="text-center"><a class="brand" href="<?php echo Option::get('siteurl'); ?>/admin"><img src="<?php echo Option::get('siteurl'); ?>/public/assets/img/monstra-logo-256px.png" alt="monstra" /></a></div>
|
||||||
<div class="administration-area">
|
<div class="administration-area well">
|
||||||
<hr>
|
|
||||||
<div>
|
<div>
|
||||||
<h2 style="text-align:center;"><?php echo __('Administration', 'system'); ?></h2><br />
|
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<label><?php echo __('Username', 'users'); ?></label>
|
<div class="form-group">
|
||||||
<input class="input-xlarge" name="login" type="text" />
|
<label><?php echo __('Username', 'users'); ?></label>
|
||||||
|
<input class="form-control" name="login" type="text" />
|
||||||
<label><?php echo __('Password', 'users'); ?></label>
|
</div>
|
||||||
<input class="input-xlarge" name="password" type="password" />
|
<div class="form-group">
|
||||||
<br />
|
<label><?php echo __('Password', 'users'); ?></label>
|
||||||
<?php if (isset($login_error) && $login_error !== '') { ?><div class="alert alert-error"><?php echo $login_error; ?></div><?php } ?>
|
<input class="form-control" name="password" type="password" />
|
||||||
<input type="submit" name="login_submit" class="btn" value="<?php echo __('Log In', 'users'); ?>" />
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" name="login_submit" class="btn btn-primary" value="<?php echo __('Log In', 'users'); ?>" />
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="reset-password-area">
|
<div class="reset-password-area well">
|
||||||
<hr>
|
|
||||||
<div>
|
<div>
|
||||||
<h2 style="text-align:center;"><?php echo __('Reset Password', 'users'); ?></h2><br />
|
|
||||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
|
||||||
<form method="post">
|
<form method="post">
|
||||||
|
<div class="form-group">
|
||||||
<label><?php echo __('Username', 'users'); ?></label>
|
<label><?php echo __('Username', 'users'); ?></label>
|
||||||
<input name="login" class="input-xlarge" type="text" value="<?php echo $user_login; ?>" />
|
<input name="login" class="form-control" type="text" value="<?php echo $user_login; ?>" />
|
||||||
|
</div>
|
||||||
<?php if (Option::get('captcha_installed') == 'true') { ?>
|
<?php if (Option::get('captcha_installed') == 'true') { ?>
|
||||||
|
<div class="form-group">
|
||||||
<label><?php echo __('Captcha', 'users'); ?></label>
|
<label><?php echo __('Captcha', 'users'); ?></label>
|
||||||
<input type="text" name="answer" class="input-xlarge">
|
<input type="text" name="answer" class="form-control">
|
||||||
|
<br>
|
||||||
<?php CryptCaptcha::draw(); ?>
|
<?php CryptCaptcha::draw(); ?>
|
||||||
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php
|
||||||
@@ -95,24 +110,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<input type="submit" name="reset_password_submit" class="btn" value="<?php echo __('Send New Password', 'users')?>" />
|
<div class="form-group">
|
||||||
|
<input type="submit" name="reset_password_submit" class="btn btn-primary" value="<?php echo __('Send New Password', 'users')?>" />
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
|
||||||
<div>
|
|
||||||
<div style="text-align:center;">
|
|
||||||
<a class="small-grey-text" href="<?php echo Option::get('siteurl'); ?>"><?php echo __('< Back to Website', 'system');?></a> -
|
|
||||||
<a class="small-grey-text reset-password-btn" href="javascript:;"><?php echo __('Forgot your password? >', 'system');?></a>
|
|
||||||
<a class="small-grey-text administration-btn" href="javascript:;"><?php echo __('Administration >', 'system');?></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="text-align:center">
|
<div class="login-footer">
|
||||||
<span class="small-grey-text">© 2012 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
|
|
||||||
|
<div class="text-center">
|
||||||
|
<a href="<?php echo Option::get('siteurl'); ?>"><?php echo __('Back to Website', 'system');?></a> -
|
||||||
|
<a class="reset-password-btn" href="javascript:;"><?php echo __('Forgot your password ?', 'system');?></a>
|
||||||
|
<a class="administration-btn" href="javascript:;"><?php echo __('Log In', 'users');?></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<span>© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -35,16 +35,21 @@ class Alert
|
|||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $message Message
|
* @param string $message Message
|
||||||
* @param integer $time Time
|
* @param integer $seconds Seconds
|
||||||
*/
|
*/
|
||||||
public static function success($message, $time = 3000)
|
public static function success($message, $seconds = 3)
|
||||||
{
|
{
|
||||||
// Redefine vars
|
// Redefine vars
|
||||||
$message = (string) $message;
|
$message = (string) $message;
|
||||||
$time = (int) $time;
|
$seconds = (int) $seconds;
|
||||||
|
|
||||||
echo '<div class="alert alert-info">'.$message.'</div>
|
echo '<script type="text/javascript">
|
||||||
<script type="text/javascript">setTimeout(\'$(".alert").slideUp("slow")\', '.$time.'); </script>';
|
Messenger().post({
|
||||||
|
type: "success",
|
||||||
|
message : "'.$message.'",
|
||||||
|
hideAfter: '.$seconds.'
|
||||||
|
});
|
||||||
|
</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,16 +60,21 @@ class Alert
|
|||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $message Message
|
* @param string $message Message
|
||||||
* @param integer $time Time
|
* @param integer $seconds Seconds
|
||||||
*/
|
*/
|
||||||
public static function warning($message, $time = 3000)
|
public static function warning($message, $seconds = 3)
|
||||||
{
|
{
|
||||||
// Redefine vars
|
// Redefine vars
|
||||||
$message = (string) $message;
|
$message = (string) $message;
|
||||||
$time = (int) $time;
|
$seconds = (int) $seconds;
|
||||||
|
|
||||||
echo '<div class="alert alert-warning">'.$message.'</div>
|
echo '<script type="text/javascript">
|
||||||
<script type="text/javascript">setTimeout(\'$(".alert").slideUp("slow")\', '.$time.'); </script>';
|
Messenger().post({
|
||||||
|
type: "info",
|
||||||
|
message : "'.$message.'",
|
||||||
|
hideAfter: '.$seconds.'
|
||||||
|
});
|
||||||
|
</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,16 +85,21 @@ class Alert
|
|||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $message Message
|
* @param string $message Message
|
||||||
* @param integer $time Time
|
* @param integer $seconds Seconds
|
||||||
*/
|
*/
|
||||||
public static function error($message, $time = 3000)
|
public static function error($message, $seconds = 3)
|
||||||
{
|
{
|
||||||
// Redefine vars
|
// Redefine vars
|
||||||
$message = (string) $message;
|
$message = (string) $message;
|
||||||
$time = (int) $time;
|
$seconds = (int) $seconds;
|
||||||
|
|
||||||
echo '<div class="alert alert-error">'.$message.'</div>
|
echo '<script type="text/javascript">
|
||||||
<script type="text/javascript">setTimeout(\'$(".alert").slideUp("slow")\', '.$time.'); </script>';
|
Messenger().post({
|
||||||
|
type: "error",
|
||||||
|
message : "'.$message.'",
|
||||||
|
hideAfter: '.$seconds.'
|
||||||
|
});
|
||||||
|
</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,8 @@ class Monstra
|
|||||||
/**
|
/**
|
||||||
* The version of Monstra
|
* The version of Monstra
|
||||||
*/
|
*/
|
||||||
const VERSION = '2.3.0';
|
const VERSION = '3.0.1';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Monstra environment
|
* Monstra environment
|
||||||
@@ -188,7 +189,7 @@ class Monstra
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Auto cleanup if MONSTRA_DEBUG is TRUE
|
* Auto cleanup if DEVELOPMENT environment
|
||||||
*/
|
*/
|
||||||
if (Monstra::$environment == Monstra::DEVELOPMENT) {
|
if (Monstra::$environment == Monstra::DEVELOPMENT) {
|
||||||
Monstra::cleanTmp();
|
Monstra::cleanTmp();
|
||||||
@@ -223,7 +224,11 @@ class Monstra
|
|||||||
/**
|
/**
|
||||||
* Init I18n
|
* Init I18n
|
||||||
*/
|
*/
|
||||||
I18n::init(Option::get('language'));
|
if (BACKEND) {
|
||||||
|
I18n::init('admin', Option::get('language'));
|
||||||
|
} else {
|
||||||
|
I18n::init('site', Site::getCurrentSiteLocale());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init Plugins API
|
* Init Plugins API
|
||||||
@@ -314,6 +319,7 @@ class Monstra
|
|||||||
if (count($namespaces = Dir::scan(CACHE)) > 0) foreach ($namespaces as $namespace) Dir::delete(CACHE . DS . $namespace);
|
if (count($namespaces = Dir::scan(CACHE)) > 0) foreach ($namespaces as $namespace) Dir::delete(CACHE . DS . $namespace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize Monstra Engine
|
* Initialize Monstra Engine
|
||||||
*
|
*
|
||||||
|
@@ -47,7 +47,7 @@ class Action
|
|||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $action_name Action name
|
* @param string $action_name Action name
|
||||||
* @param string $added_function Added function
|
* @param mixed $added_function Added function
|
||||||
* @param integer $priority Priority. Default is 10
|
* @param integer $priority Priority. Default is 10
|
||||||
* @param array $args Arguments
|
* @param array $args Arguments
|
||||||
*/
|
*/
|
||||||
@@ -56,7 +56,7 @@ class Action
|
|||||||
// Hooks a function on to a specific action.
|
// Hooks a function on to a specific action.
|
||||||
Action::$actions[] = array(
|
Action::$actions[] = array(
|
||||||
'action_name' => (string) $action_name,
|
'action_name' => (string) $action_name,
|
||||||
'function' => (string) $added_function,
|
'function' => $added_function,
|
||||||
'priority' => (int) $priority,
|
'priority' => (int) $priority,
|
||||||
'args' => $args
|
'args' => $args
|
||||||
);
|
);
|
||||||
|
@@ -91,7 +91,7 @@ class Filter
|
|||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $filter_name The name of the filter to hook the $function_to_add to.
|
* @param string $filter_name The name of the filter to hook the $function_to_add to.
|
||||||
* @param string $function_to_add The name of the function to be called when the filter is applied.
|
* @param mixed $function_to_add The name of the function to be called when the filter is applied.
|
||||||
* @param integer $priority Function to add priority - default is 10.
|
* @param integer $priority Function to add priority - default is 10.
|
||||||
* @param integer $accepted_args The number of arguments the function accept default is 1.
|
* @param integer $accepted_args The number of arguments the function accept default is 1.
|
||||||
* @return boolean
|
* @return boolean
|
||||||
@@ -100,7 +100,7 @@ class Filter
|
|||||||
{
|
{
|
||||||
// Redefine arguments
|
// Redefine arguments
|
||||||
$filter_name = (string) $filter_name;
|
$filter_name = (string) $filter_name;
|
||||||
$function_to_add = (string) $function_to_add;
|
$function_to_add = $function_to_add;
|
||||||
$priority = (int) $priority;
|
$priority = (int) $priority;
|
||||||
$accepted_args = (int) $accepted_args;
|
$accepted_args = (int) $accepted_args;
|
||||||
|
|
||||||
|
@@ -38,6 +38,7 @@ class I18n
|
|||||||
'gl' => 'Galego',
|
'gl' => 'Galego',
|
||||||
'hu' => 'Magyar',
|
'hu' => 'Magyar',
|
||||||
'it' => 'Italiano',
|
'it' => 'Italiano',
|
||||||
|
'id' => 'Bahasa Indonesia',
|
||||||
'ja' => '日本語',
|
'ja' => '日本語',
|
||||||
'lt' => 'Lietuvių',
|
'lt' => 'Lietuvių',
|
||||||
'nl' => 'Nederlands',
|
'nl' => 'Nederlands',
|
||||||
@@ -52,7 +53,7 @@ class I18n
|
|||||||
'sr-yu' => 'Serbian',
|
'sr-yu' => 'Serbian',
|
||||||
'tr' => 'Türkçe',
|
'tr' => 'Türkçe',
|
||||||
'uk' => 'Українська',
|
'uk' => 'Українська',
|
||||||
'zh' => '中文',
|
'zh-cn' => '䏿–‡',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,9 +75,9 @@ class I18n
|
|||||||
*
|
*
|
||||||
* @param string $dir Plugins directory
|
* @param string $dir Plugins directory
|
||||||
*/
|
*/
|
||||||
public static function init($locale)
|
public static function init($namespace = 'default', $locale)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$instance)) self::$instance = new I18n($locale);
|
if ( ! isset(self::$instance)) self::$instance = new I18n($namespace, $locale);
|
||||||
return self::$instance;
|
return self::$instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,13 +94,13 @@ class I18n
|
|||||||
/**
|
/**
|
||||||
* Construct
|
* Construct
|
||||||
*/
|
*/
|
||||||
protected function __construct($locale)
|
protected function __construct($namespace = 'default', $locale)
|
||||||
{
|
{
|
||||||
// Redefine arguments
|
// Redefine arguments
|
||||||
$locale = (string) $locale;
|
$locale = (string) $locale;
|
||||||
|
|
||||||
// Get lang table for current locale
|
// Get lang table for current locale
|
||||||
$lang_table = Cache::get('i18n', $locale);
|
$lang_table = Cache::get('i18n_'.$namespace, $locale);
|
||||||
|
|
||||||
// If lang_table is empty then create new
|
// If lang_table is empty then create new
|
||||||
if (! $lang_table) {
|
if (! $lang_table) {
|
||||||
@@ -135,7 +136,7 @@ class I18n
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save lang table for current locale
|
// Save lang table for current locale
|
||||||
Cache::put('i18n', $locale, $lang_table);
|
Cache::put('i18n_'.$namespace, $locale, $lang_table);
|
||||||
|
|
||||||
// Update dictionary
|
// Update dictionary
|
||||||
I18n::$dictionary = $lang_table;
|
I18n::$dictionary = $lang_table;
|
||||||
|
@@ -92,7 +92,7 @@ class Javascript
|
|||||||
if ($backend_regenerate) {
|
if ($backend_regenerate) {
|
||||||
foreach ($javascripts as $javascript) {
|
foreach ($javascripts as $javascript) {
|
||||||
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both')) ) {
|
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both')) ) {
|
||||||
$backend_buffer .= file_get_contents(ROOT . DS . $javascript['file']);
|
$backend_buffer .= file_get_contents(ROOT . DS . $javascript['file'])."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_put_contents($backend_site_js_path, $backend_buffer);
|
file_put_contents($backend_site_js_path, $backend_buffer);
|
||||||
@@ -115,7 +115,7 @@ class Javascript
|
|||||||
if ($frontend_regenerate) {
|
if ($frontend_regenerate) {
|
||||||
foreach ($javascripts as $javascript) {
|
foreach ($javascripts as $javascript) {
|
||||||
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both')) ) {
|
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both')) ) {
|
||||||
$frontend_buffer .= file_get_contents(ROOT . DS . $javascript['file']);
|
$frontend_buffer .= file_get_contents(ROOT . DS . $javascript['file'])."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_put_contents($frontend_site_js_path, $frontend_buffer);
|
file_put_contents($frontend_site_js_path, $frontend_buffer);
|
||||||
@@ -126,11 +126,19 @@ class Javascript
|
|||||||
|
|
||||||
// Render
|
// Render
|
||||||
if (BACKEND) {
|
if (BACKEND) {
|
||||||
echo '<script type="text/javascript" src="'.Option::get('siteurl').'tmp/minify/backend_site.minify.js"></script>';
|
echo '<script type="text/javascript" src="'.Option::get('siteurl').'/tmp/minify/backend_site.minify.js?'.Option::get('javascript_version').'"></script>';
|
||||||
} else {
|
} else {
|
||||||
echo '<script type="text/javascript" src="'.Option::get('siteurl').'tmp/minify/frontend_site.minify.js"></script>';
|
echo '<script type="text/javascript" src="'.Option::get('siteurl').'/tmp/minify/frontend_site.minify.js?'.Option::get('javascript_version').'"></script>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* javascriptVersionIncrement
|
||||||
|
*/
|
||||||
|
public static function javascriptVersionIncrement() {
|
||||||
|
Option::update('javascript_version', (int) Option::get('javascript_version') + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -128,9 +128,9 @@ class Stylesheet
|
|||||||
|
|
||||||
// Render
|
// Render
|
||||||
if (BACKEND) {
|
if (BACKEND) {
|
||||||
echo '<link rel="stylesheet" href="'.Option::get('siteurl').'tmp/minify/backend_site.minify.css'.'" type="text/css" />';
|
echo '<link rel="stylesheet" href="'.Option::get('siteurl').'/tmp/minify/backend_site.minify.css?'.Option::get('styles_version').'" type="text/css" />';
|
||||||
} else {
|
} else {
|
||||||
echo '<link rel="stylesheet" href="'.Option::get('siteurl').'tmp/minify/frontend_site.minify.css'.'" type="text/css" />'."\n";
|
echo '<link rel="stylesheet" href="'.Option::get('siteurl').'/tmp/minify/frontend_site.minify.css?'.Option::get('styles_version').'" type="text/css" />'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -144,9 +144,16 @@ class Stylesheet
|
|||||||
'@theme_site_url',
|
'@theme_site_url',
|
||||||
'@theme_admin_url'),
|
'@theme_admin_url'),
|
||||||
array(Option::get('siteurl'),
|
array(Option::get('siteurl'),
|
||||||
Option::get('siteurl').'public/themes/'.Option::get('theme_site_name'),
|
Option::get('siteurl').'/public/themes/'.Option::get('theme_site_name'),
|
||||||
Option::get('siteurl').'admin/themes/'.Option::get('theme_admin_name')),
|
Option::get('siteurl').'/admin/themes/'.Option::get('theme_admin_name')),
|
||||||
$frontend_buffer);
|
$frontend_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* stylesVersionIncrement
|
||||||
|
*/
|
||||||
|
public static function stylesVersionIncrement() {
|
||||||
|
Option::update('styles_version', (int) Option::get('styles_version') + 1);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -111,7 +111,7 @@ class Security
|
|||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $str String
|
* @param string $str String
|
||||||
* @param string $delimiter String delimiter
|
* @param mixed $delimiter String delimiter
|
||||||
* @param boolean $lowercase String Lowercase
|
* @param boolean $lowercase String Lowercase
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -119,9 +119,9 @@ class Security
|
|||||||
{
|
{
|
||||||
// Redefine vars
|
// Redefine vars
|
||||||
$str = (string) $str;
|
$str = (string) $str;
|
||||||
$delimiter = (string) $delimiter;
|
$delimiter = $delimiter;
|
||||||
$lowercase = (bool) $lowercase;
|
$lowercase = (bool) $lowercase;
|
||||||
$delimiter = (string) $delimiter;
|
$delimiter = $delimiter;
|
||||||
|
|
||||||
// Remove tags
|
// Remove tags
|
||||||
$str = filter_var($str, FILTER_SANITIZE_STRING);
|
$str = filter_var($str, FILTER_SANITIZE_STRING);
|
||||||
@@ -149,9 +149,11 @@ class Security
|
|||||||
$str = iconv('UTF-8', 'ASCII//TRANSLIT', $str);
|
$str = iconv('UTF-8', 'ASCII//TRANSLIT', $str);
|
||||||
|
|
||||||
// Remove characters
|
// Remove characters
|
||||||
$str = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $str );
|
$str = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $str);
|
||||||
$str = preg_replace("/[\/_|+ -]+/", $delimiter, $str );
|
if ($delimiter != null) {
|
||||||
$str = trim($str, $delimiter);
|
$str = preg_replace("/[\/_|+ -]+/", $delimiter, $str);
|
||||||
|
$str = trim($str, $delimiter);
|
||||||
|
}
|
||||||
|
|
||||||
// Lowercase
|
// Lowercase
|
||||||
if ($lowercase === true) $str = Text::lowercase($str);
|
if ($lowercase === true) $str = Text::lowercase($str);
|
||||||
|
@@ -221,4 +221,38 @@ class Site
|
|||||||
return __('Powered by', 'system').' <a href="http://monstra.org" target="_blank">Monstra</a> ' . Monstra::VERSION;
|
return __('Powered by', 'system').' <a href="http://monstra.org" target="_blank">Monstra</a> ' . Monstra::VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getLocales() {
|
||||||
|
$language_files = File::scan(PLUGINS_BOX . DS . 'system' . DS . 'languages' . DS, '.lang.php');
|
||||||
|
foreach ($language_files as $language) {
|
||||||
|
$parts = explode('.', $language);
|
||||||
|
$languages_array[$parts[0]] = I18n::$locales[$parts[0]];
|
||||||
|
}
|
||||||
|
return $languages_array;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getDefaultSiteLocale() {
|
||||||
|
return Option::get('site_language');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getCurrentSiteLocale() {
|
||||||
|
$site_locales = Site::getLocales();
|
||||||
|
|
||||||
|
|
||||||
|
if (Uri::segment(0) && array_key_exists(Uri::segment(0), $site_locales)) {
|
||||||
|
return Uri::segment(0);
|
||||||
|
} else {
|
||||||
|
$site_locale = Cookie::get('site_locale');
|
||||||
|
return !empty($site_locale) ? $site_locale : Option::get('site_language');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
<?php defined('MONSTRA_ACCESS') or die('No direct script access.');
|
<?php defined('MONSTRA_ACCESS') or die('No direct script access.');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Monstra requires PHP 5.2.3 or greater
|
* Monstra requires PHP 5.3.0 or greater
|
||||||
*/
|
*/
|
||||||
if (version_compare(PHP_VERSION, "5.2.3", "<")) {
|
if (version_compare(PHP_VERSION, "5.3.0", "<")) {
|
||||||
exit("Monstra requires PHP 5.2.3 or greater.");
|
exit("Monstra requires PHP 5.3.0 or greater.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -4,4 +4,4 @@
|
|||||||
* Set meta generator
|
* Set meta generator
|
||||||
*/
|
*/
|
||||||
Action::add('theme_meta', 'setMetaGenerator');
|
Action::add('theme_meta', 'setMetaGenerator');
|
||||||
function setMetaGenerator() { echo '<meta name="generator" content="Powered by Monstra '.Monstra::VERSION.'" />'; }
|
function setMetaGenerator() { echo '<meta name="generator" content="Powered by Monstra '.Monstra::VERSION.'" />'."\n"; }
|
||||||
|
BIN
favicon.ico
BIN
favicon.ico
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 31 KiB |
12
index.php
12
index.php
@@ -38,6 +38,18 @@ if (file_exists('install.php')) {
|
|||||||
// Load Engine init file
|
// Load Engine init file
|
||||||
require_once ROOT. DS . 'engine'. DS . '_init.php';
|
require_once ROOT. DS . 'engine'. DS . '_init.php';
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
$pages = new Table('pages');
|
||||||
|
$pages_list = $pages->select(null, 'all');
|
||||||
|
|
||||||
|
foreach($pages_list as $page) {
|
||||||
|
$pages->update($page['id'], array('locale' => 'en'));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Option::add('site_language', 'ru');
|
||||||
|
|
||||||
// Check for maintenance mod
|
// Check for maintenance mod
|
||||||
if ('on' == Option::get('maintenance_status')) {
|
if ('on' == Option::get('maintenance_status')) {
|
||||||
|
|
||||||
|
562
install.php
562
install.php
@@ -16,8 +16,14 @@
|
|||||||
// Get array with the names of all modules compiled and loaded
|
// Get array with the names of all modules compiled and loaded
|
||||||
$php_modules = get_loaded_extensions();
|
$php_modules = get_loaded_extensions();
|
||||||
|
|
||||||
|
// Get server port
|
||||||
|
if ($_SERVER["SERVER_PORT"] == "80") $port = ""; else $port = ':'.$_SERVER["SERVER_PORT"];
|
||||||
|
|
||||||
// Get site URL
|
// Get site URL
|
||||||
$site_url = 'http://'.$_SERVER["SERVER_NAME"].str_replace(array("index.php", "install.php"), "", $_SERVER['PHP_SELF']);
|
$site_url = 'http://'.$_SERVER["SERVER_NAME"].$port.str_replace(array("index.php", "install.php"), "", $_SERVER['PHP_SELF']);
|
||||||
|
|
||||||
|
// Replace last slash in site_url
|
||||||
|
$site_url = rtrim($site_url, '/');
|
||||||
|
|
||||||
// Rewrite base
|
// Rewrite base
|
||||||
$rewrite_base = str_replace(array("index.php", "install.php"), "", $_SERVER['PHP_SELF']);
|
$rewrite_base = str_replace(array("index.php", "install.php"), "", $_SERVER['PHP_SELF']);
|
||||||
@@ -29,16 +35,21 @@
|
|||||||
$dir_array = array('public', 'storage', 'backups', 'tmp');
|
$dir_array = array('public', 'storage', 'backups', 'tmp');
|
||||||
|
|
||||||
// Languages array
|
// Languages array
|
||||||
$languages_array = array('en', 'fr', 'de', 'it', 'es', 'lt', 'pl', 'pt-br', 'ru', 'uk', 'hu', 'fa' , 'sk', 'nl', 'sr-yu');
|
$languages_array = array('en', 'ru', 'fr', 'de', 'it', 'es', 'lt', 'pl', 'pt-br', 'hu', 'fa' , 'sk', 'uk', 'nl', 'sr-yu', 'id', 'ja', 'zh-cn', 'tr');
|
||||||
|
|
||||||
// Select Monstra language
|
// Select Monstra language
|
||||||
if (Request::get('language')) {
|
if (Request::get('language')) {
|
||||||
|
if (Request::get('action') && Request::get('action') == 'install') {
|
||||||
|
$action = '?action=install';
|
||||||
|
} else {
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
if (in_array(Request::get('language'), $languages_array)) {
|
if (in_array(Request::get('language'), $languages_array)) {
|
||||||
if (Option::update('language', Request::get('language'))) {
|
if (Option::update('language', Request::get('language'))) {
|
||||||
Request::redirect($site_url);
|
Request::redirect($site_url.$action);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Request::redirect($site_url);
|
Request::redirect($site_url.$action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,6 +110,8 @@
|
|||||||
|
|
||||||
// Installation done :)
|
// Installation done :)
|
||||||
header("location: index.php?install=done");
|
header("location: index.php?install=done");
|
||||||
|
} else {
|
||||||
|
Notification::setNow('errors', $errors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -109,60 +122,75 @@
|
|||||||
<title>Monstra :: Install</title>
|
<title>Monstra :: Install</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="Monstra Install Area">
|
<meta name="description" content="Monstra Install Area">
|
||||||
<link rel="icon" href="<?php echo $site_url; ?>favicon.ico" type="image/x-icon" />
|
<link rel="icon" href="<?php echo $site_url; ?>/favicon.ico" type="image/x-icon" />
|
||||||
<link rel="shortcut icon" href="<?php echo $site_url; ?>favicon.ico" type="image/x-icon" />
|
<link rel="shortcut icon" href="<?php echo $site_url; ?>/favicon.ico" type="image/x-icon" />
|
||||||
<link rel="stylesheet" href="<?php echo $site_url; ?>public/assets/css/bootstrap.css" media="all" type="text/css" />
|
<link rel="stylesheet" href="<?php echo $site_url; ?>/public/assets/css/bootstrap.css" media="all" type="text/css" />
|
||||||
<link rel="stylesheet" href="<?php echo $site_url; ?>public/assets/css/bootstrap-responsive.css" media="all" type="text/css" />
|
<link rel="stylesheet" href="<?php echo $site_url; ?>/admin/themes/default/css/default.css" media="all" type="text/css" />
|
||||||
<link rel="stylesheet" href="<?php echo $site_url; ?>admin/themes/default/css/default.css" media="all" type="text/css" />
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
.input-xlarge {
|
.install-body {
|
||||||
width: 285px;
|
margin-top: 40px;
|
||||||
|
background: #FAFAFA;
|
||||||
}
|
}
|
||||||
|
|
||||||
.install-languages {
|
.install-languages {
|
||||||
margin: 0 auto 15px;
|
margin: 20px auto 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 390px;
|
width: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.install-block {
|
.install-block,
|
||||||
|
.monstra-dialog,
|
||||||
|
.install-block-footer {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
float: none!important;
|
width: 600px;
|
||||||
max-width: 300px;
|
|
||||||
padding: 19px 29px 29px;
|
|
||||||
background: none repeat scroll 0 0 #fff;
|
|
||||||
-webkit-box-shadow: 0 1px 5px rgba(0,0,0,.15);
|
|
||||||
-moz-box-shadow: 0 1px 5px rgba(0,0,0,.15);
|
|
||||||
box-shadow: 0 1px 5px rgba(0,0,0,.15);
|
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.install-block-footer {
|
.install-block-footer {
|
||||||
margin: 0 auto;
|
margin-top: 20px;
|
||||||
float: none!important;
|
margin-bottom: 20px;
|
||||||
margin-top:10px;
|
|
||||||
margin-bottom:10px;
|
|
||||||
max-width: 300px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.install-body {
|
.well {
|
||||||
background-color: #FBFBFB;
|
border: none;
|
||||||
padding-top:40px;
|
border-radius: 0px;
|
||||||
|
background: #fff;
|
||||||
|
color: #555;
|
||||||
|
-webkit-font-smoothing: subpixel-antialiased;
|
||||||
|
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,.13);
|
||||||
|
box-shadow: 0 1px 3px rgba(0,0,0,.13);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.form-control {
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.monstra-says {
|
||||||
|
margin: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error {
|
.error {
|
||||||
color:#8E0505;
|
color:#8E0505;
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ok {
|
.ok {
|
||||||
color:#00853F;
|
color:#00853F;
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.warn {
|
.warn {
|
||||||
color: #F74C18;
|
color: #F74C18;
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.install-languages a {
|
.install-languages a {
|
||||||
@@ -173,12 +201,12 @@
|
|||||||
.language-link img {
|
.language-link img {
|
||||||
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
|
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
|
||||||
filter: alpha(opacity=30);
|
filter: alpha(opacity=30);
|
||||||
-moz-opacity:0.3;
|
|
||||||
-khtml-opacity: 0.3;
|
-khtml-opacity: 0.3;
|
||||||
opacity: 0.3;
|
-moz-opacity:0.3;
|
||||||
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.language-link-current img{
|
.language-link-current img {
|
||||||
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
||||||
filter: alpha(opacity=100);
|
filter: alpha(opacity=100);
|
||||||
-moz-opacity:1.0;
|
-moz-opacity:1.0;
|
||||||
@@ -194,30 +222,19 @@
|
|||||||
opacity: 1.0;
|
opacity: 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
.continue {
|
||||||
|
width: 100%;
|
||||||
.input-xlarge {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.install-languages {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.install-languages a {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript" src="<?php echo $site_url; ?>public/assets/js/jquery.js"></script>
|
<script src="<?php echo $site_url; ?>/public/assets/js/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="<?php echo $site_url; ?>public/assets/js/bootstrap.js"></script>
|
<script src="<?php echo $site_url; ?>/public/assets/js/bootstrap.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="install-body">
|
<body class="install-body">
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (version_compare(PHP_VERSION, "5.2.0", "<")) {
|
if (version_compare(PHP_VERSION, "5.2.3", "<")) {
|
||||||
$errors['php'] = 'error';
|
$errors['php'] = 'error';
|
||||||
} else {
|
} else {
|
||||||
$errors['php'] = '';
|
$errors['php'] = '';
|
||||||
@@ -265,215 +282,260 @@
|
|||||||
$errors[$dir] = 'error';
|
$errors[$dir] = 'error';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="install-languages">
|
<div class="text-center"><a class="brand" href="<?php echo Html::toText($site_url); ?>"><img src="<?php echo $site_url; ?>/public/assets/img/monstra-logo-256px.png" alt="Monstra"></a></div>
|
||||||
<?php foreach ($languages_array as $lang_code) { ?>
|
|
||||||
<a data-placement="top" class="language-link<?php if (Option::get('language') == $lang_code) echo ' language-link-current';?>" title="<?php echo I18n::$locales[$lang_code]; ?>" href="<?php echo $site_url.'?language=' . $lang_code; ?>"><img src="<?php echo $site_url; ?>public/assets/img/flags/<?php echo $lang_code?>.png" alt="<?php echo $lang_code?>"></a>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
<div class="install-block">
|
|
||||||
<div style="text-align:center;"><a class="brand" href="<?php echo Html::toText($site_url); ?>"><img src="<?php echo $site_url; ?>public/assets/img/monstra-logo.png" height="27" width="171" alt="Monstra"></a></div>
|
|
||||||
<hr>
|
|
||||||
<div>
|
|
||||||
<form action="install.php" method="post">
|
|
||||||
<input type="hidden" name="php" value="<?php echo $errors['php']; ?>" />
|
|
||||||
<input type="hidden" name="simplexml" value="<?php echo $errors['simplexml']; ?>" />
|
|
||||||
<input type="hidden" name="mod_rewrite" value="<?php echo $errors['mod_rewrite']; ?>" />
|
|
||||||
<input type="hidden" name="install" value="<?php echo $errors['install']; ?>" />
|
|
||||||
<input type="hidden" name="sitemap" value="<?php echo $errors['sitemap']; ?>" />
|
|
||||||
<input type="hidden" name="htaccess" value="<?php echo $errors['htaccess']; ?>" />
|
|
||||||
<input type="hidden" name="public" value="<?php echo $errors['public']; ?>" />
|
|
||||||
<input type="hidden" name="storage" value="<?php echo $errors['storage']; ?>" />
|
|
||||||
<input type="hidden" name="backups" value="<?php echo $errors['backups']; ?>" />
|
|
||||||
<input type="hidden" name="tmp" value="<?php echo $errors['tmp']; ?>" />
|
|
||||||
|
|
||||||
<label><?php echo __('Site Name', 'system'); ?></label>
|
<div class="install-languages">
|
||||||
<input class="input-xlarge" name="sitename" type="text" value="<?php if (Request::post('sitename')) echo Html::toText(Request::post('sitename')); ?>" />
|
<?php
|
||||||
<br />
|
if (Request::get('action') && Request::get('action') == 'install') {
|
||||||
<label><?php echo __('Site Url', 'system'); ?></label>
|
$action = '&action=install';
|
||||||
<input class="input-xlarge" name="siteurl" type="text" value="<?php echo Html::toText($site_url); ?>" />
|
} else {
|
||||||
<br />
|
$action = '';
|
||||||
<label><?php echo __('Username', 'users'); ?></label>
|
}
|
||||||
<input class="input-xlarge" class="login" name="login" value="<?php if(Request::post('login')) echo Html::toText(Request::post('login')); ?>" type="text" />
|
?>
|
||||||
<br />
|
<?php foreach ($languages_array as $lang_code) { ?>
|
||||||
<label><?php echo __('Password', 'users'); ?></label>
|
<a data-placement="top" data-toggle="tooltip" class="language-link<?php if (Option::get('language') == $lang_code) echo ' language-link-current';?>" title="<?php echo I18n::$locales[$lang_code]; ?>" href="<?php echo $site_url.'/?language=' . $lang_code.$action; ?>"><img src="<?php echo $site_url; ?>/public/assets/img/flags/<?php echo $lang_code?>.png" alt="<?php echo $lang_code?>"></a>
|
||||||
<input class="input-xlarge" name="password" type="password" />
|
<?php } ?>
|
||||||
<br />
|
</div>
|
||||||
<label><?php echo __('Time zone', 'system'); ?></label>
|
|
||||||
<select class="input-xlarge" name="timezone">
|
|
||||||
<option value="Kwajalein">(GMT-12:00) International Date Line West</option>
|
|
||||||
<option value="Pacific/Samoa">(GMT-11:00) Midway Island, Samoa</option>
|
|
||||||
<option value="Pacific/Honolulu">(GMT-10:00) Hawaii</option>
|
|
||||||
<option value="America/Anchorage">(GMT-09:00) Alaska</option>
|
|
||||||
<option value="America/Los_Angeles">(GMT-08:00) Pacific Time (US & Canada)</option>
|
|
||||||
<option value="America/Tijuana">(GMT-08:00) Tijuana, Baja California</option>
|
|
||||||
<option value="America/Denver">(GMT-07:00) Mountain Time (US & Canada)</option>
|
|
||||||
<option value="America/Chihuahua">(GMT-07:00) Chihuahua, La Paz, Mazatlan</option>
|
|
||||||
<option value="America/Phoenix">(GMT-07:00) Arizona</option>
|
|
||||||
<option value="America/Regina">(GMT-06:00) Saskatchewan</option>
|
|
||||||
<option value="America/Tegucigalpa">(GMT-06:00) Central America</option>
|
|
||||||
<option value="America/Chicago">(GMT-06:00) Central Time (US & Canada)</option>
|
|
||||||
<option value="America/Mexico_City">(GMT-06:00) Guadalajara, Mexico City, Monterrey</option>
|
|
||||||
<option value="America/New_York">(GMT-05:00) Eastern Time (US & Canada)</option>
|
|
||||||
<option value="America/Bogota">(GMT-05:00) Bogota, Lima, Quito, Rio Branco</option>
|
|
||||||
<option value="America/Indiana/Indianapolis">(GMT-05:00) Indiana (East)</option>
|
|
||||||
<option value="America/Caracas">(GMT-04:30) Caracas</option>
|
|
||||||
<option value="America/Halifax">(GMT-04:00) Atlantic Time (Canada)</option>
|
|
||||||
<option value="America/Manaus">(GMT-04:00) Manaus</option>
|
|
||||||
<option value="America/Santiago">(GMT-04:00) Santiago</option>
|
|
||||||
<option value="America/La_Paz">(GMT-04:00) La Paz</option>
|
|
||||||
<option value="America/St_Johns">(GMT-03:30) Newfoundland</option>
|
|
||||||
<option value="America/Argentina/Buenos_Aires">(GMT-03:00) Buenos Aires</option>
|
|
||||||
<option value="America/Sao_Paulo">(GMT-03:00) Brasilia</option>
|
|
||||||
<option value="America/Godthab">(GMT-03:00) Greenland</option>
|
|
||||||
<option value="America/Montevideo">(GMT-03:00) Montevideo</option>
|
|
||||||
<option value="America/Argentina/Buenos_Aires">(GMT-03:00) Georgetown</option>
|
|
||||||
<option value="Atlantic/South_Georgia">(GMT-02:00) Mid-Atlantic</option>
|
|
||||||
<option value="Atlantic/Azores">(GMT-01:00) Azores</option>
|
|
||||||
<option value="Atlantic/Cape_Verde">(GMT-01:00) Cape Verde Is.</option>
|
|
||||||
<option value="Europe/London">(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London</option>
|
|
||||||
<option value="Atlantic/Reykjavik">(GMT) Monrovia, Reykjavik</option>
|
|
||||||
<option value="Africa/Casablanca">(GMT) Casablanca</option>
|
|
||||||
<option value="Europe/Belgrade">(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague</option>
|
|
||||||
<option value="Europe/Sarajevo">(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb</option>
|
|
||||||
<option value="Europe/Brussels">(GMT+01:00) Brussels, Copenhagen, Madrid, Paris</option>
|
|
||||||
<option value="Africa/Algiers">(GMT+01:00) West Central Africa</option>
|
|
||||||
<option value="Europe/Amsterdam">(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna</option>
|
|
||||||
<option value="Africa/Cairo">(GMT+02:00) Cairo</option>
|
|
||||||
<option value="Europe/Helsinki">(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius</option>
|
|
||||||
<option value="Europe/Athens">(GMT+02:00) Athens, Bucharest, Istanbul</option>
|
|
||||||
<option value="Asia/Jerusalem">(GMT+02:00) Jerusalem</option>
|
|
||||||
<option value="Asia/Amman">(GMT+02:00) Amman</option>
|
|
||||||
<option value="Asia/Beirut">(GMT+02:00) Beirut</option>
|
|
||||||
<option value="Africa/Windhoek">(GMT+02:00) Windhoek</option>
|
|
||||||
<option value="Africa/Harare">(GMT+02:00) Harare, Pretoria</option>
|
|
||||||
<option value="Asia/Kuwait">(GMT+03:00) Kuwait, Riyadh</option>
|
|
||||||
<option value="Asia/Baghdad">(GMT+03:00) Baghdad</option>
|
|
||||||
<option value="Europe/Minsk">(GMT+03:00) Minsk</option>
|
|
||||||
<option value="Africa/Nairobi">(GMT+03:00) Nairobi</option>
|
|
||||||
<option value="Asia/Tbilisi">(GMT+03:00) Tbilisi</option>
|
|
||||||
<option value="Asia/Tehran">(GMT+03:30) Tehran</option>
|
|
||||||
<option value="Asia/Muscat">(GMT+04:00) Abu Dhabi, Muscat</option>
|
|
||||||
<option value="Asia/Baku">(GMT+04:00) Baku</option>
|
|
||||||
<option value="Europe/Moscow">(GMT+04:00) Moscow, St. Petersburg, Volgograd</option>
|
|
||||||
<option value="Asia/Yerevan">(GMT+04:00) Yerevan</option>
|
|
||||||
<option value="Asia/Karachi">(GMT+05:00) Islamabad, Karachi</option>
|
|
||||||
<option value="Asia/Tashkent">(GMT+05:00) Tashkent</option>
|
|
||||||
<option value="Asia/Kolkata">(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi</option>
|
|
||||||
<option value="Asia/Colombo">(GMT+05:30) Sri Jayawardenepura</option>
|
|
||||||
<option value="Asia/Katmandu">(GMT+05:45) Kathmandu</option>
|
|
||||||
<option value="Asia/Dhaka">(GMT+06:00) Astana, Dhaka</option>
|
|
||||||
<option value="Asia/Yekaterinburg">(GMT+06:00) Ekaterinburg</option>
|
|
||||||
<option value="Asia/Rangoon">(GMT+06:30) Yangon (Rangoon)</option>
|
|
||||||
<option value="Asia/Novosibirsk">(GMT+07:00) Almaty, Novosibirsk</option>
|
|
||||||
<option value="Asia/Bangkok">(GMT+07:00) Bangkok, Hanoi, Jakarta</option>
|
|
||||||
<option value="Asia/Beijing">(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi</option>
|
|
||||||
<option value="Asia/Krasnoyarsk">(GMT+08:00) Krasnoyarsk</option>
|
|
||||||
<option value="Asia/Ulaanbaatar">(GMT+08:00) Irkutsk, Ulaan Bataar</option>
|
|
||||||
<option value="Asia/Kuala_Lumpur">(GMT+08:00) Kuala Lumpur, Singapore</option>
|
|
||||||
<option value="Asia/Taipei">(GMT+08:00) Taipei</option>
|
|
||||||
<option value="Australia/Perth">(GMT+08:00) Perth</option>
|
|
||||||
<option value="Asia/Seoul">(GMT+09:00) Seoul</option>
|
|
||||||
<option value="Asia/Tokyo">(GMT+09:00) Osaka, Sapporo, Tokyo</option>
|
|
||||||
<option value="Australia/Darwin">(GMT+09:30) Darwin</option>
|
|
||||||
<option value="Australia/Adelaide">(GMT+09:30) Adelaide</option>
|
|
||||||
<option value="Australia/Sydney">(GMT+10:00) Canberra, Melbourne, Sydney</option>
|
|
||||||
<option value="Australia/Brisbane">(GMT+10:00) Brisbane</option>
|
|
||||||
<option value="Australia/Hobart">(GMT+10:00) Hobart</option>
|
|
||||||
<option value="Asia/Yakutsk">(GMT+10:00) Yakutsk</option>
|
|
||||||
<option value="Pacific/Guam">(GMT+10:00) Guam, Port Moresby</option>
|
|
||||||
<option value="Asia/Vladivostok">(GMT+11:00) Vladivostok</option>
|
|
||||||
<option value="Pacific/Fiji">(GMT+12:00) Fiji, Kamchatka, Marshall Is.</option>
|
|
||||||
<option value="Asia/Magadan">(GMT+12:00) Magadan, Solomon Is., New Caledonia</option>
|
|
||||||
<option value="Pacific/Auckland">(GMT+12:00) Auckland, Wellington</option>
|
|
||||||
<option value="Pacific/Tongatapu">(GMT+13:00) Nukualofa</option>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<label><?php echo __('Email', 'users'); ?></label>
|
<div class="install-block <?php if(Request::get('action') && Request::get('action') == 'install') { ?><?php } else { ?> hide <?php } ?>">
|
||||||
<input name="email" class="input-xlarge" value="<?php if (Request::post('email')) echo Html::toText(Request::post('email')); ?>" type="text" />
|
|
||||||
<br /><br />
|
<ul class="list-unstyled">
|
||||||
<input type="submit" class="btn" name="install_submit" value="<?php echo __('Install', 'system'); ?>" />
|
<?php
|
||||||
</form>
|
// Monstra Notifications
|
||||||
|
if (Notification::get('errors') && count(Notification::get('errors') > 0)) {
|
||||||
|
foreach (Notification::get('errors') as $error) {
|
||||||
|
?>
|
||||||
|
<li class="error alert alert-danger"><?php echo $error; ?></li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="well">
|
||||||
|
<form action="install.php?action=install" method="post">
|
||||||
|
<input type="hidden" name="php" value="<?php echo $errors['php']; ?>">
|
||||||
|
<input type="hidden" name="simplexml" value="<?php echo $errors['simplexml']; ?>">
|
||||||
|
<input type="hidden" name="mod_rewrite" value="<?php echo $errors['mod_rewrite']; ?>">
|
||||||
|
<input type="hidden" name="install" value="<?php echo $errors['install']; ?>">
|
||||||
|
<input type="hidden" name="sitemap" value="<?php echo $errors['sitemap']; ?>">
|
||||||
|
<input type="hidden" name="htaccess" value="<?php echo $errors['htaccess']; ?>">
|
||||||
|
<input type="hidden" name="public" value="<?php echo $errors['public']; ?>">
|
||||||
|
<input type="hidden" name="storage" value="<?php echo $errors['storage']; ?>">
|
||||||
|
<input type="hidden" name="backups" value="<?php echo $errors['backups']; ?>">
|
||||||
|
<input type="hidden" name="tmp" value="<?php echo $errors['tmp']; ?>">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label><?php echo __('Site Name', 'system'); ?></label>
|
||||||
|
<input class="form-control" name="sitename" type="text" value="<?php if (Request::post('sitename')) echo Html::toText(Request::post('sitename')); ?>" />
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
<p align="center"><strong><?php echo __('...Monstra says...', 'system'); ?></strong></p>
|
|
||||||
<div>
|
|
||||||
<ul>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
if (version_compare(PHP_VERSION, "5.2.0", "<")) {
|
<div class="form-group">
|
||||||
echo '<span class="error"><li>'.__('PHP 5.2 or greater is required', 'system').'</li></span>';
|
<label><?php echo __('Site Url', 'system'); ?></label>
|
||||||
} else {
|
<input class="form-control" name="siteurl" type="text" value="<?php echo Html::toText($site_url); ?>" />
|
||||||
echo '<span class="ok"><li>'.__('PHP Version', 'system').' '.PHP_VERSION.'</li></span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (in_array('SimpleXML', $php_modules)) {
|
|
||||||
echo '<span class="ok"><li>'.__('Module SimpleXML is installed', 'system').'</li></span>';
|
|
||||||
} else {
|
|
||||||
echo '<span class="error"><li>'.__('SimpleXML module is required', 'system').'</li></span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (in_array('dom', $php_modules)) {
|
|
||||||
echo '<span class="ok"><li>'.__('Module DOM is installed', 'system').'</li></span>';
|
|
||||||
} else {
|
|
||||||
echo '<span class="error"><li>'.__('Module DOM is required', 'system').'</li></span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (function_exists('apache_get_modules')) {
|
|
||||||
if ( ! in_array('mod_rewrite',apache_get_modules())) {
|
|
||||||
echo '<span class="error"><li>'.__('Apache Mod Rewrite is required', 'system').'</li></span>';
|
|
||||||
} else {
|
|
||||||
echo '<span class="ok"><li>'.__('Module Mod Rewrite is installed', 'system').'</li></span>';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo '<span class="ok"><li>'.__('Module Mod Rewrite is installed', 'system').'</li></span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($dir_array as $dir) {
|
|
||||||
if (is_writable($dir.'/')) {
|
|
||||||
echo '<span class="ok"><li>'.__('Directory: <b> :dir </b> writable', 'system', array(':dir' => $dir)).'</li></span>';
|
|
||||||
} else {
|
|
||||||
echo '<span class="error"><li>'.__('Directory: <b> :dir </b> not writable', 'system', array(':dir' => $dir)).'</li></span>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_writable(__FILE__)) {
|
|
||||||
echo '<span class="ok"><li>'.__('Install script writable', 'system').'</li></span>';
|
|
||||||
} else {
|
|
||||||
echo '<span class="error"><li>'.__('Install script not writable', 'system').'</li></span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_writable('sitemap.xml')) {
|
|
||||||
echo '<span class="ok"><li>'.__('Sitemap file writable', 'system').'</li></span>';
|
|
||||||
} else {
|
|
||||||
echo '<span class="error"><li>'.__('Sitemap file not writable', 'system').'</li></span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_writable('.htaccess')) {
|
|
||||||
echo '<span class="ok"><li>'.__('Main .htaccess file writable', 'system').'</li></span>';
|
|
||||||
} else {
|
|
||||||
echo '<span class="error"><li>'.__('Main .htaccess file not writable', 'system').'</li></span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($errors['sitename'])) echo '<span class="error"><li>'.$errors['sitename'].'</li></span>';
|
|
||||||
if (isset($errors['siteurl'])) echo '<span class="error"><li>'.$errors['siteurl'].'</li></span>';
|
|
||||||
if (isset($errors['login'])) echo '<span class="error"><li>'.$errors['login'].'</li></span>';
|
|
||||||
if (isset($errors['password'])) echo '<span class="error"><li>'.$errors['password'].'</li></span>';
|
|
||||||
if (isset($errors['email'])) echo '<span class="error"><li>'.$errors['email'].'</li></span>';
|
|
||||||
if (isset($errors['email_valid'])) echo '<span class="error"><li>'.$errors['email_valid'].'</li></span>';
|
|
||||||
?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="install-block-footer">
|
<div class="form-group">
|
||||||
<div style="text-align:center;">
|
<label><?php echo __('Username', 'users'); ?></label>
|
||||||
<span class="small-grey-text">© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
|
<input class="form-control login" name="login" value="<?php if(Request::post('login')) echo Html::toText(Request::post('login')); ?>" type="text" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label><?php echo __('Password', 'users'); ?></label>
|
||||||
|
<input class="form-control" name="password" type="password" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label><?php echo __('Time zone', 'system'); ?></label>
|
||||||
|
<select class="form-control" name="timezone">
|
||||||
|
<option value="Kwajalein">(GMT-12:00) International Date Line West</option>
|
||||||
|
<option value="Pacific/Samoa">(GMT-11:00) Midway Island, Samoa</option>
|
||||||
|
<option value="Pacific/Honolulu">(GMT-10:00) Hawaii</option>
|
||||||
|
<option value="America/Anchorage">(GMT-09:00) Alaska</option>
|
||||||
|
<option value="America/Los_Angeles">(GMT-08:00) Pacific Time (US & Canada)</option>
|
||||||
|
<option value="America/Tijuana">(GMT-08:00) Tijuana, Baja California</option>
|
||||||
|
<option value="America/Denver">(GMT-07:00) Mountain Time (US & Canada)</option>
|
||||||
|
<option value="America/Chihuahua">(GMT-07:00) Chihuahua, La Paz, Mazatlan</option>
|
||||||
|
<option value="America/Phoenix">(GMT-07:00) Arizona</option>
|
||||||
|
<option value="America/Regina">(GMT-06:00) Saskatchewan</option>
|
||||||
|
<option value="America/Tegucigalpa">(GMT-06:00) Central America</option>
|
||||||
|
<option value="America/Chicago">(GMT-06:00) Central Time (US & Canada)</option>
|
||||||
|
<option value="America/Mexico_City">(GMT-06:00) Guadalajara, Mexico City, Monterrey</option>
|
||||||
|
<option value="America/New_York">(GMT-05:00) Eastern Time (US & Canada)</option>
|
||||||
|
<option value="America/Bogota">(GMT-05:00) Bogota, Lima, Quito, Rio Branco</option>
|
||||||
|
<option value="America/Indiana/Indianapolis">(GMT-05:00) Indiana (East)</option>
|
||||||
|
<option value="America/Caracas">(GMT-04:30) Caracas</option>
|
||||||
|
<option value="America/Halifax">(GMT-04:00) Atlantic Time (Canada)</option>
|
||||||
|
<option value="America/Manaus">(GMT-04:00) Manaus</option>
|
||||||
|
<option value="America/Santiago">(GMT-04:00) Santiago</option>
|
||||||
|
<option value="America/La_Paz">(GMT-04:00) La Paz</option>
|
||||||
|
<option value="America/St_Johns">(GMT-03:30) Newfoundland</option>
|
||||||
|
<option value="America/Argentina/Buenos_Aires">(GMT-03:00) Buenos Aires</option>
|
||||||
|
<option value="America/Sao_Paulo">(GMT-03:00) Brasilia</option>
|
||||||
|
<option value="America/Godthab">(GMT-03:00) Greenland</option>
|
||||||
|
<option value="America/Montevideo">(GMT-03:00) Montevideo</option>
|
||||||
|
<option value="America/Argentina/Buenos_Aires">(GMT-03:00) Georgetown</option>
|
||||||
|
<option value="Atlantic/South_Georgia">(GMT-02:00) Mid-Atlantic</option>
|
||||||
|
<option value="Atlantic/Azores">(GMT-01:00) Azores</option>
|
||||||
|
<option value="Atlantic/Cape_Verde">(GMT-01:00) Cape Verde Is.</option>
|
||||||
|
<option value="Europe/London">(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London</option>
|
||||||
|
<option value="Atlantic/Reykjavik">(GMT) Monrovia, Reykjavik</option>
|
||||||
|
<option value="Africa/Casablanca">(GMT) Casablanca</option>
|
||||||
|
<option value="Europe/Belgrade">(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague</option>
|
||||||
|
<option value="Europe/Sarajevo">(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb</option>
|
||||||
|
<option value="Europe/Brussels">(GMT+01:00) Brussels, Copenhagen, Madrid, Paris</option>
|
||||||
|
<option value="Africa/Algiers">(GMT+01:00) West Central Africa</option>
|
||||||
|
<option value="Europe/Amsterdam">(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna</option>
|
||||||
|
<option value="Africa/Cairo">(GMT+02:00) Cairo</option>
|
||||||
|
<option value="Europe/Helsinki">(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius</option>
|
||||||
|
<option value="Europe/Athens">(GMT+02:00) Athens, Bucharest, Istanbul</option>
|
||||||
|
<option value="Asia/Jerusalem">(GMT+02:00) Jerusalem</option>
|
||||||
|
<option value="Asia/Amman">(GMT+02:00) Amman</option>
|
||||||
|
<option value="Asia/Beirut">(GMT+02:00) Beirut</option>
|
||||||
|
<option value="Africa/Windhoek">(GMT+02:00) Windhoek</option>
|
||||||
|
<option value="Africa/Harare">(GMT+02:00) Harare, Pretoria</option>
|
||||||
|
<option value="Asia/Kuwait">(GMT+03:00) Kuwait, Riyadh</option>
|
||||||
|
<option value="Asia/Baghdad">(GMT+03:00) Baghdad</option>
|
||||||
|
<option value="Europe/Minsk">(GMT+03:00) Minsk</option>
|
||||||
|
<option value="Africa/Nairobi">(GMT+03:00) Nairobi</option>
|
||||||
|
<option value="Asia/Tbilisi">(GMT+03:00) Tbilisi</option>
|
||||||
|
<option value="Asia/Tehran">(GMT+03:30) Tehran</option>
|
||||||
|
<option value="Asia/Muscat">(GMT+04:00) Abu Dhabi, Muscat</option>
|
||||||
|
<option value="Asia/Baku">(GMT+04:00) Baku</option>
|
||||||
|
<option value="Europe/Moscow">(GMT+04:00) Moscow, St. Petersburg, Volgograd</option>
|
||||||
|
<option value="Asia/Yerevan">(GMT+04:00) Yerevan</option>
|
||||||
|
<option value="Asia/Karachi">(GMT+05:00) Islamabad, Karachi</option>
|
||||||
|
<option value="Asia/Tashkent">(GMT+05:00) Tashkent</option>
|
||||||
|
<option value="Asia/Kolkata">(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi</option>
|
||||||
|
<option value="Asia/Colombo">(GMT+05:30) Sri Jayawardenepura</option>
|
||||||
|
<option value="Asia/Katmandu">(GMT+05:45) Kathmandu</option>
|
||||||
|
<option value="Asia/Dhaka">(GMT+06:00) Astana, Dhaka</option>
|
||||||
|
<option value="Asia/Yekaterinburg">(GMT+06:00) Ekaterinburg</option>
|
||||||
|
<option value="Asia/Rangoon">(GMT+06:30) Yangon (Rangoon)</option>
|
||||||
|
<option value="Asia/Novosibirsk">(GMT+07:00) Almaty, Novosibirsk</option>
|
||||||
|
<option value="Asia/Bangkok">(GMT+07:00) Bangkok, Hanoi, Jakarta</option>
|
||||||
|
<option value="Asia/Beijing">(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi</option>
|
||||||
|
<option value="Asia/Krasnoyarsk">(GMT+08:00) Krasnoyarsk</option>
|
||||||
|
<option value="Asia/Ulaanbaatar">(GMT+08:00) Irkutsk, Ulaan Bataar</option>
|
||||||
|
<option value="Asia/Kuala_Lumpur">(GMT+08:00) Kuala Lumpur, Singapore</option>
|
||||||
|
<option value="Asia/Taipei">(GMT+08:00) Taipei</option>
|
||||||
|
<option value="Australia/Perth">(GMT+08:00) Perth</option>
|
||||||
|
<option value="Asia/Seoul">(GMT+09:00) Seoul</option>
|
||||||
|
<option value="Asia/Tokyo">(GMT+09:00) Osaka, Sapporo, Tokyo</option>
|
||||||
|
<option value="Australia/Darwin">(GMT+09:30) Darwin</option>
|
||||||
|
<option value="Australia/Adelaide">(GMT+09:30) Adelaide</option>
|
||||||
|
<option value="Australia/Sydney">(GMT+10:00) Canberra, Melbourne, Sydney</option>
|
||||||
|
<option value="Australia/Brisbane">(GMT+10:00) Brisbane</option>
|
||||||
|
<option value="Australia/Hobart">(GMT+10:00) Hobart</option>
|
||||||
|
<option value="Asia/Yakutsk">(GMT+10:00) Yakutsk</option>
|
||||||
|
<option value="Pacific/Guam">(GMT+10:00) Guam, Port Moresby</option>
|
||||||
|
<option value="Asia/Vladivostok">(GMT+11:00) Vladivostok</option>
|
||||||
|
<option value="Pacific/Fiji">(GMT+12:00) Fiji, Kamchatka, Marshall Is.</option>
|
||||||
|
<option value="Asia/Magadan">(GMT+12:00) Magadan, Solomon Is., New Caledonia</option>
|
||||||
|
<option value="Pacific/Auckland">(GMT+12:00) Auckland, Wellington</option>
|
||||||
|
<option value="Pacific/Tongatapu">(GMT+13:00) Nukualofa</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label><?php echo __('Email', 'users'); ?></label>
|
||||||
|
<input name="email" class="form-control" value="<?php if (Request::post('email')) echo Html::toText(Request::post('email')); ?>" type="text" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" class="btn btn-primary" name="install_submit" value="<?php echo __('Install', 'system'); ?>" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="monstra-dialog <?php if(Request::get('action') && Request::get('action') == 'install') { ?>hide<?php } ?>">
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (version_compare(PHP_VERSION, "5.2.0", "<")) {
|
||||||
|
echo '<li class="error alert alert-danger">'.__('PHP 5.2 or greater is required', 'system').'</li>';
|
||||||
|
} else {
|
||||||
|
echo '<li class="ok alert alert-success">'.__('PHP Version', 'system').' '.PHP_VERSION.'</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array('SimpleXML', $php_modules)) {
|
||||||
|
echo '<li class="ok alert alert-success">'.__('Module SimpleXML is installed', 'system').'</li>';
|
||||||
|
} else {
|
||||||
|
echo '<li class="error alert alert-danger">'.__('SimpleXML module is required', 'system').'</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array('dom', $php_modules)) {
|
||||||
|
echo '<li class="ok alert alert-success">'.__('Module DOM is installed', 'system').'</li>';
|
||||||
|
} else {
|
||||||
|
echo '<li class="error alert alert-danger">'.__('Module DOM is required', 'system').'</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (function_exists('apache_get_modules')) {
|
||||||
|
if ( ! in_array('mod_rewrite',apache_get_modules())) {
|
||||||
|
echo '<li class="error alert alert-danger">'.__('Apache Mod Rewrite is required', 'system').'</li>';
|
||||||
|
} else {
|
||||||
|
echo '<li class="ok alert alert-success">'.__('Module Mod Rewrite is installed', 'system').'</li>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<li class="ok alert alert-success">'.__('Module Mod Rewrite is installed', 'system').'</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($dir_array as $dir) {
|
||||||
|
if (is_writable($dir.'/')) {
|
||||||
|
echo '<li class="ok alert alert-success">'.__('Directory: <b> :dir </b> writable', 'system', array(':dir' => $dir)).'</li>';
|
||||||
|
} else {
|
||||||
|
echo '<li class="error alert alert-danger">'.__('Directory: <b> :dir </b> not writable', 'system', array(':dir' => $dir)).'</li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_writable(__FILE__)) {
|
||||||
|
echo '<li class="ok alert alert-success">'.__('Install script writable', 'system').'</li>';
|
||||||
|
} else {
|
||||||
|
echo '<li class="error alert alert-danger">'.__('Install script not writable', 'system').'</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_writable('sitemap.xml')) {
|
||||||
|
echo '<li class="ok alert alert-success">'.__('Sitemap file writable', 'system').'</li>';
|
||||||
|
} else {
|
||||||
|
echo '<li class="error alert alert-danger">'.__('Sitemap file not writable', 'system').'</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_writable('.htaccess')) {
|
||||||
|
echo '<li class="ok alert alert-success">'.__('Main .htaccess file writable', 'system').'</li>';
|
||||||
|
} else {
|
||||||
|
echo '<li class="error alert alert-danger">'.__('Main .htaccess file not writable', 'system').'</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($errors['sitename'])) echo '<li class="error">'.$errors['sitename'].'</li>';
|
||||||
|
if (isset($errors['siteurl'])) echo '<li class="error">'.$errors['siteurl'].'</li>';
|
||||||
|
if (isset($errors['login'])) echo '<li class="error">'.$errors['login'].'</li>';
|
||||||
|
if (isset($errors['password'])) echo '<li class="error">'.$errors['password'].'</li>';
|
||||||
|
if (isset($errors['email'])) echo '<li class="error">'.$errors['email'].'</li>';
|
||||||
|
if (isset($errors['email_valid'])) echo '<li class="error">'.$errors['email_valid'].'</li>';
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
<a href="install.php?action=install" class="btn btn-primary continue"><?php echo __('Continue', 'system'); ?></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="install-block-footer login-footer">
|
||||||
|
<div class="text-center">
|
||||||
|
<span>© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('.language-link').tooltip();
|
$('.language-link').tooltip();
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('.continue').click(function() {
|
||||||
|
$('.monstra-dialog').addClass('hide');
|
||||||
|
$('.install-block').removeClass('hide');
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -71,6 +71,12 @@ class Agent
|
|||||||
'infoseek',
|
'infoseek',
|
||||||
'lycos',
|
'lycos',
|
||||||
'ia_archiver',
|
'ia_archiver',
|
||||||
|
'yandex',
|
||||||
|
'mail.ru',
|
||||||
|
'ask.com',
|
||||||
|
'Copyscape.com',
|
||||||
|
'bing.com',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -4,23 +4,17 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Error</title>
|
<title>Error</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
background: #F5F5F5;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
#gelato-error {
|
#gelato-error {
|
||||||
background:#eee;
|
background:#F5F5F5;
|
||||||
color:0;
|
color:0;
|
||||||
width:95%;
|
width:100%;
|
||||||
font-size:14px;
|
font-size:14px;
|
||||||
font-family:Verdana, Arial, Helvetica, "Nimbus Sans", FreeSans, Malayalam, sans-serif;
|
font-family:Verdana, Arial, Helvetica, "Nimbus Sans", FreeSans, Malayalam, sans-serif;
|
||||||
margin:20px auto;
|
|
||||||
|
|
||||||
-webkit-box-shadow: 1px 1px 18px rgba(50, 50, 50, 0.75);
|
|
||||||
-moz-box-shadow: 1px 1px 18px rgba(50, 50, 50, 0.75);
|
|
||||||
box-shadow: 1px 1px 18px rgba(50, 50, 50, 0.75);
|
|
||||||
|
|
||||||
-webkit-border-radius: 5px;
|
|
||||||
-moz-border-radius: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#gelato-error pre {
|
#gelato-error pre {
|
||||||
@@ -31,23 +25,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#gelato-error a {
|
#gelato-error a {
|
||||||
color:#cc0a0a;
|
color:#DC143C;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#gelato-error .error {
|
#gelato-error .error {
|
||||||
background:#cc0a0a;
|
background:#DC143C;
|
||||||
color:#fff;
|
color:#fff;
|
||||||
font-size:24px;
|
font-size:24px;
|
||||||
font-weight:700;
|
font-weight:700;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
|
|
||||||
-moz-border-radius-topleft: 5px;
|
|
||||||
-webkit-border-top-left-radius: 5px;
|
|
||||||
border-top-left-radius: 5px;
|
|
||||||
-moz-border-radius-topright: 5px;
|
|
||||||
-webkit-border-top-right-radius: 5px;
|
|
||||||
border-top-right-radius: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#gelato-error .body {
|
#gelato-error .body {
|
||||||
@@ -288,7 +276,10 @@
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top:20px;padding-bottom:20px; padding-left:10px;"><a href="http://gelato.monstra.org">Gelato Library</a></div>
|
<div style="padding-top:20px;padding-bottom:20px; padding-left:10px;">
|
||||||
|
<a href="http://monstra.org">MONSTRA</a>
|
||||||
|
<a href="http://gelato.monstra.org">GELATO</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@@ -203,4 +203,26 @@ class Dir
|
|||||||
return $total_size;
|
return $total_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy directory.
|
||||||
|
* <code>
|
||||||
|
* Dir::copy('source_folder_path', 'destination_folder_path);
|
||||||
|
* </code>
|
||||||
|
* @param $src
|
||||||
|
* @param $dst
|
||||||
|
*/
|
||||||
|
public static function copy($src, $dst) {
|
||||||
|
$dir = opendir($src);
|
||||||
|
@mkdir($dst);
|
||||||
|
while(false !== ( $file = readdir($dir)) ) {
|
||||||
|
if (( $file != '.' ) && ( $file != '..' )) {
|
||||||
|
if ( is_dir($src .'/'. $file) ) {
|
||||||
|
self::copy($src .'/'. $file, $dst .'/'. $file);
|
||||||
|
} else {
|
||||||
|
copy($src .'/'. $file,$dst .'/'. $file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($dir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -141,7 +141,7 @@ class Form
|
|||||||
$attributes['type'] = 'text';
|
$attributes['type'] = 'text';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<input'.Html::attributes($attributes).' />';
|
return '<input'.Html::attributes($attributes).'>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -51,7 +51,7 @@ class Html
|
|||||||
*
|
*
|
||||||
* <code>
|
* <code>
|
||||||
*
|
*
|
||||||
* // Registering a Htmlk macro
|
* // Registering a Html macro
|
||||||
* Html::macro('my_element', function() {
|
* Html::macro('my_element', function() {
|
||||||
* return '<element id="monstra">';
|
* return '<element id="monstra">';
|
||||||
* });
|
* });
|
||||||
@@ -61,7 +61,7 @@ class Html
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* // Registering a Html macro with parameters
|
* // Registering a Html macro with parameters
|
||||||
* Html::macro('my_element', function(id = '') {
|
* Html::macro('my_element', function($id = '') {
|
||||||
* return '<element id="'.$id.'">';
|
* return '<element id="'.$id.'">';
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
@@ -157,7 +157,7 @@ class Html
|
|||||||
*/
|
*/
|
||||||
public static function br($num = 1)
|
public static function br($num = 1)
|
||||||
{
|
{
|
||||||
return str_repeat("<br />",(int) $num);
|
return str_repeat("<br>",(int) $num);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -285,7 +285,7 @@ class Html
|
|||||||
$attributes['src'] = $file;
|
$attributes['src'] = $file;
|
||||||
$attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($file, PATHINFO_FILENAME);
|
$attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($file, PATHINFO_FILENAME);
|
||||||
|
|
||||||
return '<img'.Html::attributes($attributes).' />';
|
return '<img'.Html::attributes($attributes).'>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -659,4 +659,3 @@ class Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
code
|
|
||||||
|
@@ -109,23 +109,9 @@ class MinifyCSS
|
|||||||
(\\b|[#\'"-]) # 3 = first character of a value
|
(\\b|[#\'"-]) # 3 = first character of a value
|
||||||
/x', '$1$2:$3', $css);
|
/x', '$1$2:$3', $css);
|
||||||
|
|
||||||
// remove ws in selectors
|
|
||||||
$css = preg_replace_callback('/
|
|
||||||
(?: # non-capture
|
|
||||||
\\s*
|
|
||||||
[^~>+,\\s]+ # selector part
|
|
||||||
\\s*
|
|
||||||
[,>+~] # combinators
|
|
||||||
)+
|
|
||||||
\\s*
|
|
||||||
[^~>+,\\s]+ # selector part
|
|
||||||
{ # open declaration block
|
|
||||||
/x'
|
|
||||||
,array($this, '_selectorsCB'), $css);
|
|
||||||
|
|
||||||
// minimize hex colors
|
// minimize hex colors
|
||||||
$css = preg_replace('/([^=])#([a-f\\d])\\2([a-f\\d])\\3([a-f\\d])\\4([\\s;\\}])/i'
|
/*$css = preg_replace('/([^=])#([a-f\\d])\\2([a-f\\d])\\3([a-f\\d])\\4([\\s;\\}])/i'
|
||||||
, '$1#$2$3$4$5', $css);
|
, '$1#$2$3$4$5', $css);*/
|
||||||
|
|
||||||
// remove spaces between font families
|
// remove spaces between font families
|
||||||
$css = preg_replace_callback('/font-family:([^;}]+)([;}])/'
|
$css = preg_replace_callback('/font-family:([^;}]+)([;}])/'
|
||||||
|
@@ -28,7 +28,7 @@ class Number
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert bytes in 'kb','mb','gb','tb','pb'
|
* Convert bytes in 'KB','MB','GB','TiB','PiB'
|
||||||
*
|
*
|
||||||
* <code>
|
* <code>
|
||||||
* echo Number::byteFormat(10000);
|
* echo Number::byteFormat(10000);
|
||||||
@@ -42,11 +42,33 @@ class Number
|
|||||||
// Redefine vars
|
// Redefine vars
|
||||||
$size = (int) $size;
|
$size = (int) $size;
|
||||||
|
|
||||||
$unit = array('b', 'kb', 'mb', 'gb', 'tb', 'pb');
|
$unit = array('B', 'KB', 'MB', 'GB', 'TiB', 'PiB');
|
||||||
|
|
||||||
return @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[($i < 0 ? 0 : $i)];
|
return @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[($i < 0 ? 0 : $i)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert 'KB','MB','GB' in bytes
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* echo Number::convertToBytes('10MB');
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $num Number to convert
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public static function convertToBytes( $num ) {
|
||||||
|
$num = strtolower( $num );
|
||||||
|
$bytes = (int) $num;
|
||||||
|
if ( strpos( $num, 'k' ) !== false )
|
||||||
|
$bytes = intval( $num ) * 1024;
|
||||||
|
elseif ( strpos( $num, 'm' ) !== false )
|
||||||
|
$bytes = intval($num) * 1024 * 1024;
|
||||||
|
elseif ( strpos( $num, 'g' ) !== false )
|
||||||
|
$bytes = intval( $num ) * 1024 * 1024 * 1024;
|
||||||
|
return $bytes;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a number into a more readable human-type number.
|
* Converts a number into a more readable human-type number.
|
||||||
*
|
*
|
||||||
|
@@ -24,6 +24,12 @@ class Zip
|
|||||||
public $offset = 0;
|
public $offset = 0;
|
||||||
public $now;
|
public $now;
|
||||||
|
|
||||||
|
private $_archive_info = array();
|
||||||
|
private $_zip_signature = "\x50\x4b\x03\x04";
|
||||||
|
private $_dir_signature = "\x50\x4b\x01\x02";
|
||||||
|
private $_central_signature_end = "\x50\x4b\x05\x06";
|
||||||
|
private $farc = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
@@ -264,7 +270,7 @@ class Zip
|
|||||||
* @param string $root_path Root path
|
* @param string $root_path Root path
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function readDir($path, $preserve_filepath = true, $root_path = null)
|
public function readDir($path, $preserve_filepath = true, $root_path = null, $exclude_files = array())
|
||||||
{
|
{
|
||||||
if ( ! $fp = @opendir($path)) {
|
if ( ! $fp = @opendir($path)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -277,12 +283,12 @@ class Zip
|
|||||||
|
|
||||||
while (false !== ($file = readdir($fp))) {
|
while (false !== ($file = readdir($fp))) {
|
||||||
|
|
||||||
if (substr($file, 0, 1) == '.') {
|
if (substr($file, 0, 1) == '.' || in_array($path.$file, $exclude_files)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (@is_dir($path.$file)) {
|
if (@is_dir($path.$file)) {
|
||||||
$this->readDir($path.$file."/", $preserve_filepath, $root_path);
|
$this->readDir($path.$file."/", $preserve_filepath, $root_path, $exclude_files);
|
||||||
} else {
|
} else {
|
||||||
if (false !== ($data = file_get_contents($path.$file))) {
|
if (false !== ($data = file_get_contents($path.$file))) {
|
||||||
$name = str_replace("\\", "/", $path);
|
$name = str_replace("\\", "/", $path);
|
||||||
@@ -372,4 +378,302 @@ class Zip
|
|||||||
$this->offset = 0;
|
$this->offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function extract($zip_file, $target_dir = null)
|
||||||
|
{
|
||||||
|
$chmod = 0777;
|
||||||
|
$this->_archive_info = array();
|
||||||
|
|
||||||
|
$files = $this->_read_archive($zip_file);
|
||||||
|
|
||||||
|
if (!$files) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$file_locations = array();
|
||||||
|
foreach ($files as $file => $trash) {
|
||||||
|
$dirname = pathinfo($file, PATHINFO_DIRNAME);
|
||||||
|
|
||||||
|
$folders = explode('/', $dirname);
|
||||||
|
$out_dn = $target_dir . '/' . $dirname;
|
||||||
|
|
||||||
|
if ( !is_dir($out_dn)) {
|
||||||
|
$str = '';
|
||||||
|
foreach ($folders as $folder) {
|
||||||
|
$str = $str ? $str . '/' . $folder : $folder;
|
||||||
|
if ( !is_dir($target_dir . '/' . $str)) {
|
||||||
|
if ( ! @mkdir($target_dir . '/' . $str)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
chmod($target_dir . '/' . $str, $chmod);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (substr($file, -1, 1) == '/') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$file_locations[] = $file_location = $target_dir . '/' . $file;
|
||||||
|
|
||||||
|
$this->_extract_file($file, $file_location);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->_archive_info = array();
|
||||||
|
|
||||||
|
return $file_locations;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function _read_archive($zip_file)
|
||||||
|
{
|
||||||
|
if (sizeof($this->_archive_info)) {
|
||||||
|
return $this->_archive_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
$fh = fopen($zip_file, 'r');
|
||||||
|
$this->farc = &$fh;
|
||||||
|
|
||||||
|
if ( !$fh) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !$this->_read_file_list_by_eof($fh)) {
|
||||||
|
if ( !$this->_read_files_by_signatures($fh)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->_archive_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function _read_file_list_by_eof(&$fh)
|
||||||
|
{
|
||||||
|
for ($x = 0; $x < 1024; $x++) {
|
||||||
|
fseek($fh, -22 - $x, SEEK_END);
|
||||||
|
|
||||||
|
$signature = fread($fh, 4);
|
||||||
|
|
||||||
|
if ($signature == $this->_central_signature_end) {
|
||||||
|
$eodir['disk_number_this'] = unpack("v", fread($fh, 2));
|
||||||
|
$eodir['disk_number'] = unpack("v", fread($fh, 2));
|
||||||
|
$eodir['total_entries_this'] = unpack("v", fread($fh, 2));
|
||||||
|
$eodir['total_entries'] = unpack("v", fread($fh, 2));
|
||||||
|
$eodir['size_of_cd'] = unpack("V", fread($fh, 4));
|
||||||
|
$eodir['offset_start_cd'] = unpack("V", fread($fh, 4));
|
||||||
|
$zip_comment_lenght = unpack("v", fread($fh, 2));
|
||||||
|
$eodir['zipfile_comment'] = $zip_comment_lenght[1] ? fread($fh, $zip_comment_lenght[1]) : '';
|
||||||
|
|
||||||
|
fseek($fh, $eodir['offset_start_cd'][1]);
|
||||||
|
$signature = fread($fh, 4);
|
||||||
|
|
||||||
|
while ($signature == $this->_dir_signature) {
|
||||||
|
$dir['version_madeby'] = unpack("v", fread($fh, 2));
|
||||||
|
$dir['version_needed'] = unpack("v", fread($fh, 2));
|
||||||
|
$dir['general_bit_flag'] = unpack("v", fread($fh, 2));
|
||||||
|
$dir['compression_method'] = unpack("v", fread($fh, 2));
|
||||||
|
$dir['lastmod_time'] = unpack("v", fread($fh, 2));
|
||||||
|
$dir['lastmod_date'] = unpack("v", fread($fh, 2));
|
||||||
|
$dir['crc-32'] = fread($fh, 4);
|
||||||
|
$dir['compressed_size'] = unpack("V", fread($fh, 4));
|
||||||
|
$dir['uncompressed_size'] = unpack("V", fread($fh, 4));
|
||||||
|
$zip_file_length = unpack("v", fread($fh, 2));
|
||||||
|
$extra_field_length = unpack("v", fread($fh, 2));
|
||||||
|
$fileCommentLength = unpack("v", fread($fh, 2));
|
||||||
|
$dir['disk_number_start'] = unpack("v", fread($fh, 2));
|
||||||
|
$dir['internal_attributes'] = unpack("v", fread($fh, 2));
|
||||||
|
$dir['external_attributes1'] = unpack("v", fread($fh, 2));
|
||||||
|
$dir['external_attributes2'] = unpack("v", fread($fh, 2));
|
||||||
|
$dir['relative_offset'] = unpack("V", fread($fh, 4));
|
||||||
|
$dir['file_name'] = fread($fh, $zip_file_length[1]);
|
||||||
|
$dir['extra_field'] = $extra_field_length[1] ? fread($fh, $extra_field_length[1]) : '';
|
||||||
|
$dir['file_comment'] = $fileCommentLength[1] ? fread($fh, $fileCommentLength[1]) : '';
|
||||||
|
|
||||||
|
$binary_mod_date = str_pad(decbin($dir['lastmod_date'][1]), 16, '0', STR_PAD_LEFT);
|
||||||
|
$binary_mod_time = str_pad(decbin($dir['lastmod_time'][1]), 16, '0', STR_PAD_LEFT);
|
||||||
|
$last_mod_year = bindec(substr($binary_mod_date, 0, 7)) + 1980;
|
||||||
|
$last_mod_month = bindec(substr($binary_mod_date, 7, 4));
|
||||||
|
$last_mod_day = bindec(substr($binary_mod_date, 11, 5));
|
||||||
|
$last_mod_hour = bindec(substr($binary_mod_time, 0, 5));
|
||||||
|
$last_mod_minute = bindec(substr($binary_mod_time, 5, 6));
|
||||||
|
$last_mod_second = bindec(substr($binary_mod_time, 11, 5));
|
||||||
|
|
||||||
|
$central_dir_list[$dir['file_name']] = array(
|
||||||
|
'version_madeby' => $dir['version_madeby'][1],
|
||||||
|
'version_needed' => $dir['version_needed'][1],
|
||||||
|
'general_bit_flag' => str_pad(decbin($dir['general_bit_flag'][1]), 8, '0', STR_PAD_LEFT),
|
||||||
|
'compression_method' => $dir['compression_method'][1],
|
||||||
|
'lastmod_datetime' => mktime($last_mod_hour, $last_mod_minute, $last_mod_second, $last_mod_month, $last_mod_day, $last_mod_year),
|
||||||
|
'crc-32' => str_pad(dechex(ord($dir['crc-32'][3])), 2, '0', STR_PAD_LEFT) .
|
||||||
|
str_pad(dechex(ord($dir['crc-32'][2])), 2, '0', STR_PAD_LEFT) .
|
||||||
|
str_pad(dechex(ord($dir['crc-32'][1])), 2, '0', STR_PAD_LEFT) .
|
||||||
|
str_pad(dechex(ord($dir['crc-32'][0])), 2, '0', STR_PAD_LEFT),
|
||||||
|
'compressed_size' => $dir['compressed_size'][1],
|
||||||
|
'uncompressed_size' => $dir['uncompressed_size'][1],
|
||||||
|
'disk_number_start' => $dir['disk_number_start'][1],
|
||||||
|
'internal_attributes' => $dir['internal_attributes'][1],
|
||||||
|
'external_attributes1' => $dir['external_attributes1'][1],
|
||||||
|
'external_attributes2' => $dir['external_attributes2'][1],
|
||||||
|
'relative_offset' => $dir['relative_offset'][1],
|
||||||
|
'file_name' => $dir['file_name'],
|
||||||
|
'extra_field' => $dir['extra_field'],
|
||||||
|
'file_comment' => $dir['file_comment'],
|
||||||
|
);
|
||||||
|
|
||||||
|
$signature = fread($fh, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($central_dir_list)) {
|
||||||
|
foreach ($central_dir_list as $filename => $details) {
|
||||||
|
$i = $this->_get_file_header($fh, $details['relative_offset']);
|
||||||
|
|
||||||
|
$this->_archive_info[$filename]['file_name'] = $filename;
|
||||||
|
$this->_archive_info[$filename]['compression_method'] = $details['compression_method'];
|
||||||
|
$this->_archive_info[$filename]['version_needed'] = $details['version_needed'];
|
||||||
|
$this->_archive_info[$filename]['lastmod_datetime'] = $details['lastmod_datetime'];
|
||||||
|
$this->_archive_info[$filename]['crc-32'] = $details['crc-32'];
|
||||||
|
$this->_archive_info[$filename]['compressed_size'] = $details['compressed_size'];
|
||||||
|
$this->_archive_info[$filename]['uncompressed_size'] = $details['uncompressed_size'];
|
||||||
|
$this->_archive_info[$filename]['lastmod_datetime'] = $details['lastmod_datetime'];
|
||||||
|
$this->_archive_info[$filename]['extra_field'] = $i['extra_field'];
|
||||||
|
$this->_archive_info[$filename]['contents_start_offset'] = $i['contents_start_offset'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function _read_files_by_signatures(&$fh)
|
||||||
|
{
|
||||||
|
fseek($fh, 0);
|
||||||
|
|
||||||
|
$return = false;
|
||||||
|
for (;;) {
|
||||||
|
$details = $this->_get_file_header($fh);
|
||||||
|
|
||||||
|
if ( !$details) {
|
||||||
|
fseek($fh, 12 - 4, SEEK_CUR);
|
||||||
|
$details = $this->_get_file_header($fh);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !$details) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$filename = $details['file_name'];
|
||||||
|
$this->_archive_info[$filename] = $details;
|
||||||
|
$return = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function _get_file_header(&$fh, $start_offset = FALSE)
|
||||||
|
{
|
||||||
|
if ($start_offset !== false) {
|
||||||
|
fseek($fh, $start_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
$signature = fread($fh, 4);
|
||||||
|
|
||||||
|
if ($signature == $this->_zip_signature) {
|
||||||
|
$file['version_needed'] = unpack("v", fread($fh, 2));
|
||||||
|
$file['general_bit_flag'] = unpack("v", fread($fh, 2));
|
||||||
|
$file['compression_method'] = unpack("v", fread($fh, 2));
|
||||||
|
$file['lastmod_time'] = unpack("v", fread($fh, 2));
|
||||||
|
$file['lastmod_date'] = unpack("v", fread($fh, 2));
|
||||||
|
$file['crc-32'] = fread($fh, 4);
|
||||||
|
$file['compressed_size'] = unpack("V", fread($fh, 4));
|
||||||
|
$file['uncompressed_size'] = unpack("V", fread($fh, 4));
|
||||||
|
$zip_file_length = unpack("v", fread($fh, 2));
|
||||||
|
$extra_field_length = unpack("v", fread($fh, 2));
|
||||||
|
$file['file_name'] = fread($fh, $zip_file_length[1]);
|
||||||
|
$file['extra_field'] = $extra_field_length[1] ? fread($fh, $extra_field_length[1]) : '';
|
||||||
|
$file['contents_start_offset'] = ftell($fh);
|
||||||
|
|
||||||
|
fseek($fh, $file['compressed_size'][1], SEEK_CUR);
|
||||||
|
|
||||||
|
$binary_mod_date = str_pad(decbin($file['lastmod_date'][1]), 16, '0', STR_PAD_LEFT);
|
||||||
|
$binary_mod_time = str_pad(decbin($file['lastmod_time'][1]), 16, '0', STR_PAD_LEFT);
|
||||||
|
|
||||||
|
$last_mod_year = bindec(substr($binary_mod_date, 0, 7)) + 1980;
|
||||||
|
$last_mod_month = bindec(substr($binary_mod_date, 7, 4));
|
||||||
|
$last_mod_day = bindec(substr($binary_mod_date, 11, 5));
|
||||||
|
$last_mod_hour = bindec(substr($binary_mod_time, 0, 5));
|
||||||
|
$last_mod_minute = bindec(substr($binary_mod_time, 5, 6));
|
||||||
|
$last_mod_second = bindec(substr($binary_mod_time, 11, 5));
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'file_name' => $file['file_name'],
|
||||||
|
'compression_method' => $file['compression_method'][1],
|
||||||
|
'version_needed' => $file['version_needed'][1],
|
||||||
|
'lastmod_datetime' => mktime($last_mod_hour, $last_mod_minute, $last_mod_second, $last_mod_month, $last_mod_day, $last_mod_year),
|
||||||
|
'crc-32' => str_pad(dechex(ord($file['crc-32'][3])), 2, '0', STR_PAD_LEFT) .
|
||||||
|
str_pad(dechex(ord($file['crc-32'][2])), 2, '0', STR_PAD_LEFT) .
|
||||||
|
str_pad(dechex(ord($file['crc-32'][1])), 2, '0', STR_PAD_LEFT) .
|
||||||
|
str_pad(dechex(ord($file['crc-32'][0])), 2, '0', STR_PAD_LEFT),
|
||||||
|
'compressed_size' => $file['compressed_size'][1],
|
||||||
|
'uncompressed_size' => $file['uncompressed_size'][1],
|
||||||
|
'extra_field' => $file['extra_field'],
|
||||||
|
'general_bit_flag' => str_pad(decbin($file['general_bit_flag'][1]), 8, '0', STR_PAD_LEFT),
|
||||||
|
'contents_start_offset' => $file['contents_start_offset']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function _extract_file($compressed_file_name, $target_file_name = false)
|
||||||
|
{
|
||||||
|
if ( !sizeof($this->_archive_info)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$fdetails = &$this->_archive_info[$compressed_file_name];
|
||||||
|
|
||||||
|
if ( ! isset($this->_archive_info[$compressed_file_name])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (substr($compressed_file_name, -1) == '/') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !$fdetails['uncompressed_size']) {
|
||||||
|
return $target_file_name ? file_put_contents($target_file_name, '') : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
fseek($this->farc, $fdetails['contents_start_offset']);
|
||||||
|
$ret = $this->_uncompress(
|
||||||
|
fread($this->farc, $fdetails['compressed_size']),
|
||||||
|
$fdetails['compression_method'],
|
||||||
|
$fdetails['uncompressed_size'],
|
||||||
|
$target_file_name
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($target_file_name) {
|
||||||
|
chmod($target_file_name, 0644);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function _uncompress($content, $mode, $uncompressed_size, $target_file_name = false)
|
||||||
|
{
|
||||||
|
switch ($mode) {
|
||||||
|
case 0:
|
||||||
|
return $target_file_name ? file_put_contents($target_file_name, $content) : $content;
|
||||||
|
case 8:
|
||||||
|
return $target_file_name
|
||||||
|
? file_put_contents($target_file_name, gzinflate($content, $uncompressed_size))
|
||||||
|
: gzinflate($content, $uncompressed_size);
|
||||||
|
case 12:
|
||||||
|
return $target_file_name
|
||||||
|
? file_put_contents($target_file_name, bzdecompress($content)) : bzdecompress($content);
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
40
plugins/blog/README.md
Normal file
40
plugins/blog/README.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
Blog
|
||||||
|
================
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
#### Get Post
|
||||||
|
<?php echo Blog::getPost(); ?>
|
||||||
|
|
||||||
|
#### Get Posts
|
||||||
|
<?php echo Blog::getPosts(); ?>
|
||||||
|
|
||||||
|
#### Get 5 Posts (could be any amount, 5 or 1 or 25):
|
||||||
|
<?php echo Blog::getPosts(5); ?>
|
||||||
|
|
||||||
|
#### Get related Posts
|
||||||
|
<?php echo Blog::getRelatedPosts(); ?>
|
||||||
|
|
||||||
|
#### Get 4 latest posts from Blog
|
||||||
|
<?php echo Blog::getPostsBlock(4); ?>
|
||||||
|
|
||||||
|
#### Get Tags&Keywords
|
||||||
|
<?php Blog::getTags(); ?>
|
||||||
|
|
||||||
|
#### Get Tags&Keywords for current page
|
||||||
|
<?php Blog::getTags(Page::slug()); ?>
|
||||||
|
|
||||||
|
Get Post Title
|
||||||
|
<?php echo Blog::getPostTitle(); ?>
|
||||||
|
|
||||||
|
### Shortcode for content
|
||||||
|
|
||||||
|
#### Divided post into 2 parts (short and full)
|
||||||
|
{cut}
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
<p>Best free themes for Monstra CMS at monstrathemes.com</p>
|
||||||
|
{cut}
|
||||||
|
<p>There is going to display your content as blog post =)</p>
|
||||||
|
|
416
plugins/blog/blog.plugin.php
Normal file
416
plugins/blog/blog.plugin.php
Normal file
@@ -0,0 +1,416 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Blog plugin
|
||||||
|
*
|
||||||
|
* @package Monstra
|
||||||
|
* @subpackage Plugins
|
||||||
|
* @author Romanenko Sergey / Awilum
|
||||||
|
* @copyright 2012 Romanenko Sergey / Awilum
|
||||||
|
* @version 1.7.3
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Register plugin
|
||||||
|
Plugin::register( __FILE__,
|
||||||
|
__('Blog', 'blog'),
|
||||||
|
__('Blog plugin for Monstra', 'blog'),
|
||||||
|
'1.7.3',
|
||||||
|
'Awilum',
|
||||||
|
'http://monstra.org/');
|
||||||
|
|
||||||
|
// Add action
|
||||||
|
Action::add('frontend_pre_render', 'Blog::_rss');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Blog Class
|
||||||
|
*/
|
||||||
|
class Blog {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parrent page name(slug)
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public static $parent_page_name = 'blog';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tags
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* echo Blog::getTags();
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getTags($slug = null) {
|
||||||
|
|
||||||
|
// Display view
|
||||||
|
return View::factory('blog/views/frontend/tags')
|
||||||
|
->assign('tags', Blog::getTagsArray($slug))
|
||||||
|
->render();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get breadcrumbs
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* echo Blog::breadcrumbs();
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function breadcrumbs($locale = '') {
|
||||||
|
|
||||||
|
$locale = ($locale == '') ? Site::getCurrentSiteLocale() : $locale;
|
||||||
|
|
||||||
|
$current_page = Pages::$requested_page;
|
||||||
|
$parent_page = '';
|
||||||
|
if ($current_page !== 'error404') {
|
||||||
|
$page = Pages::$pages->select('[slug="'.$current_page.'" and locale="'.$locale.'"]', null);
|
||||||
|
if (trim($page['parent']) !== '') {
|
||||||
|
$parent = true;
|
||||||
|
$parent_page = Pages::$pages->select('[slug="'.$page['parent'].'" and locale="'.$locale.'"]', null);
|
||||||
|
} else {
|
||||||
|
$parent = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display view
|
||||||
|
View::factory('blog/views/frontend/breadcrumbs')
|
||||||
|
->assign('current_page', $current_page)
|
||||||
|
->assign('page', $page)
|
||||||
|
->assign('parent', $parent)
|
||||||
|
->assign('parent_page', $parent_page)
|
||||||
|
->display();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tags array
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* echo Blog::getTagsArray();
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public static function getTagsArray($slug = null, $locale='') {
|
||||||
|
|
||||||
|
// Init vars
|
||||||
|
$tags = array();
|
||||||
|
$tags_string = '';
|
||||||
|
|
||||||
|
$locale = ($locale == '') ? Site::getCurrentSiteLocale() : $locale;
|
||||||
|
|
||||||
|
if ($slug == null) {
|
||||||
|
$posts = Pages::$pages->select('[parent="'.Blog::$parent_page_name.'" and status="published" and locale="'.$locale.'"]', 'all');
|
||||||
|
} else {
|
||||||
|
$posts = Pages::$pages->select('[parent="'.Blog::$parent_page_name.'" and status="published" and slug="'.$slug.'" and locale="'.$locale.'"]', 'all');
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($posts as $post) {
|
||||||
|
if (isset($post['tags'])) {
|
||||||
|
$tags_string .= $post['tags'].',';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$tags_string = substr($tags_string, 0, strlen($tags_string)-1);
|
||||||
|
|
||||||
|
// Explode tags in tags array
|
||||||
|
$tags = explode(',', $tags_string);
|
||||||
|
|
||||||
|
// Remove empty array elementss
|
||||||
|
foreach ($tags as $key => $value) {
|
||||||
|
if ($tags[$key] == '') {
|
||||||
|
unset($tags[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Trim tags
|
||||||
|
array_walk($tags, create_function('&$val', '$val = trim($val);'));
|
||||||
|
|
||||||
|
// Get unique tags
|
||||||
|
$tags = array_unique($tags);
|
||||||
|
|
||||||
|
// Return tags
|
||||||
|
return $tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get posts
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* // Get all posts
|
||||||
|
* echo Blog::getPosts();
|
||||||
|
*
|
||||||
|
* // Get last 5 posts
|
||||||
|
* echo Blog::getPosts(5);
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param integer $num Number of posts to show
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getPosts($nums = 10, $locale = '') {
|
||||||
|
|
||||||
|
$locale = ($locale == '') ? Site::getCurrentSiteLocale() : $locale;
|
||||||
|
|
||||||
|
// Get page param
|
||||||
|
$page = (Request::get('page')) ? (int)Request::get('page') : 1;
|
||||||
|
|
||||||
|
if (Request::get('tag')) {
|
||||||
|
$query = '[parent="'.Blog::$parent_page_name.'" and status="published" and locale="'.$locale.'" and contains(tags, "'.Request::get('tag').'")]';
|
||||||
|
Notification::set('tag', Request::get('tag'));
|
||||||
|
} else {
|
||||||
|
$query = '[parent="'.Blog::$parent_page_name.'" and status="published" and locale="'.$locale.'"]';
|
||||||
|
Notification::clean();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get Elements Count
|
||||||
|
$elements = count(Pages::$pages->select($query, 'all'));
|
||||||
|
|
||||||
|
// Get Pages Count
|
||||||
|
$pages = ceil($elements/$nums);
|
||||||
|
|
||||||
|
|
||||||
|
if ($page < 1) {
|
||||||
|
$page = 1;
|
||||||
|
} elseif ($page > $pages) {
|
||||||
|
$page = $pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
$start = ($page-1)*$nums;
|
||||||
|
|
||||||
|
// If there is no posts
|
||||||
|
if ($start < 0) $start = 0;
|
||||||
|
|
||||||
|
// Get posts and sort by DESC
|
||||||
|
$posts = Pages::$pages->select($query, $nums, $start, array('slug', 'title', 'author', 'date', 'locale', 'template'), 'date', 'DESC');
|
||||||
|
|
||||||
|
// Loop
|
||||||
|
foreach($posts as $key => $post) {
|
||||||
|
$post_short = explode("{cut}", Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . $post['id'] . '.page.txt')));
|
||||||
|
$posts[$key]['content'] = Filter::apply('content', $post_short[0]);
|
||||||
|
$posts[$key]['slug'] = $posts[$key]['slug'];
|
||||||
|
$posts[$key]['locale'] = ($posts[$key]['locale'] == Site::getCurrentSiteLocale()) ? '' : $posts[$key]['locale'].'/';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display view
|
||||||
|
return View::factory('blog/views/frontend/index')
|
||||||
|
->assign('posts', $posts)
|
||||||
|
->render().
|
||||||
|
View::factory('blog/views/frontend/pager')
|
||||||
|
->assign('pages', $pages)
|
||||||
|
->assign('page', $page)
|
||||||
|
->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get posts block
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* // Get all posts
|
||||||
|
* echo Blog::getPostsBlock();
|
||||||
|
*
|
||||||
|
* // Get last 5 posts
|
||||||
|
* echo Blog::getPostsBlock(5);
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param integer $num Number of posts to show
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getPostsBlock($nums = 10, $locale = '') {
|
||||||
|
|
||||||
|
$locale = ($locale == '') ? Site::getCurrentSiteLocale() : $locale;
|
||||||
|
|
||||||
|
// XPath Query
|
||||||
|
$query = '[parent="'.Blog::$parent_page_name.'" and status="published" and locale="'.$locale.'"]';
|
||||||
|
|
||||||
|
// Get posts and sort by DESC
|
||||||
|
$posts = Pages::$pages->select($query, $nums, 0, array('slug', 'title', 'author', 'date'), 'date', 'DESC');
|
||||||
|
|
||||||
|
// Loop
|
||||||
|
foreach($posts as $key => $post) {
|
||||||
|
$post_short = explode("{cut}", Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . $post['id'] . '.page.txt')));
|
||||||
|
$posts[$key]['content'] = Filter::apply('content', $post_short[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display view
|
||||||
|
return View::factory('blog/views/frontend/block')
|
||||||
|
->assign('posts', $posts)
|
||||||
|
->render();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get related posts
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* echo Blog::getRelatedPosts();
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getRelatedPosts($limit = null, $locale = '') {
|
||||||
|
|
||||||
|
$locale = ($locale == '') ? Site::getCurrentSiteLocale() : $locale;
|
||||||
|
|
||||||
|
$related_posts = array();
|
||||||
|
$tags = Blog::getTagsArray(Page::slug());
|
||||||
|
|
||||||
|
foreach($tags as $tag) {
|
||||||
|
|
||||||
|
$query = '[parent="'.Blog::$parent_page_name.'" and locale="'.$locale.'" and status="published" and contains(tags, "'.$tag.'") and slug!="'.Page::slug().'"]';
|
||||||
|
|
||||||
|
if ($result = Arr::subvalSort(Pages::$pages->select($query, ($limit == null) ? 'all' : (int)$limit), 'date', 'DESC')) {
|
||||||
|
$related_posts = $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display view
|
||||||
|
return View::factory('blog/views/frontend/related_posts')
|
||||||
|
->assign('related_posts', $related_posts)
|
||||||
|
->render();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get post content
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* echo Blog::getPost();
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getPost() {
|
||||||
|
|
||||||
|
// Get post
|
||||||
|
$post = Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . Pages::$page['id'] . '.page.txt'));
|
||||||
|
|
||||||
|
// Apply content filter
|
||||||
|
$post = Filter::apply('content', $post);
|
||||||
|
|
||||||
|
// Remove {cut} shortcode
|
||||||
|
$post = strtr($post, array('{cut}' => ''));
|
||||||
|
|
||||||
|
// Return post
|
||||||
|
return $post;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get post content before cut
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* echo Blog::getPostBeforeCut('home');
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getPostBeforeCut($slug, $locale = '') {
|
||||||
|
|
||||||
|
$locale = ($locale == '') ? Site::getCurrentSiteLocale() : $locale;
|
||||||
|
|
||||||
|
$page = Pages::$pages->select('[slug="'.$slug.'" and locale="'.$locale.'"]', null);
|
||||||
|
|
||||||
|
// Get post
|
||||||
|
$post = explode("{cut}", Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt')));
|
||||||
|
|
||||||
|
// Apply content filter
|
||||||
|
$post_content = Filter::apply('content', $post[0]);
|
||||||
|
|
||||||
|
// Return post
|
||||||
|
return $post_content;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get post content after cut
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* echo Blog::getPostAfterCut('home');
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getPostAfterCut($slug, $locale = '') {
|
||||||
|
|
||||||
|
$locale = ($locale == '') ? Site::getCurrentSiteLocale() : $locale;
|
||||||
|
|
||||||
|
$page = Pages::$pages->select('[slug="'.$slug.'" and locale="'.$locale.'"]', null);
|
||||||
|
|
||||||
|
// Get post
|
||||||
|
$post = explode("{cut}", Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt')));
|
||||||
|
|
||||||
|
// Apply content filter
|
||||||
|
$post_content = Filter::apply('content', $post[1]);
|
||||||
|
|
||||||
|
// Return post
|
||||||
|
return $post_content;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Blog Post title
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* echo Blog::getPostTitle();
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getPostTitle() {
|
||||||
|
return Page::title();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Blog Post Date
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* echo Blog::getPostDate();
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $format Date format
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getPostDate($format = 'Y-m-d') {
|
||||||
|
return Page::date($format);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get author of current post
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* echo Blog::getPostAuthor();
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getPostAuthor()
|
||||||
|
{
|
||||||
|
return Page::author();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* _rss
|
||||||
|
*/
|
||||||
|
public static function _rss() {
|
||||||
|
if (Uri::segment(0) == 'rss') {
|
||||||
|
include PLUGINS . DS . 'blog' . DS . 'rss.php';
|
||||||
|
Request::shutdown();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
11
plugins/blog/install/blog.manifest.xml
Normal file
11
plugins/blog/install/blog.manifest.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<root>
|
||||||
|
<plugin_location>plugins/blog/blog.plugin.php</plugin_location>
|
||||||
|
<plugin_status>active</plugin_status>
|
||||||
|
<plugin_priority>15</plugin_priority>
|
||||||
|
<plugin_name>Blog</plugin_name>
|
||||||
|
<plugin_description>Blog plugin for Monstra</plugin_description>
|
||||||
|
<plugin_version>1.7.3</plugin_version>
|
||||||
|
<plugin_author>Awilum</plugin_author>
|
||||||
|
<plugin_author_uri>http://monstra.org/</plugin_author_uri>
|
||||||
|
</root>
|
12
plugins/blog/languages/en.lang.php
Normal file
12
plugins/blog/languages/en.lang.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'blog' => array(
|
||||||
|
'Blog' => 'Blog',
|
||||||
|
'Blog plugin for Monstra' => 'Blog plugin for Monstra',
|
||||||
|
'begin' => 'begin',
|
||||||
|
'end' => 'end',
|
||||||
|
'prev' => 'prev',
|
||||||
|
'next' => 'next',
|
||||||
|
)
|
||||||
|
);
|
12
plugins/blog/languages/pl.lang.php
Normal file
12
plugins/blog/languages/pl.lang.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'blog' => array(
|
||||||
|
'Blog' => 'Blog',
|
||||||
|
'Blog plugin for Monstra' => 'Wtyczka Blog dla systemu Monstra',
|
||||||
|
'begin' => 'początek',
|
||||||
|
'end' => 'koniec',
|
||||||
|
'prev' => 'poprzedni',
|
||||||
|
'next' => 'następny',
|
||||||
|
)
|
||||||
|
);
|
13
plugins/blog/languages/ru.lang.php
Normal file
13
plugins/blog/languages/ru.lang.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'blog' => array(
|
||||||
|
'Blog' => 'Блог',
|
||||||
|
'Blog plugin for Monstra' => 'Плагин блога для Monstra',
|
||||||
|
'begin' => 'начало',
|
||||||
|
'end' => 'конец',
|
||||||
|
'prev' => 'назад',
|
||||||
|
'next' => 'вперед',
|
||||||
|
'Related posts' => 'Статьи по теме',
|
||||||
|
)
|
||||||
|
);
|
12
plugins/blog/languages/tr.lang.php
Normal file
12
plugins/blog/languages/tr.lang.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'blog' => array(
|
||||||
|
'Blog' => 'Günce',
|
||||||
|
'Blog plugin for Monstra' => 'Monstra için günce eklentisi',
|
||||||
|
'begin' => 'Baş',
|
||||||
|
'end' => 'Son',
|
||||||
|
'prev' => 'Önceki',
|
||||||
|
'next' => 'Sonraki',
|
||||||
|
)
|
||||||
|
);
|
34
plugins/blog/rss.php
Normal file
34
plugins/blog/rss.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// Get all posts for blog parent page/post
|
||||||
|
$posts = Pages::$pages->select('[parent="'.Blog::$parent_page_name.'" and status="published"]', 5, 0, array('slug', 'title', 'author', 'date'), 'date', 'DESC');
|
||||||
|
|
||||||
|
// Date now
|
||||||
|
$now = date("D, d M Y H:i:s T");
|
||||||
|
ob_end_clean();
|
||||||
|
?>
|
||||||
|
<?php header('Content-type: text/xml; charset="utf-8"'); ?>
|
||||||
|
<?php echo'<?xml version="1.0" encoding="utf-8"?>'."\n"; ?>
|
||||||
|
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>MonstraCMS::BLOG::RSS</title>
|
||||||
|
<link><?php echo Option::get('siteurl'); ?>/blog</link>
|
||||||
|
<description>The latest updates for <?php echo Option::get('sitename'); ?>.</description>
|
||||||
|
<language>en-us</language>
|
||||||
|
<pubDate><?php echo $now; ?></pubDate>
|
||||||
|
<lastBuildDate><?php echo $now; ?></lastBuildDate>
|
||||||
|
<atom:link href="<?php echo Option::get('siteurl'); ?>/rss.php" rel="self" type="application/rss+xml" />
|
||||||
|
<generator>Monstra</generator>
|
||||||
|
<?php foreach ($posts as $post) { ?>
|
||||||
|
<item>
|
||||||
|
<title><?php echo $post['title']; ?></title>
|
||||||
|
<link><?php echo Option::get('siteurl').'/blog/'.$post['slug']; ?></link>
|
||||||
|
<guid><?php echo Option::get('siteurl').'/blog/'.$post['slug']; ?></guid>
|
||||||
|
<pubDate><?php echo Date::format($post['date'], 'd M Y'); ?></pubDate>
|
||||||
|
<description><![CDATA[<?php echo Text::toHtml(Text::cut(File::getContent(STORAGE . DS . 'pages' . DS . $post['id'] . '.page.txt'), 300)); ?>]]></description>
|
||||||
|
<author><?php echo $post['author']; ?></author>
|
||||||
|
</item>
|
||||||
|
<?php } ?>
|
||||||
|
</channel>
|
||||||
|
</rss>
|
||||||
|
<?php Response::status(200); ?>
|
7
plugins/blog/views/frontend/block.view.php
Normal file
7
plugins/blog/views/frontend/block.view.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php foreach($posts as $post) { ?>
|
||||||
|
<h3 class="monstra-blog-title"><a href="<?php echo Option::get('siteurl'); ?>/<?php echo Blog::$parent_page_name; ?>/<?php echo $post['slug'] ?>"><?php echo $post['title']; ?></a></h3>
|
||||||
|
<small class="monstra-blog-date"><?php echo Date::format($post['date'], 'd M Y'); ?></small>
|
||||||
|
<div class="monstra-blog-post">
|
||||||
|
<?php echo $post['content']; ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
5
plugins/blog/views/frontend/breadcrumbs.view.php
Normal file
5
plugins/blog/views/frontend/breadcrumbs.view.php
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?php if ($parent) { ?>
|
||||||
|
<a href="<?php echo Site::url()."/".$page['parent']; ?><?php if(Notification::get('tag')) { ?>?tag=<?php echo Notification::get('tag'); ?><?php } ?>"><?php echo $parent_page['title']; ?></a> <span>→</span> <a href="<?php echo Site::url().$page['parent'].'/'.$page['slug']; ?>"><?php echo $page['title']; ?></a>
|
||||||
|
<?php } else { ?>
|
||||||
|
<a href="<?php echo Site::url()."/".$page['slug']; ?><?php if(Notification::get('tag')) { ?>?tag=<?php echo Notification::get('tag'); ?><?php } ?>"><?php echo $page['title']; ?></a>
|
||||||
|
<?php } ?>
|
7
plugins/blog/views/frontend/index.view.php
Normal file
7
plugins/blog/views/frontend/index.view.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php foreach($posts as $post) { ?>
|
||||||
|
<h3 class="monstra-blog-title"><a href="<?php echo Option::get('siteurl'); ?>/<?php echo $post['locale'] ?><?php echo Blog::$parent_page_name; ?>/<?php echo $post['slug'] ?>"><?php echo $post['title']; ?></a></h3>
|
||||||
|
<small class="monstra-blog-date"><?php echo Date::format($post['date'], 'd M Y'); ?> / <?php echo $post['author']; ?></small>
|
||||||
|
<div class="monstra-blog-post">
|
||||||
|
<?php echo $post['content']; ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
29
plugins/blog/views/frontend/pager.view.php
Normal file
29
plugins/blog/views/frontend/pager.view.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<br><br>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (Request::get('tag')) $tag = '&tag='.Request::get('tag'); else $tag = '';
|
||||||
|
|
||||||
|
$neighbours = 6;
|
||||||
|
$left_neighbour = $page - $neighbours;
|
||||||
|
if ($left_neighbour < 1) $left_neighbour = 1;
|
||||||
|
|
||||||
|
$right_neighbour = $page + $neighbours;
|
||||||
|
if ($right_neighbour > $pages) $right_neighbour = $pages;
|
||||||
|
|
||||||
|
if ($page > 1) {
|
||||||
|
echo ' <a href="?page=1'.$tag.'">'.__('begin', 'blog').'</a> ... <a href="?page=' . ($page-1) . $tag.'"> '.__('prev', 'blog').'</a> ';
|
||||||
|
}
|
||||||
|
|
||||||
|
for ($i=$left_neighbour; $i<=$right_neighbour; $i++) {
|
||||||
|
if ($i != $page) {
|
||||||
|
echo ' <a href="?page=' . $i . $tag.'">' . $i . '</a> ';
|
||||||
|
} else {
|
||||||
|
echo ' <b>' . $i . '</b> ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($page < $pages) {
|
||||||
|
echo ' <a href="?page=' . ($page+1) . $tag.'">'.__('next', 'blog').'</a> ... <a href="?page=' . $pages . $tag.'">'.__('end', 'blog').'</a> ';
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
7
plugins/blog/views/frontend/related_posts.view.php
Normal file
7
plugins/blog/views/frontend/related_posts.view.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<br><br>
|
||||||
|
<b><?php echo __('Related posts', 'blog'); ?>:</b>
|
||||||
|
<div>
|
||||||
|
<?php foreach($related_posts as $related_post) { ?>
|
||||||
|
<a href="<?php echo Option::get('siteurl'); ?>/<?php echo Blog::$parent_page_name; ?>/<?php echo $related_post['slug']; ?>"><?php echo $related_post['title']; ?></a><br>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
3
plugins/blog/views/frontend/tags.view.php
Normal file
3
plugins/blog/views/frontend/tags.view.php
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?php foreach($tags as $tag) { ?>
|
||||||
|
<a href="<?php echo Option::get('siteurl'); ?>/<?php echo Blog::$parent_page_name; ?>?tag=<?php echo $tag; ?>" class="monstra-blog-tag"><span class="label label-primary"><?php echo $tag; ?></span></a>
|
||||||
|
<?php } ?>
|
@@ -15,8 +15,6 @@ class BackupAdmin extends Backend
|
|||||||
{
|
{
|
||||||
$backups_path = ROOT . DS . 'backups';
|
$backups_path = ROOT . DS . 'backups';
|
||||||
|
|
||||||
$backups_list = array();
|
|
||||||
|
|
||||||
// Create backup
|
// Create backup
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
if (Request::post('create_backup')) {
|
if (Request::post('create_backup')) {
|
||||||
@@ -32,12 +30,18 @@ class BackupAdmin extends Backend
|
|||||||
$zip->readDir(STORAGE . DS, false);
|
$zip->readDir(STORAGE . DS, false);
|
||||||
|
|
||||||
// Add public folder
|
// Add public folder
|
||||||
if (Request::post('add_public_folder')) $zip->readDir(ROOT . DS . 'public' . DS, false);
|
$zip->readDir(ROOT . DS . 'public' . DS, false);
|
||||||
|
|
||||||
// Add plugins folder
|
// Add plugins folder
|
||||||
if (Request::post('add_plugins_folder')) $zip->readDir(PLUGINS . DS, false);
|
$zip->readDir(PLUGINS . DS, false, null, array(PLUGINS . DS . 'box'));
|
||||||
|
|
||||||
$zip->archive($backups_path . DS . Date::format(time(), "Y-m-d-H-i-s").'.zip');
|
if ($zip->archive($backups_path . DS . Date::format(time(), "Y-m-d-H-i-s").'.zip')) {
|
||||||
|
Notification::set('success', __('Backup was created', 'backup'));
|
||||||
|
} else {
|
||||||
|
Notification::set('error', __('Backup was not created', 'backup'));
|
||||||
|
}
|
||||||
|
|
||||||
|
Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup');
|
||||||
|
|
||||||
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
||||||
}
|
}
|
||||||
@@ -48,8 +52,13 @@ class BackupAdmin extends Backend
|
|||||||
|
|
||||||
if (Security::check(Request::get('token'))) {
|
if (Security::check(Request::get('token'))) {
|
||||||
|
|
||||||
File::delete($backups_path . DS . Request::get('delete_file'));
|
if (File::delete($backups_path . DS . Request::get('delete_file'))) {
|
||||||
Request::redirect(Option::get('siteurl').'admin/index.php?id=backup');
|
Notification::set('success', __('Backup was deleted', 'backup'));
|
||||||
|
} else {
|
||||||
|
Notification::set('error', __('Backup was not deleted', 'backup'));
|
||||||
|
}
|
||||||
|
|
||||||
|
Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup');
|
||||||
|
|
||||||
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
||||||
}
|
}
|
||||||
@@ -62,12 +71,34 @@ class BackupAdmin extends Backend
|
|||||||
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get backup list
|
// Restore backup
|
||||||
$backups_list = File::scan($backups_path, '.zip');
|
// -------------------------------------
|
||||||
|
if (Request::get('restore')) {
|
||||||
|
|
||||||
|
if (Security::check(Request::get('token'))) {
|
||||||
|
|
||||||
|
$tmp_dir = ROOT . DS . 'tmp' . DS . uniqid('backup_');
|
||||||
|
|
||||||
|
if (Dir::create($tmp_dir)) {
|
||||||
|
$file_locations = Zip::factory()->extract($backups_path . DS . Request::get('restore'), $tmp_dir);
|
||||||
|
if (!empty($file_locations)) {
|
||||||
|
Dir::copy($tmp_dir, ROOT . DS);
|
||||||
|
Notification::set('success', __('Backup was restored', 'backup'));
|
||||||
|
} else {
|
||||||
|
Notification::set('error', __('Unzip error', 'backup'));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Notification::set('error', __('Backup was not restored', 'backup'));
|
||||||
|
}
|
||||||
|
|
||||||
|
Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup');
|
||||||
|
|
||||||
|
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
||||||
|
}
|
||||||
|
|
||||||
// Display view
|
// Display view
|
||||||
View::factory('box/backup/views/backend/index')
|
View::factory('box/backup/views/backend/index')
|
||||||
->assign('backups_list', $backups_list)
|
->assign('backups_list', File::scan($backups_path, '.zip'))
|
||||||
->display();
|
->display();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
return array(
|
return array(
|
||||||
'backup' => array(
|
'backup' => array(
|
||||||
'Backups' => 'Backups',
|
'Backups' => 'Backups',
|
||||||
|
'Backup' => 'Backup',
|
||||||
'Backup Date' => 'Backup Date',
|
'Backup Date' => 'Backup Date',
|
||||||
'Create Backup' => 'Create Backup',
|
'Create Backup' => 'Create Backup',
|
||||||
|
'Restore' => 'Restore',
|
||||||
'Delete' => 'Delete',
|
'Delete' => 'Delete',
|
||||||
'storage' => 'storage',
|
'storage' => 'storage',
|
||||||
'public' => 'public',
|
'public' => 'public',
|
||||||
@@ -13,5 +15,12 @@
|
|||||||
'Actions' => 'Actions',
|
'Actions' => 'Actions',
|
||||||
'Delete backup: :backup' => 'Delete backup: :backup',
|
'Delete backup: :backup' => 'Delete backup: :backup',
|
||||||
'Creating...' => 'Creating...',
|
'Creating...' => 'Creating...',
|
||||||
|
'Backup was created' => 'Backup was created',
|
||||||
|
'Backup was not created' => 'Backup was not created',
|
||||||
|
'Backup was deleted' => 'Backup was deleted',
|
||||||
|
'Backup was not deleted' => 'Backup was not deleted',
|
||||||
|
'Backup was restored' => 'Backup was restored',
|
||||||
|
'Unzip error' => 'Unzip error',
|
||||||
|
'Backup was not restored' => 'Backup was not restored',
|
||||||
)
|
)
|
||||||
);
|
);
|
17
plugins/box/backup/languages/id.lang.php
Normal file
17
plugins/box/backup/languages/id.lang.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'backup' => array(
|
||||||
|
'Backups' => 'Cadangan',
|
||||||
|
'Backup date' => 'Tanggal Cadangan',
|
||||||
|
'Create Backup' => 'Buat Cadangan',
|
||||||
|
'Delete' => 'Hapus',
|
||||||
|
'storage' => 'Penyimpanan',
|
||||||
|
'public' => 'Umum',
|
||||||
|
'plugins' => 'Plugins',
|
||||||
|
'Size' => 'Ukuran',
|
||||||
|
'Actions' => 'Tindakan',
|
||||||
|
'Delete backup: :backup' => 'Hapus Cadangan: :backup',
|
||||||
|
'Creating...' => 'Dibuat...',
|
||||||
|
)
|
||||||
|
);
|
17
plugins/box/backup/languages/ja.lang.php
Normal file
17
plugins/box/backup/languages/ja.lang.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'backup' => array(
|
||||||
|
'Backups' => 'バックアップ',
|
||||||
|
'Backup Date' => 'バックアップ日',
|
||||||
|
'Create Backup' => 'バックアップの作成',
|
||||||
|
'Delete' => '削除',
|
||||||
|
'storage' => 'ストレージ',
|
||||||
|
'public' => '公開',
|
||||||
|
'plugins' => 'プラグイン',
|
||||||
|
'Size' => 'サイズ',
|
||||||
|
'Actions' => 'アクション',
|
||||||
|
'Delete backup: :backup' => 'バックアップの削除: :backup',
|
||||||
|
'Creating...' => '作成中...',
|
||||||
|
)
|
||||||
|
);
|
@@ -13,5 +13,9 @@
|
|||||||
'Actions' => 'Действия',
|
'Actions' => 'Действия',
|
||||||
'Delete backup: :backup' => 'Удалить бекап: :backup',
|
'Delete backup: :backup' => 'Удалить бекап: :backup',
|
||||||
'Creating...' => 'Создание...',
|
'Creating...' => 'Создание...',
|
||||||
|
'Backup was deleted' => 'Бекап не был создан',
|
||||||
|
'Backup was created' => 'Бекап был создан',
|
||||||
|
'Backup was not restored' => 'Бекап не был восстановлен',
|
||||||
|
'Backup was restored' => 'Бекап был восстановлен',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
26
plugins/box/backup/languages/tr.lang.php
Normal file
26
plugins/box/backup/languages/tr.lang.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'backup' => array(
|
||||||
|
'Backups' => 'Yedekler',
|
||||||
|
'Backup' => 'Yedek',
|
||||||
|
'Backup Date' => 'Yedekleme Tarihi',
|
||||||
|
'Create Backup' => 'Yedek Al',
|
||||||
|
'Delete' => 'Sil',
|
||||||
|
'Restore' => 'Geri Yükle',
|
||||||
|
'storage' => 'depo',
|
||||||
|
'public' => 'genel',
|
||||||
|
'plugins' => 'eklentiler',
|
||||||
|
'Size' => 'Boyut',
|
||||||
|
'Actions' => 'Eylemler',
|
||||||
|
'Delete backup: :backup' => ':backup adlı yedek silinsin mi',
|
||||||
|
'Creating...' => 'Oluşturuluyor...',
|
||||||
|
'Backup was created' => 'Yedek oluşturuldu',
|
||||||
|
'Backup was not created' => 'Yedek oluşturulmadı',
|
||||||
|
'Backup was deleted' => 'Yedek silindi',
|
||||||
|
'Backup was not deleted' => 'Yedek silinmedi',
|
||||||
|
'Backup was restored' => 'Yedek geri yüklendi',
|
||||||
|
'Unzip error' => 'Sıkıştırılmış yedeği açma (unzip) hatası',
|
||||||
|
'Backup was not restored' => 'Yedek geri yüklenmedi',
|
||||||
|
)
|
||||||
|
);
|
17
plugins/box/backup/languages/zh-cn.lang.php
Normal file
17
plugins/box/backup/languages/zh-cn.lang.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'backup' => array(
|
||||||
|
'Backups' => '备份',
|
||||||
|
'Backup Date' => '备份日期',
|
||||||
|
'Create Backup' => '创建备份',
|
||||||
|
'Delete' => '删除',
|
||||||
|
'storage' => '存储',
|
||||||
|
'public' => '公开',
|
||||||
|
'plugins' => '插件',
|
||||||
|
'Size' => '大小',
|
||||||
|
'Actions' => '操作',
|
||||||
|
'Delete backup: :backup' => '删除备份: :backup',
|
||||||
|
'Creating...' => '正在创建...',
|
||||||
|
)
|
||||||
|
);
|
@@ -1,30 +1,28 @@
|
|||||||
<h2><?php echo __('Backups', 'backup'); ?></h2>
|
<script>$().ready(function(){$('[name=create_backup]').click(function(){$(this).button('loading');});});</script>
|
||||||
<br />
|
|
||||||
|
|
||||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
<div class="vertical-align margin-bottom-1">
|
||||||
|
<div class="text-left row-phone">
|
||||||
<script>
|
<h2><?php echo __('Backups', 'backup'); ?></h2>
|
||||||
$().ready(function(){$('[name=create_backup]').click(function(){$(this).button('loading');});});
|
</div>
|
||||||
</script>
|
<div class="text-right row-phone">
|
||||||
|
<?php
|
||||||
<?php
|
echo (
|
||||||
echo (
|
Form::open(null, array('class' => 'form-inline')) .
|
||||||
Form::open() .
|
Form::hidden('csrf', Security::token()).
|
||||||
Form::hidden('csrf', Security::token()).
|
Form::submit('create_backup', __('Create Backup', 'backup'), array('class' => 'btn btn-phone btn-primary', 'data-loading-text' => __('Creating...', 'backup'))).
|
||||||
Form::checkbox('add_storage_folder', null, true, array('disabled' => 'disabled')) . ' ' . __('storage', 'backup') . ' ' . Html::nbsp(2) .
|
Form::close()
|
||||||
Form::checkbox('add_public_folder') . ' ' . __('public', 'backup') . ' ' . Html::nbsp(2) .
|
);
|
||||||
Form::checkbox('add_plugins_folder') . ' ' . __('plugins', 'backup') . ' ' . Html::nbsp(2) .
|
?>
|
||||||
Form::submit('create_backup', __('Create Backup', 'backup'), array('class' => 'btn', 'data-loading-text' => __('Creating...', 'backup'))).
|
</div>
|
||||||
Form::close()
|
</div>
|
||||||
);
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- Backup_list -->
|
<!-- Backup_list -->
|
||||||
|
<div class="table-responsive">
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php echo __('Backup', 'backup'); ?></th>
|
<th><?php echo __('Backup', 'backup'); ?></th>
|
||||||
<th><?php echo __('Size', 'backup'); ?></th>
|
<th class="visible-lg hidden-xs"><?php echo __('Size', 'backup'); ?></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -33,14 +31,21 @@ $().ready(function(){$('[name=create_backup]').click(function(){$(this).button('
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php $name = strtotime(str_replace('-', '', basename($backup, '.zip'))); ?>
|
<?php $name = strtotime(str_replace('-', '', basename($backup, '.zip'))); ?>
|
||||||
<?php echo Html::anchor(Date::format($name, 'F jS, Y - g:i A'), Option::get('siteurl').'admin/index.php?id=backup&download='.$backup.'&token='.Security::token()); ?>
|
<?php echo Html::anchor(Date::format($name, 'F jS, Y - g:i A'), Option::get('siteurl').'/admin/index.php?id=backup&download='.$backup.'&token='.Security::token()); ?>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo Number::byteFormat(filesize(ROOT . DS . 'backups' . DS . $backup)); ?></td>
|
<td class="visible-lg hidden-xs"><?php echo Number::byteFormat(filesize(ROOT . DS . 'backups' . DS . $backup)); ?></td>
|
||||||
<td>
|
<td>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
<?php
|
||||||
|
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||||
|
echo Html::anchor(__('Restore', 'backup'),
|
||||||
|
'index.php?id=backup&restore='.$backup.'&token='.Security::token(),
|
||||||
|
array('class' => 'btn btn-primary'));
|
||||||
|
}
|
||||||
|
?>
|
||||||
<?php echo Html::anchor(__('Delete', 'backup'),
|
<?php echo Html::anchor(__('Delete', 'backup'),
|
||||||
'index.php?id=backup&delete_file='.$backup.'&token='.Security::token(),
|
'index.php?id=backup&delete_file='.$backup.'&token='.Security::token(),
|
||||||
array('class' => 'btn btn-small', 'onclick' => "return confirmDelete('".__('Delete backup: :backup', 'backup', array(':backup' => Date::format($name, 'F jS, Y - g:i A')))."')"));
|
array('class' => 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete backup: :backup', 'backup', array(':backup' => Date::format($name, 'F jS, Y - g:i A')))."')"));
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -48,4 +53,5 @@ $().ready(function(){$('[name=create_backup]').click(function(){$(this).button('
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
<!-- /Backup_list -->
|
<!-- /Backup_list -->
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
// Add plugin navigation link
|
// Add plugin navigation link
|
||||||
Navigation::add(__('Blocks', 'blocks'), 'content', 'blocks', 2);
|
Navigation::add(__('Blocks', 'blocks'), 'content', 'blocks', 2);
|
||||||
|
Dashboard::addNewItem('blocks', __('Blocks', 'blocks'), 'index.php?id=blocks&action=add_block', 2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Blocks Admin Class
|
* Blocks Admin Class
|
||||||
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Embed Code',
|
'Embed Code' => 'Embed Code',
|
||||||
'Shortcode' => 'Shortcode',
|
'Shortcode' => 'Shortcode',
|
||||||
'PHP Code' => 'PHP Code',
|
'PHP Code' => 'PHP Code',
|
||||||
|
'Cancel' => 'Abbrechen',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Embed Code',
|
'Embed Code' => 'Embed Code',
|
||||||
'Shortcode' => 'Shortcode',
|
'Shortcode' => 'Shortcode',
|
||||||
'PHP Code' => 'PHP Code',
|
'PHP Code' => 'PHP Code',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Codigo para incrustar',
|
'Embed Code' => 'Codigo para incrustar',
|
||||||
'Shortcode' => 'Codigo corto',
|
'Shortcode' => 'Codigo corto',
|
||||||
'PHP Code' => 'Codigo PHP',
|
'PHP Code' => 'Codigo PHP',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'کد درج شده',
|
'Embed Code' => 'کد درج شده',
|
||||||
'Shortcode' => 'کدکوتاه',
|
'Shortcode' => 'کدکوتاه',
|
||||||
'PHP Code' => 'کد PHP',
|
'PHP Code' => 'کد PHP',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Code intégré',
|
'Embed Code' => 'Code intégré',
|
||||||
'Shortcode' => 'Code court',
|
'Shortcode' => 'Code court',
|
||||||
'PHP Code' => 'Code PHP',
|
'PHP Code' => 'Code PHP',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Beágyazott kód',
|
'Embed Code' => 'Beágyazott kód',
|
||||||
'Shortcode' => 'Shortcode',
|
'Shortcode' => 'Shortcode',
|
||||||
'PHP Code' => 'PHP Code',
|
'PHP Code' => 'PHP Code',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
29
plugins/box/blocks/languages/id.lang.php
Normal file
29
plugins/box/blocks/languages/id.lang.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'blocks' => array(
|
||||||
|
'Blocks' => 'Block',
|
||||||
|
'Blocks manager' => 'Pengelolaan Block',
|
||||||
|
'Delete' => 'Hapus',
|
||||||
|
'Edit' => 'Perbaiki',
|
||||||
|
'Name' => 'Nama',
|
||||||
|
'Create New Block' => 'Buat Block Baru',
|
||||||
|
'New Block' => 'Block Baru',
|
||||||
|
'Edit Block' => 'Edit Block',
|
||||||
|
'Save' => 'Simpan',
|
||||||
|
'Save and Exit' => 'Simpan dan Keluar',
|
||||||
|
'Actions' => 'Tindakan',
|
||||||
|
'Required field' => 'Isian yang Dibutuhkan',
|
||||||
|
'This block already exists' => 'Block ini sudah ada',
|
||||||
|
'This block does not exist' => 'Block ini belum ada',
|
||||||
|
'Delete block: :block' => 'Hapus Block: :block',
|
||||||
|
'Block content' => 'Isi Block',
|
||||||
|
'Block <i>:name</i> deleted' => 'Block <i>:nama</i> dihapus',
|
||||||
|
'Your changes to the block <i>:name</i> have been saved.' => 'Perubahan pada block <i>:nama</i> telah disimpan.',
|
||||||
|
'Delete block: :block' => 'Hapus Block: :block',
|
||||||
|
'View Embed Code' => 'Lihat Embed Code',
|
||||||
|
'Embed Code' => 'Embed Code',
|
||||||
|
'Shortcode' => 'Shortcode',
|
||||||
|
'PHP Code' => 'PHP Code',
|
||||||
|
)
|
||||||
|
);
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Embed Code',
|
'Embed Code' => 'Embed Code',
|
||||||
'Shortcode' => 'Shortcode',
|
'Shortcode' => 'Shortcode',
|
||||||
'PHP Code' => 'PHP Code',
|
'PHP Code' => 'PHP Code',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
29
plugins/box/blocks/languages/ja.lang.php
Normal file
29
plugins/box/blocks/languages/ja.lang.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'blocks' => array(
|
||||||
|
'Blocks' => 'ブロック',
|
||||||
|
'Blocks manager' => 'ブロックの管理',
|
||||||
|
'Delete' => '削除',
|
||||||
|
'Edit' => '編集',
|
||||||
|
'Name' => '名前',
|
||||||
|
'Create New Block' => '新しいブロックを作成',
|
||||||
|
'New Block' => '新しいブロック',
|
||||||
|
'Edit Block' => 'ブロックを編集',
|
||||||
|
'Save' => '保存',
|
||||||
|
'Save and Exit' => '保存して終了',
|
||||||
|
'Actions' => 'アクション',
|
||||||
|
'Required field' => '必須項目',
|
||||||
|
'This block already exists' => 'このブロックはすでに存在しています',
|
||||||
|
'This block does not exist' => 'このブロックは存在していません',
|
||||||
|
'Delete block: :block' => 'ブロックの削除: :block',
|
||||||
|
'Block content' => 'ブロックの内容',
|
||||||
|
'Block <i>:name</i> deleted' => '<i>:name</i> ブロックが削除されました',
|
||||||
|
'Your changes to the block <i>:name</i> have been saved.' => '<i>:name</i> への変更は保存されました。',
|
||||||
|
'Delete block: :block' => 'ブロックの削除: :block',
|
||||||
|
'View Embed Code' => '埋め込みコードを表示',
|
||||||
|
'Embed Code' => '埋め込みコード',
|
||||||
|
'Shortcode' => 'ショートコード',
|
||||||
|
'PHP Code' => 'PHPコード',
|
||||||
|
)
|
||||||
|
);
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Embed Code',
|
'Embed Code' => 'Embed Code',
|
||||||
'Shortcode' => 'Shortcode',
|
'Shortcode' => 'Shortcode',
|
||||||
'PHP Code' => 'PHP Code',
|
'PHP Code' => 'PHP Code',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Insluitcode',
|
'Embed Code' => 'Insluitcode',
|
||||||
'Shortcode' => 'Verkorte code',
|
'Shortcode' => 'Verkorte code',
|
||||||
'PHP Code' => 'PHP Code',
|
'PHP Code' => 'PHP Code',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Osadzony kod',
|
'Embed Code' => 'Osadzony kod',
|
||||||
'Shortcode' => 'Krótki kod (shortcode)',
|
'Shortcode' => 'Krótki kod (shortcode)',
|
||||||
'PHP Code' => 'Kod PHP',
|
'PHP Code' => 'Kod PHP',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Embed Code',
|
'Embed Code' => 'Embed Code',
|
||||||
'Shortcode' => 'Shortcode',
|
'Shortcode' => 'Shortcode',
|
||||||
'PHP Code' => 'PHP Code',
|
'PHP Code' => 'PHP Code',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Код для вставки',
|
'Embed Code' => 'Код для вставки',
|
||||||
'Shortcode' => 'Шорткод',
|
'Shortcode' => 'Шорткод',
|
||||||
'PHP Code' => 'PHP код',
|
'PHP Code' => 'PHP код',
|
||||||
|
'Cancel' => 'Отмена',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Vložený kód',
|
'Embed Code' => 'Vložený kód',
|
||||||
'Shortcode' => 'Skrátený kód',
|
'Shortcode' => 'Skrátený kód',
|
||||||
'PHP Code' => 'PHP kód',
|
'PHP Code' => 'PHP kód',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Embed Kod',
|
'Embed Code' => 'Embed Kod',
|
||||||
'Shortcode' => 'Kratak kod',
|
'Shortcode' => 'Kratak kod',
|
||||||
'PHP Code' => 'PHP kod',
|
'PHP Code' => 'PHP kod',
|
||||||
|
'Cancel' => 'Cancel',
|
||||||
)
|
)
|
||||||
);
|
);
|
30
plugins/box/blocks/languages/tr.lang.php
Normal file
30
plugins/box/blocks/languages/tr.lang.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'blocks' => array(
|
||||||
|
'Blocks' => 'Bloklar',
|
||||||
|
'Blocks manager' => 'Blok yöneticisi',
|
||||||
|
'Delete' => 'Sil',
|
||||||
|
'Edit' => 'Düzenle',
|
||||||
|
'Name' => 'Ad',
|
||||||
|
'Create New Block' => 'Yeni Blok Oluştur',
|
||||||
|
'New Block' => 'Yeni Blok',
|
||||||
|
'Edit Block' => 'Bloğu Düzenle',
|
||||||
|
'Save' => 'Kaydet',
|
||||||
|
'Save and Exit' => 'Kaydet ve Çık',
|
||||||
|
'Actions' => 'İşlemler',
|
||||||
|
'Required field' => 'Zorunlu alan',
|
||||||
|
'This block already exists' => 'Bu blok zaten var.',
|
||||||
|
'This block does not exist' => 'Blok bulunamadı.',
|
||||||
|
'Delete block: :block' => ':block adlı blok silinsin mi',
|
||||||
|
'Block content' => 'Blok içeriği',
|
||||||
|
'Block <i>:name</i> deleted' => '<i>:name</i> adlı blok silindi.',
|
||||||
|
'Your changes to the block <i>:name</i> have been saved.' => 'Değişiklikler <i>:name</i> bloğuna kaydedildi.',
|
||||||
|
'Delete block: :block' => ':block adlı blok silinsin mi',
|
||||||
|
'View Embed Code' => 'Gömülür Kodu Görüntüle',
|
||||||
|
'Embed Code' => 'Gömülür Kodu',
|
||||||
|
'Shortcode' => 'Kısa Kod',
|
||||||
|
'PHP Code' => 'PHP Kodu',
|
||||||
|
'Cancel' => 'Vazgeç',
|
||||||
|
)
|
||||||
|
);
|
@@ -25,5 +25,6 @@
|
|||||||
'Embed Code' => 'Код для вставки',
|
'Embed Code' => 'Код для вставки',
|
||||||
'Shortcode' => 'Шорткод',
|
'Shortcode' => 'Шорткод',
|
||||||
'PHP Code' => 'PHP код',
|
'PHP Code' => 'PHP код',
|
||||||
|
'Cancel' => 'Відмінити',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
29
plugins/box/blocks/languages/zh-cn.lang.php
Normal file
29
plugins/box/blocks/languages/zh-cn.lang.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'blocks' => array(
|
||||||
|
'Blocks' => '版块',
|
||||||
|
'Blocks manager' => '版块管理',
|
||||||
|
'Delete' => '删除',
|
||||||
|
'Edit' => '编辑',
|
||||||
|
'Name' => '名称',
|
||||||
|
'Create New Block' => '创建新版块',
|
||||||
|
'New Block' => '新版块',
|
||||||
|
'Edit Block' => '编辑版块',
|
||||||
|
'Save' => '保存',
|
||||||
|
'Save and Exit' => '保存并退出',
|
||||||
|
'Actions' => '操作',
|
||||||
|
'Required field' => '必填字段',
|
||||||
|
'This block already exists' => '此版块已存在',
|
||||||
|
'This block does not exist' => '此版块不存在',
|
||||||
|
'Delete block: :block' => '删除版块: :block',
|
||||||
|
'Block content' => '版块内容',
|
||||||
|
'Block <i>:name</i> deleted' => '版块 <i>:name</i> 已删除',
|
||||||
|
'Your changes to the block <i>:name</i> have been saved.' => '您修改的版块 <i>:name</i> 已保存。',
|
||||||
|
'Delete block: :block' => '删除版块: :block',
|
||||||
|
'View Embed Code' => '查看嵌入代码',
|
||||||
|
'Embed Code' => '嵌入代码',
|
||||||
|
'Shortcode' => '短代码',
|
||||||
|
'PHP Code' => 'PHP 代码',
|
||||||
|
)
|
||||||
|
);
|
@@ -1,7 +1,4 @@
|
|||||||
<h2><?php echo __('New Block', 'blocks'); ?></h2>
|
<h2 class="margin-bottom-1"><?php echo __('New Block', 'blocks'); ?></h2>
|
||||||
<br />
|
|
||||||
|
|
||||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
|
||||||
|
|
||||||
<?php if (isset($errors['blocks_empty_name']) or isset($errors['blocks_exists'])) $error_class = 'error'; else $error_class = ''; ?>
|
<?php if (isset($errors['blocks_empty_name']) or isset($errors['blocks_exists'])) $error_class = 'error'; else $error_class = ''; ?>
|
||||||
|
|
||||||
@@ -9,25 +6,26 @@
|
|||||||
|
|
||||||
<?php echo (Form::hidden('csrf', Security::token())); ?>
|
<?php echo (Form::hidden('csrf', Security::token())); ?>
|
||||||
|
|
||||||
<?php echo (Form::label('name', __('Name', 'blocks'))); ?>
|
<div class="form-group margin-bottom-1">
|
||||||
|
<?php echo (Form::label('name', __('Name', 'blocks'))); ?>
|
||||||
|
<?php echo (Form::input('name', $name, array('class' => (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'form-control error-field' : 'form-control'))); ?>
|
||||||
|
<?php
|
||||||
|
if (isset($errors['blocks_empty_name'])) echo '<span class="error-message">'.$errors['blocks_empty_name'].'</span>';
|
||||||
|
if (isset($errors['blocks_exists'])) echo '<span class="error-message">'.$errors['blocks_exists'].'</span>';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php echo (Form::input('name', $name, array('class' => (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'input-xxlarge error-field' : 'input-xxlarge'))); ?>
|
<div class="row margin-bottom-1">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<?php Action::run('admin_editor', array(Html::toText($content))); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php
|
|
||||||
if (isset($errors['blocks_empty_name'])) echo ' <span style="color:red">'.$errors['blocks_empty_name'].'</span>';
|
|
||||||
if (isset($errors['blocks_exists'])) echo ' <span style="color:red">'.$errors['blocks_exists'].'</span>';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<br /><br />
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
Action::run('admin_editor', array(Html::toText($content)));
|
|
||||||
|
|
||||||
echo (
|
echo (
|
||||||
Html::br().
|
Form::submit('add_blocks_and_exit', __('Save and Exit', 'blocks'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).
|
||||||
Form::submit('add_blocks_and_exit', __('Save and Exit', 'blocks'), array('class' => 'btn')).Html::nbsp(2).
|
Form::submit('add_blocks', __('Save', 'blocks'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).
|
||||||
Form::submit('add_blocks', __('Save', 'blocks'), array('class' => 'btn')).
|
Html::anchor(__('Cancel', 'blocks'), 'index.php?id=blocks', array('title' => __('Cancel', 'blocks'), 'class' => 'btn btn-phone btn-default')).
|
||||||
Form::close()
|
Form::close()
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
<h2><?php echo __('Edit Block', 'blocks'); ?></h2>
|
<h2 class="margin-bottom-1"><?php echo __('Edit Block', 'blocks'); ?></h2>
|
||||||
<br />
|
|
||||||
|
|
||||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($content !== null) {
|
if ($content !== null) {
|
||||||
@@ -9,31 +6,32 @@
|
|||||||
if (isset($errors['blocks_empty_name']) or isset($errors['blocks_exists'])) $error_class = 'error'; else $error_class = '';
|
if (isset($errors['blocks_empty_name']) or isset($errors['blocks_exists'])) $error_class = 'error'; else $error_class = '';
|
||||||
|
|
||||||
echo (Form::open());
|
echo (Form::open());
|
||||||
|
|
||||||
echo (Form::hidden('csrf', Security::token()));
|
echo (Form::hidden('csrf', Security::token()));
|
||||||
|
|
||||||
echo (Form::hidden('blocks_old_name', Request::get('filename')));
|
echo (Form::hidden('blocks_old_name', Request::get('filename')));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php echo (Form::label('name', __('Name', 'blocks'))); ?>
|
<div class="form-group margin-bottom-1">
|
||||||
|
<?php echo (Form::label('name', __('Name', 'blocks'))); ?>
|
||||||
<?php echo (Form::input('name', $name, array('class' => (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'input-xxlarge error-field' : 'input-xxlarge'))); ?>
|
<?php echo (Form::input('name', $name, array('class' => (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'form-control error-field' : 'form-control'))); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (isset($errors['blocks_empty_name'])) echo ' <span style="color:red">'.$errors['blocks_empty_name'].'</span>';
|
if (isset($errors['blocks_empty_name'])) echo '<span class="error-message">'.$errors['blocks_empty_name'].'</span>';
|
||||||
if (isset($errors['blocks_exists'])) echo ' <span style="color:red">'.$errors['blocks_exists'].'</span>';
|
if (isset($errors['blocks_exists'])) echo '<span class="error-message">'.$errors['blocks_exists'].'</span>';
|
||||||
?>
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row margin-bottom-1">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<?php Action::run('admin_editor', array(Html::toText($content))); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<br /><br />
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
Action::run('admin_editor', array(Html::toText($content)));
|
|
||||||
|
|
||||||
echo (
|
echo (
|
||||||
Html::br().
|
Form::submit('edit_blocks_and_exit', __('Save and Exit', 'blocks'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).
|
||||||
Form::submit('edit_blocks_and_exit', __('Save and Exit', 'blocks'), array('class' => 'btn default')).Html::nbsp(2).
|
Form::submit('edit_blocks', __('Save', 'blocks'), array('class' => 'btn btn-phone btn-primary')). Html::nbsp(2).
|
||||||
Form::submit('edit_blocks', __('Save', 'blocks'), array('class' => 'btn default')). Html::nbsp().
|
Html::anchor(__('Cancel', 'blocks'), 'index.php?id=blocks', array('title' => __('Cancel', 'blocks'), 'class' => 'btn btn-phone btn-default')).
|
||||||
Form::close()
|
Form::close()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -1,15 +1,15 @@
|
|||||||
<h2><?php echo __('Blocks', 'blocks'); ?></h2>
|
<div class="vertical-align margin-bottom-1">
|
||||||
<br />
|
<div class="text-left row-phone">
|
||||||
|
<h2><?php echo __('Blocks', 'blocks'); ?></h2>
|
||||||
<?php if(Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
</div>
|
||||||
|
<div class="text-right row-phone">
|
||||||
<?php
|
<?php
|
||||||
echo (
|
echo (
|
||||||
Html::anchor(__('Create New Block', 'blocks'), 'index.php?id=blocks&action=add_block', array('title' => __('Create New Block', 'blocks'), 'class' => 'btn default btn-small')). Html::nbsp(3)
|
Html::anchor(__('Create New Block', 'blocks'), 'index.php?id=blocks&action=add_block', array('title' => __('Create New Block', 'blocks'), 'class' => 'btn btn-phone btn-primary'))
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
</div>
|
||||||
<br /><br />
|
</div>
|
||||||
|
|
||||||
<!-- Blocks_list -->
|
<!-- Blocks_list -->
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
@@ -25,19 +25,20 @@
|
|||||||
<td><?php echo basename($block, '.block.html'); ?></td>
|
<td><?php echo basename($block, '.block.html'); ?></td>
|
||||||
<td>
|
<td>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<div class="btn-toolbar">
|
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<?php echo Html::anchor(__('Edit', 'blocks'), 'index.php?id=blocks&action=edit_block&filename='.basename($block, '.block.html'), array('class' => 'btn btn-actions btn-small')); ?>
|
<?php echo Html::anchor(__('Edit', 'blocks'), 'index.php?id=blocks&action=edit_block&filename='.basename($block, '.block.html'), array('class' => 'btn btn-primary')); ?>
|
||||||
<a class="btn dropdown-toggle btn-actions btn-small" data-toggle="dropdown" href="#" style="font-family:arial;"><span class="caret"></span></a>
|
<button type="button" class="btn dropdown-toggle btn-primary" data-toggle="dropdown">
|
||||||
<ul class="dropdown-menu">
|
<span class="caret"></span>
|
||||||
|
<span class="sr-only">Toggle Dropdown</span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu" role="menu">
|
||||||
<li><?php echo Html::anchor(__('View Embed Code', 'blocks'), 'javascript:;', array('title' => __('View Embed Code', 'blocks'), 'onclick' => '$.monstra.blocks.showEmbedCodes("'.basename($block, '.block.html').'");')); ?></li>
|
<li><?php echo Html::anchor(__('View Embed Code', 'blocks'), 'javascript:;', array('title' => __('View Embed Code', 'blocks'), 'onclick' => '$.monstra.blocks.showEmbedCodes("'.basename($block, '.block.html').'");')); ?></li>
|
||||||
</ul>
|
</ul>
|
||||||
<?php echo Html::anchor(__('Delete', 'blocks'),
|
|
||||||
'index.php?id=blocks&action=delete_block&filename='.basename($block, '.block.html').'&token='.Security::token(),
|
|
||||||
array('class' => 'btn btn-actions btn-small btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')"));
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<?php echo Html::anchor(__('Delete', 'blocks'),
|
||||||
|
'index.php?id=blocks&action=delete_block&filename='.basename($block, '.block.html').'&token='.Security::token(),
|
||||||
|
array('class' => 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')"));
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -46,18 +47,20 @@
|
|||||||
</table>
|
</table>
|
||||||
<!-- /Blocks_list -->
|
<!-- /Blocks_list -->
|
||||||
|
|
||||||
<div id="embedCodes" class="modal hide fade">
|
<div class="modal fade" id="embedCodes">
|
||||||
<div class="modal-header">
|
<div class="modal-dialog">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<div class="modal-content">
|
||||||
<h3><?php echo __('Embed Code', 'blocks'); ?></h3>
|
<div class="modal-header">
|
||||||
</div>
|
<div class="close" data-dismiss="modal">×</div>
|
||||||
<div class="modal-body">
|
<h4 class="modal-title"><?php echo __('Embed Code', 'snippets'); ?></h4>
|
||||||
<p>
|
</div>
|
||||||
<b><?php echo __('Shortcode', 'blocks'); ?></b><br>
|
<div class="modal-body">
|
||||||
<code id="shortcode"></code>
|
<b><?php echo __('Shortcode', 'snippets'); ?></b><br>
|
||||||
<br> <br>
|
<pre><code id="shortcode"></code></pre>
|
||||||
<b><?php echo __('PHP Code', 'blocks'); ?></b><br>
|
<br>
|
||||||
<code id="phpcode"></code>
|
<b><?php echo __('PHP Code', 'snippets'); ?></b><br>
|
||||||
</p>
|
<pre><code id="phpcode"></code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
122
plugins/box/dashboard/dashboard.admin.php
Normal file
122
plugins/box/dashboard/dashboard.admin.php
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// Add Plugin Javascript
|
||||||
|
Stylesheet::add('public/assets/css/daterangepicker-bs3.css', 'backend', 11);
|
||||||
|
Javascript::add('public/assets/js/moment.min.js', 'backend', 11);
|
||||||
|
Javascript::add('public/assets/js/daterangepicker.js', 'backend', 12);
|
||||||
|
Javascript::add('plugins/box/dashboard/js/ganalytics.js', 'backend', 13);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dashboard admin class
|
||||||
|
*/
|
||||||
|
class DashboardAdmin extends Backend
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Main Dashboard admin function
|
||||||
|
*/
|
||||||
|
public static function main()
|
||||||
|
{
|
||||||
|
|
||||||
|
// set/update google analytics settings
|
||||||
|
if (Request::post('ga_settings_update')) {
|
||||||
|
|
||||||
|
if (Security::check(Request::post('csrf'))) {
|
||||||
|
|
||||||
|
// client id
|
||||||
|
$ga_client_id = trim(Request::post('ga_client_id'));
|
||||||
|
if (!empty($ga_client_id)) {
|
||||||
|
$opt_client_id = Option::get('ga_client_id');
|
||||||
|
if (empty($opt_client_id)) {
|
||||||
|
Option::add('ga_client_id', $ga_client_id);
|
||||||
|
} else {
|
||||||
|
Option::update('ga_client_id', $ga_client_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// API key
|
||||||
|
$ga_api_key = trim(Request::post('ga_api_key'));
|
||||||
|
if (!empty($ga_api_key)) {
|
||||||
|
$opt_api_key = Option::get('ga_api_key');
|
||||||
|
if (empty($opt_api_key)) {
|
||||||
|
Option::add('ga_api_key', $ga_api_key);
|
||||||
|
} else {
|
||||||
|
Option::update('ga_api_key', $ga_api_key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// view id
|
||||||
|
$ga_view_id = trim(Request::post('ga_view_id'));
|
||||||
|
if (!empty($ga_view_id)) {
|
||||||
|
$opt_view_id = Option::get('ga_view_id');
|
||||||
|
if (empty($opt_view_id)) {
|
||||||
|
Option::add('ga_view_id', $ga_view_id);
|
||||||
|
} else {
|
||||||
|
Option::update('ga_view_id', $ga_view_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// tracking id
|
||||||
|
$ga_tracking_id = trim(Request::post('ga_tracking_id'));
|
||||||
|
if (!empty($ga_tracking_id)) {
|
||||||
|
$opt_view_id = Option::get('ga_tracking_id');
|
||||||
|
if (empty($opt_view_id)) {
|
||||||
|
Option::add('ga_tracking_id', $ga_tracking_id);
|
||||||
|
} else {
|
||||||
|
Option::update('ga_tracking_id', $ga_tracking_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display view
|
||||||
|
View::factory('box/dashboard/views/backend/index')->display();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dashboard
|
||||||
|
*/
|
||||||
|
class Dashboard
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Items
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public static $items = array();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function addNewItem($id, $title, $url, $priority = 1)
|
||||||
|
{
|
||||||
|
Dashboard::$items[] = array(
|
||||||
|
'id' => (string) $id,
|
||||||
|
'title' => (string) $title,
|
||||||
|
'url' => (string) $url,
|
||||||
|
'priority' => (int) $priority,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function drawItems()
|
||||||
|
{
|
||||||
|
// Sort items by priority
|
||||||
|
$items = Arr::subvalSort(Dashboard::$items, 'priority');
|
||||||
|
|
||||||
|
foreach ($items as $item) {
|
||||||
|
echo '<li>';
|
||||||
|
echo Html::anchor($item['title'], $item['url'], array('title' => $item['title']));
|
||||||
|
echo '</li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
30
plugins/box/dashboard/dashboard.plugin.php
Normal file
30
plugins/box/dashboard/dashboard.plugin.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dashboard plugin
|
||||||
|
*
|
||||||
|
* @package Monstra
|
||||||
|
* @subpackage Plugins
|
||||||
|
* @author Romanenko Sergey / Awilum
|
||||||
|
* @copyright 2012-2014 Romanenko Sergey / Awilum
|
||||||
|
* @version 1.0.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Register plugin
|
||||||
|
Plugin::register( __FILE__,
|
||||||
|
__('Dashboard', 'dashboard'),
|
||||||
|
__('Dashboard plugin for Monstra', 'dashboard'),
|
||||||
|
'1.0.0',
|
||||||
|
'Awilum',
|
||||||
|
'http://monstra.org/',
|
||||||
|
null,
|
||||||
|
'box');
|
||||||
|
|
||||||
|
|
||||||
|
// Load Sandbox Admin for Editor and Admin
|
||||||
|
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {
|
||||||
|
|
||||||
|
Plugin::admin('dashboard', 'box');
|
||||||
|
|
||||||
|
}
|
11
plugins/box/dashboard/install/dashboard.manifest.xml
Normal file
11
plugins/box/dashboard/install/dashboard.manifest.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<root>
|
||||||
|
<plugin_location>plugins/dashboard/dashboard.plugin.php</plugin_location>
|
||||||
|
<plugin_status>active</plugin_status>
|
||||||
|
<plugin_priority>15</plugin_priority>
|
||||||
|
<plugin_name>Dashboard</plugin_name>
|
||||||
|
<plugin_description>Dashboard plugin for Monstra</plugin_description>
|
||||||
|
<plugin_version>1.0.0</plugin_version>
|
||||||
|
<plugin_author>Awilum</plugin_author>
|
||||||
|
<plugin_author_uri>http://monstra.org/</plugin_author_uri>
|
||||||
|
</root>
|
2
plugins/box/dashboard/js/.htaccess
Normal file
2
plugins/box/dashboard/js/.htaccess
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Options -Indexes
|
||||||
|
Allow from all
|
183
plugins/box/dashboard/js/ganalytics.js
Normal file
183
plugins/box/dashboard/js/ganalytics.js
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
if (typeof $.monstra == 'undefined') $.monstra = {};
|
||||||
|
|
||||||
|
function glibOnloadHandle(){$.monstra.ganalytics.libOnloadHandle();}
|
||||||
|
|
||||||
|
$.monstra.ganalytics = {
|
||||||
|
|
||||||
|
conf: {
|
||||||
|
clientId: '',
|
||||||
|
apiKey: '',
|
||||||
|
viewId: '',
|
||||||
|
authScopes: 'https://www.googleapis.com/auth/analytics.readonly'
|
||||||
|
},
|
||||||
|
|
||||||
|
_gaAreas: '#authOk,#authFail,#gaSettings,#gaLoading,#reauthError,#gaHelpLink',
|
||||||
|
_startDate: moment().subtract('days', 29),
|
||||||
|
_endDate: moment(),
|
||||||
|
|
||||||
|
init: function(data){
|
||||||
|
$.extend(this.conf, data);
|
||||||
|
$('.gaSettingsLink').click(function(){
|
||||||
|
$.monstra.ganalytics.show('#gaSettings,#gaHelpLink');
|
||||||
|
$('.gaSettingsLink').hide();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
initDateRangePicker: function(){
|
||||||
|
$('#reportRange').daterangepicker({
|
||||||
|
ranges: {
|
||||||
|
'Today': [moment(), moment()],
|
||||||
|
'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
|
||||||
|
'Last 7 Days': [moment().subtract('days', 6), moment()],
|
||||||
|
'Last 30 Days': [moment().subtract('days', 29), moment()],
|
||||||
|
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||||
|
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
|
||||||
|
},
|
||||||
|
startDate: $.monstra.ganalytics._startDate,
|
||||||
|
endDate: $.monstra.ganalytics._endDate
|
||||||
|
},function(start, end) {
|
||||||
|
$.monstra.ganalytics.getAnalyticsInfo(start._d, end._d);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
$.monstra.ganalytics.getAnalyticsInfo($.monstra.ganalytics._startDate._d, $.monstra.ganalytics._endDate._d);
|
||||||
|
},
|
||||||
|
|
||||||
|
libOnloadHandle: function(){
|
||||||
|
if ($.monstra.ganalytics.conf.clientId == ''
|
||||||
|
|| $.monstra.ganalytics.conf.apiKey == ''
|
||||||
|
|| $.monstra.ganalytics.conf.viewId == ''
|
||||||
|
) {
|
||||||
|
$.monstra.ganalytics.show('#gaSettings,#gaHelpLink');
|
||||||
|
$('.gaSettingsLink').hide();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
gapi.client.setApiKey(this.conf.apiKey);
|
||||||
|
window.setTimeout(function(){
|
||||||
|
$.monstra.ganalytics.checkAuth(true);
|
||||||
|
},1);
|
||||||
|
},
|
||||||
|
|
||||||
|
checkAuth: function(immediate){
|
||||||
|
gapi.auth.authorize({
|
||||||
|
client_id: $.monstra.ganalytics.conf.clientId,
|
||||||
|
scope: $.monstra.ganalytics.conf.authScopes,
|
||||||
|
immediate: immediate
|
||||||
|
}, $.monstra.ganalytics.handleAuthResult);
|
||||||
|
return immediate;
|
||||||
|
},
|
||||||
|
|
||||||
|
handleAuthResult: function(authResult){
|
||||||
|
if (authResult && !authResult.error) {
|
||||||
|
$.monstra.ganalytics.show('#authOk');
|
||||||
|
$.monstra.ganalytics.initDateRangePicker();
|
||||||
|
} else {
|
||||||
|
$.monstra.ganalytics.show('#authFail');
|
||||||
|
if (authResult && typeof authResult.error != 'undefined') {
|
||||||
|
$.monstra.ganalytics.showError(authResult.error.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#authorizeButton').on('click', function(e){
|
||||||
|
$.monstra.ganalytics.checkAuth(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getAnalyticsInfo: function(startDate, endDate) {
|
||||||
|
gapi.client.load('analytics', 'v3', function(){
|
||||||
|
gapi.client.analytics.data.ga.get({
|
||||||
|
'ids': 'ga:'+ $.monstra.ganalytics.conf.viewId,
|
||||||
|
'start-date': $.monstra.ganalytics.formatDate(startDate),
|
||||||
|
'end-date': $.monstra.ganalytics.formatDate(endDate),
|
||||||
|
'metrics': 'ga:visits,ga:pageviews,ga:visitors',
|
||||||
|
'dimensions': 'ga:date'
|
||||||
|
}).execute($.monstra.ganalytics.gaReportingResults);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
gaReportingResults: function(res){
|
||||||
|
if (typeof res.error != 'undefined' && typeof res.error.message != 'undefined') {
|
||||||
|
$.monstra.ganalytics.showError(res.error.message, res.error.code);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// build chart data
|
||||||
|
var dataArr = [['Date', 'Visits']];
|
||||||
|
for (r in res.rows) {
|
||||||
|
var tmpr = [];
|
||||||
|
for (h in res.columnHeaders) {
|
||||||
|
if (res.columnHeaders[h].name == 'ga:visits') {
|
||||||
|
tmpr[1] = parseInt(res.rows[r][h]);
|
||||||
|
} else if (res.columnHeaders[h].name == 'ga:date') {
|
||||||
|
var parsed = res.rows[r][h].match(/([0-9]{4})([0-9]{2})([0-9]{2})/)
|
||||||
|
tmpr[0] = parsed[1] +'-'+ parsed[2] +'-'+ parsed[3];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res.rows.length == (parseInt(r)+1)) {
|
||||||
|
switch(res.columnHeaders[h].name) {
|
||||||
|
case 'ga:visits': $.monstra.ganalytics.setVisits(res.rows[r][h]); break;
|
||||||
|
case 'ga:pageviews': $.monstra.ganalytics.setPageviews(res.rows[r][h]); break;
|
||||||
|
case 'ga:visitors': $.monstra.ganalytics.setVisitors(res.rows[r][h]); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dataArr.push(tmpr);
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = google.visualization.arrayToDataTable(dataArr);
|
||||||
|
|
||||||
|
var options = {
|
||||||
|
title: 'Visits',
|
||||||
|
hAxis: {title: 'Date', titleTextStyle: {color: '#333'}},
|
||||||
|
vAxis: {minValue: 0}
|
||||||
|
};
|
||||||
|
|
||||||
|
var chart = new google.visualization.AreaChart(document.getElementById('gaChart'));
|
||||||
|
chart.draw(data, options);
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
formatDate: function(dateObj){
|
||||||
|
var m = dateObj.getMonth()+1;
|
||||||
|
var d = dateObj.getDate();
|
||||||
|
m = m > 9 ? m : '0'+m;
|
||||||
|
d = d > 9 ? d : '0'+d;
|
||||||
|
return dateObj.getFullYear() +'-'+ m +'-'+ d;
|
||||||
|
},
|
||||||
|
|
||||||
|
show: function(selector){
|
||||||
|
$('.gaSettingsLink').show();
|
||||||
|
$('#gaAlerts').html('');
|
||||||
|
$($.monstra.ganalytics._gaAreas).addClass('hide');
|
||||||
|
$(selector).removeClass('hide').show();
|
||||||
|
},
|
||||||
|
|
||||||
|
showError: function(msg, errCode){
|
||||||
|
if (typeof errCode !== 'undefined' && errCode == 403) {
|
||||||
|
$.monstra.ganalytics.show('#reauthError,#gaHelpLink');
|
||||||
|
} else {
|
||||||
|
$.monstra.ganalytics.show('#gaHelpLink');
|
||||||
|
}
|
||||||
|
$('#gaAlerts').html(msg);
|
||||||
|
$('#authOk').addClass('hide');
|
||||||
|
},
|
||||||
|
|
||||||
|
setVisits: function(val){
|
||||||
|
$('#gaVisits').html(val);
|
||||||
|
},
|
||||||
|
|
||||||
|
setVisitors: function(val){
|
||||||
|
$('#gaVisitors').html(val);
|
||||||
|
},
|
||||||
|
|
||||||
|
setPageviews: function(val){
|
||||||
|
$('#gaPageviews').html(val);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
$val_gaInitData = $('#gaInitData').val();
|
||||||
|
if ($val_gaInitData !== undefined) {
|
||||||
|
$.monstra.ganalytics.init($.parseJSON($val_gaInitData));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
11
plugins/box/dashboard/languages/de.lang.php
Normal file
11
plugins/box/dashboard/languages/de.lang.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'dashboard' => array(
|
||||||
|
'Dashboard' => 'Dashboard',
|
||||||
|
'Dashboard plugin for Monstra' => 'Dashboard plugin für Monstra',
|
||||||
|
'Welcome back' => 'Willkommen zurück',
|
||||||
|
'Create New' => 'Erstelle neue',
|
||||||
|
'Upload File' => 'Datei hochladen',
|
||||||
|
)
|
||||||
|
);
|
11
plugins/box/dashboard/languages/en.lang.php
Normal file
11
plugins/box/dashboard/languages/en.lang.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'dashboard' => array(
|
||||||
|
'Dashboard' => 'Dashboard',
|
||||||
|
'Dashboard plugin for Monstra' => 'Dashboard plugin for Monstra',
|
||||||
|
'Welcome back' => 'Welcome back',
|
||||||
|
'Create New' => 'Create New',
|
||||||
|
'Upload File' => 'Upload File',
|
||||||
|
)
|
||||||
|
);
|
11
plugins/box/dashboard/languages/pl.lang.php
Normal file
11
plugins/box/dashboard/languages/pl.lang.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'dashboard' => array(
|
||||||
|
'Dashboard' => 'Kokpit',
|
||||||
|
'Dashboard plugin for Monstra' => 'Wtyczka kokpitu dla systemu Monstra',
|
||||||
|
'Welcome back' => 'Witam ponownie',
|
||||||
|
'Create New' => 'Utwórz nowy',
|
||||||
|
'Upload File' => 'Prześlij plik',
|
||||||
|
)
|
||||||
|
);
|
11
plugins/box/dashboard/languages/ru.lang.php
Normal file
11
plugins/box/dashboard/languages/ru.lang.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'dashboard' => array(
|
||||||
|
'Dashboard' => 'Панель',
|
||||||
|
'Dashboard plugin for Monstra' => 'Панель для Monstra',
|
||||||
|
'Welcome back' => 'Добро пожаловать',
|
||||||
|
'Create New' => 'Добавить',
|
||||||
|
'Upload File' => 'Загрузить Файл',
|
||||||
|
)
|
||||||
|
);
|
11
plugins/box/dashboard/languages/tr.lang.php
Normal file
11
plugins/box/dashboard/languages/tr.lang.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'dashboard' => array(
|
||||||
|
'Dashboard' => 'Pano',
|
||||||
|
'Dashboard plugin for Monstra' => 'Monstra için pano eklentisi',
|
||||||
|
'Welcome back' => 'Merhaba',
|
||||||
|
'Create New' => 'Yeni Oluştur',
|
||||||
|
'Upload File' => 'Dosya Yükle',
|
||||||
|
)
|
||||||
|
);
|
11
plugins/box/dashboard/languages/uk.lang.php
Normal file
11
plugins/box/dashboard/languages/uk.lang.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'dashboard' => array(
|
||||||
|
'Dashboard' => 'Dashboard',
|
||||||
|
'Dashboard plugin for Monstra' => 'Dashboard пісочниця для Monstra',
|
||||||
|
'Welcome back' => 'Добро пожаловать',
|
||||||
|
'Create New' => 'Додати',
|
||||||
|
'Upload File' => 'Завантажити файл',
|
||||||
|
)
|
||||||
|
);
|
96
plugins/box/dashboard/views/backend/ga.view.php
Normal file
96
plugins/box/dashboard/views/backend/ga.view.php
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
|
||||||
|
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
google.load("visualization", "1", {packages:["corechart"]});
|
||||||
|
</script>
|
||||||
|
<input type="hidden" id="gaInitData" value='<?php echo json_encode(array(
|
||||||
|
'clientId' => Option::get('ga_client_id'),
|
||||||
|
'apiKey' => Option::get('ga_api_key'),
|
||||||
|
'viewId' => Option::get('ga_view_id')
|
||||||
|
)); ?>' />
|
||||||
|
<script src="https://apis.google.com/js/client.js?onload=glibOnloadHandle"></script>
|
||||||
|
|
||||||
|
<div class="well dashboard-well">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-10"><h4><?php echo __('Goggle Analytics', 'system'); ?></h4></div>
|
||||||
|
<div class="col-md-2"><a href="#" class="gaSettingsLink"><?php echo __('Settings', 'system'); ?></a></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<div class="row alert-warning"><div class="col-md-12" id="gaAlerts"></div></div>
|
||||||
|
|
||||||
|
<div class="row" id="gaLoading">
|
||||||
|
<div class="col-md-12">Loading...</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="authOk" class="row hide">
|
||||||
|
<div class="col-md-9">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div id="reportRange" class="pull-right">
|
||||||
|
<span class="glyphicon glyphicon-calendar"><?php echo date("F j, Y", strtotime('-30 day')); ?> - <?php echo date("F j, Y"); ?></span> <b class="caret"></b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div id="gaChart" style="height:350px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div><h3>Today</h3></div>
|
||||||
|
<div>Visits:<span id="gaVisits"></span></div>
|
||||||
|
<div>Visitors:<span id="gaVisitors"></span></div>
|
||||||
|
<div>Pageviews:<span id="gaPageviews"></span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="authFail" class="row hide">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<button class="btn btn-default" id="authorizeButton"><?php echo __('Authorize', 'system'); ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="reauthError" class="row hide">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<?php echo __('Please check your analytics settings then exit from google account and authorize with right google analytics account.', 'system'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="gaSettings" class="row hide">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<form method="POST">
|
||||||
|
<?php echo Form::hidden('csrf', Security::token()); ?>
|
||||||
|
<div class="form-group">
|
||||||
|
<label><?php echo __('Client ID', 'system'); ?></label><input name="ga_client_id" class="form-control" value="<?php echo Option::get('ga_client_id'); ?>">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label><?php echo __('API key', 'system'); ?></label><input name="ga_api_key" class="form-control" value="<?php echo Option::get('ga_api_key'); ?>">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label><?php echo __('View ID', 'system'); ?></label><input name="ga_view_id" class="form-control" value="<?php echo Option::get('ga_view_id'); ?>">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label><?php echo __('Tracking ID', 'system'); ?></label><input name="ga_tracking_id" class="form-control" value="<?php echo Option::get('ga_tracking_id'); ?>">
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="ga_settings_update" value="1" />
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-primary"><?php echo __('Save', 'system'); ?></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="gaHelpLink" class="row hide">
|
||||||
|
<div class="col-md-12">
|
||||||
|
Google Analytics help page: <a href="https://support.google.com/analytics/?hl=en" target="_blank">https://support.google.com/analytics/?hl=en</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
58
plugins/box/dashboard/views/backend/index.view.php
Normal file
58
plugins/box/dashboard/views/backend/index.view.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<div class="well dashboard-well">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<a class="btn btn-link welcome-back"><?php echo __('Welcome back', 'dashboard'); ?>, <strong><?php echo Session::get('user_login'); ?></strong></a>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="pull-right">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||||
|
<?php echo __('Create New', 'dashboard'); ?> <span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu" role="menu">
|
||||||
|
<?php Dashboard::drawItems(); ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php echo ( Html::anchor(__('Upload File', 'dashboard'), 'index.php?id=filesmanager', array('title' => __('Upload File', 'filesmanager'), 'class' => 'btn btn-primary'))); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php /*include 'ga.view.php';*/ ?>
|
||||||
|
|
||||||
|
<div class="well dashboard-well">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<h3><?php echo __('Content', 'pages'); ?></h3>
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<?php Navigation::draw('content'); ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<h3><?php echo __('Extends', 'system'); ?></h3>
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<?php Navigation::draw('extends'); ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<h3><?php echo __('System', 'system'); ?></h3>
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<?php Navigation::draw('system'); ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<h3><?php echo __('Help', 'system'); ?></h3>
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<li><a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a></li>
|
||||||
|
<li>
|
||||||
|
<?php if (Option::get('language') == 'ru') { ?>
|
||||||
|
<a href="http://ru.forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a>
|
||||||
|
<?php } else { ?>
|
||||||
|
<a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a>
|
||||||
|
<?php } ?>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
8
plugins/box/editor/languages/ja.lang.php
Normal file
8
plugins/box/editor/languages/ja.lang.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'Editor' => array(
|
||||||
|
'Editor' => '<27>G<EFBFBD>f<EFBFBD>B<EFBFBD>^',
|
||||||
|
'Editor plugin' => '<27>G<EFBFBD>f<EFBFBD>B<EFBFBD>^<5E>v<EFBFBD><76><EFBFBD>O<EFBFBD>C<EFBFBD><43>',
|
||||||
|
)
|
||||||
|
);
|
8
plugins/box/editor/languages/tr.lang.php
Normal file
8
plugins/box/editor/languages/tr.lang.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'Editor' => array(
|
||||||
|
'Editor' => 'Düzenleyici',
|
||||||
|
'Editor plugin' => 'Düzenleyici eklentisi',
|
||||||
|
)
|
||||||
|
);
|
8
plugins/box/editor/languages/zh-cn.lang.php
Normal file
8
plugins/box/editor/languages/zh-cn.lang.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'Editor' => array(
|
||||||
|
'Editor' => '编辑器',
|
||||||
|
'Editor plugin' => '编辑器插件',
|
||||||
|
)
|
||||||
|
);
|
2
plugins/box/emails/css/.htaccess
Normal file
2
plugins/box/emails/css/.htaccess
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Options -Indexes
|
||||||
|
Allow from all
|
688
plugins/box/emails/css/inc.css
Normal file
688
plugins/box/emails/css/inc.css
Normal file
@@ -0,0 +1,688 @@
|
|||||||
|
/**********************************************
|
||||||
|
* Ink v1.0.5 - Copyright 2013 ZURB Inc *
|
||||||
|
**********************************************/
|
||||||
|
|
||||||
|
/* Client-specific Styles & Reset */
|
||||||
|
|
||||||
|
#outlook a {
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body{
|
||||||
|
width:100% !important;
|
||||||
|
min-width: 100%;
|
||||||
|
-webkit-text-size-adjust:100%;
|
||||||
|
-ms-text-size-adjust:100%;
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ExternalClass {
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ExternalClass,
|
||||||
|
.ExternalClass p,
|
||||||
|
.ExternalClass span,
|
||||||
|
.ExternalClass font,
|
||||||
|
.ExternalClass td,
|
||||||
|
.ExternalClass div {
|
||||||
|
line-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backgroundTable {
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
width:100% !important;
|
||||||
|
line-height: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
outline:none;
|
||||||
|
text-decoration:none;
|
||||||
|
-ms-interpolation-mode: bicubic;
|
||||||
|
width: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
float: left;
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
center {
|
||||||
|
width: 100%;
|
||||||
|
min-width: 580px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a img {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0 0 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-spacing: 0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
word-break: break-word;
|
||||||
|
-webkit-hyphens: auto;
|
||||||
|
-moz-hyphens: auto;
|
||||||
|
hyphens: auto;
|
||||||
|
border-collapse: collapse !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table, tr, td {
|
||||||
|
padding: 0;
|
||||||
|
vertical-align: top;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
color: #d9d9d9;
|
||||||
|
background-color: #d9d9d9;
|
||||||
|
height: 1px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive Grid */
|
||||||
|
|
||||||
|
table.body {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.container {
|
||||||
|
width: 580px;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.row {
|
||||||
|
padding: 0px;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.container table.row {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.wrapper {
|
||||||
|
padding: 10px 20px 0px 0px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.columns,
|
||||||
|
table.column {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.columns td,
|
||||||
|
table.column td {
|
||||||
|
padding: 0px 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.columns td.sub-columns,
|
||||||
|
table.column td.sub-columns,
|
||||||
|
table.columns td.sub-column,
|
||||||
|
table.column td.sub-column {
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.sub-column, td.sub-columns {
|
||||||
|
min-width: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.row td.last,
|
||||||
|
table.container td.last {
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.one { width: 30px; }
|
||||||
|
table.two { width: 80px; }
|
||||||
|
table.three { width: 130px; }
|
||||||
|
table.four { width: 180px; }
|
||||||
|
table.five { width: 230px; }
|
||||||
|
table.six { width: 280px; }
|
||||||
|
table.seven { width: 330px; }
|
||||||
|
table.eight { width: 380px; }
|
||||||
|
table.nine { width: 430px; }
|
||||||
|
table.ten { width: 480px; }
|
||||||
|
table.eleven { width: 530px; }
|
||||||
|
table.twelve { width: 580px; }
|
||||||
|
|
||||||
|
table.one center { min-width: 30px; }
|
||||||
|
table.two center { min-width: 80px; }
|
||||||
|
table.three center { min-width: 130px; }
|
||||||
|
table.four center { min-width: 180px; }
|
||||||
|
table.five center { min-width: 230px; }
|
||||||
|
table.six center { min-width: 280px; }
|
||||||
|
table.seven center { min-width: 330px; }
|
||||||
|
table.eight center { min-width: 380px; }
|
||||||
|
table.nine center { min-width: 430px; }
|
||||||
|
table.ten center { min-width: 480px; }
|
||||||
|
table.eleven center { min-width: 530px; }
|
||||||
|
table.twelve center { min-width: 580px; }
|
||||||
|
|
||||||
|
table.one .panel center { min-width: 10px; }
|
||||||
|
table.two .panel center { min-width: 60px; }
|
||||||
|
table.three .panel center { min-width: 110px; }
|
||||||
|
table.four .panel center { min-width: 160px; }
|
||||||
|
table.five .panel center { min-width: 210px; }
|
||||||
|
table.six .panel center { min-width: 260px; }
|
||||||
|
table.seven .panel center { min-width: 310px; }
|
||||||
|
table.eight .panel center { min-width: 360px; }
|
||||||
|
table.nine .panel center { min-width: 410px; }
|
||||||
|
table.ten .panel center { min-width: 460px; }
|
||||||
|
table.eleven .panel center { min-width: 510px; }
|
||||||
|
table.twelve .panel center { min-width: 560px; }
|
||||||
|
|
||||||
|
.body .columns td.one,
|
||||||
|
.body .column td.one { width: 8.333333%; }
|
||||||
|
.body .columns td.two,
|
||||||
|
.body .column td.two { width: 16.666666%; }
|
||||||
|
.body .columns td.three,
|
||||||
|
.body .column td.three { width: 25%; }
|
||||||
|
.body .columns td.four,
|
||||||
|
.body .column td.four { width: 33.333333%; }
|
||||||
|
.body .columns td.five,
|
||||||
|
.body .column td.five { width: 41.666666%; }
|
||||||
|
.body .columns td.six,
|
||||||
|
.body .column td.six { width: 50%; }
|
||||||
|
.body .columns td.seven,
|
||||||
|
.body .column td.seven { width: 58.333333%; }
|
||||||
|
.body .columns td.eight,
|
||||||
|
.body .column td.eight { width: 66.666666%; }
|
||||||
|
.body .columns td.nine,
|
||||||
|
.body .column td.nine { width: 75%; }
|
||||||
|
.body .columns td.ten,
|
||||||
|
.body .column td.ten { width: 83.333333%; }
|
||||||
|
.body .columns td.eleven,
|
||||||
|
.body .column td.eleven { width: 91.666666%; }
|
||||||
|
.body .columns td.twelve,
|
||||||
|
.body .column td.twelve { width: 100%; }
|
||||||
|
|
||||||
|
td.offset-by-one { padding-left: 50px; }
|
||||||
|
td.offset-by-two { padding-left: 100px; }
|
||||||
|
td.offset-by-three { padding-left: 150px; }
|
||||||
|
td.offset-by-four { padding-left: 200px; }
|
||||||
|
td.offset-by-five { padding-left: 250px; }
|
||||||
|
td.offset-by-six { padding-left: 300px; }
|
||||||
|
td.offset-by-seven { padding-left: 350px; }
|
||||||
|
td.offset-by-eight { padding-left: 400px; }
|
||||||
|
td.offset-by-nine { padding-left: 450px; }
|
||||||
|
td.offset-by-ten { padding-left: 500px; }
|
||||||
|
td.offset-by-eleven { padding-left: 550px; }
|
||||||
|
|
||||||
|
td.expander {
|
||||||
|
visibility: hidden;
|
||||||
|
width: 0px;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.columns .text-pad,
|
||||||
|
table.column .text-pad {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.columns .left-text-pad,
|
||||||
|
table.columns .text-pad-left,
|
||||||
|
table.column .left-text-pad,
|
||||||
|
table.column .text-pad-left {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.columns .right-text-pad,
|
||||||
|
table.columns .text-pad-right,
|
||||||
|
table.column .right-text-pad,
|
||||||
|
table.column .text-pad-right {
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Block Grid */
|
||||||
|
|
||||||
|
.block-grid {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 580px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.block-grid td {
|
||||||
|
display: inline-block;
|
||||||
|
padding:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.two-up td {
|
||||||
|
width:270px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.three-up td {
|
||||||
|
width:173px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.four-up td {
|
||||||
|
width:125px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.five-up td {
|
||||||
|
width:96px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.six-up td {
|
||||||
|
width:76px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.seven-up td {
|
||||||
|
width:62px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.eight-up td {
|
||||||
|
width:52px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Alignment & Visibility Classes */
|
||||||
|
|
||||||
|
table.center, td.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.center,
|
||||||
|
h2.center,
|
||||||
|
h3.center,
|
||||||
|
h4.center,
|
||||||
|
h5.center,
|
||||||
|
h6.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.center {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.center {
|
||||||
|
margin: 0 auto;
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show-for-small,
|
||||||
|
.hide-for-desktop {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Typography */
|
||||||
|
|
||||||
|
body, table.body, h1, h2, h3, h4, h5, h6, p, td {
|
||||||
|
color: #222222;
|
||||||
|
font-family: "Helvetica", "Arial", sans-serif;
|
||||||
|
font-weight: normal;
|
||||||
|
padding:0;
|
||||||
|
margin: 0;
|
||||||
|
text-align: left;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
word-break: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {font-size: 40px;}
|
||||||
|
h2 {font-size: 36px;}
|
||||||
|
h3 {font-size: 32px;}
|
||||||
|
h4 {font-size: 28px;}
|
||||||
|
h5 {font-size: 24px;}
|
||||||
|
h6 {font-size: 20px;}
|
||||||
|
body, table.body, p, td {font-size: 14px;line-height:19px;}
|
||||||
|
|
||||||
|
p.lead, p.lede, p.leed {
|
||||||
|
font-size: 18px;
|
||||||
|
line-height:21px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #2ba6cb;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #2795b6 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:active {
|
||||||
|
color: #2795b6 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: #2ba6cb !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 a,
|
||||||
|
h2 a,
|
||||||
|
h3 a,
|
||||||
|
h4 a,
|
||||||
|
h5 a,
|
||||||
|
h6 a {
|
||||||
|
color: #2ba6cb;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 a:active,
|
||||||
|
h2 a:active,
|
||||||
|
h3 a:active,
|
||||||
|
h4 a:active,
|
||||||
|
h5 a:active,
|
||||||
|
h6 a:active {
|
||||||
|
color: #2ba6cb !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 a:visited,
|
||||||
|
h2 a:visited,
|
||||||
|
h3 a:visited,
|
||||||
|
h4 a:visited,
|
||||||
|
h5 a:visited,
|
||||||
|
h6 a:visited {
|
||||||
|
color: #2ba6cb !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Panels */
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
background: #f2f2f2;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
padding: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-grid table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-grid td.sub-columns {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
|
||||||
|
table.button,
|
||||||
|
table.tiny-button,
|
||||||
|
table.small-button,
|
||||||
|
table.medium-button,
|
||||||
|
table.large-button {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.button td,
|
||||||
|
table.tiny-button td,
|
||||||
|
table.small-button td,
|
||||||
|
table.medium-button td,
|
||||||
|
table.large-button td {
|
||||||
|
display: block;
|
||||||
|
width: auto !important;
|
||||||
|
text-align: center;
|
||||||
|
background: #2ba6cb;
|
||||||
|
border: 1px solid #2284a1;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.tiny-button td {
|
||||||
|
padding: 5px 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.small-button td {
|
||||||
|
padding: 8px 0 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.medium-button td {
|
||||||
|
padding: 12px 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.large-button td {
|
||||||
|
padding: 21px 0 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.button td a,
|
||||||
|
table.tiny-button td a,
|
||||||
|
table.small-button td a,
|
||||||
|
table.medium-button td a,
|
||||||
|
table.large-button td a {
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
font-family: Helvetica, Arial, sans-serif;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.tiny-button td a {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.small-button td a {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.medium-button td a {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.large-button td a {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.button:hover td,
|
||||||
|
table.button:visited td,
|
||||||
|
table.button:active td {
|
||||||
|
background: #2795b6 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.button:hover td a,
|
||||||
|
table.button:visited td a,
|
||||||
|
table.button:active td a {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.button:hover td,
|
||||||
|
table.tiny-button:hover td,
|
||||||
|
table.small-button:hover td,
|
||||||
|
table.medium-button:hover td,
|
||||||
|
table.large-button:hover td {
|
||||||
|
background: #2795b6 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.button:hover td a,
|
||||||
|
table.button:active td a,
|
||||||
|
table.button td a:visited,
|
||||||
|
table.tiny-button:hover td a,
|
||||||
|
table.tiny-button:active td a,
|
||||||
|
table.tiny-button td a:visited,
|
||||||
|
table.small-button:hover td a,
|
||||||
|
table.small-button:active td a,
|
||||||
|
table.small-button td a:visited,
|
||||||
|
table.medium-button:hover td a,
|
||||||
|
table.medium-button:active td a,
|
||||||
|
table.medium-button td a:visited,
|
||||||
|
table.large-button:hover td a,
|
||||||
|
table.large-button:active td a,
|
||||||
|
table.large-button td a:visited {
|
||||||
|
color: #ffffff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.secondary td {
|
||||||
|
background: #e9e9e9;
|
||||||
|
border-color: #d0d0d0;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.secondary td a {
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.secondary:hover td {
|
||||||
|
background: #d0d0d0 !important;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.secondary:hover td a,
|
||||||
|
table.secondary td a:visited,
|
||||||
|
table.secondary:active td a {
|
||||||
|
color: #555 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.success td {
|
||||||
|
background: #5da423;
|
||||||
|
border-color: #457a1a;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.success:hover td {
|
||||||
|
background: #457a1a !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.alert td {
|
||||||
|
background: #c60f13;
|
||||||
|
border-color: #970b0e;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.alert:hover td {
|
||||||
|
background: #970b0e !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.radius td {
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.round td {
|
||||||
|
-webkit-border-radius: 500px;
|
||||||
|
-moz-border-radius: 500px;
|
||||||
|
border-radius: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Outlook First */
|
||||||
|
|
||||||
|
body.outlook p {
|
||||||
|
display: inline !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Media Queries */
|
||||||
|
|
||||||
|
@media only screen and (max-width: 600px) {
|
||||||
|
|
||||||
|
table[class="body"] img {
|
||||||
|
width: auto !important;
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] center {
|
||||||
|
min-width: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] .container {
|
||||||
|
width: 95% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] .row {
|
||||||
|
width: 100% !important;
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] .wrapper {
|
||||||
|
display: block !important;
|
||||||
|
padding-right: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] .columns,
|
||||||
|
table[class="body"] .column {
|
||||||
|
table-layout: fixed !important;
|
||||||
|
float: none !important;
|
||||||
|
width: 100% !important;
|
||||||
|
padding-right: 0px !important;
|
||||||
|
padding-left: 0px !important;
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] .wrapper.first .columns,
|
||||||
|
table[class="body"] .wrapper.first .column {
|
||||||
|
display: table !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] table.columns td,
|
||||||
|
table[class="body"] table.column td {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] .columns td.one,
|
||||||
|
table[class="body"] .column td.one { width: 8.333333% !important; }
|
||||||
|
table[class="body"] .columns td.two,
|
||||||
|
table[class="body"] .column td.two { width: 16.666666% !important; }
|
||||||
|
table[class="body"] .columns td.three,
|
||||||
|
table[class="body"] .column td.three { width: 25% !important; }
|
||||||
|
table[class="body"] .columns td.four,
|
||||||
|
table[class="body"] .column td.four { width: 33.333333% !important; }
|
||||||
|
table[class="body"] .columns td.five,
|
||||||
|
table[class="body"] .column td.five { width: 41.666666% !important; }
|
||||||
|
table[class="body"] .columns td.six,
|
||||||
|
table[class="body"] .column td.six { width: 50% !important; }
|
||||||
|
table[class="body"] .columns td.seven,
|
||||||
|
table[class="body"] .column td.seven { width: 58.333333% !important; }
|
||||||
|
table[class="body"] .columns td.eight,
|
||||||
|
table[class="body"] .column td.eight { width: 66.666666% !important; }
|
||||||
|
table[class="body"] .columns td.nine,
|
||||||
|
table[class="body"] .column td.nine { width: 75% !important; }
|
||||||
|
table[class="body"] .columns td.ten,
|
||||||
|
table[class="body"] .column td.ten { width: 83.333333% !important; }
|
||||||
|
table[class="body"] .columns td.eleven,
|
||||||
|
table[class="body"] .column td.eleven { width: 91.666666% !important; }
|
||||||
|
table[class="body"] .columns td.twelve,
|
||||||
|
table[class="body"] .column td.twelve { width: 100% !important; }
|
||||||
|
|
||||||
|
table[class="body"] td.offset-by-one,
|
||||||
|
table[class="body"] td.offset-by-two,
|
||||||
|
table[class="body"] td.offset-by-three,
|
||||||
|
table[class="body"] td.offset-by-four,
|
||||||
|
table[class="body"] td.offset-by-five,
|
||||||
|
table[class="body"] td.offset-by-six,
|
||||||
|
table[class="body"] td.offset-by-seven,
|
||||||
|
table[class="body"] td.offset-by-eight,
|
||||||
|
table[class="body"] td.offset-by-nine,
|
||||||
|
table[class="body"] td.offset-by-ten,
|
||||||
|
table[class="body"] td.offset-by-eleven {
|
||||||
|
padding-left: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] table.columns td.expander {
|
||||||
|
width: 1px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] .right-text-pad,
|
||||||
|
table[class="body"] .text-pad-right {
|
||||||
|
padding-left: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] .left-text-pad,
|
||||||
|
table[class="body"] .text-pad-left {
|
||||||
|
padding-right: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] .hide-for-small,
|
||||||
|
table[class="body"] .show-for-desktop {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class="body"] .show-for-small,
|
||||||
|
table[class="body"] .hide-for-desktop {
|
||||||
|
display: inherit !important;
|
||||||
|
}
|
||||||
|
}
|
72
plugins/box/emails/emails.admin.php
Normal file
72
plugins/box/emails/emails.admin.php
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// Admin Navigation: add new item
|
||||||
|
Navigation::add(__('Emails', 'emails'), 'system', 'emails', 5);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emails admin class
|
||||||
|
*/
|
||||||
|
class EmailsAdmin extends Backend
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Main Emails admin function
|
||||||
|
*/
|
||||||
|
public static function main()
|
||||||
|
{
|
||||||
|
// Init vars
|
||||||
|
$email_templates_path = STORAGE . DS . 'emails' . DS;
|
||||||
|
$email_templates_list = array();
|
||||||
|
|
||||||
|
// Check for get actions
|
||||||
|
// -------------------------------------
|
||||||
|
if (Request::get('action')) {
|
||||||
|
|
||||||
|
// Switch actions
|
||||||
|
// -------------------------------------
|
||||||
|
switch (Request::get('action')) {
|
||||||
|
|
||||||
|
// Plugin action
|
||||||
|
// -------------------------------------
|
||||||
|
case "edit_email_template":
|
||||||
|
|
||||||
|
if (Request::post('edit_email_template') || Request::post('edit_email_template_and_exit') ) {
|
||||||
|
|
||||||
|
if (Security::check(Request::post('csrf'))) {
|
||||||
|
|
||||||
|
// Save Email Template
|
||||||
|
File::setContent(STORAGE . DS . 'emails' . DS . Request::post('email_template_name') .'.email.php', Request::post('content'));
|
||||||
|
|
||||||
|
Notification::set('success', __('Your changes to the email template <i>:name</i> have been saved.', 'emails', array(':name' => Request::post('email_template_name'))));
|
||||||
|
|
||||||
|
if (Request::post('edit_email_template_and_exit')) {
|
||||||
|
Request::redirect('index.php?id=emails');
|
||||||
|
} else {
|
||||||
|
Request::redirect('index.php?id=emails&action=edit_email_template&filename='.Request::post('email_template_name'));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = File::getContent($email_templates_path.Request::get('filename').'.email.php');
|
||||||
|
|
||||||
|
// Display view
|
||||||
|
View::factory('box/emails/views/backend/edit')
|
||||||
|
->assign('content', $content)
|
||||||
|
->display();
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Get email templates
|
||||||
|
$email_templates_list = File::scan($email_templates_path, '.email.php');
|
||||||
|
|
||||||
|
// Display view
|
||||||
|
View::factory('box/emails/views/backend/index')
|
||||||
|
->assign('email_templates_list', $email_templates_list)
|
||||||
|
->display();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
29
plugins/box/emails/emails.plugin.php
Normal file
29
plugins/box/emails/emails.plugin.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emails plugin
|
||||||
|
*
|
||||||
|
* @package Monstra
|
||||||
|
* @subpackage Plugins
|
||||||
|
* @author Romanenko Sergey / Awilum
|
||||||
|
* @copyright 2012-2014 Romanenko Sergey / Awilum
|
||||||
|
* @version 1.0.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Register plugin
|
||||||
|
Plugin::register( __FILE__,
|
||||||
|
__('Emails', 'emails'),
|
||||||
|
__('Emails plugin for Monstra', 'emails'),
|
||||||
|
'1.0.0',
|
||||||
|
'Awilum',
|
||||||
|
'http://monstra.org/',
|
||||||
|
null,
|
||||||
|
'box');
|
||||||
|
|
||||||
|
// Load Emails Admin for Editor and Admin
|
||||||
|
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {
|
||||||
|
|
||||||
|
Plugin::admin('emails', 'box');
|
||||||
|
|
||||||
|
}
|
11
plugins/box/emails/install/emails.manifest.xml
Normal file
11
plugins/box/emails/install/emails.manifest.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<root>
|
||||||
|
<plugin_location>plugins/box/emails/emails.plugin.php</plugin_location>
|
||||||
|
<plugin_status>active</plugin_status>
|
||||||
|
<plugin_priority>15</plugin_priority>
|
||||||
|
<plugin_name>Emails</plugin_name>
|
||||||
|
<plugin_description>Emails plugin for Monstra</plugin_description>
|
||||||
|
<plugin_version>1.0.0</plugin_version>
|
||||||
|
<plugin_author>Awilum</plugin_author>
|
||||||
|
<plugin_author_uri>http://monstra.org/</plugin_author_uri>
|
||||||
|
</root>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user