Compare commits

...

977 Commits

Author SHA1 Message Date
Diego Najar
f928fe84c8
Merge pull request #1201 from anaggh/master
Update frontend dependencies
2020-06-08 14:16:56 +02:00
Anaggh S
3443fca913 Update TinyMCE 5.3.0 -> 5.3.1 2020-06-07 18:11:53 +05:30
Diego Najar
212f68b5ac
Merge pull request #1203 from virtualmix/small-fixes
Correct small typos
2020-06-05 13:01:53 +02:00
virtualmix
ec9db046e7 fix typos 2020-06-03 23:59:07 -07:00
Anaggh S
0884b469f0 Fix invalid json in metadata 2020-05-28 20:33:00 +05:30
Anaggh S
873fbab56b Move undefined check to correct place 2020-05-27 17:03:50 +05:30
Anaggh S
1e0a919137 Update TinyMCE 5.2.0 -> 5.3.0 2020-05-26 20:40:21 +05:30
Anaggh S
6667289679 Bump easymde plugin version 2020-05-26 20:02:35 +05:30
Anaggh S
8d27f2a0c0 Fix "undefined" text on search 2020-05-26 19:20:34 +05:30
Anaggh S
caeef10df2 Update select2-bootstrap4 theme 1.4.0 2020-05-26 18:35:30 +05:30
Anaggh S
ff2dfe1175 Update select2 4.0.12 -> 4.0.13 2020-05-26 18:26:52 +05:30
Anaggh S
7edcb04727 Update easymde 2.9.0 -> 2.10.1 2020-05-26 18:15:01 +05:30
Anaggh S
68fcbf1a49 Update jQuery 3.4.1 -> 3.5.1 2020-05-26 17:54:23 +05:30
Anaggh S
beaf06bb1c Update bootstrap 4.4.1 -> 4.5.0 2020-05-26 17:51:13 +05:30
Diego Najar
9095ef077a
Merge pull request #1199 from SamBrishes/patch-006
[BUGFIX] AJAX Error Message when uploading Images
2020-05-24 09:20:16 +02:00
SamBrishes
2e307339ab Remove Filesystem:rmfile completely 2020-05-23 18:48:14 +02:00
Diego Najar
5a5585d5bd
Merge pull request #1198 from SamBrishes/patch-005
[BUGFIX] Remove deprecated autoComplete Function
2020-05-23 17:01:23 +02:00
SamBrishes
4ec9b47c96 Fix for Issue #1176
Fix for Issue #1176
2020-05-22 23:34:15 +02:00
SamBrishes
93fd4e0c83 Remove deprecated atuoComplete Function 2020-05-22 23:15:38 +02:00
Diego Najar
4a740ecb03
Merge pull request #1194 from SamBrishes/patch-002
[BUGFIX] ZIP Paths may starts with an (back-) slash
2020-05-15 13:35:41 +02:00
SamBrishes
06131d7f85 Bugfix - ZIP Paths may starts with an (back-) slash 2020-05-14 11:33:46 +02:00
dignajar
a5dc0addea Bug fix for 1177, get sub-pages via API 2020-05-12 23:05:29 +02:00
dignajar
134ac64e07 improve preview function 2020-05-12 22:24:03 +02:00
dignajar
0337402acd Merge branch 'master' of github.com:bludit/bludit 2020-05-12 18:24:15 +02:00
dignajar
41b5531fa2 Custom hooks for plugins 2020-05-12 18:24:06 +02:00
Diego Najar
98b7cf95df
Merge pull request #1183 from CaiMiao/patch-2
Update zh_CN.json
2020-05-12 17:51:01 +02:00
Diego Najar
5b85f90f72
Merge pull request #1185 from lightmat/master
Core plugin language da.json
2020-05-04 14:29:28 +02:00
Steen Jakobsen
5eb834c51d Core plugin language da.json
Danisk translations for core plugins
2020-05-02 19:48:34 +02:00
Diego Najar
e2bfe73ea8
Merge pull request #1179 from hide-me/patch-1
Some minor fixies in Russian translation
2020-05-01 21:26:02 +02:00
Diego Najar
a10a0b3df5
Merge pull request #1184 from lightmat/master
Create da.json
2020-05-01 21:25:42 +02:00
Steen Jakobsen
b240e8c138 Create da.json
Danish translation
2020-05-01 20:05:36 +02:00
Fumii Chuu
226c60eb92
Update zh_CN.json 2020-04-29 23:49:57 +09:00
hide-me
3817907eed
Some minor fixies in Russian translation
Also, I updated the URL of my personal site 🆒
2020-04-23 17:01:27 +03:00
Diego Najar
442a8ca1db
Merge pull request #1175 from nogajun/japanese
Fixed Japanese translation
2020-04-22 11:12:06 +02:00
Jun NOGATA
7e4410f713 fix ja_JP.json 2020-04-20 18:32:08 +09:00
Diego Najar
c1db51b1ce
Merge pull request #1165 from hide-me/patch-23
Update RU lang
2020-04-10 13:07:02 +02:00
Diego Najar
96e315521e
Merge pull request #1166 from hide-me/patch-24
Translation a bit improved
2020-04-10 13:06:54 +02:00
Diego Najar
63c0dc6da1
Merge pull request #1167 from hide-me/patch-25
Translation a bit improved
2020-04-10 13:06:45 +02:00
Diego Najar
f1d970bb3d
Merge pull request #1172 from mhancoc7/patch-2
Allow passing in attributes for Theme js files
2020-04-10 13:06:30 +02:00
Jereme Hancock
9a1ff17545
Allow passing in attributes for Theme js files
This is a follow up to a previous PR. The async attribute can cause issues with some js files. For instance I added the lozad.js (https://github.com/ApoorvSaxena/lozad.js) for lazy loading and included it via my theme. However, with the current automatic inclusion of "async" things didn't work. 

So this update allows Theme developers to prevent the async attribute by passing in "null".

Example: ```<?php echo Theme::javascript('js/lozad.min.js', DOMAIN_THEME, null); ?>```

If the Theme developer doesn't include "null" the default will be to use "async".
2020-04-05 20:15:09 -05:00
Diego Najar
0021d7920c
Merge pull request #1163 from hide-me/patch-22
Translation improved
2020-03-30 13:45:29 +02:00
Diego Najar
f959cc338b
Merge pull request #1162 from hide-me/patch-21
Translation a bit improved
2020-03-30 13:45:18 +02:00
Diego Najar
ad2dd5af45
Merge pull request #1161 from hide-me/patch-20
Translation a bit improved
2020-03-30 13:45:09 +02:00
Diego Najar
6cfa2fc423
Merge pull request #1160 from hide-me/patch-19
Updated translation
2020-03-30 13:44:59 +02:00
Diego Najar
ef2da05473
Merge pull request #1159 from hide-me/patch-18
Trying to add tanslatable string
2020-03-30 13:44:47 +02:00
Diego Najar
7834d9d193
Merge pull request #1158 from hide-me/patch-17
Translation a bit improved
2020-03-30 13:44:33 +02:00
Diego Najar
1016e982c9
Merge pull request #1157 from hide-me/patch-16
Fix small mistake
2020-03-30 13:44:22 +02:00
Diego Najar
061f7c1b13
Merge pull request #1164 from mhancoc7/patch-1
Add the "async" parameter to script tags
2020-03-27 12:53:08 +01:00
Jereme Hancock
380e99b1cc
Removed async from jquery as I started noticing errors in admin 2020-03-26 13:05:18 -05:00
Diego Najar
63ccd77af5 Bug fixed, set a homepage and enable the filter /blog/ 2020-03-25 21:25:00 +01:00
hide-me
1db714be71
Translation a bit improved 2020-03-24 18:19:59 +03:00
hide-me
632f2e58a8
Translation a bit improved 2020-03-24 18:16:37 +03:00
hide-me
3eaafb87bd
Update RU lang 2020-03-24 18:14:52 +03:00
Edi
8171cf23b7
Update de_AT.json 2020-03-24 13:20:42 +01:00
Edi
50a4ad363e
Update de_DE.json 2020-03-24 13:19:47 +01:00
Edi
ecec740961
Update de_CH.json 2020-03-24 13:18:48 +01:00
Jereme Hancock
12bbef14a6
Add the "async" parameter to script tags
In my testing this has improved my Page Insights score pretty significantly especially for mobile. See: https://web.dev/render-blocking-resources/
2020-03-23 14:04:54 -05:00
Diego Najar
f46de71aa7
Merge pull request #1156 from hide-me/patch-15
Translated new strings
2020-03-22 14:51:18 +01:00
Diego Najar
6079d338d4
Merge pull request #1155 from hide-me/patch-14
Create ru_RU.json
2020-03-22 14:50:48 +01:00
hide-me
e00a6c10c5
Translation improved
Translated new string
2020-03-22 16:23:25 +03:00
hide-me
2848ca7344
Translation a bit improved 2020-03-22 01:10:32 +03:00
hide-me
58b831b95c
Translation a bit improved 2020-03-22 01:08:18 +03:00
hide-me
9ff5a3c69a
Updated translation 2020-03-22 01:05:11 +03:00
hide-me
9833141c13
Trying to add tanslatable string
Please check it. I tested on my site and it's working perfectly, but maybe I did some mistakes.
2020-03-22 01:00:17 +03:00
Diego Najar
b156c9e576 remove social network theme 2020-03-21 22:34:16 +01:00
Diego Najar
eb4111aa96 Remove theme social network is not finished 2020-03-21 22:33:20 +01:00
hide-me
d140513e9d
Translation a bit improved 2020-03-21 23:59:51 +03:00
hide-me
750a40b926
Fix small mistake 2020-03-21 21:44:49 +03:00
hide-me
179c458fa5
Translated new strings 2020-03-21 21:42:55 +03:00
hide-me
298a2e3ccb
Create ru_RU.json 2020-03-21 21:35:45 +03:00
Diego Najar
1954f6d6fd remove rewrite base 2020-03-21 15:45:03 +01:00
Diego Najar
c4b3bdd77b Bludit v3.12.0 metadata 2020-03-21 15:44:27 +01:00
Diego Najar
4d7fd05d1c Metadata for Tinymce plugin for version 5.2.0 2020-03-20 19:50:30 +01:00
Diego Najar
fd80820e0b Get files for a particular page 2020-03-20 19:49:59 +01:00
Diego Najar
46fa8a1fab Create directory for upload pictures for each new page 2020-03-20 19:48:44 +01:00
Diego Najar
3416afe4e3
Merge pull request #1152 from hide-me/patch-11
A bit improved translation
2020-03-20 18:54:46 +01:00
Diego Najar
2388ce23c1
Merge pull request #1153 from hide-me/patch-12
Translation a bit improved
2020-03-20 18:54:31 +01:00
Diego Najar
9dc4af618c
Merge pull request #1154 from hide-me/patch-13
Translated the name of plugin
2020-03-20 18:54:17 +01:00
Diego Najar
8ab515b402
Merge pull request #1151 from hide-me/patch-10
A bit improved translation
2020-03-20 18:54:02 +01:00
hide-me
647724f0ed
Translated the name of plugin 2020-03-20 20:38:59 +03:00
hide-me
392656bce8
Translation a bit improved 2020-03-20 20:30:28 +03:00
hide-me
3c6b227699
A bit improved translation 2020-03-20 19:09:22 +03:00
hide-me
8f15321bfb
A bit improved translation 2020-03-20 19:05:14 +03:00
Diego Najar
c8f96e2901
Merge pull request #1150 from ltGuillaume/patch-3
Update nl_NL.json for version plugin
2020-03-16 19:22:38 +01:00
Guillaume
e75066a961
Update nl_NL.json 2020-03-16 18:58:18 +01:00
Diego Najar
ac94b829e1 TinyMCE 5.2.0 2020-03-14 19:10:19 +01:00
Diego Najar
5186720775 Add missing word for the plugin version 2020-03-14 12:07:18 +01:00
Diego Najar
0530aaa3b8 Merge branch 'master' of github.com:dignajar/bludit 2020-03-14 12:03:50 +01:00
Diego Najar
a8b4b26c57 get mimetype 2020-03-14 12:03:43 +01:00
Diego Najar
017cbfa667 Settings for the plugin version, new version alert and show current version 2020-03-14 12:02:23 +01:00
Diego Najar
de6e3b2a3f
Merge pull request #1146 from DavidEredics/master
Updated Hungarian translation
2020-03-05 10:51:55 +01:00
Dávid
f9c5bc0174
Updated Hungarian translation 2020-02-28 20:39:20 +01:00
Diego Najar
f42961dd80
Merge pull request #1145 from anaggh/master
Use try catch instead
2020-02-28 10:12:40 +01:00
Anaggh S
45ca449d5a Use try catch instead 2020-02-28 14:06:09 +05:30
Diego Najar
7e76de099d
Merge pull request #1144 from anaggh/master
Fix bugs
2020-02-27 13:08:38 +01:00
Anaggh S
bbdc8afcaf Fix PHP 7.4 "Deprecated: Array and string offset access syntax with curly braces is deprecated" 2020-02-27 03:08:27 +05:30
Anaggh S
7ae53cfd63 Fix #1143 Add additional check to skip broken symlinks to avoid RuntimeException: SplFileInfo::getSize(): stat failed 2020-02-27 02:58:05 +05:30
Diego Najar
2e2b5a179a
Merge pull request #1138 from fabianosantosnet/master
Updated Brazilian Language
2020-02-18 10:27:33 +01:00
Fabiano Santos
6b9a07752e Updated Brazilian Language 2020-02-15 21:29:12 -03:00
Diego Najar
de01180cc6
Merge pull request #1136 from anaggh/master
Fix #1135 clippy input on mobile dropdown menu bug
2020-02-15 12:03:22 +01:00
Anaggh S
8a5599023c Fix #1135 clippy input on mobile dropdown menu bug 2020-02-15 16:10:40 +05:30
Edi
f4ddf8f1c2
Update de_DE.json 2020-02-11 13:08:20 +01:00
Edi
6fdac98ba8
Update de_CH.json 2020-02-11 13:07:09 +01:00
Edi
9da3300b90
Description 2020-02-11 12:58:30 +01:00
Edi
0e53d07757
Description 2020-02-11 12:52:25 +01:00
Diego Najar
d570ad6644 include end of line 2020-02-10 21:23:02 +01:00
Diego Najar
78ab655c57 Include Sitemap link if the plugin is enabled 2020-02-10 21:19:53 +01:00
Diego Najar
29c8341b2f Bludit v3.11.0 2020-02-08 19:24:17 +01:00
Diego Najar
edeb603541 update metadata for bludit v3.11.0 2020-02-08 19:22:34 +01:00
Diego Najar
c0a15930f9 include site db on developers page 2020-02-08 19:20:44 +01:00
Diego Najar
f2acafd6db add social network vk.com 2020-02-08 19:20:15 +01:00
Diego Najar
f8bfdf2957 update metadata for tinymce plugin 2020-02-08 19:19:35 +01:00
Diego Najar
ab414ae645 Fix html code for favicon 2020-02-08 19:19:15 +01:00
Diego Najar
867fc1d50d
Merge pull request #1124 from ltGuillaume/patch-3
Add missing translations
2020-02-07 15:27:22 +01:00
Diego Najar
8c38957d8c
Merge pull request #1130 from JustJoao/patch-1
Updated Portuguese (Portugal) translation
2020-02-07 15:26:59 +01:00
Diego Najar
5cd6283caf Fix for #1102, show search input on small devices 2020-02-05 20:59:33 +01:00
Diego Najar
35483e0d30 Security bug fixed #1131 and refresh profile picture after uploaded 2020-02-05 20:57:07 +01:00
Diego Najar
4d0912308d Update jstz to detect the timezone in the installation 2020-02-05 20:45:43 +01:00
LimonadaPT
d42e8665a5
Added portuguese translation
Reviewed also _Last update_ date
2020-02-03 23:06:10 +00:00
LimonadaPT
53e8cb5243
Updated Portuguese (Portugal) translation
Added the missing translation for the new dictionaries.
Reviewed the whole translation file to ensure consistency on formality (tu vs você). For this I've removed the personal pronouns where possible (instead of edit your content -> edit the content) to avoid formality statements. When required, I've used (mostly) the informal pose.
2020-02-03 20:39:18 +00:00
dignajar
f14dab7444 EasyMDE 2.9.0 2020-01-30 19:21:05 +01:00
Diego Najar
8e44ed3227
Merge pull request #1126 from ltGuillaume/patch-4
Dutch: correction for exclude-administrators-users
2020-01-26 12:37:59 +01:00
Guillaume
84a053c6da
Dutch: correction for exclude-administrators-users 2020-01-26 12:35:56 +01:00
Guillaume
9022e707bd
Correction for exclude-administrators-users 2020-01-26 12:34:37 +01:00
Diego Najar
42ca4fe7a7
Merge pull request #1125 from ltGuillaume/patch-4
Dutch for Simple Stats
2020-01-26 11:47:55 +01:00
Guillaume
1ce60f86f6
Added "and", is this ok? 2020-01-25 16:56:20 +01:00
Guillaume
786d1dee98
Dutch for Simple Stats 2020-01-25 16:55:31 +01:00
Guillaume
c417c52656
Add missing translations 2020-01-25 16:52:24 +01:00
Diego Najar
b6c55228b5
Merge pull request #1121 from CaiMiao/patch-1
Update ja_JP.json
2020-01-14 20:51:08 +01:00
Fumii Chuu
b0cf336089
Update ja_JP.json 2020-01-13 05:33:59 +09:00
Diego Najar
80a7940f2b
Merge pull request #1118 from ali-demirtas/patch-24
Create tr_TR.json
2020-01-02 15:59:42 +01:00
Diego Najar
c85f357eb7
Merge pull request #1117 from anaggh/master
update libs
2020-01-02 10:08:48 +01:00
Anaggh S
8d2056dfac Fix #1051 Bug - Media Manager Pagination 2020-01-01 22:28:59 +05:30
Anaggh S
8194be5e4d Fix #808 Remove special characters/spaces early to prevent overwrite 2020-01-01 18:04:59 +05:30
Ali Demirtas
27d6b5037a
Create tr_TR.json
Turkish language
2020-01-01 14:41:00 +03:00
Anaggh S
f48fcaf997 Update bootstrap v4.3.1 -> v4.4.1 2020-01-01 16:40:11 +05:30
Anaggh S
b62194a3c3 Update parsedown 1.7.3 -> 1.7.4 2020-01-01 16:24:11 +05:30
Diego Najar
3e15163240
Update Golden sponsors 2019-12-31 18:24:15 +01:00
Diego Najar
908cba2d9d
Merge pull request #1116 from ali-demirtas/patch-23
Update tr_TR.json
2019-12-31 18:16:57 +01:00
Ali Demirtas
697aadf375
Update tr_TR.json
Turkish language updated.
2019-12-28 13:15:27 +03:00
Diego Najar
b86dc069a1 Update select2 to 4.0.12 2019-12-08 18:40:07 +01:00
Diego Najar
52149ad4d4 Merge branch 'master' of github.com:dignajar/bludit 2019-12-08 18:32:06 +01:00
Diego Najar
b67c6355a1 TinyMCE 5.1.3 2019-12-08 18:31:57 +01:00
Diego Najar
e758ba5fc1
Merge pull request #1112 from hide-me/patch-9
Translated new strings to Russian
2019-12-07 18:11:51 +01:00
Diego Najar
95ae4e5061 add view and edit to the langueage file 2019-12-07 18:11:41 +01:00
Diego Najar
ff57081e3a add support for vk.com social network 2019-12-07 14:35:38 +01:00
Diego Najar
bc4f532b97 add support for vk.com social network 2019-12-07 14:32:39 +01:00
Diego Najar
696fa1c406 Merge branch 'master' of github.com:dignajar/bludit 2019-12-07 14:24:22 +01:00
Diego Najar
7c8bad72c5 Improve search plugin and add support for UTF8 to Fuzz algorithm 2019-12-07 14:24:13 +01:00
hide-me
bbf59daef3
Translated new strings to Russian
You added the string "view" but not added "edit" from the same part of code. Also, the status of any pages from smart search can't be translated cuz u again not added it.

Sorry that I was absent for a long time
2019-11-25 16:22:56 +03:00
Diego Najar
5021608b03
Merge pull request #1111 from ethan42411/master
Update zh_TW.json for 3.10.0
2019-11-25 14:20:51 +01:00
ethan42411
0268cd0a72 Update zh_TW.json (20191124-5)
20191124-5
2019-11-24 13:26:05 +08:00
ethan42411
033ba81da8 Update zh_TW.json (20191124-4)
20191124-4
2019-11-24 13:23:27 +08:00
ethan42411
9fff6afa0b Update zh_TW.json (20191124-3)
20191124-3
2019-11-24 12:05:11 +08:00
ethan42411
5ac88f0daa Update zh_TW.json (20191124-2)
20191124-2
2019-11-24 11:53:41 +08:00
ethan42411
4eb81c775c Update zh_TW.json (20191124-1)
20191124-1
2019-11-24 11:21:00 +08:00
Diego Najar
b510c59bab Improve date modified returns 2019-11-18 20:18:29 +01:00
Diego Najar
8b025ebe81 Include Disk usage 2019-11-18 20:17:27 +01:00
Diego Najar
b9a474311b Merge branch 'master' of github.com:dignajar/bludit 2019-11-18 19:42:02 +01:00
Diego Najar
f0e9bc62a2 deactivate all plugins function 2019-11-18 19:41:54 +01:00
Diego Najar
006e87daf1
Merge pull request #1107 from anaggh/master
Fix #941 Allow backup downloads for admin role
2019-11-17 16:27:47 +01:00
Anaggh S
55bb7c4eeb Update Chartist.js 0.11.0 -> 0.11.4 2019-11-15 21:32:48 +05:30
Anaggh S
a39d3fff7f Add Disk Size to Simple Stats 2019-11-15 21:17:56 +05:30
Anaggh S
1a208b0642 Allow backup downloads for admin role 2019-11-15 19:29:26 +05:30
Diego Najar
2b504938ec include get settings 2019-11-11 19:16:05 +01:00
Diego Najar
c7c8998367 include category name on JSON method 2019-11-05 21:51:46 +01:00
Diego Najar
142159a8e9 Enable API after user login success and returns authentication token, helps for external applications 2019-11-02 17:06:34 +01:00
Diego Najar
c943506ff8 remove directories 2019-10-28 23:22:14 +01:00
Diego Najar
4e257937b7 remove directories 2019-10-28 23:21:34 +01:00
Diego Najar
952aedf175 Japanese language 2019-10-28 23:21:02 +01:00
Diego Najar
e212598c21 Ident subpages 2019-10-27 11:09:48 +01:00
Diego Najar
8a1338b186 remove shorcut to fix favicon. Related issue #1099 2019-10-24 20:08:54 +02:00
Diego Najar
5f2a840890 Fix URLs on assistant and metadata updated for Bludit v3.10.0 2019-10-19 10:10:46 +02:00
Diego Najar
bc5039c7e2 Merge branch 'master' of github.com:dignajar/bludit 2019-10-17 18:32:12 +02:00
Diego Najar
30737fef7b Plugin custom fields parser 2019-10-17 18:32:04 +02:00
Diego Najar
e624adc0a4
Merge pull request #1094 from kostaslgr/patch-2
Update gr.json
2019-10-15 14:24:30 +02:00
kostaslgr
e0ed79f8de
Update gr.json 2019-10-15 14:18:35 +03:00
kostaslgr
72344d2e13
Update gr.json 2019-10-15 14:17:38 +03:00
kostaslgr
63f9d392f7
Update gr.json
Corrected translation in Greek language.
2019-10-12 15:23:40 +03:00
Diego Najar
4f3f40a6c4 Remove HTML and PHP tags from the users,categories and tags fields, prevent XSS 2019-10-12 11:35:35 +02:00
Diego Najar
bc79794784
Merge pull request #1091 from ltGuillaume/patch-3
Dutch
2019-10-08 16:15:50 +02:00
Guillaume
a028395cc2
Dutch 2019-10-08 15:19:07 +02:00
Edi
22974f8731
Update fa_IR.json 2019-10-08 10:40:11 +02:00
Edi
985b4c0279
Update de_AT.json 2019-10-07 23:15:55 +02:00
Edi
b33ca79480
Update de_DE.json 2019-10-07 23:14:45 +02:00
Edi
7891d3ad3e
Update de_CH.json 2019-10-07 23:13:20 +02:00
Diego Najar
a614b1066e Languages dictionaries updated 2019-10-07 18:49:53 +02:00
Diego Najar
968d9d6221 Fade betewen tabs 2019-10-07 18:45:41 +02:00
Diego Najar
3d803e0c08 Merge branch 'master' of github.com:dignajar/bludit 2019-10-07 18:44:42 +02:00
Diego Najar
f53460a05a Remove arrow 2019-10-07 18:44:27 +02:00
Edi
5ecca546ea
Update de_AT.json 2019-10-06 20:14:19 +02:00
Edi
fcc72096ce
Update de_CH.json 2019-10-06 20:13:51 +02:00
Edi
5e82ff7e81
Update de_DE.json 2019-10-06 20:12:43 +02:00
Edi
54a761ec91
Update de_AT.json 2019-10-06 20:10:31 +02:00
Edi
711686bd9f
Update de_CH.json 2019-10-06 20:08:53 +02:00
Diego Najar
ada0b61ee1 Add badget for page types 2019-10-05 21:29:32 +02:00
Diego Najar
7dae1725bb Keep date on draft pages, bug fix for #1088 2019-10-05 21:22:34 +02:00
Diego Najar
c5977fc0cb Select parent page bug fix #1089 2019-10-05 21:20:58 +02:00
Diego Najar
b86f317a2c
Merge pull request #1085 from ltGuillaume/patch-3
Dutch
2019-10-05 20:00:49 +02:00
Diego Najar
bee66af492
Merge pull request #1090 from rastating/bug/fix-brute-force-vulnerability
Remove use of headers that can be used to bypass anti-brute force controls
2019-10-05 19:59:34 +02:00
Rob
b5afd44195
Remove use of headers that can be used to bypass anti-brute force controls 2019-10-05 18:22:25 +01:00
Diego Najar
da94b43e84 Change <? for <?php, fix for #1086 2019-09-27 15:36:18 +02:00
Guillaume
ff8b3e323b
Dutch 2019-09-25 23:23:13 +02:00
Diego Najar
aa09eb1351 metadata for bludit v3.10.0 2019-09-25 20:23:15 +02:00
Diego Najar
3617ce9b88 Include User and settings for the API 2019-09-25 20:19:34 +02:00
Diego Najar
21a48609c2 Social network theme minor changes 2019-09-25 20:19:01 +02:00
Diego Najar
b35172b286 Open current tab after refresh page 2019-09-25 20:18:36 +02:00
Diego Najar
bf0f31993b clean up 2019-09-25 20:17:28 +02:00
Diego Najar
582dd26243 Select2 as search function and the new assistant for Bludit on Dashboard 2019-09-25 20:16:45 +02:00
Diego Najar
e153a20417 Minor changes on languages dictionaries 2019-09-25 20:12:40 +02:00
Diego Najar
00cd81002e updated 2019-09-25 20:11:52 +02:00
Diego Najar
091c5798c1 TinyMCE 5.0.16 2019-09-25 20:11:19 +02:00
Diego Najar
1df1522144 Merge branch 'master' of github.com:dignajar/bludit 2019-09-23 23:04:43 +02:00
Diego Najar
40b3c36358 Open current tab after refresh 2019-09-23 23:04:34 +02:00
Diego Najar
239da3bd40
Merge pull request #1084 from xm74/master
Harmonize RSS feed with W3C recommendations
2019-09-19 12:15:43 +02:00
Max Kostikov
b10ee19033
Rename function encodeURL 2019-09-19 11:52:28 +02:00
Max Kostikov
2e8536cc04
Use DATE_RSS constant in RSS pubDate 2019-09-16 11:57:51 +02:00
Max Kostikov
0340a18dc1
Ignore locale in date 2019-09-15 14:52:50 +02:00
Max Kostikov
b272020b37
Harmonize RSS feed with W3C recommendations
1. Declare Atom schema support
2. Escape international characters in URL
3. Ignore locale in date
2019-09-15 14:51:04 +02:00
Diego Najar
8df8d5f7dd remove changefreq field 2019-09-11 19:14:07 +02:00
Diego Najar
c0dfe40d1b Methods for API 2019-09-11 19:12:19 +02:00
Diego Najar
d84d0065d5 Javascript functions 2019-09-11 19:11:44 +02:00
Diego Najar
a31f11d8c6 Javascript functions 2019-09-11 19:11:18 +02:00
Diego Najar
fe8ad3c064 Show the static pages order by position all the time 2019-09-11 19:10:41 +02:00
Diego Najar
3c72a8eafb Custom fields with positions 2019-09-09 20:34:50 +02:00
Diego Najar
23237cb05d Check file types uploaded and handle message error for the users 2019-09-09 19:29:35 +02:00
Diego Najar
5857970461 Fix checkbox for robots 2019-09-09 17:51:58 +02:00
Diego Najar
a9640ff6b5 Bug fix for #1081 2019-09-08 10:45:56 +02:00
Diego Najar
3dd31b9d11 Allow static pages to have subpages 2019-09-08 10:35:21 +02:00
Diego Najar
7aba5362c6 Bug fix when select parent pages with special HTML characters. Related issue #1072 2019-09-08 10:17:12 +02:00
Diego Najar
323ab6462b Improve issue template 2019-09-06 16:12:41 +02:00
Diego Najar
7092697112 Bug fix for #1079 2019-09-05 23:10:39 +02:00
Diego Najar
72b6908899 Custom fields: Boolean type 2019-09-03 18:35:30 +02:00
Diego Najar
cc73f609e4 Custom fields 2019-09-02 18:24:34 +02:00
Diego Najar
2e44c6fd8c EasyMDE v2.8.0 2019-08-30 16:52:12 +02:00
Diego Najar
4662bde3b9 https instead of http 2019-08-21 20:50:11 +02:00
Edi
e8547253fd
Typo 2019-08-13 14:01:03 +02:00
Diego Najar
83e8cf74c1
Update ping URLs 2019-08-06 10:54:21 +02:00
Diego Najar
82501c9c9c
Merge pull request #1062 from b3none/patch-1
Fix typo in the index.php
2019-07-23 09:27:13 +02:00
Diego Najar
b021a42f66 remove lightgallery 2019-07-21 15:11:15 +02:00
Diego Najar
e3dbf79863 Execute install.php after activate the theme 2019-07-21 15:10:33 +02:00
Edi
7441ccc003
Merge pull request #1064 from murko69/patch-1
Create sv_SE.json
2019-07-09 12:33:59 +02:00
MIcke Olsson
0a23a60901
Create sv_SE.json
Add and update Swedish translations
2019-07-09 12:20:07 +02:00
⭐ B3none
1258182265
Fix typo in the index.php 2019-07-05 20:11:00 +01:00
Diego Najar
e50721eb8e
Merge pull request #1055 from nogajun/japanese
Update Japanese translation
2019-06-28 18:53:33 +02:00
Jun NOGATA
7af9c53472 Add and Update Japanese Translation plugins / themes 2019-06-26 11:47:30 +09:00
Jun NOGATA
7596018c73 update Japanese translation 2019-06-26 00:45:17 +09:00
Diego Najar
b1fc6cd0be Update metadata for Bludit v3.9.2 2019-06-21 11:02:02 +02:00
Diego Najar
44f8c77abe Tinymce 5.0.8 2019-06-21 11:01:21 +02:00
Diego Najar
3cd7fa7720 Remove page from Sitemap when are setted as noindex #1054 2019-06-21 10:27:26 +02:00
Diego Najar
0cfb161e53 Remove page from Sitemap when are setted as noindex #1054 2019-06-21 10:26:38 +02:00
Diego Najar
5779635bd4 Remove buttons from paginator when are not need it 2019-06-21 10:24:37 +02:00
Diego Najar
d6f0073446 removed google plus 2019-06-17 22:07:01 +02:00
Diego Najar
f81c909cbc Language updated 2019-06-17 22:06:40 +02:00
Diego Najar
b69f795038 Remove button next and previous when there are no more pages. #1052 2019-06-17 22:05:17 +02:00
Diego Najar
6a51889f4d
Merge pull request #1049 from GamerN131/patch-1
Minor Changes in de_DE.json
2019-06-16 22:32:32 +02:00
Diego Najar
84cf8d923e
Merge pull request #1050 from hide-me/patch-8
Translation for new strings
2019-06-16 22:32:15 +02:00
Diego Najar
016754b67c Fix some english phrases 2019-06-16 22:31:48 +02:00
Diego Najar
88765e15f9 Merge branch 'master' of github.com:dignajar/bludit 2019-06-16 22:31:19 +02:00
Diego Najar
7a6d13de26 Social network theme, still working on it 2019-06-16 22:31:09 +02:00
hide-me
289a2bb167
Translations for new strings 2019-06-12 11:04:53 +03:00
GamerN131
10c263b507
Updated de_DE.json
Translation of "author-can-write-and-edit-their-own-content"
2019-06-10 14:44:07 +02:00
Diego Najar
b021019ec1
Merge pull request #1046 from ltGuillaume/patch-1
Dutch
2019-06-10 13:05:08 +02:00
Guillaume
87c487bdcb
Dutch 2019-06-06 22:24:00 +02:00
Diego Najar
e259257c53 Language updated 2019-06-06 19:26:35 +02:00
Diego Najar
42a2d1e144 Fixes on english language and sync other dictionaries 2019-06-06 19:08:17 +02:00
Diego Najar
5a4edaf924
Merge pull request #1045 from Fred89/master
Update fr_FR.json
2019-06-06 18:53:42 +02:00
Fred89
125d1f01fd Update fr_FR.json 2019-06-05 01:19:34 +02:00
Diego Najar
1ea94a4f0b Include RSS link 2019-06-02 20:37:45 +02:00
Diego Najar
239b868cc4 Added description 2019-06-02 20:10:55 +02:00
Diego Najar
2fd6d17229 Update readme 2019-05-31 13:06:49 +02:00
Diego Najar
7228a3df52 Fix language 2019-05-31 09:29:44 +02:00
Diego Najar
e226468036 Change metadata for Bludit v3.9.1 2019-05-30 19:24:37 +02:00
Edi
fe2d640969
Update de_CH.json 2019-05-30 15:43:50 +02:00
Edi
51cdedbdb4
Update de_AT.json 2019-05-30 15:43:18 +02:00
Edi
8b4ea87bf4
Update de_DE.json 2019-05-30 15:42:49 +02:00
Diego Najar
9b67ec6dac
Merge pull request #1040 from SamBrishes/master
Re-Implement de_AT.json
2019-05-30 10:03:54 +02:00
SamBrishes
d0b286ee0e Translate Preview in de_CH 2019-05-30 09:57:15 +02:00
SamBrishes
29b96802d7 Re-Implement de_AT language 2019-05-30 09:56:45 +02:00
Diego Najar
752778bc66
Merge pull request #1039 from ltGuillaume/patch-1
Dutch
2019-05-30 09:48:44 +02:00
Guillaume
284ecc4256
Dutch 2019-05-30 01:14:16 +02:00
Diego Najar
987cbd3be8 Issue template 2019-05-29 20:40:11 +02:00
Diego Najar
600345ee57 Bug fix for PHP 5.6 when upload images 2019-05-29 19:28:11 +02:00
Diego Najar
febd7256e4 Spanish updated 2019-05-29 16:53:45 +02:00
Diego Najar
2c773ac1a4 Include SVG format 2019-05-29 16:21:25 +02:00
Diego Najar
6ae0f06ca9 Include preview word 2019-05-29 16:20:45 +02:00
Diego Najar
237d28d396 Prevent show Disqus in page not found 2019-05-28 21:04:15 +02:00
Diego Najar
a1bb333153 Prevent non-administrators to change the password from other users 2019-05-28 20:49:29 +02:00
Diego Najar
ce3d52736f Suffix for prevent cache in TinyMCE 2019-05-28 20:39:37 +02:00
Edi
cbb8c0653e
Update de_DE.json 2019-05-28 11:23:39 +02:00
Edi
8de04fc4cc
Update de_AT.json 2019-05-28 11:22:52 +02:00
Edi
aff0a0220c
Update de_CH.json 2019-05-28 11:21:14 +02:00
Diego Najar
49027a3bad Bludit v3.9.0 2019-05-27 21:56:52 +02:00
Diego Najar
37396e8dec TinyMCE 5.0.6 2019-05-27 20:02:42 +02:00
Diego Najar
1aed4d0666 added version in url to avoid cache problems 2019-05-27 19:51:57 +02:00
Diego Najar
0d2c962da8 added some comments 2019-05-27 19:41:46 +02:00
Diego Najar
0dc9904d62 Check file extension, bug fix #1011 2019-05-27 19:24:11 +02:00
Diego Najar
f317d8cff7 bigger button 2019-05-27 19:08:20 +02:00
Diego Najar
baa835cb8c added some logs 2019-05-27 19:07:53 +02:00
Diego Najar
95448a76c3 Merge branch 'master' of github.com:dignajar/bludit 2019-05-27 19:07:15 +02:00
Diego Najar
3704838436 remove button view for draft pages 2019-05-27 19:07:02 +02:00
Edi
e2a2e5f315
Merge pull request #1035 from MoritzBrueckner/lang_de
Update german translations
2019-05-26 23:58:46 +02:00
Diego Najar
bcff43603a Include autosave type 2019-05-26 23:09:38 +02:00
Diego Najar
ff4f166962 Functions for autosave type 2019-05-26 23:08:50 +02:00
Diego Najar
787538e1ca Search function searches in names and description 2019-05-26 23:08:01 +02:00
Diego Najar
b9f190ec88 Merge branch 'master' of github.com:dignajar/bludit 2019-05-26 23:07:20 +02:00
Diego Najar
c5f895b72f Updated search function, include view button, improves for small devices 2019-05-26 23:06:08 +02:00
Diego Najar
7b1ae6d86e
Merge pull request #1034 from anaggh/patch-1
Bug Fix #1032
2019-05-26 22:43:44 +02:00
Diego Najar
9f81ab8ab0
Merge pull request #1033 from ltGuillaume/dutch
Dutch
2019-05-26 22:15:35 +02:00
Moritz Brückner
4e5d8ff5dd Update german translations 2019-05-25 14:29:21 +02:00
Diego Najar
61628ff56d Remove SimpleMDE and include EasyMDE 2019-05-25 12:14:49 +02:00
anaggh
dd037a96ea
Bug Fix #1032
Data changes on 2nd or 3rd save.

Try
```
abc </textarea> def
```

OR

```
<code>
&lt;p&gt; test &lt;/p&gt;
</code>
```
2019-05-25 12:03:14 +05:30
Guillaume
141b1a8145
Dutch 2019-05-24 20:05:27 +02:00
Diego Najar
d1f7e32885 Languages dictionaries updated 2019-05-24 19:26:57 +02:00
Diego Najar
f0af06dbed Languages dictionaries updated 2019-05-24 19:25:00 +02:00
Diego Najar
68407ad75e Autosave tab, and autosave type for pages 2019-05-24 19:00:22 +02:00
Diego Najar
c3cccaf42d icons for plugins view 2019-05-24 18:59:53 +02:00
Diego Najar
8427c84403
Merge pull request #1030 from anaggh/master
Updates
2019-05-19 12:16:41 +02:00
Anaggh S
4c194a97dc Update jQuery 3.3.1 -> 3.4.1 2019-05-19 00:02:43 +05:30
Anaggh S
f49c3c7a47 Raise min php version required 5.3 -> 5.6 in install.php 2019-05-18 23:41:32 +05:30
Anaggh S
78f3b0aee5 Change Copyright year 2018 -> 2019 2019-05-18 23:35:01 +05:30
Diego Najar
76da5e9aa2 TinyMCE default plugins and toolbar 2019-05-18 14:04:23 +02:00
Diego Najar
77e85e70b9 3.9.0-beta1 2019-05-18 12:39:06 +02:00
Diego Najar
99cdf11632 add suffix beta 2019-05-18 11:57:04 +02:00
Diego Najar
4c095f9ffc UI improved and new icons set 2019-05-18 11:54:39 +02:00
Diego Najar
a4fc00aa63 search function improved 2019-05-18 11:52:30 +02:00
Diego Najar
1d5b686619 prevent ERR_TOO_MANY_REDIRECTS 2019-05-17 20:28:48 +02:00
Diego Najar
93e6b2a622 remove open iconic fonts 2019-05-17 19:51:39 +02:00
Diego Najar
9ed95e2918 Search pages via the title 2019-05-17 19:49:35 +02:00
Diego Najar
fc2387bcb9 New role Author 2019-05-13 18:26:35 +02:00
Diego Najar
3d87b6597d Editor role now only can edit his own content 2019-05-12 14:50:54 +02:00
Diego Najar
b35efdcf2f Update metadata for plugins and themes for the next release 2019-05-12 14:39:22 +02:00
Diego Najar
b552944ad7 TinyMCE 5.0.5 2019-05-12 14:37:46 +02:00
Diego Najar
05a17e9122 Editor role now only can edit his own content 2019-05-12 14:31:33 +02:00
Diego Najar
10ba5625da Get categories via the API 2019-05-12 12:32:12 +02:00
Diego Najar
801c2ba9e9 Edit setting trough the API 2019-05-12 11:50:08 +02:00
Diego Najar
749cf37fa8 filter by enabled and disabled plugin, and search function 2019-05-11 20:32:46 +02:00
Diego Najar
ec7769251b get parent type for the child 2019-05-10 20:03:05 +02:00
Diego Najar
1f1cd4e3ec rename filename to keep clean 2019-05-10 20:02:24 +02:00
Diego Najar
4e0d00c9ca Content managment improves in small devices 2019-05-10 15:08:02 +02:00
Diego Najar
0dff931595 Content managment improves in small devices 2019-05-10 15:07:51 +02:00
Diego Najar
9962b0ba48 Remove site logo button and improve in UI 2019-05-10 11:35:46 +02:00
Diego Najar
18778226eb Autosave and preview improves 2019-05-10 11:35:23 +02:00
Diego Najar
de2cfeb66e styled changed 2019-05-09 19:32:30 +02:00
Diego Najar
38092a051c Autosave and preview function migrated to fetch function 2019-05-09 19:31:55 +02:00
Diego Najar
b32bc1e054 upload max filesize for javascript 2019-05-09 17:22:04 +02:00
Diego Najar
7c1db136b1 removed the callback if false 2019-05-09 17:21:32 +02:00
Diego Najar
07df697618 page preview via token 2019-05-09 17:20:35 +02:00
Diego Najar
9d436f8a76 variable with installed plugins 2019-05-09 17:19:56 +02:00
Diego Najar
1419483708 changed color 2019-05-09 17:19:18 +02:00
Diego Najar
03835e8b04 Merge branch 'master' of github.com:dignajar/bludit 2019-05-09 17:18:37 +02:00
Diego Najar
7ca3c85645 change variable for constant 2019-05-09 17:18:26 +02:00
Diego Najar
d2f6ea7b8d
Merge pull request #1021 from erdifr/patch-1
Update navbar.php
2019-04-28 21:00:54 +02:00
Diego Najar
3066c091d2 Feature page preview and switch button for publish and draft 2019-04-27 20:30:57 +02:00
erdifr
6403421769
Update navbar.php
Add ```Logout``` link to ```navbar.php```.
2019-04-27 13:20:23 -04:00
Diego Najar
3fa5a420c2 UI improves 2019-04-24 00:11:36 +02:00
Diego Najar
dc8320d46f new icons line-awesome 2019-04-23 23:26:34 +02:00
Diego Najar
a526e71cd2 Create symlink with the page name for images directory 2019-04-23 23:26:02 +02:00
Diego Najar
aa17de9665 new icons line-awesome 2019-04-23 23:23:35 +02:00
Diego Najar
be088e4704 moving bootstrap changes to a separated css file 2019-04-23 23:22:17 +02:00
Diego Najar
3c71e7ee60 Upload images via API improves 2019-04-23 23:21:43 +02:00
Diego Najar
8d06d47318 new function to convert human readable mememory to bytes 2019-04-23 23:17:27 +02:00
Diego Najar
20b672cd09 Move variables to constasts 2019-04-23 23:13:02 +02:00
Diego Najar
f978de490f Improves in AJAX functions 2019-04-23 23:12:38 +02:00
Diego Najar
c0bf0f6583 UI Improve when create new/edit content 2019-04-23 23:10:46 +02:00
Diego Najar
8aeceff207 TinyMCE 5 2019-04-23 19:05:23 +02:00
Edi
a6137fbb8f
Update theme.class.php 2019-04-19 00:55:34 +02:00
Edi
ff6504172a Add files via upload 2019-04-19 00:52:24 +02:00
Edi
76265608b3 Add files via upload 2019-04-19 00:51:45 +02:00
Diego Najar
db70a147f3 Merge branch 'master' of github.com:dignajar/bludit 2019-04-07 20:43:52 +02:00
Diego Najar
8ab9af8bb2 Improve for upload image, new method for filesystem class 2019-04-07 20:43:42 +02:00
Diego Najar
82dabaf925
Merge pull request #1015 from anaggh/master
Update parsedown 1.7.1 -> 1.7.3
2019-04-03 16:22:18 +02:00
Anaggh S
99bcc33b38 Update parsedown 1.7.1 -> 1.7.3 2019-04-03 19:35:50 +05:30
Diego Najar
27917f3f6e
Merge pull request #1012 from erdifr/patch-1
RSS plugin.php update
2019-04-03 12:55:17 +02:00
Diego Najar
8dba57f23d
Merge pull request #1003 from SamBrishes/master
Create de_AT.json
2019-04-01 21:03:32 +02:00
Edi
26586cc268
Update ro_RO.json 2019-04-01 18:02:42 +02:00
erdifr
ba525a3366
RSS plugin.php update
Added static and sticky pages to Bludit RSS plugin.php
2019-04-01 08:38:26 -04:00
SamBrishes
07dbde6f36 Update de_AT.json 2019-03-31 16:17:57 +02:00
Diego Najar
30a4354207
Merge pull request #1010 from pytesNET/master
Enable adminSidebar() also for Editors
2019-03-29 14:47:40 +01:00
SamBrishes
2ef0c95cae Update sidebar.php 2019-03-28 21:37:50 +01:00
Diego Najar
2f63e920b0 Upload image from API 2019-03-27 22:33:23 +01:00
SamBrishes
940e0783d7 Create de_AT.json 2019-03-22 17:40:57 +01:00
Diego Najar
32382dce22
Merge pull request #1001 from Fastbyte01/master
Italian translations
2019-03-22 09:48:05 +01:00
Giuseppe Pignataro
546c525b23 Added italian translation 2019-03-21 18:02:32 +01:00
Giuseppe Pignataro
3d56d85a89 Updated Italian translations 2019-03-21 17:49:11 +01:00
Diego Najar
22393dee13
Merge pull request #997 from Fastbyte01/master
Updated Italian translation
2019-03-21 17:05:28 +01:00
Giuseppe Pignataro
3ad63a1d9e Updated Italian translation 2019-03-21 14:46:19 +01:00
Diego Najar
2d535ad612 check extension and path traversal 2019-03-10 18:28:29 +01:00
Diego Najar
d0843a4070 check extension and path traversal 2019-03-10 18:27:24 +01:00
Diego Najar
3ab8c4c0a6 Enable or disable Markdown parser for #980 2019-03-09 18:53:03 +01:00
Diego Najar
185ae09393 allow differents types of pages to the tag database 2019-03-07 21:27:34 +01:00
Diego Najar
1295d219ab Move images to bl-kernel folder #981 2019-03-07 16:13:47 +01:00
Diego Najar
b529b8da9c remove gris 2019-03-07 16:11:38 +01:00
Diego Najar
98acc58597
Merge pull request #969 from anaggh/master
Update bootstrap to v4.3.1
2019-03-02 19:46:32 +01:00
Diego Najar
5e5957cca1 removed magic_quotes_gpc :D 2019-02-28 20:01:11 +01:00
Diego Najar
2b542e58d0 php supported 5.6 or higher 2019-02-28 19:59:18 +01:00
Diego Najar
e548d75e3e comments, bug fixes for buildpages by tags 2019-02-28 19:55:06 +01:00
Diego Najar
c16741808f include sticky in sitemap #972 2019-02-28 19:51:30 +01:00
Diego Najar
54868df652 include sticky and static pages to the categories 2019-02-28 19:44:46 +01:00
Diego Najar
bdf585b8db search plugin support static and sticky pages #952 2019-02-28 19:43:42 +01:00
Diego Najar
3343d61984 language updated 2019-02-28 19:42:41 +01:00
Diego Najar
c72f936017 changed metadata for 3.8.1 2019-02-28 15:59:59 +01:00
Diego Najar
c14e86f96f bug fix, prevent lost tags 2019-02-28 15:32:08 +01:00
Diego Najar
89b4c5fc92 include tags in json function 2019-02-26 00:48:19 +01:00
Diego Najar
820b1c7207 include tags in json function 2019-02-26 00:47:34 +01:00
Diego Najar
86fa5bd2b3 filter tagg 2019-02-25 16:33:29 +01:00
Diego Najar
5297354e3b Merge branch 'master' of github.com:dignajar/bludit 2019-02-25 16:33:11 +01:00
Diego Najar
ee31f42424 Method for get the token 2019-02-25 16:32:47 +01:00
Diego Najar
75ec5f32f3 include slug for the API 2019-02-25 16:32:29 +01:00
Diego Najar
6b1020f0c4 check if autosave exists 2019-02-25 16:32:00 +01:00
Edi
300e0a27d6
Update de_DE.json 2019-02-25 12:34:04 +01:00
Edi
2adc555846
Update de_CH.json 2019-02-25 12:33:35 +01:00
Edi
fc56f55a13
Create fa_IR.json 2019-02-25 12:20:39 +01:00
Edi
a9e9c6934a
Create fa_IR.json 2019-02-25 12:19:10 +01:00
Edi
b5af783845
Create fa_IR.json 2019-02-25 12:18:08 +01:00
Edi
d8c4a72a33
Create fa_IR.json 2019-02-25 12:17:11 +01:00
Edi
142635c9be
Create fa_IR.json 2019-02-25 12:16:04 +01:00
Edi
72156aa72c
Create fa_IR.json 2019-02-25 12:14:24 +01:00
Edi
08be96e504
Create fa_IR.json 2019-02-25 12:13:21 +01:00
Edi
fddd4ec921
Create fa_IR.json 2019-02-25 12:12:10 +01:00
Edi
a23221cce8
Create fa_IR.json 2019-02-25 12:10:26 +01:00
Edi
41c0bb062c
Create fa_IR.json 2019-02-25 12:09:24 +01:00
Edi
133f072266
Create fa_IR.json 2019-02-25 12:08:20 +01:00
Edi
a2b326f6bc
Create fa_IR.json 2019-02-25 12:07:20 +01:00
Edi
3ee994e77d
Create fa_IR.json 2019-02-25 12:06:24 +01:00
Edi
d21c393270
Create fa_IR.json 2019-02-25 12:05:11 +01:00
Diego Najar
f59f55f5d4 Merge branch 'master' of github.com:dignajar/bludit 2019-02-24 16:42:48 +01:00
Diego Najar
0f867720a5 Prevent content to be empty if not passed as argument 2019-02-24 16:38:18 +01:00
Edi
b21b12abb6
Create fa_IR.json 2019-02-24 14:43:22 +01:00
Edi
9ffec02bb2
Create fa_IR.json 2019-02-24 14:42:31 +01:00
Edi
a7bb4abc95
Create fa_IR.json 2019-02-24 14:41:19 +01:00
Edi
c279e10453
Create fa_IR.json 2019-02-24 14:40:14 +01:00
Edi
f030d5bd52
Create fa_IR.json 2019-02-24 14:39:16 +01:00
Edi
e35e91cbd9
Create fa_IR.json 2019-02-24 14:38:14 +01:00
Edi
7202359b42
Create fa_IR.json 2019-02-24 13:45:55 +01:00
Edi
949bd9832f
Create fa_IR.json 2019-02-24 13:47:24 +01:00
Edi
5102832a25
Create fa_IR.json 2019-02-24 13:42:55 +01:00
Edi
878207abfa
Create fa_IR.json 2019-02-24 13:41:45 +01:00
Edi
36c64875b3
Create fa_IR.json 2019-02-24 13:40:14 +01:00
Edi
a9bfd931bd
Create fa_IR.json 2019-02-24 13:39:14 +01:00
Edi
e455020956
Update fa_IR.json 2019-02-24 13:37:06 +01:00
Anaggh S
c8af1c1d4d Update bootstrap to v4.3.1 2019-02-24 15:19:23 +05:30
Diego Najar
60f1b37441 comment rewritebase 2019-02-23 11:20:37 +01:00
Diego Najar
c3425d2406 new sponsors 2019-02-22 18:56:40 +01:00
Diego Najar
ef9a99f4b1 metadata for 3.8.0 2019-02-22 18:53:48 +01:00
Diego Najar
f2e12e6821 bug fix for #961 2019-02-22 18:42:27 +01:00
Diego Najar
3500813695 Bug fix for #962 2019-02-22 18:34:51 +01:00
Diego Najar
3fc2c2bb74 bug fix for #959 2019-02-22 18:26:42 +01:00
Diego Najar
ff5df92944 remove a few lines not used 2019-02-22 16:43:00 +01:00
Diego Najar
ea81099b59 remove grizzly 2019-02-22 16:36:56 +01:00
Diego Najar
dea1e09b30 remove grizzly 2019-02-22 16:35:45 +01:00
Diego Najar
c98864733a bug fix for #965 2019-02-22 14:25:40 +01:00
Diego Najar
c39922d95d new page and draft 2019-02-20 23:13:59 +01:00
Diego Najar
a5180135f6 API Improve and Pages class 2019-02-20 08:45:55 +01:00
Diego Najar
3058904fd2 API improves 2019-02-19 08:38:17 +01:00
Diego Najar
4365147a40
Merge pull request #956 from ltGuillaume/patch-1
Use comma for imploding robots meta tag
2019-02-13 22:54:02 +01:00
Guillaume
59a6440fd8
Use comma for implode robots meta tag
According to http://www.robotstxt.org/meta.html and https://www.webmasterworld.com/forum93/669.htm using only a space between the values probably isn't the proper syntax and could ignore all values (perhaps that explains why Google ignored my `noindex nofollow noarchive`).
2019-02-13 16:28:22 +01:00
Diego Najar
29bc6c1ef7
Merge pull request #954 from hide-me/patch-7
upd ru lang
2019-02-12 10:22:46 +01:00
hide-me
ad96ae579d
upd ru lang 2019-02-12 12:17:12 +03:00
Diego Najar
e82b8c4e70
Merge pull request #953 from ltGuillaume/patch-1
Add lastBuildDate to RSS feed xml
2019-02-12 09:47:33 +01:00
Guillaume
b9e5161177
Add lastBuildDate to RSS feed xml 2019-02-12 08:13:18 +01:00
Diego Najar
721099aa4f grizzly admin theme 2019-02-08 08:53:56 +01:00
Diego Najar
efacadf46c Merge branch 'master' of github.com:dignajar/bludit 2019-02-08 08:53:37 +01:00
Diego Najar
78cacae128 Bug fixes for API plugin 2019-02-08 08:53:26 +01:00
Diego Najar
58639f40be
Merge pull request #942 from ltGuillaume/patch-3
Button layout consistent with Contents
2019-02-07 20:36:17 +01:00
Diego Najar
d81925d706
Merge pull request #951 from ali-demirtas/patch-22
Update tr_TR.json
2019-02-07 20:35:27 +01:00
Diego Najar
8376906d9c
Merge pull request #950 from ltGuillaume/patch-1
Dutch
2019-02-07 19:58:35 +01:00
Ali Demirtas
db3db63f35
Update tr_TR.json
Updated.
2019-02-06 11:33:32 +03:00
Guillaume
1b20c10513
Update nl_NL.json 2019-02-06 08:37:18 +01:00
Guillaume
d5e3e110f8
Dutch 2019-02-04 22:14:40 +01:00
Diego Najar
56eb4a3a93 remove Blocks classes 2019-02-03 20:05:32 +01:00
Diego Najar
19d9493c83 Enable TinyMCE allow all elements 2019-02-03 14:34:21 +01:00
Diego Najar
8b0ff80efb define function if the editor is not enabled 2019-02-03 14:29:37 +01:00
Diego Najar
d847b58907 New words in dictionaries 2019-02-02 19:45:23 +01:00
Edi
c861aa35f4
Merge pull request #948 from MoritzBrueckner/lang_de
de lang: small fixes and more translations
2019-02-02 17:52:18 +01:00
Moritz Brückner
df02325251 de-CH lang: small fix 2019-02-02 16:30:03 +01:00
Moritz Brückner
ed7eb6186b Lang de: add translations for new media upload alerts 2019-02-02 16:28:46 +01:00
Diego Najar
d43fa9e4b4
Merge pull request #944 from ltGuillaume/patch-4
Dutch for all plugins and themes
2019-02-02 16:26:37 +01:00
Diego Najar
2643c9ff1f comments 2019-02-02 16:16:13 +01:00
Diego Najar
75ac3c3400 Button plus with color, more cool 2019-02-02 16:15:46 +01:00
Diego Najar
43923882cd Button plus with color, more cool 2019-02-02 16:15:01 +01:00
Diego Najar
785965db35 Pages with differents dates after installation 2019-02-02 16:14:00 +01:00
Diego Najar
088179f1fb Media manager improves, alert when the file type is not supported and maximum load file 2019-02-02 16:11:36 +01:00
Moritz Brückner
306a12fe56 DE lang authors: user rename 2019-02-01 21:50:38 +01:00
Moritz Brückner
0d73c039f2 DE lang: small grammar fix 2019-02-01 21:50:00 +01:00
Moritz Brückner
24230fb099 Add some more german translations 2019-02-01 21:49:12 +01:00
Diego Najar
7335196208
Update index.php 2019-02-01 18:00:45 +01:00
Diego Najar
7442afd59c
Update head.php 2019-02-01 17:59:39 +01:00
Diego Najar
de99190341
Change tag and include generator tag 2019-02-01 17:59:15 +01:00
Diego Najar
e1f32f3462
Include header X-Powered-By 2019-02-01 17:58:12 +01:00
Diego Najar
9689d5a63a Merge branch 'master' of github.com:dignajar/bludit 2019-01-31 20:08:14 +01:00
Diego Najar
ec7e0aaf4c Ajax response improves 2019-01-31 20:07:59 +01:00
Diego Najar
4ba410d742
Merge pull request #945 from hide-me/patch-6
Added ru lang
2019-01-31 10:22:57 +01:00
hide-me
3ac67971cc
Added ru lang 2019-01-31 11:49:54 +03:00
Guillaume
c238dacb20
Dutch for all plugins and themes 2019-01-31 03:05:09 +01:00
Guillaume
d5695da0b1
Proper Dutch 2019-01-31 00:34:57 +01:00
Diego Najar
79095de5ca returns empty list if there are not images 2019-01-30 23:27:19 +01:00
Guillaume
293209447b
Consistent button layout with Contents 2019-01-30 23:22:02 +01:00
Diego Najar
8f7ee3fec1 Improves in Media manager and Ajax responses 2019-01-30 23:15:36 +01:00
Diego Najar
eb31e298da Bug fix to prevent jQuery add extra code 2019-01-30 17:53:10 +01:00
Edi
376a7c6909
Create de_DE.json 2019-01-28 23:04:24 +01:00
Edi
565c933be0
Create de_CH.json 2019-01-28 23:04:05 +01:00
Edi
57c36a47b4
Create de_DE.json 2019-01-28 22:53:01 +01:00
Edi
0a8b154795
Create de_CH.json 2019-01-28 22:52:40 +01:00
Diego Najar
36f26aad35
Merge pull request #937 from ltGuillaume/patch-3
Autofocus username field on login
2019-01-28 22:23:10 +01:00
Diego Najar
6db9c59dd5 change metadata for Bludit v3.7.1 2019-01-28 22:20:15 +01:00
Diego Najar
7a2a8e85d6 Remove alert about complete fields after POST method 2019-01-28 22:12:33 +01:00
Diego Najar
8fc358a168 Canonical plugin activated by default 2019-01-28 22:11:59 +01:00
Diego Najar
bf061d6fff Bug fix when select the type of the page 2019-01-28 20:30:52 +01:00
Diego Najar
0a7d63c512 Delete button in small devices 2019-01-28 20:30:18 +01:00
Edi
060dc2fd29
Fix of wrong label 2019-01-27 23:14:56 +01:00
Guillaume
1dae01c021
Autofocus username field on login 2019-01-27 18:07:38 +01:00
Diego Najar
1255cddf7d Changes in metadata for Bludit v3.7.0 2019-01-27 13:38:53 +01:00
Diego Najar
629f43350c Search plugin, Event when key ENTER is press 2019-01-27 13:36:39 +01:00
Diego Najar
03e035cb98 Remote content try webhook button 2019-01-27 12:46:34 +01:00
Diego Najar
0eacad9a95
Merge pull request #930 from ali-demirtas/patch-21
Create tr_TR.js
2019-01-26 18:32:07 +01:00
Ali Demirtas
09e48db992
Create tr_TR.js
Turkish language file added.
2019-01-26 19:25:48 +03:00
Diego Najar
a1a7a7fd38 Migrate private variables to protected to allow to extend classes 2019-01-26 12:50:48 +01:00
Diego Najar
8ff877bf37 Removed Write role from the role list 2019-01-26 12:36:42 +01:00
Diego Najar
307516579d Merge branch 'master' of github.com:dignajar/bludit 2019-01-26 11:14:07 +01:00
Diego Najar
c13b8f903e Bug fix for #921 2019-01-26 11:13:53 +01:00
Diego Najar
4770184521
Merge pull request #924 from ltGuillaume/master
Dutch for TinyMCE
2019-01-26 10:57:56 +01:00
Diego Najar
f9f556e639 TinyMCE bug fix on CSS #923 2019-01-26 10:34:48 +01:00
Guillaume
b2c22426e4
Add files via upload 2019-01-25 23:16:15 +01:00
Guillaume
8233163ddd
Add files via upload 2019-01-25 23:14:11 +01:00
Diego Najar
1dc3f067dc include languages files 2019-01-25 16:26:55 +01:00
Diego Najar
0a1a97893f Plugin HTML Code added support for admin area 2019-01-25 16:26:34 +01:00
Diego Najar
4091b7de11 Merge branch 'master' of github.com:dignajar/bludit 2019-01-25 16:25:51 +01:00
Diego Najar
06cf589021 Disqus plugin improves 2019-01-25 16:25:41 +01:00
Diego Najar
9b6b9e2ad9
Merge pull request #922 from ltGuillaume/patch-1
Update nl_NL.json
2019-01-25 12:00:41 +01:00
Guillaume
0b193b3fe6
Update nl_NL.json 2019-01-25 05:19:36 +01:00
Guillaume
1c09fc29a7
Update nl_NL.json 2019-01-25 04:54:30 +01:00
Guillaume
6f4b677e69
Update nl_NL.json 2019-01-25 04:49:17 +01:00
Guillaume
7a6ac85a4a
Update nl_NL.json 2019-01-25 04:48:34 +01:00
Guillaume
e1123cb72b
Update nl_NL.json 2019-01-25 03:52:32 +01:00
Guillaume
2f03407626
Update nl_NL.json 2019-01-25 03:49:26 +01:00
Guillaume
38fe91c6af
Update nl_NL.json 2019-01-25 03:43:07 +01:00
Diego Najar
df9d09e810 Merge branch 'master' of github.com:dignajar/bludit 2019-01-19 21:05:47 +01:00
Diego Najar
8b17ba7a09 Canonical URL 2019-01-19 21:05:38 +01:00
Diego Najar
90e770ee9c
Merge pull request #918 from anaggh/master
Remove unused deprecated Crypt class
2019-01-19 21:05:09 +01:00
Diego Najar
fd29f1ce11 Navbar doesn't appear in some resolution screens 2019-01-19 21:03:49 +01:00
Anaggh S
dd8e13f904 Remove unused deprecated Crypt class 2019-01-19 18:56:52 +05:30
Diego Najar
b430dd1cfe comment line from .htaccess 2019-01-16 13:04:37 +01:00
Diego Najar
c0d3b86355 Bludit v3.6.1 labels updated 2019-01-16 13:03:45 +01:00
Diego Najar
36cd6886d4 removed Google plus and include Youtube channel 2019-01-16 13:00:34 +01:00
Diego Najar
1fa3e28183 Fix for switch button 2019-01-16 12:47:38 +01:00
Diego Najar
346d573197 bludit v3.6 2019-01-15 19:53:04 +01:00
Diego Najar
2c08ce5535 site logo with the sitename 2019-01-15 19:42:15 +01:00
Diego Najar
cb92db72e9 blockquote style 2019-01-15 19:31:24 +01:00
Diego Najar
5648e8313c select page not found 2019-01-15 19:30:35 +01:00
Diego Najar
2bbf79cde9 remove quotes from filename after uploaded a image 2019-01-11 17:43:37 +01:00
Diego Najar
ba800b9bd4 Merge branch 'master' of github.com:dignajar/bludit 2019-01-08 18:23:14 +01:00
Diego Najar
640dd1560e change from trace to info 2019-01-08 18:23:02 +01:00
Diego Najar
fb6b0e5611
Merge pull request #904 from anaggh/patch-1
Remove deprecated track_errors
2019-01-05 14:52:46 +01:00
anaggh
0bf63ed78b
Remove deprecated track_errors 2019-01-05 00:18:07 +05:30
Diego Najar
7ae0a559a3 include language when install a theme 2019-01-04 14:21:15 +01:00
Diego Najar
3564ab1d8f comments and minor fixes 2019-01-04 14:19:51 +01:00
Diego Najar
bd559904ec switch for publish and draft 2019-01-04 14:18:40 +01:00
Diego Najar
6560816099 tinymce 4.9.2 2019-01-03 18:25:53 +01:00
Diego Najar
a1f6e698f2
Merge pull request #900 from pytesNET/master
Fix for Issue #897
2018-12-31 11:10:39 +01:00
SamBrishes
b69ba4512c Remove EOF Whitespace 2018-12-31 10:35:27 +01:00
SamBrishes
3157f125a7
Merge pull request #1 from bludit/master
Merge pull request #899 from pytesNET/master
2018-12-31 10:34:14 +01:00
SamBrishes
d1d8180e39 Fix for Issue #897 2018-12-31 10:31:51 +01:00
Diego Najar
bec7336044
Merge pull request #899 from pytesNET/master
Remove Static Declarations
2018-12-31 09:02:58 +01:00
SamBrishes
445287f04c Remove Static Declarations
Fix for #889
2018-12-30 21:32:26 +01:00
Diego Najar
9ba78e0776 Show Scheduled alert and fix date in scheduled tab 2018-12-30 13:35:31 +01:00
Diego Najar
9eb5d583b6 trace mode for debug 2018-12-26 20:43:20 +01:00
Diego Najar
52587968ca bootstrap 4.2.1 2018-12-26 19:58:27 +01:00
Diego Najar
be5a8ad517 redirect /blog to /blog/ 2018-12-26 19:17:30 +01:00
Diego Najar
74b68e507a Site logo implementation 2018-12-21 20:16:00 +01:00
Diego Najar
7e6a5cd28c Site logo implementation 2018-12-21 19:50:18 +01:00
Diego Najar
a9372ccce3 Site logo implementation 2018-12-21 19:45:53 +01:00
Diego Najar
2eea4cd3ba improves for Blocks 2018-12-17 22:13:15 +01:00
Diego Najar
f58c4d7f69 site logo 2018-12-17 22:12:56 +01:00
Diego Najar
adaa98e1be Blocks for themes 2018-12-13 14:05:26 +01:00
Diego Najar
8624f32e15 Blocks for themes 2018-12-13 14:05:07 +01:00
Diego Najar
e95a4808e6 Merge branch 'master' of github.com:dignajar/bludit 2018-12-13 14:03:04 +01:00
Diego Najar
e7412d0534 Blocks for themes 2018-12-12 18:18:48 +01:00
Edi
2aa5bea756
Merge pull request #883 from Momel15/fix_lang_de
de_DE.json and de_CH.json: Fix typo
2018-12-08 23:56:01 +01:00
Momel
02beb3de11 DE lang: Fix typo in "Developers" 2018-12-08 19:04:27 +01:00
Diego Najar
8400d7eaba Merge branch 'master' of github.com:dignajar/bludit 2018-12-08 11:50:08 +01:00
Diego Najar
bae332c794 Bug fix, the user lost the role when click on remember me 2018-12-08 11:49:55 +01:00
Diego Najar
7fba1f42cb
Merge pull request #882 from hide-me/patch-5
Updated new strings
2018-12-08 11:36:38 +01:00
hide-me
78bffdd037
Updated new strings 2018-12-08 10:02:56 +03:00
Diego Najar
1c2d2a6d99
Merge pull request #877 from ali-demirtas/patch-20
Update tr_TR.json
2018-12-04 15:17:22 +01:00
Diego Najar
7dc32a6b1b
Merge pull request #880 from davede-git/master
polish language update
2018-12-04 15:17:08 +01:00
Dave
2d90b91027
Merge branch 'master' into master 2018-12-03 21:31:15 +01:00
Dave
7db7051180
polish language update 2018-12-03 21:27:40 +01:00
Ali Demirtas
6d14969a62
Update tr_TR.json
Updated.
2018-12-02 15:28:04 +03:00
Diego Najar
14c893bb77 Bludit v3.5 2018-12-01 18:20:12 +01:00
Diego Najar
40ea8c1fd1
Merge pull request #876 from hide-me/patch-4
Updated Ukrainian lang
2018-11-30 18:55:54 +01:00
Diego Najar
8e2b15143b
Merge pull request #875 from hide-me/patch-3
Updated Russian language
2018-11-30 18:55:23 +01:00
hide-me
b702c30a62
Updated ua lang
I'm not a native speaker, but can write and talk on Ukrainian language so so. Guess, I was totally correct!
2018-11-30 20:22:37 +03:00
hide-me
b509a2ed71
Updated, translated! 2018-11-30 19:45:08 +03:00
Diego Najar
21661f0b83 Bludit v3.5 IPA 2018-11-29 19:27:17 +01:00
Diego Najar
37cc2d182f UI Dialogs improves 2018-11-29 18:54:29 +01:00
Diego Najar
27fe6081cb Open graph with Facebook APP ID and bug fixes 2018-11-28 22:10:41 +01:00
Diego Najar
484d4f0116 UI Dialogs improves 2018-11-28 22:03:43 +01:00
Diego Najar
8afd49b8c9 UI Dialogs improves 2018-11-28 22:01:55 +01:00
Diego Najar
075fb44006 Min lenght to search 3 chars 2018-11-28 20:20:04 +01:00
Edi
2ba4edc008
Update de_DE.json 2018-11-28 13:20:36 +01:00
Edi
f3c6f3bb0d
Update de_CH.json 2018-11-28 13:20:00 +01:00
Edi
09680f2836
Update de_CH.json 2018-11-28 13:19:06 +01:00
Diego Najar
e31ca26ecd New words in dictionaries 2018-11-27 20:58:47 +01:00
Diego Najar
92c0963925 Merge branch 'master' of github.com:dignajar/bludit 2018-11-27 20:48:27 +01:00
Diego Najar
82b51ef74d Search plugin improves 2018-11-27 20:48:19 +01:00
Edi
0a329d88b3
Update de_DE.json 2018-11-27 10:44:42 +01:00
Edi
296fb38335
Update de_CH.json 2018-11-27 10:43:59 +01:00
Edi
00a1b59592
Update de_CH.json 2018-11-27 10:43:40 +01:00
Diego Najar
6490bb0dc1
Merge pull request #871 from hide-me/patch-2
Translated new strings
2018-11-25 18:48:03 +01:00
hide-me
9386f4d5a4
Translated new strings
Well, let me know, if you will add new strings. Ok?
2018-11-25 20:22:13 +03:00
Diego Najar
19a747227d Bludit v3.5-beta-1 2018-11-25 17:54:26 +01:00
Diego Najar
41f4658bce Thumbnail parameters defined by the user. #867 2018-11-25 17:52:22 +01:00
Diego Najar
728484084f Valid rss date format 2018-11-25 17:46:17 +01:00
Diego Najar
d8a7f45b40 Merge branch 'master' of github.com:dignajar/bludit 2018-11-25 17:45:21 +01:00
Diego Najar
921916162a Tinymce 4.8.5 2018-11-25 17:42:54 +01:00
Diego Najar
b167959fd1
Merge pull request #870 from ali-demirtas/patch-19
Update tr_TR.json
2018-11-24 14:13:59 -03:00
Ali Demirtas
b131204c8e
Update tr_TR.json
Language file uptated.
2018-11-24 13:04:12 +03:00
Diego Najar
5eb48f9060 Delete page images, fix for #869 2018-11-23 20:15:50 +01:00
Diego Najar
8e528ca701 Merge branch 'master' of github.com:dignajar/bludit 2018-11-23 20:09:49 +01:00
Diego Najar
eb3cf641ad Show message when the content is null 2018-11-23 20:09:21 +01:00
Edi
0e80b211c7
Update de_DE.json 2018-11-21 23:02:15 +01:00
Edi
bde7a4093a
Update de_CH.json 2018-11-21 23:01:27 +01:00
Edi
4c6fb66675
Update de_CH.json 2018-11-21 23:00:27 +01:00
Diego Najar
45d725c909 Bug fix for #868, allow upload file extension with upper case letters 2018-11-21 18:48:34 -03:00
Diego Najar
ccfb02c0ac Updated languages dictionaries and fixes for spanish dictionary 2018-11-21 18:31:51 -03:00
Edi
cb908df827
Update de_DE.json 2018-11-19 23:02:38 +01:00
Edi
dbddbcb36f
Update de_CH.json 2018-11-19 23:01:33 +01:00
Edi
a7c6696eb8
Update de_DE.json 2018-11-19 09:29:23 +01:00
Edi
4ed8727df4
Update de_CH.json 2018-11-19 09:28:49 +01:00
Edi
a1be74e9ac
Create de_DE.json 2018-11-19 09:16:48 +01:00
Edi
c030f709da
Create de_CH.json 2018-11-19 09:16:31 +01:00
Diego Najar
07d7ec6a7b
Merge pull request #863 from hide-me/master
I also extend, recheck and finish all translation in plugins and themes.
2018-11-18 12:42:05 -03:00
hide-me
332ff357d3
Fix info 2018-11-18 14:19:42 +03:00
hide-me
b09f9e0968
Fixed capital letter 2018-11-18 14:18:21 +03:00
hide-me
04c8282c48
Grammar fix 2018-11-18 14:16:00 +03:00
hide-me
8f46db8616
Added ru.json 2018-11-18 14:14:59 +03:00
hide-me
c8c19dda27
Grammar fix 2018-11-18 14:13:43 +03:00
hide-me
181d39de93
Grammar fix 2018-11-18 14:12:12 +03:00
hide-me
facaa4bb61
Added ru.json 2018-11-18 14:07:34 +03:00
hide-me
372762c336
Fixed 2018-11-18 14:07:08 +03:00
hide-me
f0ab33a1a9
Added ru.json 2018-11-18 14:06:11 +03:00
hide-me
d8ce03999a
Added ru.json 2018-11-18 14:05:34 +03:00
hide-me
510caa94ec
Added ru.json 2018-11-18 14:04:25 +03:00
hide-me
991d0704b2
Extended 2018-11-18 14:03:46 +03:00
hide-me
2121cf8641
Added ru.json 2018-11-18 13:58:41 +03:00
hide-me
6d47281e0c
Added ru.json 2018-11-18 13:57:17 +03:00
hide-me
e705f6a172
Added ru.json 2018-11-18 13:53:40 +03:00
hide-me
4a1d932062
Fixed mistakes 2018-11-18 13:51:17 +03:00
hide-me
d47c46ef00
Fix gramatical error 2018-11-18 13:50:09 +03:00
hide-me
14ace1ca1b
Added ru lang 2018-11-18 13:47:32 +03:00
hide-me
66b2a856d0
Added ru_RU.json 2018-11-18 13:45:32 +03:00
hide-me
39c1cafb9a
Added ru_RU.json 2018-11-18 13:44:56 +03:00
Diego Najar
f8b6a0f6d9
Merge pull request #857 from hide-me/patch-1
Update ru lang
2018-11-17 12:59:49 -03:00
hide-me
cf66deb651
Update ru lang
Added some strings of translation. 
Fixed many grammatical errors. The concept of "content" has been replaced by a more organic and simple word for a Russian person.
Also I deleted non existed site by first translator, and add info about me.
2018-11-15 11:06:44 +03:00
Diego Najar
370604da0c Prevent cache 2018-11-12 13:55:38 -03:00
Diego Najar
c7cec45039 Alert when the password lenght is less than 6 characters 2018-11-11 20:27:13 -03:00
Diego Najar
026d71e239 tags for a page 2018-11-10 11:24:51 -03:00
Diego Najar
da25701e44 Bludit v3.4 2018-11-10 11:18:57 -03:00
Diego Najar
7df5ee322e Bug fixes, and dictionary updated 2018-11-08 20:59:06 -03:00
Diego Najar
91782166fb New words 2018-11-07 11:43:51 -03:00
Diego Najar
b2f79c2030 bludit v3.4 beta 2018-11-07 11:42:14 -03:00
Diego Najar
2117e71578 Improve in UI, Bug fixes uploading profile pictures 2018-11-07 11:40:22 -03:00
Diego Najar
a4edabcac5 removed auto friendly url generator 2018-11-05 23:59:28 -03:00
Diego Najar
59346bcc12 Edit password, improve in UI 2018-11-05 23:57:52 -03:00
Diego Najar
d531358810 Settings, improve in UI 2018-11-05 23:55:17 -03:00
Diego Najar
16e86486ee fix for #841 2018-11-02 18:03:55 -03:00
Diego Najar
d7b63a5bb2 Fix for #842 2018-11-02 11:28:07 -03:00
Diego Najar
3510fa6e30 New UI for edit the user profile 2018-11-01 20:34:42 -03:00
Diego Najar
3b33d20cf6 Bug fixes, the method thumbCoverImage not was returning the filename 2018-11-01 20:27:21 -03:00
Diego Najar
c668d4ace1 Improves in UI when editing a category 2018-11-01 20:25:17 -03:00
Diego Najar
4ba177cf53 Notification when Bludit is updated 2018-11-01 20:24:27 -03:00
Diego Najar
19d81f41a9
Merge pull request #839 from novafacile/patch-2
bugfix label text for admin interface
2018-11-02 00:23:07 +01:00
Diego Najar
e7920de7be bug fixes, Bootstrap class doesnt show the proper label 2018-11-01 20:21:36 -03:00
Diego Najar
2c64a1d232 Merge branch 'master' of github.com:dignajar/bludit 2018-11-01 20:19:27 -03:00
Diego Najar
f8f3a8c5bd Bug fixes, missing button save as draft 2018-11-01 20:19:00 -03:00
novafacile OÜ
ee21315294
bugfix label text for admin interface
On formInputText it didn't show the label name, because of missing quotes and wrong var name
2018-11-01 20:20:04 +01:00
Diego Najar
4efa64ec0c
Merge pull request #834 from davede-git/master
Polish language updated to 3.2 release
2018-10-31 18:01:58 +01:00
Diego Najar
42ea1c2356 bootstrap's helper improves 2018-10-31 17:56:32 +01:00
Diego Najar
47412a651d Include autoheight plugin for Tinymce 2018-10-30 22:40:13 +01:00
Diego Najar
7227b85086 Tinymce 4.8.4 2018-10-30 22:33:02 +01:00
Diego Najar
b3f0c08ab8 css, minor changes for mobile 2018-10-30 22:26:29 +01:00
Diego Najar
03300266f2 Add to sitemap plugin static pages. #837 2018-10-30 22:25:09 +01:00
Diego Najar
2c69c55357 fix for mobiles responsive 2018-10-30 16:19:34 +01:00
Diego Najar
507d89e606 prevent autosave when editing content 2018-10-30 16:17:15 +01:00
Diego Najar
2317100a81 Improve UI when create or edit content 2018-10-30 16:12:44 +01:00
Diego Najar
ccdcba8699 bug fix profile picture 2018-10-29 18:21:42 +01:00
Dave
43dc2f9878
Polish language updated to 3.2 release 2018-10-28 11:42:56 +01:00
Dave
ca26bcc80e
Merge pull request #1 from bludit/master
upd
2018-10-28 11:42:14 +01:00
Diego Najar
859ca4ef52
Merge pull request #832 from xm74/patch-12
Update ru_RU.json
2018-10-27 16:12:47 +02:00
Max Kostikov
996b875814
Update ru_RU.json 2018-10-25 17:26:54 +02:00
Diego Najar
6d3cc0b6f7
Merge pull request #831 from Fred89/master
Franch lang pack update
2018-10-25 10:12:03 +02:00
Fred89
cff23aec76 Update bl-languages/fr_FR.json 2018-10-24 22:54:02 +02:00
Fred89
cc50015c93 Franch lang pack update 2018-10-24 12:48:15 +02:00
Diego Najar
e1fefef693
Merge pull request #830 from ali-demirtas/patch-1
Update tr_TR.json
2018-10-23 23:52:33 +02:00
Diego Najar
24ebc57269
Merge branch 'master' into patch-1 2018-10-23 23:52:27 +02:00
Diego Najar
5c70cb9fa6 bug fix for #813 2018-10-23 23:50:56 +02:00
Diego Najar
2b1e09646b After logout go to login page 2018-10-23 20:25:06 +02:00
Diego Najar
78735f67f2 languages updated, search plugin fix where Am I variable 2018-10-23 20:16:04 +02:00
Diego Najar
a5b7bacfb6 languages updated, search plugin fix where Am I variable 2018-10-23 20:15:10 +02:00
Ali Demirtas
21531f6e63
Update tr_TR.json
Translation updated. Missing strings localized
2018-10-23 20:33:12 +03:00
Diego Najar
99f6c12662
Merge pull request #829 from xm74/patch-11
Russian translation stylistic correction
2018-10-22 20:57:44 +02:00
Max Kostikov
58cd452c2e
Update ru_RU.json 2018-10-22 20:12:21 +02:00
Diego Najar
ce3b22e3b9 autosave only when the content changed 2018-10-21 15:00:15 +02:00
Diego Najar
62bcc0be74 hit counter 2018-10-21 14:46:17 +02:00
Diego Najar
b3cb86cd33
Update .htaccess 2018-10-21 14:21:48 +02:00
Diego Najar
69266d5884 change on languages 2018-10-20 21:37:47 +02:00
Diego Najar
bfabd248ac Changes in metastore for Bludit v3.2 2018-10-20 21:34:04 +02:00
Diego Najar
f39cc831b1 Execute plugins with the hook afterPageCreate after the scheduler 2018-10-20 13:36:13 +02:00
Diego Najar
a07a0fe346 remove comment 2018-10-18 22:48:18 +02:00
Diego Najar
13605eb315 fix for editor and height 100% 2018-10-18 22:40:35 +02:00
Diego Najar
68bea24530 remove quill 2018-10-18 19:44:13 +02:00
Diego Najar
873f5b056a remove quill 2018-10-18 19:43:33 +02:00
Diego Najar
1b5c84fea7 Bug fix, items per pages all content 2018-10-18 19:21:57 +02:00
Diego Najar
2081c74259 Merge branch 'master' of github.com:dignajar/bludit 2018-10-17 22:36:46 +02:00
Diego Najar
8e7a2f93b9 improves in editor area 2018-10-17 22:35:30 +02:00
Diego Najar
1bdcf05e62
Merge pull request #825 from devprodest/master
mini fix
2018-10-15 13:16:14 +02:00
Diego Najar
ebdb0401dd
Merge pull request #824 from devprodest/patch-5
fix very long name user del buttons
2018-10-15 13:15:30 +02:00
Denis Zaikin
f7aff227bf
Update ru_RU.json 2018-10-15 14:05:59 +03:00
Diego Najar
4063d6adeb
Merge pull request #819 from devprodest/patch-1
fix
2018-10-15 12:58:46 +02:00
Denis Zaikin
09a7dc43f1
fix page name 2018-10-15 13:58:45 +03:00
Denis Zaikin
5dbf69035f
fix very long name user del buttons 2018-10-15 13:51:09 +03:00
Denis Zaikin
f6362ce8ee
fix 2018-10-15 13:34:40 +03:00
Edi
67d4532ce6
Update en.json 2018-10-14 12:57:32 +02:00
Edi
dbbc080f07
Update es.json 2018-10-14 12:57:16 +02:00
Edi
53f4cd7328
Update en.json 2018-10-14 12:56:20 +02:00
Edi
783837d294
Create de_DE.json 2018-10-14 12:55:49 +02:00
Edi
732e8b80cd
Create de_CH.json 2018-10-14 12:55:32 +02:00
Edi
891f2542c4
Update plugin.php 2018-10-14 12:54:42 +02:00
Diego Najar
6a3609098f autosave only when the content changed 2018-10-09 18:59:05 +02:00
Diego Najar
c3911d7f29 Merge branch 'master' of github.com:dignajar/bludit 2018-10-09 16:30:26 +02:00
Diego Najar
303ba21240 Tinymce editor styling and toolbar responsive 2018-10-09 16:30:16 +02:00
Edi
5039de7e83
Update de_DE.json 2018-10-08 18:35:54 +02:00
Edi
9ff11d388a
Update de_CH.json 2018-10-08 18:35:07 +02:00
Edi
241d948717
Update de_DE.json 2018-10-08 18:31:01 +02:00
Edi
a6ed9307ad
Update de_CH.json 2018-10-08 18:30:16 +02:00
Diego Najar
5ee5fd5981 bludit v3.1 2018-10-08 18:15:49 +02:00
Diego Najar
5619eaf321 Bludit v3.1 2018-10-08 18:09:02 +02:00
Diego Najar
4360d6c8d9
Merge pull request #815 from novafacile/patch-1
fix quotes in German translations
2018-10-08 14:17:30 +02:00
novafacile OÜ
f4fe39b8b8
fix problem with quotes in description 2018-10-08 02:33:06 +02:00
novafacile OÜ
12ad0ed946
fix problem with quotes in description 2018-10-08 02:32:04 +02:00
Diego Najar
23ea0fe6e4 bug fix when insert image and cover images 2018-10-07 23:11:49 +02:00
Diego Najar
eb81472081 german missing words 2018-10-07 18:38:33 +02:00
Diego Najar
b913fdfd48 change media manager for images 2018-10-07 16:01:47 +02:00
Diego Najar
682dc5788f minor fix for restricted images 2018-10-07 15:54:28 +02:00
Diego Najar
9c07ec4d61 Bludit v3.1 2018-10-07 14:14:16 +02:00
Diego Najar
fbb63123f1 Bludit v3.1 2018-10-07 14:03:58 +02:00
Diego Najar
78b5d83127 fix for #814, IS servers 2018-10-07 13:19:36 +02:00
Diego Najar
0657c55191 domain base 2018-10-06 19:59:12 +02:00
Diego Najar
5ea51bd4da new words added 2018-10-06 19:45:33 +02:00
Diego Najar
7d16e13903 Image per pages, removed convert relative to absolute path, media manager improves 2018-10-06 19:39:34 +02:00
Diego Najar
8221fbb40b remove cover image function, search plugin improvments, add search to theme alternative, tinymce css content 2018-10-03 00:19:19 +02:00
Diego Najar
8f2e1c5fa2 search plugin improves 2018-10-02 00:13:47 +02:00
Diego Najar
657fc6fdda Tinymce 4.8.3, styling in editor area 2018-10-01 21:11:09 +02:00
Diego Najar
c1b2eede30 improves in hello message 2018-10-01 19:05:24 +02:00
Diego Najar
bc268040de Search function improvements 2018-10-01 17:20:41 +02:00
Diego Najar
4837ccb94b welcome message 2018-10-01 17:15:29 +02:00
Diego Najar
b388af6601 Search function improvements 2018-10-01 16:50:04 +02:00
Diego Najar
74687b0e65 search function 2018-10-01 16:34:28 +02:00
Diego Najar
130dbb22e8 Merge branch 'master' of github.com:dignajar/bludit 2018-09-30 13:23:55 +02:00
Diego Najar
3fa6450e0b fix for external cover images and thumbnail 2018-09-29 16:06:09 +02:00
Diego Najar
b4caeb435a
Update plugin.php 2018-09-27 15:46:59 +02:00
Diego Najar
b921662fd8 fix in installer 2018-09-26 17:55:19 +02:00
Diego Najar
9d5fe7cd08 Merge branch 'master' of github.com:dignajar/bludit 2018-09-23 13:38:24 +02:00
Diego Najar
2c066bc65f Tinymce: remove autoresize and added unlink 2018-09-23 13:38:14 +02:00
Diego Najar
aec5d13ca0
Merge pull request #799 from Fred89/master
French update to Bludit 3.0
2018-09-23 12:33:33 +02:00
Frédéric K
d170329591 French update to Bludit 3.0 2018-09-23 12:03:52 +02:00
Diego Najar
d0c31cd794
Merge pull request #785 from ali-demirtas/patch-5
Create tr.json
2018-09-22 11:22:07 +02:00
Diego Najar
f4274c26fb
Merge pull request #786 from ali-demirtas/patch-6
Create tr.json
2018-09-22 11:21:59 +02:00
Diego Najar
901fdd9858
Merge pull request #789 from ali-demirtas/patch-9
Create tr.json
2018-09-22 11:21:51 +02:00
Diego Najar
6fad0cc074
Merge pull request #787 from ali-demirtas/patch-7
Create tr.json
2018-09-22 11:21:42 +02:00
Diego Najar
a652e739ac
Merge pull request #784 from ali-demirtas/patch-4
Create tr.json
2018-09-22 11:21:33 +02:00
Diego Najar
2e338f4264
Merge pull request #783 from ali-demirtas/patch-3
Update tr_TR.json
2018-09-22 11:21:24 +02:00
Diego Najar
69ddc4582c
Merge pull request #788 from ali-demirtas/patch-8
Create tr.json
2018-09-22 11:21:13 +02:00
Diego Najar
6bb36ec1d4
Merge pull request #790 from ali-demirtas/patch-10
Create tr.json
2018-09-22 11:21:04 +02:00
Diego Najar
4752460dca
Merge pull request #791 from ali-demirtas/patch-11
Create tr.json
2018-09-22 11:20:51 +02:00
Diego Najar
923c2e0c62
Merge pull request #792 from ali-demirtas/patch-12
Create tr_TR.json
2018-09-22 11:20:35 +02:00
Diego Najar
bed279a4ce
Merge pull request #793 from ali-demirtas/patch-13
Create tr_TR.json
2018-09-22 11:20:25 +02:00
Diego Najar
79f72462b1
Merge pull request #797 from ali-demirtas/patch-16
Update tr_TR.json
2018-09-22 11:20:14 +02:00
Diego Najar
8ae62bd0cc
Merge pull request #798 from davede-git/master
Polish language pack updated
2018-09-22 11:19:43 +02:00
Diego Najar
c8cb97a6c5
Merge branch 'master' into master 2018-09-22 11:19:36 +02:00
Diego Najar
d446eb2848 clean up for remote content 2018-09-21 14:32:31 +02:00
Diego Najar
a7e31640c0 clean up for remote content 2018-09-21 14:28:20 +02:00
Dave
917b6fc020
Polish language pack updated 2018-09-21 12:49:48 +02:00
Diego Najar
8c56c69bd5 Bug fix for remote content and field case sensitive 2018-09-21 11:37:10 +02:00
Diego Najar
891aab9ee1 Bug fix for remote content and field case sensitive 2018-09-21 11:34:16 +02:00
Diego Najar
8dfdd16fb4 fix download backup zip 2018-09-21 11:06:25 +02:00
Diego Najar
f5116974ba Merge branch 'master' of github.com:dignajar/bludit 2018-09-21 10:37:59 +02:00
Diego Najar
b25cf15a2d Bludit v3.0.0 2018-09-21 10:37:46 +02:00
Edi
56c96e7ff4
Update de_DE.json 2018-09-20 23:46:12 +02:00
Edi
a0a847dcd4
Update de_CH.json 2018-09-20 23:45:29 +02:00
Diego Najar
541cb1cec3 fix cover image when edit a page, autosize for tinymce 2018-09-19 19:01:56 +02:00
Diego Najar
74d5833aaa minor fix 2018-09-18 23:59:38 +02:00
Diego Najar
ad96dd8cab Merge branch 'master' of github.com:dignajar/bludit 2018-09-18 19:46:26 +02:00
Diego Najar
01f4415ac3 ping Google and Bing when sitemap changed 2018-09-18 19:46:10 +02:00
Ali Demirtas
61a181a692
Update tr_TR.json
Turkish translation file has been completely updated. Errors fixed.
2018-09-18 19:28:06 +03:00
Edi
5e1c72949c
Create de_DE.json 2018-09-17 21:02:33 +02:00
Edi
34d5cf313c
Create de_CH.json 2018-09-17 21:02:08 +02:00
Edi
19679f4d74
Update de_DE.json 2018-09-17 20:51:36 +02:00
Edi
fbad845899
Update de_CH.json 2018-09-17 20:51:09 +02:00
Edi
c250a54024
Update de_DE.json 2018-09-16 23:47:36 +02:00
Edi
bb076844e9
Update de_CH.json 2018-09-16 23:46:52 +02:00
Diego Najar
423307bf6a
Merge pull request #794 from ali-demirtas/patch-14
Create tr_TR.json
2018-09-16 21:20:03 +02:00
Diego Najar
8759fdf014
Merge pull request #782 from ali-demirtas/patch-2
Update tr_TR.json
2018-09-16 21:19:50 +02:00
Diego Najar
da8f6d4b1c
Merge pull request #795 from ali-demirtas/patch-15
Create tr_TR.json
2018-09-16 21:19:25 +02:00
Edi
67cdd7e62e
Update de_DE.json 2018-09-16 20:37:16 +02:00
Edi
f3d460ee26
Update de_CH.json 2018-09-16 20:36:53 +02:00
Edi
90c3fd6217
Update de_DE.json 2018-09-16 20:35:27 +02:00
Edi
834b5d5c41
Update de_CH.json 2018-09-16 20:34:57 +02:00
Ali Demirtas
7c156153e2
Create tr_TR.json
Turkish translation file created.
2018-09-16 21:15:43 +03:00
Edi
02c6372f00
Update de_CH.json 2018-09-16 20:14:00 +02:00
Edi
7ef2b3cd69
Update de_DE.json 2018-09-16 20:13:08 +02:00
Ali Demirtas
a1d6135cae
Create tr_TR.json
Turkish translation file created.
2018-09-16 21:12:04 +03:00
Ali Demirtas
a201f750cc
Create tr_TR.json
Turkish translation file created.
2018-09-16 21:08:32 +03:00
Ali Demirtas
aa0e75f423
Create tr_TR.json
Turkish translation file created.
2018-09-16 21:07:07 +03:00
Ali Demirtas
b760547ac6
Create tr.json
Turkish translation file created.
2018-09-16 21:04:16 +03:00
Ali Demirtas
3ab699662c
Create tr.json
Turkish translation file created.
2018-09-16 21:02:09 +03:00
Ali Demirtas
1a123b8500
Create tr.json
Turkish translation file created.
2018-09-16 21:00:31 +03:00
Ali Demirtas
6a26d8d0bb
Create tr.json
Turkish translation file created.
2018-09-16 20:58:35 +03:00
Ali Demirtas
2dd05fa163
Create tr.json
Turkish translation file created.
2018-09-16 20:55:52 +03:00
Ali Demirtas
5df103358e
Create tr.json
Turkish translation file created.
2018-09-16 20:54:14 +03:00
Ali Demirtas
83b66790b5
Create tr.json
Turkish translation file created.
2018-09-16 20:49:46 +03:00
Ali Demirtas
c0885b87b9
Create tr.json
Turkish translation file created.
2018-09-16 20:47:44 +03:00
Diego Najar
389a400443 missing phrases 2018-09-16 19:45:56 +02:00
Ali Demirtas
d7db199879
Update tr_TR.json
Translation updated.
2018-09-16 20:43:48 +03:00
Ali Demirtas
1c1838ad3c
Update tr_TR.json
Translation updated.
2018-09-16 20:41:42 +03:00
Diego Najar
13d00250c5 Merge branch 'master' of github.com:dignajar/bludit 2018-09-16 19:26:33 +02:00
Diego Najar
5bb0a46548 robots plugin improves 2018-09-16 19:26:23 +02:00
Edi
8a0d2f1cd3
Update de_DE.json 2018-09-16 17:56:58 +02:00
Edi
7f3bd425b8
Update de_CH.json 2018-09-16 17:55:27 +02:00
Edi
778afcb9a5
Labels of social networks 2018-09-15 22:52:09 +02:00
Diego Najar
b85ecdae89 remove cli mode functions 2018-09-14 15:48:57 +02:00
Diego Najar
e65a26d66a Fix for admin redirect 2018-09-12 18:22:11 +02:00
Diego Najar
d5f27da946 Fix for admin redirect 2018-09-12 18:21:21 +02:00
Diego Najar
98464b2a10 New rule for routing URLs 2018-09-11 23:54:53 +02:00
Diego Najar
59c637bdc8 New rule for routing URLs 2018-09-11 23:54:32 +02:00
Diego Najar
2e33afda0c New rule for routing URLs 2018-09-11 23:37:45 +02:00
Diego Najar
53dbb3c25f Added Mastodon Social Network 2018-09-10 22:04:24 +02:00
Diego Najar
3d20f1cb36 Re enable plugins from rc2 2018-09-10 20:23:37 +02:00
Diego Najar
bcb656511e Deny pages with slug equal to filters 2018-09-10 18:16:58 +02:00
Diego Najar
c85f440793
Merge pull request #775 from anaggh/master
Fix admin filter bug
2018-09-10 19:14:33 +03:00
Anaggh S
290fe689ac Fix admin filter bug 2018-09-10 16:31:18 +05:30
Diego Najar
c2386e9c7d
Merge pull request #773 from aleksei86/patch-3
Update uk_UA.json
2018-09-09 19:49:31 +03:00
Diego Najar
5267f1bf00 bug fix #772 2018-09-09 17:53:08 +02:00
Aleksei Belta
7cf358a11f
Update uk_UA.json 2018-09-09 18:21:13 +03:00
Diego Najar
bcd67d4e02
Merge pull request #770 from anaggh/master
Add lang strings
2018-09-09 17:38:15 +03:00
Anaggh S
2e631795c9 Add lang strings 2018-09-08 20:48:29 +05:30
Diego Najar
f0895796cd bug fix for #768 2018-09-06 20:52:41 +02:00
Diego Najar
d62e19707b workspaces directory for plugins 2018-09-05 22:55:14 +02:00
Diego Najar
b5d4ceda09
Merge pull request #767 from anaggh/master
Fix floats bug
2018-09-03 22:07:05 +03:00
Anaggh S
c0570af424 Fix floats bug 2018-09-04 00:34:31 +05:30
Diego Najar
750f14396d
Merge pull request #766 from anaggh/master
Add optional content stats feature to simple-stats plugin
2018-09-03 21:45:16 +03:00
Diego Najar
77d1d7b6f8 template 2018-09-03 20:43:05 +02:00
Diego Najar
2cb0228e50 template 2018-09-03 20:37:23 +02:00
Diego Najar
78968aaf4d bug fix in truncate function 2018-09-03 18:46:21 +02:00
Diego Najar
335f159c78 bug fix #765 2018-09-03 18:31:46 +02:00
Anaggh S
872eaf8dd0 Add optional content stats feature to simple-stats plugin 2018-09-03 18:15:13 +05:30
Diego Najar
a4336e5905 bludit v3.0.0 rc2 2018-09-02 19:03:15 +02:00
Diego Najar
78726b7c3a bug fix, username is lost when edit the page 2018-08-28 19:32:15 +02:00
Diego Najar
2c5151c3ab word position missing 2018-08-28 19:25:28 +02:00
Diego Najar
18f2624d7c Merge branch 'master' of github.com:dignajar/bludit 2018-08-28 19:24:59 +02:00
Diego Najar
aa95aedc8b manage content, fix when ordered by postion 2018-08-28 19:23:21 +02:00
Diego Najar
f56d22200a
Merge pull request #761 from xm74/patch-10
Create ru_RU.json
2018-08-28 17:19:05 +03:00
Max Kostikov
4d87fa0c18
Create ru_RU.json
translation added
2018-08-28 15:31:49 +02:00
Diego Najar
7744a106ac
Merge pull request #760 from xm74/patch-9
Update ru_RU.json
2018-08-28 15:08:18 +03:00
Max Kostikov
2b35d3a93e
Update ru_RU.json
few typos fixed
2018-08-27 23:23:54 +02:00
Diego Najar
dac32fe532 Merge branch 'master' of github.com:dignajar/bludit 2018-08-27 22:19:58 +02:00
Diego Najar
9676e995ef redirect pages with trailing slash 2018-08-27 22:19:42 +02:00
Edi
098aed8be8
Merge pull request #759 from xm74/patch-8
Update ru_RU.json
2018-08-27 16:21:12 +02:00
Max Kostikov
8db604d356
Update ru_RU.json
Typo fixed
2018-08-27 16:19:59 +02:00
Diego Najar
66a15556f8
Merge pull request #758 from xm74/patch-7
Update ru_RU.json
2018-08-27 16:51:19 +03:00
Max Kostikov
61e294889b
Update ru_RU.json
for Bludit 3.x
2018-08-27 15:25:18 +02:00
Diego Najar
186ee576e7 remove updater 2018-08-26 19:25:58 +02:00
Diego Najar
3cca9fcdf4 remove updater 2018-08-26 19:23:24 +02:00
Diego Najar
10c4019b92 missing words 2018-08-26 13:55:13 +02:00
Diego Najar
e4a08873ac remove line breaks method 2018-08-26 13:44:18 +02:00
Diego Najar
41fae2f808 Remove breaklines from content when generate the slug 2018-08-26 13:39:13 +02:00
Edi
c8f4bfe09e
Update de_DE.json 2018-08-24 17:38:39 +02:00
Edi
efb0e0b2cf
Update de_CH.json 2018-08-24 17:37:35 +02:00
Edi
9601b1cb48
Update de_DE.json 2018-08-24 00:24:12 +02:00
Edi
e3408bfdaf
Update de_CH.json 2018-08-24 00:19:45 +02:00
Edi
f19e1e791e
Update plugin.php 2018-08-24 00:17:31 +02:00
Edi
d1a2e05dbf
Create de_DE.json 2018-08-23 21:19:48 +02:00
Edi
7c04de9c26
Create de_CH.json 2018-08-23 21:19:30 +02:00
Edi
aaa2f39ab8
Create de_DE.json 2018-08-23 21:15:22 +02:00
Edi
7d308ef842
Create de_CH.json 2018-08-23 21:15:03 +02:00
Edi
7c635e24ba
Update de_DE.json 2018-08-23 20:48:07 +02:00
Edi
0da146e58b
Update de_CH.json 2018-08-23 20:47:36 +02:00
Edi
34e4f9cab3
Update de_DE.json 2018-08-21 23:56:15 +02:00
Edi
3a5c03ff15
Update de_CH.json 2018-08-21 23:53:01 +02:00
Edi
7721e14d9e
Missing phrase 2018-08-21 23:51:17 +02:00
Edi
5f500dcd16
Missing phrase 2018-08-21 23:50:34 +02:00
Edi
33d24659cf
Missing phrase 2018-08-21 23:45:06 +02:00
Edi
7575dba3e7
Missing phrase 2018-08-21 23:44:14 +02:00
Edi
9752d096b5
Missing phrase 2018-08-21 23:43:35 +02:00
Edi
d489d08bcb
Missing phrase 2018-08-21 23:42:54 +02:00
Edi
c75035a784
Missing phrase 2018-08-21 23:42:15 +02:00
Edi
03f4c1ace9
Missing phrase 2018-08-21 23:41:36 +02:00
Edi
8214443233
Missing phrase 2018-08-21 23:40:53 +02:00
Edi
ec14461a84
Missing phrase 2018-08-21 23:40:12 +02:00
Edi
58f780777a
Missing phrase 2018-08-21 23:39:31 +02:00
Edi
22378d3ab6
Missing phrase 2018-08-21 23:38:52 +02:00
Edi
84d1ae43df
Missing phrase 2018-08-21 23:37:43 +02:00
Edi
78805e2c7e
Missing phrase 2018-08-21 23:34:37 +02:00
Edi
39058619b1
Missing phrase 2018-08-21 23:33:45 +02:00
Edi
253557977e
Missing phrase 2018-08-21 23:33:02 +02:00
Edi
0f1c8b3d7b
Missing phrase 2018-08-21 23:32:16 +02:00
Edi
a203d3f79b
Missing phrase 2018-08-21 23:31:33 +02:00
Edi
3dda798790
Missing phrase 2018-08-21 23:29:25 +02:00
Edi
075a2c839a
Update fa_IR.json 2018-08-21 23:28:25 +02:00
Edi
a1bcc43853
Missing phrase 2018-08-21 23:27:51 +02:00
Edi
00d83f2973
Missing phrase 2018-08-21 23:27:11 +02:00
Edi
183f3450c1
Missing phrase 2018-08-21 23:26:04 +02:00
Edi
c09f6de954
Missing phrase 2018-08-21 23:25:16 +02:00
Edi
44b06e6b97
Missing phrase 2018-08-21 23:24:28 +02:00
Diego Najar
8a5aa64d53 Bludit v3.0.0 rc1 2018-08-21 20:57:24 +02:00
Diego Najar
f98f14670c Rename special chars to unicode chars, remove special chars in username 2018-08-21 20:11:31 +02:00
Diego Najar
82d7d1ae7e missing phrases 2018-08-21 18:55:53 +02:00
Diego Najar
435abebcde missing phrases 2018-08-21 18:53:03 +02:00
Diego Najar
5da3a099e1 missing phrase 2018-08-21 18:52:32 +02:00
Edi
67277cfb1f
Update de_CH.json 2018-08-21 12:30:21 +02:00
Edi
3200578da7
Update new-content.php 2018-08-21 12:10:24 +02:00
Edi
0b29d592bf
Update edit-content.php 2018-08-21 12:09:50 +02:00
Edi
928a0b91c0
Update de_DE.json 2018-08-21 12:00:13 +02:00
Edi
c868afbda3
Update de_CH.json 2018-08-21 11:59:48 +02:00
Edi
6a61729012
Update de_CH.json 2018-08-21 11:59:04 +02:00
Edi
2193855a33
Update de_CH.json 2018-08-21 11:58:35 +02:00
Edi
ccf5e8ad08
Update de_DE.json 2018-08-21 00:49:54 +02:00
Edi
0607f137c5
Update de_DE.json 2018-08-21 00:49:20 +02:00
Edi
6489d207de
Update de_CH.json 2018-08-21 00:44:08 +02:00
Edi
799a905a6b
Update de_CH.json 2018-08-20 23:38:36 +02:00
Diego Najar
ed929376dc Merge branch 'master' of github.com:dignajar/bludit 2018-08-20 22:33:19 +02:00
Diego Najar
884ed16cfb
Merge pull request #751 from anaggh/master
small margin between buttons for cases where title is too long
2018-08-20 23:33:07 +03:00
Diego Najar
e674327a25 Remove reserved characters from URL, changes on labels 2018-08-20 22:32:14 +02:00
Edi
3309d25464
Update de_CH.json 2018-08-20 20:59:21 +02:00
Edi
316251f0c8
Update de_CH.json 2018-08-20 15:28:47 +02:00
Anaggh S
941148460d small margin between buttons for cases where title is too long 2018-08-20 16:40:25 +05:30
Edi
ba78d439f3
Update de_CH.json 2018-08-19 19:06:54 +02:00
Diego Najar
a3df822c65 improves in User interface responsive and dictionary updates 2018-08-19 17:45:49 +02:00
Diego Najar
49dc45a90b removed invalid fields 2018-08-19 15:03:36 +02:00
Diego Najar
938845b2e4 Merge branch 'master' of github.com:dignajar/bludit 2018-08-18 16:15:47 +02:00
Diego Najar
1e1af3df22 TinyMCE as default editor, upload files check files sizes, dictionaries updated 2018-08-18 16:15:38 +02:00
Edi
344c3d607c
Fix titles 2018-08-18 15:37:13 +02:00
Diego Najar
f96d8d08d0
Merge pull request #747 from anaggh/master
Bug fix
2018-08-18 15:45:27 +03:00
Anaggh S
df5fd34dde Remove invalid span, plugin fixes 2018-08-16 17:49:21 +05:30
Anaggh S
bfd75a5ae8 Add instagram svg from simpleicons 2018-08-16 15:26:36 +05:30
Anaggh S
db4327d69c Return correct string readingTime 2018-08-16 15:16:27 +05:30
Anaggh S
5f47ad7c13 Comment RewriteBase 2018-08-16 15:09:37 +05:30
Edi
546cb60ddb
Update pl_PL.json 2018-08-16 00:00:14 +02:00
Edi
e9ad38c7e8
Addition Instagram 2018-08-15 12:26:20 +02:00
Edi
7520bddb14
Addition Instagram 2018-08-15 12:25:07 +02:00
Edi
d99c6eb7c7
Translation de_DE 2018-08-11 13:03:19 +02:00
Edi
a2cf88fdb1
Translation de_CH 2018-08-11 13:01:55 +02:00
Edi
c9ba4d6e0d
Fix translation 2018-08-11 12:53:06 +02:00
Diego Najar
cb3d065376 3b2 2018-08-11 00:49:06 +02:00
Diego Najar
6d067b036c bug fixes: media manager and plugin API 2018-08-10 15:41:23 +02:00
Diego Najar
39d409ccc7 bug fix: install plugins 2018-08-09 23:15:52 +02:00
Diego Najar
5deb5020b7 Languages updated 2018-08-09 19:43:15 +02:00
Diego Najar
551614e7cc languages updates 2018-08-08 00:16:35 +02:00
Diego Najar
942f3c04cb change amount for number 2018-08-06 21:46:58 +02:00
Diego Najar
bb2023cb5b
Merge pull request #734 from kavin-90/master
add bootstrap pagination code with gap+numbers xD
2018-08-06 19:21:07 +03:00
Diego Najar
9c448b9d10
Merge pull request #735 from anaggh/master
Fix install script, allow navbar for md
2018-08-05 19:07:49 +03:00
Diego Najar
ec88e52aad bug fix when select the homepage 2018-08-05 18:04:38 +02:00
Diego Najar
d89e742fdf Change on variable name to , include new words to the dictionary 2018-08-05 17:54:20 +02:00
Anaggh S
939b2ba5f4 Fix install script, allow navbar for md 2018-08-04 19:28:26 +05:30
Sam
f67c4d29bd
add bootstrap pagination code with gap+numbers xD
created bootstrap pagination
2018-08-04 18:17:12 +05:30
Diego Najar
96f44aa286 navbar for mobiles devices 2018-08-04 12:44:37 +02:00
Diego Najar
1caddac331 Changes on variables names for Language 2018-08-03 19:03:09 +02:00
Diego Najar
786f73cc5a Changes on variables names 2018-08-03 18:59:23 +02:00
Diego Najar
077bc21434 changes variables names 2018-08-02 22:33:53 +02:00
Diego Najar
b04587813e categories description and bug fix 2018-08-02 17:06:53 +02:00
Diego Najar
5cdef56023 bug fix: check user is logged 2018-08-01 22:04:28 +02:00
Diego Najar
a515a588b2
Merge pull request #730 from anaggh/master
Small fixes
2018-08-01 16:15:27 +03:00
Anaggh S
92ece7eb7f Fix mobile responsiveness 2018-08-01 18:37:37 +05:30
Anaggh S
5fca9151bd Small fix 2018-08-01 18:20:22 +05:30
Anaggh S
d2dd02055f Fix grammar and typos 2018-08-01 18:16:12 +05:30
Anaggh S
f929f680e8 Fix mobile responsiveness 2018-08-01 17:22:59 +05:30
614 changed files with 21920 additions and 13791 deletions

16
.github/issue_template.md vendored Normal file
View File

@ -0,0 +1,16 @@
### Describe your problem
Complete here.
### Steps to reproduce the problem
Complete here.
### Bludit version
Complete here.
### PHP version
If you do not know delete this line.
### PHP logs
If you do not know delete this line.
The default settings of the PHP Error Log file varies from OS to OS. The location of the error log file itself can be set manually in the php.ini file. On a Windows server, in IIS, it may be something like `error_log = C:\log_files\php_errors.log` in Linux it may be a value of `/var/log/php_errors.log`.

21
.gitignore vendored
View File

@ -1,11 +1,30 @@
.DS_Store .DS_Store
dbgenerator.php dbgenerator.php
bl-content/* bl-content/*
bl-content-migrator
bl-plugins/timemachine bl-plugins/timemachine
bl-plugins/timemachine-x bl-plugins/timemachine-x
bl-plugins/remote-content
bl-plugins/discovery bl-plugins/discovery
bl-plugins/updater
bl-plugins/medium-editor
bl-plugins/quill
bl-plugins/yandex-metrica/
bl-plugins/domain-migrator/
bl-plugins/tail-writer/
bl-kernel/bludit.pro.php bl-kernel/bludit.pro.php
bl-kernel/admin/themes/gris
bl-themes/docs bl-themes/docs
bl-themes/typerite
bl-themes/docsx bl-themes/docsx
bl-themes/editorial
bl-themes/mediumish bl-themes/mediumish
bl-themes/clean-blog
bl-themes/grayscale
bl-themes/massively
bl-themes/hyperspace
bl-themes/striped
bl-themes/log
bl-themes/micro
bl-themes/tagg
bl-themes/future-imperfect
bl-themes/social-network

View File

@ -6,13 +6,14 @@ AddDefaultCharset UTF-8
RewriteEngine on RewriteEngine on
# Base directory # Base directory
RewriteBase / #RewriteBase /
# Deny direct access to .txt files # Deny direct access to the next directories
RewriteRule ^bl-content/(.*)\.txt$ - [R=404,L] RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]
# All URL process by index.php # All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [PT,L] RewriteRule ^(.*) index.php [PT,L]
</IfModule> </IfModule>

View File

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2015-2018 Diego Najar Copyright (c) 2015-2020 Diego Najar
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,6 +1,6 @@
[Bludit](https://www.bludit.com/) [Bludit](https://www.bludit.com/)
================================ ================================
**Simple**, **Fast** and **Flexible** CMS **Simple**, **Fast** and **Flexible** CMS.
Bludit is a web application to build your own **website** or **blog** in seconds, it's completely **free and open source**. Bludit uses files in JSON format to store the content, you don't need to install or configure a database. You only need a web server with PHP support. Bludit is a web application to build your own **website** or **blog** in seconds, it's completely **free and open source**. Bludit uses files in JSON format to store the content, you don't need to install or configure a database. You only need a web server with PHP support.
@ -13,22 +13,20 @@ Bludit supports **Markdown** and **HTML code** for the content.
- [Documentation](https://docs.bludit.com) - [Documentation](https://docs.bludit.com)
- Help and Support [Forum](https://forum.bludit.org) and [Chat](https://gitter.im/bludit/support) - Help and Support [Forum](https://forum.bludit.org) and [Chat](https://gitter.im/bludit/support)
[![Bludit PRO](https://img.shields.io/badge/Bludit-PRO-blue.svg)](https://pro.bludit.com/) Follow Bludit
Social Networks
--------------- ---------------
- [Blog](https://blog.bludit.com)
- [Twitter](https://twitter.com/bludit) - [Twitter](https://twitter.com/bludit)
- [Facebook](https://www.facebook.com/bluditcms) - [Facebook](https://www.facebook.com/bluditcms)
- [Google+](https://plus.google.com/+Bluditcms) - [Youtube](https://www.youtube.com/c/Bluditcms)
- [Youtube](https://www.youtube.com/channel/UCuLu0Z_CHBsTiYTDz129x9Q?view_as=subscriber)
Requirements Requirements
------------ ------------
You just need a web server with PHP support. You just need a web server with PHP support.
- PHP v5.3 or higher. - PHP v5.6 or higher.
- PHP [mbstring](http://php.net/manual/en/book.mbstring.php) module for full UTF-8 support. - PHP [mbstring](http://php.net/manual/en/book.mbstring.php) module for full UTF-8 support.
- PHP [gd](http://php.net/manual/en/book.image.php) module for image processing. - PHP [gd](http://php.net/manual/en/book.image.php) module for image processing.
- PHP [dom](http://php.net/manual/en/book.dom.php) module for DOM manipulation. - PHP [dom](http://php.net/manual/en/book.dom.php) module for DOM manipulation.
@ -48,25 +46,24 @@ Installation Guide
Docker Image Docker Image
------------ ------------
Bludit provides an official Docker image. Official Docker image on Docker Hub.
- https://hub.docker.com/r/bludit/docker/ - https://hub.docker.com/r/bludit/docker/
Backers Also we provide Kubernetes deployments yaml files.
- https://github.com/bludit/docker/tree/master/kubernetes
Support Bludit!
------- -------
Become a **Backer** and support Bludit with a monthly contribution to help us continue development. Bludit is open soruce and free, but if you really like the project and is useful for your you can contribute in [Patreon](https://www.patreon.com/bePatron?c=921115&rid=2458860), also for the supporters we provide Bludit PRO.
- [Become a Backer](https://www.patreon.com/bePatron?c=921115&rid=2458859)
Sponsors [![Bludit PRO](https://img.shields.io/badge/Bludit-PRO-blue.svg)](https://pro.bludit.com/)
--------
Become a **Sponsor** and support Bludit with a monthly contribution to help us continue development.
[![Become a Sponsor](https://img.shields.io/badge/Become%20a%20Sponsor--green.svg)](https://www.patreon.com/bePatron?c=921115&rid=2458860) ### Golden sponsors in Patreon!
- <a href="https://www.patreon.com/clickwork" target="_blank">Clickwork</a> - <a href="https://www.patreon.com/clickwork" target="_blank">Clickwork</a>
- <a href="https://www.patreon.com/user/creators?u=10331784" target="_blank">KreativMind</a> - <a href="https://www.patreon.com/user/creators?u=10331784" target="_blank">KreativMind</a>
- <a href="https://www.patreon.com/pinguinsreisende" target="_blank">Gerriet Selent</a>
- <a href="https://www.patreon.com/user/creators?u=12261033" target="_blank">Jan Rippl</a> - <a href="https://www.patreon.com/user/creators?u=12261033" target="_blank">Jan Rippl</a>
- <a href="https://www.patreon.com/user/creators?u=9828204" target="_blank">Wesleigh Walker</a> - <a href="https://www.patreon.com/user/creators?u=28428918" target="_blank">Curious Activity</a>
License License
------- -------

View File

@ -30,7 +30,6 @@ class dbJSON {
// Unserialize, JSON to Array // Unserialize, JSON to Array
$array = $this->unserialize($implode); $array = $this->unserialize($implode);
if (empty($array)) { if (empty($array)) {
$this->db = array(); $this->db = array();
$this->dbBackup = array(); $this->dbBackup = array();
@ -47,7 +46,7 @@ class dbJSON {
return true; return true;
} }
// Returns the amount of rows in the database // Returns the number of rows in the database
public function count() public function count()
{ {
return count($this->db); return count($this->db);
@ -59,7 +58,7 @@ class dbJSON {
if (isset($this->db[$field])) { if (isset($this->db[$field])) {
return $this->db[$field]; return $this->db[$field];
} }
return $this->dbFields[$field]['value']; return $this->dbFields[$field];
} }
// Save the JSON file // Save the JSON file
@ -99,7 +98,8 @@ class dbJSON {
{ {
// NULL is returned if the json cannot be decoded // NULL is returned if the json cannot be decoded
$decode = json_decode($data, true); $decode = json_decode($data, true);
if (empty($decode)) { if ($decode===NULL) {
Log::set(__METHOD__.LOG_SEP.'Error trying to read the JSON file: '.$this->file, LOG_TYPE_ERROR);
return false; return false;
} }
return $decode; return $decode;
@ -110,4 +110,11 @@ class dbJSON {
return $this->db; return $this->db;
} }
// Truncate all the rows
public function truncate()
{
$this->db = array();
return $this->save();
}
} }

View File

@ -7,11 +7,13 @@ Database structure
"videos": { "videos": {
"name": "Videos", "name": "Videos",
"template: "", "template: "",
"description: "",
"list": [ "my-page", "second-page" ] "list": [ "my-page", "second-page" ]
}, },
"pets": { "pets": {
"name": "Pets", "name": "Pets",
"template: "", "template: "",
"description: "",
"list": [ "cats-and-dogs" ] "list": [ "cats-and-dogs" ]
} }
} }
@ -26,8 +28,13 @@ class dbList extends dbJSON
parent::__construct($file); parent::__construct($file);
} }
public function keys()
{
return array_keys($this->db);
}
// Returns the list of keys filter by pageNumber // Returns the list of keys filter by pageNumber
public function getList($key, $pageNumber, $amountOfItems) public function getList($key, $pageNumber, $numberOfItems)
{ {
if (!isset($this->db[$key])) { if (!isset($this->db[$key])) {
Log::set(__METHOD__.LOG_SEP.'Error key does not exist '.$key); Log::set(__METHOD__.LOG_SEP.'Error key does not exist '.$key);
@ -38,15 +45,13 @@ class dbList extends dbJSON
$list = $this->db[$key]['list']; $list = $this->db[$key]['list'];
// Returns all the items from the list // Returns all the items from the list
if ($amountOfItems==-1) { if ($numberOfItems==-1) {
// Invert keys to values, is necesary returns as key the key pages
$list = array_flip($list);
return $list; return $list;
} }
// The first page number is 1, so the real is 0 // The first page number is 1, so the real is 0
$realPageNumber = $pageNumber - 1; $realPageNumber = $pageNumber - 1;
$chunks = array_chunk($list, $amountOfItems); $chunks = array_chunk($list, $numberOfItems);
if (isset($chunks[$realPageNumber])) { if (isset($chunks[$realPageNumber])) {
return $chunks[$realPageNumber]; return $chunks[$realPageNumber];
} }
@ -57,7 +62,12 @@ class dbList extends dbJSON
public function generateKey($name) public function generateKey($name)
{ {
global $L;
$key = Text::cleanUrl($name); $key = Text::cleanUrl($name);
if (Text::isEmpty($key)) {
$key = $L->g('empty');
}
while (isset($this->db[$key])) { while (isset($this->db[$key])) {
$key++; $key++;
} }
@ -65,13 +75,14 @@ class dbList extends dbJSON
} }
// Add a new item to the dblist // Add a new item to the dblist
// $args => 'name', 'template', 'list' // $args => 'name', 'template', 'description', list'
public function add($args) public function add($args)
{ {
$key = $this->generateKey($args['name']); $key = $this->generateKey($args['name']);
$this->db[$key]['name'] = $args['name']; $this->db[$key]['name'] = Sanitize::removeTags($args['name']);
$this->db[$key]['template'] = isset($args['template'])?$args['template']:''; $this->db[$key]['template'] = isset($args['template'])?Sanitize::removeTags($args['template']):'';
$this->db[$key]['description'] = isset($args['description'])?Sanitize::removeTags($args['description']):'';
$this->db[$key]['list'] = isset($args['list'])?$args['list']:array(); $this->db[$key]['list'] = isset($args['list'])?$args['list']:array();
$this->sortAlphanumeric(); $this->sortAlphanumeric();
@ -91,7 +102,7 @@ class dbList extends dbJSON
} }
// Edit an item to the dblist // Edit an item to the dblist
// $args => 'name', 'oldkey', 'newKey', 'template' // $args => 'name', 'oldkey', 'newKey', 'template', 'description'
public function edit($args) public function edit($args)
{ {
if ( isset($this->db[$args['newKey']]) && ($args['newKey']!==$args['oldKey']) ) { if ( isset($this->db[$args['newKey']]) && ($args['newKey']!==$args['oldKey']) ) {
@ -99,8 +110,9 @@ class dbList extends dbJSON
return false; return false;
} }
$this->db[$args['newKey']]['name'] = $args['name']; $this->db[$args['newKey']]['name'] = Sanitize::removeTags($args['name']);
$this->db[$args['newKey']]['template'] = isset($args['template'])?$args['template']:''; $this->db[$args['newKey']]['template'] = isset($args['template'])?Sanitize::removeTags($args['template']):'';
$this->db[$args['newKey']]['description'] = isset($args['description'])?Sanitize::removeTags($args['description']):'';
$this->db[$args['newKey']]['list'] = $this->db[$args['oldKey']]['list']; $this->db[$args['newKey']]['list'] = $this->db[$args['oldKey']]['list'];
// Remove the old category // Remove the old category
@ -114,7 +126,7 @@ class dbList extends dbJSON
} }
// Sort the categories by "Natural order" // Sort the categories by "Natural order"
private function sortAlphanumeric() public function sortAlphanumeric()
{ {
// Sort key alphanumeric strings, a01, a10, b10, c02 // Sort key alphanumeric strings, a01, a10, b10, c02
return ksort($this->db); return ksort($this->db);
@ -139,10 +151,10 @@ class dbList extends dbJSON
return $tmp; return $tmp;
} }
// Returns the amount of items for some key // Returns the number of items in the list
public function countItems($key) public function countItems($key)
{ {
if( isset($this->db[$key]) ) { if (isset($this->db[$key])) {
return count($this->db[$key]['list']); return count($this->db[$key]['list']);
} }
return 0; return 0;
@ -164,7 +176,7 @@ class dbList extends dbJSON
} }
// Returns an array with a portion of the database filtered by key // Returns an array with a portion of the database filtered by key
// Returns array( 'key'=>'', 'name'=>'', 'template'=>'', 'list'=>array() ) // Returns array( 'key'=>'', 'name'=>'', 'template'=>'', 'description'=>'', list'=>array() )
public function getMap($key) public function getMap($key)
{ {
if (isset($this->db[$key])) { if (isset($this->db[$key])) {

View File

@ -6,11 +6,11 @@ class Plugin {
// Ex: sitemap // Ex: sitemap
public $directoryName; public $directoryName;
// (string) Absoulute database filename and path // (string) Absolute database filename and path
// Ex: /www/bludit/bl-content/plugins/sitemap/db.php // Ex: /www/bludit/bl-content/plugins/sitemap/db.php
public $filenameDb; public $filenameDb;
// (string) Absoulute metadata filename and path // (string) Absolute metadata filename and path
// Ex: /www/bludit/bl-plugins/sitemap/metadata.json // Ex: /www/bludit/bl-plugins/sitemap/metadata.json
public $filenameMetadata; public $filenameMetadata;
@ -31,9 +31,13 @@ class Plugin {
// (boolean) Enable or disable default Save and Cancel button on plugin settings // (boolean) Enable or disable default Save and Cancel button on plugin settings
public $formButtons; public $formButtons;
// (array) List of custom hooks
public $customHooks;
function __construct() function __construct()
{ {
$this->dbFields = array(); $this->dbFields = array();
$this->customHooks = array();
$reflector = new ReflectionClass(get_class($this)); $reflector = new ReflectionClass(get_class($this));
@ -59,29 +63,12 @@ class Plugin {
$this->metadata = json_decode($metadataString, true); $this->metadata = json_decode($metadataString, true);
// If the plugin is installed then get the database // If the plugin is installed then get the database
if($this->installed()) { if ($this->installed()) {
$Tmp = new dbJSON($this->filenameDb); $Tmp = new dbJSON($this->filenameDb);
$this->db = $Tmp->db; $this->db = $Tmp->db;
} }
} }
// DEPRECATED
// 2017-06-19
public function setDb($args)
{
foreach($this->dbFields as $key=>$value) {
if( isset($args[$key]) ) {
$value = Sanitize::html( $args[$key] );
if($value==='false') { $value = false; }
elseif($value==='true') { $value = true; }
settype($value, gettype($this->dbFields[$key]));
$this->db[$key] = $value;
}
}
$this->save();
}
public function save() public function save()
{ {
$tmp = new dbJSON($this->filenameDb); $tmp = new dbJSON($this->filenameDb);
@ -99,16 +86,22 @@ class Plugin {
return '<script charset="utf-8" src="'.$this->domainPath().'js/'.$filename.'?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL; return '<script charset="utf-8" src="'.$this->domainPath().'js/'.$filename.'?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
} }
// Returns absolute URL and path of the plugin directory
// This function helps to include CSS or Javascript files with absolute URL
public function domainPath() public function domainPath()
{ {
return DOMAIN_PLUGINS.$this->directoryName.'/'; return DOMAIN_PLUGINS.$this->directoryName.'/';
} }
// Returns relative path of the plugin directory
// This function helps to include CSS or Javascript files with relative URL
public function htmlPath() public function htmlPath()
{ {
return HTML_PATH_PLUGINS.$this->directoryName.'/'; return HTML_PATH_PLUGINS.$this->directoryName.'/';
} }
// Returns absolute path of the plugin directory
// This function helps to include PHP libraries or some file at server level
public function phpPath() public function phpPath()
{ {
return PATH_PLUGINS.$this->directoryName.DS; return PATH_PLUGINS.$this->directoryName.DS;
@ -119,7 +112,7 @@ class Plugin {
return PATH_PLUGINS_DATABASES.$this->directoryName.DS; return PATH_PLUGINS_DATABASES.$this->directoryName.DS;
} }
// Returns the value of the key from the metadata of the plugin, FALSE if the key doen't exit // Returns the value of the key from the metadata of the plugin, FALSE if the key doesn't exist
public function getMetadata($key) public function getMetadata($key)
{ {
if(isset($this->metadata[$key])) { if(isset($this->metadata[$key])) {
@ -141,34 +134,14 @@ class Plugin {
// (boolean) $html, TRUE returns the value sanitized, FALSE unsanitized // (boolean) $html, TRUE returns the value sanitized, FALSE unsanitized
public function getValue($field, $html=true) public function getValue($field, $html=true)
{ {
if( isset($this->db[$field]) ) { if (isset($this->db[$field])) {
if($html) { if ($html) {
return $this->db[$field]; return $this->db[$field];
} } else {
else {
return Sanitize::htmlDecode($this->db[$field]); return Sanitize::htmlDecode($this->db[$field]);
} }
} }
return false; return $this->dbFields[$field];
}
// DEPRECATED
// 2017-06-16
public function getDbField($key, $html=true)
{
if(isset($this->db[$key])) {
if($html) {
// All fields from DBField are sanitized.
return $this->db[$key];
}
else {
// Decode HTML tags, this action unsanitized the variable.
return Sanitize::htmlDecode($this->db[$key]);
}
}
return '';
} }
public function label() public function label()
@ -251,22 +224,40 @@ class Plugin {
return false; return false;
} }
// Create plugin directory for databases and other files // Create workspace
mkdir(PATH_PLUGINS_DATABASES.$this->directoryName, 0755, true); $workspace = $this->workspace();
mkdir($workspace, DIR_PERMISSIONS, true);
// Create plugin directory for the database
mkdir(PATH_PLUGINS_DATABASES.$this->directoryName, DIR_PERMISSIONS, true);
// Create database
$this->dbFields['position'] = $position; $this->dbFields['position'] = $position;
$this->setDb($this->dbFields); // Sanitize default values to store in the file
foreach ($this->dbFields as $key=>$value) {
$value = Sanitize::html($value);
settype($value, gettype($this->dbFields[$key]));
$this->db[$key] = $value;
}
return true; // Create the database
return $this->save();
} }
public function uninstall() public function uninstall()
{ {
// Delete database
$path = PATH_PLUGINS_DATABASES.$this->directoryName; $path = PATH_PLUGINS_DATABASES.$this->directoryName;
return Filesystem::deleteRecursive($path); Filesystem::deleteRecursive($path);
// Delete workspace
$workspace = $this->workspace();
Filesystem::deleteRecursive($workspace);
return true;
} }
// Returns TRUE if the plugin is installed
// This function just check if the database of the plugin is created
public function installed() public function installed()
{ {
return file_exists($this->filenameDb); return file_exists($this->filenameDb);
@ -274,25 +265,25 @@ class Plugin {
public function workspace() public function workspace()
{ {
return PATH_PLUGINS_DATABASES.$this->directoryName.DS; return PATH_WORKSPACES.$this->directoryName.DS;
} }
public function init() public function init()
{ {
// This method is used on childre classes. // This method is used on children classes.
// The user can define his own field of the database // The user can define his own field of the database
} }
public function post() public function post()
{ {
$args = $_POST; $args = $_POST;
foreach($this->dbFields as $key=>$value) { foreach ($this->dbFields as $field=>$value) {
if( isset($args[$key]) ) { if (isset($args[$field])) {
$value = Sanitize::html( $args[$key] ); $finalValue = Sanitize::html( $args[$field] );
if($value==='false') { $value = false; } if ($finalValue==='false') { $finalValue = false; }
elseif($value==='true') { $value = true; } elseif ($finalValue==='true') { $finalValue = true; }
settype($value, gettype($this->dbFields[$key])); settype($finalValue, gettype($value));
$this->db[$key] = $value; $this->db[$field] = $finalValue;
} }
} }
return $this->save(); return $this->save();

View File

@ -1,4 +1,4 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
// Title of the page // Title of the page
$layout['title'] = $Language->g('About') . ' - ' . $layout['title']; $layout['title'] = $L->g('About') . ' - ' . $layout['title'];

View File

@ -11,21 +11,30 @@ checkRole(array('admin'));
// ============================================================================ // ============================================================================
// ============================================================================ // ============================================================================
// Main after POST // Main before POST
// ============================================================================ // ============================================================================
// ============================================================================ // ============================================================================
// POST Method // POST Method
// ============================================================================ // ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
editSettings($_POST);
Redirect::page('settings-general');
}
// ============================================================================ // ============================================================================
// Main after POST // Main after POST
// ============================================================================ // ============================================================================
// Title of the page activatePlugin('pluginAPI');
$layout['title'] .= ' - '.$Language->g('General Settings'); $apiURL = DOMAIN_BASE.'api/';
$pluginAPI = getPlugin('pluginAPI');
$apiToken = $pluginAPI->getToken();
$username = $login->username();
$admin = new User($username);
$authToken = $admin->tokenAuth();
$output = array(
'apiURL'=>$apiURL,
'username'=>$username,
'apiToken'=>$apiToken,
'authToken'=>$authToken
);
exit(json_encode($output));
?>

View File

@ -23,4 +23,4 @@ checkRole(array('admin'));
// ============================================================================ // ============================================================================
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('Categories'); $layout['title'] .= ' - '.$L->g('Categories');

View File

@ -40,12 +40,9 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
)); ));
// Call the method post of the plugin // Call the method post of the plugin
if ($plugin->post()) { $plugin->post();
Alert::set( $Language->g('The changes have been saved') ); Alert::set( $L->g('The changes have been saved') );
Redirect::page('configure-plugin/'.$plugin->className()); Redirect::page('configure-plugin/'.$plugin->className());
} else {
Alert::set( $Language->g('Complete all fields') );
}
} }
// ============================================================================ // ============================================================================
@ -53,4 +50,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================ // ============================================================================
// Title of the page // Title of the page
$layout['title'] = $Language->g('Plugin').' - '.$plugin->name().' - '.$layout['title']; $layout['title'] = $L->g('Plugin').' - '.$plugin->name().' - '.$layout['title'];

View File

@ -4,12 +4,25 @@
// Check role // Check role
// ============================================================================ // ============================================================================
checkRole(array('admin', 'editor')); checkRole(array('admin', 'editor', 'author'));
// ============================================================================ // ============================================================================
// Functions // Functions
// ============================================================================ // ============================================================================
// Returns the content belongs to the current user if the user has the role Editor
function filterContentOwner($list) {
global $login;
global $pages;
$tmp = array();
foreach ($list as $pageKey) {
if ($pages->db[$pageKey]['username']==$login->username()) {
array_push($tmp, $pageKey);
}
}
return $tmp;
}
// ============================================================================ // ============================================================================
// Main before POST // Main before POST
// ============================================================================ // ============================================================================
@ -22,21 +35,26 @@ checkRole(array('admin', 'editor'));
// Main after POST // Main after POST
// ============================================================================ // ============================================================================
// List of published pages $published = $pages->getList($url->pageNumber(), ITEMS_PER_PAGE_ADMIN);
$onlyPublished = true; $drafts = $pages->getDraftDB(true);
$amountOfItems = ITEMS_PER_PAGE_ADMIN; $scheduled = $pages->getScheduledDB(true);
$pageNumber = $url->pageNumber(); $static = $pages->getStaticDB(true);
$published = $dbPages->getList($pageNumber, $amountOfItems, $onlyPublished); $sticky = $pages->getStickyDB(true);
$autosave = $pages->getAutosaveDB(true);
// If the user is an Author filter the content he/she can edit
if (checkRole(array('author'), false)) {
$published = filterContentOwner($published);
$drafts = filterContentOwner($drafts);
$scheduled = filterContentOwner($scheduled);
$static = filterContentOwner($static);
$sticky = filterContentOwner($sticky);
}
// Check if out of range the pageNumber // Check if out of range the pageNumber
if (empty($published) && $url->pageNumber()>1) { if (empty($published) && $url->pageNumber()>1) {
Redirect::page('content'); Redirect::page('content');
} }
$drafts = $dbPages->getDraftDB(true);
$scheduled = $dbPages->getScheduledDB(true);
$static = $dbPages->getStaticDB(true);
$sticky = $dbPages->getStickyDB(true);
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('Manage content'); $layout['title'] .= ' - '.$L->g('Manage content');

View File

@ -5,18 +5,45 @@
// ============================================================================ // ============================================================================
function updateBludit() { function updateBludit() {
global $site; global $site;
// Check if Bludit need to be update. global $syslog;
if( ($site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) {
// New installation
if ($site->currentBuild()==0) {
$site->set(array('currentBuild'=>BLUDIT_BUILD));
}
// Check if Bludit need to be update
if ( ($site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) {
Log::set('UPDATE SYSTEM - Starting.'); Log::set('UPDATE SYSTEM - Starting.');
// From Bludit v2.0.x to v2.1.x // Updates only for version less than Bludit v3.0 rc-3
if ($site->currentBuild() < '20171102') { if ($site->currentBuild()<='20180910') {
// Nothing to do @mkdir(PATH_WORKSPACES, DIR_PERMISSIONS, true);
$plugins = array('simple-stats', 'pluginRSS', 'pluginSitemap', 'pluginTimeMachineX', 'pluginBackup');
foreach ($plugins as $plugin) {
if (pluginActivated($plugin)) {
Log::set('UPDATE SYSTEM - Re-enable plugin: '.$plugin);
deactivatePlugin($plugin);
activatePlugin($plugin);
}
}
}
// Updates only for version less than Bludit v3.1
if ($site->currentBuild()<='20180921') {
@mkdir(PATH_UPLOADS_PAGES, DIR_PERMISSIONS, true);
$site->set(array('imageRelativeToAbsolute'=>true, 'imageRestrict'=>false));
} }
// Set the current build number // Set the current build number
$site->set(array('currentBuild'=>BLUDIT_BUILD)); $site->set(array('currentBuild'=>BLUDIT_BUILD));
Log::set('UPDATE SYSTEM - Finished.'); Log::set('UPDATE SYSTEM - Finished.');
// Add to syslog
$syslog->add(array(
'dictionaryKey'=>'system-updated',
'notes'=>'Bludit v'.BLUDIT_VERSION
));
} }
} }
@ -36,4 +63,4 @@ function updateBludit() {
updateBludit(); updateBludit();
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('Dashboard'); $layout['title'] .= ' - '.$L->g('Dashboard');

View File

@ -48,4 +48,4 @@ function printTable($title, $array) {
// Main after POST // Main after POST
// ============================================================================ // ============================================================================
$layout['title'] .= ' - '.$Language->g('Developers'); $layout['title'] .= ' - '.$L->g('Developers');

View File

@ -33,12 +33,12 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================ // ============================================================================
$categoryKey = $layout['parameters']; $categoryKey = $layout['parameters'];
if (!$dbCategories->exists($categoryKey)) { if (!$categories->exists($categoryKey)) {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the category: '.$categoryKey); Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the category: '.$categoryKey);
Redirect::page('categories'); Redirect::page('categories');
} }
$categoryMap = $dbCategories->getMap($categoryKey); $categoryMap = $categories->getMap($categoryKey);
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('Edit Category').' [ '.$categoryMap['name'] . ' ] '; $layout['title'] .= ' - '.$L->g('Edit Category').' [ '.$categoryMap['name'] . ' ] ';

View File

@ -4,23 +4,23 @@
// Check role // Check role
// ============================================================================ // ============================================================================
if (!checkRole(array('admin','editor'), false)) { if (checkRole(array('author'), false)) {
try { try {
$pageKey = isset($_POST['key']) ? $_POST['key'] : $layout['parameters']; $pageKey = isset($_POST['key']) ? $_POST['key'] : $layout['parameters'];
$page = new PageX($pageKey); $page = new Page($pageKey);
} catch (Exception $e) { } catch (Exception $e) {
Alert::set($Language->g('You do not have sufficient permissions')); Alert::set($L->g('You do not have sufficient permissions'));
Redirect::page('dashboard'); Redirect::page('dashboard');
} }
if ($page->username()!==$login->username()) { if ($page->username()!==$login->username()) {
// Add to syslog // Add to syslog
$syslog->add(array( $syslog->add(array(
'dictionaryKey'=>'access-deny', 'dictionaryKey'=>'access-denied',
'notes'=>$login->username() 'notes'=>$login->username()
)); ));
Alert::set($Language->g('You do not have sufficient permissions')); Alert::set($L->g('You do not have sufficient permissions'));
Redirect::page('dashboard'); Redirect::page('dashboard');
} }
} }
@ -40,17 +40,12 @@ if (!checkRole(array('admin','editor'), false)) {
if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($_POST['type']==='delete') { if ($_POST['type']==='delete') {
if (deletePage($_POST['key'])) { if (deletePage($_POST['key'])) {
Alert::set( $Language->g('The changes have been saved') ); Alert::set( $L->g('The changes have been saved') );
} }
} else { } else {
// If the checkbox is not selected the form doesn't send the field
$_POST['noindex'] = isset($_POST['noindex'])?true:false;
$_POST['nofollow'] = isset($_POST['nofollow'])?true:false;
$_POST['noarchive'] = isset($_POST['noarchive'])?true:false;
$key = editPage($_POST); $key = editPage($_POST);
if ($key!==false) { if ($key!==false) {
Alert::set( $Language->g('The changes have been saved') ); Alert::set( $L->g('The changes have been saved') );
Redirect::page('edit-content/'.$key); Redirect::page('edit-content/'.$key);
} }
} }
@ -63,11 +58,29 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================ // ============================================================================
try { try {
$pageKey = $layout['parameters']; $pageKey = $layout['parameters'];
$page = new PageX($pageKey); $page = new Page($pageKey);
} catch (Exception $e) { } catch (Exception $e) {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the page: '.$pageKey, LOG_TYPE_ERROR); Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the page: '.$pageKey, LOG_TYPE_ERROR);
Redirect::page('content'); Redirect::page('content');
} }
// Images prefix directory
define('PAGE_IMAGES_KEY', $page->uuid());
// Images and thubmnails directories
if (IMAGE_RESTRICT) {
define('PAGE_IMAGES_DIRECTORY', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/'));
define('PAGE_IMAGES_URL', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/'));
define('PAGE_THUMBNAILS_DIRECTORY', PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.DS.'thumbnails'.DS);
define('PAGE_THUMBNAILS_HTML', HTML_PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/');
define('PAGE_THUMBNAILS_URL', DOMAIN_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/');
} else {
define('PAGE_IMAGES_DIRECTORY', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS));
define('PAGE_IMAGES_URL', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS));
define('PAGE_THUMBNAILS_DIRECTORY', PATH_UPLOADS_THUMBNAILS);
define('PAGE_THUMBNAILS_HTML', HTML_PATH_UPLOADS_THUMBNAILS);
define('PAGE_THUMBNAILS_URL', DOMAIN_UPLOADS_THUMBNAILS);
}
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('Edit content').' - '.$page->title(); $layout['title'] .= ' - '.$L->g('Edit content').' - '.$page->title();

View File

@ -19,20 +19,24 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
unset($_POST['role']); unset($_POST['role']);
} }
if (isset($_POST['deleteUserAndDeleteContent'])) { if (isset($_POST['deleteUserAndDeleteContent']) && ($login->role()==='admin')) {
$_POST['deleteContent'] = true; $_POST['deleteContent'] = true;
deleteUser($_POST); deleteUser($_POST);
} elseif (isset($_POST['deleteUserAndKeepContent'])) { } elseif (isset($_POST['deleteUserAndKeepContent']) && ($login->role()==='admin')) {
$_POST['deleteContent'] = false; $_POST['deleteContent'] = false;
deleteUser($_POST); deleteUser($_POST);
} elseif (isset($_POST['disableUser'])) { } elseif (isset($_POST['disableUser']) && ($login->role()==='admin')) {
disableUser(array('username'=>$_POST['username'])); disableUser(array('username'=>$_POST['username']));
} else { } else {
editUser($_POST); editUser($_POST);
} }
Alert::set($Language->g('The changes have been saved')); Alert::set($L->g('The changes have been saved'));
Redirect::page('users');
if ($login->role()==='admin') {
Redirect::page('users');
}
Redirect::page('edit-user/'.$login->username());
} }
// ============================================================================ // ============================================================================
@ -53,4 +57,4 @@ try {
} }
// Title of the page // Title of the page
$layout['title'] = $Language->g('Edit user').' - '.$layout['title']; $layout['title'] = $L->g('Edit user').' - '.$layout['title'];

View File

@ -22,7 +22,9 @@ checkRole(array('admin'));
// Main after POST // Main after POST
// ============================================================================ // ============================================================================
$pluginClassName = $layout['parameters']; $pluginClassName = $layout['parameters'];
activatePlugin($pluginClassName); if (!activatePlugin($pluginClassName)) {
Log::set('Fail when try to activate the plugin.', LOG_TYPE_ERROR);
}
if (isset($plugins['all'][$pluginClassName])) { if (isset($plugins['all'][$pluginClassName])) {
$plugin = $plugins['all'][$pluginClassName]; $plugin = $plugins['all'][$pluginClassName];

View File

@ -21,20 +21,10 @@ checkRole(array('admin'));
// ============================================================================ // ============================================================================
// Main after POST // Main after POST
// ============================================================================ // ============================================================================
$themeDirname = $layout['parameters']; $themeDirectory = $layout['parameters'];
if (Sanitize::pathFile(PATH_THEMES.$themeDirname)) { // Activate theme
$site->set(array('theme'=>$themeDirname)); activateTheme($themeDirectory);
// Add to syslog
$syslog->add(array(
'dictionaryKey'=>'new-theme-configured',
'notes'=>$themeDirname
));
// Create an alert
Alert::set( $Language->g('The changes have been saved') );
}
// Redirect // Redirect
Redirect::page('themes'); Redirect::page('themes');

View File

@ -12,10 +12,10 @@ function checkLogin($args)
{ {
global $security; global $security;
global $login; global $login;
global $Language; global $L;
if ($security->isBlocked()) { if ($security->isBlocked()) {
Alert::set($Language->g('IP address has been blocked').'<br>'.$Language->g('Try again in a few minutes'), ALERT_STATUS_FAIL); Alert::set($L->g('IP address has been blocked').'<br>'.$L->g('Try again in a few minutes'), ALERT_STATUS_FAIL);
return false; return false;
} }
@ -26,12 +26,9 @@ function checkLogin($args)
// Renew the token. This token will be the same inside the session for multiple forms. // Renew the token. This token will be the same inside the session for multiple forms.
$security->generateTokenCSRF(); $security->generateTokenCSRF();
// Users with the role reader do not need access to dashboard if (isset($_GET['enableAPI'])) {
if ($login->role()=='reader') { Redirect::page('api');
Redirect::home();
} }
// Other user without the role reader redirect to dashboard
Redirect::page('dashboard'); Redirect::page('dashboard');
return true; return true;
} }
@ -40,7 +37,7 @@ function checkLogin($args)
$security->addToBlacklist(); $security->addToBlacklist();
// Create alert // Create alert
Alert::set($Language->g('Username or password incorrect'), ALERT_STATUS_FAIL); Alert::set($L->g('Username or password incorrect'), ALERT_STATUS_FAIL);
return false; return false;
} }

View File

@ -21,5 +21,5 @@
// ============================================================================ // ============================================================================
if ($login->logout()) { if ($login->logout()) {
Redirect::home(); Redirect::admin();
} }

View File

@ -19,7 +19,7 @@ checkRole(array('admin'));
// ============================================================================ // ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (createCategory($_POST['category'])) { if (createCategory($_POST)) {
Redirect::page('categories'); Redirect::page('categories');
} }
} }
@ -29,4 +29,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================ // ============================================================================
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('New category'); $layout['title'] .= ' - '.$L->g('New category');

View File

@ -4,7 +4,7 @@
// Check role // Check role
// ============================================================================ // ============================================================================
checkRole(array('admin', 'editor')); checkRole(array('admin', 'editor', 'author'));
// ============================================================================ // ============================================================================
// Functions // Functions
@ -19,11 +19,6 @@ checkRole(array('admin', 'editor'));
// ============================================================================ // ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// If the checkbox is not selected the form doesn't send the field
$_POST['noindex'] = isset($_POST['noindex'])?true:false;
$_POST['nofollow'] = isset($_POST['nofollow'])?true:false;
$_POST['noarchive'] = isset($_POST['noarchive'])?true:false;
createPage($_POST); createPage($_POST);
Redirect::page('content'); Redirect::page('content');
} }
@ -32,5 +27,26 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// Main after POST // Main after POST
// ============================================================================ // ============================================================================
// UUID of the page is need it for autosave and media manager
$uuid = $pages->generateUUID();
// Images prefix directory
define('PAGE_IMAGES_KEY', $uuid);
// Images and thubmnails directories
if (IMAGE_RESTRICT) {
define('PAGE_IMAGES_DIRECTORY', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/'));
define('PAGE_IMAGES_URL', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/'));
define('PAGE_THUMBNAILS_DIRECTORY', PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.DS.'thumbnails'.DS);
define('PAGE_THUMBNAILS_HTML', HTML_PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/');
define('PAGE_THUMBNAILS_URL', DOMAIN_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/');
} else {
define('PAGE_IMAGES_DIRECTORY', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS));
define('PAGE_IMAGES_URL', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS));
define('PAGE_THUMBNAILS_DIRECTORY', PATH_UPLOADS_THUMBNAILS);
define('PAGE_THUMBNAILS_HTML', HTML_PATH_UPLOADS_THUMBNAILS);
define('PAGE_THUMBNAILS_URL', DOMAIN_UPLOADS_THUMBNAILS);
}
// Title of the page // Title of the page
$layout['title'] = $Language->g('New content').' - '.$layout['title']; $layout['title'] = $L->g('New content').' - '.$layout['title'];

View File

@ -29,4 +29,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================ // ============================================================================
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('Add a new user'); $layout['title'] .= ' - '.$L->g('Add a new user');

View File

@ -26,4 +26,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================ // ============================================================================
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('Plugins'); $layout['title'] .= ' - '.$L->g('Plugins');

View File

@ -23,4 +23,4 @@ checkRole(array('admin'));
// ============================================================================ // ============================================================================
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('Plugins'); $layout['title'] .= ' - '.$L->g('Plugins');

View File

@ -1,31 +0,0 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
checkRole(array('admin'));
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
editSettings($_POST);
Redirect::page('settings-regional');
}
// ============================================================================
// Main after POST
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$Language->g('Language and timezone');

View File

@ -28,4 +28,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================ // ============================================================================
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('Advanced Settings'); $layout['title'] .= ' - '.$L->g('Advanced Settings');

View File

@ -21,4 +21,4 @@ checkRole(array('admin'));
$themes = buildThemes(); $themes = buildThemes();
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('Themes'); $layout['title'] .= ' - '.$L->g('Themes');

View File

@ -4,8 +4,6 @@
// Functions // Functions
// ============================================================================ // ============================================================================
// ============================================================================ // ============================================================================
// Main before POST // Main before POST
// ============================================================================ // ============================================================================
@ -15,12 +13,21 @@
// ============================================================================ // ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// Prevent non-administrators to change other users
$username = $_POST['username'];
if ($login->role()!=='admin') {
$username = $login->username();
}
if (changeUserPassword(array( if (changeUserPassword(array(
'username'=>$_POST['username'], 'username'=>$username,
'newPassword'=>$_POST['newPassword'], 'newPassword'=>$_POST['newPassword'],
'confirmPassword'=>$_POST['confirmPassword'] 'confirmPassword'=>$_POST['confirmPassword']
))) { ))) {
Redirect::page('users'); if ($login->role()==='admin') {
Redirect::page('users');
}
Redirect::page('edit-user/'.$login->username());
} }
} }
@ -41,4 +48,4 @@ try {
} }
// Title of the page // Title of the page
$layout['title'] = $Language->g('Change password').' - '.$layout['title']; $layout['title'] = $L->g('Change password').' - '.$layout['title'];

View File

@ -28,4 +28,4 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )
// ============================================================================ // ============================================================================
// Title of the page // Title of the page
$layout['title'] .= ' - '.$Language->g('Users'); $layout['title'] .= ' - '.$L->g('Users');

View File

@ -0,0 +1,62 @@
a {
color: #0078D4;
}
a:hover {
color: #003f6f;
text-decoration: none;
}
.bg-success {
background-color: #8BC34A!important;
}
.text-primary {
color: #0078D4!important;
}
.text-danger {
color: #D40000!important;
}
a.text-danger:focus,
a.text-danger:hover {
color: #790000!important;
}
/* Buttons */
.btn {
border-radius: 2px;
}
.btn-primary {
background-color: #0078D4;
border-color: #0078D4;
}
.btn-primary:hover {
background-color: #4585CF;
border-color: #4a90e2;
}
.btn-light.focus, .btn-light:focus {
box-shadow: none;
}
.btn.focus, .btn:focus {
box-shadow: none;
}
/* Form */
.form-control:focus {
box-shadow: none;
}
/* Tables */
.table-striped tbody tr:nth-of-type(odd) {
background-color: rgba(0, 0, 0, 0.02);
}
.table thead th {
font-size: 0.8em;
text-transform: uppercase!important;
}

View File

@ -9,6 +9,54 @@ body {
background: #fcfcfc; background: #fcfcfc;
} }
/* Prevent events in iframes */
/* iframe{
pointer-events: none;
} */
/*
ICONS
*/
.fa {
padding-right: 2px;
line-height: inherit;
}
/*
SIDEBAR
*/
div.sidebar .nav-item a {
padding-left:0;
padding-right:0;
color: #555;
padding-top: 5px;
padding-bottom: 5px;
}
div.sidebar .nav-item a:hover {
color: #0078D4;
}
div.sidebar .nav-item h4 {
font-size: 1.2em;
text-transform: uppercase;
font-weight: 400;
margin-top: 10px;
}
/*
AUTOCOMPLETE SEARCH
*/
.search-suggestion {
padding: 5px;
}
.search-suggestion-options {
font-size: 0.9em;
padding-top: 2px;
}
/* /*
BOOTSTRAP Hacks BOOTSTRAP Hacks
*/ */
@ -19,26 +67,23 @@ body {
} }
} }
a { /* for small devices */
color: #4a90e2; @media (max-width: 575.98px) {
#jsmediaManagerButton,
#jscategoryButton,
#jsdescriptionButton {
width: 100%;
text-align: left;
}
} }
a:hover {
color: #4a90e2;
}
.btn {
border-radius: 2px;
}
.btn-primary {
background-color: #4F93E0;
border-color: #4a90e2;
}
.btn-primary:hover { .btn-light {
background-color: #4585CF; color: #212529;
border-color: #4a90e2; background-color: #f3f3f3;
border-color: #ced4d9;
} }
.btn-form { .btn-form {
@ -53,6 +98,8 @@ a:hover {
color: #000; color: #000;
} }
code { code {
padding: 3px 5px 2px; padding: 3px 5px 2px;
margin: 0 1px; margin: 0 1px;
@ -65,9 +112,22 @@ code {
cursor: pointer; cursor: pointer;
} }
.modal-body {
padding: 2rem;
}
.modal-footer {
background-color: rgb(247, 247, 247);
}
.modal-dialog .btn-link {
color: #000;
}
/* /*
LOGIN LOGIN
*/ */
body.login { body.login {
background: rgb(255,255,255); background: rgb(255,255,255);
background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(250,250,250,1) 53%); background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(250,250,250,1) 53%);
@ -81,6 +141,10 @@ body.login {
#dashboard ul.list-group.list-group-striped li { #dashboard ul.list-group.list-group-striped li {
border: none; border: none;
word-break: break-word;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
} }
#dashboard ul.list-group.list-group-striped li:nth-of-type(even) { #dashboard ul.list-group.list-group-striped li:nth-of-type(even) {
@ -102,6 +166,16 @@ body.login {
color: #4586d4; color: #4586d4;
} }
#hello-message {
padding: 10px 0;
color: #777;
margin-bottom: 20px;
}
#hello-message span.oi {
top: 3px;
}
.ct-series-a .ct-line { .ct-series-a .ct-line {
/* Set the colour of this series line */ /* Set the colour of this series line */
stroke: #4a90e2; stroke: #4a90e2;
@ -110,7 +184,6 @@ body.login {
/* Create a dashed line with a pattern */ /* Create a dashed line with a pattern */
} }
/* This selector overrides the points style on line charts. Points on line charts are actually just very short strokes. This allows you to customize even the point size in CSS */
.ct-series-a .ct-point { .ct-series-a .ct-point {
/* Colour of your points */ /* Colour of your points */
stroke: #4a90e2; stroke: #4a90e2;
@ -121,6 +194,7 @@ body.login {
/* /*
ALERT ALERT
*/ */
#alert { #alert {
display: none; display: none;
position: fixed; position: fixed;
@ -135,45 +209,22 @@ body.login {
.alert-success { .alert-success {
background-color: #4586d4; background-color: #4586d4;
border-left: 6px solid #abd1ff !important;
color: #ffffff; color: #ffffff;
} }
.alert-danger { .alert-danger {
background-color: #d44545; background-color: #d44545;
border-left: 6px solid #ff9c9c !important;
color: #ffffff; color: #ffffff;
} }
/*
SIDEBAR
*/
div.sidebar .nav-item a {
padding-left:0;
padding-right:0;
color: #777;
padding-top: 5px;
padding-bottom: 5px;
}
div.sidebar .nav-item a:hover {
text-decoration: underline;
}
div.sidebar .nav-item h4 {
font-size: 1.3em;
text-transform: uppercase;
font-weight: 400;
margin-top: 10px;
}
div.sidebar .nav-item span.oi {
color: #000;
font-size: 0.8em;
padding-right: 5px;
}
/* /*
PLUGINS PLUGINS
*/ */
.plugin-form label { .plugin-form label {
display: block; display: block;
margin-top: 1rem !important; margin-top: 1rem !important;
@ -207,3 +258,107 @@ div.sidebar .nav-item span.oi {
color: #6c757d !important; color: #6c757d !important;
} }
/*
Manage > Content
*/
td.child {
padding-left: 30px;
}
/*
Manage > New Content
*/
#jseditor {
background: #fff;
padding: 10px 5% !important;
font-size: 16px;
line-height: 1.5em;
border: 1px solid #ced4da;
}
#jseditorSidebar {
display: none;
height: calc(100% - 45px);
width: 50%;
max-width: 350px;
position: absolute;
z-index: 50;
top: 45px;
right: 15px;
background-color: #fff;
overflow-x: hidden;
transition: 0.5s;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
border-top: 1px solid #ccc;
}
@media (max-width: 575.98px) {
#jseditorSidebar {
width: 100%;
max-width: 100%;
right: 0;
}
#jseditorToolbarRight button {
font-size: 0px !important;
}
#jseditorToolbarRight button span {
font-size: 16px !important;
}
.contentTools .btn {
font-size: 0px !important;
margin-right: 5px;
}
.contentTools .btn span {
font-size: 16px !important;
}
}
#jseditorSidebar nav {
background: #f3f3f3;
}
#jseditorSidebar nav a {
color: #000;
}
#jseditorSidebar .nav-tabs .nav-link {
border: none;
}
#jseditorSidebar .nav-link.active {
background: none;
border: none;
border-bottom: 3px solid #ccc;
}
#jsshadow {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(72,72,72,0.7);
z-index: 10;
display: none;
}
img.profilePicture {
width: 30px;
height: 30px;
border-radius: 30px;
border: 1px solid #ccc;
}
/* Switch button */
.switch-button {
font-size: 0.9em;
text-transform: uppercase;
cursor: pointer;
}
.switch-icon-publish {
color: #1cb11c;
}

File diff suppressed because one or more lines are too long

View File

@ -1,543 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2014-7-1: Created.
-->
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014
By P.J. Onori
Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net)
</metadata>
<defs>
<font id="open-iconic" horiz-adv-x="800" >
<font-face
font-family="Icons"
font-weight="400"
font-stretch="normal"
units-per-em="800"
panose-1="2 0 5 3 0 0 0 0 0 0"
ascent="800"
descent="0"
bbox="-0.5 -101 802 800.126"
underline-thickness="50"
underline-position="-100"
unicode-range="U+E000-E0DE"
/>
<missing-glyph />
<glyph glyph-name="" unicode="&#xe000;"
d="M300 700h500v-700h-500v100h400v500h-400v100zM400 500l200 -150l-200 -150v100h-400v100h400v100z" />
<glyph glyph-name="1" unicode="&#xe001;"
d="M300 700h500v-700h-500v100h400v500h-400v100zM200 500v-100h400v-100h-400v-100l-200 150z" />
<glyph glyph-name="2" unicode="&#xe002;"
d="M350 700c193 0 350 -157 350 -350v-50h100l-200 -200l-200 200h100v50c0 138 -112 250 -250 250s-250 -112 -250 -250c0 193 157 350 350 350z" />
<glyph glyph-name="3" unicode="&#xe003;"
d="M450 700c193 0 350 -157 350 -350c0 138 -112 250 -250 250s-250 -112 -250 -250v-50h100l-200 -200l-200 200h100v50c0 193 157 350 350 350z" />
<glyph glyph-name="4" unicode="&#xe004;"
d="M0 700h800v-100h-800v100zM100 500h600v-100h-600v100zM0 300h800v-100h-800v100zM100 100h600v-100h-600v100z" />
<glyph glyph-name="5" unicode="&#xe005;"
d="M0 700h800v-100h-800v100zM0 500h600v-100h-600v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100z" />
<glyph glyph-name="6" unicode="&#xe006;"
d="M0 700h800v-100h-800v100zM200 500h600v-100h-600v100zM0 300h800v-100h-800v100zM200 100h600v-100h-600v100z" />
<glyph glyph-name="7" unicode="&#xe007;"
d="M400 700c75 0 146 -23 206 -59l-75 -225l-322 234c57 31 122 50 191 50zM125 588l191 -138l-310 -222c-4 24 -6 47 -6 72c0 114 49 215 125 288zM688 575c69 -72 112 -168 112 -275c0 -35 -8 -68 -16 -100h-218zM216 253l112 -347c-128 23 -232 109 -287 222zM372 100
h372c-64 -109 -177 -185 -310 -197z" />
<glyph glyph-name="8" unicode="&#xe008;" horiz-adv-x="600"
d="M200 800h100v-500h200l-247 -300l-253 300h200v500z" />
<glyph glyph-name="9" unicode="&#xe009;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM300 700v-300h-200l300 -300l300 300h-200v300h-200z" />
<glyph glyph-name="a" unicode="&#xe00a;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700l-300 -300l300 -300v200h300v200h-300v200z" />
<glyph glyph-name="b" unicode="&#xe00b;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700v-200h-300v-200h300v-200l300 300z" />
<glyph glyph-name="c" unicode="&#xe00c;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700l-300 -300h200v-300h200v300h200z" />
<glyph glyph-name="d" unicode="&#xe00d;"
d="M300 600v-200h500v-100h-500v-200l-300 247z" />
<glyph glyph-name="e" unicode="&#xe00e;"
d="M500 600l300 -247l-300 -253v200h-500v100h500v200z" />
<glyph glyph-name="f" unicode="&#xe00f;" horiz-adv-x="600"
d="M200 800h200v-500h200l-297 -300l-303 300h200v500z" />
<glyph glyph-name="10" unicode="&#xe010;"
d="M300 700v-200h500v-200h-500v-200l-300 297z" />
<glyph glyph-name="11" unicode="&#xe011;"
d="M500 700l300 -297l-300 -303v200h-500v200h500v200z" />
<glyph glyph-name="12" unicode="&#xe012;" horiz-adv-x="600"
d="M297 800l303 -300h-200v-500h-200v500h-200z" />
<glyph glyph-name="13" unicode="&#xe013;" horiz-adv-x="600"
d="M247 800l253 -300h-200v-500h-100v500h-200z" />
<glyph glyph-name="14" unicode="&#xe014;"
d="M400 800h100v-800h-100v800zM200 700h100v-600h-100v600zM600 600h100v-400h-100v400zM0 500h100v-200h-100v200z" />
<glyph glyph-name="15" unicode="&#xe015;"
d="M116 600l72 -72c-54 -54 -88 -126 -88 -209s34 -159 88 -213l-72 -72c-72 72 -116 175 -116 285s44 209 116 281zM684 600c72 -72 116 -171 116 -281s-44 -213 -116 -285l-72 72c54 54 88 130 88 213s-34 155 -88 209zM259 460l69 -72c-18 -18 -28 -41 -28 -69
s10 -54 28 -72l-69 -72c-36 36 -59 89 -59 144s23 105 59 141zM541 459c36 -36 59 -85 59 -140s-23 -108 -59 -144l-69 72c18 18 28 44 28 72s-10 51 -28 69z" />
<glyph glyph-name="16" unicode="&#xe016;" horiz-adv-x="400"
d="M200 800c110 0 200 -90 200 -200s-90 -200 -200 -200s-200 90 -200 200s90 200 200 200zM100 319c31 -11 65 -19 100 -19s68 8 100 19v-319l-100 100l-100 -100v319z" />
<glyph glyph-name="17" unicode="&#xe017;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300c0 -66 21 -126 56 -175l419 419c-49 35 -109 56 -175 56zM644 575l-419 -419c49 -35 109 -56 175 -56c166 0 300 134 300 300
c0 66 -21 126 -56 175z" />
<glyph glyph-name="18" unicode="&#xe018;"
d="M0 700h100v-600h700v-100h-800v700zM500 700h200v-500h-200v500zM200 500h200v-300h-200v300z" />
<glyph glyph-name="19" unicode="&#xe019;"
d="M397 800c13 1 23 -4 34 -13c2 -2 214 -254 241 -287h128v-100h-100v-366c0 -18 -16 -34 -34 -34h-532c-18 0 -34 16 -34 34v366h-100v100h128l234 281c9 11 22 18 35 19zM400 672l-144 -172h288zM250 300c-28 0 -50 -22 -50 -50v-100c0 -28 22 -50 50 -50s50 22 50 50
v100c0 28 -22 50 -50 50zM550 300c-28 0 -50 -22 -50 -50v-100c0 -28 22 -50 50 -50s50 22 50 50v100c0 28 -22 50 -50 50z" />
<glyph glyph-name="1a" unicode="&#xe01a;"
d="M9 700h682c6 0 9 -4 9 -10v-190h100v-200h-100v-191c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v582c0 6 3 9 9 9zM100 600v-400h500v400h-500z" />
<glyph glyph-name="1b" unicode="&#xe01b;"
d="M9 700h682c6 0 9 -4 9 -10v-190h100v-200h-100v-191c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v582c0 6 3 9 9 9z" />
<glyph glyph-name="1c" unicode="&#xe01c;"
d="M92 650c0 23 19 50 45 50h3h5h5h500c28 0 50 -22 50 -50s-22 -50 -50 -50h-50v-141c9 -17 120 -231 166 -309c16 -26 34 -61 34 -106c0 -39 -15 -77 -41 -103h-3c-26 -25 -62 -41 -100 -41h-512c-39 0 -77 15 -103 41s-41 64 -41 103c0 46 18 80 34 106
c46 78 157 292 166 309v141h-50c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51zM500 600h-200v-162l-6 -10s-63 -123 -119 -228h450c-56 105 -119 228 -119 228l-6 10v162z" />
<glyph glyph-name="1d" unicode="&#xe01d;"
d="M400 800c110 0 200 -90 200 -200c0 -104 52 -198 134 -266c41 -34 66 -82 66 -134h-800c0 52 25 100 66 134c82 68 134 162 134 266c0 110 90 200 200 200zM300 100h200c0 -55 -45 -100 -100 -100s-100 45 -100 100z" />
<glyph glyph-name="1e" unicode="&#xe01e;" horiz-adv-x="600"
d="M150 800h50l350 -250l-225 -147l225 -153l-350 -250h-50v250l-75 -75l-75 75l150 150l-150 150l75 75l75 -75v250zM250 650v-200l150 100zM250 350v-200l150 100z" />
<glyph glyph-name="1f" unicode="&#xe01f;"
d="M0 800h500c110 0 200 -90 200 -200c0 -47 -17 -91 -44 -125c85 -40 144 -125 144 -225c0 -138 -112 -250 -250 -250h-550v100c55 0 100 45 100 100v400c0 55 -45 100 -100 100v100zM300 700v-200h100c55 0 100 45 100 100s-45 100 -100 100h-100zM300 400v-300h150
c83 0 150 67 150 150s-67 150 -150 150h-150z" />
<glyph glyph-name="20" unicode="&#xe020;" horiz-adv-x="600"
d="M300 800v-300h200l-300 -500v300h-200z" />
<glyph glyph-name="21" unicode="&#xe021;"
d="M100 800h300v-300l100 100l100 -100v300h50c28 0 50 -22 50 -50v-550h-550c-28 0 -50 -22 -50 -50s22 -50 50 -50h550v-100h-550c-83 0 -150 67 -150 150v550l3 19c8 39 39 70 78 78z" />
<glyph glyph-name="22" unicode="&#xe022;" horiz-adv-x="400"
d="M0 800h400v-800l-200 200l-200 -200v800z" />
<glyph glyph-name="23" unicode="&#xe023;"
d="M0 800h800v-100h-800v100zM0 600h300v-103h203v103h297v-591c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v591z" />
<glyph glyph-name="24" unicode="&#xe024;"
d="M300 800h200c55 0 100 -45 100 -100v-100h191c6 0 9 -3 9 -9v-241c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v241c0 6 3 9 9 9h191v100c0 55 45 100 100 100zM300 700v-100h200v100h-200zM0 209c16 -6 32 -9 50 -9h700c18 0 34 3 50 9v-200c0 -6 -3 -9 -9 -9h-782
c-6 0 -9 3 -9 9v200z" />
<glyph glyph-name="25" unicode="&#xe025;" horiz-adv-x="600"
d="M300 800c58 0 110 -16 147 -53s53 -89 53 -147h-100c0 39 -11 61 -25 75s-36 25 -75 25c-35 0 -55 -10 -72 -31s-28 -55 -28 -94c0 -51 20 -107 28 -175h172v-100h-178c-14 -60 -49 -127 -113 -200h491v-100h-600v122l16 12c69 69 95 121 106 166h-122v100h125
c-8 50 -25 106 -25 175c0 58 16 114 50 156c34 43 88 69 150 69z" />
<glyph glyph-name="26" unicode="&#xe026;"
d="M34 700h4h3h4h5h700c28 0 50 -22 50 -50v-700c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v700v2c0 20 15 42 34 48zM150 600c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50zM350 600c-28 0 -50 -22 -50 -50s22 -50 50 -50h300c28 0 50 22 50 50
s-22 50 -50 50h-300zM100 400v-400h600v400h-600z" />
<glyph glyph-name="27" unicode="&#xe027;"
d="M744 797l6 -3l44 -44c4 -4 3 -8 0 -12l-266 -375l-15 -13l-25 -12c-23 72 -78 127 -150 150l12 25l13 15l375 266zM266 400c74 0 134 -60 134 -134c0 -147 -119 -266 -266 -266c-48 0 -95 12 -134 34c80 46 134 133 134 232c0 74 58 134 132 134z" />
<glyph glyph-name="28" unicode="&#xe028;"
d="M9 451c0 23 19 50 46 50c8 0 19 -3 26 -7l131 -66l29 22c-79 81 -1 250 118 250s197 -167 119 -250l28 -22l131 66c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-115 -56c9 -16 19 -33 25 -50h68c28 0 50 -22 50 -50s-22 -50 -50 -50h-50
c0 -23 -2 -45 -6 -66l78 -40c21 -5 37 -28 37 -49c0 -28 -22 -50 -50 -50c-10 0 -23 5 -31 11l-65 35c-24 -46 -62 -86 -103 -110c-35 19 -60 45 -60 72v135v4v5v6v5v5v87c0 28 -22 50 -50 50c-24 0 -45 -17 -50 -40c1 -3 1 -8 1 -11s0 -8 -1 -11v-82v-4v-5v-144
c0 -28 -24 -53 -59 -72c-41 25 -79 64 -103 110l-66 -35c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50c0 21 16 44 37 49l78 40c-4 21 -6 43 -6 66h-50h-5c-28 0 -50 22 -50 50c0 26 22 50 50 50h5h69c6 17 16 34 25 50l-116 56c-16 7 -28 27 -28 45z" />
<glyph glyph-name="29" unicode="&#xe029;"
d="M600 700h91c6 0 9 -3 9 -9v-582c0 -6 -3 -9 -9 -9h-91v600zM210 503l290 147v-500l-250 125v-3c-15 0 -25 -8 -28 -22l75 -178c11 -25 0 -58 -25 -69s-58 0 -69 25l-103 272h-91c-6 0 -9 3 -9 9v182c0 6 3 9 9 9h182z" />
<glyph glyph-name="2a" unicode="&#xe02a;"
d="M9 800h682c6 0 9 -3 9 -9v-782c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v782c0 6 3 9 9 9zM100 700v-200h500v200h-500zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400v-300h100v300h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100z" />
<glyph glyph-name="2b" unicode="&#xe02b;"
d="M0 800h700v-200h-700v200zM0 500h700v-491c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v491zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100z" />
<glyph glyph-name="2c" unicode="&#xe02c;"
d="M409 800h182c6 0 10 -4 12 -9l94 -182c2 -5 6 -9 12 -9h82c6 0 9 -3 9 -9v-582c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v441c0 83 67 150 150 150h141c6 0 10 4 12 9l94 182c2 5 6 9 12 9zM150 500c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z
M500 500c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200zM500 400c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
<glyph glyph-name="2d" unicode="&#xe02d;"
d="M0 600h800l-400 -400z" />
<glyph glyph-name="2e" unicode="&#xe02e;" horiz-adv-x="400"
d="M400 800v-800l-400 400z" />
<glyph glyph-name="2f" unicode="&#xe02f;" horiz-adv-x="400"
d="M0 800l400 -400l-400 -400v800z" />
<glyph glyph-name="30" unicode="&#xe030;"
d="M400 600l400 -400h-800z" />
<glyph glyph-name="31" unicode="&#xe031;"
d="M0 550c0 23 20 50 46 50h3h5h4h200c17 0 37 -13 44 -28l38 -72h444c14 0 19 -12 15 -25l-81 -250c-4 -13 -21 -25 -35 -25h-350c-14 0 -30 12 -34 25c-27 83 -54 167 -81 250l-10 25h-150c-2 0 -5 -1 -7 -1c-28 0 -51 23 -51 51zM358 100c28 0 50 -22 50 -50
s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM658 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
<glyph glyph-name="32" unicode="&#xe032;"
d="M0 700h500v-100h-300v-300h-100l-100 -100v500zM300 500h500v-500l-100 100h-400v400z" />
<glyph glyph-name="33" unicode="&#xe033;"
d="M641 700l143 -141l-493 -493c-71 76 -146 148 -219 222l-72 71l141 141c50 -51 101 -101 153 -150c116 117 234 231 347 350z" />
<glyph glyph-name="34" unicode="&#xe034;"
d="M150 600l250 -250l250 250l150 -150l-400 -400l-400 400z" />
<glyph glyph-name="35" unicode="&#xe035;" horiz-adv-x="600"
d="M400 800l150 -150l-250 -250l250 -250l-150 -150l-400 400z" />
<glyph glyph-name="36" unicode="&#xe036;" horiz-adv-x="600"
d="M150 800l400 -400l-400 -400l-150 150l250 250l-250 250z" />
<glyph glyph-name="37" unicode="&#xe037;"
d="M400 600l400 -400l-150 -150l-250 250l-250 -250l-150 150z" />
<glyph glyph-name="38" unicode="&#xe038;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM600 622l-250 -250l-100 100l-72 -72l172 -172l322 322z" />
<glyph glyph-name="39" unicode="&#xe039;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM250 622l-72 -72l150 -150l-150 -150l72 -72l150 150l150 -150l72 72l-150 150l150 150l-72 72l-150 -150z" />
<glyph glyph-name="3a" unicode="&#xe03a;"
d="M350 800c28 0 50 -22 50 -50v-50h75c14 0 25 -11 25 -25v-75h-300v75c0 14 11 25 25 25h75v50c0 28 22 50 50 50zM25 700h75v-200h500v200h75c14 0 25 -11 25 -25v-650c0 -14 -11 -25 -25 -25h-650c-14 0 -25 11 -25 25v650c0 14 11 25 25 25z" />
<glyph glyph-name="3b" unicode="&#xe03b;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM350 600h100v-181c23 -24 47 -47 72 -69l-72 -72c-27 30 -55 59 -84 88l-16 12
v222z" />
<glyph glyph-name="3c" unicode="&#xe03c;"
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -18 -3 -34 -9 -50h-191v50c0 83 -67 150 -150 150s-150 -67 -150 -150v-50h-272c-17 30 -28 63 -28 100c0 110 90 200 200 200c23 114 129 200 250 200zM434 400h3h4c3 0 6 1 9 1c28 0 50 -22 50 -50v-1
v-150h150l-200 -200l-200 200h150v150v2c0 20 15 42 34 48z" />
<glyph glyph-name="3d" unicode="&#xe03d;"
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -18 -3 -34 -9 -50h-141l-200 200l-200 -200h-222c-17 30 -28 63 -28 100c0 110 90 200 200 200c23 114 129 200 250 200zM450 350l250 -250h-200v-50c0 -28 -22 -50 -50 -50s-50 22 -50 50v50h-200z" />
<glyph glyph-name="3e" unicode="&#xe03e;"
d="M450 700c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -83 -67 -150 -150 -150h-450c-110 0 -200 90 -200 200s90 200 200 200c23 114 129 200 250 200z" />
<glyph glyph-name="3f" unicode="&#xe03f;"
d="M250 800c82 0 154 -40 200 -100c-143 0 -270 -85 -325 -209c-36 -10 -70 -25 -100 -47c-16 33 -25 67 -25 106c0 138 112 250 250 250zM450 600c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -83 -67 -150 -150 -150h-450c-110 0 -200 90 -200 200
s90 200 200 200c23 114 129 200 250 200z" />
<glyph glyph-name="40" unicode="&#xe040;"
d="M500 700h100l-300 -600h-100zM100 600h100l-100 -200l100 -200h-100l-100 200zM600 600h100l100 -200l-100 -200h-100l100 200z" />
<glyph glyph-name="41" unicode="&#xe041;"
d="M350 800h100l50 -119l28 -12l119 50l72 -72l-50 -119l12 -28l119 -50v-100l-119 -50l-12 -28l50 -119l-72 -72l-119 50l-28 -12l-50 -119h-100l-50 119l-28 12l-119 -50l-72 72l50 119l-12 28l-119 50v100l119 50l12 28l-50 119l72 72l119 -50l28 12zM400 550
c-83 0 -150 -67 -150 -150s67 -150 150 -150s150 67 150 150s-67 150 -150 150z" />
<glyph glyph-name="42" unicode="&#xe042;"
d="M0 800h800v-200h-800v200zM200 500h400l-200 -200zM0 100h800v-100h-800v100z" />
<glyph glyph-name="43" unicode="&#xe043;"
d="M0 800h100v-800h-100v800zM600 800h200v-800h-200v800zM500 600v-400l-200 200z" />
<glyph glyph-name="44" unicode="&#xe044;"
d="M0 800h200v-800h-200v800zM700 800h100v-800h-100v800zM300 600l200 -200l-200 -200v400z" />
<glyph glyph-name="45" unicode="&#xe045;"
d="M0 800h800v-100h-800v100zM400 500l200 -200h-400zM0 200h800v-200h-800v200z" />
<glyph glyph-name="46" unicode="&#xe046;"
d="M150 700c83 0 150 -67 150 -150v-50h100v50c0 83 67 150 150 150s150 -67 150 -150s-67 -150 -150 -150h-50v-100h50c83 0 150 -67 150 -150s-67 -150 -150 -150s-150 67 -150 150v50h-100v-50c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150h50v100h-50
c-83 0 -150 67 -150 150s67 150 150 150zM150 600c-28 0 -50 -22 -50 -50s22 -50 50 -50h50v50c0 28 -22 50 -50 50zM550 600c-28 0 -50 -22 -50 -50v-50h50c28 0 50 22 50 50s-22 50 -50 50zM300 400v-100h100v100h-100zM150 200c-28 0 -50 -22 -50 -50s22 -50 50 -50
s50 22 50 50v50h-50zM500 200v-50c0 -28 22 -50 50 -50s50 22 50 50s-22 50 -50 50h-50z" />
<glyph glyph-name="47" unicode="&#xe047;"
d="M0 791c0 5 4 9 9 9h782c6 0 9 -4 9 -10v-790l-200 200h-591c-6 0 -9 3 -9 9v582z" />
<glyph glyph-name="48" unicode="&#xe048;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM600 600l-100 -300l-300 -100l100 300zM400 450c-28 0 -50 -22 -50 -50
s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="49" unicode="&#xe049;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700v-600c166 0 300 134 300 300s-134 300 -300 300z" />
<glyph glyph-name="4a" unicode="&#xe04a;"
d="M0 800h800v-100h-800v100zM0 600h500v-100h-500v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100zM750 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
<glyph glyph-name="4b" unicode="&#xe04b;"
d="M25 700h750c14 0 25 -11 25 -25v-75h-800v75c0 14 11 25 25 25zM0 500h800v-375c0 -14 -11 -25 -25 -25h-750c-14 0 -25 11 -25 25v375zM100 300v-100h100v100h-100zM300 300v-100h100v100h-100z" />
<glyph glyph-name="4c" unicode="&#xe04c;"
d="M100 800h100v-100h450l100 100l50 -50l-100 -100v-450h100v-100h-100v-100h-100v100h-500v500h-100v100h100v100zM200 600v-350l350 350h-350zM600 550l-350 -350h350v350z" />
<glyph glyph-name="4d" unicode="&#xe04d;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM400 600c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z
M200 452c0 20 15 42 34 48h3h3h8c12 0 28 -7 36 -16l91 -90l25 6c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100l6 25l-90 91c-9 8 -16 24 -16 36zM550 500c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
<glyph glyph-name="4e" unicode="&#xe04e;"
d="M300 800h200v-300h200l-300 -300l-300 300h200v300zM0 100h800v-100h-800v100z" />
<glyph glyph-name="4f" unicode="&#xe04f;"
d="M0 800h800v-100h-800v100zM400 600l300 -300h-200v-300h-200v300h-200z" />
<glyph glyph-name="50" unicode="&#xe050;"
d="M200 700h600v-600h-600l-200 300zM350 622l-72 -72l150 -150l-150 -150l72 -72l150 150l150 -150l72 72l-150 150l150 150l-72 72l-150 -150z" />
<glyph glyph-name="51" unicode="&#xe051;"
d="M400 700c220 0 400 -180 400 -400h-100c0 166 -134 300 -300 300s-300 -134 -300 -300h-100c0 220 180 400 400 400zM341 491l59 -88l59 88c81 -25 141 -101 141 -191c0 -110 -90 -200 -200 -200s-200 90 -200 200c0 90 60 166 141 191z" />
<glyph glyph-name="52" unicode="&#xe052;"
d="M0 800h300v-400h400v-400h-700v800zM400 800l300 -300h-300v300zM100 600v-100h100v100h-100zM100 400v-100h100v100h-100zM100 200v-100h400v100h-400z" />
<glyph glyph-name="53" unicode="&#xe053;" horiz-adv-x="600"
d="M200 700h100v-100h75c30 0 58 -6 81 -22s44 -44 44 -78v-100h-100v94c-4 3 -13 6 -25 6h-250c-14 0 -25 -11 -25 -25v-50c0 -15 20 -40 34 -44l257 -65c66 -16 109 -73 109 -141v-50c0 -68 -57 -125 -125 -125h-75v-100h-100v100h-75c-30 0 -58 6 -81 22s-44 44 -44 78
v100h100v-94c4 -3 13 -6 25 -6h250c14 0 25 11 25 25v50c0 15 -20 40 -34 44l-257 65c-66 16 -109 73 -109 141v50c0 68 57 125 125 125h75v100z" />
<glyph glyph-name="54" unicode="&#xe054;"
d="M0 700h300v-300l-300 -300v600zM500 700h300v-300l-300 -300v600z" />
<glyph glyph-name="55" unicode="&#xe055;"
d="M300 700v-600h-300v300zM800 700v-600h-300v300z" />
<glyph glyph-name="56" unicode="&#xe056;"
d="M300 700v-100c-111 0 -200 -89 -200 -200h200v-300h-300v300c0 165 135 300 300 300zM800 700v-100c-111 0 -200 -89 -200 -200h200v-300h-300v300c0 165 135 300 300 300z" />
<glyph glyph-name="57" unicode="&#xe057;"
d="M0 700h300v-300c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-200v300zM500 700h300v-300c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-200v300z" />
<glyph glyph-name="58" unicode="&#xe058;" horiz-adv-x="600"
d="M300 800l34 -34c11 -11 266 -270 266 -488c0 -165 -135 -300 -300 -300s-300 135 -300 300c0 218 255 477 266 488zM150 328c-28 0 -50 -22 -50 -50c0 -110 90 -200 200 -200c28 0 50 22 50 50s-22 50 -50 50c-55 0 -100 45 -100 100c0 28 -22 50 -50 50z" />
<glyph glyph-name="59" unicode="&#xe059;"
d="M400 800l400 -500h-800zM0 200h800v-200h-800v200z" />
<glyph glyph-name="5a" unicode="&#xe05a;" horiz-adv-x="600"
d="M300 800l300 -300h-600zM0 300h600l-300 -300z" />
<glyph glyph-name="5b" unicode="&#xe05b;"
d="M0 500h200v-200h-200v200zM300 500h200v-200h-200v200zM600 500h200v-200h-200v200z" />
<glyph glyph-name="5c" unicode="&#xe05c;"
d="M0 700h800v-100l-400 -200l-400 200v100zM0 500l400 -200l400 200v-400h-800v400z" />
<glyph glyph-name="5d" unicode="&#xe05d;"
d="M400 800l400 -200v-600h-800v600zM400 688l-300 -150v-188l300 -150l300 150v188zM200 500h400v-100l-200 -100l-200 100v100z" />
<glyph glyph-name="5e" unicode="&#xe05e;"
d="M600 700c69 0 134 -19 191 -50l-16 -106c-49 35 -109 56 -175 56c-131 0 -240 -84 -281 -200h331l-16 -100h-334c0 -36 8 -68 19 -100h297l-16 -100h-222c55 -61 133 -100 222 -100c78 0 147 30 200 78v-122c-59 -35 -127 -56 -200 -56c-147 0 -274 82 -344 200h-256
l19 100h197c-8 32 -16 66 -16 100h-200l25 100h191c45 172 198 300 384 300z" />
<glyph glyph-name="5f" unicode="&#xe05f;"
d="M0 700h700v-100h-700v100zM0 500h500v-100h-500v100zM0 300h800v-100h-800v100zM0 100h100v-100h-100v100zM200 100h100v-100h-100v100zM400 100h100v-100h-100v100z" />
<glyph glyph-name="60" unicode="&#xe060;"
d="M0 800h800v-100h-800v100zM200 600h400l-200 -200zM0 200h800v-200h-800v200z" />
<glyph glyph-name="61" unicode="&#xe061;"
d="M0 800h100v-800h-100v800zM600 800h200v-800h-200v800zM200 600l200 -200l-200 -200v400z" />
<glyph glyph-name="62" unicode="&#xe062;"
d="M0 800h200v-800h-200v800zM700 800h100v-800h-100v800zM600 600v-400l-200 200z" />
<glyph glyph-name="63" unicode="&#xe063;"
d="M0 800h800v-200h-800v200zM400 400l200 -200h-400zM0 100h800v-100h-800v100z" />
<glyph glyph-name="64" unicode="&#xe064;"
d="M0 800h200v-100h-100v-600h600v100h100v-200h-800v800zM400 800h400v-400l-150 150l-250 -250l-100 100l250 250z" />
<glyph glyph-name="65" unicode="&#xe065;"
d="M403 700c247 0 397 -300 397 -300s-150 -300 -397 -300c-253 0 -403 300 -403 300s150 300 403 300zM400 600c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200zM400 500c10 0 19 -3 28 -6c-16 -8 -28 -24 -28 -44c0 -28 22 -50 50 -50
c20 0 36 12 44 28c3 -9 6 -18 6 -28c0 -55 -45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
<glyph glyph-name="66" unicode="&#xe066;" horiz-adv-x="900"
d="M331 700h3h3c3 1 7 1 10 1c12 0 29 -8 37 -17l94 -93l66 65c57 57 155 57 212 0c58 -58 58 -154 0 -212l-65 -66l93 -94c10 -8 18 -25 18 -38c0 -28 -22 -50 -50 -50c-13 0 -32 9 -40 20l-62 65l-381 -381h-269v272l375 381l-63 63c-9 8 -16 24 -16 36c0 20 16 42 35 48z
M447 481l-313 -315l128 -132l316 316z" />
<glyph glyph-name="67" unicode="&#xe067;"
d="M0 800h300v-400h400v-400h-700v800zM400 800l300 -300h-300v300z" />
<glyph glyph-name="68" unicode="&#xe068;"
d="M200 800c0 0 200 -100 200 -300s-298 -302 -200 -500c0 0 -200 100 -200 300s300 300 200 500zM500 500c0 0 200 -100 200 -300c0 -150 -60 -200 -100 -200h-300c0 200 300 300 200 500z" />
<glyph glyph-name="69" unicode="&#xe069;"
d="M0 800h100v-800h-100v800zM200 800h300v-100h300l-200 -203l200 -197h-400v100h-200v400z" />
<glyph glyph-name="6a" unicode="&#xe06a;" horiz-adv-x="400"
d="M150 800h150l-100 -200h200l-150 -300h150l-300 -300l-100 300h134l66 200h-200z" />
<glyph glyph-name="6b" unicode="&#xe06b;"
d="M0 800h300v-100h500v-100h-800v200zM0 500h800v-450c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v450z" />
<glyph glyph-name="6c" unicode="&#xe06c;"
d="M150 800c83 0 150 -67 150 -150c0 -66 -41 -121 -100 -141v-118c15 5 33 9 50 9h200c28 0 50 22 50 50v59c-59 20 -100 75 -100 141c0 83 67 150 150 150s150 -67 150 -150c0 -66 -41 -121 -100 -141v-59c0 -82 -68 -150 -150 -150h-200c-14 0 -25 -7 -34 -16
c50 -24 84 -74 84 -134c0 -83 -67 -150 -150 -150s-150 67 -150 150c0 66 41 121 100 141v218c-59 20 -100 75 -100 141c0 83 67 150 150 150z" />
<glyph glyph-name="6d" unicode="&#xe06d;"
d="M0 800h400l-150 -150l150 -150l-100 -100l-150 150l-150 -150v400zM500 400l150 -150l150 150v-400h-400l150 150l-150 150z" />
<glyph glyph-name="6e" unicode="&#xe06e;"
d="M100 800l150 -150l150 150v-400h-400l150 150l-150 150zM400 400h400l-150 -150l150 -150l-100 -100l-150 150l-150 -150v400z" />
<glyph glyph-name="6f" unicode="&#xe06f;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700c-56 0 -108 -17 -153 -44l22 -19c33 -18 13 -48 -13 -59c-30 -13 -77 10 -65 -41c13 -55 -27 -3 -47 -15c-42 -26 49 -152 31 -156l-59 34c-8 0 -13 -5 -16 -10
c1 -30 10 -57 19 -84c28 -11 77 -2 100 -25c47 -28 97 -115 75 -159c34 -13 68 -22 106 -22c101 0 193 48 247 125c3 24 -8 44 -50 44c-69 0 -156 13 -153 97c2 46 101 108 66 143c-30 30 12 39 12 66c0 37 -65 32 -69 50s20 36 41 56c-30 10 -60 19 -94 19zM631 591
c-38 -11 -94 -35 -87 -53c6 -15 52 -1 65 -13c11 -10 16 -59 44 -31l22 22v3c-11 26 -26 50 -44 72z" />
<glyph glyph-name="70" unicode="&#xe070;"
d="M703 800l97 -100l-400 -400l-100 100l-200 -203l-100 100l300 303l100 -100zM0 100h800v-100h-800v100z" />
<glyph glyph-name="71" unicode="&#xe071;"
d="M0 700h100v-100h-100v100zM200 700h100v-100h-100v100zM400 700h100v-100h-100v100zM600 700h100v-100h-100v100zM0 500h100v-100h-100v100zM200 500h100v-100h-100v100zM400 500h100v-100h-100v100zM600 500h100v-100h-100v100zM0 300h100v-100h-100v100zM200 300h100
v-100h-100v100zM400 300h100v-100h-100v100zM600 300h100v-100h-100v100zM0 100h100v-100h-100v100zM200 100h100v-100h-100v100zM400 100h100v-100h-100v100zM600 100h100v-100h-100v100z" />
<glyph glyph-name="72" unicode="&#xe072;"
d="M0 800h200v-200h-200v200zM300 800h200v-200h-200v200zM600 800h200v-200h-200v200zM0 500h200v-200h-200v200zM300 500h200v-200h-200v200zM600 500h200v-200h-200v200zM0 200h200v-200h-200v200zM300 200h200v-200h-200v200zM600 200h200v-200h-200v200z" />
<glyph glyph-name="73" unicode="&#xe073;"
d="M0 800h300v-300h-300v300zM500 800h300v-300h-300v300zM0 300h300v-300h-300v300zM500 300h300v-300h-300v300z" />
<glyph glyph-name="74" unicode="&#xe074;"
d="M19 800h662c11 0 19 -8 19 -19v-331c0 -28 -22 -50 -50 -50h-600c-28 0 -50 22 -50 50v331c0 11 8 19 19 19zM0 309c16 -6 32 -9 50 -9h600c18 0 34 3 50 9v-290c0 -11 -8 -19 -19 -19h-662c-11 0 -19 8 -19 19v290zM550 200c-28 0 -50 -22 -50 -50s22 -50 50 -50
s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="75" unicode="&#xe075;"
d="M0 700h300v-100h-50c-28 0 -50 -22 -50 -50v-150h300v150c0 28 -22 50 -50 50h-50v100h300v-100h-50c-28 0 -50 -22 -50 -50v-400c0 -28 22 -50 50 -50h50v-100h-300v100h50c28 0 50 22 50 50v150h-300v-150c0 -28 22 -50 50 -50h50v-100h-300v100h50c28 0 50 22 50 50
v400c0 28 -22 50 -50 50h-50v100z" />
<glyph glyph-name="76" unicode="&#xe076;"
d="M400 700c165 0 300 -135 300 -300v-100h50c28 0 50 -22 50 -50v-200c0 -28 -22 -50 -50 -50h-100c-28 0 -50 22 -50 50v350c0 111 -89 200 -200 200s-200 -89 -200 -200v-350c0 -28 -22 -50 -50 -50h-100c-28 0 -50 22 -50 50v200c0 28 22 50 50 50h50v100
c0 165 135 300 300 300z" />
<glyph glyph-name="77" unicode="&#xe077;"
d="M0 500c0 109 91 200 200 200s200 -91 200 -200c0 109 91 200 200 200s200 -91 200 -200c0 -55 -23 -105 -59 -141l-341 -340l-341 340c-36 36 -59 86 -59 141z" />
<glyph glyph-name="78" unicode="&#xe078;"
d="M400 700l400 -300l-100 3v-403h-200v200h-200v-200h-200v400h-100z" />
<glyph glyph-name="79" unicode="&#xe079;"
d="M0 800h800v-800h-800v800zM100 700v-300l100 100l400 -400h100v100l-200 200l100 100l100 -100v300h-600z" />
<glyph glyph-name="7a" unicode="&#xe07a;"
d="M19 800h762c11 0 19 -8 19 -19v-762c0 -11 -8 -19 -19 -19h-762c-11 0 -19 8 -19 19v762c0 11 8 19 19 19zM100 600v-300h100l100 -100h200l100 100h100v300h-600z" />
<glyph glyph-name="7b" unicode="&#xe07b;"
d="M200 600c80 0 142 -56 200 -122c58 66 119 122 200 122c131 0 200 -101 200 -200s-69 -200 -200 -200c-81 0 -142 56 -200 122c-58 -66 -121 -122 -200 -122c-131 0 -200 101 -200 200s69 200 200 200zM200 500c-74 0 -100 -54 -100 -100s26 -100 100 -100
c42 0 88 47 134 100c-46 53 -92 100 -134 100zM600 500c-43 0 -88 -47 -134 -100c46 -53 91 -100 134 -100c74 0 100 54 100 100s-26 100 -100 100z" />
<glyph glyph-name="7c" unicode="&#xe07c;" horiz-adv-x="400"
d="M300 800c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100zM150 550c83 0 150 -69 150 -150c0 -66 -100 -214 -100 -250c0 -28 22 -50 50 -50s50 22 50 50h100c0 -83 -67 -150 -150 -150s-150 64 -150 150s100 222 100 250s-22 50 -50 50
s-50 -22 -50 -50h-100c0 83 67 150 150 150z" />
<glyph glyph-name="7d" unicode="&#xe07d;"
d="M200 800h500v-100h-122c-77 -197 -156 -392 -234 -588l-6 -12h162v-100h-500v100h122c77 197 156 392 234 588l7 12h-163v100z" />
<glyph glyph-name="7e" unicode="&#xe07e;"
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM100 100h600v-100h-600v100z" />
<glyph glyph-name="7f" unicode="&#xe07f;"
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100z" />
<glyph glyph-name="80" unicode="&#xe080;"
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM200 100h600v-100h-600v100z" />
<glyph glyph-name="81" unicode="&#xe081;"
d="M550 800c138 0 250 -112 250 -250s-112 -250 -250 -250c-16 0 -32 0 -47 3l-3 -3v-100h-200v-200h-300v200l303 303c-3 15 -3 31 -3 47c0 138 112 250 250 250zM600 700c-55 0 -100 -45 -100 -100s45 -100 100 -100s100 45 100 100s-45 100 -100 100z" />
<glyph glyph-name="82" unicode="&#xe082;"
d="M134 600h3h4h4h5h500c28 0 50 -22 50 -50v-350h100v-150c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v150h100v350v2c0 20 15 42 34 48zM200 500v-300h100v-100h200v100h100v300h-400z" />
<glyph glyph-name="83" unicode="&#xe083;"
d="M0 800h400v-400h-400v400zM500 600h100v-400h-400v100h300v300zM700 400h100v-400h-400v100h300v300z" />
<glyph glyph-name="84" unicode="&#xe084;" horiz-adv-x="600"
d="M337 694c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-300 -150c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50c0 21 16 44 37 49zM437 544c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-400 -200c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50
c0 21 16 44 37 49zM437 344c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-106 -56c24 -4 43 -26 43 -50c0 -28 -23 -51 -51 -51c-2 0 -6 1 -8 1h-200c-26 1 -48 24 -48 50c0 16 12 36 26 44zM151 -50c0 23 20 50 46 50h3h4h5h100c28 0 50 -22 50 -50
s-22 -50 -50 -50h-100c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51z" />
<glyph glyph-name="85" unicode="&#xe085;"
d="M199 800h100v-200h-200v100h100v100zM586 797h1c18 1 38 1 56 -3c36 -8 69 -26 97 -54c78 -78 78 -203 0 -281l-150 -150c-8 -13 -28 -24 -43 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43l150 150c40 40 39 105 0 144c-41 41 -110 34 -144 0l-44 -44
c-8 -13 -27 -24 -42 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43l43 44c32 33 72 53 128 56zM208 490c4 5 14 16 22 16h3c2 0 6 1 8 1c28 0 50 -22 50 -50c0 -11 -6 -27 -14 -35l-150 -150c-40 -40 -39 -105 0 -144c41 -41 110 -34 144 0l44 44c8 13 27 24 42 24
c28 0 50 -22 50 -50c0 -15 -11 -35 -24 -43l-43 -44c-22 -22 -48 -37 -75 -47c-70 -25 -151 -9 -207 47c-78 78 -78 203 0 281zM499 200h200v-100h-100v-100h-100v200z" />
<glyph glyph-name="86" unicode="&#xe086;"
d="M586 797c18 1 39 1 57 -3c36 -8 69 -26 97 -54c78 -78 78 -203 0 -281l-150 -150c-62 -62 -132 -81 -182 -78s-69 17 -84 25s-26 27 -26 44c0 28 22 51 50 51c8 0 19 -3 26 -7c0 0 15 -11 41 -13s62 3 106 47l150 150c40 40 39 105 0 144c-41 41 -110 34 -144 0
c-8 -13 -28 -24 -43 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43c32 33 72 53 128 56zM386 566c50 -2 64 -17 85 -22s37 -28 37 -49c0 -28 -22 -50 -50 -50c-10 0 -23 5 -31 11c0 0 -19 9 -47 10s-63 -4 -103 -44l-150 -150c-40 -40 -39 -105 0 -144c41 -41 110 -34 144 0
c8 13 27 24 42 24c28 0 50 -22 50 -50c0 -15 -10 -35 -23 -43c-22 -22 -48 -37 -75 -47c-70 -25 -151 -9 -207 47c-78 78 -78 203 0 281l150 150c60 60 128 78 178 76z" />
<glyph glyph-name="87" unicode="&#xe087;"
d="M0 700h300v-300h-300v300zM400 700h400v-100h-400v100zM400 500h300v-100h-300v100zM0 300h300v-300h-300v300zM400 300h400v-100h-400v100zM400 100h300v-100h-300v100z" />
<glyph glyph-name="88" unicode="&#xe088;"
d="M50 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 700h600v-100h-600v100zM50 500c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 500h600v-100h-600v100zM50 300c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50
s22 50 50 50zM200 300h600v-100h-600v100zM50 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 100h600v-100h-600v100z" />
<glyph glyph-name="89" unicode="&#xe089;"
d="M800 800l-400 -800l-100 300l-300 100z" />
<glyph glyph-name="8a" unicode="&#xe08a;" horiz-adv-x="600"
d="M300 700c110 0 200 -90 200 -200v-100h100v-400h-600v400h100v100c0 110 90 200 200 200zM300 600c-56 0 -100 -44 -100 -100v-100h200v100c0 56 -44 100 -100 100z" />
<glyph glyph-name="8b" unicode="&#xe08b;" horiz-adv-x="600"
d="M300 800c110 0 200 -90 200 -200v-200h100v-400h-600v400h400v200c0 56 -44 100 -100 100s-100 -44 -100 -100h-100c0 110 90 200 200 200z" />
<glyph glyph-name="8c" unicode="&#xe08c;"
d="M400 700v-100c-111 0 -200 -89 -200 -200h100l-150 -200l-150 200h100c0 165 135 300 300 300zM650 600l150 -200h-100c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-100z" />
<glyph glyph-name="8d" unicode="&#xe08d;"
d="M100 800h600v-300h100l-150 -250l-150 250h100v200h-400v-100h-100v200zM150 550l150 -250h-100v-200h400v100h100v-200h-600v300h-100z" />
<glyph glyph-name="8e" unicode="&#xe08e;"
d="M600 700l200 -150l-200 -150v100h-500v-100h-100v100c0 55 45 100 100 100h500v100zM200 300v-100h500v100h100v-100c0 -55 -45 -100 -100 -100h-500v-100l-200 150z" />
<glyph glyph-name="8f" unicode="&#xe08f;" horiz-adv-x="900"
d="M350 800c193 0 350 -157 350 -350c0 -60 -17 -117 -44 -166c5 -3 12 -8 16 -12l100 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 100c-4 3 -9 9 -12 13c-49 -26 -107 -41 -166 -41c-193 0 -350 157 -350 350s157 350 350 350zM350 200
c142 0 250 108 250 250c0 139 -111 250 -250 250s-250 -111 -250 -250s111 -250 250 -250z" />
<glyph glyph-name="90" unicode="&#xe090;" horiz-adv-x="600"
d="M300 800c166 0 300 -134 300 -300c0 -200 -300 -500 -300 -500s-300 300 -300 500c0 166 134 300 300 300zM300 700c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200z" />
<glyph glyph-name="91" unicode="&#xe091;" horiz-adv-x="900"
d="M0 800h800v-541c1 -3 1 -8 1 -11s0 -7 -1 -10v-238h-800v800zM495 250c0 26 22 50 50 50h5h150v400h-600v-600h600v100h-150h-5c-28 0 -50 22 -50 50zM350 600c83 0 150 -67 150 -150c0 -100 -150 -250 -150 -250s-150 150 -150 250c0 83 67 150 150 150zM350 500
c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="92" unicode="&#xe092;" horiz-adv-x="600"
d="M0 700h200v-600h-200v600zM400 700h200v-600h-200v600z" />
<glyph glyph-name="93" unicode="&#xe093;" horiz-adv-x="600"
d="M0 700l600 -300l-600 -300v600z" />
<glyph glyph-name="94" unicode="&#xe094;" horiz-adv-x="600"
d="M300 700c166 0 300 -134 300 -300s-134 -300 -300 -300s-300 134 -300 300s134 300 300 300z" />
<glyph glyph-name="95" unicode="&#xe095;"
d="M400 700v-600l-400 300zM400 400l400 300v-600z" />
<glyph glyph-name="96" unicode="&#xe096;"
d="M0 700l400 -300l-400 -300v600zM400 100v600l400 -300z" />
<glyph glyph-name="97" unicode="&#xe097;"
d="M0 700h200v-600h-200v600zM200 400l500 300v-600z" />
<glyph glyph-name="98" unicode="&#xe098;"
d="M0 700l500 -300l-500 -300v600zM500 100v600h200v-600h-200z" />
<glyph glyph-name="99" unicode="&#xe099;" horiz-adv-x="600"
d="M0 700h600v-600h-600v600z" />
<glyph glyph-name="9a" unicode="&#xe09a;"
d="M200 800h400v-200h200v-400h-200v-200h-400v200h-200v400h200v200z" />
<glyph glyph-name="9b" unicode="&#xe09b;"
d="M0 700h800v-100h-800v100zM0 403h800v-100h-800v100zM0 103h800v-100h-800v100z" />
<glyph glyph-name="9c" unicode="&#xe09c;" horiz-adv-x="600"
d="M278 700c7 2 13 4 22 4c55 0 100 -45 100 -100v-4v-200c0 -55 -45 -100 -100 -100s-100 45 -100 100v200v2c0 44 35 88 78 98zM34 500h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-50c0 -111 89 -200 200 -200s200 89 200 200v50c0 28 22 50 50 50s50 -22 50 -50v-50
c0 -148 -109 -270 -250 -294v-106h50c55 0 100 -45 100 -100h-400c0 55 45 100 100 100h50v106c-141 24 -250 146 -250 294v50v2c0 20 15 42 34 48z" />
<glyph glyph-name="9d" unicode="&#xe09d;"
d="M0 500h800v-200h-800v200z" />
<glyph glyph-name="9e" unicode="&#xe09e;"
d="M34 700h4h3h4h5h700c28 0 50 -22 50 -50v-500c0 -28 -22 -50 -50 -50h-250v-100h100c55 0 100 -45 100 -100h-600c0 55 45 100 100 100h100v100h-250c-28 0 -50 22 -50 50v500v2c0 20 15 42 34 48zM100 600v-400h600v400h-600z" />
<glyph glyph-name="9f" unicode="&#xe09f;"
d="M272 700c-14 -40 -22 -83 -22 -128c0 -221 179 -400 400 -400c45 0 88 8 128 22c-53 -158 -202 -272 -378 -272c-221 0 -400 179 -400 400c0 176 114 325 272 378z" />
<glyph glyph-name="a0" unicode="&#xe0a0;"
d="M350 700l150 -150h-100v-150h150v100l150 -150l-150 -150v100h-150v-150h100l-150 -150l-150 150h100v150h-150v-100l-150 150l150 150v-100h150v150h-100z" />
<glyph glyph-name="a1" unicode="&#xe0a1;"
d="M800 800v-550c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150c17 0 35 -4 50 -9v206c-201 -6 -327 -27 -400 -50v-397c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150c17 0 35 -4 50 -9v409s100 100 600 100z" />
<glyph glyph-name="a2" unicode="&#xe0a2;" horiz-adv-x="700"
d="M499 700c51 0 102 -20 141 -59c78 -78 78 -203 0 -281l-250 -244c-48 -48 -127 -48 -175 0s-48 127 0 175l96 97l69 -69l-90 -94l-7 -3c-10 -10 -10 -28 0 -38s28 -10 38 0l250 247c37 40 39 102 0 141s-104 40 -144 0l-278 -275c-66 -69 -68 -179 0 -247
c69 -69 181 -69 250 0l9 12l116 113l69 -69l-125 -125c-107 -107 -281 -107 -388 0s-107 281 0 388l278 272c39 39 90 59 141 59z" />
<glyph glyph-name="a3" unicode="&#xe0a3;"
d="M600 800l200 -200l-100 -100l-200 200zM400 600l200 -200l-400 -400h-200v200z" />
<glyph glyph-name="a4" unicode="&#xe0a4;"
d="M550 800c83 0 150 -90 150 -200s-67 -200 -150 -200c-22 0 -40 8 -59 19c6 26 9 52 9 81c0 84 -27 158 -72 212c27 52 71 88 122 88zM250 700c83 0 150 -90 150 -200s-67 -200 -150 -200s-150 90 -150 200s67 200 150 200zM725 384c44 -22 75 -66 75 -118v-166h-200v66
c0 50 -17 96 -44 134c66 2 126 33 169 84zM75 284c45 -53 106 -84 175 -84s130 31 175 84c44 -22 75 -66 75 -118v-166h-500v166c0 52 31 96 75 118z" />
<glyph glyph-name="a5" unicode="&#xe0a5;"
d="M400 800c110 0 200 -112 200 -250s-90 -250 -200 -250s-200 112 -200 250s90 250 200 250zM191 300c54 -61 128 -100 209 -100s155 39 209 100c106 -5 191 -92 191 -200v-100h-800v100c0 108 85 195 191 200z" />
<glyph glyph-name="a6" unicode="&#xe0a6;" horiz-adv-x="600"
d="M19 800h462c11 0 19 -8 19 -19v-762c0 -11 -8 -19 -19 -19h-462c-11 0 -19 8 -19 19v762c0 11 8 19 19 19zM100 700v-500h300v500h-300zM250 150c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="a7" unicode="&#xe0a7;"
d="M350 800c17 0 34 -1 50 -3v-397l-297 297c63 64 150 103 247 103zM500 694c169 -25 300 -168 300 -344c0 -193 -157 -350 -350 -350c-85 0 -161 31 -222 81l272 272v341zM91 562l237 -234l-212 -212c-70 55 -116 138 -116 234c0 84 35 158 91 212z" />
<glyph glyph-name="a8" unicode="&#xe0a8;"
d="M92 650c0 23 20 50 46 50h3h4h5h400c28 0 50 -22 50 -50s-22 -50 -50 -50h-50v-200h100c55 0 100 -45 100 -100h-300v-300l-56 -100l-44 100v300h-300c0 55 45 100 100 100h100v200h-50c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51z" />
<glyph glyph-name="a9" unicode="&#xe0a9;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM300 600v-400l300 200z" />
<glyph glyph-name="aa" unicode="&#xe0aa;"
d="M300 800h200v-300h300v-200h-300v-300h-200v300h-300v200h300v300z" />
<glyph glyph-name="ab" unicode="&#xe0ab;"
d="M300 800h100v-400h-100v400zM172 656l62 -78l-40 -31c-58 -46 -94 -117 -94 -197c0 -139 111 -250 250 -250s250 111 250 250c0 80 -39 151 -97 197l-37 31l62 78l38 -31c82 -64 134 -164 134 -275c0 -193 -157 -350 -350 -350s-350 157 -350 350c0 111 53 211 134 275z
" />
<glyph glyph-name="ac" unicode="&#xe0ac;"
d="M200 800h400v-200h-400v200zM9 500h782c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-91v200h-600v-200h-91c-6 0 -9 3 -9 9v282c0 6 3 9 9 9zM200 300h400v-300h-400v300z" />
<glyph glyph-name="ad" unicode="&#xe0ad;"
d="M0 700h100v-700h-100v700zM700 700h100v-700h-100v700zM200 600h200v-100h-200v100zM300 400h200v-100h-200v100zM400 200h200v-100h-200v100z" />
<glyph glyph-name="ae" unicode="&#xe0ae;"
d="M325 700c42 -141 87 -280 131 -419c29 74 59 148 88 222c30 -57 58 -114 87 -172h169v-100h-231l-13 28c-37 -92 -74 -184 -112 -275c-38 129 -79 257 -119 385c-42 -133 -83 -267 -125 -400c-28 88 -56 175 -84 262h-116v100h188l9 -34l3 -6c42 137 83 273 125 409z" />
<glyph glyph-name="af" unicode="&#xe0af;"
d="M200 600c0 57 43 100 100 100s100 -43 100 -100c0 -28 -18 -48 -28 -72c-3 -6 -3 -16 -3 -28h231v-231c12 0 22 0 28 3c24 10 44 28 72 28c57 0 100 -43 100 -100s-43 -100 -100 -100c-28 0 -48 18 -72 28c-6 3 -16 3 -28 3v-231h-231c0 12 0 22 3 28c10 24 28 44 28 72
c0 57 -43 100 -100 100s-100 -43 -100 -100c0 -28 18 -48 28 -72c3 -6 3 -16 3 -28h-231v600h231c0 12 0 22 -3 28c-10 24 -28 44 -28 72z" />
<glyph glyph-name="b0" unicode="&#xe0b0;" horiz-adv-x="500"
d="M247 700c84 0 148 -20 191 -59s59 -93 59 -141c0 -117 -69 -181 -119 -225s-81 -67 -81 -150v-25h-100v25c0 117 65 181 115 225s85 67 85 150c0 25 -8 48 -28 66s-56 34 -122 34s-97 -18 -116 -37s-27 -43 -31 -69l-100 12c5 38 19 88 59 128s103 66 188 66zM197 0h100
v-100h-100v100z" />
<glyph glyph-name="b1" unicode="&#xe0b1;"
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -69 -48 -127 -112 -144c-22 55 -75 94 -138 94c-20 0 -39 -5 -56 -12c-17 64 -75 112 -144 112s-127 -48 -144 -112c-17 7 -36 12 -56 12c-37 0 -71 -12 -97 -34c-33 36 -53 82 -53 134
c0 110 90 200 200 200c23 114 129 200 250 200zM334 300h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-200c0 -28 -22 -50 -50 -50s-50 22 -50 50v200v2c0 20 15 42 34 48zM134 200h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-100c0 -28 -22 -50 -50 -50s-50 22 -50 50v100v2
c0 20 15 42 34 48zM534 200h3h4c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-100c0 -28 -22 -50 -50 -50s-50 22 -50 50v100v2c0 20 15 42 34 48z" />
<glyph glyph-name="b2" unicode="&#xe0b2;"
d="M600 800l200 -150l-200 -150v100h-50l-153 -191l175 -206l6 -3h22v100l200 -150l-200 -150v100h-25c-35 0 -56 12 -78 38l-166 190l-153 -190c-22 -27 -43 -38 -78 -38h-100v100h100l166 206l-163 191l-3 3h-100v100h100c34 0 56 -12 78 -38l153 -178l141 178
c22 27 43 38 78 38h50v100z" />
<glyph glyph-name="b3" unicode="&#xe0b3;"
d="M400 800c110 0 209 -47 281 -119l119 119v-300h-300l109 109c-54 55 -126 91 -209 91c-166 0 -300 -134 -300 -300s134 -300 300 -300c83 0 158 34 212 88l72 -72c-72 -72 -174 -116 -284 -116c-220 0 -400 180 -400 400s180 400 400 400z" />
<glyph glyph-name="b4" unicode="&#xe0b4;"
d="M400 800h400v-400l-166 166l-400 -400l166 -166h-400v400l166 -166l400 400z" />
<glyph glyph-name="b5" unicode="&#xe0b5;" horiz-adv-x="600"
d="M250 800l250 -300h-200v-200h200l-250 -300l-250 300h200v200h-200z" />
<glyph glyph-name="b6" unicode="&#xe0b6;"
d="M300 600v-200h200v200l300 -250l-300 -250v200h-200v-200l-300 250z" />
<glyph glyph-name="b7" unicode="&#xe0b7;"
d="M0 800c441 0 800 -359 800 -800h-200c0 333 -267 600 -600 600v200zM0 500c275 0 500 -225 500 -500h-200c0 167 -133 300 -300 300v200zM0 200c110 0 200 -90 200 -200h-200v200z" />
<glyph glyph-name="b8" unicode="&#xe0b8;"
d="M100 800c386 0 700 -314 700 -700h-100c0 332 -268 600 -600 600v100zM100 600c276 0 500 -224 500 -500h-100c0 222 -178 400 -400 400v100zM100 400c165 0 300 -135 300 -300h-100c0 111 -89 200 -200 200v100zM100 200c55 0 100 -45 100 -100s-45 -100 -100 -100
s-100 45 -100 100s45 100 100 100z" />
<glyph glyph-name="b9" unicode="&#xe0b9;"
d="M300 800h400c55 0 100 -45 100 -100v-200h-400v150c0 28 -22 50 -50 50s-50 -22 -50 -50v-250h400v-300c0 -55 -45 -100 -100 -100h-500c-55 0 -100 45 -100 100v200h100v-150c0 -28 22 -50 50 -50s50 22 50 50v550c0 55 45 100 100 100z" />
<glyph glyph-name="ba" unicode="&#xe0ba;"
d="M75 700h225v-100h-200v-500h400v100h100v-125c0 -41 -34 -75 -75 -75h-450c-41 0 -75 34 -75 75v550c0 41 34 75 75 75zM600 700l200 -200l-200 -200v100h-200c-94 0 -173 -65 -194 -153c23 199 189 353 394 353v100z" />
<glyph glyph-name="bb" unicode="&#xe0bb;"
d="M500 700l300 -284l-300 -316v200h-100c-200 0 -348 -102 -400 -300c0 295 100 500 500 500v200z" />
<glyph glyph-name="bc" unicode="&#xe0bc;"
d="M381 791l19 9l19 -9c127 -53 253 -108 381 -160v-31c0 -166 -67 -313 -147 -419c-40 -53 -83 -97 -125 -128s-82 -53 -128 -53s-86 22 -128 53s-85 75 -125 128c-80 107 -147 253 -147 419v31c128 52 254 107 381 160zM400 100v591l-294 -122c8 -126 58 -243 122 -328
c35 -46 73 -86 106 -110s62 -31 66 -31z" />
<glyph glyph-name="bd" unicode="&#xe0bd;"
d="M600 800h100v-800h-100v800zM400 700h100v-700h-100v700zM200 500h100v-500h-100v500zM0 300h100v-300h-100v300z" />
<glyph glyph-name="be" unicode="&#xe0be;"
d="M300 800h100v-200h200l100 -100l-100 -100h-200v-400h-100v500h-200l-100 100l100 100h200v100z" />
<glyph glyph-name="bf" unicode="&#xe0bf;"
d="M200 800h100v-600h200l-250 -200l-250 200h200v600zM400 800h200v-100h-200v100zM400 600h300v-100h-300v100zM400 400h400v-100h-400v100z" />
<glyph glyph-name="c0" unicode="&#xe0c0;"
d="M200 800h100v-600h200l-250 -200l-250 200h200v600zM400 800h400v-100h-400v100zM400 600h300v-100h-300v100zM400 400h200v-100h-200v100z" />
<glyph glyph-name="c1" unicode="&#xe0c1;"
d="M75 700h650c41 0 75 -34 75 -75v-550c0 -41 -34 -75 -75 -75h-650c-41 0 -75 34 -75 75v550c0 41 34 75 75 75zM100 600v-100h100v100h-100zM300 600v-100h400v100h-400zM100 400v-100h100v100h-100zM300 400v-100h400v100h-400zM100 200v-100h100v100h-100zM300 200
v-100h400v100h-400z" />
<glyph glyph-name="c2" unicode="&#xe0c2;"
d="M400 800l100 -300h300l-250 -200l100 -300l-250 200l-250 -200l100 300l-250 200h300z" />
<glyph glyph-name="c3" unicode="&#xe0c3;"
d="M400 800c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM150 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM650 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM400 600c110 0 200 -90 200 -200
s-90 -200 -200 -200s-200 90 -200 200s90 200 200 200zM50 450c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM750 450c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM150 200c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50
s22 50 50 50zM650 200c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM400 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
<glyph glyph-name="c4" unicode="&#xe0c4;"
d="M34 800h632c18 0 34 -16 34 -34v-732c0 -18 -16 -34 -34 -34h-632c-18 0 -34 16 -34 34v732c0 18 16 34 34 34zM100 700v-500h500v500h-500zM350 150c-38 0 -63 -42 -44 -75s69 -33 88 0s-6 75 -44 75z" />
<glyph glyph-name="c5" unicode="&#xe0c5;"
d="M0 800h300l500 -500l-300 -300l-500 500v300zM200 700c-55 0 -100 -45 -100 -100s45 -100 100 -100s100 45 100 100s-45 100 -100 100z" />
<glyph glyph-name="c6" unicode="&#xe0c6;"
d="M0 600h200l300 -300l-200 -200l-300 300v200zM340 600h160l300 -300l-200 -200l-78 78l119 122zM150 500c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="c7" unicode="&#xe0c7;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM400 600c110 0 200 -90 200 -200s-90 -200 -200 -200s-200 90 -200 200
s90 200 200 200zM400 500c-56 0 -100 -44 -100 -100s44 -100 100 -100s100 44 100 100s-44 100 -100 100z" />
<glyph glyph-name="c8" unicode="&#xe0c8;"
d="M0 700h559l-100 -100h-359v-500h500v159l100 100v-359h-700v700zM700 700l100 -100l-400 -400l-200 200l100 100l100 -100z" />
<glyph glyph-name="c9" unicode="&#xe0c9;"
d="M9 800h782c6 0 9 -3 9 -9v-782c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v782c0 6 3 9 9 9zM150 722l-72 -72l100 -100l-100 -100l72 -72l172 172zM400 500v-100h300v100h-300z" />
<glyph glyph-name="ca" unicode="&#xe0ca;"
d="M0 800h800v-200h-50c0 55 -45 100 -100 100h-150v-550c0 -28 22 -50 50 -50h50v-100h-400v100h50c28 0 50 22 50 50v550h-150c-55 0 -100 -45 -100 -100h-50v200z" />
<glyph glyph-name="cb" unicode="&#xe0cb;"
d="M0 700h100v-400h-100v400zM200 700h350c21 0 39 -13 47 -31c0 0 103 -291 103 -319s-22 -50 -50 -50h-150c-28 0 -50 -25 -50 -50s39 -158 47 -184s-5 -55 -31 -63s-52 5 -66 31s-109 219 -128 238s-44 28 -72 28v400z" />
<glyph glyph-name="cc" unicode="&#xe0cc;"
d="M400 666c10 19 28 32 47 34l19 -3c26 -8 39 -37 31 -63s-47 -159 -47 -184s22 -50 50 -50h150c28 0 50 -22 50 -50s-103 -319 -103 -319c-8 -18 -26 -31 -47 -31h-350v400c28 0 53 9 72 28s114 212 128 238zM0 400h100v-400h-100v400z" />
<glyph glyph-name="cd" unicode="&#xe0cd;"
d="M200 700h300v-100h-100v-6c25 -4 50 -8 72 -16l-34 -94c-28 11 -58 16 -88 16c-139 0 -250 -111 -250 -250s111 -250 250 -250s250 111 250 250c0 31 -5 60 -16 88l91 37c14 -38 25 -81 25 -125c0 -193 -157 -350 -350 -350s-350 157 -350 350c0 176 130 323 300 347v3
h-100v100zM700 584c0 0 -296 -348 -316 -368s-48 -20 -68 0s-20 48 0 68s384 300 384 300z" />
<glyph glyph-name="ce" unicode="&#xe0ce;"
d="M600 700l200 -150l-200 -150v100h-600v100h600v100zM200 300v-100h600v-100h-600v-100l-200 150z" />
<glyph glyph-name="cf" unicode="&#xe0cf;"
d="M300 800h100c55 0 100 -45 100 -100h100c55 0 100 -45 100 -100h-700c0 55 45 100 100 100h100c0 55 45 100 100 100zM100 500h100v-350c0 -28 22 -50 50 -50s50 22 50 50v350h100v-350c0 -28 22 -50 50 -50s50 22 50 50v350h100v-481c0 -11 -8 -19 -19 -19h-462
c-11 0 -19 8 -19 19v481z" />
<glyph glyph-name="d0" unicode="&#xe0d0;"
d="M100 800h200v-400c0 -55 45 -100 100 -100s100 45 100 100v400h100v-400c0 -110 -90 -200 -200 -200h-50c-138 0 -250 90 -250 200v400zM0 100h700v-100h-700v100z" />
<glyph glyph-name="d1" unicode="&#xe0d1;"
d="M9 700h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM609 700h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM309 500h182c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v282
c0 6 3 9 9 9zM0 100h800v-100h-800v100z" />
<glyph glyph-name="d2" unicode="&#xe0d2;"
d="M10 700h181c6 0 9 -3 9 -9v-191h-200v191c0 6 4 9 10 9zM610 700h181c6 0 9 -3 9 -9v-191h-200v191c0 6 5 9 10 9zM310 600h181c6 0 9 -3 9 -9v-91h-200v91c0 6 4 9 10 9zM0 400h800v-100h-800v100zM0 200h200v-191c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v191zM300 200
h200v-91c0 -6 -3 -9 -9 -9h-181c-6 0 -10 3 -10 9v91zM600 200h200v-191c0 -6 -3 -9 -9 -9h-181c-6 0 -10 3 -10 9v191z" />
<glyph glyph-name="d3" unicode="&#xe0d3;"
d="M0 700h800v-100h-800v100zM9 500h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM309 500h182c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v282c0 6 3 9 9 9zM609 500h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182
c-6 0 -9 3 -9 9v482c0 6 3 9 9 9z" />
<glyph glyph-name="d4" unicode="&#xe0d4;"
d="M50 600h500c28 0 50 -22 50 -50v-150l100 100h100v-300h-100l-100 100v-150c0 -28 -22 -50 -50 -50h-500c-28 0 -50 22 -50 50v400c0 28 22 50 50 50z" />
<glyph glyph-name="d5" unicode="&#xe0d5;"
d="M334 800h66v-800h-66l-134 200h-200v400h200zM500 600v100c26 0 52 -4 75 -10c130 -33 225 -150 225 -290s-95 -258 -225 -291h-3c-23 -6 -47 -9 -72 -9v100c17 0 34 2 50 6c86 22 150 100 150 194s-64 172 -150 194c-16 4 -33 6 -50 6zM500 500l25 -3
c44 -11 75 -51 75 -97s-32 -86 -75 -97l-25 -3v200z" />
<glyph glyph-name="d6" unicode="&#xe0d6;" horiz-adv-x="600"
d="M334 800h66v-800h-66l-134 200h-200v400h200zM500 500l25 -3c44 -11 75 -51 75 -97s-32 -86 -75 -97l-25 -3v200z" />
<glyph glyph-name="d7" unicode="&#xe0d7;" horiz-adv-x="400"
d="M334 800h66v-800h-66l-134 200h-200v400h200z" />
<glyph glyph-name="d8" unicode="&#xe0d8;"
d="M309 800h82c6 0 10 -4 12 -9l294 -682l3 -19v-81c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v81l3 19l294 682c2 5 6 9 12 9zM300 500v-200h100v200h-100zM300 200v-100h100v100h-100z" />
<glyph glyph-name="d9" unicode="&#xe0d9;"
d="M375 800c138 0 269 -39 378 -109l-53 -82c-93 60 -205 91 -325 91c-119 0 -229 -32 -322 -91l-53 82c109 70 237 109 375 109zM375 500c78 0 154 -23 216 -62l-53 -85c-46 30 -104 47 -163 47c-60 0 -112 -17 -159 -47l-54 85c62 40 134 62 213 62zM375 200
c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
<glyph glyph-name="da" unicode="&#xe0da;" horiz-adv-x="900"
d="M551 800c16 0 32 0 47 -3l-97 -97v-200h200l97 97c3 -15 3 -31 3 -47c0 -138 -112 -250 -250 -250c-32 0 -62 8 -90 19l-288 -291c-20 -20 -46 -28 -72 -28s-52 8 -72 28c-39 39 -39 105 0 144l291 287c-11 28 -19 59 -19 91c0 138 112 250 250 250zM101 150
c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="db" unicode="&#xe0db;"
d="M141 700c84 -84 169 -167 253 -250c82 83 167 165 247 250l143 -141l-253 -253c84 -82 167 -166 253 -247l-143 -143c-81 86 -165 169 -247 253l-253 -253l-141 143c85 80 167 164 250 247c-83 84 -166 169 -250 253z" />
<glyph glyph-name="dc" unicode="&#xe0dc;"
d="M0 800h100l231 -300h38l231 300h100l-225 -300h225v-100h-300v-100h300v-100h-300v-200h-100v200h-300v100h300v100h-300v100h225z" />
<glyph glyph-name="dd" unicode="&#xe0dd;" horiz-adv-x="900"
d="M350 800c193 0 350 -157 350 -350c0 -61 -17 -119 -44 -169c4 -2 10 -6 13 -9l103 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 103c-3 3 -7 9 -9 13c-50 -28 -108 -44 -169 -44c-193 0 -350 157 -350 350s157 350 350 350zM350 700
c-139 0 -250 -111 -250 -250s111 -250 250 -250c62 0 119 23 163 60c7 11 19 25 31 31l3 3c34 43 53 97 53 156c0 139 -111 250 -250 250zM300 600h100v-100h100v-100h-100v-100h-100v100h-100v100h100v100z" />
<glyph glyph-name="de" unicode="&#xe0de;" horiz-adv-x="900"
d="M350 800c193 0 350 -157 350 -350c0 -61 -17 -119 -44 -169c4 -2 10 -6 13 -9l103 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 103c-3 3 -7 9 -9 13c-50 -28 -108 -44 -169 -44c-193 0 -350 157 -350 350s157 350 350 350zM350 700
c-139 0 -250 -111 -250 -250s111 -250 250 -250c62 0 119 23 163 60c7 11 19 25 31 31l3 3c34 43 53 97 53 156c0 139 -111 250 -250 250zM200 500h300v-100h-300v100z" />
</font>
</defs></svg>

Before

Width:  |  Height:  |  Size: 54 KiB

View File

@ -1,9 +0,0 @@
.autocomplete-suggestions {
text-align: left; cursor: default; border: 1px solid #ccc; border-top: 0; background: #fff; box-shadow: -1px 1px 3px rgba(0,0,0,.1);
/* core styles should not be changed */
position: absolute; display: none; z-index: 9999; max-height: 254px; overflow: hidden; overflow-y: auto; box-sizing: border-box;
}
.autocomplete-suggestion { position: relative; padding: 0 .6em; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.02em; color: #333; }
.autocomplete-suggestion b { font-weight: normal; color: #1f8dd6; }
.autocomplete-suggestion.selected { background: #f0f0f0; }

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
function showAlert(text) { function showAlert(text) {
console.log("[INFO] Function showAlert() called."); console.log("[INFO] Function showAlert() called.");
$("#alert").html(text); $("#alert").html(text);
$("#alert").slideDown().delay(<?php echo $GLOBALS['ALERT_DISSAPEAR_IN']*1000 ?>).slideUp(); $("#alert").slideDown().delay(<?php echo ALERT_DISAPPEAR_IN*1000 ?>).slideUp();
} }
<?php if (Alert::defined()): ?> <?php if (Alert::defined()): ?>

View File

@ -1,18 +1,19 @@
<?php <?php
// Preload the first 10 files to not call via AJAX when the user open the first time the media manager // Preload the first 10 files to not call via AJAX when the user open the first time the media manager
$listOfFiles = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS, '*', '*', $GLOBALS['BLUDIT_MEDIA_MANAGER_SORT_BY_DATE'], false); $listOfFilesByPage = Filesystem::listFiles(PAGE_THUMBNAILS_DIRECTORY, '*', '*', MEDIA_MANAGER_SORT_BY_DATE, MEDIA_MANAGER_NUMBER_OF_FILES);
$listOfFilesByPage = array_chunk($listOfFiles, $GLOBALS['BLUDIT_MEDIA_MANAGER_AMOUNT_OF_FILES']);
$preLoadFiles = array(); $preLoadFiles = array();
if (!empty($listOfFilesByPage[0])) { if (!empty($listOfFilesByPage[0])) {
foreach ($listOfFilesByPage[0] as $file) { foreach ($listOfFilesByPage[0] as $file) {
array_push($preLoadFiles, basename($file)); $filename = Filesystem::filename($file);
array_push($preLoadFiles, $filename);
} }
} }
// Amount of pages for the paginator // Amount of pages for the paginator
$amountOfPages = count($listOfFilesByPage); $numberOfPages = count($listOfFilesByPage);
?> ?>
<div id="jsbluditMediaModal" class="modal fade" tabindex="-1" role="dialog"> <div id="jsmediaManagerModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="container-fluid"> <div class="container-fluid">
@ -22,42 +23,35 @@ $amountOfPages = count($listOfFilesByPage);
<!-- <!--
UPLOAD INPUT UPLOAD INPUT
--> -->
<h3 class="mt-2 mb-3">Upload</h3> <h3 class="mt-2 mb-3"><i class="fa fa-image"></i> <?php $L->p('Images'); ?></h3>
<div id="jsalertMedia" class="alert alert-warning d-none" role="alert"></div>
<!-- Form and Input file --> <!-- Form and Input file -->
<form name="bluditFormUpload" id="jsbluditFormUpload" enctype="multipart/form-data"> <form name="bluditFormUpload" id="jsbluditFormUpload" enctype="multipart/form-data">
<input type="hidden" name="tokenCSRF" value="<?php echo $security->getTokenCSRF() ?>">
<div class="custom-file"> <div class="custom-file">
<input type="file" class="custom-file-input" id="jsbluditInputFiles" name="bluditInputFiles[]" multiple> <input type="file" class="custom-file-input" id="jsimages" name="images[]" multiple>
<label class="custom-file-label" for="jsbluditInputFiles">Choose images</label> <label class="custom-file-label" for="jsimages"><?php $L->p('Choose images to upload'); ?></label>
</div> </div>
</form> </form>
<!-- Progress bar --> <!-- Progress bar -->
<div class="progress mt-2"> <div class="progress mt-2">
<div id="jsbluditProgressBar" class="progress-bar bg-info" role="progressbar" style="width:0%"></div> <div id="jsbluditProgressBar" class="progress-bar bg-primary" role="progressbar" style="width:0%"></div>
</div> </div>
<!-- <!--
MANAGER IMAGES LIST
--> -->
<h3 class="mt-4 mb-3">Manage</h3>
<!-- Table for list files --> <!-- Table for list files -->
<table id="jsbluditMediaTable" class="table"> <table id="jsbluditMediaTable" class="table mt-2">
<tr> <tr>
<td>There are not images.</td> <td><?php $L->p('There are no images'); ?></td>
</tr> </tr>
</table> </table>
<!-- Paginator --> <!-- Paginator -->
<nav> <nav id="jsbluditMediaTablePagination"></nav>
<ul class="pagination justify-content-center">
<?php for ($i=1; $i<=$amountOfPages; $i++): ?>
<li class="page-item"><button type="button" class="btn btn-link page-link" onClick="getFiles(<?php echo $i ?>)"><?php echo $i ?></button></li>
<?php endfor; ?>
</ul>
</nav>
</div> </div>
</div> </div>
@ -73,100 +67,193 @@ echo 'var preLoadFiles = '.json_encode($preLoadFiles).';';
?> ?>
function openMediaManager() { function openMediaManager() {
$('#jsbluditMediaModal').modal('show'); $('#jsmediaManagerModal').modal('show');
} }
function closeMediaManager() { function closeMediaManager() {
$('#jsbluditMediaModal').modal('hide'); $('#jsmediaManagerModal').modal('hide');
} }
// Remove all files from the table // Remove all files from the table
function cleanFiles() { function cleanTable() {
$('#jsbluditMediaTable').empty(); $('#jsbluditMediaTable').empty();
} }
function showMediaAlert(message) {
$("#jsalertMedia").html(message).removeClass('d-none');
}
function hideMediaAlert() {
$("#jsalertMedia").addClass('d-none');
}
// Show the files in the table // Show the files in the table
function displayFiles(files) { function displayFiles(files, numberOfPages = <?= $numberOfPages ?>) {
if (!Array.isArray(files)) {
return false;
}
// Clean table // Clean table
cleanFiles(); cleanTable();
// Regenerate the table // Regenerate the table
$.each(files, function(key, filename) { if (files.length > 0) {
tableRow = '<tr id="js'+filename+'">'+ $.each(files, function(key, filename) {
'<td style="width:80px"><img class="img-thumbnail" alt="200x200" src="<?php echo HTML_PATH_UPLOADS_THUMBNAILS ?>'+filename+'" style="width: 50px; height: 50px;"><\/td>'+ var thumbnail = "<?php echo PAGE_THUMBNAILS_URL; ?>"+filename;
'<td class="information">'+ var image = "<?php echo PAGE_IMAGES_URL; ?>"+filename;
'<div class="pb-2">'+filename+'<\/div>'+
'<div>'+ tableRow = '<tr id="js'+filename+'">'+
'<button onClick="editorInsertMedia(\''+filename+'\'); closeMediaManager();" type="button" class="btn btn-primary btn-sm mr-2">Insert<\/button>'+ '<td style="width:80px"><img class="img-thumbnail" alt="200x200" src="'+thumbnail+'" style="width: 50px; height: 50px;"><\/td>'+
'<button onClick="setCoverImage(\''+filename+'\'); closeMediaManager();" type="button" class="btn btn-primary btn-sm mr-2">Set as cover image<\/button>'+ '<td class="information">'+
'<button onClick="deleteMedia(\''+filename+'\')" type="button" class="btn btn-sm float-right">Delete<\/button>'+ '<div class="text-primary pb-2">'+filename+'<\/div>'+
'<\/div>'+ '<div>'+
'<\/td>'+ '<a href="#" class="mr-3 text-secondary" onClick="editorInsertMedia(\''+image+'\'); closeMediaManager();"><i class="fa fa-plus"></i><?php $L->p('Insert') ?><\/a>'+
'<\/tr>'; '<a href="#" class="text-secondary" onClick="setCoverImage(\''+filename+'\'); closeMediaManager();"><i class="fa fa-square-o"></i><?php $L->p('Set as cover image') ?><\/button>'+
$('#jsbluditMediaTable').append(tableRow); '<a href="#" class="float-right text-danger" onClick="deleteMedia(\''+filename+'\')"><i class="fa fa-trash-o"></i><?php $L->p('Delete') ?><\/a>'+
}); '<\/div>'+
'<\/td>'+
'<\/tr>';
$('#jsbluditMediaTable').append(tableRow);
});
mediaPagination = '<ul class="pagination justify-content-center flex-wrap">';
for (var i = 1; i <= numberOfPages; i++) {
mediaPagination += '<li class="page-item"><button type="button" class="btn btn-link page-link" onClick="getFiles('+i+')">'+i+'</button></li>';
}
mediaPagination += '</ul>';
$('#jsbluditMediaTablePagination').html(mediaPagination);
}
if (files.length == 0) {
$('#jsbluditMediaTable').html("<p><?php (IMAGE_RESTRICT ? $L->p('There are no images for the page') : $L->p('There are no images')) ?></p>");
$('#jsbluditMediaTablePagination').html('');
}
} }
// Get the list of files via AJAX, filter by the page number // Get the list of files via AJAX, filter by the page number
function getFiles(pageNumber) { function getFiles(pageNumber) {
$.post("<?php echo HTML_PATH_ADMIN_ROOT ?>ajax/list-files", $.post(HTML_PATH_ADMIN_ROOT+"ajax/list-images",
{ tokenCSRF: tokenCSRF, { tokenCSRF: tokenCSRF,
pageNumber: pageNumber, pageNumber: pageNumber,
path: "<?php echo PATH_UPLOADS_THUMBNAILS ?>" uuid: "<?php echo PAGE_IMAGES_KEY ?>",
path: "thumbnails" // the paths are defined in ajax/list-images
}, },
function(data) { function(data) { // success function
displayFiles(data.files); if (data.status==0) {
}); displayFiles(data.files, data.numberOfPages);
} else {
console.log(data.message);
}
}
);
} }
// Delete the file and the thumbnail if exist // Delete the file and the thumbnail if exist
function deleteMedia(filename) { function deleteMedia(filename) {
$.post("<?php echo HTML_PATH_ADMIN_ROOT ?>ajax/delete-file", $.post(HTML_PATH_ADMIN_ROOT+"ajax/delete-image",
{ tokenCSRF: tokenCSRF, { tokenCSRF: tokenCSRF,
filename: filename filename: filename,
uuid: "<?php echo PAGE_IMAGES_KEY; ?>"
}, },
function(data) { function(data) { // success function
getFiles(1); if (data.status==0) {
}); getFiles(1);
} else {
console.log(data.message);
}
}
);
} }
function setCoverImage(filename) { function setCoverImage(filename) {
var image = "<?php echo PAGE_IMAGES_URL; ?>"+filename;
$("#jscoverImage").val(filename); $("#jscoverImage").val(filename);
$("#jscoverImagePreview").attr("src", HTML_PATH_UPLOADS_THUMBNAILS+filename); $("#jscoverImagePreview").attr("src", image);
}
function uploadImages() {
// Remove current alerts
hideMediaAlert();
var images = $("#jsimages")[0].files;
for (var i=0; i < images.length; i++) {
// Check file type/extension
const validImageTypes = ['image/gif', 'image/jpeg', 'image/png', 'image/svg+xml'];
if (!validImageTypes.includes(images[i].type)) {
showMediaAlert("<?php echo $L->g('File type is not supported. Allowed types:').' '.implode(', ',$GLOBALS['ALLOWED_IMG_EXTENSION']) ?>");
return false;
}
// Check file size and compare with PHP upload_max_filesize
if (images[i].size > UPLOAD_MAX_FILESIZE) {
showMediaAlert("<?php echo $L->g('Maximum load file size allowed:').' '.ini_get('upload_max_filesize') ?>");
return false;
}
};
// Clean progress bar
$("#jsbluditProgressBar").removeClass().addClass("progress-bar bg-primary");
$("#jsbluditProgressBar").width("0");
// Data to send via AJAX
var formData = new FormData($("#jsbluditFormUpload")[0]);
formData.append("uuid", "<?php echo PAGE_IMAGES_KEY ?>");
formData.append("tokenCSRF", tokenCSRF);
$.ajax({
url: HTML_PATH_ADMIN_ROOT+"ajax/upload-images",
type: "POST",
data: formData,
cache: false,
contentType: false,
processData: false,
xhr: function() {
var xhr = $.ajaxSettings.xhr();
if (xhr.upload) {
xhr.upload.addEventListener("progress", function(e) {
if (e.lengthComputable) {
var percentComplete = (e.loaded / e.total)*100;
$("#jsbluditProgressBar").width(percentComplete+"%");
}
}, false);
}
return xhr;
}
}).done(function(data) {
if (data.status==0) {
$("#jsbluditProgressBar").removeClass("bg-primary").addClass("bg-success");
// Get the files for the first page, this include the files uploaded
getFiles(1);
} else {
$("#jsbluditProgressBar").removeClass("bg-primary").addClass("bg-danger");
showMediaAlert(data.message);
}
});
} }
$(document).ready(function() { $(document).ready(function() {
// Display the files preloaded for the first time // Display the files preloaded for the first time
displayFiles(preLoadFiles); displayFiles(preLoadFiles);
// Event to wait the selected files // Select image event
$("#jsbluditInputFiles").on("change", function() { $("#jsimages").on("change", function(e) {
uploadImages();
});
// Check file size ? // Drag and drop image
// Check file type/extension ? $(window).on("dragover dragenter", function(e) {
e.preventDefault();
e.stopPropagation();
openMediaManager();
});
$.ajax({ // Drag and drop image
url: "<?php echo HTML_PATH_ADMIN_ROOT ?>ajax/upload-files", $(window).on("drop", function(e) {
type: "POST", e.preventDefault();
data: new FormData($("#jsbluditFormUpload")[0]), e.stopPropagation();
cache: false, $("#jsimages").prop("files", e.originalEvent.dataTransfer.files);
contentType: false, uploadImages();
processData: false,
xhr: function() {
var xhr = $.ajaxSettings.xhr();
if (xhr.upload) {
xhr.upload.addEventListener("progress", function(e) {
if (e.lengthComputable) {
var percentComplete = (e.loaded / e.total)*100;
$("#jsbluditProgressBar").width(percentComplete+"%");
}
}, false);
}
return xhr;
}
}).done(function() {
// Get the files of the first page, this include the files uploaded
getFiles(1);
});
}); });
}); });

View File

@ -0,0 +1,58 @@
<nav class="navbar navbar-expand-lg navbar-dark bg-dark text-uppercase d-block d-lg-none">
<div class="container">
<span class="navbar-brand">
<?php echo (defined('BLUDIT_PRO'))?'BLUDIT PRO':'BLUDIT' ?></span>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>">
<?php $L->p('Dashboard') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ROOT ?>">
<?php $L->p('Website') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>">
<?php $L->p('New content') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>">
<?php $L->p('Content') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>">
<?php $L->p('Categories') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>">
<?php $L->p('Users') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'settings' ?>">
<?php $L->p('Settings') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>">
<?php $L->p('Plugins') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>">
<?php $L->p('Themes') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>">
<?php $L->p('About') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>">
<?php $L->p('Logout') ?></a>
</li>
</ul>
</div>
</div>
</nav>

View File

@ -2,31 +2,33 @@
<ul class="nav flex-column pt-4"> <ul class="nav flex-column pt-4">
<li class="nav-item mb-4" style="margin-left: -4px;"> <li class="nav-item mb-4" style="margin-left: -4px;">
<img src="<?php echo HTML_PATH_ADMIN_THEME ?>img/logo.svg" width="20" height="20" alt="bludit-logo"><span class="ml-2 align-middle"><?php echo (defined('BLUDIT_PRO'))?'BLUDIT PRO':'BLUDIT' ?></span> <img src="<?php echo HTML_PATH_CORE_IMG ?>logo.svg" width="20" height="20" alt="bludit-logo"><span class="ml-2 align-middle"><?php echo (defined('BLUDIT_PRO'))?'BLUDIT PRO':'BLUDIT' ?></span>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><span class="oi oi-dashboard"></span><?php $L->p('Dashboard') ?></a> <a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><span class="fa fa-dashboard"></span><?php $L->p('Dashboard') ?></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><span class="oi oi-external-link"></span><?php $L->p('Website') ?></a> <a class="nav-link" target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><span class="fa fa-home"></span><?php $L->p('Website') ?></a>
</li> </li>
<li class="nav-item mt-3"> <li class="nav-item mt-3">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>"><span class="oi oi-plus"></span><?php $L->p('New content') ?></a> <a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>"><span style="color: #0078D4;" class="fa fa-plus-circle"></span><?php $L->p('New content') ?></a>
</li> </li>
<?php if (checkRole(array('editor'),false)): ?> <?php if (!checkRole(array('admin'),false)): ?>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><span class="oi oi-layers"></span><?php $L->p('Content') ?></a> <a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><span class="fa fa-archive"></span><?php $L->p('Content') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$login->username() ?>"><span class="fa fa-user"></span><?php $L->p('Profile') ?></a>
</li> </li>
<?php endif; ?> <?php endif; ?>
<?php if (checkRole(array('admin'),false)): ?> <?php if (checkRole(array('admin'),false)): ?>
<li class="nav-item mt-3"> <li class="nav-item mt-3">
<h4>Manage</h4> <h4><?php $L->p('Manage') ?></h4>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><?php $L->p('Content') ?></a> <a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><?php $L->p('Content') ?></a>
@ -40,7 +42,7 @@
</li> </li>
<li class="nav-item mt-3"> <li class="nav-item mt-3">
<h4>Settings</h4> <h4><?php $L->p('Settings') ?></h4>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'settings' ?>"><?php $L->p('General') ?></a> <a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'settings' ?>"><?php $L->p('General') ?></a>
@ -55,6 +57,10 @@
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><?php $L->p('About') ?></a> <a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><?php $L->p('About') ?></a>
</li> </li>
<?php endif; ?>
<?php if (checkRole(array('admin', 'editor'),false)): ?>
<?php <?php
if (!empty($plugins['adminSidebar'])) { if (!empty($plugins['adminSidebar'])) {
echo '<li class="nav-item"><hr></li>'; echo '<li class="nav-item"><hr></li>';
@ -65,9 +71,10 @@
} }
} }
?> ?>
<?php endif; ?> <?php endif; ?>
<li class="nav-item mt-5"> <li class="nav-item mt-5">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>"><span class="oi oi-account-logout"></span><?php $L->p('Logout') ?></a> <a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>"><span class="fa fa-arrow-circle-right"></span><?php $L->p('Logout') ?></a>
</li> </li>
</ul> </ul>

View File

@ -1,8 +0,0 @@
<!-- Check if the user is logged -->
<script>
setInterval(
function() {
var ajax = new bluditAjax();
ajax.userLogged(showAlert);
}, 15000);
</script>

View File

@ -5,37 +5,43 @@
<meta charset="<?php echo CHARSET ?>"> <meta charset="<?php echo CHARSET ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="noindex,nofollow"> <meta name="robots" content="noindex,nofollow">
<meta name="generator" content="Bludit">
<!-- Favicon --> <!-- Favicon -->
<link rel="shortcut icon" type="image/x-icon" href="<?php echo DOMAIN_ADMIN_THEME.'img/favicon.png?version='.BLUDIT_VERSION ?>"> <link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG.'favicon.png?version='.BLUDIT_VERSION ?>">
<!-- CSS --> <!-- CSS -->
<?php <?php
echo Theme::cssBootstrap(); echo Theme::cssBootstrap();
echo Theme::cssLineAwesome();
echo Theme::css(array( echo Theme::css(array(
'jquery-auto-complete.css', 'bludit.css',
'open-iconic-bootstrap.min.css', 'bludit.bootstrap.css'
'jquery.datetimepicker.min.css',
'bludit.css'
), DOMAIN_ADMIN_THEME_CSS); ), DOMAIN_ADMIN_THEME_CSS);
echo Theme::css(array(
'jquery.datetimepicker.min.css',
'select2.min.css',
'select2-bootstrap4.min.css'
), DOMAIN_CORE_CSS);
?> ?>
<!-- Javascript --> <!-- Javascript -->
<?php <?php
echo Theme::jquery(); echo Theme::jquery();
echo Theme::jsBootstrap(); echo Theme::jsBootstrap();
echo Theme::js(array(
'jquery-auto-complete.min.js',
'jquery.datetimepicker.full.min.js'
), DOMAIN_ADMIN_THEME_JS);
echo Theme::jsSortable(); echo Theme::jsSortable();
echo Theme::js(array(
'jquery.datetimepicker.full.min.js',
'select2.full.min.js',
'functions.js'
), DOMAIN_CORE_JS);
?> ?>
<!-- Plugins --> <!-- Plugins -->
<?php Theme::plugins('adminHead') ?> <?php Theme::plugins('adminHead') ?>
</head> </head>
<body> <body class="h-100">
<!-- Plugins --> <!-- Plugins -->
<?php Theme::plugins('adminBodyBegin') ?> <?php Theme::plugins('adminBodyBegin') ?>
@ -51,12 +57,18 @@
echo '</script>'.PHP_EOL; echo '</script>'.PHP_EOL;
?> ?>
<!-- Overlay background -->
<div id="jsshadow"></div>
<!-- Alert --> <!-- Alert -->
<?php include('html/alert.php'); ?> <?php include('html/alert.php'); ?>
<div class="container"> <!-- Navbar, only for small devices -->
<?php include('html/navbar.php'); ?>
<div class="container h-100">
<!-- 25%/75% split on large devices, small, medium devices hide --> <!-- 25%/75% split on large devices, small, medium devices hide -->
<div class="row"> <div class="row h-100">
<!-- LEFT SIDEBAR - Display only on large devices --> <!-- LEFT SIDEBAR - Display only on large devices -->
<div class="sidebar col-lg-2 d-none d-lg-block"> <div class="sidebar col-lg-2 d-none d-lg-block">
@ -64,7 +76,7 @@
</div> </div>
<!-- RIGHT MAIN --> <!-- RIGHT MAIN -->
<div class="col-lg-10 pt-4"> <div class="col-lg-10 pt-3 pb-1 h-100">
<?php <?php
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) { if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) {
include(PATH_ADMIN_VIEWS.$layout['view'].'.php'); include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
@ -77,9 +89,6 @@
</div> </div>
</div> </div>
<!-- Check user logged and Internet connection -->
<?php include('html/user-logged.php'); ?>
<!-- Plugins --> <!-- Plugins -->
<?php Theme::plugins('adminBodyEnd') ?> <?php Theme::plugins('adminBodyEnd') ?>

View File

@ -24,8 +24,8 @@ return <<<EOF
<p>$modalText</p> <p>$modalText</p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="$buttonSecondaryClass btn btn-secondary" data-dismiss="modal">$buttonSecondary</button> <button type="button" class="btn $buttonSecondaryClass" data-dismiss="modal">$buttonSecondary</button>
<button type="button" class="$buttonPrimaryClass btn btn-primary">$buttonPrimary</button> <button type="button" class="btn $buttonPrimaryClass">$buttonPrimary</button>
</div> </div>
</div> </div>
</div> </div>
@ -44,7 +44,7 @@ EOF;
} }
if (isset($args['icon'])) { if (isset($args['icon'])) {
return '<a '.$options.'><span class="oi oi-'.$args['icon'].'" style="font-size: 0.7em;"></span> '.$args['title'].'</a>'; return '<a '.$options.'><span class="fa fa-'.$args['icon'].'"></span>'.$args['title'].'</a>';
} }
return '<a '.$options.'>'.$args['title'].'</a>'; return '<a '.$options.'>'.$args['title'].'</a>';
@ -56,7 +56,7 @@ EOF;
$title = $args['title']; $title = $args['title'];
return <<<EOF return <<<EOF
<h2 class="mt-0 mb-3"> <h2 class="mt-0 mb-3">
<span class="oi oi-$icon" style="font-size: 0.7em;"></span> $title <span class="fa fa-$icon" style="font-size: 0.9em;"></span><span>$title</span>
</h2> </h2>
EOF; EOF;
} }
@ -68,9 +68,10 @@ EOF;
$enctype = empty($args['enctype'])?'':'enctype="'.$args['enctype'].'"'; $enctype = empty($args['enctype'])?'':'enctype="'.$args['enctype'].'"';
$action = empty($args['action'])?'action=""':'action="'.$args['action'].'"'; $action = empty($args['action'])?'action=""':'action="'.$args['action'].'"';
$method = empty($args['method'])?'method="post"':'method="'.$args['method'].'"'; $method = empty($args['method'])?'method="post"':'method="'.$args['method'].'"';
$style = empty($args['style'])?'':'style="'.$args['style'].'"';
return <<<EOF return <<<EOF
<form $class $enctype $id $method $action autocomplete="off"> <form $class $enctype $id $method $action $style autocomplete="off">
EOF; EOF;
} }
@ -95,37 +96,54 @@ EOF;
{ {
$title = $args['title']; $title = $args['title'];
return <<<EOF return <<<EOF
<h4 class="mt-4 mb-3 font-weight-normal">$title</h4> <h6 class="mt-4 mb-2 pb-2 border-bottom text-uppercase">$title</h6>
EOF; EOF;
} }
public static function formInputTextBlock($args) public static function formInputTextBlock($args)
{ {
$id = 'js'.$args['name']; $name = $args['name'];
$disabled = empty($args['disabled'])?'':'disabled';
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
$value = isset($args['value'])?$args['value']:'';
$id = 'js'.$name;
if (isset($args['id'])) { if (isset($args['id'])) {
$id = $args['id']; $id = $args['id'];
} }
$class = 'form-control'; $tip = '';
if (!empty($args['tip'])) {
$tip = '<small class="form-text text-muted">'.$args['tip'].'</small>';
}
$class = 'form-group m-0';
if (isset($args['class'])) { if (isset($args['class'])) {
$class = $class.' '.$args['class']; $class = $args['class'];
} }
$html = '<div class="form-group">'; $labelClass = 'mt-4 mb-2 pb-2 border-bottom text-uppercase w-100';
if (isset($args['labelClass'])) {
if (isset($args['label'])) { $labelClass = $args['labelClass'];
$html .= '<label for="'.$id.'">'.$args['label'].'</label>';
} }
$html .= '<input type="text" value="'.$args['value'].'" class="'.$class.'" id="'.$id.'" name="'.$args['name'].'" placeholder="'.$args['placeholder'].'">'; $label = '';
if (!empty($args['label'])) {
if (isset($args['tip'])) { $label = '<label class="'.$labelClass.'" for="'.$id.'">'.$args['label'].'</label>';
$html .= '<small class="form-text text-muted">'.$args['tip'].'</small>';
} }
$html .= '</div>'; $type = 'text';
if (isset($args['type'])) {
$type = $args['type'];
}
return $html; return <<<EOF
<div class="$class">
$label
<input type="text" value="$value" class="form-control" id="$id" name="$name" placeholder="$placeholder" $disabled>
$tip
</div>
EOF;
} }
public static function formInputFile($args) public static function formInputFile($args)
@ -162,12 +180,12 @@ EOF;
$html = '<div class="form-group row">'; $html = '<div class="form-group row">';
if (isset($args['label'])) { if (!empty($args['label'])) {
$html .= '<label for="'.$id.'" class="col-sm-2 col-form-label">'.$args['label'].'</label>'; $html .= '<label for="'.$id.'" class="col-sm-2 col-form-label">'.$args['label'].'</label>';
} }
$html .= '<div class="col-sm-10">'; $html .= '<div class="col-sm-10">';
$html .= '<textarea class="'.$class.'" id="'.$id.'" name="'.$args['name'].'" rows="'.$args['rows'].'" placeholder="'.$args['placeholder'].'"></textarea>'; $html .= '<textarea class="'.$class.'" id="'.$id.'" name="'.$args['name'].'" rows="'.$args['rows'].'" placeholder="'.$args['placeholder'].'">'.$args['value'].'</textarea>';
if (isset($args['tip'])) { if (isset($args['tip'])) {
$html .= '<small class="form-text text-muted">'.$args['tip'].'</small>'; $html .= '<small class="form-text text-muted">'.$args['tip'].'</small>';
} }
@ -191,7 +209,7 @@ EOF;
$html = '<div class="form-group m-0">'; $html = '<div class="form-group m-0">';
if (!empty($args['label'])) { if (!empty($args['label'])) {
$html .= '<label for="'.$id.'">'.$args['label'].'</label>'; $html .= '<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100" for="'.$id.'">'.$args['label'].'</label>';
} }
$html .= '<textarea class="'.$class.'" id="'.$id.'" name="'.$args['name'].'" rows="'.$args['rows'].'" placeholder="'.$args['placeholder'].'">'.$args['value'].'</textarea>'; $html .= '<textarea class="'.$class.'" id="'.$id.'" name="'.$args['name'].'" rows="'.$args['rows'].'" placeholder="'.$args['placeholder'].'">'.$args['value'].'</textarea>';
@ -203,45 +221,28 @@ EOF;
return $html; return $html;
} }
public static function formInputGroupText($args)
{
$label = $args['label'];
$labelInside = $args['labelInside'];
$tip = $args['tip'];
$value = $args['value'];
$name = $args['name'];
$id = 'js'.$name;
if (isset($args['id'])) {
$id = $args['id'];
}
$disabled = isset($args['disabled'])?'disabled':'';
return <<<EOF
<div class="form-group">
<label for="$id">$label</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="$id">$labelInside</span>
</div>
<input id="$id" name="$name" value="$value" type="text" class="form-control" $disabled>
</div>
<small class="form-text text-muted">$tip</small>
</div>
EOF;
}
public static function formInputText($args) public static function formInputText($args)
{ {
$label = isset($args['label'])?$args['label']:'';
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
$tip = isset($args['tip'])?$args['tip']:'&nbsp;';
$value = isset($args['value'])?$args['value']:'';
$name = $args['name']; $name = $args['name'];
$disabled = empty($args['disabled'])?'':'disabled';
$readonly = empty($args['readonly'])?'':'readonly';
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
$value = isset($args['value'])?$args['value']:'';
$id = 'js'.$name; $id = 'js'.$name;
if (isset($args['id'])) { if (isset($args['id'])) {
$id = $args['id']; $id = $args['id'];
} }
$disabled = isset($args['disabled'])?'disabled':'';
$tip = '';
if (isset($args['tip'])) {
$tip = '<small class="form-text text-muted">'.$args['tip'].'</small>';
}
$label = '';
if (isset($args['label'])) {
$label = '<label for="'.$id.'" class="col-sm-2 col-form-label">'.$args['label'].'</label>';
}
$class = 'form-control'; $class = 'form-control';
if (isset($args['class'])) { if (isset($args['class'])) {
@ -255,10 +256,10 @@ EOF;
return <<<EOF return <<<EOF
<div class="form-group row"> <div class="form-group row">
<label for="$id" class="col-sm-2 col-form-label">$label</label> $label
<div class="col-sm-10"> <div class="col-sm-10">
<input class="$class" id="$id" name="$name" value="$value" placeholder="$placeholder" type="$type" $disabled> <input class="$class" id="$id" name="$name" value="$value" placeholder="$placeholder" type="$type" $disabled $readonly>
<small class="form-text text-muted">$tip</small> $tip
</div> </div>
</div> </div>
EOF; EOF;
@ -266,10 +267,9 @@ EOF;
public static function formCheckbox($args) public static function formCheckbox($args)
{ {
$label = isset($args['label'])?$args['label']:'';
$labelForCheckbox = isset($args['labelForCheckbox'])?$args['labelForCheckbox']:''; $labelForCheckbox = isset($args['labelForCheckbox'])?$args['labelForCheckbox']:'';
$placeholder = isset($args['placeholder'])?$args['placeholder']:''; $placeholder = isset($args['placeholder'])?$args['placeholder']:'';
$tip = isset($args['tip'])?$args['tip']:'&nbsp;'; $tip = isset($args['tip'])?'<small class="form-text text-muted">'.$args['tip'].'</small>':'';
$value = isset($args['value'])?$args['value']:''; $value = isset($args['value'])?$args['value']:'';
$name = $args['name']; $name = $args['name'];
$id = 'js'.$name; $id = 'js'.$name;
@ -278,9 +278,14 @@ EOF;
} }
$disabled = isset($args['disabled'])?'disabled':''; $disabled = isset($args['disabled'])?'disabled':'';
$class = 'form-group row'; $class = 'form-group m-0';
if (isset($args['class'])) { if (isset($args['class'])) {
$class = $class.' '.$args['class']; $class = $args['class'];
}
$labelClass = 'mt-4 mb-2 pb-2 border-bottom text-uppercase w-100';
if (isset($args['labelClass'])) {
$labelClass = $args['labelClass'];
} }
$type = 'text'; $type = 'text';
@ -288,17 +293,21 @@ EOF;
$type = $args['type']; $type = $args['type'];
} }
$label = '';
if (!empty($args['label'])) {
$label = '<label class="'.$labelClass.'">'.$args['label'].'</label>';
}
$checked = $args['checked']?'checked':''; $checked = $args['checked']?'checked':'';
$value = $checked?'1':'0';
return <<<EOF return <<<EOF
<div class="$class"> <div class="$class">
<label for="$id" class="col-sm-2">$label</label> $label
<div class="col-sm-10"> <div class="form-check">
<div class="form-check"> <input type="hidden" name="$name" value="$value"><input id="$id" type="checkbox" class="form-check-input" onclick="this.previousSibling.value=1-this.previousSibling.value" $checked>
<input name="$name" class="form-check-input" type="checkbox" id="$id" $checked> <label class="form-check-label" for="$id">$labelForCheckbox</label>
<label class="form-check-label" for="$id">$labelForCheckbox</label> $tip
<small class="form-text text-muted">$tip</small>
</div>
</div> </div>
</div> </div>
EOF; EOF;
@ -352,7 +361,7 @@ EOF;
$html = '<div class="form-group m-0">'; $html = '<div class="form-group m-0">';
if (!empty($args['label'])) { if (!empty($args['label'])) {
$html .= '<label for="'.$id.'">'.$args['label'].'</label>'; $html .= '<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100" for="'.$id.'">'.$args['label'].'</label>';
} }
$html .= '<select id="'.$id.'" name="'.$args['name'].'" class="'.$class.'">'; $html .= '<select id="'.$id.'" name="'.$args['name'].'" class="'.$class.'">';

View File

@ -1,3 +0,0 @@
// jQuery autoComplete v1.0.7
// https://github.com/Pixabay/jQuery-autoComplete
!function(e){e.fn.autoComplete=function(t){var o=e.extend({},e.fn.autoComplete.defaults,t);return"string"==typeof t?(this.each(function(){var o=e(this);"destroy"==t&&(e(window).off("resize.autocomplete",o.updateSC),o.off("blur.autocomplete focus.autocomplete keydown.autocomplete keyup.autocomplete"),o.data("autocomplete")?o.attr("autocomplete",o.data("autocomplete")):o.removeAttr("autocomplete"),e(o.data("sc")).remove(),o.removeData("sc").removeData("autocomplete"))}),this):this.each(function(){function t(e){var t=s.val();if(s.cache[t]=e,e.length&&t.length>=o.minChars){for(var a="",c=0;c<e.length;c++)a+=o.renderItem(e[c],t);s.sc.html(a),s.updateSC(0)}else s.sc.hide()}var s=e(this);s.sc=e('<div class="autocomplete-suggestions '+o.menuClass+'"></div>'),s.data("sc",s.sc).data("autocomplete",s.attr("autocomplete")),s.attr("autocomplete","off"),s.cache={},s.last_val="",s.updateSC=function(t,o){if(s.sc.css({top:s.offset().top+s.outerHeight(),left:s.offset().left,width:s.outerWidth()}),!t&&(s.sc.show(),s.sc.maxHeight||(s.sc.maxHeight=parseInt(s.sc.css("max-height"))),s.sc.suggestionHeight||(s.sc.suggestionHeight=e(".autocomplete-suggestion",s.sc).first().outerHeight()),s.sc.suggestionHeight))if(o){var a=s.sc.scrollTop(),c=o.offset().top-s.sc.offset().top;c+s.sc.suggestionHeight-s.sc.maxHeight>0?s.sc.scrollTop(c+s.sc.suggestionHeight+a-s.sc.maxHeight):0>c&&s.sc.scrollTop(c+a)}else s.sc.scrollTop(0)},e(window).on("resize.autocomplete",s.updateSC),s.sc.appendTo("body"),s.sc.on("mouseleave",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeClass("selected")}),s.sc.on("mouseenter",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeClass("selected"),e(this).addClass("selected")}),s.sc.on("mousedown click",".autocomplete-suggestion",function(t){var a=e(this),c=a.data("val");return(c||a.hasClass("autocomplete-suggestion"))&&(s.val(c),o.onSelect(t,c,a),s.sc.hide()),!1}),s.on("blur.autocomplete",function(){try{over_sb=e(".autocomplete-suggestions:hover").length}catch(t){over_sb=0}over_sb?s.is(":focus")||setTimeout(function(){s.focus()},20):(s.last_val=s.val(),s.sc.hide(),setTimeout(function(){s.sc.hide()},350))}),o.minChars||s.on("focus.autocomplete",function(){s.last_val="\n",s.trigger("keyup.autocomplete")}),s.on("keydown.autocomplete",function(t){if((40==t.which||38==t.which)&&s.sc.html()){var a,c=e(".autocomplete-suggestion.selected",s.sc);return c.length?(a=40==t.which?c.next(".autocomplete-suggestion"):c.prev(".autocomplete-suggestion"),a.length?(c.removeClass("selected"),s.val(a.addClass("selected").data("val"))):(c.removeClass("selected"),s.val(s.last_val),a=0)):(a=40==t.which?e(".autocomplete-suggestion",s.sc).first():e(".autocomplete-suggestion",s.sc).last(),s.val(a.addClass("selected").data("val"))),s.updateSC(0,a),!1}if(27==t.which)s.val(s.last_val).sc.hide();else if(13==t.which||9==t.which){var c=e(".autocomplete-suggestion.selected",s.sc);c.length&&s.sc.is(":visible")&&(o.onSelect(t,c.data("val"),c),setTimeout(function(){s.sc.hide()},20))}}),s.on("keyup.autocomplete",function(a){if(!~e.inArray(a.which,[13,27,35,36,37,38,39,40])){var c=s.val();if(c.length>=o.minChars){if(c!=s.last_val){if(s.last_val=c,clearTimeout(s.timer),o.cache){if(c in s.cache)return void t(s.cache[c]);for(var l=1;l<c.length-o.minChars;l++){var i=c.slice(0,c.length-l);if(i in s.cache&&!s.cache[i].length)return void t([])}}s.timer=setTimeout(function(){o.source(c,t)},o.delay)}}else s.last_val=c,s.sc.hide()}})})},e.fn.autoComplete.defaults={source:0,minChars:3,delay:150,cache:1,menuClass:"",renderItem:function(e,t){t=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var o=new RegExp("("+t.split(" ").join("|")+")","gi");return'<div class="autocomplete-suggestion" data-val="'+e+'">'+e.replace(o,"<b>$1</b>")+"</div>"},onSelect:function(e,t,o){}}}(jQuery);

View File

@ -7,13 +7,14 @@
<meta name="robots" content="noindex,nofollow"> <meta name="robots" content="noindex,nofollow">
<!-- Favicon --> <!-- Favicon -->
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_ADMIN_THEME.'img/favicon.png?version='.BLUDIT_VERSION ?>"> <link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG.'favicon.png?version='.BLUDIT_VERSION ?>">
<!-- CSS --> <!-- CSS -->
<?php <?php
echo Theme::cssBootstrap(); echo Theme::cssBootstrap();
echo Theme::css(array( echo Theme::css(array(
'bludit.css' 'bludit.css',
'bludit.bootstrap.css'
), DOMAIN_ADMIN_THEME_CSS); ), DOMAIN_ADMIN_THEME_CSS);
?> ?>
@ -36,7 +37,7 @@
<div class="container"> <div class="container">
<div class="row justify-content-md-center pt-5"> <div class="row justify-content-md-center pt-5">
<div class="col-4 pt-5"> <div class="col-md-4 pt-5">
<?php <?php
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) { if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) {
include(PATH_ADMIN_VIEWS.$layout['view'].'.php'); include(PATH_ADMIN_VIEWS.$layout['view'].'.php');

@ -0,0 +1 @@
Subproject commit 09138280134ec8014982f260c1ebb6a5b0091fdc

View File

@ -1,6 +1,6 @@
<?php <?php
echo Bootstrap::pageTitle(array('title'=>$L->g('About'), 'icon'=>'info')); echo Bootstrap::pageTitle(array('title'=>$L->g('About'), 'icon'=>'info-circle'));
echo ' echo '
<table class="table table-striped mt-3"> <table class="table table-striped mt-3">
@ -10,7 +10,7 @@ echo '
echo '<tr>'; echo '<tr>';
echo '<td>Bludit Edition</td>'; echo '<td>Bludit Edition</td>';
if (defined('BLUDIT_PRO')) { if (defined('BLUDIT_PRO')) {
echo '<td>PRO - '.$L->g('Thanks for support Bludit').'</td>'; echo '<td>PRO - '.$L->g('Thanks for supporting Bludit').' <span class="fa fa-heart" style="color: #ffc107"></span></td>';
} else { } else {
echo '<td>Standard - <a target="_blank" href="https://pro.bludit.com">'.$L->g('Upgrade to Bludit PRO').'</a></td>'; echo '<td>Standard - <a target="_blank" href="https://pro.bludit.com">'.$L->g('Upgrade to Bludit PRO').'</a></td>';
} }
@ -31,6 +31,11 @@ echo '<td>Bludit Build Number</td>';
echo '<td>'.BLUDIT_BUILD.'</td>'; echo '<td>'.BLUDIT_BUILD.'</td>';
echo '</tr>'; echo '</tr>';
echo '<tr>';
echo '<td>Disk usage</td>';
echo '<td>'.Filesystem::bytesToHumanFileSize(Filesystem::getSize(PATH_ROOT)).'</td>';
echo '</tr>';
echo '<tr>'; echo '<tr>';
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'developers'.'">Bludit Developers</a></td>'; echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'developers'.'">Bludit Developers</a></td>';
echo '<td></td>'; echo '<td></td>';

View File

@ -0,0 +1,59 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
<div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Blocks'), 'icon'=>'box')); ?>
</div>
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF()
));
foreach ($blocks->getAll() as $block) {
echo Bootstrap::formTitle(array('title'=>$block->title()));
if (Text::isNotEmpty( $block->description() )) {
echo Bootstrap::alert(array('class'=>'alert-primary', 'text'=>$block->description()));
}
echo Bootstrap::formInputText(array(
'name'=>'key[]',
'label'=>$L->g('Key'),
'value'=>$block->key(),
'class'=>'',
'placeholder'=>'',
'tip'=>'',
'readonly'=>true
));
echo Bootstrap::formInputText(array(
'name'=>'title[]',
'label'=>$L->g('title'),
'value'=>$block->title(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formTextarea(array(
'name'=>'value[]',
'label'=>$L->g('Value'),
'value'=>$block->value(),
'class'=>'',
'placeholder'=>'',
'tip'=>'',
'rows'=>5
));
}
echo Bootstrap::formClose();
?>

View File

@ -3,7 +3,7 @@
echo Bootstrap::pageTitle(array('title'=>$L->g('Categories'), 'icon'=>'tags')); echo Bootstrap::pageTitle(array('title'=>$L->g('Categories'), 'icon'=>'tags'));
echo Bootstrap::link(array( echo Bootstrap::link(array(
'title'=>'Add a new category', 'title'=>$L->g('Add a new category'),
'href'=>HTML_PATH_ADMIN_ROOT.'new-category', 'href'=>HTML_PATH_ADMIN_ROOT.'new-category',
'icon'=>'plus' 'icon'=>'plus'
)); ));
@ -12,18 +12,18 @@ echo '
<table class="table table-striped mt-3"> <table class="table table-striped mt-3">
<thead> <thead>
<tr> <tr>
<th class="border-bottom-0" scope="col">Name</th> <th class="border-bottom-0" scope="col">'.$L->g('Name').'</th>
<th class="border-bottom-0" scope="col">URL</th> <th class="border-bottom-0" scope="col">'.$L->g('URL').'</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
'; ';
$categories = $dbCategories->getKeyNameArray(); foreach ($categories->keys() as $key) {
foreach ($categories as $categoryKey=>$category) { $category = new Category($key);
echo '<tr>'; echo '<tr>';
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-category/'.$categoryKey.'">'.$category.'</a></td>'; echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-category/'.$key.'">'.$category->name().'</a></td>';
echo '<td><a href="'.DOMAIN_CATEGORIES.$categoryKey.'">'.$url->filters('category', false).$categoryKey.'</a></td>'; echo '<td><a href="'.$category->permalink().'">'.$url->filters('category', false).$key.'</a></td>';
echo '</tr>'; echo '</tr>';
} }

View File

@ -1,9 +1,19 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$plugin->name(), 'icon'=>'wrench')); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'plugin-form')); ?>
echo Bootstrap::formOpen(array('class'=>'plugin-form')); <div class="align-middle">
<?php if ($plugin->formButtons()): ?>
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php endif; ?>
<?php echo Bootstrap::pageTitle(array('title'=>$plugin->name(), 'icon'=>'cog')); ?>
</div>
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
@ -11,14 +21,6 @@ echo Bootstrap::formOpen(array('class'=>'plugin-form'));
// Print the plugin form // Print the plugin form
echo $plugin->form(); echo $plugin->form();
?>
if ($plugin->formButtons()) { <?php echo Bootstrap::formClose(); ?>
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'plugins" role="button">'.$L->g('Cancel').'</a>
</div>
';
}
echo Bootstrap::formClose();

View File

@ -1,21 +1,22 @@
<?php <?php
echo Bootstrap::pageTitle(array('title'=>$L->g('Content'), 'icon'=>'layers')); echo Bootstrap::pageTitle(array('title'=>$L->g('Content'), 'icon'=>'archive'));
function table($type) { function table($type) {
global $url; global $url;
global $Language; global $L;
global $published; global $published;
global $drafts; global $drafts;
global $scheduled; global $scheduled;
global $static; global $static;
global $sticky; global $sticky;
global $autosave;
if ($type=='published') { if ($type=='published') {
$list = $published; $list = $published;
if (empty($list)) { if (empty($list)) {
echo '<p class="mt-4 text-muted">'; echo '<p class="mt-4 text-muted">';
echo $Language->g('There are not pages in this moment.'); echo $L->g('There are no pages at this moment.');
echo '</p>'; echo '</p>';
return false; return false;
} }
@ -23,7 +24,7 @@ function table($type) {
$list = $drafts; $list = $drafts;
if (empty($list)) { if (empty($list)) {
echo '<p class="mt-4 text-muted">'; echo '<p class="mt-4 text-muted">';
echo $Language->g('There are not draft pages in this moment.'); echo $L->g('There are no draft pages at this moment.');
echo '</p>'; echo '</p>';
return false; return false;
} }
@ -31,7 +32,7 @@ function table($type) {
$list = $scheduled; $list = $scheduled;
if (empty($list)) { if (empty($list)) {
echo '<p class="mt-4 text-muted">'; echo '<p class="mt-4 text-muted">';
echo $Language->g('There are not scheduled pages in this moment.'); echo $L->g('There are no scheduled pages at this moment.');
echo '</p>'; echo '</p>';
return false; return false;
} }
@ -39,7 +40,7 @@ function table($type) {
$list = $static; $list = $static;
if (empty($list)) { if (empty($list)) {
echo '<p class="mt-4 text-muted">'; echo '<p class="mt-4 text-muted">';
echo $Language->g('There are not static pages in this moment.'); echo $L->g('There are no static pages at this moment.');
echo '</p>'; echo '</p>';
return false; return false;
} }
@ -47,59 +48,92 @@ function table($type) {
$list = $sticky; $list = $sticky;
if (empty($list)) { if (empty($list)) {
echo '<p class="mt-4 text-muted">'; echo '<p class="mt-4 text-muted">';
echo $Language->g('There are not sticky pages in this moment.'); echo $L->g('There are no sticky pages at this moment.');
echo '</p>'; echo '</p>';
return false; return false;
} }
} elseif ($type=='autosave') {
$list = $autosave;
} }
echo ' echo '
<table class="table mt-3"> <table class="table mt-3">
<thead> <thead>
<tr> <tr>
<th style="font-size: 0.8em;" class="border-0 text-uppercase text-muted" scope="col">'.$Language->g('Title').'</th> <th class="border-0" scope="col">'.$L->g('Title').'</th>
<th style="font-size: 0.8em;" class="border-0 d-none d-lg-table-cell text-uppercase text-muted" scope="col">'.$Language->g('URL').'</th> ';
<th style="font-size: 0.8em;" class="border-0 text-center d-none d-sm-table-cell text-uppercase text-muted" scope="col">Actions</th>
if ($type=='published' || $type=='static' || $type=='sticky') {
echo '<th class="border-0 d-none d-lg-table-cell" scope="col">'.$L->g('URL').'</th>';
}
echo ' <th class="border-0 text-center d-sm-table-cell" scope="col">'.$L->g('Actions').'</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
'; ';
if (ORDER_BY=='position') { if ( (ORDER_BY=='position') || $type=='static' ) {
foreach ($list as $pageKey) { foreach ($list as $pageKey) {
try { try {
$page = new PageX($pageKey); $page = new Page($pageKey);
if (!$page->isChild() || $type!='published') { if (!$page->isChild()) {
echo '<tr> echo '<tr>
<td> <td>
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">' <div>
.($page->title()?$page->title():'<span>'.$Language->g('Empty title').'</span> ') <a style="font-size: 1.1em" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">'
.'</a> .($page->title()?$page->title():'<span class="label-empty-title">'.$L->g('Empty title').'</span> ')
.'</a>
</div>
<div>
<p style="font-size: 0.8em" class="m-0 text-uppercase text-muted">'.( ((ORDER_BY=='position') || ($type!='published'))?$L->g('Position').': '.$page->position():$page->date(MANAGE_CONTENT_DATE_FORMAT) ).'</p>
</div>
</td>'; </td>';
if ($type=='published' || $type=='static' || $type=='sticky') {
$friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key(); $friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key();
echo '<td class="d-none d-lg-table-cell"><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>'; echo '<td class="d-none d-lg-table-cell"><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
}
echo '<td class="text-center d-none d-sm-table-cell">'.$page->position().'</td>'; echo '<td class="contentTools pt-3 text-center d-sm-table-cell">'.PHP_EOL;
echo '<a class="text-secondary d-none d-md-inline" target="_blank" href="'.$page->permalink().'"><i class="fa fa-desktop"></i>'.$L->g('View').'</a>'.PHP_EOL;
echo '<a class="text-secondary d-none d-md-inline ml-2" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><i class="fa fa-edit"></i>'.$L->g('Edit').'</a>'.PHP_EOL;
if (count($page->children())==0) {
echo '<a href="#" class="ml-2 text-danger deletePageButton d-block d-sm-inline" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><i class="fa fa-trash"></i>'.$L->g('Delete').'</a>'.PHP_EOL;
}
echo '</td>';
echo '</tr>'; echo '</tr>';
foreach ($page->children() as $child) { foreach ($page->children() as $child) {
if ($child->published()) { //if ($child->published()) {
echo '<tr> echo '<tr>
<td> <td class="child">
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'">' <div>
.($child->title()?$child->title():'<span>'.$Language->g('Empty title').'</span> ') <a style="font-size: 1.1em" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'">'
.'</a> .($child->title()?$child->title():'<span class="label-empty-title">'.$L->g('Empty title').'</span> ')
.'</a>
</div>
<div>
<p style="font-size: 0.8em" class="m-0 text-uppercase text-muted">'.( ((ORDER_BY=='position') || ($type!='published'))?$L->g('Position').': '.$child->position():$child->date(MANAGE_CONTENT_DATE_FORMAT) ).'</p>
</div>
</td>'; </td>';
if ($type=='published' || $type=='static' || $type=='sticky') {
$friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$child->key() : '/'.$url->filters('page').'/'.$child->key(); $friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$child->key() : '/'.$url->filters('page').'/'.$child->key();
echo '<td><a target="_blank" href="'.$child->permalink().'">'.$friendlyURL.'</a></td>'; echo '<td class="d-none d-lg-table-cell"><a target="_blank" href="'.$child->permalink().'">'.$friendlyURL.'</a></td>';
}
echo '<td>'.$child->position().'</td>'; echo '<td class="contentTools pt-3 text-center d-sm-table-cell">'.PHP_EOL;
if ($type=='published' || $type=='static' || $type=='sticky') {
echo '<a class="text-secondary d-none d-md-inline" target="_blank" href="'.$page->permalink().'"><i class="fa fa-desktop"></i>'.$L->g('View').'</a>'.PHP_EOL;
}
echo '<a class="text-secondary d-none d-md-inline ml-2" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'"><i class="fa fa-edit"></i>'.$L->g('Edit').'</a>'.PHP_EOL;
echo '<a class="ml-2 text-danger deletePageButton d-block d-sm-inline" href="#" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$child->key().'"><i class="fa fa-trash"></i>'.$L->g('Delete').'</a>'.PHP_EOL;
echo '</td>';
echo '</tr>'; echo '</tr>';
} //}
} }
} }
} catch (Exception $e) { } catch (Exception $e) {
@ -109,25 +143,32 @@ function table($type) {
} else { } else {
foreach ($list as $pageKey) { foreach ($list as $pageKey) {
try { try {
$page = new PageX($pageKey); $page = new Page($pageKey);
echo '<tr>'; echo '<tr>';
echo '<td class="pt-3"> echo '<td class="pt-3">
<div> <div>
<a style="font-size: 1.1em" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">' <a style="font-size: 1.1em" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">'
.($page->title()?$page->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ') .($page->title()?$page->title():'<span class="label-empty-title">'.$L->g('Empty title').'</span> ')
.'</a> .'</a>
</div> </div>
<div> <div>
<p style="font-size: 0.8em" class="m-0 text-uppercase text-muted">'.( ((ORDER_BY=='position') || ($type!='published'))?'Position: '.$page->position():$page->relativeTime() ).'</p> <p style="font-size: 0.8em" class="m-0 text-uppercase text-muted">'.( ($type=='scheduled')?$L->g('Scheduled').': '.$page->date(SCHEDULED_DATE_FORMAT):$page->date(MANAGE_CONTENT_DATE_FORMAT) ).'</p>
</div> </div>
</td>'; </td>';
if ($type=='published' || $type=='static' || $type=='sticky') {
$friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key(); $friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key();
echo '<td class="pt-3 d-none d-lg-table-cell"><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>'; echo '<td class="pt-3 d-none d-lg-table-cell"><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
}
echo '<td class="pt-3 text-center d-none d-sm-table-cell">'.PHP_EOL; echo '<td class="contentTools pt-3 text-center d-sm-table-cell">'.PHP_EOL;
echo '<a class="btn btn-secondary btn-sm" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">Edit</a>'.PHP_EOL; if ($type=='published' || $type=='static' || $type=='sticky') {
echo '<button type="button" class="btn btn-secondary btn-sm deletePageButton" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><span class="oi oi-trash"></span> Delete</button>'.PHP_EOL; echo '<a class="text-secondary d-none d-md-inline" target="_blank" href="'.$page->permalink().'"><i class="fa fa-desktop"></i>'.$L->g('View').'</a>'.PHP_EOL;
}
echo '<a class="text-secondary d-none d-md-inline ml-2" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><i class="fa fa-edit"></i>'.$L->g('Edit').'</a>'.PHP_EOL;
if (count($page->children())==0) {
echo '<a href="#" class="ml-2 text-danger deletePageButton d-block d-sm-inline" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><i class="fa fa-trash"></i>'.$L->g('Delete').'</a>'.PHP_EOL;
}
echo '</td>'; echo '</td>';
echo '</tr>'; echo '</tr>';
@ -148,49 +189,55 @@ function table($type) {
<!-- TABS --> <!-- TABS -->
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link active" id="pages-tab" data-toggle="tab" href="#pages" role="tab">Pages</a> <a class="nav-link active" id="pages-tab" data-toggle="tab" href="#pages" role="tab"><?php $L->p('Pages') ?></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" id="static-tab" data-toggle="tab" href="#static" role="tab">Static</a> <a class="nav-link" id="static-tab" data-toggle="tab" href="#static" role="tab"><?php $L->p('Static') ?></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" id="sticky-tab" data-toggle="tab" href="#sticky" role="tab">Sticky</a> <a class="nav-link" id="sticky-tab" data-toggle="tab" href="#sticky" role="tab"><?php $L->p('Sticky') ?></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" id="scheduled-tab" data-toggle="tab" href="#scheduled" role="tab">Schedule <?php if (count($scheduled)>0) { echo '<span class="badge badge-danger">'.count($scheduled).'</span>'; } ?></a> <a class="nav-link" id="scheduled-tab" data-toggle="tab" href="#scheduled" role="tab"><?php $L->p('Scheduled') ?> <?php if (count($scheduled)>0) { echo '<span class="badge badge-danger">'.count($scheduled).'</span>'; } ?></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" id="draft-tab" data-toggle="tab" href="#draft" role="tab">Draft <?php if (count($drafts)>0) { echo '<span class="badge badge-danger">'.count($drafts).'</span>'; } ?></a> <a class="nav-link" id="draft-tab" data-toggle="tab" href="#draft" role="tab"><?php $L->p('Draft') ?></a>
</li> </li>
<?php if (!empty($autosave)): ?>
<li class="nav-item">
<a class="nav-link" id="autosave-tab" data-toggle="tab" href="#autosave" role="tab"><?php $L->p('Autosave') ?></a>
</li>
<?php endif; ?>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<!-- TABS PAGES --> <!-- TABS PAGES -->
<div class="tab-pane show active" id="pages" role="tabpanel"> <div class="tab-pane show active" id="pages" role="tabpanel">
<?php table('published'); ?> <?php table('published'); ?>
<?php if (Paginator::amountOfPages() > 1): ?> <?php if (Paginator::numberOfPages() > 1): ?>
<!-- Paginator --> <!-- Paginator -->
<nav class="paginator"> <nav class="paginator">
<ul class="pagination flex-wrap justify-content-center"> <ul class="pagination flex-wrap justify-content-center">
<!-- First button --> <!-- First button -->
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>"> <li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::firstPageUrl() ?>"><span class="align-middle oi oi-media-skip-backward"></span> <?php echo $Language->get('First'); ?></a> <a class="page-link" href="<?php echo Paginator::firstPageUrl() ?>"><span class="align-middle fa fa-media-skip-backward"></span> <?php echo $L->get('First'); ?></a>
</li> </li>
<!-- Previous button --> <!-- Previous button -->
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>"> <li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>"><?php echo $Language->get('Previous'); ?></a> <a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>"><?php echo $L->get('Previous'); ?></a>
</li> </li>
<!-- Next button --> <!-- Next button -->
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>"> <li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $Language->get('Next'); ?></a> <a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?></a>
</li> </li>
<!-- Last button --> <!-- Last button -->
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>"> <li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::lastPageUrl() ?>"><?php echo $Language->get('Last'); ?> <span class="align-middle oi oi-media-skip-forward"></span></a> <a class="page-link" href="<?php echo Paginator::lastPageUrl() ?>"><?php echo $L->get('Last'); ?> <span class="align-middle fa fa-media-skip-forward"></span></a>
</li> </li>
</ul> </ul>
@ -217,18 +264,26 @@ function table($type) {
<div class="tab-pane" id="draft" role="tabpanel"> <div class="tab-pane" id="draft" role="tabpanel">
<?php table('draft'); ?> <?php table('draft'); ?>
</div> </div>
<!-- TABS AUTOSAVE -->
<?php if (!empty($autosave)): ?>
<div class="tab-pane" id="autosave" role="tabpanel">
<?php table('autosave'); ?>
</div>
<?php endif; ?>
</div> </div>
<!-- Modal for delete page --> <!-- Modal for delete page -->
<?php echo Bootstrap::modal(array( <?php
'modalId'=>'jsdeletePageModal', echo Bootstrap::modal(array(
'modalTitle'=>'Delete content', 'buttonPrimary'=>$L->g('Delete'),
'modalText'=>'Are you sure you ?', 'buttonPrimaryClass'=>'btn-danger deletePageModalAcceptButton',
'buttonPrimary'=>'Delete', 'buttonSecondary'=>$L->g('Cancel'),
'buttonPrimaryClass'=>'deletePageModalAcceptButton', 'buttonSecondaryClass'=>'btn-link',
'buttonSecondary'=>'Cancel', 'modalTitle'=>$L->g('Delete content'),
'buttonSecondaryClass'=>'' 'modalText'=>$L->g('Are you sure you want to delete this page'),
)); 'modalId'=>'jsdeletePageModal'
));
?> ?>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
@ -264,3 +319,9 @@ $(document).ready(function() {
}); });
}); });
</script> </script>
<script>
// Open the tab defined in the URL
const anchor = window.location.hash;
$(`a[href="${anchor}"]`).tab('show');
</script>

View File

@ -1,49 +1,116 @@
<div id="dashboard" class="container mt-3"> <div id="dashboard" class="container">
<div class="row"> <div class="row">
<div class="col-7"> <div class="col-md-7">
<!-- Good message -->
<div>
<h2 id="hello-message" class="pt-0">
<span class="fa fa-hand-spock-o"></span><span><?php echo $L->g('hello') ?></span>
</h2>
<script>
$( document ).ready(function() {
$("#hello-message").fadeOut(1000, function() {
var date = new Date()
var hours = date.getHours()
if (hours > 6 && hours < 12) {
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-morning') ?>');
} else if (hours > 12 && hours < 18) {
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-afternoon') ?>');
} else if (hours > 18 && hours < 22) {
$(this).html('<span class="fa fa-moon-o"></span><?php echo $L->g('good-evening') ?>');
} else {
$(this).html('<span class="fa fa-moon-o"></span><span><?php echo $L->g('good-night') ?></span>');
}
}).fadeIn(1000);
});
</script>
</div>
<!-- Quick Links --> <!-- Quick Links -->
<div class="container border-bottom pb-4"> <div class="container border-bottom pb-5" id="jsclippyContainer">
<h4 class="pb-3">Quick links</h4>
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<a class="quick-links text-center" style="color: #4586d4" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>"> <div class="form-group">
<div class="oi oi-justify-left quick-links-icons"></div> <select id="jsclippy" class="clippy" name="state"></select>
<div>New content</div> </div>
</a>
</div>
<div class="col border-left border-right">
<a class="quick-links text-center" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>">
<div class="oi oi-tags quick-links-icons"></div>
<div>Categories</div>
</a>
</div>
<div class="col">
<a class="quick-links text-center" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>">
<div class="oi oi-people quick-links-icons"></div>
<div>Users</div>
</a>
</div> </div>
</div> </div>
<script>
$(document).ready(function() {
var clippy = $("#jsclippy").select2({
placeholder: "<?php $L->p('Start typing to see a list of suggestions') ?>",
allowClear: true,
width: "100%",
theme: "bootstrap4",
minimumInputLength: 2,
dropdownParent: "#jsclippyContainer",
language: {
inputTooShort: function () { return ''; }
},
ajax: {
url: HTML_PATH_ADMIN_ROOT+"ajax/clippy",
data: function (params) {
var query = { query: params.term }
return query;
},
processResults: function (data) {
return data;
}
},
templateResult: function(data) {
// console.log(data);
var html = '';
if (data.type=='menu') {
html += '<a href="'+data.url+'"><div class="search-suggestion">';
html += '<span class="fa fa-'+data.icon+'"></span>'+data.text+'</div></a>';
} else {
if (typeof data.id === 'undefined') {
return '';
}
html += '<div class="search-suggestion">';
html += '<div class="search-suggestion-item">'+data.text+' <span class="badge badge-pill badge-light">'+data.type+'</span></div>';
html += '<div class="search-suggestion-options">';
html += '<a target="_blank" href="'+DOMAIN_PAGES+data.id+'"><?php $L->p('view') ?></a>';
html += '<a class="ml-2" href="'+DOMAIN_ADMIN+'edit-content/'+data.id+'"><?php $L->p('edit') ?></a>';
html += '</div></div>';
}
return html;
},
escapeMarkup: function(markup) {
return markup;
}
}).on("select2:closing", function(e) {
e.preventDefault();
}).on("select2:closed", function(e) {
clippy.select2("open");
});
clippy.select2("open");
});
</script>
</div> </div>
<div class="container mt-4"> <div class="container mt-4">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<a class="quick-links text-center" target="_blank" href="https://docs.bludit.com"> <a class="quick-links text-center" target="_blank" href="https://docs.bludit.com">
<div class="oi oi-compass quick-links-icons"></div> <div class="fa fa-compass quick-links-icons"></div>
<div>Documentation</div> <div><?php $L->p('Documentation') ?></div>
</a> </a>
</div> </div>
<div class="col border-left border-right"> <div class="col border-left border-right">
<a class="quick-links text-center" target="_blank" href="https://forum.bludit.org"> <a class="quick-links text-center" target="_blank" href="https://forum.bludit.org">
<div class="oi oi-loop-square quick-links-icons"></div> <div class="fa fa-support quick-links-icons"></div>
<div>Forum support</div> <div><?php $L->p('Forum support') ?></div>
</a> </a>
</div> </div>
<div class="col"> <div class="col">
<a class="quick-links text-center" target="_blank" href="https://gitter.im/bludit/support"> <a class="quick-links text-center" target="_blank" href="https://gitter.im/bludit/support">
<div class="oi oi-chat quick-links-icons"></div> <div class="fa fa-comments quick-links-icons"></div>
<div>Chat support</div> <div><?php $L->p('Chat support') ?></div>
</a> </a>
</div> </div>
</div> </div>
@ -51,11 +118,11 @@
<?php Theme::plugins('dashboard') ?> <?php Theme::plugins('dashboard') ?>
</div> </div>
<div class="col-5"> <div class="col-md-5">
<!-- Notifications --> <!-- Notifications -->
<ul class="list-group list-group-striped b-0"> <ul class="list-group list-group-striped b-0">
<li class="list-group-item pt-0"><h4>Notifications</h4></li> <li class="list-group-item pt-0"><h4><?php $L->p('Notifications') ?></h4></li>
<?php <?php
$logs = array_slice($syslog->db, 0, NOTIFICATIONS_AMOUNT); $logs = array_slice($syslog->db, 0, NOTIFICATIONS_AMOUNT);
foreach ($logs as $log) { foreach ($logs as $log) {
@ -67,7 +134,7 @@
} }
echo '<br><span class="notification-date"><small>'; echo '<br><span class="notification-date"><small>';
echo Date::format($log['date'], DB_DATE_FORMAT, NOTIFICATIONS_DATE_FORMAT); echo Date::format($log['date'], DB_DATE_FORMAT, NOTIFICATIONS_DATE_FORMAT);
echo ' - by '.$log['username']; echo ' [ '.$log['username'] .' ]';
echo '</small></span>'; echo '</small></span>';
echo '</li>'; echo '</li>';
} }

View File

@ -1,6 +1,6 @@
<?php <?php
echo Bootstrap::pageTitle(array('title'=>$L->g('Developers'), 'icon'=>'beaker')); echo Bootstrap::pageTitle(array('title'=>$L->g('Developers'), 'icon'=>'gears'));
echo '<h2 class="mb-4 mt-4"><b>PHP version: '.phpversion().'</b></h2>'; echo '<h2 class="mb-4 mt-4"><b>PHP version: '.phpversion().'</b></h2>';
@ -34,5 +34,5 @@ $constants = get_defined_constants(true);
printTable('Bludit Constants', $constants['user']); printTable('Bludit Constants', $constants['user']);
// Site object // Site object
printTable('$Site object database',$site->db); printTable('$site object database',$site->db);

View File

@ -1,9 +1,18 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$L->g('Edit Category'), 'icon'=>'tags')); <?php echo Bootstrap::formOpen(array('id'=>'jsform')); ?>
echo Bootstrap::formOpen(array('id'=>'jsform')); <div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<button type="button" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#jsdeleteModal"><?php $L->p('Delete') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Edit Category'), 'icon'=>'cog')); ?>
</div>
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
@ -19,41 +28,42 @@ echo Bootstrap::formOpen(array('id'=>'jsform'));
'value'=>$categoryMap['key'] 'value'=>$categoryMap['key']
)); ));
echo Bootstrap::formInputTextBlock(array( echo Bootstrap::formInputText(array(
'name'=>'name', 'name'=>'name',
'label'=>$L->g('Category name'), 'label'=>$L->g('Name'),
'value'=>$categoryMap['name'], 'value'=>$categoryMap['name'],
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
echo Bootstrap::formInputGroupText(array( echo Bootstrap::formTextarea(array(
'name'=>'newKey', 'name'=>'description',
'label'=>$L->g('Category key'), 'label'=>$L->g('Description'),
'labelInside'=>DOMAIN_CATEGORIES, 'value'=>isset($categoryMap['description'])?$categoryMap['description']:'',
'value'=>$categoryMap['key'],
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>'',
'rows'=>3
)); ));
echo Bootstrap::formInputTextBlock(array( echo Bootstrap::formInputText(array(
'name'=>'template', 'name'=>'template',
'label'=>$L->g('Category template'), 'label'=>$L->g('Template'),
'value'=>isset($categoryMap['template'])?$categoryMap['template']:'', 'value'=>isset($categoryMap['template'])?$categoryMap['template']:'',
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
echo ' echo Bootstrap::formInputText(array(
<div class="form-group mt-4"> 'name'=>'newKey',
<button type="submit" class="btn btn-primary">'.$L->g('Save').'</button> 'label'=>$L->g('Friendly URL'),
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'categories" role="button">'.$L->g('Cancel').'</a> 'value'=>$categoryMap['key'],
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#jsdeleteModal">'.$L->g('Delete').'</button> 'class'=>'',
</div> 'placeholder'=>'',
'; 'tip'=>DOMAIN_CATEGORIES.$categoryMap['key']
));
echo Bootstrap::formClose(); echo Bootstrap::formClose();
@ -62,12 +72,12 @@ echo Bootstrap::formClose();
<!-- Modal for delete category --> <!-- Modal for delete category -->
<?php <?php
echo Bootstrap::modal(array( echo Bootstrap::modal(array(
'buttonPrimary'=>'Delete', 'buttonPrimary'=>$L->g('Delete'),
'buttonPrimaryClass'=>'jsbuttonDeleteAccept', 'buttonPrimaryClass'=>'btn-danger jsbuttonDeleteAccept',
'buttonSecondary'=>'Cancel', 'buttonSecondary'=>$L->g('Cancel'),
'buttonSecondaryClass'=>'', 'buttonSecondaryClass'=>'btn-link',
'modalTitle'=>'Delete category', 'modalTitle'=>$L->g('Delete category'),
'modalText'=>'Are you sure you want to delete the category ?', 'modalText'=>$L->g('Are you sure you want to delete this category?'),
'modalId'=>'jsdeleteModal' 'modalId'=>'jsdeleteModal'
)); ));
?> ?>

View File

@ -1,381 +1,464 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?> <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
<!-- TABS --> <?php
<ul class="nav nav-tabs" id="dynamicTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="content-tab" data-toggle="tab" href="#content" role="tab" aria-controls="content" aria-selected="true">Content</a>
</li>
<li class="nav-item">
<a class="nav-link" id="images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="images" aria-selected="false">Images</a>
</li>
<li class="nav-item">
<a class="nav-link " id="options-tab" data-toggle="tab" href="#options" role="tab" aria-controls="options" aria-selected="false">Options</a>
</li>
</ul>
<?php
echo Bootstrap::formOpen(array(
'id'=>'jsform',
'class'=>'tab-content mt-1'
));
// Token CSRF // FORM START
echo Bootstrap::formInputHidden(array( echo Bootstrap::formOpen(array(
'name'=>'tokenCSRF', 'id'=>'jsform',
'value'=>$security->getTokenCSRF() 'class'=>'d-flex flex-column h-100'
)); ));
// Parent // Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'parent', 'name'=>'tokenCSRF',
'value'=>$page->parent() 'value'=>$security->getTokenCSRF()
)); ));
// UUID // UUID
echo Bootstrap::formInputHidden(array( // The UUID is generated in the controller
'name'=>'uuid', echo Bootstrap::formInputHidden(array(
'value'=>$page->uuid() 'name'=>'uuid',
)); 'value'=>$page->uuid()
));
// Status = published, draft, sticky, static // Type = published, draft, sticky, static
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'type', 'name'=>'type',
'value'=>$page->type() 'value'=>$page->type()
)); ));
// Page current key // Cover image
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'key', 'name'=>'coverImage',
'value'=>$page->key() 'value'=>$page->coverImage(false)
)); ));
// Cover image // Content
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'coverImage', 'name'=>'content',
'value'=>$page->coverImage() 'value'=>''
)); ));
// Content // Current page key
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'content', 'name'=>'key',
'value'=>'' 'value'=>$page->key()
)); ));
?> ?>
<!-- TABS CONTENT --> <!-- TOOLBAR -->
<div class="tab-pane show active" id="content" role="tabpanel" aria-labelledby="content-tab"> <div id="jseditorToolbar" class="mb-1">
<div id="jseditorToolbarRight" class="btn-group btn-group-sm float-right" role="group" aria-label="Toolbar right">
<button type="button" class="btn btn-light" id="jsmediaManagerOpenModal" data-toggle="modal" data-target="#jsmediaManagerModal"><span class="fa fa-image"></span> <?php $L->p('Images') ?></button>
<button type="button" class="btn btn-light" id="jsoptionsSidebar" style="z-index:30"><span class="fa fa-cog"></span> <?php $L->p('Options') ?></button>
</div>
<div class="form-group m-0"> <div id="jseditorToolbarLeft">
<input value="<?php echo $page->title() ?>" class="form-control form-control-lg rounded-0 " id="jstitle" name="title" placeholder="Enter title" type="text"> <button type="button" class="btn btn-sm btn-primary" id="jsbuttonSave"><?php echo $L->g('Save') ?></button>
<button id="jsbuttonPreview" type="button" class="btn btn-sm btn-secondary"><?php $L->p('Preview') ?></button>
<span id="jsswitchButton" data-switch="<?php echo ($page->draft()?'draft':'publish') ?>" class="ml-2 text-secondary switch-button"><i class="fa fa-square switch-icon-<?php echo ($page->draft()?'draft':'publish') ?>"></i> <?php echo ($page->draft()?$L->g('Draft'):$L->g('Publish')) ?></span>
</div>
<?php if($page->scheduled()): ?>
<div class="alert alert-warning p-1 mt-1 mb-0"><?php $L->p('scheduled') ?>: <?php echo $page->date(SCHEDULED_DATE_FORMAT) ?></div>
<?php endif; ?>
</div>
<script>
$(document).ready(function() {
$("#jsoptionsSidebar").on("click", function() {
$("#jseditorSidebar").toggle();
$("#jsshadow").toggle();
});
$("#jsshadow").on("click", function() {
$("#jseditorSidebar").toggle();
$("#jsshadow").toggle();
});
});
</script>
<!-- SIDEBAR OPTIONS -->
<div id="jseditorSidebar">
<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<a class="nav-link active show" id="nav-general-tab" data-toggle="tab" href="#nav-general" role="tab" aria-controls="general"><?php $L->p('General') ?></a>
<a class="nav-link" id="nav-advanced-tab" data-toggle="tab" href="#nav-advanced" role="tab" aria-controls="advanced"><?php $L->p('Advanced') ?></a>
<?php if (!empty($site->customFields())): ?>
<a class="nav-link" id="nav-custom-tab" data-toggle="tab" href="#nav-custom" role="tab" aria-controls="custom"><?php $L->p('Custom') ?></a>
<?php endif ?>
<a class="nav-link" id="nav-seo-tab" data-toggle="tab" href="#nav-seo" role="tab" aria-controls="seo"><?php $L->p('SEO') ?></a>
</div> </div>
</nav>
<div class="form-group m-0 mt-1"> <div class="tab-content pr-3 pl-3 pb-3">
<button id="jsmediaManagerButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsbluditMediaModal"><span class="oi oi-image"></span> Media Manager</button> <div id="nav-general" class="tab-pane fade show active" role="tabpanel" aria-labelledby="general-tab">
<button id="jscategoryButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jscategoryModal"><span class="oi oi-tag"></span> Category: <span class="option">-</span></button>
<button id="jsdescriptionButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsdescriptionModal"><span class="oi oi-tag"></span> Description: <span class="option">-</span></button>
</div>
<div class="form-group mt-1">
<textarea id="jseditor" style="display:none;"><?php echo $page->contentRaw(false) ?></textarea>
</div>
<?php if($page->draft()): ?>
<div class="alert alert-primary mt-2 mb-2">The content is saved as a draft. To publish it click on the button <b>Publish</b> or if you still working on it click on <b>Save as draft</b>.</div>
<?php endif; ?>
<div class="form-group mt-2">
<button type="button" class="jsbuttonSave btn btn-primary"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Update')) ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary"><?php echo $L->g('Save as draft') ?></button>
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-secondary"><?php echo $L->g('Cancel') ?></a>
<?php <?php
if (count($page->children())===0) { // Category
echo '<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#jsdeletePageModal">'.$L->g('Delete').'</button>'; echo Bootstrap::formSelectBlock(array(
'name'=>'category',
'label'=>$L->g('Category'),
'selected'=>$page->categoryKey(),
'class'=>'',
'emptyOption'=>'- '.$L->g('Uncategorized').' -',
'options'=>$categories->getKeyNameArray()
));
// Description
echo Bootstrap::formTextareaBlock(array(
'name'=>'description',
'label'=>$L->g('Description'),
'selected'=>'',
'class'=>'',
'value'=>$page->description(),
'rows'=>5,
'placeholder'=>$L->get('this-field-can-help-describe-the-content')
));
?>
<!-- Cover Image -->
<?php
$coverImage = $page->coverImage(false);
$externalCoverImage = '';
if (filter_var($coverImage, FILTER_VALIDATE_URL)) {
$coverImage = '';
$externalCoverImage = $page->coverImage(false);
}
?>
<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100"><?php $L->p('Cover Image') ?></label>
<div>
<img id="jscoverImagePreview" class="mx-auto d-block w-100" alt="Cover image preview" src="<?php echo (empty($coverImage) ? HTML_PATH_CORE_IMG.'default.svg' : $page->coverImage() ) ?>" />
</div>
<div class="mt-2 text-center">
<button type="button" id="jsbuttonSelectCoverImage" class="btn btn-primary btn-sm"><?php echo $L->g('Select cover image') ?></button>
<button type="button" id="jsbuttonRemoveCoverImage" class="btn btn-secondary btn-sm"><?php echo $L->g('Remove cover image') ?></button>
</div>
<script>
$(document).ready(function() {
$("#jscoverImagePreview").on("click", function() {
openMediaManager();
});
$("#jsbuttonSelectCoverImage").on("click", function() {
openMediaManager();
});
$("#jsbuttonRemoveCoverImage").on("click", function() {
$("#jscoverImage").val('');
$("#jscoverImagePreview").attr('src', HTML_PATH_CORE_IMG+'default.svg');
});
});
</script>
</div>
<div id="nav-advanced" class="tab-pane fade" role="tabpanel" aria-labelledby="advanced-tab">
<?php
// Date
echo Bootstrap::formInputTextBlock(array(
'name'=>'date',
'label'=>$L->g('Date'),
'placeholder'=>'',
'value'=>$page->dateRaw(),
'tip'=>$L->g('date-format-format')
));
// Type
echo Bootstrap::formSelectBlock(array(
'name'=>'typeSelector',
'label'=>$L->g('Type'),
'selected'=>$page->type(),
'options'=>array(
'published'=>'- '.$L->g('Default').' -',
'sticky'=>$L->g('Sticky'),
'static'=>$L->g('Static')
),
'tip'=>''
));
// Position
echo Bootstrap::formInputTextBlock(array(
'name'=>'position',
'label'=>$L->g('Position'),
'tip'=>$L->g('Field used when ordering content by position'),
'value'=>$page->position()
));
// Tags
echo Bootstrap::formInputTextBlock(array(
'name'=>'tags',
'label'=>$L->g('Tags'),
'placeholder'=>'',
'tip'=>$L->g('Write the tags separated by comma'),
'value'=>$page->tags()
));
// Parent
try {
$options = array();
$parentKey = $page->parent();
if (!empty($parentKey)) {
$parent = new Page($parentKey);
$options = array($parentKey=>$parent->title());
}
} catch (Exception $e) {
// continue
}
echo Bootstrap::formSelectBlock(array(
'name'=>'parent',
'label'=>$L->g('Parent'),
'options'=>$options,
'selected'=>false,
'class'=>'',
'tip'=>$L->g('Start typing a page title to see a list of suggestions.'),
));
?>
<script>
$(document).ready(function() {
var parent = $("#jsparent").select2({
placeholder: "",
allowClear: true,
theme: "bootstrap4",
minimumInputLength: 2,
ajax: {
url: HTML_PATH_ADMIN_ROOT+"ajax/get-published",
data: function (params) {
var query = {
checkIsParent: true,
query: params.term
}
return query;
},
processResults: function (data) {
return data;
}
},
escapeMarkup: function(markup) {
return markup;
},
templateResult: function(data) {
var html = data.text
if (data.type=="static") {
html += '<span class="badge badge-pill badge-light">'+data.type+'</span>';
}
return html;
}
});
});
</script>
<?php
// Template
echo Bootstrap::formInputTextBlock(array(
'name'=>'template',
'label'=>$L->g('Template'),
'placeholder'=>'',
'value'=>$page->template(),
'tip'=>$L->g('Write a template name to filter the page in the theme and change the style of the page.')
));
echo Bootstrap::formInputTextBlock(array(
'name'=>'externalCoverImage',
'label'=>$L->g('External cover image'),
'placeholder'=>"https://",
'value'=>$externalCoverImage,
'tip'=>$L->g('Set a cover image from external URL, such as a CDN or some server dedicated for images.')
));
// Username
echo Bootstrap::formInputTextBlock(array(
'name'=>'',
'label'=>$L->g('Author'),
'placeholder'=>'',
'value'=>$page->username(),
'tip'=>'',
'disabled'=>true
));
?>
<script>
$(document).ready(function() {
// Changes in External cover image input
$("#jsexternalCoverImage").change(function() {
$("#jscoverImage").val( $(this).val() );
});
// Datepicker
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
});
</script>
</div>
<?php if (!empty($site->customFields())): ?>
<div id="nav-custom" class="tab-pane fade" role="tabpanel" aria-labelledby="custom-tab">
<?php
$customFields = $site->customFields();
foreach ($customFields as $field=>$options) {
if ( !isset($options['position']) ) {
if ($options['type']=="string") {
echo Bootstrap::formInputTextBlock(array(
'name'=>'custom['.$field.']',
'value'=>(isset($options['default'])?$options['default']:''),
'tip'=>(isset($options['tip'])?$options['tip']:''),
'label'=>(isset($options['label'])?$options['label']:''),
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
'value'=>$page->custom($field)
));
} elseif ($options['type']=="bool") {
echo Bootstrap::formCheckbox(array(
'name'=>'custom['.$field.']',
'label'=>(isset($options['label'])?$options['label']:''),
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
'checked'=>$page->custom($field),
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:'')
));
}
}
} }
?>
</div>
<?php endif ?>
<div id="nav-seo" class="tab-pane fade" role="tabpanel" aria-labelledby="seo-tab">
<?php
// Friendly URL
echo Bootstrap::formInputTextBlock(array(
'name'=>'slug',
'tip'=>$L->g('URL associated with the content'),
'label'=>$L->g('Friendly URL'),
'placeholder'=>$L->g('Leave empty for autocomplete by Bludit.'),
'value'=>$page->slug()
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'noindex',
'label'=>'Robots',
'labelForCheckbox'=>$L->g('apply-code-noindex-code-to-this-page'),
'placeholder'=>'',
'checked'=>$page->noindex(),
'tip'=>$L->g('This tells search engines not to show this page in their search results.')
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'nofollow',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-nofollow-code-to-this-page'),
'placeholder'=>'',
'checked'=>$page->nofollow(),
'tip'=>$L->g('This tells search engines not to follow links on this page.')
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'noarchive',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-noarchive-code-to-this-page'),
'placeholder'=>'',
'checked'=>$page->noarchive(),
'tip'=>$L->g('This tells search engines not to save a cached copy of this page.')
));
?> ?>
</div> </div>
</div> </div>
</div>
<!-- TABS IMAGES --> <!-- Custom fields: TOP -->
<div class="tab-pane" id="images" role="tabpanel" aria-labelledby="images-tab"> <?php
$customFields = $site->customFields();
foreach ($customFields as $field=>$options) {
if ( isset($options['position']) && ($options['position']=='top') ) {
if ($options['type']=="string") {
echo Bootstrap::formInputTextBlock(array(
'name'=>'custom['.$field.']',
'label'=>(isset($options['label'])?$options['label']:''),
'value'=>$page->custom($field),
'tip'=>(isset($options['tip'])?$options['tip']:''),
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
'class'=>'mb-2',
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
<div> ));
<div class="float-right"> } elseif ($options['type']=="bool") {
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Update')) ?></button> echo Bootstrap::formCheckbox(array(
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php echo $L->g('Save as draft') ?></button> 'name'=>'custom['.$field.']',
</div> 'label'=>(isset($options['label'])?$options['label']:''),
<h4 class="mt-4 mb-4 font-weight-normal">Cover Image</h4> 'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
</div> 'checked'=>$page->custom($field),
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:''),
<?php 'class'=>'mb-2',
$coverImage = $page->coverImage(false); 'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
$externalCoverImage = ''; ));
if (filter_var($coverImage, FILTER_VALIDATE_URL)) {
$coverImage = '';
$externalCoverImage = $page->coverImage(false);
} }
?> }
}
?>
<img id="jscoverImagePreview" style="width: 350px; height: 200px;" class="img-thumbnail" alt="coverImagePreview" src="<?php echo HTML_PATH_ADMIN_THEME_IMG ?>default.svg" /> <!-- Title -->
<div class="form-group mb-1">
<input id="jstitle" name="title" type="text" class="form-control form-control-lg rounded-0" value="<?php echo $page->title() ?>" placeholder="<?php $L->p('Enter title') ?>">
</div>
<?php <!-- Editor -->
echo Bootstrap::formTitle(array('title'=>'External Cover image')); <textarea id="jseditor" class="editable h-100" style=""><?php echo $page->contentRaw(true) ?></textarea>
echo Bootstrap::formInputTextBlock(array( <!-- Custom fields: BOTTOM -->
'name'=>'externalCoverImage', <?php
'placeholder'=>'https://', $customFields = $site->customFields();
'value'=>$externalCoverImage, foreach ($customFields as $field=>$options) {
'tip'=>'Set a cover image from external URL, such as a CDN or some server dedicate for images.' if ( isset($options['position']) && ($options['position']=='bottom') ) {
)); if ($options['type']=="string") {
?> echo Bootstrap::formInputTextBlock(array(
'name'=>'custom['.$field.']',
'label'=>(isset($options['label'])?$options['label']:''),
'value'=>$page->custom($field),
'tip'=>(isset($options['tip'])?$options['tip']:''),
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
'class'=>'mt-2',
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
</div> ));
} elseif ($options['type']=="bool") {
<!-- TABS OPTIONS --> echo Bootstrap::formCheckbox(array(
<div class="tab-pane" id="options" role="tabpanel" aria-labelledby="options-tab"> 'name'=>'custom['.$field.']',
'label'=>(isset($options['label'])?$options['label']:''),
<div> 'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
<div class="float-right"> 'checked'=>$page->custom($field),
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Update')) ?></button> 'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:''),
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php echo $L->g('Save as draft') ?></button> 'class'=>'mt-2',
</div> 'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
<h4 class="mt-4 mb-4 font-weight-normal">General</h4> ));
</div>
<?php
// Username
echo Bootstrap::formInputText(array(
'name'=>'',
'label'=>'User',
'placeholder'=>'',
'value'=>$page->username(),
'tip'=>'',
'disabled'=>true
));
// Date
echo Bootstrap::formInputText(array(
'name'=>'date',
'label'=>'Date',
'placeholder'=>'',
'value'=>$page->dateRaw(),
'tip'=>'Date format: <code>YYYY-MM-DD Hours:Minutes:Seconds</code>'
));
// Type
echo Bootstrap::formSelect(array(
'name'=>'typeTMP',
'label'=>'Type',
'selected'=>$page->type(),
'options'=>array(
'published'=>'- Default -',
'sticky'=>'Sticky',
'static'=>'Static'
),
'tip'=>'???'
));
// Parent
try {
$parentKey = $page->parent();
$parent = new PageX($parentKey);
$parentOption = $parent->title();
} catch (Exception $e) {
$parentOption = '';
} }
}
}
?>
echo Bootstrap::formInputText(array( </form>
'name'=>'parentTMP',
'label'=>$L->g('Parent'),
'placeholder'=>'',
'tip'=>'Start typing a page title to see a list of suggestions.',
'value'=>$parentOption
));
// Position <!-- Modal for Delete page -->
echo Bootstrap::formInputText(array( <div id="jsdeletePageModal" class="modal" tabindex="-1" role="dialog">
'name'=>'position', <div class="modal-dialog">
'label'=>$L->g('Position'), <div class="modal-content">
'tip'=>'Field used when ordering content by position', <div class="modal-body">
'value'=>$page->position() <h3><?php $L->p('Delete content') ?></h3>
)); <p><?php $L->p('Are you sure you want to delete this page') ?></p>
</div>
// Template <div class="modal-footer">
echo Bootstrap::formInputText(array( <button type="button" class="btn btn-link" data-dismiss="modal"><?php $L->p('Cancel') ?></button>
'name'=>'template', <button type="button" class="btn btn-danger" data-dismiss="modal" id="jsbuttonDeleteAccept"><?php $L->p('Delete') ?></button>
'label'=>'Template', </div>
'placeholder'=>'', </div>
'value'=>$page->template(),
'tip'=>'Write a template name to filter the page in the theme and change the style of the page.'
));
echo Bootstrap::formTitle(array('title'=>'SEO'));
// Tags
echo Bootstrap::formInputText(array(
'name'=>'tags',
'label'=>'Tags',
'placeholder'=>'',
'value'=>$page->tags(),
'tip'=>'Write the tags separeted by comma'
));
// Friendly URL
echo Bootstrap::formInputText(array(
'name'=>'slug',
'tip'=>$L->g('URL associated with the content'),
'label'=>$L->g('Friendly URL'),
'placeholder'=>'Leave empty for autocomplete by Bludit.',
'value'=>$page->slug()
));
echo Bootstrap::formCheckbox(array(
'name'=>'noindex',
'label'=>'Robots',
'labelForCheckbox'=>'Apply <code>noindex</code> to this page',
'placeholder'=>'',
'class'=>'mt-4',
'checked'=>$page->noindex(),
'tip'=>'This tells search engines not to show this page in their search results.'
));
echo Bootstrap::formCheckbox(array(
'name'=>'nofollow',
'label'=>'',
'labelForCheckbox'=>'Apply <code>nofollow</code> to this page',
'placeholder'=>'',
'checked'=>$page->nofollow(),
'tip'=>'This tells search engines not to follow links on this page.'
));
echo Bootstrap::formCheckbox(array(
'name'=>'noarchive',
'label'=>'',
'labelForCheckbox'=>'Apply <code>noarchive</code> to this page',
'placeholder'=>'',
'checked'=>$page->noarchive(),
'tip'=>'This tells search engines not to save a cached copy of this page.'
));
?>
</div> </div>
<!-- Modal for delete page -->
<?php echo Bootstrap::modal(array(
'buttonPrimary'=>'Delete',
'buttonPrimaryClass'=>'jsbuttonDeleteAccept',
'buttonSecondary'=>'Cancel',
'buttonSecondaryClass'=>'',
'modalTitle'=>'Delete content',
'modalText'=>'Are you sure you want to delete: <b>'.$page->title().'</b>',
'modalId'=>'jsdeletePageModal'
));
?>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
// Delete content $("#jsbuttonDeleteAccept").on("click", function() {
$(".jsbuttonDeleteAccept").on("click", function() {
$("#jstype").val("delete"); $("#jstype").val("delete");
$("#jscontent").val(""); $("#jscontent").val("");
$("#jsform").submit(); $("#jsform").submit();
}); });
}); });
</script> </script>
</div>
<!-- Modal for Categories -->
<div id="jscategoryModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Category</h5>
</div>
<div class="modal-body">
<?php
echo Bootstrap::formSelectBlock(array(
'name'=>'category',
'label'=>'',
'selected'=>$page->categoryKey(),
'class'=>'',
'emptyOption'=>'- Without category -',
'options'=>$dbCategories->getKeyNameArray()
));
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Done</button>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
function setCategoryBox(value) {
var selected = $("#jscategory option:selected");
var value = selected.val().trim();
if (value) {
$("#jscategoryButton").find("span.option").html(selected.text());
} else {
$("#jscategoryButton").find("span.option").html("-");
}
}
// Set the current category selected
setCategoryBox();
// When the user select the category update the category button
$("#jscategory").on("change", function() {
setCategoryBox();
});
});
</script>
<!-- Modal for Description -->
<div id="jsdescriptionModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Description</h5>
</div>
<div class="modal-body">
<?php
echo Bootstrap::formTextareaBlock(array(
'name'=>'description',
'label'=>'',
'selected'=>'',
'class'=>'',
'value'=>$page->description(),
'rows'=>3,
'placeholder'=>$Language->get('this-field-can-help-describe-the-content')
));
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Done</button>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
function setDescriptionBox(value) {
var value = $("#jsdescription").val();
if (!value) {
value = '-';
} else {
value = jQuery.trim(value).substring(0, 60).split(" ").slice(0, -1).join(" ") + "...";
}
$("#jsdescriptionButton").find("span.option").html(value);
}
// Set the current description
setDescriptionBox();
// When the user write the description update the description button
$("#jsdescription").on("change", function() {
setDescriptionBox();
});
});
</script>
</form>
<!-- Modal for Media Manager --> <!-- Modal for Media Manager -->
<?php include(PATH_ADMIN_THEMES.'booty/html/media.php'); ?> <?php include(PATH_ADMIN_THEMES.'booty/html/media.php'); ?>
@ -383,79 +466,91 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
// Datepicker // Define function if they doesn't exist
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT}); // This helps if the user doesn't activate any plugin as editor
if (typeof editorGetContent != "function") {
window.editorGetContent = function(){
return $("#jseditor").val();
};
}
if (typeof editorInsertMedia != "function") {
window.editorInsertMedia = function(filename){
$("#jseditor").val($('#jseditor').val()+'<img src="'+filename+'" alt="">');
};
}
// Button switch
$("#jsswitchButton").on("click", function() {
if ($(this).data("switch")=="publish") {
$(this).html('<i class="fa fa-square switch-icon-draft"></i> <?php $L->p('Draft') ?>');
$(this).data("switch", "draft");
} else {
$(this).html('<i class="fa fa-square switch-icon-publish"></i> <?php $L->p('Publish') ?>');
$(this).data("switch", "publish");
}
});
// Button preview
$("#jsbuttonPreview").on("click", function() {
var uuid = $("#jsuuid").val();
var title = $("#jstitle").val();
var content = editorGetContent();
var ajax = new bluditAjax();
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
var preview = window.open("<?php echo DOMAIN_PAGES.'autosave-'.$page->uuid().'?preview='.md5('autosave-'.$page->uuid()) ?>", "bludit-preview");
preview.focus();
});
});
// Button Save // Button Save
$(".jsbuttonSave").on("click", function() { $("#jsbuttonSave").on("click", function() {
var type = $("#jstypeTMP option:selected").val(); // If the switch is setted to "published", get the value from the selector
$("#jstype").val(type); if ($("#jsswitchButton").data("switch")=="publish") {
var value = $("#jstypeSelector option:selected").val();
$("#jstype").val(value);
} else {
$("#jstype").val("draft");
}
// Get the content
$("#jscontent").val( editorGetContent() ); $("#jscontent").val( editorGetContent() );
// Submit the form
$("#jsform").submit(); $("#jsform").submit();
}); });
// Button Save as draft // Button Save as draft
$(".jsbuttonDraft").on("click", function() { $("#jsbuttonDraft").on("click", function() {
// Set the type as draft
$("#jstype").val("draft"); $("#jstype").val("draft");
// Get the content
$("#jscontent").val( editorGetContent() ); $("#jscontent").val( editorGetContent() );
// Submit the form
$("#jsform").submit(); $("#jsform").submit();
}); });
// External cover image // Autosave
$("#jsexternalCoverImage").change(function() { var currentContent = editorGetContent();
$("#jscoverImage").val( $(this).val() );
});
// Autosave interval
// Autosave works when the content of the page is bigger than 100 characters
setInterval(function() { setInterval(function() {
var uuid = $("#jsuuid").val(); var uuid = $("#jsuuid").val();
var title = $("#jstitle").val(); var title = $("#jstitle").val() + "[<?php $L->p('Autosave') ?>]";
var content = editorGetContent(); var content = editorGetContent();
var ajax = new bluditAjax(); // Autosave when content has at least 100 characters
// showAlert is the function to display an alert defined in alert.php if (content.length<100) {
ajax.autosave(uuid, title, content, showAlert); return false;
},1000*60*AUTOSAVE_INTERVAL); }
// Autosave only when the user change the content
// Template autocomplete if (currentContent!=content) {
$('input[name="template"]').autoComplete({ currentContent = content;
minChars: 2, bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
source: function(term, suggest){ if (data.status==0) {
term = term.toLowerCase(); showAlert("<?php $L->p('Autosave') ?>");
var choices = ['ActionScript', 'Acti', 'Asp'];
var matches = [];
for (i=0; i<choices.length; i++)
if (~choices[i].toLowerCase().indexOf(term)) matches.push(choices[i]);
suggest(matches);
}
});
// Parent autocomplete
var parentsXHR;
var parentsList; // Keep the parent list returned to get the key by the title page
$("#jsparentTMP").autoComplete({
minChars: 1,
source: function(term, response) {
// Prevent call inmediatly another ajax request
try { parentsXHR.abort(); } catch(e){}
parentsXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-parents", {query: term},
function(data) {
parentsList = data;
term = term.toLowerCase();
var matches = [];
for (var title in data) {
if (~title.toLowerCase().indexOf(term))
matches.push(title);
} }
response(matches); });
}); }
}, },1000*60*AUTOSAVE_INTERVAL);
onSelect: function(e, term, item) {
// parentsList = array( pageTitle => pageKey )
var parentKey = parentsList[term];
$("#jsparent").attr("value", parentKey);
}
});
}); });
</script> </script>

View File

@ -1,272 +1,298 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::formOpen(array()); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
echo ' <div class="align-middle">
<div> <div class="float-right mt-1">
<div class="float-right"> <button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<button type="submit" class="btn btn-primary btn-sm" name="save">'.$L->g('Save').'</button> <a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" role="button"><?php $L->p('Cancel') ?></a>
<a class="btn btn-secondary btn-sm" href="'.HTML_PATH_ADMIN_ROOT.'users" role="button">'.$L->g('Cancel').'</a>
</div> </div>
<h2 class="mt-0 mb-3"> <?php echo Bootstrap::pageTitle(array('title'=>$L->g('Edit user'), 'icon'=>'user')); ?>
<span class="oi oi-person" style="font-size: 0.7em;"></span> Edit user </div>
</h2>
</div>
';
<!-- TABS -->
<nav class="mb-3">
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<a class="nav-item nav-link active" id="nav-profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="nav-profile" aria-selected="false"><?php $L->p('Profile') ?></a>
<a class="nav-item nav-link" id="nav-picture-tab" data-toggle="tab" href="#picture" role="tab" aria-controls="nav-picture" aria-selected="false"><?php $L->p('Profile picture') ?></a>
<a class="nav-item nav-link" id="nav-security-tab" data-toggle="tab" href="#security" role="tab" aria-controls="nav-security" aria-selected="false"><?php $L->p('Security') ?></a>
<a class="nav-item nav-link" id="nav-social-tab" data-toggle="tab" href="#social" role="tab" aria-controls="nav-social" aria-selected="false"><?php $L->p('Social Networks') ?></a>
</div>
</nav>
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
)); ));
// Username
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'username', 'name'=>'username',
'value'=>$user->username() 'value'=>$user->username()
)); ));
echo Bootstrap::formInputText(array(
'name'=>'usernameDisabled',
'label'=>$L->g('Username'),
'value'=>$user->username(),
'class'=>'',
'placeholder'=>'',
'disabled'=>true,
'tip'=>''
));
if ($login->role()==='admin') {
echo Bootstrap::formSelect(array(
'name'=>'role',
'label'=>$L->g('Role'),
'options'=>array('reader'=>$L->g('Reader'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
'selected'=>$user->role(),
'class'=>'',
'tip'=>''
));
}
echo Bootstrap::formInputText(array(
'name'=>'email',
'label'=>$L->g('Email'),
'value'=>$user->email(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formTitle(array('title'=>$L->g('Profile')));
echo Bootstrap::formInputText(array(
'name'=>'nickname',
'label'=>$L->g('Nickname'),
'value'=>$user->nickname(),
'class'=>'',
'placeholder'=>'',
'tip'=>'The nickname is almost used in the themes to display the author of the content'
));
echo Bootstrap::formInputText(array(
'name'=>'firstName',
'label'=>$L->g('First Name'),
'value'=>$user->firstName(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'lastName',
'label'=>$L->g('Last Name'),
'value'=>$user->lastName(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formTitle(array('title'=>$L->g('Password')));
echo '
<div class="form-group row">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<a href="'.HTML_PATH_ADMIN_ROOT.'user-password/'.$user->username().'" class="btn btn-primary mr-2">'.$L->g('Change password').'</a>
</div>
</div>
';
echo Bootstrap::formTitle(array('title'=>$L->g('Authentication Token')));
echo Bootstrap::formInputText(array(
'name'=>'tokenAuth',
'label'=>$L->g('Token'),
'value'=>$user->tokenAuth(),
'class'=>'',
'tip'=>$L->g('this-token-is-similar-to-a-password-it-should-not-be-shared')
));
echo Bootstrap::formTitle(array('title'=>$L->g('Status')));
echo Bootstrap::formInputText(array(
'name'=>'status',
'label'=>$L->g('Current status'),
'value'=>$user->enabled()?$L->g('Enabled'):$L->g('Disabled'),
'class'=>'',
'disabled'=>true,
'tip'=>$user->enabled()?'':$L->g('To enable the user you must set a new password')
));
if ($user->enabled()) {
echo '
<div class="form-group row">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<button type="submit" class="btn btn-primary mr-2" id="jsdisableUser" name="disableUser">'.$L->g('Disable user').'</button>
<button type="submit" class="btn btn-danger mr-2" id="jsdeleteUserAndKeepContent" name="deleteUserAndKeepContent">'.$L->g('Delete user and keep content').'</button>
<button type="submit" class="btn btn-danger mr-2" id="jsdeleteUserAndDeleteContent" name="deleteUserAndDeleteContent">'.$L->g('Delete user and delete content !!!').'</button>
</div>
</div>
';
}
echo Bootstrap::formTitle(array('title'=>$L->g('Social Networks')));
echo Bootstrap::formInputText(array(
'name'=>'twitter',
'label'=>'Twitter',
'value'=>$user->twitter(),
'class'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'facebook',
'label'=>'Facebook',
'value'=>$user->facebook(),
'class'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'googlePlus',
'label'=>'Google+',
'value'=>$user->googlePlus(),
'class'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'instagram',
'label'=>'Instagram',
'value'=>$user->instagram(),
'class'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'codepen',
'label'=>'Codepen',
'value'=>$user->codepen(),
'class'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'linkedin',
'label'=>'Linkedin',
'value'=>$user->linkedin(),
'class'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'github',
'label'=>'Github',
'value'=>$user->github(),
'class'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'gitlab',
'label'=>'Gitlab',
'value'=>$user->gitlab(),
'class'=>'',
'tip'=>''
));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'users" role="button">'.$L->g('Cancel').'</a>
</div>
';
echo Bootstrap::formClose();
echo Bootstrap::formTitle(array('title'=>$L->g('Profile picture')));
$src = (Sanitize::pathFile(PATH_UPLOADS_PROFILES.$user->username().'.png')?DOMAIN_UPLOADS_PROFILES.$user->username().'.png':HTML_PATH_ADMIN_THEME_IMG.'default.svg');
echo '
<div class="form-group row">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<img id="jsprofilePictureImg" style="width: 350px; height: 200px;" class="img-thumbnail mb-2" alt="Profile Picture" src="'.$src.'" />
<form id="jsprofilePictureForm" name="profilePictureForm" enctype="multipart/form-data">
<input type="hidden" name="tokenCSRF" value="'.$security->getTokenCSRF().'">
<div class="custom-file">
<input type="file" class="custom-file-input" id="jsprofilePictureInputFile" name="profilePictureInputFile">
<label class="custom-file-label" for="jsprofilePictureInputFile">Choose images</label>
</div>
</form>
</div>
</div>
';
?> ?>
<script> <div class="tab-content" id="nav-tabContent">
$(document).ready(function() { <!-- Profile tab -->
<div class="tab-pane fade show active" id="profile" role="tabpanel" aria-labelledby="nav-profile-tab">
<?php
// Display username but disable the field
echo Bootstrap::formInputText(array(
'name'=>'usernameDisabled',
'label'=>$L->g('Username'),
'value'=>$user->username(),
'class'=>'',
'placeholder'=>'',
'disabled'=>true,
'tip'=>''
));
$("#jsdeleteUserAndDeleteContent").click(function() { if ($login->role()==='admin') {
if(confirm("<?php $Language->p('Confirm delete this action cannot be undone') ?>")==false) { echo Bootstrap::formSelect(array(
return false; 'name'=>'role',
'label'=>$L->g('Role'),
'options'=>array('author'=>$L->g('Author'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
'selected'=>$user->role(),
'class'=>'',
'tip'=>$L->g('author-can-write-and-edit-their-own-content')
));
} }
});
$("#jsdeleteUserAndKeepContent").click(function() { echo Bootstrap::formInputText(array(
if(confirm("<?php $Language->p('Confirm delete this action cannot be undone') ?>")==false) { 'name'=>'email',
return false; 'label'=>$L->g('Email'),
} 'value'=>$user->email(),
}); 'class'=>'',
'placeholder'=>'',
'tip'=>''
));
$("#jsprofilePictureInputFile").on("change", function() { echo Bootstrap::formInputText(array(
'name'=>'nickname',
'label'=>$L->g('Nickname'),
'value'=>$user->nickname(),
'class'=>'',
'placeholder'=>'',
'tip'=>$L->g('The nickname is almost used in the themes to display the author of the content')
));
$.ajax({ echo Bootstrap::formInputText(array(
url: "<?php echo HTML_PATH_ADMIN_ROOT ?>ajax/profile-picture", 'name'=>'firstName',
type: "POST", 'label'=>$L->g('First Name'),
data: new FormData($("#jsprofilePictureForm")[0]), 'value'=>$user->firstName(),
cache: false, 'class'=>'',
contentType: false, 'placeholder'=>'',
processData: false, 'tip'=>''
xhr: function() { ));
var xhr = $.ajaxSettings.xhr();
if (xhr.upload) { echo Bootstrap::formInputText(array(
xhr.upload.addEventListener("progress", function(e) { 'name'=>'lastName',
if (e.lengthComputable) { 'label'=>$L->g('Last Name'),
var percentComplete = (e.loaded / e.total)*100; 'value'=>$user->lastName(),
console.log("Uploading profile picture: "+percentComplete); 'class'=>'',
} 'placeholder'=>'',
}, false); 'tip'=>''
));
?>
</div>
<!-- Profile picture tab -->
<div class="tab-pane fade" id="picture" role="tabpanel" aria-labelledby="nav-picture-tab">
<div class="container">
<div class="row">
<div class="col-lg-4 col-sm-12 p-0 pr-2">
<div class="custom-file">
<input type="file" class="custom-file-input" id="jsprofilePictureInputFile" name="profilePictureInputFile">
<label class="custom-file-label" for="jsprofilePictureInputFile"><?php $L->p('Upload image'); ?></label>
</div>
<!-- <button id="jsbuttonRemovePicture" type="button" class="btn btn-primary w-100 mt-4 mb-4"><i class="fa fa-trash"></i> Remove picture</button> -->
</div>
<div class="col-lg-8 col-sm-12 p-0 text-center">
<img id="jsprofilePicturePreview" class="img-fluid img-thumbnail" alt="Profile picture preview" src="<?php echo (Sanitize::pathFile(PATH_UPLOADS_PROFILES.$user->username().'.png')?DOMAIN_UPLOADS_PROFILES.$user->username().'.png?version='.time():HTML_PATH_CORE_IMG.'default.svg') ?>" />
</div>
</div>
</div>
<script>
// $("#jsbuttonRemovePicture").on("click", function() {
// var username = $("#jsusername").val();
// bluditAjax.removeProfilePicture(username);
// $("#jsprofilePicturePreview").attr("src", "<?php echo HTML_PATH_CORE_IMG.'default.svg' ?>");
// });
$("#jsprofilePictureInputFile").on("change", function() {
var formData = new FormData();
formData.append('tokenCSRF', tokenCSRF);
formData.append('profilePictureInputFile', $(this)[0].files[0]);
formData.append('username', $("#jsusername").val());
$.ajax({
url: HTML_PATH_ADMIN_ROOT+"ajax/profile-picture-upload",
type: "POST",
data: formData,
cache: false,
contentType: false,
processData: false
}).done(function(data) {
if (data.status==0) {
$("#jsprofilePicturePreview").attr('src',data.absoluteURL+"?time="+Math.random());
} else {
showAlert(data.message);
} }
return xhr; });
}
}).done(function(e) {
$("#jsprofilePictureImg").attr('src',e.absoluteURL+"?time="+Math.random());
}); });
</script>
</div>
<!-- Security tab -->
<div class="tab-pane fade" id="security" role="tabpanel" aria-labelledby="nav-security-tab">
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('Password')));
echo '
<div class="form-group">
<a href="'.HTML_PATH_ADMIN_ROOT.'user-password/'.$user->username().'" class="btn btn-primary mr-2">'.$L->g('Change password').'</a>
</div>
';
echo Bootstrap::formTitle(array('title'=>$L->g('Authentication Token')));
echo Bootstrap::formInputText(array(
'name'=>'tokenAuth',
'label'=>$L->g('Token'),
'value'=>$user->tokenAuth(),
'class'=>'',
'tip'=>$L->g('this-token-is-similar-to-a-password-it-should-not-be-shared')
));
if (checkRole(array('admin'),false)) {
echo Bootstrap::formTitle(array('title'=>$L->g('Status')));
echo Bootstrap::formInputText(array(
'name'=>'status',
'label'=>$L->g('Current status'),
'value'=>$user->enabled()?$L->g('Enabled'):$L->g('Disabled'),
'class'=>'',
'disabled'=>true,
'tip'=>$user->enabled()?'':$L->g('To enable the user you must set a new password')
));
if ($user->enabled()) {
echo '
<div class="form-group row">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<button type="submit" class="btn btn-warning mr-2" id="jsdisableUser" name="disableUser">'.$L->g('Disable user').'</button>
<button type="submit" class="btn btn-danger mr-2" id="jsdeleteUserAndKeepContent" name="deleteUserAndKeepContent">'.$L->g('Delete user and keep content').'</button>
<button type="submit" class="btn btn-danger mr-2" id="jsdeleteUserAndDeleteContent" name="deleteUserAndDeleteContent">'.$L->g('Delete user and delete content').'</button>
</div>
</div>
';
}
}
?>
</div>
<!-- Social Networks tab -->
<div class="tab-pane fade" id="social" role="tabpanel" aria-labelledby="nav-social-tab">
<?php
echo Bootstrap::formInputText(array(
'name'=>'twitter',
'label'=>'Twitter',
'value'=>$user->twitter(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'facebook',
'label'=>'Facebook',
'value'=>$user->facebook(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'codepen',
'label'=>'CodePen',
'value'=>$user->codepen(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'instagram',
'label'=>'Instagram',
'value'=>$user->instagram(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'gitlab',
'label'=>'GitLab',
'value'=>$user->gitlab(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'github',
'label'=>'GitHub',
'value'=>$user->github(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'linkedin',
'label'=>'LinkedIn',
'value'=>$user->linkedin(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'mastodon',
'label'=>'Mastodon',
'value'=>$user->mastodon(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'vk',
'label'=>'VK',
'value'=>$user->vk(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
?>
</div>
</div>
<?php echo Bootstrap::formClose(); ?>
<script>
// Open current tab after refresh page
$(function() {
$('a[data-toggle="tab"]').on('click', function(e) {
window.localStorage.setItem('activeTab', $(e.target).attr('href'));
console.log($(e.target).attr('href'));
});
var activeTab = window.localStorage.getItem('activeTab');
if (activeTab) {
$('#nav-tab a[href="' + activeTab + '"]').tab('show');
//window.localStorage.removeItem("activeTab");
}
}); });
});
</script> </script>

View File

@ -11,7 +11,7 @@ echo Bootstrap::formOpen(array());
echo ' echo '
<div class="form-group"> <div class="form-group">
<input type="text" value="'.(isset($_POST['username'])?$_POST['username']:'').'" class="form-control form-control-lg" id="jsusername" name="username" placeholder="'.$L->g('Username').'"> <input type="text" value="'.(isset($_POST['username'])?$_POST['username']:'').'" class="form-control form-control-lg" id="jsusername" name="username" placeholder="'.$L->g('Username').'" autofocus>
</div> </div>
'; ';
@ -28,7 +28,7 @@ echo Bootstrap::formOpen(array());
</div> </div>
<div class="form-group mt-4"> <div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2 w-100 text-" name="save">'.$L->g('Login').'</button> <button type="submit" class="btn btn-primary btn-lg mr-2 w-100" name="save">'.$L->g('Login').'</button>
</div> </div>
'; ';

View File

@ -1,28 +1,39 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$L->g('New Category'), 'icon'=>'grid-three-up')); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
echo Bootstrap::formOpen(array()); <div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('New category'), 'icon'=>'tag')); ?>
</div>
<?php
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
)); ));
echo Bootstrap::formInputTextBlock(array( echo Bootstrap::formInputText(array(
'name'=>'category', 'name'=>'name',
'label'=>$L->g('Category name'), 'label'=>$L->g('Name'),
'value'=>isset($_POST['category'])?$_POST['category']:'', 'value'=>isset($_POST['category'])?$_POST['category']:'',
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
echo ' echo Bootstrap::formTextarea(array(
<div class="form-group mt-4"> 'name'=>'description',
<button type="submit" class="btn btn-primary mr-2">Save</button> 'label'=>$L->g('Description'),
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'categories" role="button">Cancel</a> 'value'=>isset($_POST['description'])?$_POST['description']:'',
</div> 'class'=>'',
'; 'placeholder'=>'',
'tip'=>'',
'rows'=>3
));
?>
echo Bootstrap::formClose(); <?php echo Bootstrap::formClose(); ?>

View File

@ -1,314 +1,419 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?> <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
<!-- TABS --> <?php
<ul class="nav nav-tabs" id="dynamicTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="content-tab" data-toggle="tab" href="#content" role="tab" aria-controls="content" aria-selected="true">Editor</a>
</li>
<li class="nav-item">
<a class="nav-link" id="images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="images" aria-selected="false">Images</a>
</li>
<li class="nav-item">
<a class="nav-link " id="options-tab" data-toggle="tab" href="#options" role="tab" aria-controls="options" aria-selected="false">Options</a>
</li>
</ul>
<?php
echo Bootstrap::formOpen(array(
'id'=>'jsform',
'class'=>'tab-content mt-1'
));
// Token CSRF // Start form
echo Bootstrap::formInputHidden(array( echo Bootstrap::formOpen(array(
'name'=>'tokenCSRF', 'id'=>'jsform',
'value'=>$security->getTokenCSRF() 'class'=>'d-flex flex-column h-100'
)); ));
// Parent // Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'parent', 'name'=>'tokenCSRF',
'value'=>'' 'value'=>$security->getTokenCSRF()
)); ));
// UUID // UUID
echo Bootstrap::formInputHidden(array( // The UUID is generated in the controller
'name'=>'uuid', echo Bootstrap::formInputHidden(array(
'value'=>$dbPages->generateUUID() 'name'=>'uuid',
)); 'value'=>$uuid
));
// Status = published, draft, sticky, static // Type = published, draft, sticky, static
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'type', 'name'=>'type',
'value'=>'published' 'value'=>'published'
)); ));
// Cover image // Cover image
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'coverImage', 'name'=>'coverImage',
'value'=>'' 'value'=>''
)); ));
// Content // Content
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'content', 'name'=>'content',
'value'=>'' 'value'=>''
)); ));
?> ?>
<!-- TABS CONTENT -->
<div class="tab-pane show active" id="content" role="tabpanel" aria-labelledby="content-tab">
<div class="form-group m-0">
<input value="" class="form-control form-control-lg rounded-0 " id="jstitle" name="title" placeholder="Enter title" type="text">
</div>
<div class="form-group m-0 mt-1">
<button id="jsmediaManagerButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsbluditMediaModal"><span class="oi oi-image"></span> Media Manager</button>
<button id="jscategoryButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jscategoryModal"><span class="oi oi-tag"></span> Category: <span class="option">-</span></button>
<button id="jsdescriptionButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsdescriptionModal"><span class="oi oi-tag"></span> Description: <span class="option">-</span></button>
</div>
<div class="form-group mt-1">
<textarea id="jseditor" style="display:none;"></textarea>
</div>
<div class="form-group mt-2">
<button type="button" class="jsbuttonSave btn btn-primary"><?php echo $L->g('Publish') ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary"><?php echo $L->g('Save as draft') ?></button>
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-secondary"><?php echo $L->g('Cancel') ?></a>
</div>
<!-- TOOLBAR -->
<div id="jseditorToolbar" class="mb-1">
<div id="jseditorToolbarRight" class="btn-group btn-group-sm float-right" role="group" aria-label="Toolbar right">
<button type="button" class="btn btn-light" id="jsmediaManagerOpenModal" data-toggle="modal" data-target="#jsmediaManagerModal"><span class="fa fa-image"></span> <?php $L->p('Images') ?></button>
<button type="button" class="btn btn-light" id="jsoptionsSidebar" style="z-index:30"><span class="fa fa-cog"></span> <?php $L->p('Options') ?></button>
</div> </div>
<!-- TABS IMAGES --> <div id="jseditorToolbarLeft">
<div class="tab-pane" id="images" role="tabpanel" aria-labelledby="images-tab"> <button id="jsbuttonSave" type="button" class="btn btn-sm btn-primary" ><?php $L->p('Save') ?></button>
<button id="jsbuttonPreview" type="button" class="btn btn-sm btn-secondary"><?php $L->p('Preview') ?></button>
<div> <span id="jsbuttonSwitch" data-switch="publish" class="ml-2 text-secondary switch-button"><i class="fa fa-square switch-icon-publish"></i> <?php $L->p('Publish') ?></span>
<div class="float-right">
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo $L->g('Publish') ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php echo $L->g('Save as draft') ?></button>
</div>
<h4 class="mt-4 mb-4 font-weight-normal">Cover Image</h4>
</div>
<img id="jscoverImagePreview" style="width: 350px; height: 200px;" class="img-thumbnail" alt="coverImagePreview" src="<?php echo HTML_PATH_ADMIN_THEME_IMG ?>default.svg" />
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('External Cover Image')));
echo Bootstrap::formInputTextBlock(array(
'name'=>'externalCoverImage',
'placeholder'=>"https://",
'value'=>'',
'tip'=>'Set a cover image from external URL, such as a CDN or some server dedicate for images.'
));
?>
</div> </div>
</div>
<!-- TABS OPTIONS --> <script>
<div class="tab-pane" id="options" role="tabpanel" aria-labelledby="options-tab">
<div>
<div class="float-right">
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo $L->g('Publish') ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php echo $L->g('Save as draft') ?></button>
</div>
<h4 class="mt-4 mb-4 font-weight-normal">Advanced</h4>
</div>
<?php
// Date
echo Bootstrap::formInputText(array(
'name'=>'date',
'label'=>'Date',
'placeholder'=>'',
'value'=>Date::current(DB_DATE_FORMAT),
'tip'=>'Date format: <code>YYYY-MM-DD Hours:Minutes:Seconds</code>'
));
// Type
echo Bootstrap::formSelect(array(
'name'=>'typeTMP',
'label'=>'Type',
'selected'=>'',
'options'=>array(
'published'=>'- Default -',
'sticky'=>'Sticky',
'static'=>'Static'
),
'tip'=>'???'
));
// Parent
echo Bootstrap::formInputText(array(
'name'=>'parentTMP',
'label'=>$L->g('Parent'),
'placeholder'=>'',
'tip'=>'Start typing a page title to see a list of suggestions.',
'value'=>''
));
// Position
echo Bootstrap::formInputText(array(
'name'=>'position',
'label'=>$L->g('Position'),
'tip'=>'Field used when ordering content by position',
'value'=>$dbPages->nextPositionNumber()
));
// Template
echo Bootstrap::formInputText(array(
'name'=>'template',
'label'=>'Template',
'placeholder'=>'',
'value'=>'',
'tip'=>'Write a template name to filter the page in the theme and change the style of the page.'
));
echo Bootstrap::formTitle(array('title'=>'SEO'));
// Tags
echo Bootstrap::formInputText(array(
'name'=>'tags',
'label'=>'Tags',
'placeholder'=>'',
'tip'=>'Write the tags separeted by comma'
));
// Friendly URL
echo Bootstrap::formInputText(array(
'name'=>'slug',
'tip'=>$L->g('URL associated with the content'),
'label'=>$L->g('Friendly URL'),
'placeholder'=>'Leave empty for autocomplete by Bludit.'
));
echo Bootstrap::formCheckbox(array(
'name'=>'noindex',
'label'=>'Robots',
'labelForCheckbox'=>'Apply <code>noindex</code> to this page',
'placeholder'=>'',
'class'=>'mt-4',
'checked'=>false,
'tip'=>'This tells search engines not to show this page in their search results.'
));
echo Bootstrap::formCheckbox(array(
'name'=>'nofollow',
'label'=>'',
'labelForCheckbox'=>'Apply <code>nofollow</code> to this page',
'placeholder'=>'',
'checked'=>false,
'tip'=>'This tells search engines not to follow links on this page.'
));
echo Bootstrap::formCheckbox(array(
'name'=>'noarchive',
'label'=>'',
'labelForCheckbox'=>'Apply <code>noarchive</code> to this page',
'placeholder'=>'',
'checked'=>false,
'tip'=>'This tells search engines not to save a cached copy of this page.'
));
?>
</div>
<!-- Modal for Categories -->
<div id="jscategoryModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Category</h5>
</div>
<div class="modal-body">
<?php
echo Bootstrap::formSelectBlock(array(
'name'=>'category',
'label'=>'',
'selected'=>'',
'class'=>'',
'emptyOption'=>'- Without category -',
'options'=>$dbCategories->getKeyNameArray()
));
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Done</button>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() { $(document).ready(function() {
function setCategoryBox(value) { $("#jsoptionsSidebar").on("click", function() {
var selected = $("#jscategory option:selected"); $("#jseditorSidebar").toggle();
var value = selected.val().trim(); $("#jsshadow").toggle();
if (value) { });
$("#jscategoryButton").find("span.option").html(selected.text());
} else {
$("#jscategoryButton").find("span.option").html("-");
}
}
// Set the current category selected $("#jsshadow").on("click", function() {
setCategoryBox(); $("#jseditorSidebar").toggle();
$("#jsshadow").toggle();
// When the user select the category update the category button
$("#jscategory").on("change", function() {
setCategoryBox();
}); });
}); });
</script> </script>
<!-- Modal for Description --> <!-- SIDEBAR OPTIONS -->
<div id="jsdescriptionModal" class="modal fade" tabindex="-1" role="dialog"> <div id="jseditorSidebar">
<div class="modal-dialog"> <nav>
<div class="modal-content"> <div class="nav nav-tabs" id="nav-tab" role="tablist">
<div class="modal-header"> <a class="nav-link active show" id="nav-general-tab" data-toggle="tab" href="#nav-general" role="tab" aria-controls="general"><?php $L->p('General') ?></a>
<h5 class="modal-title">Description</h5> <a class="nav-link" id="nav-advanced-tab" data-toggle="tab" href="#nav-advanced" role="tab" aria-controls="advanced"><?php $L->p('Advanced') ?></a>
</div> <?php if (!empty($site->customFields())): ?>
<div class="modal-body"> <a class="nav-link" id="nav-custom-tab" data-toggle="tab" href="#nav-custom" role="tab" aria-controls="custom"><?php $L->p('Custom') ?></a>
<?php <?php endif ?>
echo Bootstrap::formTextareaBlock(array( <a class="nav-link" id="nav-seo-tab" data-toggle="tab" href="#nav-seo" role="tab" aria-controls="seo"><?php $L->p('SEO') ?></a>
'name'=>'description', </div>
'label'=>'', </nav>
'selected'=>'',
'class'=>'', <div class="tab-content pr-3 pl-3 pb-3">
'value'=>'', <div id="nav-general" class="tab-pane fade show active" role="tabpanel" aria-labelledby="general-tab">
'rows'=>3, <?php
'placeholder'=>$Language->get('this-field-can-help-describe-the-content') // Category
)); echo Bootstrap::formSelectBlock(array(
?> 'name'=>'category',
</div> 'label'=>$L->g('Category'),
<div class="modal-footer"> 'selected'=>'',
<button type="button" class="btn btn-primary" data-dismiss="modal">Done</button> 'class'=>'',
</div> 'emptyOption'=>'- '.$L->g('Uncategorized').' -',
'options'=>$categories->getKeyNameArray()
));
// Description
echo Bootstrap::formTextareaBlock(array(
'name'=>'description',
'label'=>$L->g('Description'),
'selected'=>'',
'class'=>'',
'value'=>'',
'rows'=>5,
'placeholder'=>$L->get('this-field-can-help-describe-the-content')
));
?>
<!-- Cover Image -->
<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100"><?php $L->p('Cover Image') ?></label>
<div>
<img id="jscoverImagePreview" class="mx-auto d-block w-100" alt="Cover image preview" src="<?php echo HTML_PATH_CORE_IMG ?>default.svg" />
</div> </div>
<div class="mt-2 text-center">
<button type="button" id="jsbuttonSelectCoverImage" class="btn btn-primary btn-sm"><?php echo $L->g('Select cover image') ?></button>
<button type="button" id="jsbuttonRemoveCoverImage" class="btn btn-secondary btn-sm"><?php echo $L->g('Remove cover image') ?></button>
</div>
<script>
$(document).ready(function() {
$("#jscoverImagePreview").on("click", function() {
openMediaManager();
});
$("#jsbuttonSelectCoverImage").on("click", function() {
openMediaManager();
});
$("#jsbuttonRemoveCoverImage").on("click", function() {
$("#jscoverImage").val('');
$("#jscoverImagePreview").attr('src', HTML_PATH_CORE_IMG+'default.svg');
});
});
</script>
</div>
<div id="nav-advanced" class="tab-pane fade" role="tabpanel" aria-labelledby="advanced-tab">
<?php
// Date
echo Bootstrap::formInputTextBlock(array(
'name'=>'date',
'label'=>$L->g('Date'),
'placeholder'=>'',
'value'=>Date::current(DB_DATE_FORMAT),
'tip'=>$L->g('date-format-format')
));
// Type
echo Bootstrap::formSelectBlock(array(
'name'=>'typeSelector',
'label'=>$L->g('Type'),
'selected'=>'',
'options'=>array(
'published'=>'- '.$L->g('Default').' -',
'sticky'=>$L->g('Sticky'),
'static'=>$L->g('Static')
),
'tip'=>''
));
// Position
echo Bootstrap::formInputTextBlock(array(
'name'=>'position',
'label'=>$L->g('Position'),
'tip'=>$L->g('Field used when ordering content by position'),
'value'=>$pages->nextPositionNumber()
));
// Tags
echo Bootstrap::formInputTextBlock(array(
'name'=>'tags',
'label'=>$L->g('Tags'),
'placeholder'=>'',
'tip'=>$L->g('Write the tags separated by comma')
));
// Parent
echo Bootstrap::formSelectBlock(array(
'name'=>'parent',
'label'=>$L->g('Parent'),
'options'=>array(),
'selected'=>false,
'class'=>'',
'tip'=>$L->g('Start typing a page title to see a list of suggestions.'),
));
?>
<script>
$(document).ready(function() {
var parent = $("#jsparent").select2({
placeholder: "",
allowClear: true,
theme: "bootstrap4",
minimumInputLength: 2,
ajax: {
url: HTML_PATH_ADMIN_ROOT+"ajax/get-published",
data: function (params) {
var query = {
checkIsParent: true,
query: params.term
}
return query;
},
processResults: function (data) {
return data;
}
},
escapeMarkup: function(markup) {
return markup;
},
templateResult: function(data) {
var html = data.text;
if (data.type=="static") {
html += '<span class="badge badge-pill badge-light">'+data.type+'</span>';
}
return html;
}
});
});
</script>
<?php
// Template
echo Bootstrap::formInputTextBlock(array(
'name'=>'template',
'label'=>$L->g('Template'),
'placeholder'=>'',
'value'=>'',
'tip'=>$L->g('Write a template name to filter the page in the theme and change the style of the page.')
));
echo Bootstrap::formInputTextBlock(array(
'name'=>'externalCoverImage',
'label'=>$L->g('External cover image'),
'placeholder'=>"https://",
'value'=>'',
'tip'=>$L->g('Set a cover image from external URL, such as a CDN or some server dedicated for images.')
));
// Username
echo Bootstrap::formInputTextBlock(array(
'name'=>'',
'label'=>$L->g('Author'),
'placeholder'=>'',
'value'=>$login->username(),
'tip'=>'',
'disabled'=>true
));
?>
<script>
$(document).ready(function() {
// Changes in External cover image input
$("#jsexternalCoverImage").change(function() {
$("#jscoverImage").val( $(this).val() );
});
// Generate slug when the user type the title
$("#jstitle").keyup(function() {
var text = $(this).val();
var parent = $("#jsparent").val();
var currentKey = "";
var ajax = new bluditAjax();
var callBack = $("#jsslug");
ajax.generateSlug(text, parent, currentKey, callBack);
});
// Datepicker
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
});
</script>
</div>
<?php if (!empty($site->customFields())): ?>
<div id="nav-custom" class="tab-pane fade" role="tabpanel" aria-labelledby="custom-tab">
<?php
$customFields = $site->customFields();
foreach ($customFields as $field=>$options) {
if ( !isset($options['position']) ) {
if ($options['type']=="string") {
echo Bootstrap::formInputTextBlock(array(
'name'=>'custom['.$field.']',
'label'=>(isset($options['label'])?$options['label']:''),
'value'=>(isset($options['default'])?$options['default']:''),
'tip'=>(isset($options['tip'])?$options['tip']:''),
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:'')
));
} elseif ($options['type']=="bool") {
echo Bootstrap::formCheckbox(array(
'name'=>'custom['.$field.']',
'label'=>(isset($options['label'])?$options['label']:''),
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
'checked'=>(isset($options['checked'])?true:false),
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:'')
));
}
}
}
?>
</div>
<?php endif ?>
<div id="nav-seo" class="tab-pane fade" role="tabpanel" aria-labelledby="seo-tab">
<?php
// Friendly URL
echo Bootstrap::formInputTextBlock(array(
'name'=>'slug',
'tip'=>$L->g('URL associated with the content'),
'label'=>$L->g('Friendly URL'),
'placeholder'=>$L->g('Leave empty for autocomplete by Bludit.')
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'noindex',
'label'=>'Robots',
'labelForCheckbox'=>$L->g('apply-code-noindex-code-to-this-page'),
'placeholder'=>'',
'checked'=>false,
'tip'=>$L->g('This tells search engines not to show this page in their search results.')
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'nofollow',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-nofollow-code-to-this-page'),
'placeholder'=>'',
'checked'=>false,
'tip'=>$L->g('This tells search engines not to follow links on this page.')
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'noarchive',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-noarchive-code-to-this-page'),
'placeholder'=>'',
'checked'=>false,
'tip'=>$L->g('This tells search engines not to save a cached copy of this page.')
));
?>
</div> </div>
</div> </div>
<script> </div>
$(document).ready(function() {
function setDescriptionBox(value) { <!-- Custom fields: TOP -->
var value = $("#jsdescription").val(); <?php
if (!value) { $customFields = $site->customFields();
value = '-'; foreach ($customFields as $field=>$options) {
} else { if ( isset($options['position']) && ($options['position']=='top') ) {
value = jQuery.trim(value).substring(0, 60).split(" ").slice(0, -1).join(" ") + "..."; if ($options['type']=="string") {
echo Bootstrap::formInputTextBlock(array(
'name'=>'custom['.$field.']',
'label'=>(isset($options['label'])?$options['label']:''),
'value'=>(isset($options['default'])?$options['default']:''),
'tip'=>(isset($options['tip'])?$options['tip']:''),
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
'class'=>'mb-2',
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
));
} elseif ($options['type']=="bool") {
echo Bootstrap::formCheckbox(array(
'name'=>'custom['.$field.']',
'label'=>(isset($options['label'])?$options['label']:''),
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
'checked'=>(isset($options['checked'])?true:false),
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:''),
'class'=>'mb-2',
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
));
} }
$("#jsdescriptionButton").find("span.option").html(value);
} }
}
?>
// Set the current description
setDescriptionBox();
// When the user write the description update the description button <!-- Title -->
$("#jsdescription").on("change", function() { <div id="jseditorTitle" class="form-group mb-1">
setDescriptionBox(); <input id="jstitle" name="title" type="text" class="form-control form-control-lg rounded-0" value="" placeholder="<?php $L->p('Enter title') ?>">
}); </div>
});
</script> <!-- Editor -->
<textarea id="jseditor" class="editable h-100 mb-1"></textarea>
<!-- Custom fields: BOTTOM -->
<?php
$customFields = $site->customFields();
foreach ($customFields as $field=>$options) {
if ( isset($options['position']) && ($options['position']=='bottom') ) {
if ($options['type']=="string") {
echo Bootstrap::formInputTextBlock(array(
'name'=>'custom['.$field.']',
'label'=>(isset($options['label'])?$options['label']:''),
'value'=>(isset($options['default'])?$options['default']:''),
'tip'=>(isset($options['tip'])?$options['tip']:''),
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
'class'=>'mt-2',
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
));
} elseif ($options['type']=="bool") {
echo Bootstrap::formCheckbox(array(
'name'=>'custom['.$field.']',
'label'=>(isset($options['label'])?$options['label']:''),
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
'checked'=>(isset($options['checked'])?true:false),
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:''),
'class'=>'mt-2',
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
));
}
}
}
?>
</form> </form>
<!-- Modal for Media Manager --> <!-- Modal for Media Manager -->
@ -317,88 +422,78 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
// Datepicker // Define function if they doesn't exist
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT}); // This helps if the user doesn't activate any plugin as editor
if (typeof editorGetContent != "function") {
window.editorGetContent = function(){
return $("#jseditor").val();
};
}
if (typeof editorInsertMedia != "function") {
window.editorInsertMedia = function(filename){
$("#jseditor").val($('#jseditor').val()+'<img src="'+filename+'" alt="">');
};
}
// Button switch
$("#jsbuttonSwitch").on("click", function() {
if ($(this).data("switch")=="publish") {
$(this).html('<i class="fa fa-square switch-icon-draft"></i> <?php $L->p('Draft') ?>');
$(this).data("switch", "draft");
} else {
$(this).html('<i class="fa fa-square switch-icon-publish"></i> <?php $L->p('Publish') ?>');
$(this).data("switch", "publish");
}
});
// Button preview
$("#jsbuttonPreview").on("click", function() {
var uuid = $("#jsuuid").val();
var title = $("#jstitle").val();
var content = editorGetContent();
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
var preview = window.open("<?php echo DOMAIN_PAGES.'autosave-'.$uuid.'?preview='.md5('autosave-'.$uuid) ?>", "bludit-preview");
preview.focus();
});
});
// Button Save // Button Save
$(".jsbuttonSave").on("click", function() { $("#jsbuttonSave").on("click", function() {
var type = $("#jstypeTMP option:selected").val(); // If the switch is setted to "published", get the value from the selector
$("#jstype").val(type); if ($("#jsbuttonSwitch").data("switch")=="publish") {
var value = $("#jstypeSelector option:selected").val();
$("#jstype").val(value);
} else {
$("#jstype").val("draft");
}
// Get the content
$("#jscontent").val( editorGetContent() ); $("#jscontent").val( editorGetContent() );
// Submit the form
$("#jsform").submit(); $("#jsform").submit();
}); });
// Button Save as draft // Autosave
$(".jsbuttonDraft").on("click", function() { var currentContent = editorGetContent();
$("#jstype").val("draft");
$("#jscontent").val( editorGetContent() );
$("#jsform").submit();
});
// External cover image
$("#jsexternalCoverImage").change(function() {
$("#jscoverImage").val( $(this).val() );
});
// Generate slug when the user type the title
$("#jstitle").keyup(function() {
var text = $(this).val();
var parent = $("#jsparent").val();
var currentKey = "";
var ajax = new bluditAjax();
ajax.generateSlug(text, parent, currentKey, $("#jsslug"));
});
// Autosave interval
// Autosave works when the content of the page is bigger than 100 characters
setInterval(function() { setInterval(function() {
var uuid = $("#jsuuid").val(); var uuid = $("#jsuuid").val();
var title = $("#jstitle").val(); var title = $("#jstitle").val() + "[<?php $L->p('Autosave') ?>]";
var content = editorGetContent(); var content = editorGetContent();
var ajax = new bluditAjax(); // Autosave when content has at least 100 characters
// showAlert is the function to display an alert defined in alert.php if (content.length<100) {
ajax.autosave(uuid, title, content, showAlert); return false;
},1000*60*AUTOSAVE_INTERVAL); }
// Autosave only when the user change the content
// Template autocomplete if (currentContent!=content) {
$('input[name="template"]').autoComplete({ currentContent = content;
minChars: 2, bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
source: function(term, suggest){ if (data.status==0) {
term = term.toLowerCase(); showAlert("<?php $L->p('Autosave') ?>");
var choices = ['ActionScript', 'Acti', 'Asp'];
var matches = [];
for (i=0; i<choices.length; i++)
if (~choices[i].toLowerCase().indexOf(term)) matches.push(choices[i]);
suggest(matches);
}
});
// Parent autocomplete
var parentsXHR;
var parentsList; // Keep the parent list returned to get the key by the title page
$("#jsparentTMP").autoComplete({
minChars: 1,
source: function(term, response) {
// Prevent call inmediatly another ajax request
try { parentsXHR.abort(); } catch(e){}
parentsXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-parents", {query: term},
function(data) {
parentsList = data;
term = term.toLowerCase();
var matches = [];
for (var title in data) {
if (~title.toLowerCase().indexOf(term))
matches.push(title);
} }
response(matches); });
}); }
}, },1000*60*AUTOSAVE_INTERVAL);
onSelect: function(e, term, item) {
// parentsList = array( pageTitle => pageKey )
var parentKey = parentsList[term];
$("#jsparent").attr("value", parentKey);
}
});
}); });
</script> </script>

View File

@ -1,9 +1,16 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$L->g('Add a new user'), 'icon'=>'person')); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
echo Bootstrap::formOpen(array()); <div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Add a new user'), 'icon'=>'user')); ?>
</div>
<?php
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
@ -41,10 +48,10 @@ echo Bootstrap::formOpen(array());
echo Bootstrap::formSelect(array( echo Bootstrap::formSelect(array(
'name'=>'role', 'name'=>'role',
'label'=>$L->g('Role'), 'label'=>$L->g('Role'),
'options'=>array('reader'=>$L->g('Reader'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')), 'options'=>array('author'=>$L->g('Author'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
'selected'=>'reader', 'selected'=>'Author',
'class'=>'', 'class'=>'',
'tip'=>'' 'tip'=>$L->g('author-can-write-and-edit-their-own-content')
)); ));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
@ -55,12 +62,6 @@ echo Bootstrap::formOpen(array());
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
?>
echo ' <?php echo Bootstrap::formClose(); ?>
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'users" role="button">'.$L->g('Cancel').'</a>
</div>
';
echo Bootstrap::formClose();

View File

@ -1,11 +1,18 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$L->g('Plugin position'), 'icon'=>'tags')); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
echo Bootstrap::alert(array('class'=>'alert-primary', 'text'=>$L->g('Drag and Drop to sort the plugins'))); <div class="align-middle">
<div class="float-right mt-1">
<button type="button" class="btn btn-primary btn-sm jsbuttonSave" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins position'), 'icon'=>'tags')); ?>
</div>
echo Bootstrap::formOpen(array('id'=>'jsform')); <div class="alert alert-primary"><?php $L->p('Drag and Drop to sort the plugins') ?></div>
<?php
// Token CSRF // Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
@ -19,24 +26,15 @@ echo Bootstrap::formOpen(array('id'=>'jsform'));
echo '<ul class="list-group list-group-sortable">'; echo '<ul class="list-group list-group-sortable">';
foreach ($plugins['siteSidebar'] as $Plugin) { foreach ($plugins['siteSidebar'] as $Plugin) {
echo '<li class="list-group-item" data-plugin="'.$Plugin->className().'"><span class="oi oi-move"></span> '.$Plugin->name().'</li>'; echo '<li class="list-group-item" data-plugin="'.$Plugin->className().'"><span class="fa fa-arrows-v"></span> '.$Plugin->name().'</li>';
} }
echo '</ul>'; echo '</ul>';
echo '
<div class="form-group mt-3">
<button type="button" class="jsbuttonSave btn btn-primary">'.$L->g('Save').'</button>
<a href="'.HTML_PATH_ADMIN_ROOT.'plugins" class="btn btn-secondary">'.$L->g('Cancel').'</a>
</div>
';
echo Bootstrap::formClose();
?> ?>
<?php echo Bootstrap::formClose(); ?>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$('.list-group-sortable').sortable({ $('.list-group-sortable').sortable({
placeholderClass: 'list-group-item' placeholderClass: 'list-group-item'
}); });

View File

@ -5,42 +5,95 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins'), 'icon'=>'puzzle-piece
echo Bootstrap::link(array( echo Bootstrap::link(array(
'title'=>$L->g('Change the position of the plugins'), 'title'=>$L->g('Change the position of the plugins'),
'href'=>HTML_PATH_ADMIN_ROOT.'plugins-position', 'href'=>HTML_PATH_ADMIN_ROOT.'plugins-position',
'icon'=>'elevator' 'icon'=>'arrows'
)); ));
echo Bootstrap::formTitle(array('title'=>$L->g('Search plugins')));
?>
<input type="text" class="form-control" id="search" placeholder="<?php $L->p('Search') ?>">
<script>
$(document).ready(function() {
$("#search").on("keyup", function() {
var textToSearch = $(this).val().toLowerCase();
$(".searchItem").each( function() {
var item = $(this);
item.hide();
item.find(".searchText").each( function() {
var element = $(this).text().toLowerCase();
if (element.indexOf(textToSearch)!=-1) {
item.show();
}
});
});
});
});
</script>
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('Enabled plugins')));
echo ' echo '
<table class="table mt-3"> <table class="table">
<thead>
<tr>
<th class="border-bottom-0 w-25" scope="col">'.$L->g('Name').'</th>
<th class="border-bottom-0 d-none d-sm-table-cell" scope="col">'.$L->g('Description').'</th>
<th class="text-center border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Version').'</th>
<th class="text-center border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Author').'</th>
</tr>
</thead>
<tbody> <tbody>
'; ';
foreach ($plugins['all'] as $plugin) { // Show installed plugins
echo '<tr id="'.$plugin->className().'" '.($plugin->installed()?'class="bg-light"':'').'> foreach ($pluginsInstalled as $plugin) {
echo '<tr id="'.$plugin->className().'" class="bg-light searchItem">';
<td class="align-middle pt-3 pb-3"> echo '<td class="align-middle pt-3 pb-3 w-25">
<div>'.$plugin->name().'</div> <div class="searchText">'.$plugin->name().'</div>
<div class="mt-1">'; <div class="mt-1">';
if ($plugin->installed()) {
if (method_exists($plugin, 'form')) { if (method_exists($plugin, 'form')) {
echo '<a class="mr-3" href="'.HTML_PATH_ADMIN_ROOT.'configure-plugin/'.$plugin->className().'">'.$L->g('Settings').'</a>'; echo '<a class="mr-3" href="'.HTML_PATH_ADMIN_ROOT.'configure-plugin/'.$plugin->className().'">'.$L->g('Settings').'</a>';
} }
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$plugin->className().'">'.$L->g('Deactivate').'</a>'; echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$plugin->className().'">'.$L->g('Deactivate').'</a>';
} else {
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$plugin->className().'">'.$L->g('Activate').'</a>';
}
echo '</div>'; echo '</div>';
echo '</td>'; echo '</td>';
echo '<td class="align-middle d-none d-sm-table-cell">'; echo '<td class="searchText align-middle d-none d-sm-table-cell">';
echo $plugin->description();
echo '</td>';
echo '<td class="text-center align-middle d-none d-lg-table-cell">';
echo '<span>'.$plugin->version().'</span>';
echo '</td>';
echo '<td class="text-center align-middle d-none d-lg-table-cell">
<a target="_blank" href="'.$plugin->website().'">'.$plugin->author().'</a>
</td>';
echo '</tr>';
}
echo '
</tbody>
</table>
';
echo Bootstrap::formTitle(array('title'=>$L->g('Disabled plugins')));
echo '
<table class="table">
<tbody>
';
// Plugins not installed
$pluginsNotInstalled = array_diff_key($plugins['all'], $pluginsInstalled);
foreach ($pluginsNotInstalled as $plugin) {
echo '<tr id="'.$plugin->className().'" class="searchItem">';
echo '<td class="align-middle pt-3 pb-3 w-25">
<div class="searchText">'.$plugin->name().'</div>
<div class="mt-1">
<a href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$plugin->className().'">'.$L->g('Activate').'</a>
</div>
</td>';
echo '<td class="searchText align-middle d-none d-sm-table-cell">';
echo $plugin->description(); echo $plugin->description();
echo '</td>'; echo '</td>';

View File

@ -1,33 +1,30 @@
<?php <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog')); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
?> <div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog')); ?>
</div>
<!-- TABS --> <!-- TABS -->
<ul class="nav nav-tabs" id="dynamicTab" role="tablist"> <nav class="mb-3">
<li class="nav-item"> <div class="nav nav-tabs" id="nav-tab" role="tablist">
<a class="nav-link active" id="general-tab" data-toggle="tab" href="#general" role="tab" aria-controls="general" aria-selected="true">General</a> <a class="nav-item nav-link active" id="nav-general-tab" data-toggle="tab" href="#general" role="tab" aria-controls="nav-general" aria-selected="false"><?php $L->p('General') ?></a>
</li> <a class="nav-item nav-link" id="nav-advanced-tab" data-toggle="tab" href="#advanced" role="tab" aria-controls="nav-advanced" aria-selected="false"><?php $L->p('Advanced') ?></a>
<li class="nav-item"> <a class="nav-item nav-link" id="nav-seo-tab" data-toggle="tab" href="#seo" role="tab" aria-controls="nav-seo" aria-selected="false"><?php $L->p('SEO') ?></a>
<a class="nav-link " id="advanced-tab" data-toggle="tab" href="#advanced" role="tab" aria-controls="advanced" aria-selected="false">Advanced</a> <a class="nav-item nav-link" id="nav-social-tab" data-toggle="tab" href="#social" role="tab" aria-controls="nav-social" aria-selected="false"><?php $L->p('Social Networks') ?></a>
</li> <a class="nav-item nav-link" id="nav-images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="nav-images" aria-selected="false"><?php $L->p('Images') ?></a>
<li class="nav-item"> <a class="nav-item nav-link" id="nav-language-tab" data-toggle="tab" href="#language" role="tab" aria-controls="nav-language" aria-selected="false"><?php $L->p('Language') ?></a>
<a class="nav-link " id="seo-tab" data-toggle="tab" href="#seo" role="tab" aria-controls="seo" aria-selected="false">SEO</a> <a class="nav-item nav-link" id="nav-custom-fields-tab" data-toggle="tab" href="#custom-fields" role="tab" aria-controls="nav-custom-fields" aria-selected="false"><?php $L->p('Custom fields') ?></a>
</li> <a class="nav-item nav-link" id="nav-logo-tab" data-toggle="tab" href="#logo" role="tab" aria-controls="nav-logo" aria-selected="false"><?php $L->p('Logo') ?></a>
<li class="nav-item"> </div>
<a class="nav-link " id="social-tab" data-toggle="tab" href="#social" role="tab" aria-controls="social" aria-selected="false">Social Networks</a> </nav>
</li>
<li class="nav-item">
<a class="nav-link" id="language-tab" data-toggle="tab" href="#language" role="tab" aria-controls="language" aria-selected="false">Language</a>
</li>
</ul>
<?php
echo Bootstrap::formOpen(array(
'id'=>'dynamicTabContent',
'class'=>'tab-content mt-4'
));
<?php
// Token CSRF // Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
@ -35,9 +32,12 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
)); ));
?> ?>
<!-- TABS GENERAL --> <!-- General tab -->
<div class="tab-pane show active" id="general" role="tabpanel" aria-labelledby="general-tab"> <div class="tab-pane fade show active" id="general" role="tabpanel" aria-labelledby="general-tab">
<?php <?php
echo Bootstrap::formTitle(array('title'=>$L->g('Site')));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'title', 'name'=>'title',
'label'=>$L->g('Site title'), 'label'=>$L->g('Site title'),
@ -73,18 +73,11 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
'placeholder'=>'', 'placeholder'=>'',
'tip'=>$L->g('you-can-add-a-small-text-on-the-bottom') 'tip'=>$L->g('you-can-add-a-small-text-on-the-bottom')
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'dashboard" role="button">'.$L->g('Cancel').'</a>
</div>
';
?> ?>
</div> </div>
<!-- TABS ADVANCED --> <!-- Advanced tab -->
<div class="tab-pane" id="advanced" role="tabpanel" aria-labelledby="advanced-tab"> <div class="tab-pane fade" id="advanced" role="tabpanel" aria-labelledby="advanced-tab">
<?php <?php
echo Bootstrap::formTitle(array('title'=>$L->g('Content'))); echo Bootstrap::formTitle(array('title'=>$L->g('Content')));
@ -108,25 +101,97 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
echo Bootstrap::formTitle(array('title'=>$L->g('Predefined pages'))); echo Bootstrap::formTitle(array('title'=>$L->g('Predefined pages')));
echo Bootstrap::formInputText(array( // Homepage
try {
$options = array();
$homeKey = $site->homepage();
if (!empty($homeKey)) {
$home = new Page($homeKey);
$options = array($homeKey=>$home->title());
}
} catch (Exception $e) {
// continue
}
echo Bootstrap::formSelect(array(
'name'=>'homepage', 'name'=>'homepage',
'label'=>$L->g('Homepage'), 'label'=>$L->g('Homepage'),
'value'=>(Text::isEmpty($site->homepage())?'':$site->homepage()), 'options'=>$options,
'selected'=>false,
'class'=>'', 'class'=>'',
'placeholder'=>'Start writing the title of the page',
'tip'=>$L->g('Returning page for the main page') 'tip'=>$L->g('Returning page for the main page')
)); ));
?>
<script>
$(document).ready(function() {
var homepage = $("#jshomepage").select2({
placeholder: "<?php $L->p('Start typing to see a list of suggestions.') ?>",
allowClear: true,
theme: "bootstrap4",
minimumInputLength: 2,
ajax: {
url: HTML_PATH_ADMIN_ROOT+"ajax/get-published",
data: function (params) {
var query = { query: params.term }
return query;
},
processResults: function (data) {
return data;
}
},
escapeMarkup: function(markup) {
return markup;
}
});
});
</script>
$homepageOptions[' '] = '- '.$L->g('Default message').' -'; <?php
// Page not found 404
try {
$options = array();
$pageNotFoundKey = $site->pageNotFound();
if (!empty($pageNotFoundKey)) {
$pageNotFound = new Page($pageNotFoundKey);
$options = array($pageNotFoundKey=>$pageNotFound->title());
}
} catch (Exception $e) {
// continue
}
echo Bootstrap::formSelect(array( echo Bootstrap::formSelect(array(
'name'=>'pageNotFound', 'name'=>'pageNotFound',
'label'=>$L->g('Page not found'), 'label'=>$L->g('Page not found'),
'options'=>$homepageOptions, 'options'=>$options,
'selected'=>$site->pageNotFound(), 'selected'=>false,
'class'=>'', 'class'=>'',
'tip'=>$L->g('Returning page when the page doesnt exist') 'tip'=>$L->g('Returning page when the page doesnt exist')
)); ));
?>
<script>
$(document).ready(function() {
var homepage = $("#jspageNotFound").select2({
placeholder: "<?php $L->p('Start typing to see a list of suggestions.') ?>",
allowClear: true,
theme: "bootstrap4",
minimumInputLength: 2,
ajax: {
url: HTML_PATH_ADMIN_ROOT+"ajax/get-published",
data: function (params) {
var query = { query: params.term }
return query;
},
processResults: function (data) {
return data;
}
},
escapeMarkup: function(markup) {
return markup;
}
});
});
</script>
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('Email account settings'))); echo Bootstrap::formTitle(array('title'=>$L->g('Email account settings')));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
@ -161,6 +226,17 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
'placeholder'=>'https://' 'placeholder'=>'https://'
)); ));
echo Bootstrap::formTitle(array('title'=>$L->g('Page content')));
echo Bootstrap::formSelect(array(
'name'=>'markdownParser',
'label'=>$L->g('Markdown parser'),
'options'=>array('true'=>$L->g('Enabled'), 'false'=>$L->g('Disabled')),
'selected'=>($site->markdownParser()?'true':'false'),
'class'=>'',
'tip'=>$L->g('Enable the markdown parser for the content of the page.')
));
echo Bootstrap::formTitle(array('title'=>$L->g('URL Filters'))); echo Bootstrap::formTitle(array('title'=>$L->g('URL Filters')));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
@ -197,86 +273,71 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>DOMAIN.$site->uriFilters('blog'), 'tip'=>DOMAIN.$site->uriFilters('blog'),
'disabled'=>!$site->uriFilters('blog') 'disabled'=>Text::isEmpty($site->uriFilters('blog'))
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'dashboard" role="button">'.$L->g('Cancel').'</a>
</div>
';
?> ?>
</div> </div>
<!-- SEO tab -->
<!-- TABS SEO --> <div class="tab-pane fade" id="seo" role="tabpanel" aria-labelledby="seo-tab">
<div class="tab-pane" id="seo" role="tabpanel" aria-labelledby="seo-tab">
<?php <?php
echo Bootstrap::formTitle(array('title'=>$L->g('Extreme friendly URL'))); echo Bootstrap::formTitle(array('title'=>$L->g('Extreme friendly URL')));
echo Bootstrap::formSelect(array( echo Bootstrap::formSelect(array(
'name'=>'extremeFriendly', 'name'=>'extremeFriendly',
'label'=>'Allow Unicode', 'label'=>$L->g('Allow Unicode'),
'options'=>array('true'=>'Enabled', 'false'=>'Disable'), 'options'=>array('true'=>$L->g('Enabled'), 'false'=>$L->g('Disabled')),
'selected'=>($site->extremeFriendly()?'true':'false'), 'selected'=>($site->extremeFriendly()?'true':'false'),
'class'=>'', 'class'=>'',
'tip'=>'Allow unicode characters in the URL and some part of the system.' 'tip'=>$L->g('Allow unicode characters in the URL and some part of the system.')
)); ));
echo Bootstrap::formTitle(array('title'=>$L->g('Title formats'))); echo Bootstrap::formTitle(array('title'=>$L->g('Title formats')));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'titleFormatHomepage', 'name'=>'titleFormatHomepage',
'label'=>'Homepage', 'label'=>$L->g('Homepage'),
'value'=>$site->titleFormatHomepage(), 'value'=>$site->titleFormatHomepage(),
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'Variables allowed: <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>', 'tip'=>$L->g('Variables allowed').' <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'placeholder'=>'' 'placeholder'=>''
)); ));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'titleFormatPages', 'name'=>'titleFormatPages',
'label'=>'Pages', 'label'=>$L->g('Pages'),
'value'=>$site->titleFormatPages(), 'value'=>$site->titleFormatPages(),
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'Variables allowed: <code>{{page-title}}</code> <code>{{page-description}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>', 'tip'=>$L->g('Variables allowed').' <code>{{page-title}}</code> <code>{{page-description}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'placeholder'=>'' 'placeholder'=>''
)); ));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'titleFormatCategory', 'name'=>'titleFormatCategory',
'label'=>'Category', 'label'=>$L->g('Category'),
'value'=>$site->titleFormatCategory(), 'value'=>$site->titleFormatCategory(),
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'Variables allowed: <code>{{category-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>', 'tip'=>$L->g('Variables allowed').' <code>{{category-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'placeholder'=>'' 'placeholder'=>''
)); ));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'titleFormatTag', 'name'=>'titleFormatTag',
'label'=>'Tag', 'label'=>$L->g('Tag'),
'value'=>$site->titleFormatTag(), 'value'=>$site->titleFormatTag(),
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'Variables allowed: <code>{{tag-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>', 'tip'=>$L->g('Variables allowed').' <code>{{tag-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'placeholder'=>'' 'placeholder'=>''
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'dashboard" role="button">'.$L->g('Cancel').'</a>
</div>
';
?> ?>
</div> </div>
<!-- TABS SOCIAL NETWORKS --> <!-- Social Network tab -->
<div class="tab-pane" id="social" role="tabpanel" aria-labelledby="social-tab"> <div class="tab-pane fade" id="social" role="tabpanel" aria-labelledby="social-tab">
<?php <?php
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'twitter', 'name'=>'twitter',
@ -298,22 +359,13 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'codepen', 'name'=>'codepen',
'label'=>'Codepen', 'label'=>'CodePen',
'value'=>$site->codepen(), 'value'=>$site->codepen(),
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
echo Bootstrap::formInputText(array(
'name'=>'googlePlus',
'label'=>'Google+',
'value'=>$site->googlePlus(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'instagram', 'name'=>'instagram',
'label'=>'Instagram', 'label'=>'Instagram',
@ -325,7 +377,7 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'gitlab', 'name'=>'gitlab',
'label'=>'Gitlab', 'label'=>'GitLab',
'value'=>$site->gitlab(), 'value'=>$site->gitlab(),
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
@ -334,7 +386,7 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'github', 'name'=>'github',
'label'=>'Github', 'label'=>'GitHub',
'value'=>$site->github(), 'value'=>$site->github(),
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
@ -343,30 +395,85 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'linkedin', 'name'=>'linkedin',
'label'=>'Linkedin', 'label'=>'LinkedIn',
'value'=>$site->linkedin(), 'value'=>$site->linkedin(),
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
echo ' echo Bootstrap::formInputText(array(
<div class="form-group mt-4"> 'name'=>'mastodon',
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button> 'label'=>'Mastodon',
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'dashboard" role="button">'.$L->g('Cancel').'</a> 'value'=>$site->mastodon(),
</div> 'class'=>'',
'; 'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'dribbble',
'label'=>'Dribbble',
'value'=>$site->dribbble(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'vk',
'label'=>'VK',
'value'=>$site->vk(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
?> ?>
</div> </div>
<!-- TABS TIMEZONE AND LANGUAGES --> <!-- Images tab -->
<div class="tab-pane" id="language" role="tabpanel" aria-labelledby="language-tab"> <div class="tab-pane fade" id="images" role="tabpanel" aria-labelledby="images-tab">
<?php <?php
echo Bootstrap::formTitle(array('title'=>$L->g('Thumbnails')));
echo Bootstrap::formInputText(array(
'name'=>'thumbnailWidth',
'label'=>$L->g('Width'),
'value'=>$site->thumbnailWidth(),
'class'=>'',
'placeholder'=>'',
'tip'=>$L->g('Thumbnail width in pixels')
));
echo Bootstrap::formInputText(array(
'name'=>'thumbnailHeight',
'label'=>$L->g('Height'),
'value'=>$site->thumbnailHeight(),
'class'=>'',
'placeholder'=>'',
'tip'=>$L->g('Thumbnail height in pixels')
));
echo Bootstrap::formInputText(array(
'name'=>'thumbnailQuality',
'label'=>$L->g('Quality'),
'value'=>$site->thumbnailQuality(),
'class'=>'',
'placeholder'=>'',
'tip'=>$L->g('Thumbnail quality in percentage')
));
?>
</div>
<!-- Timezone and language tab -->
<div class="tab-pane fade" id="language" role="tabpanel" aria-labelledby="language-tab">
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('Language and timezone')));
echo Bootstrap::formSelect(array( echo Bootstrap::formSelect(array(
'name'=>'language', 'name'=>'language',
'label'=>$L->g('Language'), 'label'=>$L->g('Language'),
'options'=>$Language->getLanguageList(), 'options'=>$L->getLanguageList(),
'selected'=>$site->language(), 'selected'=>$site->language(),
'class'=>'', 'class'=>'',
'tip'=>$L->g('select-your-sites-language') 'tip'=>$L->g('select-your-sites-language')
@ -400,58 +507,86 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
'placeholder'=>'', 'placeholder'=>'',
'tip'=>$L->g('Current format').': '.Date::current($site->dateFormat()) 'tip'=>$L->g('Current format').': '.Date::current($site->dateFormat())
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'dashboard" role="button">'.$L->g('Cancel').'</a>
</div>
';
?> ?>
</div> </div>
<?php
echo Bootstrap::formClose(); <!-- Custom fields -->
?> <div class="tab-pane fade" id="custom-fields" role="tabpanel" aria-labelledby="custom-fields-tab">
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('Custom fields')));
echo Bootstrap::formTextarea(array(
'name'=>'customFields',
'label'=>'JSON Format',
'value'=>json_encode($site->customFields(), JSON_PRETTY_PRINT),
'class'=>'',
'placeholder'=>'',
'tip'=>$L->g('define-custom-fields-for-the-content'),
'rows'=>15
));
?>
</div>
<!-- Site logo tab -->
<div class="tab-pane fade" id="logo" role="tabpanel" aria-labelledby="logo-tab">
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('Site logo')));
?>
<div class="container">
<div class="row">
<div class="col-lg-4 col-sm-12 p-0 pr-2">
<div class="custom-file">
<input id="jssiteLogoInputFile" class="custom-file-input" type="file" name="inputFile">
<label for="jssiteLogoInputFile" class="custom-file-label"><?php $L->p('Upload image'); ?></label>
</div>
<button id="jsbuttonRemoveLogo" type="button" class="btn btn-primary w-100 mt-4 mb-4"><i class="fa fa-trash"></i><?php $L->p('Remove logo') ?></button>
</div>
<div class="col-lg-8 col-sm-12 p-0 text-center">
<img id="jssiteLogoPreview" class="img-fluid img-thumbnail" alt="Site logo preview" src="<?php echo ($site->logo()?DOMAIN_UPLOADS.$site->logo(false).'?version='.time():HTML_PATH_CORE_IMG.'default.svg') ?>" />
</div>
</div>
</div>
<script>
$("#jsbuttonRemoveLogo").on("click", function() {
bluditAjax.removeLogo();
$("#jssiteLogoPreview").attr("src", "<?php echo HTML_PATH_CORE_IMG.'default.svg' ?>");
});
$("#jssiteLogoInputFile").on("change", function() {
var formData = new FormData();
formData.append('tokenCSRF', tokenCSRF);
formData.append('inputFile', $(this)[0].files[0]);
$.ajax({
url: HTML_PATH_ADMIN_ROOT+"ajax/logo-upload",
type: "POST",
data: formData,
cache: false,
contentType: false,
processData: false
}).done(function(data) {
if (data.status==0) {
$("#jssiteLogoPreview").attr('src',data.absoluteURL+"?time="+Math.random());
} else {
showAlert(data.message);
}
});
});
</script>
</div>
<?php echo Bootstrap::formClose(); ?>
<script> <script>
$(document).ready(function() { // Open current tab after refresh page
$(function() {
// Parent autocomplete $('a[data-toggle="tab"]').on('click', function(e) {
var homepageXHR; window.localStorage.setItem('activeTab', $(e.target).attr('href'));
var homepageList; // Keep the parent list returned to get the key by the title page });
$("#jshomepage").autoComplete({ var activeTab = window.localStorage.getItem('activeTab');
minChars: 1, if (activeTab) {
source: function(term, response) { $('#nav-tab a[href="' + activeTab + '"]').tab('show');
// Prevent call inmediatly another ajax request //window.localStorage.removeItem("activeTab");
try { homepageXHR.abort(); } catch(e){}
homepageXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-published", {query: term},
function(data) {
homepageList = data;
term = term.toLowerCase();
var matches = [];
for (var title in data) {
if (~title.toLowerCase().indexOf(term))
matches.push(title);
}
response(matches);
});
},
onSelect: function(e, term, item) {
// homepageList = array( pageTitle => pageKey )
var pageKey = homepageList[term];
$("#jsparent").attr("value", pageKey);
} }
}); });
$("#jshomepage").change(function() {
if ($(this).val()) {
$("#jsuriBlog").removeAttr('disabled');
$("#jsuriBlog").attr('value', '/blog/');
} else {
$("#jsuriBlog").attr('value', '');
$("#jsuriBlog").attr('disabled', 'disabled');
}
});
});
</script> </script>

View File

@ -1,19 +1,29 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
<div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$user->username() ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Change password'), 'icon'=>'user')); ?>
</div>
<?php <?php
// Token CSRF
echo Bootstrap::pageTitle(array('title'=>$L->g('Change password'), 'icon'=>'person'));
echo Bootstrap::formOpen(array());
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
)); ));
// Username
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'username', 'name'=>'username',
'value'=>$user->username() 'value'=>$user->username()
)); ));
// Username disabled
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'usernameDisabled', 'name'=>'usernameDisabled',
'label'=>$L->g('Username'), 'label'=>$L->g('Username'),
@ -24,6 +34,7 @@ echo Bootstrap::formOpen(array());
'tip'=>'' 'tip'=>''
)); ));
// New password
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'newPassword', 'name'=>'newPassword',
'label'=>$L->g('New password'), 'label'=>$L->g('New password'),
@ -34,6 +45,7 @@ echo Bootstrap::formOpen(array());
'tip'=>'' 'tip'=>''
)); ));
// Confirm password
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'confirmPassword', 'name'=>'confirmPassword',
'label'=>$L->g('Confirm new password'), 'label'=>$L->g('Confirm new password'),
@ -43,14 +55,6 @@ echo Bootstrap::formOpen(array());
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'users" role="button">'.$L->g('Cancel').'</a>
</div>
';
echo Bootstrap::formClose();
?> ?>
<?php echo Bootstrap::formClose(); ?>

View File

@ -1,6 +1,8 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
<?php <?php
echo Bootstrap::pageTitle(array('title'=>$L->g('Users'), 'icon'=>'people')); echo Bootstrap::pageTitle(array('title'=>$L->g('Users'), 'icon'=>'users'));
echo Bootstrap::link(array( echo Bootstrap::link(array(
'title'=>$L->g('add-a-new-user'), 'title'=>$L->g('add-a-new-user'),
@ -13,8 +15,7 @@ echo '
<thead> <thead>
<tr> <tr>
<th class="border-bottom-0" scope="col">'.$L->g('Username').'</th> <th class="border-bottom-0" scope="col">'.$L->g('Username').'</th>
<th class="border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('First name').'</th> <th class="border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Nickname').'</th>
<th class="border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Last name').'</th>
<th class="border-bottom-0" scope="col">'.$L->g('Email').'</th> <th class="border-bottom-0" scope="col">'.$L->g('Email').'</th>
<th class="border-bottom-0" scope="col">'.$L->g('Status').'</th> <th class="border-bottom-0" scope="col">'.$L->g('Status').'</th>
<th class="border-bottom-0" scope="col">'.$L->g('Role').'</th> <th class="border-bottom-0" scope="col">'.$L->g('Role').'</th>
@ -24,20 +25,21 @@ echo '
<tbody> <tbody>
'; ';
$list = $dbUsers->getAllUsernames(); $list = $users->keys();
foreach ($list as $username) { foreach ($list as $username) {
try { try {
$user = new User($username); $user = new User($username);
echo '<tr>'; echo '<tr>';
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$username.'">'.$username.'</a></td>'; echo '<td><img class="profilePicture mr-1" alt="" src="'.(Sanitize::pathFile(PATH_UPLOADS_PROFILES.$user->username().'.png')?DOMAIN_UPLOADS_PROFILES.$user->username().'.png':HTML_PATH_CORE_IMG.'default.svg').'" /><a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$username.'">'.$username.'</a></td>';
echo '<td class="d-none d-lg-table-cell">'.$user->firstName().'</td>'; echo '<td class="d-none d-lg-table-cell">'.$user->nickname().'</td>';
echo '<td class="d-none d-lg-table-cell">'.$user->lastName().'</td>';
echo '<td>'.$user->email().'</td>'; echo '<td>'.$user->email().'</td>';
echo '<td>'.($user->enabled()?'<b>'.$L->g('Enabled').'</b>':$L->g('Disabled')).'</td>'; echo '<td>'.($user->enabled()?'<b>'.$L->g('Enabled').'</b>':$L->g('Disabled')).'</td>';
if ($user->role()=='admin') { if ($user->role()=='admin') {
echo '<td>'.$L->g('Administrator').'</td>'; echo '<td>'.$L->g('Administrator').'</td>';
} elseif ($user->role()=='editor') { } elseif ($user->role()=='editor') {
echo '<td>'.$L->g('Editor').'</td>'; echo '<td>'.$L->g('Editor').'</td>';
} elseif ($user->role()=='author') {
echo '<td>'.$L->g('Author').'</td>';
} else { } else {
echo '<td>'.$L->g('Reader').'</td>'; echo '<td>'.$L->g('Reader').'</td>';
} }

68
bl-kernel/ajax/clippy.php Normal file
View File

@ -0,0 +1,68 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
// $_GET
// ----------------------------------------------------------------------------
// (string) $_GET['query']
$query = isset($_GET['query']) ? Text::lowercase($_GET['query']) : false;
// ----------------------------------------------------------------------------
if ($query===false) {
ajaxResponse(1, 'Invalid query.');
}
$result = array();
// MENU
if (Text::stringContains(Text::lowercase($L->g('New content')), $query)) {
$tmp = array('disabled'=>true, 'icon'=>'plus-circle', 'type'=>'menu');
$tmp['text'] = $L->g('New content');
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'new-content';
array_push($result, $tmp);
}
if (Text::stringContains(Text::lowercase($L->g('New category')), $query)) {
$tmp = array('disabled'=>true, 'icon'=>'tag', 'type'=>'menu');
$tmp['text'] = $L->g('New category');
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'new-category';
array_push($result, $tmp);
}
if (Text::stringContains(Text::lowercase($L->g('New user')), $query)) {
$tmp = array('disabled'=>true, 'icon'=>'user', 'type'=>'menu');
$tmp['text'] = $L->g('New user');
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'new-user';
array_push($result, $tmp);
}
if (Text::stringContains(Text::lowercase($L->g('Categories')), $query)) {
$tmp = array('disabled'=>true, 'icon'=>'tags', 'type'=>'menu');
$tmp['text'] = $L->g('Categories');
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'categories';
array_push($result, $tmp);
}
if (Text::stringContains(Text::lowercase($L->g('Users')), $query)) {
$tmp = array('disabled'=>true, 'icon'=>'users', 'type'=>'menu');
$tmp['text'] = $L->g('Users');
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'users';
array_push($result, $tmp);
}
// PAGES
$pagesKey = $pages->getDB();
foreach ($pagesKey as $pageKey) {
try {
$page = new Page($pageKey);
$lowerTitle = Text::lowercase($page->title());
if (Text::stringContains($lowerTitle, $query)) {
$tmp = array('disabled'=>true);
$tmp['id'] = $page->key();
$tmp['text'] = $page->title();
$tmp['type'] = $page->type();
array_push($result, $tmp);
}
} catch (Exception $e) {
// continue
}
}
exit (json_encode(array('results'=>$result)));
?>

View File

@ -0,0 +1,49 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
/*
| Search for pages that have in the title the string $query and returns the array of pages
|
| @_GET['published'] boolean True to search in published database
| @_GET['static'] boolean True to search in static database
| @_GET['sticky'] boolean True to search in sticky database
| @_GET['scheduled'] boolean True to search in scheduled database
| @_GET['draft'] boolean True to search in draft database
| @_GET['query'] string Text to search in the title
|
| @return array
*/
// $_GET
// ----------------------------------------------------------------------------
$published = empty($_GET['published']) ? false:true;
$static = empty($_GET['static']) ? false:true;
$sticky = empty($_GET['sticky']) ? false:true;
$scheduled = empty($_GET['scheduled']) ? false:true;
$draft = empty($_GET['draft']) ? false:true;
$query = isset($_GET['query']) ? Text::lowercase($_GET['query']) : false;
// ----------------------------------------------------------------------------
if ($query===false) {
ajaxResponse(1, 'Invalid query.');
}
$pageNumber = 1;
$numberOfItems = -1;
$pagesKey = $pages->getList($pageNumber, $numberOfItems, $published, $static, $sticky, $draft, $scheduled);
$tmp = array();
foreach ($pagesKey as $pageKey) {
try {
$page = new Page($pageKey);
$lowerTitle = Text::lowercase($page->title());
if (Text::stringContains($lowerTitle, $query)) {
$tmp[$page->key()] = $page->json(true);
}
} catch (Exception $e) {
// continue
}
}
exit (json_encode($tmp));
?>

View File

@ -1,32 +0,0 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
// $_POST
// ----------------------------------------------------------------------------
// (string) $_POST['path'] Name of file to delete, just the filename
$filename = isset($_POST['filename']) ? $_POST['filename'] : false;
// ----------------------------------------------------------------------------
if ($filename==false) {
exit (json_encode(array(
'status'=>1,
'message'=>'The filename is empty.'
)));
}
// Check if the filename exist
if (Sanitize::pathFile(PATH_UPLOADS.$filename)) {
Filesystem::rmfile(PATH_UPLOADS.$filename);
}
// Check if the file has a thumbnail
if (Sanitize::pathFile(PATH_UPLOADS_THUMBNAILS.$filename)) {
Filesystem::rmfile(PATH_UPLOADS_THUMBNAILS.$filename);
}
exit (json_encode(array(
'status'=>0,
'message'=>'File deleted.'
)));
?>

View File

@ -0,0 +1,43 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
/*
| Delete an image from a particular page
|
| @_POST['filename'] string Name of the file to delete
| @_POST['uuid'] string Page UUID
|
| @return array
*/
// $_POST
// ----------------------------------------------------------------------------
$filename = isset($_POST['filename']) ? $_POST['filename'] : false;
$uuid = empty($_POST['uuid']) ? false : $_POST['uuid'];
// ----------------------------------------------------------------------------
if ($filename===false) {
ajaxResponse(1, 'The filename is empty.');
}
if ($uuid && IMAGE_RESTRICT) {
$imagePath = PATH_UPLOADS_PAGES.$uuid.DS;
$thumbnailPath = PATH_UPLOADS_PAGES.$uuid.DS.'thumbnails'.DS;
} else {
$imagePath = PATH_UPLOADS;
$thumbnailPath = PATH_UPLOADS_THUMBNAILS;
}
// Delete image
if (Sanitize::pathFile($imagePath.$filename)) {
Filesystem::rmfile($imagePath.$filename);
}
// Delete thumbnail
if (Sanitize::pathFile($thumbnailPath.$filename)) {
Filesystem::rmfile($thumbnailPath.$filename);
}
ajaxResponse(0, 'Image deleted.');
?>

View File

@ -1,15 +1,27 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json'); header('Content-Type: application/json');
/*
| Generate an slug text for the URL
|
| @_POST['text'] string The text from where is generated the slug
| @_POST['parentKey'] string The parent key if the page has one
| @_POST['currentKey'] string The current page key
|
| @return array
*/
// $_POST
// ----------------------------------------------------------------------------
$text = isset($_POST['text']) ? $_POST['text'] : ''; $text = isset($_POST['text']) ? $_POST['text'] : '';
$parent = isset($_POST['parentKey']) ? $_POST['parentKey'] : PARENT; $parent = isset($_POST['parentKey']) ? $_POST['parentKey'] : '';
$oldKey = isset($_POST['currentKey']) ? $_POST['currentKey'] : ''; $oldKey = isset($_POST['currentKey']) ? $_POST['currentKey'] : '';
// ----------------------------------------------------------------------------
$slug = $dbPages->generateKey($text, $parent, $returnSlug=true, $oldKey); $slug = $pages->generateKey($text, $parent, $returnSlug=true, $oldKey);
exit (json_encode(array( ajaxResponse(0, 'Slug generated.', array(
'status'=>0,
'slug'=>$slug 'slug'=>$slug
))); ));
?> ?>

View File

@ -1,27 +0,0 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
// $_GET
// ----------------------------------------------------------------------------
// (string) $_GET['query']
$query = isset($_GET['query']) ? Text::lowercase($_GET['query']) : false;
// ----------------------------------------------------------------------------
if ($query===false) {
exit (json_encode(array(
'status'=>1,
'files'=>'Invalid query.'
)));
}
$tmp = array();
$parents = buildParentPages();
foreach ($parents as $parent) {
$lowerTitle = Text::lowercase($parent->title());
if (Text::stringContains($lowerTitle, $query)) {
$tmp[$parent->title()] = $parent->key();
}
}
exit (json_encode($tmp));
?>

View File

@ -1,27 +1,50 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json'); header('Content-Type: application/json');
/*
| Returns a list of pages and the title contains the query string
| The returned list have published, sticky and statics pages
|
| @_POST['query'] string The string to search in the title of the pages
|
| @return array
*/
// $_GET // $_GET
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// (string) $_GET['query'] // (string) $_GET['query']
$query = isset($_GET['query']) ? Text::lowercase($_GET['query']) : false; $query = isset($_GET['query']) ? Text::lowercase($_GET['query']) : false;
// (boolean) $_GET['checkIsParent']
$checkIsParent = empty($_GET['checkIsParent']) ? false : true;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
if ($query===false) { if ($query===false) {
exit (json_encode(array( ajaxResponse(1, 'Invalid query.');
'status'=>1,
'files'=>'Invalid query.'
)));
} }
$tmp = array(); $result = array();
$parents = buildParentPages(); $pagesKey = $pages->getDB();
foreach ($parents as $parent) { foreach ($pagesKey as $pageKey) {
$lowerTitle = Text::lowercase($parent->title()); try {
if (Text::stringContains($lowerTitle, $query)) { $page = new Page($pageKey);
$tmp[$parent->title()] = $parent->key(); if ($page->isParent() || !$checkIsParent) {
// Check page status
if ($page->published() || $page->sticky() || $page->isStatic()) {
// Check if the query contains in the title
$lowerTitle = Text::lowercase($page->title());
if (Text::stringContains($lowerTitle, $query)) {
$tmp = array('disabled'=>false);
$tmp['id'] = $page->key();
$tmp['text'] = $page->title();
$tmp['type'] = $page->type();
array_push($result, $tmp);
}
}
}
} catch (Exception $e) {
// continue
} }
} }
exit (json_encode($tmp)); exit (json_encode(array('results'=>$result)));
?> ?>

View File

@ -1,47 +0,0 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
// $_POST
// ----------------------------------------------------------------------------
// (integer) $_POST['pageNumber'] > 0
$pageNumber = !empty($_POST['pageNumber']) ? (int)$_POST['pageNumber'] : 1;
$pageNumber = $pageNumber - 1;
// (string) $_POST['path']
$path = isset($_POST['path']) ? $_POST['path'] : false;
// ----------------------------------------------------------------------------
if ($path==false) {
exit (json_encode(array(
'status'=>1,
'files'=>'Invalid path.'
)));
}
// Get all files from the directory $path, also split the array by numberOfItems
$listOfFilesByPage = Filesystem::listFiles($path, '*', '*', $GLOBALS['BLUDIT_MEDIA_MANAGER_SORT_BY_DATE'], $GLOBALS['BLUDIT_MEDIA_MANAGER_AMOUNT_OF_FILES']);
// Check if the page number exists in the chunks
if (isset($listOfFilesByPage[$pageNumber])) {
// Get only the filename from the chunk
$tmp = array();
foreach ($listOfFilesByPage[$pageNumber] as $file) {
array_push($tmp, basename($file));
}
// Returns the amount of chunks for the paginator
// Returns the files inside the chunk
exit (json_encode(array(
'status'=>0,
'numberOfPages'=>count($listOfFilesByPage),
'files'=>$tmp
)));
}
exit (json_encode(array(
'status'=>1,
'files'=>'Out of index.'
)));
?>

View File

@ -0,0 +1,62 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
/*
| Returns a list of images from a particular page
|
| @_POST['pageNumber'] int Page number for the paginator
| @_POST['path'] string Pre-defined name for the directory to read, its pre-defined to avoid security issues
| @_POST['uuid'] string Page UUID
|
| @return array
*/
// $_POST
// ----------------------------------------------------------------------------
// $_POST['pageNumber'] > 0
$pageNumber = empty($_POST['pageNumber']) ? 1 : (int)$_POST['pageNumber'];
$pageNumber = $pageNumber - 1;
$path = empty($_POST['path']) ? false : $_POST['path'];
$uuid = empty($_POST['uuid']) ? false : $_POST['uuid'];
// ----------------------------------------------------------------------------
// Set the path to get the file list
if ($path=='thumbnails') {
if ($uuid && IMAGE_RESTRICT) {
$path = PATH_UPLOADS_PAGES.$uuid.DS.'thumbnails'.DS;
} else {
$path = PATH_UPLOADS_THUMBNAILS;
}
} else {
ajaxResponse(1, 'Invalid path.');
}
// Get all files from the directory $path, also split the array by numberOfItems
// The function listFiles split in chunks
$listOfFilesByPage = Filesystem::listFiles($path, '*', '*', MEDIA_MANAGER_SORT_BY_DATE, MEDIA_MANAGER_NUMBER_OF_FILES);
// Check if the page number exists in the chunks
if (isset($listOfFilesByPage[$pageNumber])) {
// Get only the filename from the chunk
$files = array();
foreach ($listOfFilesByPage[$pageNumber] as $file) {
$filename = basename($file);
array_push($files, $filename);
}
// Returns the number of chunks for the paginator
// Returns the files inside the chunk
ajaxResponse(0, 'List of files and number of chunks.', array(
'numberOfPages'=>count($listOfFilesByPage),
'files'=>$files
));
}
ajaxResponse(0, 'List of files and number of chunks.', array(
'numberOfPages'=>0,
'files'=>array()
));
?>

View File

@ -0,0 +1,22 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
/*
| Delete the site logo
| This script delete the file and set and empty string in the database
|
| @return array
*/
// Delete the file
$logoFilename = $site->logo(false);
if ($logoFilename) {
Filesystem::rmfile(PATH_UPLOADS.$logoFilename);
}
// Remove the logo from the database
$site->set(array('logo'=>''));
ajaxResponse(0, 'Logo removed.');
?>

View File

@ -0,0 +1,60 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
/*
| Upload site logo
| The final filename is the site's name and the extension is the same as the file uploaded
|
| @_FILES['inputFile'] multipart/form-data File from form
|
| @return array
*/
if (!isset($_FILES['inputFile'])) {
ajaxResponse(1, 'Error trying to upload the site logo.');
}
// Check path traversal on $filename
if (Text::stringContains($_FILES['inputFile']['name'], DS, false)) {
$message = 'Path traversal detected.';
Log::set($message, LOG_TYPE_ERROR);
ajaxResponse(1, $message);
}
// File extension
$fileExtension = Filesystem::extension($_FILES['inputFile']['name']);
$fileExtension = Text::lowercase($fileExtension);
if (!in_array($fileExtension, $GLOBALS['ALLOWED_IMG_EXTENSION']) ) {
$message = $L->g('File type is not supported. Allowed types:').' '.implode(', ',$GLOBALS['ALLOWED_IMG_EXTENSION']);
Log::set($message, LOG_TYPE_ERROR);
ajaxResponse(1, $message);
}
// Final filename
$filename = 'logo.'.$fileExtension;
if (Text::isNotEmpty( $site->title() )) {
$filename = $site->title().'.'.$fileExtension;
}
// Delete old image
$oldFilename = $site->logo(false);
if ($oldFilename) {
Filesystem::rmfile(PATH_UPLOADS.$oldFilename);
}
// Move from temporary directory to uploads
Filesystem::mv($_FILES['inputFile']['tmp_name'], PATH_UPLOADS.$filename);
// Permissions
chmod(PATH_UPLOADS.$filename, 0644);
// Store the filename in the database
$site->set(array('logo'=>$filename));
ajaxResponse(0, 'Image uploaded.', array(
'filename'=>$filename,
'absoluteURL'=>DOMAIN_UPLOADS.$filename,
'absolutePath'=>PATH_UPLOADS.$filename
));
?>

View File

@ -0,0 +1,64 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
// $_POST
// ----------------------------------------------------------------------------
// (string) $_POST['username']
$username = empty($_POST['username']) ? false : $_POST['username'];
// ----------------------------------------------------------------------------
if ($username===false) {
ajaxResponse(1, 'Error in username.');
}
if ( ($login->role()!='admin') && ($login->username()!=$username) ) {
ajaxResponse(1, 'Error in username.');
}
if (!isset($_FILES['profilePictureInputFile'])) {
ajaxResponse(1, 'Error trying to upload the profile picture.');
}
// Check path traversal
if (Text::stringContains($username, DS, false)) {
$message = 'Path traversal detected.';
Log::set($message, LOG_TYPE_ERROR);
ajaxResponse(1, $message);
}
// Check file extension
$fileExtension = Filesystem::extension($_FILES['profilePictureInputFile']['name']);
$fileExtension = Text::lowercase($fileExtension);
if (!in_array($fileExtension, $GLOBALS['ALLOWED_IMG_EXTENSION']) ) {
$message = $L->g('File type is not supported. Allowed types:').' '.implode(', ',$GLOBALS['ALLOWED_IMG_EXTENSION']);
Log::set($message, LOG_TYPE_ERROR);
ajaxResponse(1, $message);
}
// Tmp filename
$tmpFilename = $username.'.'.$fileExtension;
// Final filename
$filename = $username.'.png';
// Move from temporary directory to uploads folder
rename($_FILES['profilePictureInputFile']['tmp_name'], PATH_TMP.$tmpFilename);
// Resize and convert to png
$image = new Image();
$image->setImage(PATH_TMP.$tmpFilename, PROFILE_IMG_WIDTH, PROFILE_IMG_HEIGHT, 'crop');
$image->saveImage(PATH_UPLOADS_PROFILES.$filename, PROFILE_IMG_QUALITY, false, true);
// Delete temporary file
Filesystem::rmfile(PATH_TMP.$tmpFilename);
// Permissions
chmod(PATH_UPLOADS_PROFILES.$filename, 0644);
ajaxResponse(0, 'Image uploaded.', array(
'filename'=>$filename,
'absoluteURL'=>DOMAIN_UPLOADS_PROFILES.$filename,
'absolutePath'=>PATH_UPLOADS_PROFILES.$filename
));
?>

View File

@ -1,42 +0,0 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
if (!isset($_FILES['profilePictureInputFile'])) {
exit (json_encode(array(
'status'=>1,
'message'=>'Error trying to upload the profile picture.'
)));
}
// File extension
$fileExtension = pathinfo($_FILES['profilePictureInputFile']['name'], PATHINFO_EXTENSION);
// Username who is uploading the image
$username = $login->username();
// Tmp filename
$tmpFilename = $username.'.'.$fileExtension;
// Final filename
$filename = $username.'.png';
// Move from temporary directory to uploads folder
rename($_FILES['profilePictureInputFile']['tmp_name'], PATH_TMP.$tmpFilename);
// Resize and convert to png
$image = new Image();
$image->setImage(PATH_TMP.$tmpFilename, PROFILE_IMG_WIDTH, PROFILE_IMG_HEIGHT, 'crop');
$image->saveImage(PATH_UPLOADS_PROFILES.$filename, PROFILE_IMG_QUALITY, false, true);
// Remove the tmp file
unlink(PATH_TMP.$tmpFilename);
// Permissions
chmod(PATH_UPLOADS_PROFILES.$filename, 0644);
exit (json_encode(array(
'status'=>0,
'message'=>'Image uploaded success.',
'filename'=>$filename,
'absoluteURL'=>DOMAIN_UPLOADS_PROFILES.$filename,
'absolutePath'=>PATH_UPLOADS_PROFILES.$filename
)));
?>

View File

@ -1,56 +1,52 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json'); header('Content-Type: application/json');
/*
| Create/edit a page and save as draft
| If the UUID already exists the page is updated
|
| @_POST['title'] string Page title
| @_POST['content'] string Page content
| @_POST['uuid'] string Page uuid
| @_POST['uuid'] string Page type, by default is draft
|
| @return array
*/
// $_POST // $_POST
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// (string) $_POST['title']
$title = isset($_POST['title']) ? $_POST['title'] : false; $title = isset($_POST['title']) ? $_POST['title'] : false;
// (string) $_POST['content']
$content = isset($_POST['content']) ? $_POST['content'] : false; $content = isset($_POST['content']) ? $_POST['content'] : false;
// (string) $_POST['uuid']
$uuid = isset($_POST['uuid']) ? $_POST['uuid'] : false; $uuid = isset($_POST['uuid']) ? $_POST['uuid'] : false;
$type = isset($_POST['type']) ? $_POST['type'] : 'draft';
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Check UUID // Check UUID
if (empty($uuid)) { if (empty($uuid)) {
exit (json_encode(array( ajaxResponse(1, 'Save as draft fail. UUID not defined.');
'status'=>1,
'message'=>'Autosave fail. UUID not defined.'
)));
} }
// Check content length to create the autosave page
if (Text::length($content)<100) {
exit (json_encode(array(
'status'=>1,
'message'=>'Autosave not completed. The content length is less than 100 characters.'
)));
}
$autosaveUUID = 'autosave-'.$uuid;
$page = array( $page = array(
'uuid'=>$autosaveUUID, 'uuid'=>$uuid,
'key'=>$autosaveUUID, 'key'=>$uuid,
'slug'=>$autosaveUUID, 'slug'=>$uuid,
'title'=>$title.' [ Autosave ] ', 'title'=>$title,
'content'=>$content, 'content'=>$content,
'type'=>'draft' 'type'=>$type
); );
// Get the page key by the UUID // Get the page key by the UUID
$pageKey = $dbPages->getByUUID($autosaveUUID); $pageKey = $pages->getByUUID($uuid);
// if pageKey is empty means the autosave page doesn't exist // if pageKey is empty means the page doesn't exist
if (empty($pageKey)) { if (empty($pageKey)) {
createPage($page); createPage($page);
} else { } else {
editPage($page); editPage($page);
} }
exit (json_encode(array( ajaxResponse(0, 'Save as draft successfully.', array(
'status'=>0, 'uuid'=>$uuid
'message'=>'Autosave successfully.', ));
'uuid'=>$autosaveUUID
)));
?> ?>

View File

@ -1,40 +0,0 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
foreach ($_FILES['bluditInputFiles']['name'] as $key=>$filename) {
// Get the next filename if already exist the file to not overwrite the original file
$nextFilename = Filesystem::nextFilename(PATH_UPLOADS, $filename);
// File extension
$fileExtension = pathinfo($nextFilename, PATHINFO_EXTENSION);
// Move from temporary directory to uploads folder
rename($_FILES['bluditInputFiles']['tmp_name'][$key], PATH_UPLOADS.$nextFilename);
chmod(PATH_UPLOADS.$nextFilename, 0644);
// Generate Thumbnail
// Exclude generate thumbnail for SVG format and generate a symlink to the svg
if ($fileExtension == 'svg') {
symlink(PATH_UPLOADS.$nextFilename, PATH_UPLOADS_THUMBNAILS.$nextFilename);
} else {
$Image = new Image();
$Image->setImage(PATH_UPLOADS.$nextFilename, $GLOBALS['THUMBNAILS_WIDTH'], $GLOBALS['THUMBNAILS_HEIGHT'], 'crop');
$Image->saveImage(PATH_UPLOADS_THUMBNAILS.$nextFilename, $GLOBALS['THUMBNAILS_QUALITY'], true);
}
}
$absoluteURL = DOMAIN_UPLOADS.$nextFilename;
$absoluteURLThumbnail = DOMAIN_UPLOADS_THUMBNAILS.$nextFilename;
$absolutePath = PATH_UPLOADS.$nextFilename;
exit (json_encode(array(
'status'=>0,
'message'=>'Image uploaded success.',
'filename'=>$nextFilename,
'absoluteURL'=>$absoluteURL,
'absoluteURLThumbnail'=>$absoluteURLThumbnail,
'absolutePath'=>$absolutePath
)));
?>

View File

@ -0,0 +1,87 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
/*
| Upload an image to a particular page
|
| @_POST['uuid'] string Page uuid
|
| @return array
*/
// $_POST
// ----------------------------------------------------------------------------
$uuid = empty($_POST['uuid']) ? false : $_POST['uuid'];
// ----------------------------------------------------------------------------
// Check path traversal on $uuid
if ($uuid) {
if (Text::stringContains($uuid, DS, false)) {
$message = 'Path traversal detected.';
Log::set($message, LOG_TYPE_ERROR);
ajaxResponse(1, $message);
}
}
// Set upload directory
if ($uuid && IMAGE_RESTRICT) {
$imageDirectory = PATH_UPLOADS_PAGES.$uuid.DS;
$thumbnailDirectory = $imageDirectory.'thumbnails'.DS;
if (!Filesystem::directoryExists($thumbnailDirectory)) {
Filesystem::mkdir($thumbnailDirectory, true);
}
} else {
$imageDirectory = PATH_UPLOADS;
$thumbnailDirectory = PATH_UPLOADS_THUMBNAILS;
}
$images = array();
foreach ($_FILES['images']['name'] as $uuid=>$filename) {
// Check for errors
if ($_FILES['images']['error'][$uuid] != 0) {
$message = $L->g('Maximum load file size allowed:').' '.ini_get('upload_max_filesize');
Log::set($message, LOG_TYPE_ERROR);
ajaxResponse(1, $message);
}
// Convert URL characters such as spaces or quotes to characters
$filename = urldecode($filename);
// Check path traversal on $filename
if (Text::stringContains($filename, DS, false)) {
$message = 'Path traversal detected.';
Log::set($message, LOG_TYPE_ERROR);
ajaxResponse(1, $message);
}
// Check file extension
$fileExtension = Filesystem::extension($filename);
$fileExtension = Text::lowercase($fileExtension);
if (!in_array($fileExtension, $GLOBALS['ALLOWED_IMG_EXTENSION']) ) {
$message = $L->g('File type is not supported. Allowed types:').' '.implode(', ',$GLOBALS['ALLOWED_IMG_EXTENSION']);
Log::set($message, LOG_TYPE_ERROR);
ajaxResponse(1, $message);
}
// Move from PHP tmp file to Bludit tmp directory
Filesystem::mv($_FILES['images']['tmp_name'][$uuid], PATH_TMP.$filename);
// Transform the image and generate the thumbnail
$image = transformImage(PATH_TMP.$filename, $imageDirectory, $thumbnailDirectory);
if ($image) {
chmod($image, 0644);
$filename = Filesystem::filename($image);
array_push($images, $filename);
} else {
$message = 'Error after transformImage() function.';
Log::set($message, LOG_TYPE_ERROR);
ajaxResponse(1, $message);
}
}
ajaxResponse(0, 'Images uploaded.', array(
'images'=>$images
));
?>

View File

@ -1,24 +0,0 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
/*
*
* This script check if the user is logged
*
*/
// Check UUID
if ($login->isLogged()) {
exit (json_encode(array(
'status'=>1,
'message'=>'The user is logged.'
)));
}
exit (json_encode(array(
'status'=>0,
'message'=>'The user is NOT logged.'
)));
?>

View File

@ -6,7 +6,7 @@ if (Session::started()===false) {
exit('Bludit CMS. Session initialization failure.'); exit('Bludit CMS. Session initialization failure.');
} }
$login = $Login = new Login(); $login = new Login();
$layout = array( $layout = array(
'controller'=>null, 'controller'=>null,
@ -23,14 +23,6 @@ $layout['controller'] = $layout['view'] = $layout['slug'] = empty($explodeSlug[0
unset($explodeSlug[0]); unset($explodeSlug[0]);
$layout['parameters'] = implode('/', $explodeSlug); $layout['parameters'] = implode('/', $explodeSlug);
// Disable Magic Quotes.
// Thanks, http://stackoverflow.com/questions/517008/how-to-turn-off-magic-quotes-on-shared-hosting
if ( in_array( strtolower( ini_get( 'magic_quotes_gpc' ) ), array( '1', 'on' ) ) ) {
$_POST = array_map('stripslashes', $_POST);
$_GET = array_map('stripslashes', $_GET);
$_COOKIE = array_map('stripslashes', $_COOKIE);
}
// Boot plugins rules // Boot plugins rules
include(PATH_RULES.'60.plugins.php'); include(PATH_RULES.'60.plugins.php');
@ -61,17 +53,11 @@ else
// Page not found. // Page not found.
// User not logged. // User not logged.
// Slug is login. // Slug is login.
// Slug is login-email. if ($url->notFound() || !$login->isLogged() || ($url->slug()==='login') ) {
if($url->notFound() || !$login->isLogged() || ($url->slug()==='login') || ($url->slug()==='login-email') ) {
$layout['controller'] = 'login'; $layout['controller'] = 'login';
$layout['view'] = 'login'; $layout['view'] = 'login';
$layout['template'] = 'login.php'; $layout['template'] = 'login.php';
if ($url->slug()==='login-email') {
$layout['controller'] = 'login-email';
$layout['view'] = 'login-email';
}
// Generate the tokenCSRF for the user not logged, when the user log-in the token will be change. // Generate the tokenCSRF for the user not logged, when the user log-in the token will be change.
$security->generateTokenCSRF(); $security->generateTokenCSRF();
} }
@ -84,17 +70,17 @@ else
Theme::plugins('beforeAdminLoad'); Theme::plugins('beforeAdminLoad');
// Load init.php if the theme has one. // Load init.php if the theme has one.
if( Sanitize::pathFile(PATH_ADMIN_THEMES, $site->adminTheme().DS.'init.php') ) { if (Sanitize::pathFile(PATH_ADMIN_THEMES, $site->adminTheme().DS.'init.php')) {
include(PATH_ADMIN_THEMES.$site->adminTheme().DS.'init.php'); include(PATH_ADMIN_THEMES.$site->adminTheme().DS.'init.php');
} }
// Load controller. // Load controller.
if( Sanitize::pathFile(PATH_ADMIN_CONTROLLERS, $layout['controller'].'.php') ) { if (Sanitize::pathFile(PATH_ADMIN_CONTROLLERS, $layout['controller'].'.php')) {
include(PATH_ADMIN_CONTROLLERS.$layout['controller'].'.php'); include(PATH_ADMIN_CONTROLLERS.$layout['controller'].'.php');
} }
// Load view and theme. // Load view and theme.
if( Sanitize::pathFile(PATH_ADMIN_THEMES, $site->adminTheme().DS.$layout['template']) ) { if (Sanitize::pathFile(PATH_ADMIN_THEMES, $site->adminTheme().DS.$layout['template'])) {
include(PATH_ADMIN_THEMES.$site->adminTheme().DS.$layout['template']); include(PATH_ADMIN_THEMES.$site->adminTheme().DS.$layout['template']);
} }

View File

@ -1,21 +1,22 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
// Bludit version // Bludit version
define('BLUDIT_VERSION', '3.0.0-beta-1'); define('BLUDIT_VERSION', '3.12.0');
define('BLUDIT_CODENAME', ''); define('BLUDIT_CODENAME', 'Hand washing');
define('BLUDIT_RELEASE_DATE', '2018-08-01'); define('BLUDIT_RELEASE_DATE', '2020-03-20');
define('BLUDIT_BUILD', '20180801'); define('BLUDIT_BUILD', '20200320');
// Debug mode // Debug mode
// Change to FALSE, for prevent warning or errors on browser // Change to FALSE, for prevent warning or errors on browser
define('DEBUG_MODE', TRUE); define('DEBUG_MODE', TRUE);
define('DEBUG_TYPE', 'INFO'); // INFO, TRACE
error_reporting(0); // Turn off all error reporting error_reporting(0); // Turn off all error reporting
if (DEBUG_MODE) { if (DEBUG_MODE) {
// Turn on all error reporting // Turn on all error reporting
ini_set("display_errors", 1); ini_set("display_errors", 0);
ini_set('display_startup_errors',1); ini_set('display_startup_errors',0);
ini_set("track_errors", 1);
ini_set("html_errors", 1); ini_set("html_errors", 1);
ini_set('log_errors', 1);
error_reporting(E_ALL | E_STRICT | E_NOTICE); error_reporting(E_ALL | E_STRICT | E_NOTICE);
} }
@ -38,7 +39,9 @@ define('PATH_DATABASES', PATH_CONTENT.'databases'.DS);
define('PATH_PLUGINS_DATABASES', PATH_CONTENT.'databases'.DS.'plugins'.DS); define('PATH_PLUGINS_DATABASES', PATH_CONTENT.'databases'.DS.'plugins'.DS);
define('PATH_TMP', PATH_CONTENT.'tmp'.DS); define('PATH_TMP', PATH_CONTENT.'tmp'.DS);
define('PATH_UPLOADS', PATH_CONTENT.'uploads'.DS); define('PATH_UPLOADS', PATH_CONTENT.'uploads'.DS);
define('PATH_WORKSPACES', PATH_CONTENT.'workspaces'.DS);
define('PATH_UPLOADS_PAGES', PATH_UPLOADS.'pages'.DS);
define('PATH_UPLOADS_PROFILES', PATH_UPLOADS.'profiles'.DS); define('PATH_UPLOADS_PROFILES', PATH_UPLOADS.'profiles'.DS);
define('PATH_UPLOADS_THUMBNAILS', PATH_UPLOADS.'thumbnails'.DS); define('PATH_UPLOADS_THUMBNAILS', PATH_UPLOADS.'thumbnails'.DS);
@ -58,11 +61,6 @@ define('DB_SYSLOG', PATH_DATABASES.'syslog.php');
define('DB_USERS', PATH_DATABASES.'users.php'); define('DB_USERS', PATH_DATABASES.'users.php');
define('DB_SECURITY', PATH_DATABASES.'security.php'); define('DB_SECURITY', PATH_DATABASES.'security.php');
// JSON pretty print
if (!defined('JSON_PRETTY_PRINT')) {
define('JSON_PRETTY_PRINT', 128);
}
// User environment variables // User environment variables
include(PATH_KERNEL.'boot'.DS.'variables.php'); include(PATH_KERNEL.'boot'.DS.'variables.php');
@ -78,13 +76,13 @@ include(PATH_ABSTRACT.'dblist.class.php');
include(PATH_ABSTRACT.'plugin.class.php'); include(PATH_ABSTRACT.'plugin.class.php');
// Inclde Classes // Inclde Classes
include(PATH_KERNEL.'dbpages.class.php'); include(PATH_KERNEL.'pages.class.php');
include(PATH_KERNEL.'dbusers.class.php'); include(PATH_KERNEL.'users.class.php');
include(PATH_KERNEL.'dbtags.class.php'); include(PATH_KERNEL.'tags.class.php');
include(PATH_KERNEL.'dblanguage.class.php'); include(PATH_KERNEL.'language.class.php');
include(PATH_KERNEL.'dbsite.class.php'); include(PATH_KERNEL.'site.class.php');
include(PATH_KERNEL.'dbcategories.class.php'); include(PATH_KERNEL.'categories.class.php');
include(PATH_KERNEL.'dbsyslog.class.php'); include(PATH_KERNEL.'syslog.class.php');
include(PATH_KERNEL.'pagex.class.php'); include(PATH_KERNEL.'pagex.class.php');
include(PATH_KERNEL.'category.class.php'); include(PATH_KERNEL.'category.class.php');
include(PATH_KERNEL.'tag.class.php'); include(PATH_KERNEL.'tag.class.php');
@ -120,14 +118,14 @@ if (file_exists(PATH_KERNEL.'bludit.pro.php')) {
} }
// Objects // Objects
$pages = $dbPages = new dbPages(); // DEPRECATED v3.0.0 $dbPages $pages = new Pages();
$dbUsers = new dbUsers(); $users = new Users();
$dbTags = new dbTags(); $tags = new Tags();
$dbCategories = new dbCategories(); $categories = new Categories();
$site = new dbSite(); $site = new Site();
$url = new Url(); $url = new Url();
$security = new Security(); $security = new Security();
$syslog = new dbSyslog(); $syslog = new Syslog();
// --- Relative paths --- // --- Relative paths ---
// This paths are relative for the user / web browsing. // This paths are relative for the user / web browsing.
@ -165,17 +163,18 @@ define('HTML_PATH_ADMIN_ROOT', HTML_PATH_ROOT.ADMIN_URI_FILTER.'/');
define('HTML_PATH_ADMIN_THEME', HTML_PATH_ROOT.'bl-kernel/admin/themes/'.$site->adminTheme().'/'); define('HTML_PATH_ADMIN_THEME', HTML_PATH_ROOT.'bl-kernel/admin/themes/'.$site->adminTheme().'/');
define('HTML_PATH_ADMIN_THEME_JS', HTML_PATH_ADMIN_THEME.'js/'); define('HTML_PATH_ADMIN_THEME_JS', HTML_PATH_ADMIN_THEME.'js/');
define('HTML_PATH_ADMIN_THEME_CSS', HTML_PATH_ADMIN_THEME.'css/'); define('HTML_PATH_ADMIN_THEME_CSS', HTML_PATH_ADMIN_THEME.'css/');
define('HTML_PATH_ADMIN_THEME_IMG', HTML_PATH_ADMIN_THEME.'img/');
define('HTML_PATH_CORE_JS', HTML_PATH_ROOT.'bl-kernel/js/'); define('HTML_PATH_CORE_JS', HTML_PATH_ROOT.'bl-kernel/js/');
define('HTML_PATH_CORE_CSS', HTML_PATH_ROOT.'bl-kernel/css/'); define('HTML_PATH_CORE_CSS', HTML_PATH_ROOT.'bl-kernel/css/');
define('HTML_PATH_CORE_IMG', HTML_PATH_ROOT.'bl-kernel/img/');
define('HTML_PATH_CONTENT', HTML_PATH_ROOT.'bl-content/'); define('HTML_PATH_CONTENT', HTML_PATH_ROOT.'bl-content/');
define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'bl-content/uploads/'); define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'bl-content/uploads/');
define('HTML_PATH_UPLOADS_PAGES', HTML_PATH_UPLOADS.'pages/');
define('HTML_PATH_UPLOADS_PROFILES', HTML_PATH_UPLOADS.'profiles/'); define('HTML_PATH_UPLOADS_PROFILES', HTML_PATH_UPLOADS.'profiles/');
define('HTML_PATH_UPLOADS_THUMBNAILS', HTML_PATH_UPLOADS.'thumbnails/'); define('HTML_PATH_UPLOADS_THUMBNAILS', HTML_PATH_UPLOADS.'thumbnails/');
define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'bl-plugins/'); define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'bl-plugins/');
// --- Objects with dependency --- // --- Objects with dependency ---
$language = $Language = new dbLanguage( $site->language() ); $language = new Language( $site->language() );
$url->checkFilters( $site->uriFilters() ); $url->checkFilters( $site->uriFilters() );
// --- CONSTANTS with dependency --- // --- CONSTANTS with dependency ---
@ -198,6 +197,15 @@ define('EXTREME_FRIENDLY_URL', $site->extremeFriendly());
// Minutes to execute the autosave function // Minutes to execute the autosave function
define('AUTOSAVE_INTERVAL', $site->autosaveInterval()); define('AUTOSAVE_INTERVAL', $site->autosaveInterval());
// TRUE for upload images restric to a pages, FALSE to upload images in common
define('IMAGE_RESTRICT', $site->imageRestrict());
// TRUE to convert relatives images to absoultes, FALSE No changes apply
define('IMAGE_RELATIVE_TO_ABSOLUTE', $site->imageRelativeToAbsolute());
// TRUE if the markdown parser is enabled
define('MARKDOWN_PARSER', $site->markdownParser());
// --- PHP paths with dependency --- // --- PHP paths with dependency ---
// This paths are absolutes for the OS // This paths are absolutes for the OS
define('THEME_DIR', PATH_ROOT.'bl-themes'.DS.$site->theme().DS); define('THEME_DIR', PATH_ROOT.'bl-themes'.DS.$site->theme().DS);
@ -221,12 +229,13 @@ define('DOMAIN_ADMIN_THEME', DOMAIN.HTML_PATH_ADMIN_THEME);
define('DOMAIN_ADMIN_THEME_CSS', DOMAIN.HTML_PATH_ADMIN_THEME_CSS); define('DOMAIN_ADMIN_THEME_CSS', DOMAIN.HTML_PATH_ADMIN_THEME_CSS);
define('DOMAIN_ADMIN_THEME_JS', DOMAIN.HTML_PATH_ADMIN_THEME_JS); define('DOMAIN_ADMIN_THEME_JS', DOMAIN.HTML_PATH_ADMIN_THEME_JS);
define('DOMAIN_UPLOADS', DOMAIN.HTML_PATH_UPLOADS); define('DOMAIN_UPLOADS', DOMAIN.HTML_PATH_UPLOADS);
define('DOMAIN_UPLOADS_PAGES', DOMAIN.HTML_PATH_UPLOADS_PAGES);
define('DOMAIN_UPLOADS_PROFILES', DOMAIN.HTML_PATH_UPLOADS_PROFILES); define('DOMAIN_UPLOADS_PROFILES', DOMAIN.HTML_PATH_UPLOADS_PROFILES);
define('DOMAIN_UPLOADS_THUMBNAILS', DOMAIN.HTML_PATH_UPLOADS_THUMBNAILS); define('DOMAIN_UPLOADS_THUMBNAILS', DOMAIN.HTML_PATH_UPLOADS_THUMBNAILS);
define('DOMAIN_PLUGINS', DOMAIN.HTML_PATH_PLUGINS); define('DOMAIN_PLUGINS', DOMAIN.HTML_PATH_PLUGINS);
define('DOMAIN_CONTENT', DOMAIN.HTML_PATH_CONTENT); define('DOMAIN_CONTENT', DOMAIN.HTML_PATH_CONTENT);
define('DOMAIN_ADMIN', DOMAIN_BASE.ADMIN_URI_FILTER); define('DOMAIN_ADMIN', DOMAIN_BASE.ADMIN_URI_FILTER.'/');
define('DOMAIN_TAGS', Text::addSlashes(DOMAIN_BASE.TAG_URI_FILTER, false, true)); define('DOMAIN_TAGS', Text::addSlashes(DOMAIN_BASE.TAG_URI_FILTER, false, true));
define('DOMAIN_CATEGORIES', Text::addSlashes(DOMAIN_BASE.CATEGORY_URI_FILTER, false, true)); define('DOMAIN_CATEGORIES', Text::addSlashes(DOMAIN_BASE.CATEGORY_URI_FILTER, false, true));

View File

@ -24,10 +24,11 @@ $plugins = array(
'adminContentSidebar'=>array(), 'adminContentSidebar'=>array(),
'dashboard'=>array(), 'dashboard'=>array(),
'beforeRulesLoad'=>array(),
'beforeAll'=>array(), 'beforeAll'=>array(),
'afterAll'=>array(), 'afterAll'=>array(),
'paginator'=>array(),
'afterPageCreate'=>array(), 'afterPageCreate'=>array(),
'afterPageModify'=>array(), 'afterPageModify'=>array(),
'afterPageDelete'=>array(), 'afterPageDelete'=>array(),
@ -42,6 +43,8 @@ $plugins = array(
$pluginsEvents = $plugins; $pluginsEvents = $plugins;
unset($pluginsEvents['all']); unset($pluginsEvents['all']);
$pluginsInstalled = array();
// ============================================================================ // ============================================================================
// Functions // Functions
// ============================================================================ // ============================================================================
@ -50,20 +53,20 @@ function buildPlugins()
{ {
global $plugins; global $plugins;
global $pluginsEvents; global $pluginsEvents;
global $Language; global $pluginsInstalled;
global $L;
global $site; global $site;
// List plugins directories
$list = Filesystem::listDirectories(PATH_PLUGINS);
// Get declared clasess BEFORE load plugins clasess // Get declared clasess BEFORE load plugins clasess
$currentDeclaredClasess = get_declared_classes(); $currentDeclaredClasess = get_declared_classes();
// List plugins directories
$list = Filesystem::listDirectories(PATH_PLUGINS);
// Load each plugin clasess // Load each plugin clasess
foreach ($list as $pluginPath) { foreach ($list as $pluginPath) {
// Check if the directory has the plugin.php // Check if the directory has the plugin.php
if (file_exists($pluginPath.DS.'plugin.php')) { if (file_exists($pluginPath.DS.'plugin.php')) {
include($pluginPath.DS.'plugin.php'); include_once($pluginPath.DS.'plugin.php');
} }
} }
@ -75,7 +78,7 @@ function buildPlugins()
// Check if the plugin is translated // Check if the plugin is translated
$languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.$site->language().'.json'; $languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.$site->language().'.json';
if( !Sanitize::pathFile($languageFilename) ) { if (!Sanitize::pathFile($languageFilename)) {
$languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.DEFAULT_LANGUAGE_FILE; $languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.DEFAULT_LANGUAGE_FILE;
} }
@ -90,7 +93,7 @@ function buildPlugins()
// This function overwrite the key=>value // This function overwrite the key=>value
unset($database['plugin-data']); unset($database['plugin-data']);
if (!empty($database)) { if (!empty($database)) {
$Language->add($database); $L->add($database);
} }
// $plugins['all'] Array with all plugins, installed and not installed // $plugins['all'] Array with all plugins, installed and not installed
@ -98,6 +101,17 @@ function buildPlugins()
// If the plugin is installed insert on the hooks // If the plugin is installed insert on the hooks
if ($Plugin->installed()) { if ($Plugin->installed()) {
// Include custom hooks
if (!empty($Plugin->customHooks)) {
foreach ($Plugin->customHooks as $customHook) {
if (!isset($plugins[$customHook])) {
$plugins[$customHook] = array();
$pluginsEvents[$customHook] = array();
}
}
}
$pluginsInstalled[$pluginClass] = $Plugin;
foreach ($pluginsEvents as $event=>$value) { foreach ($pluginsEvents as $event=>$value) {
if (method_exists($Plugin, $event)) { if (method_exists($Plugin, $event)) {
array_push($plugins[$event], $Plugin); array_push($plugins[$event], $Plugin);
@ -105,10 +119,11 @@ function buildPlugins()
} }
} }
// Sort the plugins by the position for the site sidebar
uasort($plugins['siteSidebar'], function ($a, $b) { uasort($plugins['siteSidebar'], function ($a, $b) {
return $a->position()>$b->position(); return $a->position()>$b->position();
} }
); );
} }
} }

View File

@ -0,0 +1,23 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// Redirect admin, from /admin to /admin/
if ($url->uri()==HTML_PATH_ROOT.ADMIN_URI_FILTER) {
Redirect::url(DOMAIN_ADMIN);
}
// Redirect blog, from /blog to /blog/
// This rule only works when the user set a page as homepage
if ($url->uri()==HTML_PATH_ROOT.'blog' && $site->homepage()) {
$filter = $url->filters('blog');
$finalURL = Text::addSlashes(DOMAIN_BASE.$filter, false, true);
Redirect::url($finalURL);
}
// Redirect pages, from /my-page/ to /my-page
if ($url->whereAmI()=='page' && !$url->notFound()) {
$pageKey = $url->slug();
if (Text::endsWith($pageKey, '/')) {
$pageKey = rtrim($pageKey, '/');
Redirect::url(DOMAIN_PAGES.$pageKey);
}
}

View File

@ -5,7 +5,7 @@
// ============================================================================ // ============================================================================
// Array with pages, each page is a Page Object // Array with pages, each page is a Page Object
// Filtered by pagenumber, amount of items per page and sorted by date/position // Filtered by pagenumber, number of items per page and sorted by date/position
/* /*
array( array(
0 => Page Object, 0 => Page Object,
@ -36,7 +36,10 @@ $staticContent = $staticPages = buildStaticPages();
// ============================================================================ // ============================================================================
// Execute the scheduler // Execute the scheduler
if ($dbPages->scheduler()) { if ($pages->scheduler()) {
// Execute plugins with the hook afterPageCreate
Theme::plugins('afterPageCreate');
reindexTags(); reindexTags();
reindexCategories(); reindexCategories();
@ -47,10 +50,10 @@ if ($dbPages->scheduler()) {
)); ));
} }
// Set home page if the user defined them // Set home page if the user defined one
if ($site->homepage() && $url->whereAmI()==='home') { if ($site->homepage() && $url->whereAmI()==='home') {
$pageKey = $site->homepage(); $pageKey = $site->homepage();
if ($dbPages->exists($pageKey)) { if ($pages->exists($pageKey)) {
$url->setSlug($pageKey); $url->setSlug($pageKey);
$url->setWhereAmI('page'); $url->setWhereAmI('page');
} }
@ -66,7 +69,7 @@ elseif ($url->whereAmI()==='tag') {
} }
// Build content by category // Build content by category
elseif ($url->whereAmI()==='category') { elseif ($url->whereAmI()==='category') {
$content = buildPagesByCategory(); $content = buildPagesByCategory();
} }
// Build content for the homepage // Build content for the homepage
elseif ( ($url->whereAmI()==='home') || ($url->whereAmI()==='blog') ) { elseif ( ($url->whereAmI()==='home') || ($url->whereAmI()==='blog') ) {

View File

@ -1,3 +1,4 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
header('HTTP/1.0 '.$url->httpCode().' '.$url->httpMessage()); header('HTTP/1.0 '.$url->httpCode().' '.$url->httpMessage());
header('X-Powered-By: Bludit');

View File

@ -4,37 +4,37 @@
$currentPage = $url->pageNumber(); $currentPage = $url->pageNumber();
Paginator::set('currentPage', $currentPage); Paginator::set('currentPage', $currentPage);
if($url->whereAmI()=='admin') { if ($url->whereAmI()=='admin') {
$itemsPerPage = ITEMS_PER_PAGE_ADMIN; $itemsPerPage = ITEMS_PER_PAGE_ADMIN;
$amountOfItems = $dbPages->count(true); $numberOfItems = $pages->count(true);
} } elseif ($url->whereAmI()=='tag') {
elseif($url->whereAmI()=='tag') {
$itemsPerPage = $site->itemsPerPage(); $itemsPerPage = $site->itemsPerPage();
$tagKey = $url->slug(); $tagKey = $url->slug();
$amountOfItems = $dbTags->countPagesByTag($tagKey); $numberOfItems = $tags->numberOfPages($tagKey);
} } elseif ($url->whereAmI()=='category') {
elseif($url->whereAmI()=='category') {
$itemsPerPage = $site->itemsPerPage(); $itemsPerPage = $site->itemsPerPage();
$categoryKey = $url->slug(); $categoryKey = $url->slug();
$amountOfItems = $dbCategories->countPagesByCategory($categoryKey); $numberOfItems = $categories->numberOfPages($categoryKey);
} } else {
else {
$itemsPerPage = $site->itemsPerPage(); $itemsPerPage = $site->itemsPerPage();
$amountOfItems = $dbPages->count(true); $numberOfItems = $pages->count(true);
} }
// Execute hook from plugins
Theme::plugins('paginator');
// Items per page // Items per page
Paginator::set('itemsPerPage', $itemsPerPage); Paginator::set('itemsPerPage', $itemsPerPage);
// Amount of items // Amount of items
Paginator::set('amountOfItems', $amountOfItems); Paginator::set('numberOfItems', $numberOfItems);
// Amount of pages // Amount of pages
$amountOfPages = (int) max(ceil($amountOfItems / $itemsPerPage), 1); $numberOfPages = (int) max(ceil($numberOfItems / $itemsPerPage), 1);
Paginator::set('amountOfPages', $amountOfPages); Paginator::set('numberOfPages', $numberOfPages);
// TRUE if exists a next page to show // TRUE if exists a next page to show
$showNext = $amountOfPages > $currentPage; $showNext = $numberOfPages > $currentPage;
Paginator::set('showNext', $showNext); Paginator::set('showNext', $showNext);
// TRUE if exists a previous page to show // TRUE if exists a previous page to show
@ -50,5 +50,5 @@ $nextPage = max(0, $currentPage+1);
Paginator::set('nextPage', $nextPage); Paginator::set('nextPage', $nextPage);
// Integer with the previous page // Integer with the previous page
$prevPage = min($amountOfPages, $currentPage-1); $prevPage = min($numberOfPages, $currentPage-1);
Paginator::set('prevPage', $prevPage); Paginator::set('prevPage', $prevPage);

View File

@ -85,6 +85,6 @@ if( Sanitize::pathFile($languageFilename) )
// Load words from the theme language // Load words from the theme language
if(!empty($database)) { if(!empty($database)) {
$Language->add($database); $L->add($database);
} }
} }

View File

@ -1,12 +1,5 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
// // Start session if the cookie is defined
// if (Cookie::get('BLUDIT-KEY')) {
// if (!Session::started()) {
// Session::start();
// }
// }
// Load plugins rules // Load plugins rules
include(PATH_RULES.'60.plugins.php'); include(PATH_RULES.'60.plugins.php');
@ -14,6 +7,7 @@ include(PATH_RULES.'60.plugins.php');
Theme::plugins('beforeAll'); Theme::plugins('beforeAll');
// Load rules // Load rules
include(PATH_RULES.'60.router.php');
include(PATH_RULES.'69.pages.php'); include(PATH_RULES.'69.pages.php');
include(PATH_RULES.'99.header.php'); include(PATH_RULES.'99.header.php');
include(PATH_RULES.'99.paginator.php'); include(PATH_RULES.'99.paginator.php');
@ -31,7 +25,7 @@ if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'init.php')) {
if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'index.php')) { if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'index.php')) {
include(PATH_THEMES.$site->theme().DS.'index.php'); include(PATH_THEMES.$site->theme().DS.'index.php');
} else { } else {
$Language->p('Please check your theme configuration'); $L->p('Please check your theme configuration in the admin panel. Check for an active theme.');
} }
// Plugins after site loaded // Plugins after site loaded
@ -39,4 +33,3 @@ Theme::plugins('afterSiteLoad');
// Plugins after all // Plugins after all
Theme::plugins('afterAll'); Theme::plugins('afterAll');

View File

@ -2,7 +2,7 @@
/* /*
Environment variables Environment variables
If you are going to change some variable from here is recommended do it before the installation If you are going to do some changes is recommended do it before the installation
*/ */
// Log // Log
@ -20,19 +20,14 @@ define('ALERT_STATUS_OK', 0);
// Alert status fail // Alert status fail
define('ALERT_STATUS_FAIL', 1); define('ALERT_STATUS_FAIL', 1);
// Amount of thumbnails shown on Bludit Quick images
define('THUMBNAILS_AMOUNT', 6);
// Thubmnails size
define('THUMBNAILS_WIDTH', 400);
define('THUMBNAILS_HEIGHT', 400);
define('THUMBNAILS_QUALITY', 100); // 100%
// Profile image size // Profile image size
define('PROFILE_IMG_WIDTH', 400); define('PROFILE_IMG_WIDTH', 400);
define('PROFILE_IMG_HEIGHT', 400); define('PROFILE_IMG_HEIGHT', 400);
define('PROFILE_IMG_QUALITY', 100); // 100% define('PROFILE_IMG_QUALITY', 100); // 100%
// Items per page for admin area
define('ITEMS_PER_PAGE_ADMIN', 20);
// Password length // Password length
define('PASSWORD_LENGTH', 6); define('PASSWORD_LENGTH', 6);
@ -42,18 +37,6 @@ define('SALT_LENGTH', 8);
// Page brake string // Page brake string
define('PAGE_BREAK', '<!-- pagebreak -->'); define('PAGE_BREAK', '<!-- pagebreak -->');
// Parent key for the array $pagesByParents
define('PARENT', 'BLUDIT3849abb4cb7abd24c2d8dac17b216f17');
// Items per page for admin area
define('ITEMS_PER_PAGE_ADMIN', 20);
// Cli mode, status for new pages
define('CLI_STATUS', 'published');
// Cli mode, username for new pages
define('CLI_USERNAME', 'admin');
// Remember me // Remember me
define('REMEMBER_COOKIE_USERNAME', 'BLUDITREMEMBERUSERNAME'); define('REMEMBER_COOKIE_USERNAME', 'BLUDITREMEMBERUSERNAME');
define('REMEMBER_COOKIE_TOKEN', 'BLUDITREMEMBERTOKEN'); define('REMEMBER_COOKIE_TOKEN', 'BLUDITREMEMBERTOKEN');
@ -80,6 +63,9 @@ define('SCHEDULED_DATE_FORMAT', 'D, j M Y, H:i');
// Notifications date format // Notifications date format
define('NOTIFICATIONS_DATE_FORMAT', 'D, j M Y, H:i'); define('NOTIFICATIONS_DATE_FORMAT', 'D, j M Y, H:i');
// Manage content date format
define('MANAGE_CONTENT_DATE_FORMAT', 'D, j M Y, H:i');
// Amount of items to show on notification panel // Amount of items to show on notification panel
define('NOTIFICATIONS_AMOUNT', 10); define('NOTIFICATIONS_AMOUNT', 10);
@ -106,15 +92,19 @@ define('SESSION_GC_MAXLIFETIME', 3600);
// The value 0 means until the browser is closed // The value 0 means until the browser is closed
define('SESSION_COOKIE_LIFE_TIME', 0); define('SESSION_COOKIE_LIFE_TIME', 0);
// New Global Variables // Alert notification disappear in X seconds
$GLOBALS['BLUDIT_MEDIA_MANAGER_AMOUNT_OF_FILES'] = 5; define('ALERT_DISAPPEAR_IN', 3);
$GLOBALS['BLUDIT_MEDIA_MANAGER_SORT_BY_DATE'] = true;
// Thubmnails size // Number of images to show in the media manager per page
$GLOBALS['THUMBNAILS_WIDTH'] = 400; define('MEDIA_MANAGER_NUMBER_OF_FILES', 5);
$GLOBALS['THUMBNAILS_HEIGHT'] = 400;
$GLOBALS['THUMBNAILS_QUALITY'] = 100;
// Alert // Sort the image by date
$GLOBALS['ALERT_DISSAPEAR_IN'] = 3; // Seconds define('MEDIA_MANAGER_SORT_BY_DATE', true);
// Constant arrays using define are not allowed in PHP 5.6 or earlier
// Type of pages included in the tag database
$GLOBALS['DB_TAGS_TYPES'] = array('published','static','sticky');
// Allowed image extensions
$GLOBALS['ALLOWED_IMG_EXTENSION'] = array('gif', 'png', 'jpg', 'jpeg', 'svg');

View File

@ -1,34 +1,39 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
class dbCategories extends dbList class Categories extends dbList {
{
function __construct() function __construct()
{ {
parent::__construct(DB_CATEGORIES); parent::__construct(DB_CATEGORIES);
} }
function countPagesByCategory($key) function numberOfPages($key)
{ {
return $this->countItems($key); return $this->countItems($key);
} }
public function reindex() public function reindex()
{ {
global $dbPages; global $pages;
// Foreach category // Foreach category
foreach ($this->db as $key=>$value) { foreach ($this->db as $key=>$value) {
$this->db[$key]['list'] = array(); $this->db[$key]['list'] = array();
} }
// Get a database with published pages // Get pages database
$db = $dbPages->getPublishedDB(false); $db = $pages->getDB(false);
foreach ($db as $pageKey=>$pageFields) { foreach ($db as $pageKey=>$pageFields) {
if (!empty($pageFields['category'])) { if (!empty($pageFields['category'])) {
$categoryKey = $pageFields['category']; $categoryKey = $pageFields['category'];
if (isset($this->db[$categoryKey]['list'])) { if (isset($this->db[$categoryKey]['list'])) {
array_push($this->db[$categoryKey]['list'], $pageKey); if (
($db[$pageKey]['type']=='published') ||
($db[$pageKey]['type']=='sticky') ||
($db[$pageKey]['type']=='static')
) {
array_push($this->db[$categoryKey]['list'], $pageKey);
}
} }
} }
} }

View File

@ -2,28 +2,23 @@
class Category { class Category {
private $vars; protected $vars;
function __construct($key) function __construct($key)
{ {
global $dbCategories; global $categories;
if (isset($categories->db[$key])) {
if (isset($dbCategories->db[$key])) { $this->vars['name'] = $categories->db[$key]['name'];
$this->vars['name'] = $dbCategories->db[$key]['name']; $this->vars['template'] = $categories->db[$key]['template'];
$this->vars['template'] = $dbCategories->db[$key]['template']; $this->vars['description'] = $categories->db[$key]['description'];
$this->vars['key'] = $key; $this->vars['key'] = $key;
$this->vars['permalink'] = DOMAIN_CATEGORIES . $key; $this->vars['permalink'] = DOMAIN_CATEGORIES . $key;
$this->vars['list'] = $dbCategories->db[$key]['list']; $this->vars['list'] = $categories->db[$key]['list'];
} else {
$errorMessage = 'Category not found in database by key ['.$key.']';
Log::set(__METHOD__.LOG_SEP.$errorMessage);
throw new Exception($errorMessage);
} }
else {
$this->vars = false;
}
}
// Returns TRUE if the category is valid/exists, FALSE otherwise
public function isValid()
{
return $this->vars!==false;
} }
public function getValue($field) public function getValue($field)
@ -54,9 +49,30 @@ class Category {
return $this->getValue('template'); return $this->getValue('template');
} }
public function description()
{
return $this->getValue('description');
}
// Returns an array with the keys of pages linked to the category // Returns an array with the keys of pages linked to the category
public function pages() public function pages()
{ {
return $this->getValue('list'); return $this->getValue('list');
} }
// Returns an array in json format with all the data of the tag
public function json($returnsArray=false)
{
$tmp['key'] = $this->key();
$tmp['name'] = $this->name();
$tmp['description'] = $this->description();
$tmp['permalink'] = $this->permalink();
$tmp['pages'] = $this->pages();
if ($returnsArray) {
return $tmp;
}
return json_encode($tmp);
}
} }

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