diff --git a/admin/themes/default/css/default.css b/admin/themes/default/css/default.css
index c7626bc6..1cdd7e80 100644
--- a/admin/themes/default/css/default.css
+++ b/admin/themes/default/css/default.css
@@ -406,3 +406,6 @@ div.pluginBox span.version {
li.active {
border-bottom: 2px solid #ccc;
}
+
+/* ----------- PROFILE-PICTURE ----------- */
+#profilePicture { width:50px; height:50px; border-radius:50%; float:left;}
diff --git a/admin/views/edit-user.php b/admin/views/edit-user.php
index beb2d9cc..e431839b 100644
--- a/admin/views/edit-user.php
+++ b/admin/views/edit-user.php
@@ -17,7 +17,7 @@
-
\ No newline at end of file
+
diff --git a/kernel/boot/init.php b/kernel/boot/init.php
index 73d8fd44..906a886c 100644
--- a/kernel/boot/init.php
+++ b/kernel/boot/init.php
@@ -156,6 +156,7 @@ define('HTML_PATH_ADMIN_THEME_JS', HTML_PATH_ADMIN_THEME.'js/');
define('HTML_PATH_ADMIN_ROOT', HTML_PATH_ROOT.'admin/');
define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'content/uploads/');
define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'plugins/');
+define('HTML_PATH_PICTURES', HTML_PATH_ROOT.'content/pictures/');
define('JQUERY', HTML_PATH_ADMIN_THEME_JS.'jquery.min.js');
diff --git a/kernel/dbusers.class.php b/kernel/dbusers.class.php
index 59e09064..996d9e6d 100644
--- a/kernel/dbusers.class.php
+++ b/kernel/dbusers.class.php
@@ -7,6 +7,7 @@ class dbUsers extends dbJSON
'lastName'=> array('inFile'=>false, 'value'=>''),
'username'=> array('inFile'=>false, 'value'=>''),
'role'=> array('inFile'=>false, 'value'=>'editor'),
+ 'picture'=> array('inFile'=>false, 'value'=>''),
'password'=> array('inFile'=>false, 'value'=>''),
'salt'=> array('inFile'=>false, 'value'=>'!Pink Floyd!Welcome to the machine!'),
'email'=> array('inFile'=>false, 'value'=>''),
@@ -80,6 +81,19 @@ class dbUsers extends dbJSON
}
}
+ //Profile picture upload
+ $imageFormat = pathinfo($_FILES['profilePicture']['name'],PATHINFO_EXTENSION);
+ $target_file = 'content/pictures/'.$args['username'].'.'.$imageFormat;
+ if (move_uploaded_file($_FILES['profilePicture']['tmp_name'], $target_file)) {
+ $user['picture'] = $imageFormat;
+ } else {
+ 'Error occured when trying to upload your file.';
+ }
+ // Saving modification time
+ $user['updated'] = Date::unixTime();
+
+
+
// Save the database
$this->db[$args['username']] = $user;
if( $this->save() === false ) {
diff --git a/languages/cs_CZ.json b/languages/cs_CZ.json
index 6f6d4025..3d6358e9 100644
--- a/languages/cs_CZ.json
+++ b/languages/cs_CZ.json
@@ -15,6 +15,7 @@
"editor": "Editor",
"dashboard": "Nástěnka",
"role": "Úroveň",
+ "profile-picture": "Profile picture",
"post": "Zveřejnit",
"posts": "Počet příspěvků",
"users": "Počet uživatelů",
@@ -145,4 +146,4 @@
"share-with-your-friends-and-enjoy": "Podělte se se svými přáteli a užívejte si",
"the-page-has-not-been-found": "Stránka nenalezena.",
"error": "Error"
-}
\ No newline at end of file
+}
diff --git a/languages/de_DE.json b/languages/de_DE.json
index d6ade919..3aac957d 100644
--- a/languages/de_DE.json
+++ b/languages/de_DE.json
@@ -15,6 +15,7 @@
"editor": "Editor",
"dashboard": "Dashboard",
"role": "Rolle",
+ "profile-picture": "Profil-bild",
"post": "Beitrag",
"posts": "Beiträge",
"users": "Benutzer",
@@ -163,4 +164,4 @@
"scheduled": "Zeitpunkt bestimmt.",
"publish": "Veröffentlichen",
"please-check-your-theme-configuration": "Bitte die Einstellungen des Themes prüfen."
-}
\ No newline at end of file
+}
diff --git a/languages/en_US.json b/languages/en_US.json
index 9d511b9e..9a377fc7 100644
--- a/languages/en_US.json
+++ b/languages/en_US.json
@@ -15,6 +15,7 @@
"editor": "Editor",
"dashboard": "Dashboard",
"role": "Role",
+ "profile-picture": "Profile picture",
"post": "Post",
"posts": "Posts",
"users": "Users",
diff --git a/languages/es_AR.json b/languages/es_AR.json
index 39f4b8fb..9b9b0cdb 100644
--- a/languages/es_AR.json
+++ b/languages/es_AR.json
@@ -15,6 +15,7 @@
"editor": "Editor",
"dashboard": "Panel",
"role": "Rol",
+ "profile-picture": "Profile picture",
"post": "Post",
"posts": "Posts",
"users": "Usuarios",
@@ -169,4 +170,4 @@
"cli-mode": "Modo Cli",
"command-line-mode": "Linea de comandos",
"enable-the-command-line-mode-if-you-add-edit": "Habilite el modo linea de comando si usted crea, edita o elimina posts o paginas desde el sistema de archivos."
-}
\ No newline at end of file
+}
diff --git a/languages/es_ES.json b/languages/es_ES.json
index 8d331007..5fe329f6 100644
--- a/languages/es_ES.json
+++ b/languages/es_ES.json
@@ -15,6 +15,7 @@
"editor": "Editor",
"dashboard": "Panel",
"role": "Rol",
+ "profile-picture": "Profile picture",
"post": "Post",
"posts": "Posts",
"users": "Usuarios",
@@ -169,4 +170,4 @@
"cli-mode": "Modo Cli",
"command-line-mode": "Linea de comandos",
"enable-the-command-line-mode-if-you-add-edit": "Habilite el modo linea de comando si usted crea, edita o elimina posts o paginas desde el sistema de archivos."
-}
\ No newline at end of file
+}
diff --git a/languages/es_VE.json b/languages/es_VE.json
index 804ddcae..43280784 100644
--- a/languages/es_VE.json
+++ b/languages/es_VE.json
@@ -15,6 +15,7 @@
"editor": "Editor",
"dashboard": "Tablero",
"role": "Papel",
+ "profile-picture": "Profile picture",
"post": "Mensaje",
"posts": "Entrada",
"users": "Usuarios",
@@ -126,4 +127,4 @@
"delete-the-user-and-all-its-posts":"Eliminar el usuario y todos sus mensajes",
"delete-the-user-and-associate-its-posts-to-admin-user": "Eliminar el usuario y asociar sus mensajes al usuario administrador",
"read-more": "Leer más"
-}
\ No newline at end of file
+}
diff --git a/languages/fr_FR.json b/languages/fr_FR.json
index 9c829339..da820be8 100755
--- a/languages/fr_FR.json
+++ b/languages/fr_FR.json
@@ -15,6 +15,7 @@
"editor": "Rédacteur",
"dashboard": "Tableau de bord",
"role": "Rôle",
+ "profile-picture": "Photo de profil",
"post": "Article",
"posts": "Articles",
"users": "Utilisateurs",
@@ -169,4 +170,4 @@
"cli-mode": "Mode Cli",
"command-line-mode": "Mode ligne de commande",
"enable-the-command-line-mode-if-you-add-edit": "Activer le mode ligne de commande si vous créez, modifiez ou supprimez des articles ou des pages du système de fichiers."
-}
\ No newline at end of file
+}
diff --git a/languages/id_ID.json b/languages/id_ID.json
index 37b02c61..5938a5c6 100644
--- a/languages/id_ID.json
+++ b/languages/id_ID.json
@@ -15,6 +15,7 @@
"editor": "Editor",
"dashboard": "Dasbor",
"role": "Peran",
+ "profile-picture": "Profile picture",
"post": "Posting",
"posts": "Posting",
"users": "Pengguna",
@@ -163,4 +164,4 @@
"scheduled": "Telah dijadwalkan",
"publish": "Terbitkan",
"please-check-your-theme-configuration": "Silahkan periksa pengaturan tema Anda."
-}
\ No newline at end of file
+}
diff --git a/languages/ja_JP.json b/languages/ja_JP.json
index d68c7aec..cebd3fe9 100644
--- a/languages/ja_JP.json
+++ b/languages/ja_JP.json
@@ -15,6 +15,7 @@
"editor": "編集者",
"dashboard": "ダッシュボード",
"role": "役割",
+ "profile-picture": "Profile picture",
"posts": "記事",
"users": "ユーザー",
"administrator": "管理者",
@@ -105,4 +106,4 @@
"email": "Eメール",
"email": "Eメール",
"email": "Eメール"
-}
\ No newline at end of file
+}
diff --git a/languages/pl_PL.json b/languages/pl_PL.json
index 916acdbf..f9686600 100644
--- a/languages/pl_PL.json
+++ b/languages/pl_PL.json
@@ -15,6 +15,7 @@
"editor": "Edytor",
"dashboard": "Pulpit nawigacyjny",
"role": "Rola",
+ "profile-picture": "Profile picture",
"post": "Post",
"posts": "Posty",
"users": "Użytkownicy",
diff --git a/languages/pt_BR.json b/languages/pt_BR.json
index 9e1af774..a957ca1b 100644
--- a/languages/pt_BR.json
+++ b/languages/pt_BR.json
@@ -15,6 +15,7 @@
"editor": "Editor",
"dashboard": "Painel",
"role": "Cargo",
+ "profile-picture": "Profile picture",
"post": "Postagem",
"posts": "Postagens",
"users": "Usuários",
diff --git a/languages/ru_RU.json b/languages/ru_RU.json
index 11041b35..aa547458 100644
--- a/languages/ru_RU.json
+++ b/languages/ru_RU.json
@@ -15,6 +15,7 @@
"editor": "Редактор",
"dashboard": "Панель управления",
"role": "Роль",
+ "profile-picture": "Profile picture",
"post": "Запись",
"posts": "Записи",
"users": "Пользователи",
diff --git a/languages/uk_UA.json b/languages/uk_UA.json
index 02b264a9..c69a33e1 100644
--- a/languages/uk_UA.json
+++ b/languages/uk_UA.json
@@ -15,6 +15,7 @@
"editor": "Редактор",
"dashboard": "Панель управління",
"role": "Роль",
+ "profile-picture": "Profile picture",
"post": "Запис",
"posts": "Записи",
"users": "Користувачі",
diff --git a/languages/zh_TW.json b/languages/zh_TW.json
index 550b80bb..6a6f09cb 100644
--- a/languages/zh_TW.json
+++ b/languages/zh_TW.json
@@ -15,6 +15,7 @@
"editor": "作者",
"dashboard": "主頁面",
"role": "角色",
+ "profile-picture": "Profile picture",
"post": "文章",
"posts": "文章",
"users": "使用者",
@@ -164,4 +165,4 @@
"publish": "發表",
"please-check-your-theme-configuration": "請檢查您的佈景主題設定",
"plugin-label": "延伸模組標籤"
-}
\ No newline at end of file
+}