diff --git a/README.md b/README.md index bb5d41cf..f10aabf9 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Le site officiel du club réseaux disponible à l'adresse https://e59.fr/ - ```$confidentialLevels``` - ```$userLevels``` -- ```$certificationColors``` +- ```$badges``` - ```$darkThemes``` - ```$lightThemes``` @@ -61,7 +61,7 @@ Le site officiel du club réseaux disponible à l'adresse https://e59.fr/ - ```sqlConnect($dbHost, $dbName, $dbUser, $dbPass)``` -- ```userWidget($userPPURL, $userDisplayName, $userName, $userLevel, $certificationColors)``` +- ```userWidget($userPPURL, $userDisplayName, $userName, $userLevel, $badges)``` - ```listArticles($result, $rootPageURL)``` diff --git a/config/global.ini b/config/global.ini index 96dbddde..4a36c20c 100644 --- a/config/global.ini +++ b/config/global.ini @@ -26,12 +26,10 @@ footerText = "© Jan BELLON - E59 v1.2" 2 = "Responsable" 3 = "Directeur" -[certificationColors] -1 = "#d39367" -2 = "#d3c967" -3 = "#67d38b" -4 = "#a5a5a5" -5 = "#a5a5a5" +[badges] +1 = '' +2 = '' +3 = '' [darkThemes] 0 = '--text: hsl(0, 0%, 80%);--background: hsl(0, 0%, 15%);--panel-background: hsl(0, 0%, 10%);--buttons: hsl(0, 0%, 5%)' diff --git a/html/admin/index.php b/html/admin/index.php index 529315ed..a3b31811 100644 --- a/html/admin/index.php +++ b/html/admin/index.php @@ -59,7 +59,7 @@ $pdo = sqlConnect($sqlDatabaseHost, $sqlDatabaseName, $sqlDatabaseUser, $sqlData $userCertification = $row['certification']; $userPPURL = $row['profile_picture'] == NULL ? "https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png" : $row['profile_picture']; - userWidget($userPPURL, $userDisplayName, $userName, $userCertification, $certificationColors, $rootPageURL); + userWidget($userPPURL, $userDisplayName, $userName, $userCertification, $badges, $rootPageURL); } } ?> diff --git a/html/news/index.php b/html/news/index.php index c6769091..bb75100a 100644 --- a/html/news/index.php +++ b/html/news/index.php @@ -98,7 +98,7 @@ $pdo = sqlConnect($sqlDatabaseHost, $sqlDatabaseName, $sqlDatabaseUser, $sqlData echo ('Editer'); } - userWidget($authorPPURL, $authorDisplayName, $authorUsername, $authorCertification, $certificationColors, $rootPageURL); + userWidget($authorPPURL, $authorDisplayName, $authorUsername, $authorCertification, $badges, $rootPageURL); echo ('
'); echo (''); diff --git a/html/users/index.php b/html/users/index.php index 2563ed94..124d7baa 100644 --- a/html/users/index.php +++ b/html/users/index.php @@ -60,7 +60,7 @@ if(isset($_GET['u']) && empty($_GET['u']) == false) { } .certification { - fill: 0 ? $certificationColors[$userCertification] : "#000000"?>; + fill: 0 ? $badges[$userCertification] : "#000000"?>; } @@ -93,7 +93,9 @@ if(isset($_GET['u']) && empty($_GET['u']) == false) {
0) { - echo ''; + echo (''); + echo ($badges[$userCertification]); + echo (''); } ?>
diff --git a/include/functions.php b/include/functions.php index a225f9dd..b95f66c6 100644 --- a/include/functions.php +++ b/include/functions.php @@ -115,7 +115,7 @@ return $pdo; } - function userWidget($userPPURL, $userDisplayName, $userName, $userCertification, $certificationColors, $rootPageURL) { + function userWidget($userPPURL, $userDisplayName, $userName, $userCertification, $badges, $rootPageURL) { echo (''); echo ('
'); @@ -129,8 +129,8 @@ echo ('
'); echo ($userDisplayName); if ($userCertification > 0) { - echo (''); - echo (''); + echo (''); + echo ('' . $badges[$userCertification] . ''); echo (''); } echo ('
'); diff --git a/include/variables.php b/include/variables.php index bcc0382c..b9ffaa6d 100644 --- a/include/variables.php +++ b/include/variables.php @@ -17,7 +17,7 @@ $confidentialLevels = $globalConfig['confidentialLevels']; $userLevels = $globalConfig['userLevels']; - $certificationColors = $globalConfig['certificationColors']; + $badges = $globalConfig['badges']; $darkThemes = $globalConfig['darkThemes']; $lightThemes = $globalConfig['lightThemes'];